Package: TuningGoal
Transient matching requirement for control system tuning
Use the TuningGoal.Transient
object to constrain the
transient response from specified inputs to specified outputs. This tuning goal
specifies that the transient response closely match the response of a reference model.
Specify the closeness of the required match using the RelGap
property
of the tuning goal (see Properties). You can constrain the response to an
impulse, step, or ramp input signal. You can also constrain the response to an input
signal given by the impulse response of an input filter you specify.
requires that the impulse response from Req
= TuningGoal.Transient(inputname
,outputname
,refsys
)inputname
to
outputname
closely matches the impulse response of the
reference model refsys
. Specify the closeness of the required match
using the RelGap
property of the tuning goal (see Properties). inputname
and
outputname
can describe a SISO or MIMO response of your control
system. For MIMO responses, the number of inputs must equal the number of
outputs.
specifies whether the input signal that generates the constrained transient response is
and impulse, step, or ramp signal. Req
= TuningGoal.Transient(inputname
,outputname
,refsys
,inputtype
)
specifies the input signal for generating the transient response that the tuning goal
constrains. Specify the input signal as a SISO transfer function,
Req
= TuningGoal.Transient(inputname
,outputname
,refsys
,inputfilter
)inputfilter
, that is the Laplace transform of the desired
timedomain input signal. The impulse response of inputfilter
is
the desired input signal.

Input signals for the tuning goal, specified as a character vector or, for multipleinput tuning goals, a cell array of character vectors.
For more information about analysis points in control system models, see Mark Signals of Interest for Control System Analysis and Design. 

Output signals for the tuning goal, specified as a character vector or, for multipleoutput tuning goals, a cell array of character vectors.
For more information about analysis points in control system models, see Mark Signals of Interest for Control System Analysis and Design. 

Reference system for target transient response, specified as a dynamic
system model, such as a 

Type of input signal that generates the constrained transient response, specified as one of the following values:
Default: 

Custom input signal for generating the transient response, specified
as a SISO transfer function ( The frequency response of For example, to constrain the transient response to a unitamplitude
sine wave of frequency The series connection of 

Reference system for target transient response, specified as a SISO or
MIMO statespace ( The  

Input signal for generating the transient response, specified as a SISO
For tuning goals created using the
For tuning goals created using an The series connection of Default: 1  

Maximum relative matching error, specified as a positive scalar value. This property specifies the matching tolerance as the maximum relative gap between the target and actual transient responses. The relative gap is defined as: $$\text{gap}=\frac{{\Vert y\left(t\right){y}_{ref}\left(t\right)\Vert}_{2}}{{\Vert {y}_{ref(tr)}\left(t\right)\Vert}_{2}}.$$ y(t) – y_{ref}(t) is the response mismatch, and 1 – y_{ref(tr)}(t) is the transient portion of y_{ref} (deviation from steadystate value or trajectory). $${\Vert \text{\hspace{0.17em}}\cdot \text{\hspace{0.17em}}\Vert}_{2}$$ denotes the signal energy (2norm). The gap can be understood as the ratio of the rootmeansquare (RMS) of the mismatch to the RMS of the reference transient Increase the value of Default: 0.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 as a cell array of character vectors
that indicate the inputs for the transient responses that the tuning goal
constrains. The initial value of the  

Output signal names, specified as a cell array of character vectors that
indicate the outputs where transient responses that the tuning goal
constrains are measured. The initial value of the  

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

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

Name of the tuning goal, specified as a character vector. For example, if Req.Name = 'LoopReq'; Default: 
Create a requirement for the transient response from a signal named 'r'
to a signal named 'u'
. Constrain the impulse response to match the response of transfer function , but allow 20% relative variation between the target and tuned responses.
refsys = tf(1,[1 1]); Req1 = TuningGoal.Transient('r','u',refsys);
When you do not specify a response type, the requirement constrains the transient response. By default, the requirement allows a relative gap of 0.1 between the target and tuned responses. To change the relative gap to 20%, set the RelGap
property of the requirement.
Req1.RelGap = 0.2;
Examine the requirement.
viewGoal(Req1)
The dashed line shows the target impulse response specified by this requirement. You can use this requirement to tune a control system model, T
, that contains valid input and output locations named 'r'
and 'u'
. If you do so, the command viewGoal(Req1,T)
plots the achieved impulse response from 'r'
to 'u'
for comparison to the target response.
Create a requirement that constrains the response to a step input, instead of the impulse response.
Req2 = TuningGoal.Transient('r','u',refsys,'step');
Examine this requirement.
viewGoal(Req2)
Req2
is equivalent to the following step tracking requirement:
Req3 = TuningGoal.StepTracking('r','u',refsys);
Create a requirement for the transient response from 'r'
to 'u'
. Constrain the response to a sinusoidal input signal, rather than to an input, step, or ramp.
To specify a custom input signal, set the input filter to the Laplace transform of the desired signal. For example, suppose you want to constrain the response to a signal of . The Laplace transform of this signal is given by:
Create a requirement that constrains the response at 'u'
to a sinusoidal input of natural frequency 2 rad/s at 'r'
. The response should match that of the reference system .
refsys = tf(1,[1 1]); w = 2; inputfilter = tf(w,[1 0 w^2]); Req = TuningGoal.Transient('u','r',refsys,inputfilter);
Examine the requirement to see the shape of the target response.
viewGoal(Req)
Create a tuning goal that constrains the impulse response. Set the
Models
and Openings
properties to further
configure the tuning goal’s applicability.
refsys = tf(1,[1 1]); Req = TuningGoal.Transient('r','u',refsys); Req.Models = [2 3]; Req.Openings = 'OuterLoop'
When tuning a control system that has an input (or analysis point)
'r'
, an output (or analysis point) 'u'
,
and another analysis point at location 'OuterLoop'
, you can use
Req
as an input to looptune
or
systune
. Setting the Openings
property
specifies that the impulse response from 'r'
to
'y'
is computed with the loop opened at
'OuterLoop'
. When tuning an array of control system models,
setting the Models
property restricts how the tuning goal is
applied. In this example, the tuning goal applies only to the second and third
models in an array.
When you use this tuning goal to tune a continuoustime control system,
systune
attempts to enforce zero feedthrough
(D = 0) on the transfer that the tuning goal constrains.
Zero feedthrough is imposed because the
H_{2} norm, and therefore the value
of the tuning goal (see Algorithms), is infinite for
continuoustime systems with nonzero feedthrough.
systune
enforces zero feedthrough by fixing to zero all
tunable parameters that contribute to the feedthrough term.
systune
returns an error when fixing these tunable
parameters is insufficient to enforce zero feedthrough. In such cases, you must
modify the tuning goal or the control structure, or manually fix some tunable
parameters of your system to values that eliminate the feedthrough term.
When the constrained transfer function has several tunable blocks in series, the software’s approach of zeroing all parameters that contribute to the overall feedthrough might be conservative. In that case, it is sufficient to zero the feedthrough term of one of the blocks. If you want to control which block has feedthrough fixed to zero, you can manually fix the feedthrough of the tuned block of your choice.
To fix parameters of tunable blocks to specified values, use the
Value
and Free
properties of the block
parametrization. For example, consider a tuned statespace block:
C = tunableSS('C',1,2,3);
To enforce zero feedthrough on this block, set its D matrix value to zero, and fix the parameter.
C.D.Value = 0; C.D.Free = false;
For more information on fixing parameter values, see the Control Design Block
reference pages, such as tunableSS
.
This tuning goal imposes an implicit stability
constraint on the closedloop transfer function from Input
to 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 MinDecay
and MaxRadius
options
of systuneOptions
control 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 systuneOptions
to 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), 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 goal is a hard
constraint.
For TuningGoal.Transient
,
f(x) is based upon the relative gap between the
tuned response and the target response:
$$\text{gap}=\frac{{\Vert y\left(t\right){y}_{ref}\left(t\right)\Vert}_{2}}{{\Vert {y}_{ref(tr)}\left(t\right)\Vert}_{2}}.$$
y(t) – y_{ref}(t) is the response mismatch, and 1 – y_{ref(tr)}(t) is the transient portion of y_{ref} (deviation from steadystate value or trajectory). $${\Vert \text{\hspace{0.17em}}\cdot \text{\hspace{0.17em}}\Vert}_{2}$$ denotes the signal energy (2norm). The gap can be understood as the ratio of the rootmeansquare (RMS) of the mismatch to the RMS of the reference transient
TuningGoal.StepRejection
 TuningGoal.StepTracking
 evalGoal
 looptune
 looptune (for slTuner)
 slTuner
 systune
 systune (for slTuner)
 viewGoal