Specifications
4 Designing Controllers Using the Command Line
4-24
Compute Steady-State Gain
This example shows how to analyze a Model Predictive Controller using cloffset. The
function computes the closed-loop, steady-state gain for each output when subjected to a
sustained, 1-unit disturbance added to each output. It assumes that no constraints will
be encountered.
For example, consider the controller operating at the final steady-state of the nonlinear
CSTR of the previous section. To compute its gain, type
cloffset(MPCobj)
which gives the result:
ans =
1.0000 14.5910
-0.0000 -0.0000
The interpretation is that the controller doesn't react to a sustained disturbance of 1 unit
in the first output (the reactor temperature). Recall that we assigned zero weight to this
output in the controller design, so the controller ignores deviations from its setpoint. The
same disturbance has no effect on the second output (the 2,1 element is zero).
If there is a 1-unit disturbance in the second output, the controller reacts, and the first
output increases 14.59 units. This is again due to the zero weight on this output. The
second output stays at its setpoint (the 2,2 element is zero).