Numerical Problem for implementing LMIs

43 views
Skip to first unread message

Fahad Aljehani

unread,
Apr 17, 2020, 5:37:02 PM4/17/20
to YALMIP
Dear all

I am trying to implement a technique from a book (In the attachment). The only requirement is to know A and C. 
 
Here is my MatLab code:

A = diag([-0.25 -0.34 -1.24 -1.26]);

C = [1 0 0 0];

n = size(A,1);

m = size(C,1);

k0 = 6; % assumed

k1 = 7; % assumed

 

alpha = 0.25; % Relax our optimization

epsi = 0.1;   % Relax our optimization

A_alpha = A+alpha/2*eye(n,n);

P = sdpvar(n,n);

X = sdpvar(n,n);

 

Q = sdpvar(n,n);

Y = sdpvar(n,m,'full');

Z0 = sdpvar(n,k0,'full');

Z1 = sdpvar(n,k1,'full');

Z2 = sdpvar(n,n);

Lambda = sdpvar(n,n);

 

% First Const.

M1 = [Q P; P Z2];

F = [M1>=0];

 

WQ1 = X*A_alpha + A_alpha*X + Q - Y*C - C'*Y';

% Second Const.

M2 = [WQ1,      Y,                       -X,                        Z0,                   Z1; 

      Y' ,    -epsi*eye(m,m),            zeros(m,n),             zeros(m,k0),        zeros(m,k1);

     -X' ,    zeros(n,m),              -epsi*eye(n,n),         zeros(n,k0),         zeros(n,k1);

     Z0' ,    zeros(k0,m),              zeros(k0,n),           -epsi*eye(k0,k0),     zeros(k0,k1);

     Z1' ,    zeros(k1,m),              zeros(k1,n),           zeros(k1,k0),         -epsi*eye(k1,k1)];

 

F = [F,M2<=0];

 

optimize(F,-trace(alpha*P/epsi))


Running this code gives me an error (Numerical problem (SeDuMi-1.3)). Can someone please help me figuring this out?
1.png

Johan Löfberg

unread,
Apr 18, 2020, 3:09:46 AM4/18/20
to YALMIP
The problem is unbounded (that's what sdpt3 says) or very badly scaled causing solver to think it is unbounded. Sedumi and mosek struggles numerically, but it is clear the objective tends to something very large

   yalmipversion: '20200116'
       yalmiptime: 1.0393
       solvertime: 0.6327
             info: 'Numerical problems (MOSEK)'
          problem: 4

K>> value(P)

ans =

   1.0e+06 *

    2.4924    0.0000   -0.0000    0.0000
    0.0000    0.0835   -0.0000    0.0000
   -0.0000   -0.0000    3.2524    0.0000
    0.0000    0.0000    0.0000    3.3806

   yalmipversion: '20200116'
       yalmiptime: 0.2207
       solvertime: 1.9973
             info: 'Numerical problems (SeDuMi-1.3)'
          problem: 4

>> value(P)

ans =

   1.0e+06 *

    1.6649    0.0000   -0.0000   -0.0000
    0.0000    0.0554    0.0000    0.0000
   -0.0000    0.0000    1.9674    0.0000
   -0.0000    0.0000    0.0000    1.9966

and at this point Z2 is beyond reasonable size numerically

>> value(Z2)

ans =

   1.0e+13 *

    3.3598    0.0000   -0.0000   -0.0000
    0.0000    0.4436    0.0000    0.0000
   -0.0000    0.0000    3.6952    0.0000
   -0.0000    0.0000    0.0000    3.5065

Fahad Aljehani

unread,
Apr 18, 2020, 3:35:08 AM4/18/20
to YALMIP
Thanks Johan for your kind response.

Do you think the choice of dimension (n,m,k0,k1) make this problem unbounded? Or, solving such a problem with many unknowns leads to unbounded results?

Johan Löfberg

unread,
Apr 18, 2020, 3:51:55 AM4/18/20
to YALMIP
The problem makes no sense. Z2 is only used as a diagonal block in M1, hence trivially it can tend  to inf in the limit, meaning P can be chosen arbitrarily large. P is not used anywhere else, in other words, for any choice of definite Q, you can make P arbitrarily large by taking Z2 even larger asymptotically. Hence it is a feasibility problem optimize(M2<=0) where M1 can be removed and objective always is inf 

Fahad Aljehani

unread,
Apr 18, 2020, 3:54:53 AM4/18/20
to YALMIP
Thank you so much
Reply all
Reply to author
Forward
0 new messages