Simulink Control Design™ - MathWorks

(Tuis.) #1
With those block substitutions, the following commands create an slTuner interface that
you might use to tune the inner-loop gain schedule.

st0 = slTuner('mdl','Kp_in');
st0.BlockSubstitutions = [BlockSubs1; BlockSubs2];

See the example “Angular Rate Control in the HL-20 Autopilot” on page 11-95 for a
another case in which several elements other than the plant itself are replaced by block
substitution.

Substituting Blocks that Depend on the Scheduling Variables


Next, suppose that you have already tuned the inner-loop gain schedule, and have
obtained an array Kp_in_tuned, of values of Kp_in that correspond to each design point
(each value of alpha at which you linearized the plant). Suppose also that you have a new
Garr that is the full plant from u to {y,q,alpha} linearized with the tuned inner loop
closed. To tune the outer-loop gain schedules, you must replace the product block with
the array Kp_in_tuned. It is important to note that you replace the injection point, the
product block prod, rather than the lookup table Kp_in. Replacing the product block
effectively converts it to a varying gain. Also, you must zero out the first input of the
product block to remove the effect of the lookup table Kp_in.

prodsub = [0 ss(Kp_in_tuned)];
BlockSubs1 = struct('Name','mdl/prod','Value',prodsub);
BlockSubs2 = struct('Name','mdl/G','Value',Garr);

st0 = slTuner('mdl',{'Kp','Ki'});
st0.BlockSubstitutions = [BlockSubs1; BlockSubs2];

For another example that shows this kind of substitution for a previously-tuned lookup
table, see “Attitude Control in the HL-20 Autopilot - SISO Design” on page 11-104.

The following illustration of a portion of a model highlights another scenario in which you
might need to replace blocks that vary with the scheduling variable. Suppose the
scheduling variable is alpha, and somewhere in your model, an signal u gets divided by
alpha.

11 Gain-Scheduled Controllers

Free download pdf