setterminal(MPCobj,Y,U)
specifies diagonal quadratic penalty weights and constraints at the last step in the
prediction horizon. The weights and constraints are on the terminal output
y(t+p) and terminal input
u(t+p – 1), where
p is the prediction horizon of the MPC controller
MPCobj.
setterminal(MPCobj,Y,U,Pt)
specifies diagonal quadratic penalty weights and constraints from step Pt
to the horizon end. By default, Pt is the last step in the
horizon.
MPCobj — Model predictive controller MPC controller object
Model predictive controller, specified as an MPC controller
object. To create an MPC controller, use mpc.
Y — Terminal weights and constraints for the output variables structure
Terminal weights and constraints for the output variables, specified as a structure
with the following fields:
Weight
1-by-ny vector of nonnegative
weights
Min
1-by-ny vector of lower
bounds
Max
1-by-ny vector of upper
bounds
MinECR
1-by-ny vector of
constraint-softening Equal Concern for the Relaxation (ECR) values for the lower
bounds
MaxECR
1-by-ny vector of
constraint-softening ECR values for the upper bounds
ny is the number of controlled outputs of
the MPC controller.
If the Weight, Min or Max
field is empty, the values in MPCobj are used at all prediction
horizon steps including the last. For the standard bounds, if any element of the
Min or Max field is infinite, the corresponding
variable is unconstrained at the terminal step.
By default, Y.MinECR = Y.MaxECR = 1 (soft
output constraints).
Choose the ECR magnitudes carefully, accounting for the
importance of each constraint and the numerical magnitude of a typical violation.
U — Terminal weights and constraints for the manipulated variables structure
Terminal weights and constraints for the manipulated variables, specified as a
structure with the following fields:
Weight
1-by-nu vector of nonnegative
weights
Min
1-by-nu vector of lower
bounds
Max
1-by-nu vector of upper
bounds
MinECR
1-by-nu vector of
constraint-softening Equal Concern for the Relaxation (ECR) values for the lower
bounds
MaxECR
1-by-nu vector of
constraint-softening ECR values for the upper bounds
nu is the number of manipulated variables
of the MPC controller.
If the Weight, Min or Max
field is empty, the values in MPCobj are used at all prediction
horizon steps including the last. For the standard bounds, if individual elements of the
Min or Max fields are infinite, the
corresponding variable is unconstrained at the terminal step.
Choose the ECR magnitudes carefully, accounting for the importance of each
constraint and the numerical magnitude of a typical violation.
Pt — Initial application step for terminal weight and constraints prediction horizon p (default) | integer less than p
Step in the prediction horizon, specified as an integer between 1 and
p, where p is the prediction horizon. The
terminal weights and constraints are applied from prediction step Pt
to the end.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.