Package: TuningGoal
Stability margin requirement for control system tuning
Use TuningGoal.Margins
to specify a tuning
goal for the gain and phase margins of a SISO or MIMO feedback loop.
You can use this tuning goal for validating a tuned control system
with viewGoal
. You can also use the tuning goal
for control system tuning with tuning commands such as systune
or looptune
.
After you create a tuning goal, you can configure it further by setting Properties of the object.
After using the tuning goal to tune a control system, you can
visualize the tuning goal and the tuned value using the viewGoal
command. For information about
interpreting the margins goal, see Stability Margins in Control System Tuning.
creates
a tuning goal that specifies the minimum gain and phase margins at
the specified location in the control system. Req
=
TuningGoal.Margins(location
,gainmargin
,phasemargin
)

Location in the control system at which the minimum gain and phase margins apply, specified as a character vector or cell array of character vectors that identify one or more locations in the control system to tune. What locations are available depends on what kind of system you are tuning:
The margin requirements apply to the pointtopoint, openloop transfer function at the specified loopopening location. That transfer function is the openloop response obtained by injecting signals at the specified location, and measuring the return signals at the same point. If 

Required minimum gain margin for the feedback loop, specified as a scalar value in dB. For MIMO feedback loops, The diskbased gain margin guarantee stability when the gain in each
feedback channel changes by up to a factor


Required minimum phase margin for the feedback loop, specified as a scalar value in degrees. For MIMO feedback loops, The diskbased phase margin guarantee stability when the gain in each
feedback channel changes by up to 

Required minimum gain margin for the feedback loop, specified as a scalar value in decibels (dB). The value of the 

Required minimum phase margin for the feedback loop, specified as a scalar value in degrees. The value of the 

Controls the order (number of states) of the scalings involved
in computing MIMO stability margins. Static scalings ( Default: 0 (static scaling) 

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

Location at which the minimum gain and phase margins apply,
specified as a cell array of character vectors that identify one or
more analysis points in the control system to tune. For example,
if The 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: 
This tuning goal imposes an implicit stability constraint on
the closedloop sensitivity function measured at Location
,
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.Margins
, f(x)
is given by:
$$f\left(x\right)={\Vert 2\alpha S\alpha I\Vert}_{\infty}.$$
S = D^{–1}[I – L(s,x)]^{–1}D is the scaled sensitivity function.
L(s,x) is the openloop response being shaped.
D is an automaticallycomputed loop scaling factor.
α is a scalar parameter computed from the specified gain and phase margin.
evalGoal
 looptune
 looptune (for slTuner)
 systune
 systune
(for slTuner)
 viewGoal