Since the CSTR plant is nonlinear, the linear models display different characteristics. For
example, plant models with high and low conversion rates are stable, while the others are
not.
isstable(Plants,'elem')'
ans =
1x8 logical array
1 1 0 0 0 0 1 1
Design PID Controllers for the Plant Models
To design multiple PID controllers in batch, use the pidtune function. The following
command generates an array of PID controllers in parallel form. The desired open-loop
crossover frequency is at 1 rad/sec and the phase margin is the default value of 60
degrees.
Controllers = pidtune(Plants,'pidf',pidtuneOptions('Crossover',1));
Display the controller for C = 4.
Controllers(:,:,4)
ans =
1 s
Kp + Ki --- + Kd --------
s Tf*s+1
with Kp = -12.4, Ki = -1.74, Kd = -16, Tf = 0.00875
Continuous-time PIDF controller in parallel form.
To analyze the closed-loop responses for step setpoint tracking, first construct the closed-
loop systems.
clsys = feedback(Plants*Controllers,1);
Plot closed-loop responses
Design Family of PID Controllers for Multiple Operating Points