This example shows how to configure additional attributes of design requirements for use with systune
or looptune
.
All TuningGoal
requirements are objects that can be further configured by modifying their default attributes. The display shows the list of such attributes. For example
R = TuningGoal.Gain('d','y',1)
R = Gain with properties: MaxGain: [1x1 zpk] Focus: [0 Inf] Stabilize: 1 InputScaling: [] OutputScaling: [] Input: {'d'} Output: {'y'} Models: NaN Openings: {0x1 cell} Name: ''
Three attributes are shared by multiple requirements. The Focus
property specifies the frequency band in which the requirement is active. For example,
R.Focus = [1 20];
limits the gain from d
to y
in the frequency interval [1,20] only. The Models
property specifies which models the requirement applies to (in the context of tuning for multiple plant models). For example,
R.Models = [2 3 5];
indicates that the requirement only applies to the second, third, and fifth model in the model array supplied to systune
. Finally, the Openings
property lets you specify additional loop openings. For example
R = TuningGoal.Margins('Inner',6,45); R.Openings = 'Outer';
specifies stability margins for the inner loop with the outer loop open. In MATLAB, use AnalysisPoint
blocks to mark loop opening locations. In Simulink, use the addPoint
method of the slTuner
interface to flag such locations.