Model Predictive Control Toolbox
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.
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
Use Model Predictive Control Toolbox™ to design and simulate model predictive controllers.
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™.
Once you have defined the internal plant model you can complete the design of your model predictive controller by specifying the following controller parameters:
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.
You can use functions or the MPC Design app to run closed-loop simulations of your model predictive controller against linear plant models. The app 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.
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.