You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something like the following has to be solved for discrete-time LQR problems with a penalty on the output signal.
A = randn(2,2)
B = randn(2)
C = [-100 1]
Q = C'*C
dare(A, B, Q, 1)
However this code throws the error Q must be positive semi-definite.
The problem is that Q has a negative eigenvalue that is on the order of -eps(). I believe that this condition is too restrictive and a meaningful solution is found by both MatLab and MatrixEquations.jl for most A and B.
The numerics of RIccati equations might be a bit too much to get into, but this could be another reason to consider using MatrixEquations.jl (note that its ared function use the opposite order of the Q and R arguments).
A quick fix would be to just use something like Q = C'*C + eps()*I
The text was updated successfully, but these errors were encountered:
Something like the following has to be solved for discrete-time LQR problems with a penalty on the output signal.
However this code throws the error
Q must be positive semi-definite.
The problem is that
Q
has a negative eigenvalue that is on the order of-eps()
. I believe that this condition is too restrictive and a meaningful solution is found by both MatLab andMatrixEquations.jl
for mostA
andB
.The numerics of RIccati equations might be a bit too much to get into, but this could be another reason to consider using
MatrixEquations.jl
(note that itsared
function use the opposite order of theQ
andR
arguments).A quick fix would be to just use something like
Q = C'*C + eps()*I
The text was updated successfully, but these errors were encountered: