Cannot compute Riccati solution for LQI controller
Show older comments
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.
Accepted Answer
More Answers (0)
Categories
Find more on State-Space Control Design in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!