Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

Simulation

Simulate controllers against linear or nonlinear plants in MATLAB® and Simulink®

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.

Functions

mpcmove Optimal control action
mpcmoveopt Options set for mpcmove and mpcmoveAdaptive
mpcstate Define MPC controller state
sim Simulate closed-loop/open-loop response to arbitrary reference and disturbance signals for implicit or explicit MPC
mpcsimopt MPC simulation options
plot Plot responses generated by MPC simulations

Blocks

MPC Controller Compute MPC control law

Apps

MPC Designer Design and simulate model predictive controllers

Topics

Simulation Basics

Simulate Controller with Nonlinear Plant

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.

Test an Existing Controller

This topic shows how to test an existing model predictive controller by adding it to a Simulink model.

Generate Simulink Model from MPC Designer

You can automatically generate a Simulink model that uses the current model predictive controller to control its internal plant model.

Signal Previewing

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.

Run-Time Features

Run-Time Constraint Updating

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.

Run-Time Weight Tuning

You can adjust the cost function penalty weights for your MPC controller while the controller operates.

Bumpless Transfer Between Manual and Automatic Operations

Reduce large actuator movements when changing controller operating modes.

Custom QP Solver

Simulate MPC Controller with a Custom QP Solver

Simulate the closed-loop response of a model predictive controller with a custom quadratic programming solver.

Was this topic helpful?