Robust Control Toolbox™ Previous page   Next Page 
wcgain
 Provide feedback about this page

Calculate bounds on worst-case gain of uncertain system

Syntax

Description

The gain of an uncertain system generally depends on the values of its uncertain elements. Here "gain" refers to the frequency response magnitude. Determining the maximum gain over all allowable values of the uncertain elements is referred to as a worst-case gain analysis. This maximum gain is called the worst-case gain.

The following figure shows the frequency response magnitude of many samples of an uncertain system model.

wcgain can perform two types of analysis on uncertain systems.

The default analysis performed by wcgain is peak-over-frequency. You can control which analysis is performed by using the wcgopt options object. For multi-input, multi-output systems, the gain is the maximum singular value of the frequency response matrix.

As with other uncertain-system analysis tools, only bounds on the worst-case gain are computed. The exact value of the worst-case gain is guaranteed to lie between these upper and lower bounds.

The computation used in wcgain is a frequency-domain calculation. If the input system sys is an uncertain frequency response object (ufrd), then the analysis is performed on the frequency grid within the ufrd. If the input system sys is an uncertain state-space object (uss), then an appropriate frequency grid is generated (automatically), and the analysis performed on that frequency grid. In all descriptions below, N denotes the number of points in the frequency grid.

Basic Syntax

Suppose sys is an ufrd or uss with M uncertain elements. Calculate the worst-case gain of

maxgain is a structure with the following fields

Field
Description
LowerBound
Lower bound on worst-case gain, positive scalar.
UpperBound
Upper bound on worst-case gain, positive scalar. If the nominal value of the uncertain system is unstable, then maxgain.LowerBound and maxgain.UpperBound equal .
CriticalFrequency
The critical value of frequency at which maximum gain occurs (this is associated with maxgain.LowerBound).

maxgainunc is a structure containing values of uncertain elements that maximize the system gain. There are M field names, which are the names of uncertain elements of sys. The value of each field is the corresponding value of the uncertain element, such that when combined lead to the gain value in maxgain.LowerBound. The command

shows the gain.

Example

Create a plant with nominal model of an integrator, and include additive unmodeled dynamics uncertainty of a level of 0.4 (this corresponds to 100% model uncertainty at 2.5 rad/s).

Design a proportional controller K1 that puts the nominal closed-loop bandwidth at 0.8 rad/s. Roll off K1 at a frequency 25 times the nominal closed-loop bandwidth. Repeat the design for a controller K2 that puts the nominal closed-loop bandwidth at 2.0 rad/s. In each case, form the closed-loop sensitivity function.

Assess the worst-case gain of the closed-loop sensitivity function.

The maxgain variables indicate that controller K1 achieves better worst-case performance than K2. Plot Bode magnitude plots of the nominal closed-loop sensitivity functions, as well as the worst instances, using usubs to replace the uncertain element with the worst value returned by wcgain.

Note that although the nominal closed-loop sensitivity resulting from K2 is superior to that with K1, the worst-case behavior is much worse.

Basic Syntax with Third Output Argument

A third output argument yields more specialized information, including sensitivities of the worst-case gain to the uncertain element's ranges and frequency-by-frequency information.

The third output argument info is a structure with the following fields

Field
Description
Sensitivity
A struct with M fields. Field names are names of uncertain elements of sys. Values of fields are positive numbers, each entry indicating the local sensitivity of the worst-case gain in maxgain.LowerBound to all the individual uncertain element's uncertainty ranges. For instance, a value of 25 indicates that if the uncertainty range is enlarged by 8%, then the worst-case gain should increase by about 2%. If the Sensitivity property of the wcgopt object is 'off', the values are NaN.
Frequency
N-by-1 frequency vector associated with analysis.
ArrayIndex
1-by-1 scalar matrix whose value is 1. In more complicated situations (described later) the value of this field is dependent on the input data.

Options (e.g., turning on/off the sensitivity computation, setting the step-size in the sensitivity computation, adjusting the stopping criteria, and controlling behavior across frequency and array dimensions) can be specified using the worst-case gain analysis options wcgopt object. For instance, you can turn the sensitivity calculation off by executing

Advanced Options: Pointwise-in-Frequency Calculations

It is also possible to perform the computation pointwise-in-frequency, determining the worst-case gain at each and every frequency point. To do this, the wcgopt options object must be used.

Because the calculation is pointwise-in-frequency, many results are N-by-1 cell arrays, often containing scalar information relevant to each particular frequency. maxgain is a structure with the following fields

Field
Description
LowerBound
Lower bound on worst-case gain, positive scalar (frd with N frequency points).
UpperBound
Upper bound on worst-case gain, positive scalar. If the nominal value of the uncertain system is unstable, then maxgain.LowerBound and maxgain.UpperBound equal (frd with N frequency points).
CriticalFrequency
Scalar. The critical value of frequency at which maximum gain occurs (this is associated with norm(maxgain.LowerBound,inf)).
:

maxgainunc is a N-by-1 cell array of values of uncertain elements that maximize the system gain. Each entry of the cell array is a struct whose M field names are the names of uncertain elements of sys. The maximum singular value of usubs(sys,maxgainunc{k}) at the kth frequency (in info.Frequency(k)) is equal to maxgain.LowerBound{k}.

info is a structure with the following fields:

Field
Description
Sensitivity
N-by-1 cell. Each entry is a struct corresponding to the sensitivities in the worst-case gain at each individual frequency.
Frequency
N-by-1 frequency vector associated with analysis.
ArrayIndex
N-by-1 cell array. Each value is the 1-by-1 matrix whose numerical value is 1. In more complicated situations (described later) the value of this field is dependent on the input data.

Advanced Options: Handling Array Dimensions

If sys has array dimensions, the default behavior is to maximize over all of these dimensions as well. This can be controlled however, and it is also possible to perform the computation pointwise-in-the-array-dimensions, determining the worst-case gain at each and every grid point. Moreover, any combination of "peak-over" and "pointwise-over" is allowed. To specify the desired computation, you must use wcgopt. For concreteness, suppose that sys is a rxcx7x5x8 uncertain system (i.e., a 7-by-5-by-8 array of uncertain r output, c input systems). In order to perform the worst-case gain calculation pointwise over the 2nd and 3rd array dimensions (the slot with 5 points and the slot with 8 points), set the ArrayDimPtWise property as follows:

In this case, the worst-case gain calculation is performed "pointwise" on the 5-by-8 grid, but only the "peak value" over the first array dimension (the slot with 7 points) is kept track of. For that reason, many of the results are of dimension 1-by-5-by-8.

In general, suppose that the array dimensions of sys are d1x...xdF (7x5x8 in the above example). Furthermore, assume that the ArrayDimPtWise property of the wcgopt object is set to some of the integers between 1 and F. Let e1,e2,...,eF denote the dimensions of the array on which the results are computed. By definition, if j is an integer listed in ArrayDimPtWise, then ej=dj (all grid points in slot j are computed); otherwise, ej=1 (only the maximum in slot j is computed). In the above example, with ArrayDimPtWise set to [2 3], it follows that e1=1,e2=5,e3=8.

Assume FreqPtWise is set to 'off' (you will return to that case later). In this case, the results of

are that maxgain is a structure with the following fields:

Field
Description
LowerBound
1-by-1 frd, with array dimensions e1x...xeF, lower bound on worst-case gain, computed pointwise over all array dimensions listed in ArrayDimPtWise property, and peaked over all others.
UpperBound
Upper bound, analogous to LowerBound
CriticalFrequency
e1x...xeF array with the critical value of the frequency at which maximum gain occurs (this is associated with maxgain.LowerBound).

maxgainunc is a e1x...xeF struct, containing values of uncertain elements that maximize the system gain. There are M field names, which are the names of uncertain elements of sys. The value of each field is the corresponding value of the uncertain element, such that when combined lead to the gain value in maxgain.LowerBound. The command norm(usubs(sys,maxgainunc),'inf') shows the gain, and should be identical to maxgain.LowerBound (to within the tolerance used in norm).

info is a structure with the following fields:

Field
Description
Sensitivity
e1x...xeF struct array. Each entry is the local sensitivity of the worst-case gain in maxgain.LowerBound to all the individual uncertain elements uncertainty ranges.
Frequency
N-by-1 frequency vector associated with analysis.
ArrayIndex
At each value in the e1x...xeF grid, there is a corresponding value in the d1x...xdF grid where the maximum occurs. The variable info.ArrayIndex is an e1x...xeF matrix whose value is the single-index representation of the maximizing location in the d1x...xdF grid.

Advanced Options:

Array Dimension Handling with FreqPtWise Set to'on'

