Simulink Control Design™ - MathWorks

(Tuis.) #1

mdl = 'scdcascade';
open_system(mdl);


Create an slLinearizer interface for the model.


sllin = slLinearizer(mdl);


Vary the proportional (Kp2) and integral gain (Ki2) of the C2 controller in the 10% range.


Kp2_range = linspace(0.9Kp2,1.1Kp2,3);
Ki2_range = linspace(0.9Ki2,1.1Ki2,5);


[Kp2_grid,Ki2_grid] = ndgrid(Kp2_range,Ki2_range);


params(1).Name = 'Kp2';
params(1).Value = Kp2_grid;


params(2).Name = 'Ki2';
params(2).Value = Ki2_grid;


sllin.Parameters = params;


To calculate the sensitivity at the output of G2, use the y2 signal as the analysis point. To
eliminate the effects of the outer loop, break the outer loop at y1m. Add both these points
to sllin as analysis points.


addPoint(sllin,{'y2','y1m'});


Determine the index for the maximum values of Ki2 and Kp2.


getSensitivity
Free download pdf