MPC Designer
Design and simulate model predictive controllers
Description
The MPC Designer app lets you design and simulate model predictive controllers in MATLAB® and Simulink®.
Using this app, you can:
Interactively design model predictive controllers and validate their performance using simulation scenarios
Obtain linear plant models by linearizing Simulink models (requires Simulink Control Design™)
Review controller designs for potential run-time stability or numerical issues
Compare response plots for multiple model predictive controllers
Generate Simulink models with an MPC controller and plant model
Generate MATLAB scripts to automate MPC controller design and simulation tasks
Limitations
The following advanced MPC features are not available in the MPC Designer app.
Explicit MPC design
Adaptive MPC design
Nonlinear MPC design
Mixed input/output constraints (
setconstraint
)Terminal weight specification (
setterminal
)Custom state estimation (
setEstimator
)Sensitivity analysis (
sensitivity
)Alternative cost functions with off-diagonal weights
Specification of initial plant and controller states for simulation
Specification of nominal state values using
mpcobj.Model.Nominal.X
andmpcobj.Model.Nominal.DX
Updating weights, constraints, MV targets, and external MVs online during simulations
If your application requires any of these features, design and simulate your controller at the command line. You can also run simulations in Simulink when using these features.

Open the MPC Designer App
MATLAB Toolstrip: On the Apps tab, under Control System Design and Analysis, click the app icon.
MATLAB command prompt: Enter
mpcDesigner
.Simulink model editor: In the MPC Controller Block Parameters dialog box, click Design.
Examples
Programmatic Use
mpcDesigner
opens the MPC Designer app. You can
then import a plant or controller to start the design process, or open a saved
design session.
mpcDesigner(
opens the app and
creates a default MPC controller using plant
)plant
as the internal
prediction model. Specify plant
as an ss
, tf
, or zpk
LTI model.
If plant
is a stable, continuous-time LTI system, MPC
Designer sets the controller sample time to 0.1 Tr, where Tr is the average
rise time of the plant. If plant
is an unstable,
continuous-time system, MPC Designer sets the controller sample time to
1
.
By default, plant input and output signals are treated as manipulated variables
and measured outputs respectively. To specify a different input/output channel
configuration, use setmpcsignals
before opening MPC
Designer.
You can also specify plant as a linear System Identification Toolbox™ model, such as an idss
(System Identification Toolbox) or idtf
(System Identification Toolbox) system. The app converts the
identified model to a state-space system, discarding any noise channels. To convert
noise channels to unmeasured disturbances, convert the identified model to a
state-space model using the 'augmented'
option. For more
information on identifying plant models, see Identify Plant from Data.
mpcDesigner(
opens the app and
imports the model predictive controller mpcobj
)mpcobj
from the
MATLAB workspace. To create an MPC controller, use mpc
.
mpcDesigner(
opens the app and
imports multiple MPC controllers specified in the cell array
mpcobjs
)mpcobjs
. All of the controllers in
mpcobjs
must have the same input/output channel
configuration.
mpcDesigner(
additionally specifies controller names when opening the app with multiple MPC
controllers. Specify mpcobjs
,names
)names
as a cell array of character vectors
or string array with the same length as mpcobjs
. Specify a
unique name for each controller.
mpcDesigner(
opens the app
and loads a previously saved session. Specify sessionFile
)sessionFile
as
one of the following:
The name of a session data file in the current working directory or on the MATLAB path, specified as a character vector or string. To save session data to disk, in the MPC Designer app, on the MPC Designer tab, click
Save Session. The saved session data includes all plants, controllers, and scenarios in the Data Browser, the current MPC structure, and the current plot configuration.
A previously loaded
SessionData
object in the MATLAB workspace. To load aSessionData
object from a session data file, at the command line, enter:load sessionFile
Version History
Introduced in R2015bMPC Designer now supports all Simulink Online™ workflows, including the following:
Finding operating points using trimming and simulation snapshots (requires Simulink Control Design software)
Generating Simulink model for controller and plant
Support for opening MPC Design Tool sessions saved before R2015b has been removed.
If you have sessions saved before R2015b, open and resave the session files using MPC Designer in any release from R2015b through R2021a.
Support for opening MPC Design Tool sessions saved before R2015b will be removed.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)