How can I constrain the output variables using an MPC controller?
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Controller Creation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!