Infeasible models occurs after applying robust MPC frame

35 views
Skip to first unread message

peige guo

unread,
Mar 22, 2019, 6:22:11 PM3/22/19
to YALMIP
Dear all,
I'm new to Yalmip. When I try to use MPC robust frame, I find "Model is infeasible or unbounded" errors will come. However, compared with the model without robust no parameters are modified. I have attached my codes. Could you please tell me what is going wrong for the robust frame? I appreciate your time so much!
Best regards
Peige
yalmip_ObstacleAvoidance.m
yalmip_ObstacleAvoidance_robust.m

Johan Löfberg

unread,
Mar 23, 2019, 4:46:39 AM3/23/19
to YALMIP
Interesting catch. It is an unexpected combination of nonconvex use of norm operator which is MILP-represented, and uncertain expression containing same norm ooerator, where YALMIP assumes you are in a convex world. At the moment, you will have to do some manual coding to get around it

% Nominal case without any uncertainty works
x = sdpvar(2,1);
Model = [-3 <= x <= 3, norm(x - [0.1;0.2],1) >= 1];
optimize(Model, x'*x)
clf
plot(Model);hold on;plot(value(x(1)),value(x(2)),'*')

% Add uncertainty, fails due to infeasibility
x = sdpvar(2,1);
w = sdpvar(2,1);
Model = [-3 <= x <= 3, norm(x + w - [0.1;0.2],1) >= 1];
Model = [Model, -0.5 <= w <= 0.5,uncertain(w)]
optimize(Model, x'*x)


% Manual derivation of nonconvex constraint 
% and it works as expected
x = sdpvar(2,1);
w = sdpvar(2,1);
d = binvar(4,1);
q = x + w - [0.1;0.2];
M = 10;
Model = [-3 <= x <= 3, q(1) + q(2) >= 1-M*(1-d(1)),
                       q(1) - q(2) >= 1-M*(1-d(2)),
                      -q(1) + q(2) >= 1-M*(1-d(3)),
                      -q(1) - q(2) >= 1-M*(1-d(4)),
                      sum(d)==1]
Model = [Model, -0.5 <= w <= 0.5,uncertain(w)]
optimize(Model, x'*x)
clf
plot(Model,x);hold on;plot(value(x(1)),value(x(2)),'*')

% Semimanual, represent the polytope manually but use implies
% for the combinatorial stuff
A = [1 1;-1 1;1 -1;-1 -1];
b = [1;1;1;1];
x = sdpvar(2,1);
w = sdpvar(2,1);
d = binvar(4,1);
q = A*(x + w - [0.1;0.2]) - 1;
Model = [-3 <= x <= 3, implies(d,q>=0),sum(d)==1];
Model = [Model, -0.5 <= w <= 0.5,uncertain(w)]
optimize(Model, x'*x)
clf
plot(Model,x);hold on;plot(value(x(1)),value(x(2)),'*')




peige guo

unread,
Mar 27, 2019, 3:50:35 PM3/27/19
to YALMIP
Dear Dr.Johan,
After reviewing some math knowledge, now I get the reason why I should derive the nonconvex constraint manually. I also find the methods to transfer it into a mixed-integer form by introducing binary variables. The YALMIP robust frame works well now.  I appreciate your time and detailed enlighten so much.
Best regards,
Peige

peige guo

unread,
Mar 27, 2019, 3:50:52 PM3/27/19
to YALMIP
Dear Dr.Johan,
After reviewing some math knowledge, now I get the reason why I should derive the nonconvex constraint manually. I also find the methods to transfer it into a mixed-integer form by introducing binary variables. The YALMIP robust frame works well now.  I appreciate your time and detailed enlighten so much.
Best regards,
Peige Guo
Reply all
Reply to author
Forward
0 new messages