diskmargin

Disk-based stability margins of feedback loops

Syntax

[DM,MM] = diskmargin(L)
MMIO = diskmargin(P,C)
___ = diskmargin(___,E)

Description

example

[DM,MM] = diskmargin(L) computes the disk-based stability margins for the SISO or MIMO negative feedback loop feedback(L,eye(N)), where N is the number of inputs and outputs in L.

The diskmargin command returns loop-at-a-time stability margins in DM and multiloop margins in MM. Disk-based margin analysis provides a stronger guarantee of stability than the classical gain and phase margins. For general information about disk margins, see Stability Analysis Using Disk Margins.

example

MMIO = diskmargin(P,C) computes the stability margins when considering independent, concurrent variations at both the plant inputs and plant outputs the negative feedback loop of the following diagram.

example

___ = diskmargin(___,E) specifies an additional eccentricity parameter that varies the shape of the uncertainty region used to compute the stability margins. You can use the eccentricity argument with any of the previous syntaxes.

Examples

collapse all

Use diskmargin to compute loop-at-a-time and multiloop disk margins. This example illustrates that loop-at-a-time 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 closed-loop system of the following illustration.

P and C are 2-by-2 (MIMO) systems. Construct P in state-space form, and compute the disk-based margins at the plant output.

a = [0 10;-10 0]; 
b = eye(2); 
c = [1 8;-10 1]; 
d = zeros(2,2); 
P = ss(a,b,c,d); 
C = [1 -2;0 1]; 
L = P*C;
[DM,MM] = diskmargin(L);

Examine the loop-at-a-time disk margins, returned in the structure array DM. Each entry in this structure array contains the stability margins of the corresponding channel.

DM(1)
ans = struct with fields:
     GainMargin: [0 Inf]
    PhaseMargin: [-90 90]
     DiskMargin: 2
     LowerBound: 2
     UpperBound: 2
      Frequency: Inf

DM(2)
ans = struct with fields:
     GainMargin: [0 Inf]
    PhaseMargin: [-90 90]
     DiskMargin: 2
     LowerBound: 2
     UpperBound: 2
      Frequency: Inf

For each channel, the closed-loop system remains stable for any variation in gain or phase.

Here, gain and phase variations are a model of uncertainty in the plant. In practice, plant uncertainty affects both channels simultaneously. To estimate the stability margins with respect to such independent and concurrent uncertainty, examine the multiloop disk margins.

MM
MM = struct with fields:
     GainMargin: [0.6071 1.6472]
    PhaseMargin: [-27.4762 27.4762]
     DiskMargin: 0.4890
     LowerBound: 0.4890
     UpperBound: 0.4899
      Frequency: 0.2250

The result is a more stringent limit on tolerable variations (and thus tolerable uncertainty) than the loop-at-a-time margins. MM.GainMargin shows that if the loop gains in both channels are multiplied independently by values between about 0.6 and about 1.6, the closed-loop system is guaranteed to remain stable. Similarly, stability is preserved against independent phase variations in each channel of about ±27.5°. The frequency at which these smallest margins occur is at 22.5 rad/s.

It can be useful to compute margins at the plant inputs separately from those at the plant outputs, because there is typically uncertainty in both the actuators (inputs) and sensors (outputs). Using L = P*C computes margins at the outputs. Use L = C*P to compute margins at the inputs.

[DMI,MMI] = diskmargin(C*P);
DMI(1)
ans = struct with fields:
     GainMargin: [0 Inf]
    PhaseMargin: [-90 90]
     DiskMargin: 2
     LowerBound: 2
     UpperBound: 2
      Frequency: 0

DMI(2)
ans = struct with fields:
     GainMargin: [0.4750 2.1053]
    PhaseMargin: [-39.1846 39.1846]
     DiskMargin: 0.7119
     LowerBound: 0.7119
     UpperBound: 0.7119
      Frequency: 0

At the outputs, both feedback channels were stable against any variation. Here at the inputs, however, the second channel is guaranteed stable only for a limited range of variations. The multiloop margin at the plant input yields a more stringent estimate of the tolerance of the closed-loop system to variations at the input to the plant.

MMI
MMI = struct with fields:
     GainMargin: [0.7288 1.3721]
    PhaseMargin: [-17.8304 17.8304]
     DiskMargin: 0.3137
     LowerBound: 0.3137
     UpperBound: 0.3144
      Frequency: 0

Finally, compute the multiloop margin against simultaneous variations in gain (or phase) at both the plant inputs and plant outputs. This multiloop margin provides the most conservative guarantee of closed-loop stability.

MMIO = diskmargin(P,C)
MMIO = struct with fields:
     GainMargin: [0.8270 1.2092]
    PhaseMargin: [-10.8190 10.8190]
     DiskMargin: 0.1894
     LowerBound: 0.1894
     UpperBound: 0.1898
      Frequency: 0

