Linear Matrix Inequality not recognized

36 views
Skip to first unread message

optimizer

unread,
Oct 21, 2019, 10:52:53 AM10/21/19
to YALMIP
Dear Prof. Johan, this is my first attemp to solve an LMI.
I formulate my non-linear matrix inequality into a linear matrix inequality by means of a change of variables (the matrices of the change of variables are Q and L, exploiting the relation between L and Q i will be able to obtain back the design variables i was searching). 
Now i have matrices:

% Lmi Matrix
Q=sdpvar(size(alfa,1),size(alfa,1));
L=sdpvar(size(alfa,1),size(alfa,1));%,'full'

stheta=sin(theta);
ctheta=cos(theta);

LMI_11=stheta*(Q*Ar-L+Ar*Q-L');
LMI_12=ctheta*(Ar'*Q-L'-Q*Ar+L);
LMI_21=ctheta*(-Ar'*Q+L'+Q*Ar-L);
LMI_22=stheta*(Q*Ar-L+Ar*Q-L');
LMI=[LMI_11 LMI_12; LMI_21 LMI_22];

Matrices looks like:

>> L
Linear matrix variable 2x2 (symmetric, real, 3 variables, eigenvalues between [-0.00010116,4.3695e-12])
>> Q
Linear matrix variable 2x2 (symmetric, real, 3 variables, eigenvalues between [-6.2843e-10,6.2846e-10])
>> LMI_11
Linear matrix variable 2x2 (full, complex, 6 variables, eigenvalues between [-2.5576e-13-2.3569e-13i,2.5576e-13-2.4949e-13i])
>> LMI_12
Linear matrix variable 2x2 (full, complex, 3 variables, eigenvalues between [0-1.199e-08i,0+1.199e-08i])
>> LMI_21
Linear matrix variable 2x2 (full, complex, 3 variables, eigenvalues between [0+1.199e-08i,0-1.199e-08i])
>> LMI_22
Linear matrix variable 2x2 (full, complex, 6 variables, eigenvalues between [-2.5576e-13-2.3569e-13i,2.5576e-13-2.4949e-13i])
>> LMI
Linear matrix variable 4x4 (full, complex, 6 variables, eigenvalues between [-1.1989e-08-2.46e-13i,-1.199e-08-2.3918e-13i])

If I now impose my constraint:
ConstrLMI=[LMI<=0]+[Q>=0];

I see that the first inequality is not a matrix inequality, why?
>> ConstrLMI=[LMI<=0]+[Q>=0]
+++++++++++++++++++++++++++++++++++++++++++++++++
|   ID|                               Constraint|
+++++++++++++++++++++++++++++++++++++++++++++++++
|   #1|   Element-wise inequality (complex) 16x1|
|   #2|                    Matrix inequality 2x2|
+++++++++++++++++++++++++++++++++++++++++++++++++

I tried to formulate the constraint into real numbers:
>> LMI1=real(LMI); 
>> LMI2=imag(LMI); 
>> bigLMI=[LMI1 LMI2;-LMI2 LMI1] 
Linear matrix variable 8x8 (full, real, 6 variables, eigenvalues between [-1.1989e-08-2.46e-13i,-1.199e-08+2.3918e-13i])
>> ConstrBigLMI=[bigLMI<=0]
+++++++++++++++++++++++++++++++++++++++
|   ID|                     Constraint|
+++++++++++++++++++++++++++++++++++++++
|   #1|   Element-wise inequality 56x1|

But nothing changes, any tips?

Johan Löfberg

unread,
Oct 21, 2019, 11:02:34 AM10/21/19
to YALMIP
LMI22 is not symmetric, hence LMI is not symmetric (or hermitian to be correct here as you have complex-valued data), hence it is not a semi-definite constraint

My guess is that you mean Q*Ar-L+Ar'*Q-L'

optimizer

unread,
Oct 22, 2019, 2:52:53 AM10/22/19
to YALMIP
Yes, thank you for your suggestion, checking the change of variables I forgot the transpose on Ar. The same error stands for LMI11 to be honest.
One more question, do I need to reformulate my complex inequality partitioning it by means of the real and of the imaginary part like that?

>> LMI1=real(LMI); 
>> LMI2=imag(LMI); 
>> bigLMI=[LMI1 LMI2;-LMI2 LMI1] 

Or there is no need at all? Thank you 

Johan Löfberg

unread,
Oct 22, 2019, 3:08:22 AM10/22/19
to YALMIP
YALMIP automatically cast complex hermitian semidefinite constraints as real symmetric semidefinite constraints to the solver

If your LMI11 is still not hermitian but you think it should be, I guess you have have horrible data in Ar causing numerical cancellations etc

optimizer

unread,
Oct 22, 2019, 7:28:38 AM10/22/19
to YALMIP
Ok, thank you.
I obtain such results:

check(ConstrLMI)
 
+++++++++++++++++++++++++++++++++++++++++++++++
|   ID|          Constraint|   Primal residual|
+++++++++++++++++++++++++++++++++++++++++++++++
|   #1|   Matrix inequality|           0.83323|
|   #2|   Matrix inequality|        3.0393e-06|
+++++++++++++++++++++++++++++++++++++++++++++++

It seems to me that this constraint:
[LMI<=0]

Is poorly respected, I am using mosek. 
Any tips to improve my analysis?

Johan Löfberg

unread,
Oct 22, 2019, 7:29:47 AM10/22/19
to YALMIP
No, it says both constraints are satisfied (strictly)
Reply all
Reply to author
Forward
0 new messages