필터 지우기
필터 지우기

How can I constrain the output variables using an MPC controller?

조회 수: 6 (최근 30일)
Robert Allen
Robert Allen 2017년 2월 6일
답변: Hannes Daepp 2017년 2월 13일
My system is a point mass controlled by 3 (force) inputs and has 6 (3 position and 3 velocity) outputs. I would like to limit the three velocity inputs to be no larger than abs(6), thereby limiting the velocity of the point mass to the norm of the velocity outputs.
I am using an MPC block to track a reference trajectory. I have tried specifying the limits in the controller by navigating to the tuning tab in the MPC designer and specifying limits to y(4:6), but the constraints are ignored. I have tried to constrain the output variables in a script directly:
mpcobj.OV(4).Min = -6;
mpcobj.OV(4).Max = 6;
mpcobj.OV(5).Min = -6;
mpcobj.OV(5).Max = 6;
mpcobj.OV(6).Min = -6;
mpcobj.OV(6).Max = 6;
Constraints are ignored. I have also tried setting them with the setconstraint() function:
E = [0 0 0;
0 0 0;
0 0 0;
0 0 0;
0 0 0;
0 0 0]
F = [0 0 0 0 0 0;
0 0 0 0 0 0;
0 0 0 0 0 0;
0 0 0 1 0 0;
0 0 0 0 1 0;
0 0 0 0 0 1]
G = [0; 0; 0; 6; 6; 6]
V = [0;0;0;0;0;0]
setconstraint(mpcobj,E,F,G,V)
this method attempts to control the system for a few seconds then the manipulated variables saturate and the system becomes unstable.

채택된 답변

Hannes Daepp
Hannes Daepp 2017년 2월 13일
Since your constraints are not being satisfied, it is likely that you need to set the bound softness in the Quadratic Programming (QP) problem. By default, all the outputput (OV) constraints are soft, i.e., MinECR = 1 and MaxECR = 1, as detailed in the documentation.
The violation of soft constraints competes with tracking performance in the objective function. In general, hard output constraints are not recommended, due to the danger of having an infeasible QP problem at run time.
You might also find the following page, which provides a more detailed overview of hard and soft constraints, to be useful: https://www.mathworks.com/help/mpc/ug/specifying-constraints.html#buj077i

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Refinement에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by