Lmilab is successful, but mosek is infeasible, why

50 views
Skip to first unread message

Zihao Cheng

unread,
Jul 26, 2018, 11:11:42 PM7/26/18
to YALMIP

close all;%%
clear all;%%%


M=10;m=1;l=3;g=10;
A=[0 1 0 0; 0 0 -m*g/M 0; 0 0 0 1; 0 0 g/l 0];
B=[0; 1/M; 0; -1/(M*l)];
Bw=ones(4,1);
C=Bw';
D=0.1;
det=0.1; p=0.53; r=200; td=0.16;

X=sdpvar(4,4);
Q_=sdpvar(4,4);
R_=sdpvar(4,4);
Omg_=sdpvar(4,4);
N_=sdpvar(16,4);
M_=sdpvar(16,4);
Y=sdpvar(1,4);

F_11a=[A*X+X*A'+Q_, B*Y, zeros(4), B*Y;
    Y'*B', det*Omg_, zeros(4), zeros(4);
    zeros(4), zeros(4), -Q_, B*Y;
    Y'*B', zeros(4), zeros(4), -Omg_];
F_11b=[-N_, N_-M_, M_, zeros(16,4)];
F_21a=sqrt(td)*N_';F_21b=sqrt(td)*M_';
F_31=[Bw', zeros(1,4), zeros(1,4), zeros(1,4)];
F_41=[sqrt(td)*A*X, sqrt(td)*B*Y,  zeros(4), sqrt(td)*B*Y];
F_51=[C*X, D*Y, zeros(1,4), D*Y];
F1=[F_11a+F_11b+F_11b', F_21a', F_31', F_41', F_51';
    F_21a, -R_, zeros(4,1), zeros(4), zeros(4,1);
    F_31, zeros(1,4), -r^2, sqrt(td)*Bw', zeros(1);
    F_41, zeros(4), sqrt(td)*Bw, p^2*R_-2*p*X, zeros(4,1);
    F_51, zeros(1,4), zeros(1), zeros(1,4), -1];
F2=[F_11a+F_11b+F_11b', F_21b', F_31', F_41', F_51';
    F_21b, -R_, zeros(4,1), zeros(4), zeros(4,1);
    F_31, zeros(1,4), -r^2, sqrt(td)*Bw', zeros(1);
    F_41, zeros(4), sqrt(td)*Bw, p^2*R_-2*p*X, zeros(4,1);
    F_51, zeros(1,4), zeros(1), zeros(1,4), -1];
F=(X>=0)+(Q_>=0)+(R_>=0)+(Omg_>=0)+(F1<=0)+(F2<=0);
ops=sdpsettings('solver','lmilab');
optimize(F,[],ops)
%optimize(F)%mosek
check(F)
X=value(X);
Y=value(Y);
Q_=value(Q_)
R_=value(R_);
N_=value(N_);
M_=value(M_);
Omg_=value(Omg_)
Lm2=[F_11a+F_11b+F_11b', F_21a', F_31', F_41', F_51';
    F_21a, -R_, zeros(4,1), zeros(4), zeros(4,1);
    F_31, zeros(1,4), -r^2, sqrt(td)*Bw', zeros(1);
    F_41, zeros(4), sqrt(td)*Bw, p^2*R_-2*p*X, zeros(4,1);
    F_51, zeros(1,4), zeros(1), zeros(1,4), -1]
K=Y*inv(X)
Omg=inv(X)*Omg_*inv(X)

The above theorem is the objective of my simulation. I wander that there exist  simultaniously \tilde{Q} and -\tilde{Q}, \tilde{\Omega} and -\delta \tilde{\Omega}  as diagnal terms. I think it is not feasible. However, it is feasible by using  solver lmilab, but infeasible by using solve mosek. As Johan Lofberg said, mosek is more fast and robust in YALMIP. I need help. 

Johan Löfberg

unread,
Jul 27, 2018, 1:59:17 AM7/27/18
to YALMIP
I don't think you meant F1 and F2 to be non-symmetric (i.e. not LMI constraints)
>> F
++++++++++++++++++++++++++++++++++++++++
|   ID|                      Constraint|
++++++++++++++++++++++++++++++++++++++++
|   #1|           Matrix inequality 4x4|
|   #2|           Matrix inequality 4x4|
|   #3|           Matrix inequality 4x4|
|   #4|           Matrix inequality 4x4|
|   #5|   Element-wise inequality 520x1|
|   #6|   Element-wise inequality 520x1|
++++++++++++++++++++++++++++++++++++++++

and if you use lmilab on an infeasible problem, it will not tell yalmip (and thus you) if it is infeasible, that is one of the main not to use lmilab

Zihao Cheng

unread,
Jul 27, 2018, 2:13:00 AM7/27/18
to YALMIP
Dear Johan,
     Thank you for your reply firstly. Should i understand your means that it does not make sense that it uses LMILAB with YALMIP. Even though the results is positive as following, your suggestion is that never use LMILAB and  ignore its results. right?     
%%%%%
yalmiptime: 4.0363
    solvertime: 0.1917
          info: 'Successfully solved (LMILAB)'
       problem: 0
 Through it displays successful, this "success" represents nothing.  

Johan Löfberg

unread,
Jul 27, 2018, 2:44:34 AM7/27/18
to YALMIP
Reply all
Reply to author
Forward
0 new messages