The lqr function does not check to make sure the weighting functions that are passed on positive definite. In particular, as identified in PR #242, there is a test case with a cross-term that generates a non-positive definite cost function:
(K, S, E) = lqr(self.siso_ss2.A, self.siso_ss2.B, np.eye(3), np.eye(1), [[1], [1], [2]])
A quick fix was generated in PR #253 by changing the state space weight, but statefbk.py should be updated to check for this case.
The
lqrfunction does not check to make sure the weighting functions that are passed on positive definite. In particular, as identified in PR #242, there is a test case with a cross-term that generates a non-positive definite cost function:A quick fix was generated in PR #253 by changing the state space weight, but
statefbk.pyshould be updated to check for this case.