Cannot compute Riccati solution for LQI controller

조회 수: 75 (최근 30일)
Leonardo Costa
Leonardo Costa 2021년 4월 7일
댓글: Leonardo Costa 2021년 4월 8일
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.

채택된 답변

Paul
Paul 2021년 4월 8일
편집: Paul 2021년 4월 8일
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
Paul
Paul 2021년 4월 8일
편집: Paul 2021년 4월 8일
Yes, you can augment the plant manually with the integrator and then use the lqr() command to compute the feedback gains,subject to the standard consraints for LQR solutions.
Leonardo Costa
Leonardo Costa 2021년 4월 8일
Thank you very much!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Computations에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by