Question about the solutions (Dual infeasible, primal improving direction found.)

19 views
Skip to first unread message

So Watt

unread,
Apr 1, 2020, 8:22:15 AM4/1/20
to YALMIP
Hello there, I'm new to YALMIP and I wanted to ask you about the solutions I obtained:

n = 2;
gamma
=1.6817;
Q
= [1.0841    0.1752  ;  0.1752    1.0841];
%%%% Controller variables
Ac=0;
Bc=1;
Cc=sdpvar(1,1);
Dc=sdpvar(1,1);
%%%% Model
delta
= 1;
A
=0;Bw=[-delta 0];Bu =1;
Ce=[1;0]; Dew=zeros(2);Deu= [0;1];
Cy =1;Dyw=[0 1];Dyu=0;

Af = [A+Bu*Dc*Cy Bu*Cc;Bc*Cy Ac];
Bf = [Bw+Bu*Dc*Dyw;Bc*Dyw];
Cf= [Ce+Deu*Dc*Cy Deu*Cc];
Df=[Dew+Deu*Dc*Dyw];


% LMI
% LBR = [Af>=0];
LBR
= [Af'*Q+Q*Af Q*Bf Cf';Bf'*Q -gamma*eye(2) Df';Cf Df -gamma*eye(2)]<=0;
%% solving
Sol= optimize(LBR);

lam1
= value(Dc)
lam2
= value(Cc)
I'm solving to find Cc and Dc (which should have the same sign) but I'm getting this message :
Dual infeasible, primal improving direction found.
iter seconds  
|Ax|    [Ay]_+     |x|       |y|
 
14      1.5   1.2e-10   2.1e-10   6.0e+00   2.0e-10
lam1
=

 
-1.9639e-10


lam2
=

   
2.7153e-11
Is something wrong with my formulation or the solver? or my problem is infeasible?

Thank you

Johan Löfberg

unread,
Apr 1, 2020, 8:26:59 AM4/1/20
to YALMIP
It's infeasible. Smallest possible gamma is 6.27

sdpvar gamma
LBR = [Af'*Q+Q*Af Q*Bf Cf';Bf'*Q -gamma*eye(2) Df';Cf Df -gamma*eye(2)]<=0;
%% solving
Sol = optimize(LBR,gamma)


So Watt

unread,
Apr 1, 2020, 8:53:58 AM4/1/20
to YALMIP
Thank you for the response, It really helps a lot,

If my gamma is only constrained with (Gamma>sqrt(2)),

does that mean that my problem is feasible ? (by choosing gamma in the appropriate range)

Johan Löfberg

unread,
Apr 1, 2020, 8:56:15 AM4/1/20
to YALMIP
6.27 is larger than sqrt(2) last time I checked

So Watt

unread,
Apr 1, 2020, 9:24:31 AM4/1/20
to YALMIP
Thank you, Just checking,
The constraint on gamma is obtained from another LMI, I just wanted to double check
Reply all
Reply to author
Forward
0 new messages