Note: This page has been translated by MathWorks. Click here to see

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

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

Compute optimal control with prediction model updating

`mv = mpcmoveAdaptive(MPCobj,x,Plant,Nominal,ym,r,v)`

```
[mv,info]
= mpcmoveAdaptive(MPCobj,x,Plant,Nominal,ym,r,v)
```

`[___] = mpcmoveAdaptive(___,options)`

computes the optimal manipulated variable moves at the current time. This result depends on the
properties contained in the MPC controller, the controller states, an updated prediction model,
and the nominal values. The result also depends on the measured output variables, the output
references (setpoints), and the measured disturbance inputs.
`mv`

= mpcmoveAdaptive(`MPCobj`

,`x`

,`Plant`

,`Nominal`

,`ym`

,`r`

,`v`

)`mpcmoveAdaptive`

updates the controller state, `x`

, when
using default state estimation. Call `mpcmoveAdaptive`

repeatedly to simulate
closed-loop model predictive control.

`[`

returns additional details about the solution in a structure. To view the predicted optimal
trajectory for the entire prediction horizon, plot the sequences provided in
`mv`

,`info`

]
= mpcmoveAdaptive(`MPCobj`

,`x`

,`Plant`

,`Nominal`

,`ym`

,`r`

,`v`

)`info`

. To determine whether the optimal control calculation completed
normally, check `info.Iterations`

and `info.QPCode`

.

`[___] = mpcmoveAdaptive(___,`

alters selected controller settings using options you specify with `options`

)`mpcmoveopt`

. These changes apply for the current time instant only, enabling a
command-line simulation using `mpcmoveAdaptive`

to mimic the Adaptive
MPC Controller block in Simulink^{®} in a computationally efficient manner.

If the prediction model is time-invariant, use

`mpcmove`

.Use the Adaptive MPC Controller Simulink block for simulations and code generation.

`getEstimator`

| `mpc`

| `mpcmove`

| `mpcmoveopt`

| `mpcstate`

| `review`

| `setEstimator`

| `sim`