Why are the nominal conditions of the nonlinear CSTR model set to [0 0 u] in the example code for successive linearization in the Model Predictive Control Toolbox Version 2.2 (R14SP2)?

2 views (last 30 days)
I have opened the example code for successive linearization of a nonlinear CSTR model by executing the following at the MATLAB prompt:
web([docroot,'/toolbox/mpc/mpc_getstarted_commands11.html'])
In the example code on line #16 the nominal conditions for the CSTR model are set as follows:
Model.Nominal.U = [0 0 u];
where,
u = up(3);
defined on line # 3 of the code and,
up = [10 298.15 298.15];
defined on line # 2 of the code.
The three parameters comprising of the nominal conditions in the structure "Model.Nominal.U" include Feed Concentration, Feed Temperature Disturbances, and the Control Variable listed in that particular order. I do not understand the reason behind the Feed Concentration and the Feed Temperature Disturbances being set to zero while the Control Varible is set to "u" where u=up(3)=298.15. I would expect to see the following instead:
Model.Nominal.U= up;
where,
up = [10 298.15 298.15]

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This enhancement has been incorporated in Release 2008a (R2008a). For previous product releases, read below for any possible workarounds:
The reason why we have "Model.Nominal.U = [0 0 u];" instead of "Model.Nominal.U = up;" is that the first 2 plant inputs are designated as unmeasured disturbance to the Model Predictive Control (MPC) Toolbox by the following structure in the example code:
Plant.InputGroup.UnmeasuredDisturbances = [1 2];
This implies that the Model Predictive Control (MPC) toolbox doesn’t know the values of those 2 plant inputs during its optimization calculation. Therefore, by design, nominal values for all the unmeasured disturbance variables to the Model Predictive Control (MPC) toolbox have to be 0. In other words, if we have
Plant.InputGroup.UnmeasuredDisturbances = [1];
Plant.InputGroup.MeasuredDisturbances = [2];
Plant.InputGroup.ManipulatedVariables = [3];
Then we will see:
Model.Nominal.U = [0 up(2) up(3)];
Note that those two values are used by the plant itself in the closed loop simulation.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!