Worstcase diskbased stability margins of uncertain feedback loops
The worstcase disk margin is the smallest disk margin that occurs within a
specified uncertainty range. It is also the minimum guaranteed margin over the uncertainty
range. wcdiskmargin
estimates the worstcase disk margins and
corresponding worstcase gain and phase margins for both loopatatime and multiloop
variations. The function also returns the worstcase perturbation, the combination of
uncertain elements that yields the weakest margins.
[
estimates the worstcase loopatatime diskbased stability margins for the uncertain
negative feedback loop wcDM
,wcu
] = wcdiskmargin(L
,'siso')feedback(L,eye(N))
, where N
is
the number of inputs and outputs in L
.
While diskmargin
computes stability margins for a nominal model, wcdiskmargin
computes
the worstcase (smallest) disk margin over the modeled uncertainty in
L
. Diskbased margin analysis provides a stronger guarantee of robust
stability than the classical gain and phase margins. For general information about disk
margins, see Stability Analysis Using Disk Margins.
___ = wcdiskmargin(___,
specifies an additional skew parameter that biases the modeled gain and phase variation
toward gain increase (positive sigma
)sigma
) or gain decrease (negative
sigma
). You can use this argument to test the relative sensitivity of
stability margins to gain increases versus decreases. You can use this argument with any of
the previous syntaxes.
[___,
returns a structure with additional information about the worstcase margins and the
perturbations that generate them. You can use this output argument with any of the previous
syntaxes.info
] = wcdiskmargin(___)
Use wcdiskmargin
to compute worstcase loopatatime and multiloop disk margins. This example illustrates that loopatatime margins can give an overly optimistic assessment of the true robustness of MIMO feedback loops. Margins of individual loops can be sensitive to small perturbations within other loops.
Consider the closedloop system of the following illustration.
P is a twoinput, twooutput secondorder plant and C is a 2x2 static gain. Construct P in statespace form, assuming that it has an uncertain parameter and some dynamic uncertainty. Compute the worstcase disk margins at the plant output (to compute the margins at the plant input, use L = C*Pu
).
p = ureal('p',10,'Percentage',10); a = [0.2 p;p 0.2]; b = eye(2); c = [1 p;p 1]; d = zeros(2,2); P = ss(a,b,c,0); DEL = ultidyn('DEL',[2 2],'Bound',0.1); Pu = P*(eye(2)+DEL); C = [1 2;0 1]; L = Pu*C; [wcDM,wcu] = wcdiskmargin(L,'siso');
Examine the worstcase loopatatime disk margins, returned in the structure array wcDM
. Each entry in this structure array contains the worstcase stability margins of the corresponding channel.
wcDM(1)
ans = struct with fields:
GainMargin: [0.5298 1.8875]
PhaseMargin: [34.1696 34.1696]
DiskMargin: 0.6147
LowerBound: 0.6147
UpperBound: 0.6160
CriticalFrequency: 0
WorstPerturbation: [2x2 ss]
The result in wcDM(1)
gives guaranteed stability margins for the specified uncertainty range. As long as the openloop gain of the first channel changes by a factor between 0.53 and 1.88, the closed loop remains stable for all (p,DEL)
values within the specified range. Similarly, the closed loop remains stable as long as the phase variation does not exceed 34° in absolute value.
Similarly, wcDM(2)
shows that in the second feedback channel, the gain can vary by any factor between 0.52 and 1.93 or the phase can vary by up to 35°, and the system remains stable for such variations and the (p,DEL)
uncertainty.
wcDM(2)
ans = struct with fields:
GainMargin: [0.5167 1.9352]
PhaseMargin: [35.3450 35.3450]
DiskMargin: 0.6372
LowerBound: 0.6372
UpperBound: 0.6386
CriticalFrequency: 2.2950e08
WorstPerturbation: [2x2 ss]
The lower bound returned by wcdiskmargin
is a theoretical minimum guaranteed worstcase disk margin. The upper bound corresponds to an actual perturbation in the specified uncertainty range that approaches the lowerbound prediction. The output wcu
contains the values of that perturbation for each feedback channel. For example, wcu(2)
is the worst combination of (alpha,DEL)
for the second channel, and the disk margins for this worst combination are close to wcDM(2)
. In particular, DM(2).UpperBound
and wcDM(1).UpperBound
match.
wcL = usubs(L,wcu(2)); DM = diskmargin(wcL); DM(2)
ans = struct with fields:
GainMargin: [0.5159 1.9382]
PhaseMargin: [35.4184 35.4184]
DiskMargin: 0.6386
LowerBound: 0.6386
UpperBound: 0.6386
Frequency: 2.2950e08
WorstPerturbation: [2x2 ss]
In practice, gain and phase variations affect both channels simultaneously. To estimate the stability margins with respect to such independent and concurrent variations, examine the worstcase multiloop disk margins.
wcMM = wcdiskmargin(L,'mimo')
wcMM = struct with fields:
GainMargin: [0.8836 1.1317]
PhaseMargin: [7.0727 7.0727]
DiskMargin: 0.1236
LowerBound: 0.1236
UpperBound: 0.1239
CriticalFrequency: 0
WorstPerturbation: [2x2 ss]
The multiloop margins are much weaker than when considering one loop at a time. This is because it takes a smaller amount of gain (or phase) variation to destabilize the feedback loop when both channels are subject to variations.
You can visualize how uncertainty affects the margins with wcdiskmarginplot
. This plots the (diskbased) gain and phase margins as a function of frequency for the nominal and worstcase values of (alpha,DEL)
as well as 20 random samples of this uncertainty. The plot shows that uncertainty weakens the margins most near DC.
wcdiskmarginplot(L,{1e1,1e1}) legend('location','NorthWest')
Finally, compute the multiloop margin for simultaneous variations in gain (or phase) at both the plant inputs and plant outputs. When you allow the gain (or phase) to vary in more places, it becomes easier to destabilize the feedback loop, so the margins get even smaller. Thus, the multiloop I/O margin provide the most comprehensive and most conservative assessment of robust stability in the face of gain or phase variations and (alpha,DEL)
uncertainty.
wcMMIO = wcdiskmargin(Pu,C)
wcMMIO = struct with fields:
GainMargin: [0.9363 1.0680]
PhaseMargin: [3.7680 3.7680]
DiskMargin: 0.0658
LowerBound: 0.0658
UpperBound: 0.0659
CriticalFrequency: 1.0000e04
WorstPerturbation: [1x1 struct]
L
— Uncertain openloop responseUncertain openloop response, specified as an uncertain model such as a
uss
or ufrd
model. L
can be SISO or MIMO, as long as it has the same number of inputs and outputs.
wcdiskmargin
computes the worstcase diskbased stability margins
for the negativefeedback closedloop system
feedback(L,eye(N))
.
To compute the worstcase disk margins of the positive feedback system
feedback(L,eye(N),+1)
, use
wcdiskmargin(L)
.
When you have a controller P
and a plant C
,
you can compute the worstcase disk margins for gain (or phase) variations at the plant
inputs or outputs, as in the following diagram.
To compute margins at the plant outputs, set L = P*C
.
To compute margins at the plant inputs, set L = C*P
.
To consider variations at both the plant inputs and the plant output, use the
syntax [wcMMIO,wcu] = wcdiskmargin(P,C)
instead.
L
can be continuous time or discrete time. If
L
is a generalized statespace model (genss
)
then wcdiskmargin
uses the current value of the tunable control
design blocks in L
.
If L
is a frequencyresponse data model (such as
ufrd
), then wcdiskmargin
computes the
margins at each frequency represented in the model. The function returns the worstcase
margins at the frequency with the smallest disk margin.
If L
is a model array, then wcdiskmargin
computes margins for each model in the array.
P
— PlantPlant, specified as an uncertain model such as a uss
or
ufrd
model. P
can be SISO or MIMO, as long
as P*C
has the same number of inputs and outputs.
wcdiskmargin
computes the worstcase disk margins for a
negativefeedback closedloop system. To compute the disk margins of the system with
positive feedback, use wcdiskmargin(P,C)
.
P
can be continuous time or discrete time. If
P
is a generalized statespace model (genss
)
then wcdiskmargin
uses the current value of the tunable control
design blocks in P
.
If P
is a frequencyresponse data model (such as
frd
), then wcdiskmargin
computes the margins
at each frequency represented in the model. The function returns the worstcase margins
at the frequency with the smallest disk margin.
C
— ControllerController, specified as a dynamic system model. C
can be SISO
or MIMO, as long as P*C
has the same number of inputs and outputs.
wcdiskmargin
computes the diskbased stability margins for a
negativefeedback closedloop system. To compute the disk margins of the system with
positive feedback, use wcdiskmargin(C,P)
.
C
can be continuous time or discrete time. If
C
is a generalized statespace model (genss
)
then wcdiskmargin
uses the current value of the tunable control
design blocks in C
.
If C
is a frequencyresponse data model (such as
frd
), then wcdiskmargin
computes the margins
at each frequency represented in the model. The function returns the worstcase margins
at the frequency with the smallest disk margin.
sigma
— SkewSkew of uncertainty region used to compute the stability margins, specified as a real scalar value. This parameter biases the uncertainty used to model gain and phase variations toward gain increase or gain decrease.
The default sigma
= 0 uses a balanced model of gain
variation in a range [gmin,gmax]
, with gmin =
1/gmax
.
Positive sigma
uses a model with more gain increase than
decrease (gmin > 1/gmax
).
Negative sigma
uses a model with more gain decrease than
increase (gmin < 1/gmax
).
Use the default sigma
= 0 to get unbiased estimates of gain and
phase margins. You can test relative sensitivity to gain increase and decrease by
comparing the margins obtained with both positive and negative
sigma
values. For more detailed information about how the choice
of sigma
affects the margin computation, see Stability Analysis Using Disk Margins.
opts
— Options for margin computationwcOptions
objectOptions for worstcase computation, specified as an object you create with
wcOptions
. The available options include settings that let
you:
Extract frequencydependent worstcase margins.
Examine the sensitivity of the worstcase margins to each uncertain element.
Improve the results of the worstcase margin calculation by setting certain
options for the underlying mussv
calculation.
For more information about all available options, see wcOptions
.
Example: wcOptions('Sensitivity','on','MussvOptions','m3')
wcDM
— Worstcast disk margins for each feedback channelWorstcase disk margins for each feedback channel with all other loops closed,
returned as a structure for SISO feedback loops, or an Nby1
structure array for a MIMO loop with N feedback channels. The fields
of wcDM(i)
are:
Field  Value 

GainMargin  Minimum guaranteed diskbased gain margin of the corresponding feedback
channel, returned as a vector of the form [gmin,gmax] . These
values mean that as long as the openloop gain of the ith
channel changes by a factor no less than gmin and no more
than gmax , the closed loop remains stable for all uncertainty
values within the ranges specified in L . If the openloop
gain can change sign without loss of stability, gmin can be
less than zero for large enough negative sigma . If the
closedloop system goes unstable for some combination of uncertainty values,
then wcDM(i).GainMargin = [1 1] . 
PhaseMargin  Minimum guaranteed diskbased phase margin of the corresponding feedback
channel, returned as a vector of the form [pm,pm] in
degrees. If the closedloop system goes unstable for some combination of
uncertainty values, then wcDM(i).PhaseMargin = [0 0] . 
DiskMargin  Minimum guaranteed disk margin (see Stability Analysis Using Disk Margins for the
definition and interpretation of the disk margin). If the closedloop system is
unstable for some combination of uncertainelement values, then
wcDM(i).DiskMargin = 0 . 
LowerBound  Lower bound on worstcase disk margin. This value is the same as
DiskMargin . 
UpperBound  Upper bound on worstcase disk margin. This value is the disk margin
obtained for the worst perturbation found by wcdiskmargin ,
returned as wcu (i) . The actual
worstcase disk margin is no better than this value. 
CriticalFrequency  Frequency at which the disk margin for the worst perturbation
wcu(i) is weakest, as a function of frequency. This value
is in rad/TimeUnit , where TimeUnit is the
TimeUnit property of L . 
WorstPerturbation  Smallest gain and phase variation that drives the feedback loop
unstable for the worstcase combination of uncertain elements. The
perturbation is returned as a statespace ( This statespace model is a diagonal perturbation of the
form For more information on interpreting
This field is different from the

When L = P*C
is the openloop response of a system comprising a
controller and plant with unit negative feedback in each channel,
wcDM
contains the stability margins for variations at the plant
outputs. To compute the stability margins for variations at the plant inputs, use
L = C*P
. To compute the stability margins for simultaneous,
independent variations at both the plant inputs and outputs, use wcMMIO =
wcdiskmargin(P,C)
.
When L
is a model array, wcDM
has
additional dimensions corresponding to the array dimensions of L
.
For instance, if L
is a 1by3 array of twoinput, twooutput
models, then wcDM
is a 2by3 structure array.
wcDM(j,k)
contains the margins for the
j^{th} feedback channel of the k^{th}
model in the array.
wcu
— Perturbation yielding the weakest marginsPerturbation of uncertain elements yielding the weakest margins, returned as:
A structure array of dimensions Nby1 for loopatatime margins, where N is the number of feedback channels
A scalar structure for multiloop margins
The lower bound returned by wcdiskmargin
is a theoretical
minimum guaranteed worstcase disk margin. The upper bound corresponds to an actual
perturbation in the specified uncertainty range that approaches the lowerbound
prediction. wcu
contains the values of that perturbation. For
example, if the input system includes uncertain elements M
and
delta
, then wcu.M
and
wcu.delta
contain the worst perturbations found by
wcdiskmargin
. It is possible that a worse perturbation exists,
but no perturbation can yield a worse margin than the lower bound returned by
wcdiskmargin
.
Use usubs
to substitute these values for the uncertain elements
in the input system, to obtain the dynamic system that has the worstcase disk
margin.
wcMM
— Worstcase multiloop disk marginsWorstcase multiloop disk margins, returned as a structure. The gain (or phase)
margins quantify how much gain variation (or phase variation) the system can tolerate in
all feedback channels at once while remaining stable. Thus, wcMM
is
a single structure regardless of the number of feedback channels in the system. (For
SISO systems, wcMM
= wcDM
.) The fields of
wcMM
are:
Field  Value 

GainMargin  Minimum guaranteed multiloop diskbased gain margin, returned as a vector
of the form [gmin,gmax] . These values mean that as long as
the gain in all loop channels changes by a factor no less than
gmin and no more than gmax , the closed
loop remains stable for all uncertainty values within the ranges specified in
L . If the closedloop system goes unstable for some
combination of uncertainty values, then wcMM.GainMargin = [1
1] . 
PhaseMargin  Minimum guaranteed multiloop diskbased phase margin, returned as a vector
of the form [pm,pm] in degrees. If the closedloop system
goes unstable for some combination of uncertainty values, then
wcMM.PhaseMargin = [0 0] . 
DiskMargin  Minimum guaranteed disk margin (see Stability Analysis Using Disk Margins for the
definition and interpretation of the disk margin). If the closedloop system is
unstable for some combination of uncertainelement values, then
wcMM.DiskMargin = 0 . 
LowerBound  Lower bound on worstcase disk margin. This value is the same as
DiskMargin . 
UpperBound  Upper bound on worstcase disk margin. This value is the disk margin
obtained for the worst perturbation found by wcdiskmargin ,
returned as wcu . The actual worstcase multiloop disk
margin is no better than this value. 
CriticalFrequency  Frequency at which the disk margin for the worst perturbation
wcu is weakest, as a function of frequency. This value is
in rad/TimeUnit , where TimeUnit is the
TimeUnit property of L . 
WorstPerturbation  Smallest gain and phase variation that drives the feedback loop
unstable for the worstcase combination of uncertain elements. The
perturbation is returned as a statespace ( This statespace model is a diagonal perturbation of the
form For more information on interpreting
This field is different from the

When L = P*C
is the openloop response of a system comprising a
controller and plant with unit negative feedback in each channel,
wcMM
contains the stability margins for variations at the plant
outputs. To compute the stability margins for variations at the plant inputs, use
L = C*P
. To compute the stability margins for simultaneous,
independent variations at both the plant inputs and outputs, use wcMMIO =
wcdiskmargin(P,C)
.
When L
is a model array, wcMM
is a
structure array with one entry for each model in L
.
wcMMIO
— Worstcase disk margins for independent variations in all input and output channelsWorstcase disk margins for independent variations in all input and output channels
of the plant P
, returned as a structure having the same fields as
wcMM
.
For variations applied simultaneously at inputs and outputs, the
WorstPerturbation
field is itself a structure with fields
Input
and Output
. Each of these fields contains
a statespace model such that for Fi(s) =
wcMMIO.WorstPerturbation.Input
and Fo(s) =
wcMMIO.WorstPerturbation.Output
, the system of the following diagram is
marginally unstable, with a pole on the stability boundary at the frequency
wcMMIO.CriticalFrequency
, when P
is evaluated
with the worstcase uncertainty values wcu
.
These statespace models Input
and Output
are
diagonal perturbations of the form F(s) = diag(f1(s),...,fN(s))
. Each
fj(s)
is a realparameter dynamic system that realizes the
worstcase complex gain and phase variation applied to each channel of the feedback
loop.
info
— Additional information about worstcase valuesAdditional information about the worstcase values, returned as a structure with the following fields:
Field  Description 

 Index of the model that has the smallest disk margin, when

 Frequency points at which
The 
 Lower and upper bounds on the actual worstcase disk margin of the
model, returned as an array. 
 Worst perturbations at each frequency point in

 Sensitivity of the worstcase disk margin to each uncertain element,
returned as a structure when the If the

wcdiskmargin
assumes negative feedback. To compute the worstcase
disk margins of a positive feedback system, use wcdiskmargin(L)
or
wcdiskmargin(P,C)
.
You can visualize worstcase disk margins with wcdiskmarginplot
.
wcdiskmargin
models gain (and phase) variation as
umargin
uncertainty, combines it with the specified plant uncertainty,
and uses mussv
to compute the worstcase disk margins and perturbation.
This generalizes the diskmargin
algorithm to feedback loops with
uncertainty. For more information about diskmargin computation and interpretation, see Stability Analysis Using Disk Margins.
Behavior changed in R2020a
The wcdiskmargin
command returns diskbased gain margins in the
GainMargin
field of its output structures wcDM
,
wcMM
, and wcMMIO
. These margins take the form
[gmin,gmax]
, meaning that the openloop gain can be multiplied by any
factor in that range without loss of closedloop stability. Beginning in R2020a, the lower
end of the range gmin
can be negative for some negative values of the
skew sigma
, if the closedloop system remains stable even if the sign
of the openloop gain changes. The skew controls the bias in the diskbased gain margin
toward gain decrease or increase (see Stability Analysis Using Disk Margins). Previously, the
gainmargin range was always positive.
Si dispone di una versione modificata di questo esempio. Desideri aprire questo esempio con le tue modifiche?
Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:
Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi MATLAB.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
Select web siteYou can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.