Cannot compute Riccati solution for LQI controller
68 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi to everybody!
This is my code right now:
u=0.5;
v=0;
omega=0;
m=50;
psi=0;
c_d_Long=0.5;
c_dr=0.6;
c_d_Lat=1;
rho=1000;
L=1.2;
W=0.275;
H=0.416;
I=38;
A =[0, 0, - v*cos(psi) - u*sin(psi), cos(psi), -sin(psi), 0;
0, 0, u*cos(psi) - v*sin(psi), sin(psi), cos(psi), 0;
0, 0, 0, 0, 0, 1;
0, 0, 0, -((3*W*c_d_Long*rho*u^2*1)/10 + (3*W*c_d_Long*rho*u*sign(u))/10)/m, omega, v;
0, 0, 0, -omega, -((3*L*c_d_Lat*rho*v^2*1)/10 + (3*L*c_d_Lat*rho*v*sign(v))/10)/m, -u;
0, 0, 0, 0, 0, - (300*L*c_dr*omega^2*rho*1)/38347 - (300*L*c_dr*omega*rho*sign(omega))/38347];
B =[ 0, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0;
1/m, 1/m, 1/m, 1/m, 0, 0, 0, 0;
0, 0, 0, 0, 1/m, 1/m, 1/m, 1/m;
825/76694, -825/76694, 825/76694, -825/76694, 325/38347, 325/38347, -325/38347, -325/38347];
C=[1 0 0 0 0 0;
0 1 0 0 0 0;
0 0 1 0 0 0;
0 0 0 1 0 0;
0 0 0 0 0 0;
0 0 0 0 0 1];
SYS=ss(A,B,C,0);
Co = ctrb(SYS);
C=rank(Co);
Ob=obsv(SYS);
O=rank(Ob);
Q=eye(12);
R=eye(8);
klqi=lqi(SYS,Q,R)
As you can see I have a 6-dimension state with 8 input and 6 output. When i Run this code i have the following error:
Cannot compute a stabilizing LQR gain (the Riccati solution S and gain matrix K are infinite).
This could be because:
* A has unstable modes that are not controllable through B,
* Q,R,N values are too large,
* [Q N;N' R] is indefinite,
* The E matrix in the state equation is singular.
I had the same issue in the past but every time the problem was the controllabilty of the state but in this case I haven't this problem (rank of the controllabilty matrix= 6)
Hope somebody can help me.
Thank you in advance.
0 commentaires
Réponse acceptée
Paul
le 8 Avr 2021
Modifié(e) : Paul
le 8 Avr 2021
I'm not sure it's relevant, but should the fifth row of SYS.c be all zeros?
I suspect the issue is with stabilizability of the augmented system. Note that the code as posted is checking controllability of the plant, but the LQR solution requires stabilizability of the augmented plant, i.e., the plant combined with the integral control. I think the augmented system (not incuding the reference input) can be formed as
sysaugmented = series(SYS,ss(zeros(6),eye(6),eye(6),0)); % with SYS.c = eye(6)
Then the rank of the controllability matrix is
>> rank(ctrb(sysaugmented))
ans =
9
So the augmented system is not controllable. The eigenvalues are:
>> eig(sysaugmented)
ans =
0
0
0
0
0
0
0
0
0
-0.6188
0
0
So at least two of the uncontrollable modes are on the imaginary axis, which (I think) means the augmented system is not stabilizable, which violates one of the conditions for the solution to exist as stated here:
doc lqi
3 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!