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.

Set custom constraints on linear combinations of plant inputs and outputs

```
[E,F,G,V,S]
= getconstraint(MPCobj)
```

`[`

returns the
custom constraints previously defined for the MPC controller, `E`

,`F`

,`G`

,`V`

,`S`

]
= getconstraint(`MPCobj`

)`MPCobj`

.
The constraints are in the general form:

*E**u*(*k* + *j*|*k*)
+ *F**y*(*k* + *j*|*k*)
+ *S**v*(*k* + *j*|*k*)
≤ *G* + *ε**V*

*p*is the prediction horizon.*k*is the current time index.*u*is a column vector manipulated variables.*y*is a column vector of all plant output variables.*v*is a column vector of measured disturbance variables.*ε*is a scalar slack variable used for constraint softening (as in Standard Cost Function).*E*,*F*,*G*,*V*, and*S*are constant matrices.

Since the MPC controller does not optimize *u*(*k*+*p*|*k*), `getconstraint`

calculates
the last constraint at time

assuming
that *k*+*p**u*(*k*+*p*|*k*)
= *u*(*k*+*p*-1|*k*).

Was this topic helpful?