Optimal control action
u = mpcmove(MPCobj,x,ym,r,v)
[u,Info] = mpcmove(MPCobj,x,ym,r,v)
[u,Info] = mpcmove(MPCobj,x,ym,r,v,Options)
computes
the optimal manipulated variable moves, u(k),
at the current time. u(k) is
calculated given the current estimated extended state, x(k),
the measured plant outputs, y_{m}(k),
the output references, r(k),
and the measured disturbances, v(k),
at the current time k. Call u
= mpcmove(MPCobj
,x
,ym
,r
,v
)mpcmove
repeatedly
to simulate closedloop model predictive control.
[
returns
additional information regarding the model predictive controller in
the second output argument u
,Info
] = mpcmove(MPCobj
,x
,ym
,r
,v
)Info
.
[
overrides
default constraints and weights settings in u
,Info
] = mpcmove(MPCobj
,x
,ym
,r
,v
,Options
)MPCobj
with
the values specified by Options
, an mpcmoveopt
object. Use Options
to
provide runtime adjustment in constraints and weights during the
closedloop simulation.



Before you begin a simulation with If you are using default state estimation, If you are using custom state estimation, 

1byn_{ym} vector of current measured output values at time k, where n_{ym} is the number of measured outputs. If you are using custom state estimation, set 

Plant output reference values, specified as a pbyn_{y} array,
where p is the prediction horizon of
To implement reference previewing, which can improve tracking
when a reference varies in a predictable manner, 

Current and anticipated measured disturbances, specified as
a pbyn_{md} array,
where p is the prediction horizon of Modeling of measured disturbances provides feedforward control
action. If your plant model does not include measured disturbances,
use
To implement disturbance previewing, which can improve tracking
when a disturbance varies in a predictable manner, 

Override values for selected properties of 
Use sim
for plant
mismatch and noise simulation when not using runtime constraints
or weight changes.
Use theMPC Designer app to interactively design and simulate model predictive controllers.
Use the MPC Controller block in Simulink and for code generation.
getEstimator
 mpc
 mpcmoveopt
 mpcstate
 review
 setEstimator
 sim