This result shows that for independent and concurrent variations in both channels and at inputs and outputs, stability is guaranteed for changes in loop gain of a factor between about 0.83 and 1.2. Likewise, loop phase can vary only by about ±10.8°. The frequency at which the smallest margins occur is DC.

diskmargin bases its computation on a shifted sensitivity function S+(E-1)I/2, where S=(I+L)-1 is the sensitivity function and E is the eccentricity parameter. By default, E = 0, which corresponds to the balanced sensitivity function S-I/2=(S-T)/2, where T=I-S is the complementary sensitivity function. Setting E = 1 computes disk margins based on S, while E = -1 computes the disk margins based on T. You can try different values of E and combine the results to obtain less conservative stability margins than you get from the balanced sensitivity function alone.

Compute margins based on the complementary sensitivity, balanced sensitivity, and sensitivity functions for the system with open-loop transfer function given by

L=25s3+10s2+10s+10.

L = tf(25,[1 10 10 10]);
DMt = diskmargin(L,-1);
DMb = diskmargin(L); 
DMs = diskmargin(L,1);

Compare the resulting gain margins.

DMt.GainMargin
ans = 1×2

    0.5136    1.4864

DMb.GainMargin
ans = 1×2

    0.6273    1.5942

DMs.GainMargin
ans = 1×2

    0.7132    1.6726

The different E values give different ranges for the estimated gain margins. Each of these is a different estimate for the true gain margins, and each guarantees stability for gain variations within its range. Therefore, the closed-loop system is guaranteed to remain stable for all variations in the union of all three ranges, or variations in the open-loop gain of a factor between about 0.51 and about 1.67.

For some systems, larger positive or negative E values can yield an even larger range of guaranteed stability.

DMnegE = diskmargin(L,-100);
DMposE = diskmargin(L,100); 
DMnegE.GainMargin
ans = 1×2

    0.0761    1.0100

DMposE.GainMargin
ans = 1×2

    0.9902    1.9109

These values extend the range such that stability is guaranteed for gain variations of a factor between about 0.08 and about 1.91.

For more information about the variation of gain margin estimates with E, see Stability Analysis Using Disk Margins.

Input Arguments

collapse all

Open-loop response, specified as a dynamic system model. L can be SISO or MIMO, as long as it has the same number of inputs and outputs. diskmargin computes the disk-based stability margins for the negative-feedback closed-loop system feedback(L,eye(N)).

To compute the disk margins of the positive feedback system feedback(L,eye(N),+1), use diskmargin(-L).

When you have a controller P and a plant C, you can compute the 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.

L can be continuous time or discrete time. If L is a generalized state-space model (genss or uss) then diskmargin uses the current or nominal value of all control design blocks in L.

If L is a frequency-response data model (such as frd), then diskmargin computes the margins at each frequency represented in the model. The function returns the margins at the frequency with the smallest disk margin.

If L is a model array, then diskmargin computes margins for each model in the array.

Plant, specified as a dynamic system model. P can be SISO or MIMO, as long as P*C has the same number of inputs and outputs. diskmargin computes the disk-based stability margins for a negative-feedback closed-loop system. To compute the disk margins of the system with positive feedback, use diskmargin(P,-C).

P can be continuous time or discrete time. If P is a generalized state-space model (genss or uss) then diskmargin uses the current or nominal value of all control design blocks in P.

If P is a frequency-response data model (such as frd), then diskmargin computes the margins at each frequency represented in the model. The function returns the margins at the frequency with the smallest disk margin.

Controller, 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. diskmargin computes the disk-based stability margins for a negative-feedback closed-loop system. To compute the disk margins of the system with positive feedback, use diskmargin(P,-C).

C can be continuous time or discrete time. If C is a generalized state-space model (genss or uss) then diskmargin uses the current or nominal value of all control design blocks in C.

If C is a frequency-response data model (such as frd), then diskmargin computes the margins at each frequency represented in the model. The function returns the margins at the frequency with the smallest disk margin.

Eccentricity of uncertainty region used to compute the stability margins, specified as a real scalar value. Use this parameter to vary the shape of the uncertainty region used to model gain and phase variations. Varying the eccentricity parameter yields lower estimates of the true stability margins, letting you infer a larger region of guaranteed stability than that obtained using the default E = 0. Some special values of E include:

  • 0 — Margins based on balanced sensitivity function

  • 1 — Margins based on sensitivity function

  • –1 — Margins based on complementary sensitivity function

For an example, see Disk Margins Based on Sensitivity and Complementary Sensitivity. For more detailed information about how the choice of E affects the margin computation, see Stability Analysis Using Disk Margins.

Output Arguments

collapse all

