Package: TuningGoal
Gain constraint for control system tuning
Use the TuningGoal.Gain
object to specify a
constraint that limits the gain from a specified input to a specified
output. Use this requirement for control system tuning with tuning
commands such as systune
or looptune
.
When you use a TuningGoal.Gain
requirement,
the software attempts to tune the system so that the gain from the
specified input to the specified output does not exceed the specified
value. By default, the constraint is applied with the loop closed.
To apply the constraint to an openloop response, use the Openings
property
of the TuningGoal.Gain
object.
You can use a gain constraint to:
Enforce a design requirement of disturbance rejection across a particular input/output pair, by constraining the gain to be less than 1
Enforce a custom rolloff rate in a particular frequency band, by specifying a gain profile in that band
creates
a tuning requirement Req
=
TuningGoal.Gain(inputname
,outputname
,gainvalue
)Req
. This requirement constrains
the gain from inputname
to outputname
to
remain below the value gainvalue
.
You can specify the inputname
or outputname
as
cell arrays (vectorvalued signals). If you do so, then the tuning
requirement constrains the largest singular value of the transfer
matrix from inputname
to outputname
.
See sigma
for more information
about singular values.
specifies
the maximum gain as a function of frequency. You can specify the target
gain profile (maximum gain across the I/O pair) as a smooth transfer
function. Alternatively, you can sketch a piecewise error profile
using an Req
= TuningGoal.Gain(inputname
,outputname
,gainprofile
)frd
model.

Input signals for the requirement, specified as a string or as a cell array of strings, for multipleinput requirements. If you are using the requirement to tune a Simulink^{®} model
of a control system, then
If you are using the requirement to tune a generalized statespace
(
For example, if you are tuning a control system model, If
For more information about analysis points in control system models, see Marking Signals of Interest for Control System Analysis and Design. 

Output signals for the requirement, specified as a string or as a cell array of strings, for multipleoutput requirements. If you are using the requirement to tune a Simulink model
of a control system, then
If you are using the requirement to tune a generalized statespace
(
For example, if you are tuning a control system model, If
For more information about analysis points in control system models, see Marking Signals of Interest for Control System Analysis and Design. 

Maximum gain (linear). The gain constraint


Gain profile as a function of frequency. The gain constraint


Maximum gain as a function of frequency,
expressed as a SISO The software automatically maps the 

Frequency band in which tuning requirement is enforced, specified
as a row vector of the form Set the Req.Focus = [1,100]; Default: 

Stability requirement on closedloop dynamics, specified as
1 ( By default, Default: 1( 

Input signal scaling, specified as a vector of positive real values. Use this property to specify the relative amplitude of each
entry in vectorvalued input signals when the choice of units results
in a mix of small and large signals. This information is used to scale
the closedloop transfer function from Suppose T(s) is the closedloop
transfer function from The default value, Default: 

Output signal scaling, specified as a vector of positive real values. Use this property to specify the relative amplitude of each
entry in vectorvalued output signals when the choice of units results
in a mix of small and large signals. This information is used to scale
the closedloop transfer function from Suppose T(s) is the closedloop
transfer function from The default value, Default: 

Input signal names, specified as a cell array of strings. These
strings specify the names of the inputs of the transfer function that
the tuning requirement constrains. The initial value of the 

Output signal names, specified as a cell array of strings. These
strings specify the names of the outputs of the transfer function
that the tuning requirement constrains. The initial value of the 

Models to which the tuning requirement applies, specified as a vector of indices. Use the Req.Models = 2:4; When Default: 

Feedback loops to open when evaluating the requirement, specified as a cell array of strings that identify loopopening locations. The tuning requirement is evaluated against the openloop configuration created by opening feedback loops at the locations you identify. If you are using the requirement to tune a Simulink model
of a control system, then If you are using the requirement to tune a generalized statespace
( Default: 

Name of the requirement object, specified as a string. For example, if Req.Name = 'LoopReq'; Default: 
When you tune a control system using a TuningGoal
object
to specify a tuning requirement, the software converts the requirement
into a normalized scalar value f(x),
where 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 requirement is a hard constraint.
For the TuningGoal.Gain
requirement, f(x)
is given by:
$$f\left(x\right)={\Vert \frac{1}{\text{MaxGain}}{D}_{o}^{1}T\left(s,x\right){D}_{i}\Vert}_{\infty}.$$
T(s,x)
is the closedloop transfer function from Input
to Output
. D_{o} and D_{i} are
diagonal matrices with the OutputScaling
and InputScaling
property
values on the diagonal, respectively. $${\Vert \text{\hspace{0.17em}}\cdot \text{\hspace{0.17em}}\Vert}_{\infty}$$ denotes
the H_{∞} norm (see norm
).
Create a gain constraint that enforces a disturbance rejection
requirement from a signal 'du'
to a signal 'u'
.
Req = TuningGoal.Gain('du','u',1);
This requirement specifies that the maximum gain of the response
from 'du'
to 'u'
not exceed
1 (0 dB).
Create a gain constraint that constrains the response from a signal 'du'
to a signal 'u'
to roll off at 20 dB/decade at frequencies greater than 1. The gain constraint also specifies disturbance rejection (maximum gain of 1) in the frequency range [0,1].
gmax = frd([1 1 0.01],[0 1 100]); Req = TuningGoal.Gain('du','u',gmax);
These commands use a frd
model to specify the gain profile as a function of frequency. The maximum gain of 1 dB at the frequency 1 rad/s, together with the maximum gain of 0.01 dB at the frequency 100 rad/s, specifies the desired rolloff of 20 dB/decade.
The software converts gmax
into a smooth function of frequency that approximates the piecewise specified requirement. Display the error requirement using viewSpec
.
viewSpec(Req)
The yellow region indicates where the requirement is violated.
Create a gain constraint that enforces a disturbance rejection
requirement from a signal 'du'
to a signal 'u'
.
Req = TuningGoal.Gain('du','u',1);
This requirement specifies that the maximum gain of the response
from 'du'
to 'u'
not exceed
1 (0 dB).