Specifications
2 Building Models
2-12
C = [0 1
1 0];
D = zeros(2,2);
CSTR = ss(A,B,C,D);
This defines a continuous-time state-space model. If you do not specify a sampling period,
a default sampling value of zero applies. You can also specify discrete-time state-space
models. You can specify delays in both continuous-time and discrete-time models.
Note In the CSTR example, the D matrix is zero and the output does not instantly
respond to change in the input. The Model Predictive Control Toolbox software prohibits
direct (instantaneous) feedthrough from a manipulated variable to an output. For
example, the CSTR model could include direct feedthrough from the unmeasured
disturbance, C
Ai
, to either C
A
or T but direct feedthrough from T
c
to either output would
violate this restriction. If the model had direct feedthrough from T
c
, you can add a small
delay at this input to circumvent the problem.
LTI Object Properties
The ss function in the last line of the above code creates a state space model, CSTR,
which is an LTI object. The tf and zpk commands described in “Transfer Function
Models” on page 2-9 and “Zero/Pole/Gain Models” on page 2-10 also create LTI
objects. Such objects contain the model parameters as well as optional properties.
LTI Properties for the CSTR Example
The following code sets some of the CSTR model's optional properties:
CSTR.InputName = {'T_c', 'C_A_i'};
CSTR.OutputName = {'T', 'C_A'};
CSTR.StateName = {'C_A', 'T'};
CSTR.InputGroup.MV = 1;
CSTR.InputGroup.UD = 2;
CSTR.OutputGroup.MO = 1;
CSTR.OutputGroup.UO = 2;
CSTR
The first three lines specify labels for the input, output and state variables. The next four
specify the signal type for each input and output. The designations MV, UD, MO, and UO
mean manipulated variable, unmeasured disturbance, measured output, and unmeasured