Model Predictive Control Toolbox
Product Description
- Overview and Key Features
- Designing and Simulating Model Predictive Controllers
- Customizing Constraints and Weights
- Controlling Plants Over a Range of Operating Conditions
- Adjusting Run-Time Controller Performance
- Deploying Model Predictive Controllers
Designing and Simulating Model Predictive Controllers
Model predictive controllers can be used to optimize closed-loop system performance of MIMO plants subject to input and output constraints. Because they base their actions on an internal plant model, model predictive controllers can forecast future process behavior and adjust control actions accordingly. The ability to model process interactions often enables model predictive controllers to outperform multiple PID control loops, which require individual tuning and other techniques to reduce loop coupling.
Model Predictive Control Toolbox provides functions, Simulink blocks, and a graphical tool for designing and simulating model predictive controllers in MATLAB and Simulink.
You can iteratively improve your controller design by defining an internal plant model, adjusting controller parameters such as weights and constraints, and simulating closed-loop system response to evaluate controller performance.
Getting Started with Model Predictive Control Toolbox 9:59
Use Model Predictive Control Toolbox to design and simulate model predictive controllers.
Defining Internal Plant Models
When designing a model predictive controller in Simulink, you can use Simulink Control Design™ to extract a linearized form of the Simulink model and automatically import it into the controller as the internal plant model.
Alternatively, you can use linear time-invariant (LTI) systems from Control System Toolbox™, such as a transfer function or a state-space model, to specify the internal plant model. You can import LTI models from the MATLAB workspace or from MAT-files into the toolbox. The toolbox also lets you directly import models created from measured input-output data using System Identification Toolbox™.
Designing Controllers
Once you have defined the internal plant model you can complete the design of your model predictive controller by specifying the following controller parameters:
- Prediction and control horizons
- Hard and soft constraints on manipulated variables and output variables
- Weights on manipulated variables and output variables
- Models for measurement noise and for unmeasured input and output disturbances
Dialog box for selecting a plant model and specifying the control interval, prediction horizon, and control horizon in Model Predictive Control Toolbox.
Dialog box for setting constraints on manipulated variables and output variables in Model Predictive Control Toolbox.
In addition to constant constraints and weights, the toolbox supports time-varying constraints and weights, constraints on linear combinations of manipulated variables and output variables, terminal constraints and weights, and constraints in the form of linear off-diagonal weights. The toolbox also supports constraint softening.
Running Closed-Loop Simulations
You can use MATLAB functions or a graphical tool to run closed-loop simulations of your model predictive controller against linear plant models. The graphical tool lets you set up multiple simulation scenarios. For each scenario you can specify controller set points and disturbances by choosing from common signal profiles, such as step, ramp, sine wave, or random signal.
Graphical tool for configuring and running a simulation to test a controller against a linear plant model.
To assess the effects of model mismatch, you can simulate a controller against a linear plant model that is different from the internal plant model used by the controller. You can also simulate multiple controller designs against the same plant model to see how different weight and constraint settings affect controller performance. The toolbox lets you disable constraints to evaluate characteristics of the closed-loop dynamics, such as stability and damping.
Using Simulink blocks provided with Model Predictive Control Toolbox, you can run closed-loop simulations of your model predictive controller against a nonlinear Simulink model. You can configure the blocks to accept time-varying constraint signals that are generated by other Simulink blocks.



