I have noticed that running the following reduced code yields no error:
clear,clc
option = sdpsettings('verbose',1,'debug',1);
%some defition about the system
Ap=[-1 0.3; 0 0.5]; Bpu=[0.5;-10];
Bpw=[1;0]; Cpy=[0.4 0.8];
Cpz=[1 0;0 1;0 0]; Dpz=[0;0;1];
Ac=[-4 1;0 -8]; Bc=[-1;-0.5];
Cc=[0.3 -2]; Dc=[1];
H=4.0928; n=2;
m=1; p=2; delta=4;
%switch
% E=sdpvar(n,2,'full');
E=ones(n,2);
Y=sdpvar(2*m,n+m+p,'full');
gama=sdpvar(1,1);
W=sdpvar(n+m+p,n+m+p);
S=diag(sdpvar(2,1,'full'));
A=[Ap Bpu zeros(n);
H*Dc*Cpy -H H*Cc;
Bc*Cpy zeros(2,1) Ac];
B11=[Bpu zeros(2,1);
zeros(1) eye(1)];
Fs=E*S;
B1=[B11*S;Fs];
B2=[Bpw;zeros(3,1)];
C2=[Cpz Dpz zeros(3,2)];
D2=[-Dpz zeros(3,1)];
F=[W*A'+A*W -B1+Y' B2 W*C2';
-B1'+Y -2*S zeros(2,1) S*D2';
B2' zeros(1,2) -eye(1) zeros(1,3);
C2*W D2*S zeros(3,1) -gama*eye(3,3)]<=0;
sol = optimize(F, [], option)
yalmipversion: '20210331'
matlabversion: '9.2.0.538062 (R2017a)'
yalmiptime: 0.2501
solvertime: 0.0559
info: 'Successfully solved (SeDuMi-1.3)'
problem: 0
However when we "switch" the comment, the variable E somehow degrades the solution to:
Warning: Rank deficient, rank = 29, tol = 3.135768e-11.
Reference to non-existent field 'dinf'.
Where 'dinf' has been mentioned
here
But shouldn't the solver come up with feasible tested E=[1 1; 1 1] ?
When debugging, the sedumi actually returns only info.pinf=1, so I assume it jumped out of loop without even creating dinf field
Is that worth investigating?
Alright thanks again for your help!