Why when i simulate this simple code, got message numerical problems??Its means that my code is not feasible??
Code:
opt = sdpsettings;
opt = sdpsettings(opt,'verbose',0);
z=tf('z');
%% System A'=A+B2F, B'=B1, C'=F, D=0
A=[0.7 0 0; 0 0 1; 0 -1 2];
B1=[1; 0 ; 1];
B2=[-1; 0; -1];
D=0;
L=sdpvar(1,3,'full');
na=size(A,1);
nc1=size(L,1); % size of the row of matrix L
nb=size(B1,2); % size of the 'column' of matrix B
X= sdpvar(na,na,'symmetric'); % set the variable X
Gm = sdpvar(1,1);
%L=K*X
%% Linear approximation
Mh=[-X A*X+B2*L B1 zeros(na,nc1);
X*A'+L'*B2' -X zeros(na,nb) L';
B1' zeros(nb,na) -Gm*eye(nb) 0;
zeros(nc1,na) L 0 -Gm*eye(nc1)];
F1 = [ Mh <=0, X>=0]
solution = solvesdp(F1,Gm,opt)
REPORT = solution.problem
Gm1=double(Gm)
w=double(L)
x=double(X)
Fs=w/x
Result:
++++++++++++++++++++++++++++++++
| ID| Constraint|
++++++++++++++++++++++++++++++++
| #1| Matrix inequality 8x8|
| #2| Matrix inequality 3x3|
++++++++++++++++++++++++++++++++
solution =
struct with fields:
yalmiptime: 0.1512
solvertime: 0.5118
info: 'Numerical problems (SeDuMi-1.3)'
problem: 4
Really appreciate your reply. Thanks.