Section 7–7 / Relative Stability Analysis 469G(s)20(s+ 1)
s(s+ 5)(s^2 + 2 s+ 10)+–Figure 7–71
Closed-loop system.
Frequency (rad/sec)Bode Diagram− 300− 100
− 150
− 200
− 2500
− 50− 100Phase (deg); Magnitude (dB)50− 50010 −^1 0.4426 100 4.0131 101 1029.9293 dB103.6573Figure 7–72
Bode diagram of
G(s)shown in
Figure 7–71.
MATLAB Program 7–11
num = [20 20];
den = conv([1 5 0],[1 2 10]);
sys = tf(num,den);
w = logspace(-1,2,100);
bode(sys,w)
[Gm,pm,wcp,wcg] = margin(sys);
GmdB = 20*log10(Gm);
[GmdB pm wcp wcg]
ans =
9.9293 103.6573 4.0131 0.4426
whereGmis the gain margin,pmis the phase margin,wcpis the phase-crossover fre-
quency, and wcgis the gain-crossover frequency. For details of how to use this com-
mand, see Example 7–21.
EXAMPLE 7–21 Draw a Bode diagram of the open-loop transfer function G(s)of the closed-loop system shown
in Figure 7–71. Determine the gain margin, phase margin, phase-crossover frequency, and gain-
crossover frequency with MATLAB.
A MATLAB program to plot a Bode diagram and to obtain the gain margin, phase margin,
phase-crossover frequency, and gain-crossover frequency is shown in MATLAB Program 7–11.
The Bode diagram of G(s)is shown in Figure 7–72.