Skip to content

Commit 4eb485f

Browse files
authored
Merge pull request #253 from murrayrm/fix_lqr_badarg
Fix Travis CI failure (lqr bad argument)
2 parents b89ed4f + cc4508c commit 4eb485f

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

control/statesp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ def evalfr(self, omega):
385385
with input value s = i * omega.
386386
387387
"""
388-
warn("StateSpace.evalfr(omega) will be depracted in a future "
388+
warn("StateSpace.evalfr(omega) will be deprecated in a future "
389389
"release of python-control; use evalfr(sys, omega*1j) instead",
390390
PendingDeprecationWarning)
391391
return self._evalfr(omega)

control/tests/matlab_test.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,14 @@ def testAcker(self):
414414
@unittest.skipIf(not slycot_check(), "slycot not installed")
415415
def testLQR(self):
416416
(K, S, E) = lqr(self.siso_ss1.A, self.siso_ss1.B, np.eye(2), np.eye(1))
417+
418+
# Should work if [Q N;N' R] is positive semi-definite
419+
(K, S, E) = lqr(self.siso_ss2.A, self.siso_ss2.B, 10*np.eye(3), \
420+
np.eye(1), [[1], [1], [2]])
421+
422+
@unittest.skip("check not yet implemented")
423+
def testLQR_checks(self):
424+
# Make sure we get a warning if [Q N;N' R] is not positive semi-definite
417425
(K, S, E) = lqr(self.siso_ss2.A, self.siso_ss2.B, np.eye(3), \
418426
np.eye(1), [[1], [1], [2]])
419427

0 commit comments

Comments
 (0)