TuningGoal.StepTracking class
Package: TuningGoal
Step response requirement for control system tuning
Description
Use TuningGoal.StepTracking
to specify a target step
response from specified inputs to specified outputs of a control system. Use this tuning goal
with control system tuning commands such as systune
or
looptune
.
Construction
creates a tuning goal that constrains the step response between the specified signal locations to
match the step response of a stable reference system, Req
= TuningGoal.StepTracking(inputname
,outputname
,refsys
)refsys
. The constraint
is satisfied when the relative difference between the tuned and target responses falls within a
tolerance specified by 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 the desired step response as a first-order response with time constant
Req
= TuningGoal.StepTracking(inputname
,outputname
,tau
)tau
:
specifies the desired step response as a second-order response with natural period
Req
= TuningGoal.StepTracking(inputname
,outputname
,tau
,overshoot
)tau
, natural frequency 1/tau
, and percent overshoot
overshoot
:
The damping is given by zeta =
cos(atan2(pi,-log(overshoot/100)))
.
Input Arguments
|
Input signals for the tuning goal, specified as a character vector or, for multiple-input 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 multiple-output 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 step response, specified as a dynamic system model, such as
a
For best results, |
|
Time constant or natural period of target step response, specified as a positive scalar. If you use the syntax If you use the syntax The damping of the system is given by |
|
Percent overshoot of target step response, specified as a scalar value in the range (0,100). |
Properties
|
Reference system for target step response, specified as a SISO or MIMO state-space
( If you use the If you use the
|
|
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 step responses. The relative gap is defined as: y(t) – yref(t) is the response mismatch, and 1 – yref(t) is the step-tracking error of the target model. denotes the signal energy (2-norm). Increase the value of Default: 0.1 |
|
Reference signal scaling, specified as a vector of positive real values. For a MIMO tracking 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 vector-valued step input. This information is used to scale the off-diagonal terms in the transfer function from reference to tracking error. This scaling ensures that cross-couplings 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: |
|
Input signal names, specified as a cell array of character
vectors that identify the inputs of the transfer function that the
tuning goal constrains. The initial value of the |
|
Output signal names, specified as a cell array of character
vectors that identify the outputs of the transfer function that the
tuning goal constrains. 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 loop-opening locations. The tuning goal is evaluated against the open-loop 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 state-space
( For example, if Default: |
|
Name of the tuning goal, specified as a character vector. For example, if Req.Name = 'LoopReq'; Default: |
Examples
Step Response Requirement with Specified Tolerance
Create a requirement for the step response from a signal named 'r'
to a signal named 'y'
. Constrain the step response to match the transfer function H = 10/(s+10), but allow 20% relative variation between the target the tuned responses.
H = tf(10,[1 10]); Req = TuningGoal.StepResp('r','y',H);
By default, this 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.
Req.RelGap = 0.2;
Examine the requirement.
viewGoal(Req);
The dashed line shows the target step 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 'y'
. If you do so, the command viewGoal(Req,T)
plots the achieved step response from 'r'
to 'y'
for comparison to the target response.
First-Order Step Response With Known Time Constant
Create a requirement that specifies a first-order step response with time constant of 5 seconds. Create the requirement for the step response from a signal named 'r'
to a signal named 'y'
.
Req = TuningGoal.StepResp('r','y',5);
When you use this requirement to tune a control system model, T
, the time constant 5 is taken to be expressed in the prevailing units of the control system. For example, if T
is a genss
model and the property T.TimeUnit
is 'seconds'
, then this requirement specifies a target time constant of 5 seconds for the response from the input 'r'
to the output 'y'
of 'T'
.
The specified time constant is converted into a reference state-space model stored in the ReferenceModel
property of the requirement.
refsys = tf(Req.ReferenceModel)
refsys = 0.2 ------- s + 0.2 Continuous-time transfer function.
As expected, refsys
is a first-order model.
Examine the requirement. The viewGoal
command displays the target response, which is the step response of the reference model.
viewGoal(Req);
The dashed line shows the target step response specified by this requirement, a first-order response with a time constant of five seconds.
Second-Order Step Response With Known Natural Period and Overshoot
Create a requirement that specifies a second-order step response with a natural period of 5 seconds, and a 10% overshoot. Create the requirement for the step response from a signal named 'r'
to a signal named 'y'
.
Req = TuningGoal.StepResp('r','y',5,10);
When you use this requirement to tune a control system model, T
, the natural period 5 is taken to be expressed in the prevailing units of the control system. For example, if T
is a genss
model and the property T.TimeUnit
is 'seconds'
, then this requirement specifies a target natural period of 5 seconds for the response from the input 'r'
to the output 'y'
of 'T'
.
The specified parameters of the response is converted into a reference state-space model stored in the ReferenceModel
property of the requirement.
refsys = tf(Req.ReferenceModel)
refsys = 0.04 --------------------- s^2 + 0.2365 s + 0.04 Continuous-time transfer function.
As expected, refsys
is a second-order model.
Examine the requirement. The viewGoal
command displays the target response, which is the step response of the reference model.
viewGoal(Req);
The dashed line shows the target step response specified by this requirement, a second-order response with 10% overshoot and a natural period of five seconds.
Tracking Goal with Limited Model Application and Additional Loop Openings
Create a tuning goal that specifies a first-order step response with time constant of 5
seconds. Set the Models
and Openings
properties to further
configure the tuning goal’s applicability.
Req = TuningGoal.StepTracking('r','y',5); Req.Models = [2 3]; Req.Openings = 'OuterLoop'
When tuning a control system that has an input 'r'
, an output
'y'
, and an analysis-point location 'OuterLoop'
, you can
use Req
as an input to looptune
or
systune
. Setting the Openings
property specifies that the
step response from 'r'
to 'y'
is measured 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.
Tips
This tuning goal imposes an implicit stability constraint on the closed-loop transfer function from
Input
toOutput
, evaluated with loops opened at the points identified inOpenings
. The dynamics affected by this implicit constraint are the stabilized dynamics for this tuning goal. TheMinDecay
andMaxRadius
options ofsystuneOptions
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, usesystuneOptions
to change these defaults.
Algorithms
When you tune a control system using a TuningGoal
, the software converts
the tuning goal into a normalized scalar value f(x). Here,
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.StepTracking
, f(x)
is given by:
T(s,x) is the closed-loop transfer
function from Input
to Output
with parameter values
x, and Tref(s)
is the reference model specified in the ReferenceModel
property. denotes the H2 norm (see
norm
).
Version History
Introduced in R2016aSee Also
looptune
| systune
| looptune (for slTuner)
(Simulink Control Design) | systune (for slTuner)
(Simulink Control Design) | viewGoal
| evalGoal
| TuningGoal.Tracking
| TuningGoal.Overshoot