Modern Control Engineering

(Chris Devlin) #1
Section 7–2 / Bode Diagrams 425

Frequency (rad/sec)

Bode Diagram of G(s) = 9(s^2 + 0.2s + 1)/[s(s^2 + 1.2s + 9)]

− 100

− 50

0

50

100

− 50

Phase (deg); Magnitude (dB)

0

50

10 −^210 −^1100101102103

Figure 7–23
Bode diagram of


G(s)=


9 As^2 +0.2s+ 1 B
sAs^2 +1.2s+ 9 B

.

MATLAB Program 7–3


num = [9 1.8 9];


den = [1 1.2 9 0];


w = logspace(-2,3,100);


bode(num,den,w)


title('Bode Diagram of G(s) = 9(s^2 + 0.2s + 1)/[s(s^2 + 1.2s + 9)]')


If it is desired to plot the Bode diagram from 0.01 to 1000 radsec, enter the following
command:

w = logspace(-2,3,100)


This command generates 100 points logarithmically equally spaced between 0.01 and 100 radsec.
(Note that such a vector wspecifies the frequencies in radians per second at which the frequency
response will be calculated.)
If we use the command

bode(num,den,w)


then the frequency range is as the user specified, but the magnitude range and phase-angle
range will be automatically determined. See MATLAB Program 7–3 and the resulting plot in
Figure 7–23.
Free download pdf