LQI does not run successfully on Ubuntu, but it does, on Windows

3 views (last 30 days)
Hello,
I use in my project the function lqi.
Under Windows with Matlab R2018b all works fine, but under Ubuntu 18.04 with Matlab R2018b it doesn't work.
I get the failure:
Error using ss/lqi (line 115)
The "lqi" command failed to stabilize the plant or find an optimal feedback gain. To remedy this problem:
1. Make sure that all unstable poles of A are controllable through B (use MINREAL to check)
2. Modify the weights Q and R to make [Q N;N' R] positive definite (use EIG to check positivity).
I attached a test script and test data with the solution from windows.
Does anyone have an idea what it could be?
  1 Comment
Walter Roberson
Walter Roberson on 23 Mar 2019
Edited: Walter Roberson on 23 Mar 2019
On Mac, it also shows up as unstable.
When I trace, I see that the checking is happening in +ricpack/getXK.m where it constructs a matrix that I do not understand the significance of at the moment, and checks to see whether its eigenvalues are all < 1. However, some of the eigenvalues are exactly equal to 1, so the test fails. (I see some hints that at higher precision they might be just slightly larger than 1, possibly.)
It seems to be potentially related to a bunch of numeric noise that arises in a qr step before that.

Sign in to comment.

Answers (1)

Gottfried Schrittwieser
Gottfried Schrittwieser on 23 Mar 2019
Hello,
thanks for your answer!
Is this a problem of my code (wrong system or Q,R,N matrizes) or a bug in the Linux implementation of LQI?
  3 Comments
Walter Roberson
Walter Roberson on 23 Mar 2019
The LaPack versions used under Mac and Linux are the same, but the version used for Windows is typically an older version. I hesitate to call it a "bug". Newer versions of LAPACK tend to be less tolerant of borderline matrices.
Walter Roberson
Walter Roberson on 23 Mar 2019
When I go into +ricpack.DARE and evaluate symbolically as much as possible (to reduce the noise effects), then the system fails a stability test involving a series of eigenvalues having absolute value strictly greater than 1 and the remainder having absolute values strictly less than 1, because not enough of the values were strictly greater than 1.
This suggests that it might be correct that the system is not stable.

Sign in to comment.

Tags

Products


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!