good books for learning linear matrix inequality with MATLAB examples
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello,
i am in my reasurch phase and badly stuck in LMI coding using matlab. can anyone suggest me some good books on LMI with matlab example please. iam trying to solve the following problem (from "Monitoring of stealthy attack in networked control systems") :
so far i have coded this but it gives me infeasible sol whereas in paper thr range of lambda is [0,0.72]:
clc
close all
clear all
%%%%%%%%%%%%%%%%%%%%%%%%%%SYSTEM DYNAMICS%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
A=[0.6 0 0.34 0.35 ;
0 0.8 0 0.37 ;
0 0 0.5 0 ;
0 0 0 0.9];
B=[1 0 0; 1 0 1; 0 0 2; 0 1 1];
C=[1 0 0 0; 0 1 0 0; 0 0 0 1];
f=[0 0 1 0]';
F=A*f;
H=pinv(C*F);
Ab=A-A*F*H*C;
bta=[ 1 0 1;
2 1 1 ];
sigma=bta*(eye(3)-C*F*H);
% rank(sigma);
cb=sigma*C;
Kb =[0.0057 -0.0028;
-0.0275 0.0618;
0.0041 -0.0178;
0.0077 0.0239];
K =[0.0276 0.0230 0.0229;
0.0252 0.0612 0.0338;
0.0015 -0.0001 -0.0001;
0.0162 0.0235 0.0313 ];
%%
lambda=0;
k=1;
l=zeros(1,91);
n=zeros(1,91);
%%
%LMI PART
for i=1:91
i
setlmis([]);
Y=lmivar(1,[4,1]) ;
%defining first lmi
% |Y sqrt(1-lamda)(YA+KC) sqrt( lamda)(YA_bar+K_bar*C_bar)|
% | sqrt(1-lamda)(YA+KC)' Y 0 | >0
% | sqrt( lamda)(YA_bar+K_bar*C_bar))' 0 Y |
%%
%row 1 (% |Y sqrt(1-lamda)(YA+KC) sqrt( lamda)(YA_bar+K_bar*C_bar)|)
lmiterm([-1 1 1 Y], 1,1); % Y>0
lmiterm([-1 1 2 Y], 1,sqrt(1-lambda)*A); %sqrt(1-lmd)*(YA)
lmiterm([-1 1 2 0], sqrt(1-lambda)*K*C); %sqrt(1-lmd)*(KC)
lmiterm([-1 1 3 Y], 1,sqrt(lambda)*Ab); %sqrt(lmd)*(YA_bar)
lmiterm([-1 1 3 0], sqrt(lambda)*Kb*cb); %sqrt(lmd)*(K_bar C_bar)
%%
%row 2 (|Y 0|)
lmiterm([-1 2 2 Y], 1,1); %Y>0
lmiterm([-1 2 3 0],zeros(4,4)); %4X4 block of zeros
%%
%row 3 (| Y |)
lmiterm([-1 3 3 Y], 1,1); %Y>0
%%
% defining 2nd lmi (Y<I ) (ignoring this LMI is feasible)
lmiterm([2 1 1 Y],1,1); %Y < ...
lmiterm([-2 1 1 0],eye(4)); % ... < I
%%
syslmis=getlmis ;
[tmin,Yfes] = feasp(syslmis);
Y=dec2mat(syslmis,Yfes,Y) ;
Y1(:,:,k)=Y;
K1(:,:,k)=K;
Kb1(:,:,k)=Kb;
L(:,k)=lambda;
%%
a=Y1(:,:,i);
b=Y1(:,:,i)*A+(K1(:,:,i)*C);
c=Y1(:,:,i)*Ab+(Kb1(:,:,i)*cb);
D=[a sqrt(1-L(:,i))*b sqrt(L(:,i))*c;
sqrt(1-L(:,i))*b' a zeros(4,4);
sqrt(L(:,i))*c' zeros(4,4) a];
%%
[R1,p1] = chol(D); %p1=0 implies D>0
[R2,p2] = chol(Y); %p2=0 implies Y>0
[p1,p2]
if(p1==0 && p2==0)
display('__________________________________positive definite____________________________________________')
dummy(:,k)=k ; %for picking lamda from L with index in dummy for wich D>0 & Y>0
lmd(:,k)=lambda;
end
if(p1~=0 || p2~=0)
dummy(:,k)=0;
% lmd(:,k)=-1;s
display('__________________________________not positive definite________________________________________')
end
lambda=lambda+0.01;
k=k+1;
display('_______________________________________________________________________________________________')
end
display(' all lambdas for which Y>0 and D(Y)>0')
lmd
0 Commenti
Risposte (1)
Waseem Abbasi
il 3 Lug 2019
I think as far LMI are concerned its better to use Yalimp toolbox as it solve the LMI problem quite effeciently and easily.
0 Commenti
Vedere anche
Categorie
Scopri di più su Linear Matrix Inequalities in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!