Simulink Control Design™ - MathWorks

(Tuis.) #1

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 open-loop transfer function for the inner loop, use e2 and y2 as analysis
points. To eliminate the effects of the outer loop, break the loop at e2. Add e2 and y2 to
sllin as analysis points.


addPoint(sllin,{'e2','y2'})


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


mdl_index = params(1).Value == max(Kp2_range) & params(2).Value == max(Ki2_range);


Obtain the open-loop transfer function from e2 to y2.


sys = getIOTransfer(sllin,'e2','y2','e2',mdl_index);


Obtain Offsets from Input/Output Transfer Function


Open Simulink model.


mdl = 'scdcascade';
open_system(mdl)


getIOTransfer
Free download pdf