Given & (with realization ( At, Bt, Ct)) stabilizable via state feed-back.Step 1. Select Q>0, and solve P from the following algebraicRiccati equationA'*P+P*A - P*B B'*P+Q=0.Set i=1 and X1=P.Step 2. Solve the following optimization problem for Pi , Ft and ai.OP1: Minimize ai subject to the following LMI constraints[A'*Pi+ Pi*A - Xi*B*B'*Pi - Pi*B*B'*Xi+Xi*B*B'*Xi - ai*Pi (B'*Pi+Ft*C)' ; (B'*Pi+Ft*C) -I] < 0 (1)Pi = Pi' > 0 (2)(eye(2)+(C*B*F3t)' + (C*B*F3t))>0 (3)
Denote a*i as the minimized value of ai.
Step 3. If a*i <= 0, F is a stabilizing static output feedback gain. Stop.
Step 4. Solve the following optimization proble for Pi and Ft.
OP2: Minimize trace(Pi) subject to the above LMI constraints (1) (2) and (3) with ai = a*i . Denote P*i as the Pi that mini-mized trace (Pi).
Step 5. If || Xi*B - P*i*B || < delta , a prescribed tolerance, go to Step 6,
else set i = i+1 and Xi = P*i-1 , then go to Step 2.
Step 6. The system may not be stabilizable via static output feedback. Stop
********************************************************************************
%end
% OK, on a les limites , on commence la bissection
while t_upper-t_lower >= 1e-4
t_mid = (t_upper+t_lower)/2;
sol = solvesdp([C>=0, A <= t_mid*B, B>=0],[],ops);
if sol.problem == 0
t_upper = t_mid;
else
t_lower = t_mid;
end
%disp([t_lower t_upper]);
end
*********************************************************************************************************
A=[-0.0266 -36.6170 -18.8970 -32.0900 3.2509 -0.7626; 0.0001 -1.8997 0.9831 -0.0007 -0.1708 -0.0050; 0.0123 11.7200 -2.6316 0.0009 -31.6040 22.3960 ; 0 0 1 0 0 0; 0 0 0 0 -30 0; 0 0 0 0 0 -30];
B=[0 0; 0 0; 0 0; 0 0; 30 0; 0 30];
C=[0 1 0 0 0 0; 0 0 0 1 0 0];
[n,n]=size(A);
[n,m]=size(B);
[r,n]=size(C);
%Ft=[F1t F2t F3t];
C1t=[C zeros(2,2)];
C2t=[zeros(2,6) eye(2,2)];
C3t=[C*A zeros(2,2)];
At= [A zeros(6,2); C zeros(2,2)];
Bt = [B ;zeros(2,2)];
Ct = [C1t' C2t' C3t']';
Q = eye(8);
% A=[0 1;1 0];
% B=[1 0]';
% C=[1 15];
delta = 1e-5;
a = sdpvar (1);
Ft = sdpvar(2,6);
P = sdpvar(8,8);
%X = sdpvar(2);
eps = 0.01;
X = care(At,Bt*Bt',Q);
%i = 1;
%Y=eye(2);
%F3t=0;
%while (Y>zeros(2))
%while i <= 100
RHS = [P zeros(8,2); zeros(2,8) zeros(2,2)];
LHS = [At'*P+P*At-X*Bt*Bt'*P-P*Bt*Bt'*X+X*Bt*Bt'*X (Bt'*P+Ft*Ct)' ; (Bt'*P+Ft*Ct) -eye(2)];
ops = sdpsettings('debug',1) ;
Constraints1 = [LHS <= a*RHS,P >= 0];
solvesdp(Constraints1,a);
%
% % % Find optimal ai
% ai = solvelocalgevp(LHS,RHS,[],a);
F1t=Fi(:,1:2);
F2t=Fi(:,3:4);
F3t=Fi(:,5:6);
F3 = F3t*inv(eye(2)+ C*B*F3t);
F2 = (eye(2)-F3*C*B)*F2t ;
F1 = inv(eye(2)-F3*C*B)*F1t ;
Y = eye(2)+(C*B*F3t)' + (C*B*F3t);
if ai <= 0
Pi = double(P);
Fi = double(Ft);
break;% end
%
%
% if ai <= 0
% Pi = double(P);
% Fi = double(Ft);
% break;
% else
else
% Avec ce alpha i , résoudre le pb d'optimisation suivant : min trace(P)
%ai=double(a);
% ops = sdpsettings('verbose',0,'warning',0) ;
ops = sdpsettings('debug',1) ;
Constraints = [LHS <= ai*RHS,P >= 0,(eye(2)+(C*B*F3t)' + (C*B*F3t))>0];
%Constraints = [LHS <= ai*RHS,P >= 0, eye(2)+(C*B*(Ft(:,5:6)))'+ (C*B*(Ft(:,5:6)))>0];
sol = solvesdp(Constraints,trace(P),ops);
Pi = double(P);
Fi = double(Ft);
Pi = double(P);
Y = (norm(X-Pi) - delta );
% if Y > 0
% disp ('La matrice I+C*B*F3t est singulière ')
% end
if (Y<=zeros(2))
% norm(X-Pi) <= delta
disp ('On ne peut pas décider par cet algo si le problème SOF est solvable')
%X=X+eps;
%ai=ai-eps;
% if sol.problem ~=0
%
% break;
% end
end
% if sol.problem ~=0
%
% break;
% end
%
%end
ai
%X
%Pi= double(P) % extraire la matrice solution P
norm(X-Pi)
Fi= double(Ft) % extraire la matrice solution F
F1t=Fi(:,1:2);
F2t=Fi(:,3:4);
F3t=Fi(:,5:6);
F3 = F3t*inv(eye(2)+ C*B*F3t)
F2 = (eye(2)-F3*C*B)*F2t
F1 = inv(eye(2)-F3*C*B)*F1t
eig(At)
%double(F1)
%double(F2)
%double(F3)
eig(At+Bt*Fi*Ct)
*********************************************************************************************
I have obtained the following results
ai =
0.722351074218750
ans =
0
Fi =
1.0e+002 *
2.347327881525589 -0.290145665756742 0.994771000946797 0.245590961617259 1.011059947220535 -0.972712801524232
-0.010049072140165 -0.169981834683681 0.226684934190822 0.054409669962516 -0.081218856321405 0.069705942898811
F3 =
1.0e+002 *
1.011059947220535 -0.972712801524232
-0.081218856321405 0.069705942898811
F2 =
99.477100094679713 24.559096161725872
22.668493419082207 5.440966996251622
F1 =
1.0e+002 *
2.347327881525589 -0.290145665756742
-0.010049072140165 -0.169981834683681
ans =
0
0
-5.675661980211077
0.688638462613330 + 0.245532253157104i
0.688638462613330 - 0.245532253157104i
-0.259514945015590
-30.000000000000000
-30.000000000000000
ans =
1.0e+002 *
-5.425949134839419
-0.169344631658648 + 0.205728294750513i
-0.169344631658648 - 0.205728294750513i
-0.024345896829333 + 0.015745136534263i
-0.024345896829333 - 0.015745136534263i
-0.000242356664840 + 0.001277369241297i
-0.000242356664840 - 0.001277369241297i
-0.000252435964747
I wrote this code but I have a problem of constraint ( a warning message appears that One of the constraints evaluates to a FALSE LOGICAL variable + run into numerical problems ) + alpha i minimum is positive and it has to be negative .
Any help please , thanks.