How can I translate the YALMIP expression to LMILAB expression?

33 views
Skip to first unread message

Tarolas Kep

unread,
Aug 20, 2015, 3:50:34 AM8/20/15
to YALMIP

I have the following optimization problem implemented by the use of the YALMIP library:

   
    R11 = sdpvar(n_p, n_p);
    S11
= sdpvar(n_cl/2, n_cl/2);
    S12
= sdpvar(n_cl/2, n_cl/2);
    S22
= sdpvar(n_cl/2, n_cl/2);
    S
= [S11 S12; S12' S22];
   
    gamma=sdpvar(1);
   
    % Positovity
    constr = [R11 > 0, S > 0, R11 - S11 > 0];
   
    % Open loop condition
    M = [R11*Ap'
+Ap*R11         Bpw                             R11*Cpz';
        Bpw'
            -gamma*eye(size(Bpw))                  Dpzw';
        Cpz*R11                 Dpzw                    -gamma*eye(size(Dpzw))]
   
    constr = [constr, M < 0];
   
    % Closed loop condition
    M = [S*Acl'
+Acl*S         Bclw                             S*Cclz';
        Bclw'
            -gamma*eye(size(Bclw',1))                  Dclzw';
       
Cclz*S                 Dclzw                    -gamma*eye(size(Dclzw'))]



I would like to compare the solution by using the tools provided MATLAB (LMILAB), however I am stucked with the first step: 

What is the equivalent expression for this:

    S = [S11 S12; S12' S22];
   
    gamma=sdpvar(1);
   
    % Positovity
    constr = [R11 > 0, S > 0, R11 - S11 > 0];


Should `S` be declared as a new lmi variable?

So far I started with this

  setlmis([]);
  R11
=lmivar(1,[n_p, 1]);
  S11
=lmivar(1,[n_cl/2, 1]);
  S12
=lmivar(1,[n_cl/2, 1]);
  S22
=lmivar(1,[n_cl/2, 1]);
  S
=lmivar(1,[n_cl, 1]);
  gamma
=lmivar(1,[1, 0]);

  lmiterm
([-1 1 1 R11],1,1);                    
  lmiterm
([-2 1 1 S],1,1);                      
  lmiterm
([-3 1 1 R11],1,1);                      
  lmiterm
([-3 1 1 S11],1,-1);                    

Thank for your help.

Johan Löfberg

unread,
Aug 20, 2015, 3:52:18 AM8/20/15
to YALMIP
No idea. I developed YALMIP for precisely this reason...

BTW, in your YALMIP model, you should replace > with >=
Reply all
Reply to author
Forward
0 new messages