wcmargin
(Not recommended) Worst-case disk stability margins of uncertain feedback loops
wcmargin is not recommended. Use wcdiskmargin
instead. For more information, see Version History.
Syntax
wcmarg = wcmargin(L) wcmargi = wcmargin(p,c) [wcmargi,wcmargo] = wcmargin(p,c) wcmargi = wcmargin(p,c,opt) [wcmargi,wcmargo] = wcmargin(p,c,opt)
Description
Classical gain and phase margins define the allowable loop-at-a-time variations in the nominal system gain and phase for which the feedback loop retains stability.
An alternative to classical gain and phase margins is the disk margin. The disk margin is the largest region for each channel such that for all gain and phase variations inside the region the nominal closed-loop system is stable. See Stability Analysis Using Disk Margins to learn more about the algorithm.
Consider a system with uncertain elements. It is of interest to determine the margin of
each individual channel in the presence of uncertainty. These margins are called worst-case
margins. Worst-case margin, wcmargin calculates the largest disk margin
such that for values of the uncertainty and all gain and phase variations inside the disk, the
closed-loop system is stable. The worst-case gain and phase margin bounds are defined based on
the balanced sensitivity function. Hence, results from the worst-case margin calculation imply
that the closed-loop system is stable for a given uncertainty set and would remain stable in
the presence of an additional gain and phase margin variation in the specified input/output
channel.
wcmargL = wcmargin(L) calculates the combined
worst-case input and output loop-at-a-time gain/phase margins of the feedback loop consisting
of the loop transfer matrix L in negative feedback with an identity
matrix. L must be an uncertain system, uss or
ufrd object. If L is a uss object,
the frequency range and number of points used to calculate wcmargL are
chosen automatically. Note that in this case, the worst-case margins at the input and output
are equal because an identity matrix is used in feedback. wcmarg is a
NU-by-1 structure with the following fields:
Field | Description |
|---|---|
GainMargin | Guaranteed bound on worst-case, single-loop gain margin at plant inputs. Loop-at-a-time analysis. |
PhaseMargin | Loop-at-a-time worst-case phase margin at plant inputs. Units are degrees. |
Frequency | Frequency associated with the worst-case margin (rad/s). |
| Structure of the worst-case uncertainty values associated with the
worst-case disk gain and phase margins for the |
|
|
[wcmargi,wcmargo] = wcmargin(P,C) calculates the
combined worst-case input and output loop-at-a-time gain/phase margins of the feedback loop
consisting of C in negative feedback with P. C should
only be the compensator in the feedback path, without reference channels, if it is a 2-Dof
architecture. That is, if the closed-loop system has a 2-Dof architecture the reference
channel of the controller should be eliminated resulting in a 1-Dof architecture as shown in
the following figure. Either P or C must be an uncertain
system, uss or ufrd, or an uncertain matrix,
umat. If P and C are
ss/tf/zpk or uss objects, the frequency range and
number of points used to calculate wcmargi and wcmargo
are chosen automatically.

Basic Syntax
[wcmargi,wcmargo] = wcmargin(L) [wcmargi,wcmargo] = wcmargin(P,C)
wcmargi and wcmargo are structures corresponding
to the loop-at-a-time worst-case, single-loop gain and phase margin of the channel. For the
single-loop transfer matrix L of size
N-by-N, wcmargi is a
N-by-1 structure. For the case with two input arguments, the plant
model P will have NY outputs
and NU inputs and hence the controller
C must have NU outputs and
NY inputs. wcmargi is a
NU-by-1 structure with the following fields:
Field | Description |
|---|---|
GainMargin | Guaranteed bound on worst-case, single-loop gain margin at plant inputs. Loop-at-a-time analysis. |
PhaseMargin | Loop-at-a-time worst-case phase margin at plant inputs. Units are degrees. |
| Frequency associated with the worst-case margin (rad/s). |
| Structure of the worst-case uncertainty values associated with the
worst-case disk gain and phase margins for the |
|
|
wcmargo is an N-by-1 structure for the single loop
transfer matrix input and wcmargo is an
NY-by-1 structure when the plant and
controller are input. In both these cases, wcmargo has the same fields as
wcmargi. The worst-case bound on the gain and phase margins are
calculated based on a balanced sensitivity function.
[wcmargi,wcmargo] = wcmargin(L,opt) and
[wcmargi,wcmargo] = wcmargin(p,c,opt) specify
options described in opt. (See wcOptions for more details on the options for
wcmargin.)
The sensitivity of the worst-case margin calculations to the individual uncertain
elements is selected using the options object opt. To compute
sensitivities, create a wcOptions options object, and set the
Sensitivity property to 'on'.
