Main Content

setterminal

Terminal weights and constraints

Description

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.

Input Arguments

collapse all

Model predictive controller, specified as an MPC controller object. To create an MPC controller, use mpc.

Terminal weights and constraints for the output variables, specified as a structure with the following fields:

Weight1-by-ny vector of nonnegative weights
Min1-by-ny vector of lower bounds
Max1-by-ny vector of upper bounds
MinECR1-by-ny vector of constraint-softening Equal Concern for the Relaxation (ECR) values for the lower bounds
MaxECR1-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.

Off-diagonal weights are zero (as described in Standard Cost Function). To apply nonzero off-diagonal terminal weights, you must augment the plant model. See Provide LQR Performance Using Terminal Penalty Weights.

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.

Terminal weights and constraints for the manipulated variables, specified as a structure with the following fields:

Weight1-by-nu vector of nonnegative weights
Min1-by-nu vector of lower bounds
Max1-by-nu vector of upper bounds
MinECR1-by-nu vector of constraint-softening Equal Concern for the Relaxation (ECR) values for the lower bounds
MaxECR1-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.

Off-diagonal weights are zero (as described in Standard Cost Function). To apply nonzero off-diagonal terminal weights, you must augment the plant model. See Provide LQR Performance Using Terminal Penalty Weights.

By default, U.MinECR = U.MaxECR = 0 (hard manipulated variable constraints)

Choose the ECR magnitudes carefully, accounting for the importance of each constraint and the numerical magnitude of a typical violation.

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.

Introduced in R2011a