|
|
|
| R2012a Documentation → Model Predictive Control Toolbox | |
Learn more about Model Predictive Control Toolbox |
|
| Contents | Index |
One advantage of Model Predictive Control Toolbox design (relative to classical multi-loop control) is that it generalizes directly to plants having multiple inputs and outputs. Moreover, the plant can be non-square, i.e., having an unequal number of actuators and outputs. Industrial applications involving hundreds of actuators and controller outputs have been reported.
The main challenge is to tune the controller to achieve multiple objectives. For example, if there are several outputs to be controlled, it might be necessary to prioritize so that the controller provides accurate setpoint tracking for the most important output, sacrificing others when necessary, e.g., when it encounters constraints. Model Predictive Control Toolbox features support such prioritization.
As discussed in more detail in Optimization Problem, the Model Predictive Control Toolbox controller solves an optimization problem much like the LQG optimal control described in the Control System Toolbox™ product. The main difference is that the Model Predictive Control Toolbox optimization problem includes explicit constraints on u and y, and it optimizes over a finite horizon.
Consider first a case with no constraints. A primary control objective is to force the plant outputs to track their setpoints.
Specifically, the controller predicts how much each output will deviate from its setpoint within the prediction horizon. It multiplies each deviation by the output's weight, and computes the weighted sum of squared deviations, Sy(k), as follows:

where k is the current sampling interval, k+i is
a future sampling interval (within the prediction horizon), P is
the prediction horizon, ny is
the number of plant outputs,
is
the weight for output j,
and
is the predicted deviation at
future instant k+i.
If
, the controller does its best
to track rj, sacrificing ri tracking
if necessary. If
, on the other
hand, the controller completely ignores deviations rj –yj .
Choosing the weights is a critical step. You will usually need to tune your controller, varying the weights to achieve the desired behavior.
As an example, consider the following figure, which depicts a type of chemical reactor (a CSTR). Feed enters continuously with reactant concentration CAi. A reaction takes place inside the vessel at temperature T. Product exits continuously, and contains residual reactant at concentration CA (<CAi ).
The reaction liberates heat. A coolant having temperature Tc flows through coils immersed in the reactor to remove excess heat.
CSTR Schematic

From the Model Predictive Control Toolbox point of view, T and CA would be plant outputs, and CAi and Tc would be inputs. More specifically, CAi would be an independent disturbance input, and Tc would be a manipulated variable (actuator).
There is one manipulated variable (the coolant temperature), so it's impossible to hold both T and CA at setpoints. Controlling T would usually be a high priority. Thus, you might set the output weight for T much larger than that for CA. In fact, you might set the CA weight to zero, allowing CA to move freely within an acceptable operating region (to be defined by constraints).
If the controller focuses exclusively on setpoint tracking, it might choose to make large manipulated-variable adjustments. These could be impossible to achieve. They could also accelerate equipment wear or lead to control system instability.
Thus, the Model Predictive Controller also monitors a weighted sum of controller adjustments, calculated according to the following equation:

where M is the control horizon, nmv is
the number of manipulated variables, Δuj(k+i –
1) is the predicted adjustment (i.e., move)
in manipulated variable j at future (or current)
sampling interval k+i –
1, and
is
a weight, which must be zero or positive. Increasing
forces the controller to make
smaller, more cautious
moves. In many
cases (but not all) this will have the following effects:
The controller's setpoint tracking will degrade.
The controller will be less sensitive to prediction inaccuracies (i.e., more robust).
In most applications, the controller's manipulated variables (MVs) should move freely (within a constrained region) to compensate for disturbances and stepoint changes. An attempt to hold an MV at a point within the region would degrade output setpoint tracking.
On the other hand, some plants have more MVs than output setpoints. In such a plant, if all manipulated variables were allowed to move freely, the MV values needed to achieve a particular setpoint or to reject a particular disturbance would be non-unique. Thus, the MVs would drift within the operating space.
A common approach is to define setpoints for "extra" MVs. These setpoints usually represent operating conditions that improve safety, economic return, etc. Model Predictive Control Toolbox design includes an additional term to accommodate such cases, as follows:

where
is the manipulated variable
setpoint (nominal value) for the jth MV,
and
is the corresponding weight.
Constraints may be either hard or soft. A hard constraint must not be violated. Unfortunately, under some conditions a constraint violation might be unavoidable (e.g., an unexpected, large disturbance), and a realistic controller must allow for this.
Model Predictive Control Toolbox software does so by softening each constraint, making a violation mathematically acceptable, though discouraged. The designer may specify the degree of softness in each case, making selected constraints less likely to be violated than others. See Optimization Problem for the mathematical details.
Briefly, you specify a tolerance band for each constraint. If the tolerance band is zero, the constraint is hard (no violation allowed). Increasing the tolerance band softens the constraint.
The tolerance band is not a limit on the constraint violation, however. (If it were, you would still have a hard constraint.) You need to view it relative to other constraints.
For example, suppose you have two constraints, one on a temperature and the other on a flow rate. You specify a tolerance band of 2 degrees on the temperature constraint, and 20 kg/s on the flow rate constraint. The Model Predictive Controller assumes that violations of these magnitudes are of equal concern, and should be handled accordingly.
At the beginning of each sampling instant the controller estimates the current plant state. Accurate knowledge of the state improves prediction accuracy, which, in turn, improves controller performance.
If all plant states are measured, the state estimation problem is relatively simple and requires consideration of measurement noise effects only. Unfortunately, the internal workings of a typical plant are unmeasured, and the controller must estimate their current values from the available measurements. It also estimate the values of any sustained, unmeasured disturbances.
Model Predictive Control Toolbox software provides a default state estimation strategy, which the designer may customize. For details, see State Estimation.
In figure Controller State at the kth Sampling Instant (b), M = 4 and P= 9, and the controller is optimizing the first M moves of the prediction horizon, after which the manipulated variable remains constant for the remaining P – M = 5 sampling instants.
The following figure shows an alternative blocked strategy—again with 4 planned moves—in which the first occurs at sampling instant k, the next at k+2, the next at k+4, and the final at k+6. A block is one or more successive sampling periods during which the manipulated variable is constant. The block durations are the number of sampling periods in each block. In figure Blocking Example with Four Moves the block durations are 2, 2, 2, and 3. (Their sum must equal P.)
Blocking Example with Four Moves

As for the default (unblocked) mode, only the current move, uk, actually goes to the plant. Thus, as shown in the figure above, the controller has made a plant adjustment at each sampling instant.
So why use blocking? When P >> M (as is generally recommended), and all M moves are at the beginning of the horizon, the moves tend to be larger (because all but the final move last just one sampling period). Blocking often leads to smoother adjustments, all other things being equal.
See the subsequent case study examples and the literature for more discussion and MIMO design guidelines.
![]() | Model Predictive Control of a SISO Plant | Model Predictive Control Problem Setup | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |