Accelerating the pace of engineering and science

# Documentation Center

• Trial Software

## Prediction Model

The linear model used in Model Predictive Control Toolbox™ software for prediction and optimization is depicted in the following figure.

Model Used for Optimization

The model consists of:

• A model of the plant to be controlled, whose inputs are the manipulated variables, the measured disturbances, and the unmeasured disturbances

• A model generating the unmeasured disturbances

 Note   When defining a model predictive controller, you must specify a plant model. You do not need to specify a model generating the disturbances, as the controller setup assumes by default that unmeasured disturbances are generated by integrators driven by white noise (see Output Disturbance Model and setindist).

The model of the plant is a linear time-invariant system described by the equations

Model Predictive Control Toolbox software accepts plant models specified as LTI objects and identified linear models obtained from input/output data using System Identification Toolbox™, see Identify Plant from Data.

In the above equations, d(k) collects state disturbances (Bd≠0) and output disturbances (Dd≠0).

 Note   A valid plant model for Model Predictive Control Toolbox software cannot have direct feedthrough of manipulated variables u(k) on the output vector y(k).

The unmeasured disturbance d(k) is modeled as the output of the linear time invariant system:

 (2-1)
 (2-2)

The system described by the above equations is driven by the random Gaussian noise nd(k), having zero mean and unit covariance matrix. For instance, a step-like unmeasured disturbance is modeled as the output of an integrator. Input disturbance models as in the equations above can be manipulated by using the methods getindist and setindist.

 Note   If continuous-time models are supplied, they are internally sampled with the controller's sampling time.

### Offsets

In many practical applications, the model matrices A, B, C, D are obtained by linearizing a nonlinear dynamical system, such as

y = h(x, u, v, d)

at some nominal value x=x0, u=u0, v=v0, d=d0. In these equations x´ denotes either the time derivative (continuous time model) or the successor x(k+1) (discrete time model). As an example, x0, u0, v0, d0 may be obtained by using findop on a Simulink® model describing the nonlinear dynamical equations, and A, B, C, D by using linearize. The linearized model has the form:

The model matrices A, B, C, D are readily obtained from the Jacobian matrices appearing in the equations above.

The linearized dynamics are affected by the constant terms F=f(x0, u0, v0, d0) and H=h(x0, u0, v0, d0). For this reason the model predictive control algorithm internally adds a measured disturbance v=1, so that F and H can be embedded into Bv and Dv, respectively, as additional columns.

Nonzero offset values d0 for unmeasured disturbances, while relevant for obtaining the linearized model matrices, are not relevant for the model predictive control problem setup. In fact, only dd0 can be estimated from output measurements.