## Documentation Center |

Model Predictive Control Toolbox™ design generates a *discrete-time* controller—one
that takes action at regularly spaced, discrete time instants. The *sampling
instants* are the times at which the controller acts. The
interval separating successive sampling instants is the *sampling
period*, Δ*t *(also called the *control
interval*). This section provides more details on the events
occuring at each sampling instant.

The figure, Controller State at the *k*th
Sampling Instant, shows the state
of a hypothetical SISO model preditive control system. This system
has been operating for many sampling instants. Integer *k* represents
the current instant. The latest measured output, *y*_{k},
and previous measurements, *y*_{k–1}, *y*_{k–2},
..., are known and are the filled circles in the figure Controller State at the *k*th
Sampling Instant (a).
If there is a measured disturbance, its current and past values would
be known (not shown).

Figure Controller State at the *k*th
Sampling Instant (b)
shows the controller's previous *moves*, *u*_{k–4},
..., *u*_{k–1}, as filled
circles. As is usually the case, a *zero-order hold* receives
each move from the controller and holds it until the next sampling
instant, causing the step-wise variations shown in figure Controller State at the *k*th
Sampling Instant (b).

To calculate its next *move*, *u*_{k} the
controller operates in two phases:

*Estimation*. In order to make an intelligent move, the controller needs to know the current state. This includes the true value of the controlled variable, ,*and*any internal variables that influence the future trend, . To accomplish this, the controller uses all past and current measurements and the models , , , and . For details, see Prediction and State Estimation.*Optimization*. Values of setpoints, measured disturbances, and constraints are specified over a finite*horizon*of future sampling instants,*k+1*,*k+2*, ...,*k+P*, where*P*(a finite integer ≥ 1) is the*prediction horizon*—see figure Controller State at the*k*th Sampling Instant (a). The controller computes*M*moves*u*,_{k}*u*, ..._{k+1}*u*, where_{k+M–1}*M*( ≥ 1, ≤*P*) is the*control horizon*—see figure Controller State at the*k*th Sampling Instant (b). In the hypothetical example shown in the figure,*P*= 9 and*M*= 4. The moves are the solution of a*constrained*optimization problem. For details of the formulation, see Optimization Problem.

In the example, the optimal moves are the four open circles
in figure Controller State at the *k*th
Sampling Instant (b).
The controller predicts that the resulting output values will be the
nine open circles in figure Controller State at the *k*th
Sampling Instant (a).
Notice that both are within their *constraints*, *u _{min}*≤

When it's finished calculating, the controller sends move *u*_{k} to
the plant. The plant operates with this *constant* input
until the next sampling instant, Δ*t *time
units later. The controller then obtains new measurements and *totally
revises its plan*. This cycle repeats indefinitely.

Reformulation at each sampling instant is essential for good control. The predictions made during the optimization stage are imperfect. Periodic measurement feedback allows the controller to correct for this error and for unexpected disturbances.

Was this topic helpful?