Skip to content

Fix Travis CI failure (lqr bad argument)#253

Merged
murrayrm merged 2 commits intopython-control:masterfrom
murrayrm:fix_lqr_badarg
Dec 22, 2018
Merged

Fix Travis CI failure (lqr bad argument)#253
murrayrm merged 2 commits intopython-control:masterfrom
murrayrm:fix_lqr_badarg

Conversation

@murrayrm
Copy link
Copy Markdown
Member

Fix for the Travis CI bug identified in PR #242 regarding LQR test. The problem was that one of the test cases used in tests/matlab_test.py was incorrect. It used a set of weighting matrices that did not give a positive definite cost function for the LQR problem. This should have generated a error, but that case is not tested in the code (see issue #252, created to track this).

The fix here is to change the state space weighting matrix (multiplying it by 10) so that the overall weighting function is now positive definite. In addition, a skipped unit test has been put in with the original test case.

The reason this was generating spurious errors is because the slycot LQR function (sb0md) was creating a closed loop system whose eigenvalues had very small realparts (on order 1e-16) and apparently these were sometimes positive and sometimes negative.

Also fixed a small typo in a docstring while I was at it.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 78.914% when pulling cc4508c on murrayrm:fix_lqr_badarg into 4b0101c on python-control:master.

@murrayrm murrayrm changed the title Fix lqr badarg Fix Travis CI failure (lqr bad argument) Dec 21, 2018
@murrayrm murrayrm merged commit 4eb485f into python-control:master Dec 22, 2018
@murrayrm murrayrm deleted the fix_lqr_badarg branch April 21, 2019 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants