Frequency-weighted gain constraint for control system tuning
TuningGoal.WeightedGain to limit the
weighted gain from specified inputs to outputs. The weighted gain is the maximum across
frequency of the gain from input to output, multiplied by weighting functions that you
specify. You can use the
tuning goal for control system tuning with tuning commands such as
After you create a tuning goal, you can configure it further by setting Properties of the object.
|||WL(s)H(s)WR(s)||∞ < 1.||(1)|
The notation ||•||∞ denotes the maximum gain across frequency (the H∞ norm).
WL,WR — Frequency-weighting functions
scalar | matrix | SISO numeric LTI model | MIMO numeric LTI model
Frequency-weighting functions, specified as scalars, matrices, or SISO or MIMO numeric LTI models.
the weights for the tuning goal. The tuning goal ensures that the gain
H(s) from the specified input
to output satisfies the inequality:
|||WL(s)H(s)WR(s)||∞ < 1.||(2)|
WLprovides the weighting for the output channels of H(s), and
WRprovides the weighting for the input channels. You can specify scalar weights or frequency-dependent weighting. To specify a frequency-dependent weighting, use a numeric LTI model. For example:
WL = tf(1,[1 0.01]); WR = 10;
If you specify MIMO weighting functions, then
must be vector signals. The dimensions of the vector signals must be
such that the dimensions of H(s)
are commensurate with the dimensions of
WR. For example, if you specify
diag([1 10]), then
include two signals. Scalar values, however, automatically expand to any
input or output dimension.
If you are tuning in discrete time (that is, using a
genss model or
interface with nonzero
Ts), you can specify the
weighting functions as discrete-time models with the same
Ts. If you specify the weighting functions in
continuous time, the tuning software discretizes them. Specifying the
weighting functions in discrete time gives you more control over the
weighting functions near the Nyquist frequency.
A value of
WL =  or
WR =  is
interpreted as the identity.
Constrain Weighted Gain of Closed-Loop System
Create a tuning goal requirement that constrains the gain of a closed-loop SISO system from its input, r, to its output, y. Weight the gain at its input by a factor of 10 and at its output by the frequency-dependent weight .
WL = tf(1,[1 0.01]); WR = 10; Req = TuningGoal.WeightedGain('r','y',WL,WR);
You can use the requirement
systune to tune the free parameters of any control system model that has an input signal named
'r' and an output signal named
You can then use
viewGoal to validate the tuned control system against the requirement.
Constrain Weighted Gain Evaluated with a Loop Opening
Create a requirement that constrains the gain of the outer loop of the following control system, evaluated with the inner loop open.
Create a model of the system. To do so, specify and connect the numeric plant models,
G2, the tunable controllers
C2. Also, create and connect the
AnalysisPoint blocks that mark points of interest for analysis or tuning,
G1 = tf(10,[1 10]); G2 = tf([1 2],[1 0.2 10]); C1 = tunablePID('C','pi'); C2 = tunableGain('G',1); AP1 = AnalysisPoint('AP1'); AP2 = AnalysisPoint('AP2'); T = feedback(G1*feedback(G2*C2,AP2)*C1,AP1); T.InputName = 'r'; T.OutputName = 'y';
Create a tuning requirement that constrains the gain of this system from r to y. Weight the gain at the output by .
WL = tf([1 0],[1 0.5]); Req = TuningGoal.WeightedGain('r','y',WL,);
This requirement is equivalent to
Req = TuningGoal.Gain('r','y',1/WL). However, for MIMO systems, you can use
TuningGoal.WeightedGain to create channel-specific weightings that cannot be expressed as
Specify that the transfer function from r to y be evaluated with the outer loop open for the purpose of tuning to this constraint.
Req.Openings = 'AP1';
By default, tuning using
TuningGoal.WeightedGain imposes a stability requirement as well as the gain requirement. Practically, in some control systems it is not possible to achieve a stable inner loop. When this occurs, remove the stability requirement for the inner loop by setting the
Stabilize property to
Req.Stabilize = false;
The tuning algorithm still imposes a stability requirement on the overall tuned control system, but not on the inner loop alone.
systune to tune the free parameters of
T to meet the tuning requirement specified by
Req. You can then validate the tuned control system against the requirement using the command
This tuning goal imposes an implicit stability constraint on the weighted closed-loop transfer function from
Output, evaluated with loops opened at the points identified in
Openings. The dynamics affected by this implicit constraint are the stabilized dynamics for this tuning goal. The
systuneOptionscontrol the bounds on these implicitly constrained dynamics. If the optimization fails to meet the default bounds, or if the default bounds conflict with other requirements, use
systuneOptionsto change these defaults.
When you tune a control system using a
TuningGoal, the software
converts the tuning goal into a normalized scalar value
f(x). x is the vector of
free (tunable) parameters in the control system. The software then adjusts the parameter
values to minimize f(x) or to drive
f(x) below 1 if the tuning goal is a hard
f(x) is given by:
T(s,x) is the closed-loop
transfer function from
Output. denotes the H∞ norm
Version HistoryIntroduced in R2016a
R2016a: Functionality moved from Robust Control Toolbox
Prior to R2016a, this functionality required a Robust Control Toolbox™ license.