Skip to content

Commit 8bb11c4

Browse files
committed
update lqe return values to match lqr
1 parent 6ff59f0 commit 8bb11c4

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎control/statefbk.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ def lqe(A, G, C, QN, RN, NN=None):
317317
A, G, C = np.array(A, ndmin=2), np.array(G, ndmin=2), np.array(C, ndmin=2)
318318
QN, RN = np.array(QN, ndmin=2), np.array(RN, ndmin=2)
319319
P, E, LT = care(A.T, C.T, np.dot(np.dot(G, QN), G.T), RN)
320-
return _ssmatrix(LT.T), _ssmatrix(P), _ssmatrix(E)
320+
return _ssmatrix(LT.T), _ssmatrix(P), E
321321

322322

323323
# Contributed by Roberto Bucher <roberto.bucher@supsi.ch>

‎control/tests/statefbk_test.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def test_LQR_3args(self):
302302
def check_LQE(self, L, P, poles, G, QN, RN):
303303
P_expected = np.array(np.sqrt(G*QN*G * RN))
304304
L_expected = P_expected / RN
305-
poles_expected = np.array([-L_expected], ndmin=2)
305+
poles_expected = np.array([-L_expected])
306306
np.testing.assert_array_almost_equal(P, P_expected)
307307
np.testing.assert_array_almost_equal(L, L_expected)
308308
np.testing.assert_array_almost_equal(poles, poles_expected)

0 commit comments

Comments
 (0)