main content

robust stability, robust performance and mu analysis -凯发k8网页登录

this example shows how to use robust control toolbox™ to analyze and quantify the robustness of feedback control systems. it also provides insight into the connection with mu analysis and the mussv function.

system description

figure 1 shows the block diagram of a closed-loop system. the plant model p is uncertain and the plant output y must be regulated to remain small in the presence of disturbances d and measurement noise n.

figure 1: closed-loop system for robustness analysis

disturbance rejection and noise insensitivity are quantified by the performance objective

(p(1 kp)-1wd,(1 pk)-1wn)

where wd and wn are weighting functions reflecting the frequency content of d and n. here wd is large at low frequencies and wn is large at high frequencies.

wd = makeweight(100,.4,.15);
wn = makeweight(0.5,20,100);
bodemag(wd,'b--',wn,'g--')
title('performance weighting functions')
legend('input disturbance','measurement noise')

figure contains an axes object. the axes object with ylabel magnitude (db) contains 2 objects of type line. these objects represent input disturbance, measurement noise.

creating an uncertain plant model

the uncertain plant model p is a lightly-damped, second-order system with parametric uncertainty in the denominator coefficients and significant frequency-dependent unmodeled dynamics beyond 6 rad/s. the mathematical model looks like:

p(s)=16s2 0.16s k(1 wu(s)δ(s))

the parameter k is assumed to be about 40% uncertain, with a nominal value of 16. the frequency-dependent uncertainty at the plant input is assumed to be about 30% at low frequency, rising to 100% at 10 rad/s, and larger beyond that. construct the uncertain plant model p by creating and combining the uncertain elements:

k = ureal('k',16,'percentage',30);
delta = ultidyn('delta',[1 1],'samplestatedim',4);
wu = makeweight(0.3,10,20);
p = tf(16,[1 0.16 k]) * (1 wu*delta);

designing a controller

we use the controller designed in the example "improving stability while preserving open-loop characteristics". the plant model used there happens to be the nominal value of the uncertain plant model created above. for completeness, we repeat the commands used to generate the controller.

k_pi = pid(1,0.8);
k_rolloff = tf(1,[1/20 1]);
kprop = k_pi*k_rolloff;
[negk,~,gamma] = ncfsyn(p.nominalvalue,-kprop);
k = -negk;

closing the loop

use connect to build an uncertain model of the closed-loop system of figure 1. name the signals coming in and out of each block and let connect do the wiring:

p.u = 'up';  p.y = 'yp';
k.u = 'uk';  k.y = 'yk';
s1 = sumblk('up = yk   d');
s2 = sumblk('uk = -yp - n');
wn.u = 'n'; wn.y = 'n';
wd.u = 'd'; wd.y = 'd';
closedloop = connect(p,k,s1,s2,wn,wd,{'d','n'},'yp');

the variable closedloop is an uncertain system with two inputs and one output. it depends on two uncertain elements: a real parameter k and an uncertain linear, time-invariant dynamic element delta.

closedloop
uncertain continuous-time state-space model with 1 outputs, 2 inputs, 11 states.
the model uncertainty consists of the following blocks:
  delta: uncertain 1x1 lti, peak gain = 1, 1 occurrences
  k: uncertain real, nominal = 16, variability = [-30,30]%, 1 occurrences
type "closedloop.nominalvalue" to see the nominal value and "closedloop.uncertainty" to interact with the uncertain elements.

robust stability analysis

the classical margins from allmargin indicate good stability robustness to unstructured gain/phase variations within the loop.

allmargin(p.nominalvalue*k)
ans = struct with fields:
     gainmargin: [6.2984 10.9082]
    gmfrequency: [1.6108 15.0285]
    phasemargin: [79.9812 -99.6214 63.7590]
    pmfrequency: [0.4467 3.1469 5.2304]
    delaymargin: [3.1253 1.4441 0.2128]
    dmfrequency: [0.4467 3.1469 5.2304]
         stable: 1

does the closed-loop system remain stable for all values of k, delta in the ranges specified above? answering this question requires a more sophisticated analysis using the robstab function.

[stabmarg,wcu] = robstab(closedloop);
stabmarg
stabmarg = struct with fields:
           lowerbound: 1.4668
           upperbound: 1.4697
    criticalfrequency: 5.8933

the variable stabmarg gives upper and lower bounds on the robust stability margin, a measure of how much uncertainty on k, delta the feedback loop can tolerate before becoming unstable. for example, a margin of 0.8 indicates that as little as 80% of the specified uncertainty level can lead to instability. here the margin is about 1.5, which means that the closed loop will remain stable for up to 150% of the specified uncertainty.

the variable wcu contains the combination of k and delta closest to their nominal values that causes instability.

wcu
wcu = struct with fields:
    delta: [1x1 ss]
        k: 23.0548

we can substitute these values into closedloop and verify that these values cause the closed-loop system to be unstable.

