主要内容

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).

WCUnc

Structure of the worst-case uncertainty values associated with the worst-case disk gain and phase margins for the i-th loop L(i,i).

Sensitivity

Struct with M fields. Field names are names of uncertain elements of P and C. Values of fields are positive numbers, which each entry indicating the local sensitivity of the worst-case margins to all the individual uncertain element's uncertainty ranges. For instance, a value of 50 indicates that if the uncertainty range is enlarged by 8%, then the worst-case gain should increase by about 4%. If the Sensitivity property of the wcOptions object is 'off', the values are NaN.

[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

Frequency associated with the worst-case margin (rad/s).

WCUnc

Structure of the worst-case uncertainty values associated with the worst-case disk gain and phase margins for the i-th loop L(i,i).

Sensitivity

Struct with M fields. Field names are names of uncertain elements of P and C. Values of fields are positive numbers, which each entry indicating the local sensitivity of the worst-case margins to all the individual uncertain element's uncertainty ranges. For instance, a value of 50 indicates that if the uncertainty range is enlarged by 8%, then the worst-case gain should increase by about 4%. If the Sensitivity property of the wcOptions object is 'off', the values are NaN.

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'.

Examples

collapse all

This example is designed to illustrate that loop-at-a-time margins (gain, phase, and/or distance to –1) can be inaccurate measures of multivariable robustness margins. Margins of the individual loops can be very sensitive to small perturbations within other loops.

The nominal closed-loop system considered here is shown as follows.

G and K are 2-by-2 multi-input/multi-output (MIMO) systems, defined as

G:=1s2+α2[sα2α(s+1)α(s+1)sα2],K=I2

Set α := 10, construct the nominal model G in state-space form, and compute its frequency response.

a = [0 10;-10 0]; 
b = eye(2); 
c = [1 8;-10 1]; 
d = zeros(2,2); 
G = ss(a,b,c,d); 
K = [1 -2;0 1]; 

The nominal plant was analyzed previously using the command. Based on experimental data, the gain of the first input channel, b(1,1), is found to vary between 0.97 and 1.06. The following statement generates the updated uncertain model.

ingain1 = ureal('ingain1',1,'Range',[0.97 1.06]); 
b = [ingain1 0;0 1]; 
Gunc = ss(a,b,c,d); 

Because of differences between measured data and the plant model an 8% unmodeled dynamic uncertainty is added to the plant outputs.

unmod = ultidyn('unmod',[2 2],'Bound',0.08); 
Gmod = (eye(2)+unmod)*Gunc; 
Gmodg = ufrd(Gmod,logspace(-1,3,60)); 

You can use the command wcmargin to determine the worst-case gain and phase margins in the presences of the uncertainty.

[wcmi,wcmo] = wcmargin(Gmodg,K); 

The worst-case analysis corresponds to maximum allowable disk margin for all possible defined uncertainty ranges. The worst-case single-loop margin analysis performed using wcmargin results in a maximum allowable gain margin variation of 1.31 and phase margin variations of ± 15.6 degs in the second input channel in the presence of the uncertainties 'unmod' and 'ingain1'. wcmi(1)

ans = 
     GainMargin: [0.3613 2.7681] 
    PhaseMargin: [-50.2745 50.2745] 
      Frequency: 0.1000 
     Sensitivity: [1x1 struct] 
wcmi(2) 
ans = 
     GainMargin: [0.7585 1.3185] 
    PhaseMargin: [-15.6426 15.6426] 
      Frequency: 0.1000 
     Sensitivity: [1x1 struct] 

Hence, even though the second channel had infinite gain margin and 90 degrees of phase margin, allowing variation in both uncertainties, 'unmod' and 'ingain1' leads to a dramatic reduction in the gain and phase margin.

You can display the sensitivity of the worst-case margin in the second input channel to 'unmod' and 'ingain1' as follows:

wcmi(2).Sensitivity
ans = 
    ingain1: 12.1865
      unmod: 290.4557

The results indicate that the worst-case margins are not very sensitive to the gain variation in the first input channel, 'ingain1', but very sensitive to the LTI dynamic uncertainty at the output of the plant.

The worst-case single-loop margin at the output results in a maximum allowable gain margin variation of 1.46 and phase margin variation of ± 21.3 degs in the second output channel in the presence of the uncertainties 'unmod' and 'ingain1'.

wcmo(1) 
ans = 
     GainMargin: [0.2521 3.9664] 
    PhaseMargin: [-61.6995 61.6995] 
      Frequency: 0.1000 
     Sensitivity: [1x1 struct] 
wcmo(2) 
ans = 
     GainMargin: [0.6835 1.4632] 
    PhaseMargin: [-21.2984 21.2984] 
      Frequency: 0.1000 
     Sensitivity: [1x1 struct] 

You can display the sensitivity of the worst-case margin in the second output channel to 'unmod' and 'ingain1' as follows:

wcmo(2).Sensitivity
ans = 
    ingain1: 16.3435
      unmod: 392.1320

The results are similar to the worst-case margins at the input. However, the worst-case margins at the second output channel are even more sensitive to the LTI dynamic uncertainty than the input channel margins.

Version History

Introduced before R2006a

collapse all