Lecture 5.2-Bode Plot
Lecture 5.2-Bode Plot
• Learning Objectives
• to understand how the magnitude and phase points are calculated from a transfer function
representation
• to be able to enter appropriate data in order to produce a computer-based Bode plot
• to divide the frequency range into low, middle and high frequency ranges.
• to find out the basic components that make up any simple transfer function
• to be able to sketch a Bode plot of a simple transfer function
• to be able to sketch a Bode plot of a cascaded system
• to understand how adding simple components changes the shape of the Bode plot
The Bode plot
0.5
G(jω)=
jω +0.5
Simplify
0.5 (0.5 - jω) 0.52 0.5 ω
G(jω)= 2 2 = 2 2 - j
(ω +0.5 ) (ω +0.5 ) (ω2 +0.52)
Calculate the gain and phase
0.5
| G(jω)| = Real2 + Imag2 = ,
ω2 +0.52
∠ G(jω) = tan-1 (Imag/Real)= tan-1 (-ω/0.5)
6 6
enter G(s) = (= 2 )
(4s+1)(s+1) 4s + 5s+1
s=tf(‘s’);
g=6/(4*s^2+5*s+1)
simply use
bode(g)
bode(g,{wmin,wmax})
bode(g,{0.1,10})
[mag,phase,w] = bode(g)
rltool
What are low, middle and high frequencies?
20 s(3s + 1) 1 1
G1( s ) = 20, , 3s+1, 2
(10 s + 1)(s 2 + 0.2 s + 1) 10s+1 s +0.2s+1
6( s 2 + 10 s + 100) 1 1
G2 ( s ) = 600, , ,(0.01s2 + 0.1s +1)
s 2 (50 s 2 + 15s + 1) 10s +1 5s + 1
Magnitude and phase of transfer function components
Logarithm rules
Multiplication of a and b: log ab = log a + log b
Division of a and b: log a/b = log a – log b
Powers of a: log ab = b log a
Not that the magnitude on a Bode plot is written in terms of 20log10 |G(jω)|.
Since we are effectively multiplying the terms together in the transfer function, it turns
out that we will be adding them as logarithmic values.
Magnitude of sp -term
Let G(jω) = (jω)p.
| G(jω)|dB = 20log10ωp = p * 20log10(ω)
∠G(j(jω)p = p*90o
Introducing a Sketching Table
Draw the Bode plot for the following transfer function
6
G(s) =
s
1
Solution terms are: 6,
s
The following table shows the magnitude and magnitude(dB) calculations for G1(s)
TF 1
G1(s) =
τs + 1
s = jω 1
G1(jω) =
jωτ + 1
Gain G(jω) 1 1
|G1(jω)| = =
|jτ ω +1| τ 2ω 2 + 1
Gain in dB |G1(jω)|dB = 20 log10 (τ2ω2+1)-0.5
Phase ∠G1(jω) = ∠ (1/(1 + jτ ω))
= - tan-1 (τω)
Low frequency and high frequency asymptotes.
Bode Diagrams
Gain in dB |G1(jω)|dB = 20 log10 (τ 2ω 2+1)-0.5
LF ω≈0 |G1(jω)|dB →20log10(1) = 0dB 20
10
Low Freq.
Asymptote
horizontal line at 0dB 0 High Freq.
= -3dB -30
-40
! =1/!
point (1/τ,−3dB) 0
-10
–20dB/decade -100
10
-1 0
10
1
10 10
2
We make two remarks about the phase table. Firstly, we note again that the constant gain K
has no effect on the phase at all and secondly, that we consider ‘low frequency’ to be a
decade below the (lowest) corner frequency and ‘high frequency’ to be a decade above the
(highest) corner frequency.
We can then sketch the Bode plot using the information in the Tables.
Figure 0.1 shows the low and high frequency asymptotes as well as the magnitude and phase
at the corner frequency. We have used MATLAB to plot the Bode plot in dashed lines to
illustrate how good the Sketching approximation is. (In MATLAB we used the command :
bode(g,{0.01,10}).
Bode Diagrams
30
X
20
low freq. asympt. high freq. asympt.
Phase (deg); Magnitude (dB)
-20 dB/dec
10
0 23.02dB
ωc = 0.25 rad/s
-10
0
-10
-20
-30
low freq. ~ 0o -45o
-40
X
-50
-60
high freq. ~ –90o
-70
-80
-90
-100
-2 -1 0 1
10 10 10 10
Frequency (rad/sec)
Figure 0.1 Bode plot of 20/(4s+1).
Example 2 : Finding a simple transfer function from a Bode plot
Just as we have used a transfer function description to sketch a Bode plot, we can use a Bode
plot to help us find out the system transfer function. This is particularly useful when we have
some experimental results from a process that we have taken by injecting sinusoids at
different frequencies, and we wish to find a transfer function for the system.
Problem
An engineer tries to find the time constant of an RC network by applying unit
magnitude sine waves of different frequencies and zero phase at the input of the RC circuit.
The engineer measures the magnitude and phase of the output voltage, y(t), across the
capacitor and sets up the table shown below:
τ =1/0.2=5.0 seconds.
The transfer function of the RC circuit is therefore
1
G(s) =
5s+1
Example 3: Combination of s-term and first order lag
Problem
Sketch the Bode plot for the following transfer function.
10
G(s) =
s(s + 3)
Solution
To list the components, we need the transfer function in ‘unity-constant- coefficient form’.
We can rewrite the transfer function by dividing the numerator and denominator by 3.
3.33
G(s) =
s(0.33s +1)
The components are now:
1 1
3.33, ,
s 0.33s + 1
The corner frequency of the first order lag is ωc = 3 rad/s. We can now complete the
sketching table.
We can then sketch the Bode plot using the information in the tables. Once again we can use
MATLAB to check how close our sketching approximation is to the actual frequency
response plot. We have used MATLAB to plot the Bode plot using the command
bode(g,{0.1,100}), Figure 0.3.
Bode Diagrams
40
20
0 high freq. asympt.
Phase (deg); Magnitude (dB)
-80
Phase at ωc = -135o
-100
-180
-1 0 1 2
10 10 10 10
Frequency (rad/sec)
10
Figure 0.3 Bode plot of G(s) =
s(s + 3)
The Bode plot is shown in Figure 0.4. We notice the high frequency asymptote in the
magnitude plot is –40 dB/decade consistent with our 2nd order system. Likewise, the phase
decreases to –180o.
Bode Diagrams
20 -20 dB/dec.
0
Phase (deg); Magnitude (dB)
-20
-40 dB/dec.
-40
0.5 rad/s
3 rad/s
-60
-50
-100
-126o
-54o
-150
-200
-1 0 1 2
10 10 10 10
Frequency (rad/sec)
10
Figure 0.4 Bode plot of
(2s + 1)(0.33s + 1)
Summary: By using a combination of all constant K, s-terms, and first order lead and
lags, we can sketch all but second order underdamped features.
0.2 Second order underdamped system
A second order underdamped system will have a transfer function of the form:
1
G( s) =
1 2 2ζ
( 2 )s + ( )s + 1
ωn ωn
where ω n is the natural frequency and ζ is the damping ratio of the system. We remember that
(i) The damping ratio, ζ, will be less than 1.
(ii) The roots of the denominator (poles of the transfer function) will be complex
(iii) The step response of the system will show an overshoot depending on the value of the
damping.
The magnitude and phase plot of a second order underdamped system is shown in Figure 0.5.
We note the following remarks.
• The underdamped second order frequency response has a low frequency asymptote at 0
dB.
• It has a peak in the mid-frequency range.
• (The peak does not occur at the natural frequency, but at the damped natural frequency, ωd.
This can be found by differentiating |G(jω)| with respect to ω. If ζ is small (<0.4), then ωn
and ωd are similar in value.)
1
• The value of gain at the natural frequency ωn is or 20 log10(1/ 2ζ)
2ζ
• The peak is dependent on the damping ratio of the system: as the damping decreases, the
peak value of the magnitude plot is increased.
• The high frequency asymptote meets the low frequency asymptote on the 0 dB axis at the
natural frequency
• The natural frequency represents the corner frequency for the under damped second order
system.
• The phase changes over approximately two decades; from one decade below the corner
frequency to one decade above the corner frequency.
Gain dB Low
20 Frequency
asymptote High
Frequency
0
asymptote
Corner
-20 frequency
-40
-1 0 1
10 10 10
Phase deg Frequency (rad/sec)
0
-90
-180
-1 0 1
10 10 10
Frequency (rad/sec)
Figure 0.5 Bode plot of underdamped second order system
We now look at the transfer function analysis to justify our remarks.
Analysis
Magnitude of transfer function, |G(jω)|:
1 1
G ( jω ) = =
1 2 ζ ω ω
( 2 )( jω)2 + ( )( jω) + 1 ( )2 j 2 + 2ζ( ) j + 1
ωn ωn ωn ωn
1
=
ω ω
(1 − ( )2 ) + j 2ζ( )
ωn ωn
The gain of the complex function G(jω) is the gain of its numerator divided by the gain of its
denominator:
1 1
G( jω ) = =
ω 2 ω ω 2 2 ω
(1 − ( ) ) + j 2ζ (1 − ( ) ) + 4ζ 2 ( ) 2
ωn ωn ωn ωn
0.5
⎡ 2
⎤
ω 2 2 2⎛ ω ⎞
= −20log10 ⎢(1 − ( ) ) + 4ζ ⎜⎜ ⎟⎟ ⎥
⎢⎣ ωn ⎝ ω n ⎠ ⎥⎦
Examine the general feature of the gain response over the different frequency ranges:
Gain in dB: |G(jω)|dB
|G(jω)|dB
0.5
⎡ 2
⎤
ω 2 2 2⎛ ω ⎞
= −20log10 ⎢(1 − ( ) ) + 4ζ ⎜⎜ ⎟⎟ ⎥
⎢⎣ ωn ⎝ ω n ⎠ ⎥⎦
Low |G(jω)|dB →20log10(1) = 0dB
Frequency
Range ω≈0 horizontal line at 0dB
Mid- |G(jω)|dB → -20 log10(1-1 + 4ζ2)0.5
Frequency = -20log10(2ζ) = 20 log10
Range (1/2ζ)
ω=ωn If ζ<0.5, log10(2ζ) >0 and there will be
a peak in the magnitude above the 0
dB line
The gain at the natural frequency is
inversely proportional to the damping
ratio, ζ. As the damping decreases and
the system become more oscillatory,
the gain at natural frequency increases.
High
Frequency ω ω
|G(jω)|dB ≈ -20log10(( )4 + 4ζ2 ( )2
Range ωn= ωn
)0.5
(ω>>1) since ω4 >> ω2
ω
|G(jω)|dB ≈ -20log10(( )2)
ωn
= -40 log10(ω) –40 log10 ωn
Line with slope of :
–40dB/decade
(found by differentiating above w.r.t
log10 ω.)
Line intersects the horizontal
0 dB line at ω = ωn .
1 1
∠G ( jω ) = ∠ =∠
1 2ζ ω 2 2 ω
2
()( jω)2 + ( )( jω) + 1 ( ) j + 2ζ ( ) j + 1
ωn ωn ωn ωn
1
=∠
ω 2 ω
(1 − ( ) ) + j 2ζ( )
ωn ωn
ω 2 ω
∠G(jω) = ∠1 - ∠( 1-( ) + 2ζ( ) j)
ωn ωn
ω ω
2ζ( ) 2ζ( )
ωn ωn
= 0 -tan-1( ) = -tan-1( )
ω 2 ω 2
1-( ) 1-( )
ωn ωn
Phase ∠G(jω) ω
2ζ( )
ω n
∠G(jω) = -tan-1( )
ω 2
1-( )
ωn
Low ∠G(jω) →-tan (0) = 0o
-1
Frequency
Range ω≈0 asymptote at 0o
Mid- ∠G(jω) → -tan-1(∞)
Frequency = -90o
Value Mid –frequency phase value is –90o.
ω=ωn
High ω
Frequency 2ζ( )
-1 ωn
Range ∠G(jω)≈ -tan ( )
ω 2
(ω>>1) 1-( )
ωn
2
since ω >> ω
∠G(jω) ≈ -tan-1(0)
= -180o
Phase is decreasing towards high
frequency. Asymptote at
∠G(jω) = -180o
0.3 Effect on gain and phase plots of increasing the damping ratio
Figure 0.6 shows how the gain and the phase plots of the underdamped second order system
change for different values of damping. The gain plot shows a large peak for low damping,
this corresponds to a higher overshoot on a step response plot.
output amplitude at ω
System gain =
input amplitude at ω
We should note that the input is not, in this case, a signal of magnitude 1, but a signal of
magnitude 2. The system gain can be calculated using the equation and then converted to dB.
The results are shown in the following table.
ω(rad/sec) 0.1 0.4 0.8 1 3 4 10
System Gain, 10 12. 22. 25. 0.50 0.31 0.05
|G(jω)| 1 5 1
|G(jω)|dB 20 21. 27. 28. 0.08 - -19.9
6 0 0 6 4.01
b. Plot the points as shown in Figure 0.7. The low frequency asymptote is the horizontal line
of height 20 dB. The high frequency asymptote is drawn at a slope of –40 dB/decade and
meets the low frequency asymptote at 1 rad/s. This is the corner frequency of the second
order system.
Magnitude (dB)
Low and high
40 frequency asymptotes
20
-20 -1 0 1
10 10 10
Phase (degrees)
0
-30
-60 -90o at ωn
-90
-120
-150
-180 -1 0 1
10 10 10
Frequency (rad/s)
Figure 0.7 Magnitude and phase points of 2nd order system plotted.
c. System gain: The system gain at low frequency is 20 dB. The gain K = 10.
Natural frequency ωn: The corner frequency is at ωn = 1 rad/s. For a second order system,
the phase at ω n is -90o.
Damping ratio, ζ: Calculate the damping ratio, ζ using the value of the gain at ω n . (Hint:
K
|G(jωn)| =
2ζ
Gain dB at ω n = sum of all logged gain components:
= 20log10(K) + 20 log10(1/2ζ)
28 dB = 20log10 K – 20 log10(2ζ)
20 log10(2ζ) = 20 dB – 28 dB = -8 dB
2ζ = 10^(-8/20) = 0.3981
ζ = 0.199 ∼ 0.2
nd
Therefore the 2 order system is given by
10
G(s) = 2
s + 0.4 s + 1
G1(s) G2(s)
-20
-40
-60 Second order plus
-80 integrator
-100
0
-30
-60 Second order
-90
-120
-150
-180 Second order plus
-210 integrator ωpco
-240
-270
-1 0 1 2
10 10 10 10
Frequency (rad/sec)
Figure 0.9 Effect of adding an integrator to the system
Bode Diagrams
30 ωgco
20
10
Phase (deg); Magnitude (dB)
0
-10 second order
-20
-30
second order plus lag and gain
-40
0
-30
-60 ωpco
-90
-120
second order
-150
-180
-210
-240 second order plus lag and gain
-270
-300
-2 -1 0 1
10 10 10 10
Frequency (rad/sec)
Figure 0.10 Bode plot of 10/[(2s + 1) (0.25s2 + 0.4s + 1)]
20
0
Phase (deg); Magnitude (dB)
-20
second order
-40
50
-50
second order
-100
Frequency (rad/sec)
Figure 0.11 Bode plot of 10(2s + 1) /(0.25s2 + 0.4s + 1)
We can write the output Y(s) in terms of the reference signal R(s) and the disturbance D(s) as
follows:
GOL(s) 1
Y(s) = R(s) + D(s)
1 + GOL(s) 1 + GOL(s)
K(s)G(s) 1
= R(s) + D(s)
1 + K(s)G(s) 1 + K(s)G(s)
= GCL(s) R(s) + S(s) D(s)
We can see that the closed loop response is a linear combination of the responses due to the
reference R(s) and the disturbance D(s). Because of the importance of the two transfer
functions, S(s) and GCL(s), we give them the special names of Sensitivity and
Complementary sensitivity functions.
1
Sensitivity Function: S(s) =
1 + K(s)G(s)
K(s)G(s)
Complementary Sensitivity Function: T(s)=
1 + K(s)G(s)
For the standard unity feedback system that we use in this book, the complementary
sensitivity function, T(s), and the closed loop transfer function GCL(s) are the same transfer
function. We have also referred to these as the reference tracking transfer function. We note
that
GCL(s) + S(s) = 1
Thus, GCL(s) complements S(s) and hence the name complementary sensitivity function. This
relationship shows an important constraint in any control design problem. The relationship
between the reference and the output can be written as
Y(jω) = GCL(jω)R(jω)
where we would like the output Y to behave like the reference R. To achieve this, we should
design the controller so that GCL(jω) =1 over all frequencies. The complementarity between
GCL and S would then ensure that S(jω) = 0 and perfect disturbance rejection would follow.
Unfortunately this perfection is not possible for real processes and controllers. What can be
achieved is that GCL(jω) ~ 1 and S(jω) ~ 0 in the low frequency region and in the high
frequency region we obtain GCL(jω) ~ 0 and S(jω) ~ 1. Such designs will be satisfactory for
low frequency reference and disturbance signals. But we will have to use the controller to
shape the mid-frequency ranges for the stability margins and use controller roll-off to deal
with the high frequency measurement noise going round the loop.
This becomes clearer by examining the magnitude plots for the two transfer functions.
Example
We use the open loop transfer function given by
6
GOL(s) =
s(s+1)(s+3)
(i) Closed loop magnitude plot:
Y(s) = GCL(s) R(s)
The following MATLAB code will produce the magnitude plot of GCL(s).
MATLAB code
gol = 6/(s*(s+1)*(s+3);
gcl=gol/(1+gol);
w = logspace(-1,2,300);
[mag,ph] = bode(gcl,w);
magdb = 20*log10(mag);
semilogx(w,magdb(:))
Figure 0.13 shows the magnitude plot. We can examine the plot in the low, middle and high
frequency ranges:
low frequency range: We note that we have a gain of 1 at low frequencies. Since Y(s) =
GCL(s) R(s), a gain of unity at low frequencies indicates that the closed
loop system will track low frequency reference signals accurately.
mid-frequency range: This section of the plot is usually shaped by the controller to give
the required performance in terms of, for example, acceptable
bandwidth ( speed of response) and overshoot. We note that the peak
on the closed loop magnitude plot is usually given the notation Mp and
occurs at the frequency ωp. The value of Mp can be evaluated for
second order systems to be
1
Mp =
2ζ( 1-ζ2)
ωp = ωn 1-2ζ2
and can be used as a design specification for systems which exhibit
primarily second order characteristics.
high frequency range: Usually a degree of roll-off is required to remove noise or high
frequency disturbances which may affect the system.
Closed loop
magnitude, dB
20
Closed loop peak
magnitude, Mp
10
0
Gain of 1 (=0dB)
-10
-20
-30
High frequency
-40 roll-off
-70
-80
-1 0 1 2
10 10 10 10
Frequency, rad/s
10 Area of amplification:
Frequency range 0.9 to 7 rad/s
5
-10
-15
-20
Attenuation at low
-25 frequencies
-30
-1 0 1 2
10 10 10 Frequency, rad/s 10