Specifications
4 Designing Controllers Using the Command Line
4-14
controller design, always have nominal zero values. As they are unmeasured, the
controller cannot be informed of the true values. A non-zero value would cause an
error.
• Function mpc defines a new controller based on the relinearized plant model. The
output weight tuning ignores the temperature measurement, focusing only on the
concentration.
• At t = 0, the mpcstate function initializes the controller's extended state vector,
x, which is an mpcstate object. Thereafter, the mpcmove function updates it
automatically using the controller's default state estimator. It would also be possible
to use an Extended Kalman Filter (EKF) as described in [1] and [2], in which case the
EKF would reset the mpcstate input variables at each step.
• The mpcmove function uses the latest controller definition and state, the measured
plant outputs, and the setpoints to calculate the new coolant temperature at each
step.
• The Simulink sim function simulates the nonlinear plant from the beginning to the
end of the control interval. Note that the final condition from the previous step is
being used as the initial plant state, and that the plant inputs are being held constant
during each interval.
Remember that a conventional feedback controller or a fixed Model Predictive Control
Toolbox controller tuned to operate at the initial condition would become unstable as
the plant moves to the final condition. Periodic model updating overcomes this problem
automatically and provides excellent control under all conditions.