The final case involves array dimensions and pointwise-in-frequency calculations. Again, suppose that the array dimensions of sys are d1x...xdF. Furthermore, assume that the ArrayDimPtWise property of the wcgopt object is set to some of the integers between 1 and F. Let e1,e2,...,eF denote the dimensions of the array on which the results are computed.

Because the calculation is pointwise-in-frequency, many results are N-by-1 cell arrays, often containing e1x...xeF arrays in each cell.

maxgain is a structure with the following fields

Field
Description
LowerBound
N-by-1 cell array, maxgain.LowerBound{k} is a 1-by-1 frd with array dimensions e1x...xeF, and is a lower bound on worst-case gain at frequency info.Frequency(k), computed pointwise over all array dimensions listed in the ArrayDimPtWise property, and "peaked" over all others.
UpperBound
Upper bound on worst-case gain, analogous to maxgain.LowerBound.
CriticalFrequency
e1x...xeF array with the critical value of the frequency at which maximum gain (pointwise over all array dimensions listed in ArrayDimPtWise property, and "peaked" over all others) occurs.

maxgain.CriticalFrequency e1x...xeF array with the critical value of the frequency at which maximum gain (pointwise over all array dimensions listed in the ArrayDimPtWise property, and "peaked" over all others) occurs.

maxgainunc is a N-by-1 cell array, kth entry is a e1x...xeF struct, containing values of uncertain elements that maximize the system gain at frequency info.Frequency(k).

info is a structure with the following fields

Field
Description
Sensitivity
N-by-1 cell. Each entry is the e1x...xeF struct array which holds the local sensitivity of the worst-case gain at one frequency to all of the individual uncertain elements uncertainty ranges.
Frequency
N-by-1 frequency vector associated with analysis.
ArrayIndex
N-by-1 cell array, kth e1x...xeF, at each value in the e1x...xeF grid, there is a corresponding value in the d1x...xdF grid where the maximum occurs. The variable info.ArrayIndex is a e1x...xeF matrix whose value is the single-index representation of the maximizing location in the d1x...xdF grid.
:

Behavior on Not-Uncertain Systems

wcgain can also be used on not-uncertain systems (e.g., ss and frd). If sys is a single ss or frd, then the worst-case gain is simply the gain of the system (identical to norm(sys,'inf')). However, if sys has array dimensions, then the possible combinations of "peak-over" and "pointwise-over" can be used to customize the computation.

Algorithm

The worst-case gain is guaranteed to be at least as large as LowerBound (some value of allowable uncertain elements yield this gain - one instance is returned in the structure maxgainunc. The frequency at which the gain in LowerBound occurs is in CriticalFrequency. Lower bounds for wcgain are computed using a power iteration on ultidyn, ucomplex and ucomplexm uncertain atoms, (holding uncertain real parameters fixed) and a coordinate aligned search on the uncertain real parameters (while holding the complex blocks fixed).

Similarly, the worst-case gain is guaranteed to be no larger than UpperBound. In other words, for all allowable modeled uncertainty, the gain is provably less than or equal to UpperBound. These bounds are derived using the upper bound for the structured singular value, which is essentially optimally-scaled, small-gain theorem analysis. Upper bounds are obtained by solving a semidefinite program. wcgain uses branch and bound on the uncertain real parameters to tighten the lower and upper bounds.

Limitations

Because the calculation is carried out with a frequency grid, it is possible (likely) that the true critical frequency is missing from the frequency vector used in the analysis. This is similar to the problem in robuststab. However, compared with robuststab, the problem in wcgain is less acute. Thought of as a function of problem data and frequency, the worst-case gain is a continuous function (unlike the robust stability margin, which in special cases is not; see "Regularizing Robust Stability calculations with only ureal uncertain elements" in the online documentation). Hence, in worst-case gain calculations, increasing the density of the frequency grid will always increase the accuracy of the answers and in the limit, answers arbitrarily close to the actual answers are obtainable with finite frequency grids.

See Also
loopmargin  Comprehensive analysis of feedback loops

mussv       Calculate bounds on the Structured Singular Value (µ)

norm        System norm of an LTI object

robuststab  Calculates stability margins of uncertain systems

wcgopt      Creates a wcgain options object

wcsens      Calculates worst-case sensitivities for a feedback loop

wcmargin    Calculates worst-case margins for a feedback loop


 Provide feedback about this page 

Previous page usubs wcgopt Next page

 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS