Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

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`

= mpcmove(`MPCobj`

,`x`

,`ym`

,`r`

,`v`

)* u*(

`mpcmove`

repeatedly
to simulate closed-loop 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 run-time adjustment in constraints and weights during the
closed-loop simulation.

`mpcmove`

updates`x`

.If

`ym`

,`r`

or`v`

is specified as`[]`

,`mpcmove`

uses the appropriate`MPCobj.Model.Nominal`

value instead.To view the predicted optimal behavior for the entire prediction horizon, plot the appropriate sequences provided in

`Info`

.To determine the optimization status, check

`Info.Iterations`

and`Info.QPCode`

.

Use

`sim`

for plant mismatch and noise simulation when not using run-time 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`

Was this topic helpful?