Simulink Control Design™ - MathWorks

(Tuis.) #1
params(1).Name = 'Kp2';
params(1).Value = Kp2_grid;
params(2).Name = 'Ki2';
params(2).Value = Ki2_grid;

sllin.Parameters = params;

Kp2_range and Ki2_range specify the sample values for Kp2 and Ki2. To obtain a
transfer function for each combination of Kp2 and Ki2, use ndgrid and create a 6 x 4
parameter grid with grid arrays Kp2_grid and Ki2_grid. Configure the Parameters
property of sllin with the structure params. This structure specifies the parameters to
be varied and their grid arrays.

Analyze Closed-Loop Transfer Function for the Inner Loop

The overall closed-loop transfer function for the inner loop is equal to the transfer
function from u1 to y2. To eliminate the effects of the outer loop, you can break the loop
at e1, y1m, or y1. For this example, break the loop at e1.

Add u1 and y2 as analysis points, and e1 as a permanent opening of sllin.

addPoint(sllin,{'y2','u1'});
addOpening(sllin,'e1');

Obtain the transfer function from u1 to y2.

r2yi = getIOTransfer(sllin,'u1','y2');

r2yi, a 6 x 4 state-space model array, contains the transfer function for each specified
parameter combination. The software uses the model initial conditions as the linearization
operating point.

Because e1 is a permanent opening of sllin, r2yi does not include the effects of the
outer loop.

Plot the step response for r2yi.

stepplot(r2yi);

3 Batch Linearization

Free download pdf