Simulink Control Design™ - MathWorks

(Tuis.) #1
points along the Cref trajectory. Use the tunableSurface object to parameterize each
gain as a quadratic function of Cr. The "tuning grid" is set to the five concentrations CrEQ
and the basis functions for the quadratic parameterization are. Most gains are
initialized to be identically zero.

TuningGrid = struct('Cr',CrEQ);
ShapeFcn = @(Cr) [Cr , Cr^2];

Kp = tunableSurface('Kp', 0, TuningGrid, ShapeFcn);
Ki = tunableSurface('Ki', -2, TuningGrid, ShapeFcn);
Kt = tunableSurface('Kt', 0, TuningGrid, ShapeFcn);
a = tunableSurface('a', 0, TuningGrid, ShapeFcn);
b = tunableSurface('b', 0, TuningGrid, ShapeFcn);

Controller Tuning

Because the target bandwidth is within a decade of the Nyquist frequency, it is easier to
tune the controller directly in the discrete domain. Discretize the linearized process
dynamics with sample time of 0.5 minutes. Use the ZOH method to reflect how the digital
controller interacts with the continuous-time plant.

Ts = 0.5;
Gd = c2d(G,Ts);

Create an slTuner interface for tuning the quadratic gain schedules introduced above.
Use block substitution to replace the nonlinear plant model by the five discretized linear
models Gd obtained at the design points CrEQ. Use setBlockParam to associate the
tunable gain functions Kp, Ki, Kt, a, b with the Lookup Table blocks of the same name.

BlockSubs = struct('Name','rct_CSTR/CSTR','Value',Gd);
ST0 = slTuner('rct_CSTR',{'Kp','Ki','Kt','a','b'},BlockSubs);
ST0.Ts = Ts; % sample time for tuning

% Register points of interest
ST0.addPoint({'Cref','Cr','Tr','TrSP','Tc'})

% Parameterize look-up table blocks
ST0.setBlockParam('Kp',Kp);
ST0.setBlockParam('Ki',Ki);
ST0.setBlockParam('Kt',Kt);
ST0.setBlockParam('a',a);
ST0.setBlockParam('b',b);

11 Gain-Scheduled Controllers

Free download pdf