Cvx - infeasible problem

(eliiiiiiiiiiiiiiiii) #1

can anyone help me to solve the infeasible problem as below ?
where is the mistake of it?

clear all
close all
A = [-0.45 0.45 0;0.09 0.225 -0.45;0.135 0.135 -0.54];
B = [1;0.2;0.3];
C = [1 .8 .7];
Ad = [-0.04 0.02 0;0.02 -0.16 0.04;0.2 -0.06 -0.2];

mu =0.8
delta = 0.4 
n = size(A,1);
[n,m] = size(B);
[q,n] = size(C);
d1   = -1;
d2   = 1;
[U,S,V] = svd(B)
cvx_begin sdp
variable P1(n,n) symmetric;
variable P2(n,n) symmetric;
variable Q1(n,n) ;
variable Q2(n,n) symmetric;
variable Q4(n,n) ;

variable omega11(m,m);
variable omega21(m,m); 
variable omega12(n-m,n-m);
variable omega22(n-m,n-m); 

variable Y(n,n)
variable CT(q,n)
variable DT(q,m)
variable X(n,m)
variable gama1sq nonnegative;
variable gama2sq nonnegative;

Q =[Q1 Q2;Q2' Q4];
U1 = U(:,1);
U2 = U(:,2:3);
P = [P1 zeros(n,n);zeros(n,n) P2];
omega1 = U1*omega11*U1'+U2*omega12*U2';
omega2 = U1*omega21*U1'+U2*omega22*U2';

Pcl  = [P1-(omega1+omega1') zeros(n,n);zeros(n,n) P2-(omega2+omega2')];

omegaT1 = inv(V')*pinv(S)*inv(U)*omega1*U*S*V';
omegaT2 = inv(V')*pinv(S)*inv(U)*omega2*U*S*V';
d = d2-d1+1

minimize gama1sq*delta

subject to 

%H infinte condition 
T1 = P1-(omega1+omega1');
T2 = P2-(omega2+omega2');
T3 = mu*(A+B*DT*C)
T4 = mu*B*CT
T5 = X*C
T6 = Y
DOm = omegaT1*omegaT1'

[T1 zeros(3) T3 T4 omega1*Ad zeros(3) mu*omega1*B zeros(3,1);
zeros(3) T2 T5 T6 zeros(3) zeros(3) zeros(3,1) zeros(3,1);
T3' T5' -P1+d*Q1 d*Q2 zeros(3) zeros(3) zeros(3,1) C'*DT';
T4' T6' d*Q2' -P2+d*Q4 zeros(3) zeros(3) zeros(3,1) CT';
Ad'*omega1' zeros(3) zeros(3) zeros(3) -Q1 -Q2 zeros(3,1) zeros(3,1);
zeros(3) zeros(3) zeros(3) zeros(3) -Q2' -Q4 zeros(3,1) zeros(3,1);
mu*B'*omega1' zeros(1,3) zeros(1,3) zeros(1,3) zeros(1,3) zeros(1,3) -gama1sq*eye(1) omegaT1';
zeros(1,3) zeros(1,3) DT*C CT zeros(1,3) zeros(1,3) omegaT1 DOm]

%% matrices controller
Ac = inv(omega2)*Y
Bc = inv(omega2)*X
Cc =inv(omegaT1)*CT
Dc = inv(omegaT1)*DT
sys = ss(Ac,Bc,Cc,Dc,.1)
K =tf(sys)

(Mark L. Stone) #2

Using both sedumi and sdpt3, the problem runs and produces an optimal solution having cvx_optval = 0 .

Perhaps you are not satisfied that apparently, all (or most of) the CVX variables have reported optimal value of zero or within solver tolerance thereof. Well, your program doesn’t have ANY constraints (see next paragraph) other than symmetric and nonnegative in variable declarations. The objective is to minimize gama1sq*0.4 , where gama1sq is declared nonnegative. So of course gama1sq = 0 is optimal, and that’s what CVX/solvers reports. All other variable values are arbitrary (except as previously mentioned), so zeros can and are chosen for everything.

Everything under subject to is an expression assignment (uses =), not a constraint (equality constraint uses ==), and serves to populate what looks like it’s intended to be an LMI constraint just before cvx_end. But it is missing the >= 0 (or <= 0), so it is just a CVX expression dangling in the code, doing nothing other than saying hello, so to speak… But in any event, it is not affine as would be required. The lower right-hand element D0m is a quadratic, and therefore not affine, and not allowed in an LMI. Beyond that, the LMI is apparently not symmetric. So you have some work to do to make it symmetric affine, as it needs to be for use in CVX.