Specifications
4 Designing Controllers Using the Command Line
4-4
Min: -Inf
Max: Inf
MinECR: 0
MaxECR: 0
RateMin: -Inf
RateMax: Inf
RateMinECR: 0
RateMaxECR: 0
Target: 'nominal'
Name: 'T_c'
Units: ''
This shows that the default controller has no constraints on the manipulated variable.
To include constraints as shown in Entering CSTR Manipulated Variable Constraints,
enter:
MPCobj.MV.Min = -10;
MPCobj.MV.Max = 10;
MPCobj.MV.RateMin = -4;
MPCobj.MV.RateMax = 4;
There are two outputs in this case, so MPCobj.OV is a 1-by-2 structure. To set
measurement units to the values shown in Controller Options — Weight Tuning Tab,
enter:
MPCobj.Model.Plant.OutputUnit = {'Deg C','kmol/m^3'};
Note The unit properties for display purposes only and is optional.
Finally, check the default weights by typing
MPCobj.W
ManipulatedVariables: 0
ManipulatedVariablesRate: 0.1000
OutputVariables: [1 1]
ECR: 100000
Change to the values shown in Controller Options — Weight Tuning Tab by typing:
MPCobj.W.ManipulatedVariablesRate = 0.3;
MPCobj.W.OutputVariables = [1 0];