'error message Numerical problems (SeDuMi-1.3) when try to find the controller parameter'

36 views
Skip to first unread message

zia

unread,
Dec 19, 2017, 10:35:21 PM12/19/17
to YALMIP
Why when i simulate this simple code, got message numerical problems??Its means that my code is not feasible??

Code:
opt = sdpsettings;
opt = sdpsettings(opt,'verbose',0);

z=tf('z');
%% System A'=A+B2F, B'=B1, C'=F, D=0
A=[0.7 0 0; 0 0 1; 0 -1 2];
B1=[1; 0 ; 1];
B2=[-1; 0; -1];
D=0;
L=sdpvar(1,3,'full');
na=size(A,1);
nc1=size(L,1); % size of the row of matrix L
nb=size(B1,2); % size of the 'column' of matrix B
X= sdpvar(na,na,'symmetric'); % set the variable X
Gm = sdpvar(1,1);
%L=K*X

%% Linear approximation
Mh=[-X                A*X+B2*L      B1            zeros(na,nc1);
   X*A'+L'*B2'        -X           zeros(na,nb)     L';
    B1'            zeros(nb,na)    -Gm*eye(nb)       0;
    zeros(nc1,na)     L              0            -Gm*eye(nc1)];

    F1 = [ Mh <=0,  X>=0] 
    solution = solvesdp(F1,Gm,opt)
    REPORT = solution.problem  

    Gm1=double(Gm)
    w=double(L)
    x=double(X)
    Fs=w/x

Result:
++++++++++++++++++++++++++++++++
|   ID|              Constraint|
++++++++++++++++++++++++++++++++
|   #1|   Matrix inequality 8x8|
|   #2|   Matrix inequality 3x3|
++++++++++++++++++++++++++++++++

solution = 

  struct with fields:

    yalmiptime: 0.1512
    solvertime: 0.5118
          info: 'Numerical problems (SeDuMi-1.3)'
       problem: 4

Really appreciate your reply. Thanks.

Johan Löfberg

unread,
Dec 20, 2017, 2:39:51 AM12/20/17
to YALMIP
No, it simply means that sedumi runs into numerical problems as you have posed a problem where most likely the optimal X tends to infinity (or is unreasonably large numerically). The computed solution is feasible, hence the problem is obviously feasible

>> check(F1)
 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|   ID|          Constraint|   Primal residual|   Dual residual|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|   #1|   Matrix inequality|        9.3443e-06|      9.5987e-11|
|   #2|   Matrix inequality|           0.53147|      1.6339e-10|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
>> value(X)

ans =

   1.0e+05 *

    1.9766   -0.0009   -0.0009
   -0.0009    2.9621    2.9588
   -0.0009    2.9588    2.9555


Putting some regularization on X might give a better problem

solution = solvesdp(F1,Gm + .0001*norm(X))

or avoid the ill-posed optimal solution by noting that the optimal gamma appears to be 1, solve a feasibility problem instead where you aim for 5% sub-optimal at most. Most often, the solver will steer towards a better conditioned solution

solution = solvesdp([F1,Gm <= 1.05])


Reply all
Reply to author
Forward
0 new messages