Simulink Control Design™ - MathWorks

(Tuis.) #1

To make it easier to trace which goal applies to which design point, use the
SamplingGrid property to attach the design-point information to VG.


VG.SamplingGrid = struct('alpha',alpha,'V',V);


Use VG with systune as you would use any other tuning goal. Use viewGoal to visualize
the tuning goal and identify design points that fail to meet the target margins. For varying
tuning goals, the viewGoal plot includes sliders that let you examine the goal and system
performance for particular design points. See “Validate Gain-Scheduled Control Systems”
on page 11-46.


The template function allows great flexibility in constructing the design goals. For
example, you can write a function, goalspec(a,b), that constructs the target overshoot
as a nontrivial function of the parameters (a,b), and save the function in a MATLAB file.
Your template function then calls goalspec:


FH = @(a,b) TuningGoal.Overshoot('r',y',goalspec(a,b));


For more information about configuring varying goals, see the varyingGoal reference
page.


Create Separate Requirement for Each Design Point


Another way to enforce a requirement that varies with design point is to create a separate
instance of the requirement for each design point. This approach can be useful when you
have a goal that only applies to a few of models in the design array. For example, suppose
that you want to enforce a 1/s loop shape on the first five design points only, with a
crossover frequency that depends on the scheduling variables. Suppose also that you
have created a vector, wc, that contains the target bandwidth for each design point. Then
you can construct one TuningGoal.LoopShape requirement for each design point.
Associate each TuningGoal.LoopShape requirement with the corresponding design
point using the Models property of the requirement.


for ct = 1:length(wc)
R(ct) = TuningGoal.LoopShape('u',wc(ct));
R(ct).Model = ct;
end


If wc covers all the design points in your grid, this approach is equivalent to using a
varyingGoal object. It is a useful alternative to varyingGoal when you only want to
constrain a few design points.


Change Requirements with Operating Condition
Free download pdf