The toolbox provides tools for simulating your controller from the command line and in Simulink. If you are designing a controller using the MPC Designer app, you can simulate control scenarios during the design process and generate a Simulink model from your design.
||Optimal control action|
||Options set for mpcmove and mpcmoveAdaptive|
||Define MPC controller state|
||Simulate closed-loop/open-loop response to arbitrary reference and disturbance signals for implicit or explicit MPC|
||MPC simulation options|
||Plot responses generated by MPC simulations|
|MPC Controller||Compute MPC control law|
|MPC Designer||Design and simulate model predictive controllers|
Simulate a model predictive controller with a nonlinear plant at the command line. At each control interval, relinearize the nonlinear plant and define a new controller based on the updated plant model.
This topic shows how to test an existing model predictive controller by adding it to a Simulink model.
You can automatically generate a Simulink model that uses the current model predictive controller to control its internal plant model.
If your application allows you to anticipate trends in such signals, an MPC controller with signal previewing can improve reference tracking, measured disturbance rejection, or both.
You can update the input and output constraints of your MPC controller at each control interval. You cannot constrain a variable for which the corresponding controller object property is unbounded.
You can adjust the cost function penalty weights for your MPC controller while the controller operates.
Reduce large actuator movements when changing controller operating modes.
Simulate the closed-loop response of a model predictive controller with a custom quadratic programming solver.