LMI problem

139 views
Skip to first unread message

zhou thomas

unread,
Apr 16, 2021, 3:17:55 PM4/16/21
to YALMIP
Dear Prof Löfberg,

I am trying to use LMI to check whether my eigenvalues' regions through the attached equation 4.20. And  it gives me a P matrix(W in the code) which means the theta should be in a particular region. But when I calculate the A matrix's eigenvalues, several eigenvalues apparently were not within the region. I plug in P (W in the code) to equation and try to check whether equation 4.20 is negative semi definite. I found several zeros. I understand we could only apply(<=) in the yalmip constraint and that is reasonable to see zeros. How could we address the negative definite here? I was wondering what point I am missing here. Is there a numerical issue I need to consider? Thanks!
D stability.png
The codes are:
L= [   4.1883,   -1.7788,   -0.5558,   -0.6490,   -0.5558,   -0.6490;
   -1.7788,    4.5919,   -0.6490,   -0.7576,   -0.6490,   -0.7576;
   -0.5558,   -0.6490,    4.1883,   -1.7788,   -0.5558,   -0.6490;
   -0.6490,   -0.7576,   -1.7788,    4.5919,   -0.6490,   -0.7576;
   -0.5558,   -0.6490,   -0.5558,   -0.6490,    4.1883,   -1.7788;
   -0.6490,   -0.7576,   -0.6490,   -0.7576,   -1.7788,    4.5919];

M=diag(1./[5,5,2,2,2,2]);
W=sdpvar(11,11);
st=sdpvar(1,1)

d=[5.43,1.4951,10,10,10,10];
D=diag(d);
AA=[zeros(5,5),eye(5,5),-ones(5,1);zeros(6,5),zeros(6,6)];
MM=[zeros(5,5),zeros(5,5),zeros(5,1);-M*L([1:6],[1:5]),-M*D];
A=AA+MM;

mosekopt('min write(dump.task.gz)')

F=[W>=0];

F=[F,[(A*W+W*A')*sin(0.5987),(A*W-W*A')*cos(0.5987);-(A*W-W*A')*cos(0.5987),(A*W+W*A')*sin(0.5987)]<=0];

options = sdpsettings('solver','bmibnb');
sol=optimize(F);
PP=value(W);

Johan Löfberg

unread,
Apr 16, 2021, 3:44:27 PM4/16/21
to YALMIP

why on earth are you trying to invoke bmibnb? (luckily you failed in doing  so as you never used the options...)

the problem is homogeneous so can essentially return 0. you have to dehomogenize it with e.g. W>=I

zhou thomas

unread,
Apr 16, 2021, 5:37:42 PM4/16/21
to YALMIP
Thank you so much for your reply! I forgot to change the option as I was solving a nonconvex problem before.
I added the W>=I and I changed the options row. I think that 'mosek' solver will be used this time. I still got a solution. 
From my understanding, I should not get a solution if some eigenvalues are not within the region. Am I correct? What did I miss here? 

L= [   4.1883,   -1.7788,   -0.5558,   -0.6490,   -0.5558,   -0.6490;
   -1.7788,    4.5919,   -0.6490,   -0.7576,   -0.6490,   -0.7576;
   -0.5558,   -0.6490,    4.1883,   -1.7788,   -0.5558,   -0.6490;
   -0.6490,   -0.7576,   -1.7788,    4.5919,   -0.6490,   -0.7576;
   -0.5558,   -0.6490,   -0.5558,   -0.6490,    4.1883,   -1.7788;
   -0.6490,   -0.7576,   -0.6490,   -0.7576,   -1.7788,    4.5919];

M=diag(1./[5,5,2,2,2,2]);
W=sdpvar(11,11);
st=sdpvar(1,1)
CC=[zeros(5,5),zeros(5,6);zeros(6,5),diag([1/M(1,1),1/M(2,2),1/M(3,3),1/M(4,4),1/M(5,5),1/M(6,6)])];

d=[5.43,1.4951,10,10,10,10];
D=diag(d);
AA=[zeros(5,5),eye(5,5),-ones(5,1);zeros(6,5),zeros(6,6)];
MM=[zeros(5,5),zeros(5,5),zeros(5,1);-M*L([1:6],[1:5]),-M*D];
A=AA+MM;

mosekopt('min write(dump.task.gz)')

F=[W>=eye(11)];


F=[F,[(A*W+W*A')*sin(0.5987),(A*W-W*A')*cos(0.5987);-(A*W-W*A')*cos(0.5987),(A*W+W*A')*sin(0.5987)]<=0];
options = sdpsettings('solver','mosek')
sol=optimize(F,[],options);
PP=value(W);

Johan Löfberg

unread,
Apr 17, 2021, 3:34:28 AM4/17/21
to YALMIP
mosek will return the latest iterate, you always have to check diagnostics

Good news: the next version of yalmip allows you to solve nonlinear SDPs via general nonlinear solvers.  Very experimental but in this case for instance, you can let d be a decision variable, and then search for a vector which renders the problem feasible

sol=optimize(F,d'*d)

>> value(d)

ans =

    8.9548
    9.4212
    5.7198
    5.9793
    5.7053
    6.0004

>> phase(eig(value(A)))-pi

ans =

         0
   -0.5954
    0.5954
   -0.5860
    0.5860
   -0.5861
    0.5861
         0
         0
         0
         0

zhou thomas

unread,
Apr 18, 2021, 10:57:37 AM4/18/21
to YALMIP
Could you elaborate more on what you mean by check diagnostics? I tried to see whether I could find a W(used in the code, usually equations use P) using LMI to check the pole regions. 
If my understanding is correct, I should not get a W if the poles are out of the region. After I get a W, what diagnostic do I need? If I still need to check eigenvalues, the LMI here seems not working. Another question is when we could find release of the next version of yalmip? Thank you so much.

Johan Löfberg

unread,
Apr 18, 2021, 11:10:36 AM4/18/21
to YALMIP
you have to look at sol.problem, in your case it says the problem was declared infeasible

the experiments for nonlinear sdps via nonlinear solvers are still only on my machine and have not been pushed yet

zhou thomas

unread,
Apr 18, 2021, 11:25:45 AM4/18/21
to YALMIP
Thank you so much. I checked the sol.problem. yalmiperror(sol.problem) gives me 'infeasible problem'.
I want to double check one thing with you. Even if can see a matrix for value(W),  it just means a latest iterate from the solver. It will become final solution only after sol.problem=1. Am I correct?
If this is an infeasible problem, how do we interpret this value(W). Is there any materials that I could read?  

Johan Löfberg

unread,
Apr 18, 2021, 11:30:31 AM4/18/21
to YALMIP
solvers simply return their current iterate which could be pure crap
Reply all
Reply to author
Forward
0 new messages