mimo robustness analysis -凯发k8网页登录
you can create and analyze uncertain state-space models made up of uncertain state-space matrices. in this example, create a mimo system with parametric uncertainty and analyze it for robust stability and worst-case performance.
consider a two-input, two-output, two-state system whose model has parametric uncertainty in the state-space matrices. first create an uncertain parameter p
. using the parameter, make uncertain a
and c
matrices. the b
matrix happens to be not-uncertain, although you will add frequency-domain input uncertainty to the model later.
p = ureal('p',10,'percentage',10); a = [0 p;-p 0]; b = eye(2); c = [1 p;-p 1]; h = ss(a,b,c,[0 0;0 0])
uncertain continuous-time state-space model with 2 outputs, 2 inputs, 2 states. the model uncertainty consists of the following blocks: p: uncertain real, nominal = 10, variability = [-10,10]%, 2 occurrences type "h.nominalvalue" to see the nominal value and "h.uncertainty" to interact with the uncertain elements.
you can view the properties of the uncertain system h
using the get
command.
get(h)
nominalvalue: [2x2 ss] uncertainty: [1x1 struct] a: [2x2 umat] b: [2x2 double] c: [2x2 umat] d: [2x2 double] e: [] statename: {2x1 cell} stateunit: {2x1 cell} internaldelay: [0x1 double] inputdelay: [2x1 double] outputdelay: [2x1 double] inputname: {2x1 cell} inputunit: {2x1 cell} inputgroup: [1x1 struct] outputname: {2x1 cell} outputunit: {2x1 cell} outputgroup: [1x1 struct] notes: [0x1 string] userdata: [] name: '' ts: 0 timeunit: 'seconds' samplinggrid: [1x1 struct]
most properties behave in the same way as the corresponding properties of ss
objects. the property nominalvalue
is itself an ss
object.
adding independent input uncertainty to each channel
the model for h
does not include actuator dynamics. said differently, the actuator models are unity-gain for all frequencies.
nevertheless, the behavior of the actuator for channel 1 is modestly uncertain (say 10%) at low frequencies, and the high-frequency behavior beyond 20 rad/s is not accurately modeled. similar statements hold for the actuator in channel 2, with larger modest uncertainty at low frequency (say 20%) but accuracy out to 45 rad/s.
use ultidyn
objects delta1
and delta2
along with shaping filters w1
and w2
to add this form of frequency domain uncertainty to the model.
w1 = makeweight(.1,20,50); w2 = makeweight(.2,45,50); delta1 = ultidyn('delta1',[1 1]); delta2 = ultidyn('delta2',[1 1]); g = h*blkdiag(1 w1*delta1,1 w2*delta2)
uncertain continuous-time state-space model with 2 outputs, 2 inputs, 4 states. the model uncertainty consists of the following blocks: delta1: uncertain 1x1 lti, peak gain = 1, 1 occurrences delta2: uncertain 1x1 lti, peak gain = 1, 1 occurrences p: uncertain real, nominal = 10, variability = [-10,10]%, 2 occurrences type "g.nominalvalue" to see the nominal value and "g.uncertainty" to interact with the uncertain elements.
note that g
is a two-input, two-output uncertain system, with dependence on three uncertain elements, delta1
, delta2
, and p
. it has four states, two from h
and one each from the shaping filters w1
and w2
, which are embedded in g
.
you can plot a 2-second step response of several samples of g
the 10% uncertainty in the natural frequency is apparent.
stepplot(g,2)
you can create a bode plot of samples of g
. the high-frequency uncertainty in the model is also apparent. for clarity, start the bode plot beyond the resonance.
bodeplot(g,{13 100})
closed-loop robustness analysis
load the controller and verify that it is two-input and two-output.
load('mimokexample.mat')
size(k)
state-space model with 2 outputs, 2 inputs, and 9 states.
you can use the command loopsens
to form all the standard plant/controller feedback configurations, including sensitivity and complementary sensitivity at both the input and output. because g
is uncertain, all the closed-loop systems are uncertain as well.
f = loopsens(g,k)
f = struct with fields:
si: [2x2 uss]
ti: [2x2 uss]
li: [2x2 uss]
so: [2x2 uss]
to: [2x2 uss]
lo: [2x2 uss]
psi: [2x2 uss]
cso: [2x2 uss]
poles: [13x1 double]
stable: 1
f
is a structure with many fields. the poles of the nominal closed-loop system are in f.poles
, and f.stable
is 1 if the nominal closed-loop system is stable. in the remaining 10 fields, s
stands for sensitivity, t
or complementary sensitivity, and l
for open-loop gain. the suffixes i
and o
refer to the input and output of the plant. finally, p
and c
refer to the plant and controller.
hence, ti
is mathematically the same as:
lo
is g*k
, and cso
is mathematically the same as
examine the transmission of disturbances at the plant input to the plant output by plotting responses of f.psi
. graph some samples along with the nominal.
bodemag(f.psi.nominalvalue,'r ',f.psi,'b-',{1e-1 100})
nominal stability margins
you can use to investigate loop-at-a-time gain and phase margins, and for loop-at-a-time disk-based margins and simultaneous multivariable margins. margins are computed for the nominal system and do not reflect the uncertainty models within g
.
for instance, explore the disk-based margins for gain or phase variations at the plant outputs and inputs. (for general information about disk-based margin analysis, see .)
[dmo,mmo] = diskmargin(g*k); [dmi,mmi] = diskmargin(k*g);
the loop-at-a-time margins are returned in the structure arrays dmo
and dmi
. each of these arrays contains one entry for each of the two feedback channels. for instance, examine the margins at the plant output for the second feedback channel.
dmo(2)
ans = struct with fields:
gainmargin: [0.0682 14.6726]
phasemargin: [-82.2022 82.2022]
diskmargin: 1.7448
lowerbound: 1.7448
upperbound: 1.7448
frequency: 4.8400
worstperturbation: [2x2 ss]
this result tells you that the gain at the second plant output can vary by factors between about 0.07 and about 14.7, without the second loop going unstable. similarly, the loop can tolerate phase variations at the output up to about ±82°.
the structures mmo
and mmi
contain the margins for concurrent and independent variations in both channels. for instance, examine the multiloop margins at the plant inputs.
mmi
mmi = struct with fields:
gainmargin: [0.1186 8.4289]
phasemargin: [-76.4682 76.4682]
diskmargin: 1.5758
lowerbound: 1.5758
upperbound: 1.5790
frequency: 5.9828
worstperturbation: [2x2 ss]
this result tells you that the gain at the plant input can vary in both channels independently by factors between about 1/8 and 8 without the closed-loop system going unstable. the system can tolerate independent and concurrent phase variations up about ±76°. because the multiloop margins take loop interactions into account, they tend to be smaller than loop-at-a-time margins.
examine the multiloop margins at the plant outputs.
mmo
mmo = struct with fields:
gainmargin: [0.1201 8.3280]
phasemargin: [-76.3058 76.3058]
diskmargin: 1.5712
lowerbound: 1.5712
upperbound: 1.5744
frequency: 17.4276
worstperturbation: [2x2 ss]
the margins at the plant outputs are similar to those at the inputs. this result is not always true in multiloop feedback systems.
finally, examine the margins against simultaneous variations at the plant inputs and outputs.
mmio = diskmargin(g,k)
mmio = struct with fields:
gainmargin: [0.5676 1.7619]
phasemargin: [-30.8440 30.8440]
diskmargin: 0.5517
lowerbound: 0.5517
upperbound: 0.5528
frequency: 9.0688
worstperturbation: [1x1 struct]
when you consider all such variations simultaneously, the margins are somewhat smaller than those at the inputs or outputs alone. nevertheless, these numbers indicate a generally robust closed-loop system. the system can tolerate significant simultaneous gain variations or ±30° degree simultaneous phase variations in all input and output channels of the plant.
robust stability margin
with diskmargin
, you determine various stability margins of the nominal multiloop system. these margins are computed only for the nominal system and do not reflect the uncertainty explicitly modeled by the ureal
and ultidyn
objects. when you work with a detailed uncertainty model, the stability margins computed by diskmargin
may not accurately reflect how close the system is from being unstable. you can then use robstab
to compute the robust stability margin for the specified uncertainty.
in this example, use robstab
to compute the robust stability margin for the uncertain feedback loop comprised of g
and k
. you can use any of the closed-loop transfer functions in f = loopsens(g,k)
. all of them, f.si, f.to
, etc., have the same internal dynamics, and hence their stability properties are the same.
opt = roboptions('display','on'); stabmarg = robstab(f.so,opt)
computing peak... percent completed: 100/100 system is robustly stable for the modeled uncertainty. -- it can tolerate up to 221% of the modeled uncertainty. -- there is a destabilizing perturbation amounting to 222% of the modeled uncertainty. -- this perturbation causes an instability at the frequency 13.6 rad/seconds.
stabmarg = struct with fields:
lowerbound: 2.2129
upperbound: 2.2173
criticalfrequency: 13.6331
this analysis confirms what the diskmargin
analysis suggested. the closed-loop system is quite robust, in terms of stability, to the variations modeled by the uncertain parameters delta1
, delta2
, and p
. in fact, the system can tolerate more than twice the modeled uncertainty without losing closed-loop stability.
worst-case gain analysis
you can plot the bode magnitude of the nominal output sensitivity function. it clearly shows decent disturbance rejection in all channels at low frequency.
bodemag(f.so.nominalvalue,{1e-1 100})
you can compute the peak value of the maximum singular value of the frequency response matrix using norm
.
[peaknom,freq] = getpeakgain(f.so.nominalvalue)
peaknom = 1.1317
freq = 7.1300
the peak is about 1.13. what is the maximum output sensitivity gain that is achieved when the uncertain elements delta1
, delta2
, and p
vary over their ranges? you can use wcgain
to answer this.
[maxgain,wcu] = wcgain(f.so); maxgain
maxgain = struct with fields:
lowerbound: 2.1599
upperbound: 2.1643
criticalfrequency: 8.3357
the analysis indicates that the worst-case gain is somewhere between 2.1 and 2.2. the frequency where the peak is achieved is about 8.5.
use usubs
to replace the values for delta1
, delta2
, and p
that achieve the gain of 2.1. make the substitution in the output complementary sensitivity, and do a step response.
step(f.to.nominalvalue,usubs(f.to,wcu),5)
the perturbed response, which is the worst combination of uncertain values in terms of output sensitivity amplification, does not show significant degradation of the command response. the settling time is increased by about 50%, from 2 to 4, and the off-diagonal coupling is increased by about a factor of about 2, but is still quite small.
you can also examine the worst-case frequency response alongside the nominal and sampled systems using wcsigmaplot
.
wcsigmaplot(f.to,{1e-1,100})
see also
| | | | | |