| Robust Control Toolbox | |
| 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.
This plot shows the maximum frequency-response magnitude at each frequency due to the uncertain elements within the model.
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
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
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.
P = tf(1,[1 0]) + ultidyn('delta',[1 1],'bound',0.4); BW1 = 0.8; K1 = tf(BW1,[1/(25*BW1) 1]); S1 = feedback(1,P*K1); BW2 = 2.0; K2 = tf(BW2,[1/(25*BW2) 1]); S2 = feedback(1,P*K2);
Assess the worst-case gain of the closed-loop sensitivity function.
[maxgain1,wcunc1] = wcgain(S1); [maxgain2,wcunc2] = wcgain(S2); maxgain1 maxgain1 = LowerBound: 1.5070e+000 UpperBound: 1.5080e+000 CriticalFrequency: 5.3096e+000 maxgain2 maxgain2 = LowerBound: 5.1024e+000 UpperBound: 5.1034e+000 CriticalFrequency: 1.0215e+001
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
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
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:
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:
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:
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
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
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
loopmarginComprehensive analysis of feedback loops
mussvCalculate bounds on the Structured Singular Value (µ)
normSystem 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 |
![]() | usubs | wcgopt | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |