Hi,
I want to solve an LMI constraint using " penlab ", and i have three matrices constraints (SDPs are : P11, P12, P2), when i run the Matlab-file, Matlab keep busy and it not return solution, even if i keep it for a long time.
I want to know, if my device isn't enough performant, or i maked mistake(s) in my program ???
With my thanks.
the code:
close all
clear all
clc
%%% the differents constants
u=0.7;
Sf10=60712.7*u;
Sf20=4814*u;
Sr10=60088*u;
Sr20=3425*u;
m=1500;
Vx=20;
Iz=2208;
L2=1.4625;
L1=1.0065;
Is=5;
Iw=0.4;
a11=(-(2*(Sf10+Sr10))/m*Vx);
a12=-1+((2*(L2*Sr10-L1*Sf10))/m*Vx^2);
a13=(2*(L2*Sr10-L1*Sr10))/Iz;
a14=(-2*(L2^2*Sr10+L1^2*Sf10))/Iz*Vx;
a21=(-(2*(Sf20+Sr20))/m*Vx);
a22=-1+((2*(L2*Sr20-L1*Sf20))/m*Vx^2);
a23=(2*(L2*Sr20-L1*Sr20))/Iz;
a24=(-2*(L2^2*Sr20+L1^2*Sf20))/Iz*Vx;
b11=2*Sf10/m*Vx;
b12=2*L1*Sf10/Iz;
b13=1/m*Vx;
b14=Iw/Iz;
b21=2*Sf20/m*Vx;
b22=2*L1*Sf20/Iz;
%%% the matrices of system
A1=[a11 a12 0 0;a13 a14 0 0;0 1 0 0;Vx Is Vx 0];
B1=[b11 1/m*Vx 0;b12 Iw/Iz 0;0 0 -Vx;0 0 -Is*Vx];
A2=[a21 a22 0 0;a23 a24 0 0;0 1 0 0;Vx Is Vx 0];
B2=[b21 1/m*Vx 0;b22 Iw/Iz 0;0 Iw/Iz 0;0 0 -Is*Vx];
C=[1 0 0 0;0 1 0 0;0 0 1 0;0 0 0 1];
D=[[0;0;0;0],[0;0;0;0],[0;0;0;0]];
Bd=[1 0 0 0;0 1 0 0;0 0 1 0;0 0 0 1];
%%% SDP Variables
P11=sdpvar(4,4,'symmetric');
P12=sdpvar(4,4,'symmetric');
P2=sdpvar(4,4,'symmetric');
N1=sdpvar(4,4);
N2=sdpvar(4,4);
V=sdpvar(4,4);
lm=sdpvar(1,1);
u=sdpvar(1,1);
o=sdpvar(1,1);
gg1=P11*A1;
gg2=P11*A2;
Del11=gg1+gg1'+N1*C'+C*N1'+eye(4);
Del12=gg2+gg2'+N1*C'+C*N1'+eye(4);
Del21=N1'-P12'*C*A1-N2*C;
Del22=N1'-P12'*C*A2-N2*C;
%% System under the Schur complement
S1=[Del12 Del22' ((A1-A2)'*P11)';Del22 N2+N2' (-(A1-A2)'*C'*P12)';(A1-A2)'*P11 -(A1-A2)'*C'*P12 P2*A1'+A1*P2'];
M1=[(B1-B2)'*P11 -(B1-B2)'*C'*P12 B1'*P2;Bd'*P11 -Bd'*C'*P12 Bd'*P2;V*C zeros(4) zeros(4)];
R1=[u*eye(4) zeros(4) zeros(4,3);zeros(4) lm*eye(4) zeros(4,3);zeros(3,4) zeros(3,4) o*eye(3)];
S2=[Del11 Del21' ((A2-A1)'*P11)';Del21 N2+N2' (-(A2-A1)'*C'*P12)';(A2-A1)'*P11 -(A2-A1)'*C'*P12 P2*A2'+A2*P2'];
M2=[(B2-B1)'*P11 -(B2-B1)'*C'*P12 B2'*P2;Bd'*P11 -Bd'*C'*P12 Bd'*P2;V*C zeros(4) zeros(4)];
R2=[u*eye(4) zeros(4) zeros(4,3);zeros(4) lm*eye(4) zeros(4,3);zeros(3,4) zeros(3,4) o*eye(3)];
%% SDP solve
Sys=[[S1-M1'*R1*M1]<=0];
Sys=[Sys, [S2-M2'*R2*M2]<=0];
Sys=[Sys, P12>=0, P11>=0, P2>=0, lm>=0, u>=0];
opt=sdpsettings('solver','penlab');
yalmipdiagnostics=optimize(Sys)
N1=double(N1);
N2=double(N2);
P11=double(P11);
P12=double(P12);
P2=double(P2);
RR=inv(inv(P12)*N2-C*inv(P11)*N1);
tet=inv(P11)*N1*RR;
E=[eye(4)+tet*C tet;RR*C RR]
Y=inv(E)