format short e
pole(usubs(closedloop,wcu))
ans = 15×1 complex
  -1.2591e 03   0.0000e 00i
  -2.0937e 02   0.0000e 00i
  -2.4785e 01   0.0000e 00i
  -8.2633e 00   1.1488e 01i
  -8.2633e 00 - 1.1488e 01i
  -1.9994e 01   0.0000e 00i
   4.9638e-13   5.8933e 00i
   4.9638e-13 - 5.8933e 00i
  -3.2901e 00   0.0000e 00i
  -1.5907e 00   2.3468e 00i
      ⋮

note that the natural frequency of the unstable closed-loop pole is given by stabmarg.criticalfrequency:

stabmarg.criticalfrequency
ans = 
   5.8933e 00

connection with mu analysis

the structured singular value, or μ, is the mathematical tool used by robstab to compute the robust stability margin. if you are comfortable with structured singular value analysis, you can use the mussv function directly to compute mu as a function of frequency and reproduce the results above. the function mussv is the underlying engine for all robustness analysis commands.

to use mussv, we first extract the (m,delta) decomposition of the uncertain closed-loop model closedloop, where delta is a block-diagonal matrix of (normalized) uncertain elements. the 3rd output argument of lftdata, blkstruct, describes the block-diagonal structure of delta and can be used directly by mussv

[m,delta,blkstruct] = lftdata(closedloop);

for robust stability analysis, only the channels of m associated with the uncertainty channels are used. based on the row/column size of delta, select the proper columns and rows of m. remember that the rows of delta correspond to the columns of m, and vice versa. consequently, the column dimension of delta is used to specify the rows of m:

szdelta = size(delta);
m11 = m(1:szdelta(2),1:szdelta(1));

in its simplest form, mu-analysis is performed on a finite grid of frequencies. pick a vector of logarithmically-spaced frequency points and evaluate the frequency response of m11 over this frequency grid.

omega = logspace(-1,2,50);
m11_g = frd(m11,omega);

compute mu(m11) at these frequencies and plot the resulting lower and upper bounds:

mubnds = mussv(m11_g,blkstruct,'s');
linmagopt = bodeoptions;
linmagopt.phasevisible = 'off'; linmagopt.xlim = [1e-1 1e2]; linmagopt.magunits = 'abs';
bodeplot(mubnds(1,1),mubnds(1,2),linmagopt);
xlabel('frequency (rad/sec)');
ylabel('mu upper/lower bounds');
title('mu plot of robust stability margins (inverted scale)');

figure contains an axes object. the axes object with ylabel magnitude (abs) contains 2 objects of type line. these objects represent untitled1, untitled2.

figure 3: mu plot of robust stability margins (inverted scale)

the robust stability margin is the reciprocal of the structured singular value. therefore upper bounds from mussv become lower bounds on the stability margin. make these conversions and find the destabilizing frequency where the mu upper bound peaks (that is, where the stability margin is smallest):

[pkl,wpeaklow] = getpeakgain(mubnds(1,2));
[pku] = getpeakgain(mubnds(1,1));
smfrommu.lowerbound = 1/pku;
smfrommu.upperbound = 1/pkl;
smfrommu.criticalfrequency = wpeaklow;

compare smfrommu to the bounds stabmarg computed with robstab. the values are in rough agreement with robstab yielding slightly weaker margins. this is because robstab uses a more sophisticated approach than frequency gridding and can accurately compute the peak value of mu across frequency.

stabmarg
stabmarg = struct with fields:
           lowerbound: 1.4668e 00
           upperbound: 1.4697e 00
    criticalfrequency: 5.8933e 00
smfrommu
smfrommu = struct with fields:
           lowerbound: 1.4735e 00
           upperbound: 1.4735e 00
    criticalfrequency: 5.9636e 00

robust performance analysis

for the nominal values of the uncertain elements k and delta, the closed-loop gain is less than 1:

getpeakgain(closedloop.nominalvalue)
ans = 
   9.8137e-01

this says that the controller k meets the disturbance rejection and noise insensitivity goals. but is this nominal performance maintained in the face of the modeled uncertainty? this question is best answered with robgain.

opt = roboptions('display','on');
[perfmarg,wcu] = robgain(closedloop,1,opt);
computing peak...  percent completed: 100/100
the performance level 1 is not robust to the modeled uncertainty.
 -- the gain remains below 1 for up to 38.6% of the modeled uncertainty.
 -- there is a bad perturbation amounting to 38.7% of the modeled uncertainty.
 -- this perturbation causes a gain of 1 at the frequency 0.128 rad/seconds.

the answer is negative: robgain found a perturbation amounting to only 40% of the specified uncertainty that drives the closed-loop gain to 1.

getpeakgain(usubs(closedloop,wcu),1e-6)
ans = 
   1.0000e 00

this suggests that the closed-loop gain will exceed 1 for 100% of the specified uncertainty. this is confirmed by computing the worst-case gain:

wcg = wcgain(closedloop)
wcg = struct with fields:
           lowerbound: 1.5767e 00
           upperbound: 1.5799e 00
    criticalfrequency: 5.9576e 00

the worst-case gain is about 1.6. this analysis shows that while the controller k meets the disturbance rejection and noise insensitivity goals for the nominal plant, it is unable to maintain this level of performance for the specified level of plant uncertainty.

see also

| | |

related examples

    more about

      网站地图