Fix Travis CI failure (lqr bad argument)#253
Merged
murrayrm merged 2 commits intopython-control:masterfrom Dec 22, 2018
Merged
Conversation
This was referenced Dec 21, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.pywas 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
slycotLQR 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.