Disk margins for each feedback channel with all other loops closed, returned as a structure for SISO feedback loops, or an N-by-1 structure array for a MIMO loop with N feedback channels. The fields of DM(i) are:

  • GainMargin — Disk-based gain margin of the corresponding feedback channel, returned as a vector of the form [gmin,gmax]. These values express in absolute units the amount by which the loop gain in that channel can decrease or increase while preserving stability. For example, if DM(i).GainMargin = [0.8,1.25] then the gain of the ith loop can be multiplied by any factor between 0.8 and 1.25 without causing instability. When E = 0, gmin = 1/gmax. If the closed-loop system is unstable, then DM(i).GainMargin = [1 1].

  • PhaseMargin — Disk-based phase margin of the corresponding feedback channel, returned as a vector of the form [-pm,pm] in degrees. These values express the amount by which the loop phase in that channel can decrease or increase while preserving stability. If the closed-loop system is unstable, then DM(i).PhaseMargin = [0 0].

  • DiskMargin — Maximum |Δ| compatible with closed-loop stability for the corresponding feedback channel. Δ parameterizes the uncertainty in the loop response (see Algorithms). If the closed-loop system is unstable, then DM(i).DiskMargin = 0.

  • LowerBound — Lower bound on disk margin. This value is the same as DiskMargin.

  • UpperBound — Upper bound on disk margin. This value represents an upper limit on the actual disk margin of the system. In other words, the disk margin is guaranteed to be no worse than LowerBound and no better than UpperBound.

  • Frequency — Frequency at which the weakest margin occurs for the corresponding loop channel. This value is in rad/TimeUnit, where TimeUnit is the TimeUnit property of L.

When L = P*C is the open-loop response of a system comprising a controller and plant with unit negative feedback in each channel, DM 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 MMIO = diskmargin(P,C).

When L is a model array, DM has additional dimensions corresponding to the array dimensions of L. For instance, if L is a 1-by-3 array of two-input, two-output models, then DM is a 2-by-3 structure array. DM(j,k) contains the margins for the jth feedback channel of the kth model in the array.

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, MM is a single structure regardless of the number of feedback channels in the system. (For SISO systems, MM = DM.) The fields of MM are:

  • GainMargin — Multiloop gain margin, returned as a vector of the form [gmin,gmax]. These values express in absolute units the amount by which the loop gain can vary in all channels independently and concurrently while preserving stability. For example, if MM.GainMargin = [0.8,1.25] then the gain of all loops can be multiplied by any factor between 0.8 and 1.25 without causing instability. When E = 0, gmin = 1/gmax.

  • PhaseMargin — Multiloop phase margin, returned as a vector of the form [-pm,pm] in degrees. These values express the amount by which the loop phase can vary in all channels independently and concurrently while preserving stability.

  • DiskMargin — Maximum |Δ| compatible with closed-loop stability. Δ parameterizes the uncertainty in the loop response (see Algorithms).

  • LowerBound — Lower bound on disk margin. This value is the same as DiskMargin.

  • UpperBound — Upper bound on disk margin. This value represents an upper limit on the actual disk margin of the system. In other words, the disk margin is guaranteed to be no worse than LowerBound and no better than UpperBound.

  • Frequency — Frequency at which the weakest margin occurs. This value is in rad/TimeUnit, where TimeUnit is the TimeUnit property of L.

When L = P*C is the open-loop response of a system comprising a controller and plant with unit negative feedback in each channel, MM 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 MMIO = diskmargin(P,C).

When L is a model array, MM is a structure array with one entry for each model in L.

Disk margins for independent variations in all input and output channels of the plant P, returned as a structure having the same fields as MM.

Tips

  • diskmargin assumes negative feedback. To compute the disk margins of a positive feedback system, use diskmargin(-L) or diskmargin(P,-C).

  • To compute disk margins for a system modeled in Simulink®, first linearize the model to obtain the open-loop response at a particular operating point. Then, use diskmargin to compute stability margins for the linearized system. For more information, see Stability Margins of a Simulink Model.

  • To compute classical gain and phase margins, use allmargin.

Algorithms

For SISO L, the uncertainty model for disk-margin analysis incorporates a multiplicative complex uncertainty Δ into the loop transfer function as follows:

LLΔ=L1+Δ(1E)/21Δ(1+E)/2=L(1+δL),|Δ|<α.

For Δ = 0, the multiplicative factor is 1, corresponding to the nominal L. As Δ varies in the ball |Δ| < α, the gain and phase of the multiplicative factor are a model for gain and phase variation in L. The eccentricity parameter E varies the shape of the applied uncertainty in the complex plane. The disk margin is the smallest radius α at which the closed-loop system becomes unstable[1]. From the disk margin α, diskmargin derives the minimum gain and phase margins.

For MIMO systems, diskmargin applies an analogous uncertainty model that allows the uncertainty to vary independently in each channel.

For further details about the computation and interpretation of disk margins, see Stability Analysis Using Disk Margins.

References

[1] Blight, J.D., R.L. Dailey, and D. Gangsaas. "Practical Control Law Design for Aircraft Using Multivariable Techniques." International Journal of Control. Vol. 59, Number 1, 1994, pp. 93–137.

Introduced in R2018b