Package: TuningGoal
Tracking requirement for control system tuning
Use the TuningGoal.Tracking
object to specify
a frequencydomain tracking requirement between specified inputs and
outputs. This requirement specifies the maximum relative error (gain
from reference input to tracking error) as a function of frequency.
Use this requirement for control system tuning with tuning commands
such as systune
or looptune
.
You can specify the maximum error profile directly by providing a transfer function. Alternatively, you can specify a target DC error, peak error, and response time. These parameters are converted to the following transfer function that describes the maximum frequencydomain tracking error:
$$\text{MaxError}=\frac{\left(\text{PeakError}\right)s+{\omega}_{c}\left(\text{DCError}\right)}{s+{\omega}_{c}}.$$
Here, ω_{c} is 2/(response time). The following plot illustrates these relationships for an example set of values.
creates
a tuning requirement Req
=
TuningGoal.Tracking(inputname
,outputname
,responsetime
,dcerror
,peakerror
)Req
that constrains the tracking
performance from inputname
to outputname
in
the frequency domain. This tuning requirement specifies a maximum
error profile as a function of frequency given by:
$$\text{MaxError}=\frac{\left(\text{PeakError}\right)s+{\omega}_{c}\left(\text{DCError}\right)}{s+{\omega}_{c}}.$$
The tracking bandwidth ω_{c} =
2/responsetime
. The maximum relative steadystate
error is given by dcerror
, and peakerror
gives
the peak relative error across all frequencies.
You can specify a MIMO tracking requirement by specifying signal
names or a cell array of multiple signal names for inputname
or outputname
.
For MIMO tracking requirements, use the InputScaling
property
to help limit crosscoupling. See Properties.
specifies
the maximum relative error as a function of frequency. You can specify
the target error profile (maximum gain from reference signal to tracking
error signal) as a smooth transfer function. Alternatively, you can
sketch a piecewise error profile using an Req
= TuningGoal.Tracking(inputname
,outputname
,maxerror
)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. 

Target response time, specified as a positive scalar value.
The tracking bandwidth is given by ω_{c} =
2/ 

Maximum steadystate fractional tracking error, specified as
a positive scalar value. For example, If Default: 0.001 

Maximum fractional tracking error across all frequencies, specified as a positive scalar value greater than 1. Default: 1 

Target tracking error profile as a function of frequency, specified as a SISO numeric LTI model.


Maximum error as a function of frequency, expressed as a SISO If you use the syntax If you use the syntax $$\text{MaxError}=\frac{\left(\text{PeakError}\right)s+{\omega}_{c}\left(\text{DCError}\right)}{s+{\omega}_{c}}.$$
Use 

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

Reference signal scaling, specified as a vector of positive real values. For a MIMO tuning requirement, when the choice of units results in a mix of small and large signals in different channels of the response, use this property to specify the relative amplitude of each entry in the vectorvalued step input. This information is used to scale the offdiagonal terms in the transfer function from reference to tracking error. This scaling ensures that crosscouplings are measured relative to the amplitude of each reference signal. For example, suppose that Req.InputScaling = [100,1]; This tells the software to take into account that the first reference signal is 100 times greater than the second reference signal. The default value, Default: 

Reference signal names. String or cell array of strings specifying
the names of the signals to be tracked, populated by the 

Output signal names. String or cell array of strings specifying
the names of the signals that must track the reference signals, populated
by 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.Tracking
requirement, f(x)
is given by:
$$f\left(x\right)={\Vert \frac{1}{\text{MaxError}}\left(T\left(s,x\right)I\right)\Vert}_{\infty}.$$
T(s,x)
is the closedloop transfer function from Input
to Output
.$${\Vert \text{\hspace{0.17em}}\cdot \text{\hspace{0.17em}}\Vert}_{\infty}$$ denotes
the H_{∞} norm (see norm
).
Create a tracking requirement specifying that a signal 'theta'
track
a signal 'theta_ref'
. The required response time
is 2, in the time units of the control system you are tuning. The
maximum steadystate error is 0.1%.
Req = TuningGoal.Tracking('theta_ref','theta',2,0.001);
Since peakerror
is unspecified, this requirement
uses the default value, 1.
Create a tracking requirement specifying that a signal 'theta'
track a signal 'theta_ref'
. The maximum relative error is 0.01 (1%) in the frequency range [0,1]. The relative error increases to 1 (100%) at the frequency 100.
Use a frd
model model to specify the error profile as a function of frequency.
err = frd([0.01 0.01 1],[0 1 100]); Req = TuningGoal.Tracking('theta_ref','theta',err);
The software converts err
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.
evalSpec
 looptune
 looptune (for slTuner)
 slTuner
 systune
 systune
(for slTuner)
 TuningGoal.Gain
 TuningGoal.LoopShape
 viewSpec