Bode Diagrams - Tutorial and Exercise

Contents
1 Bode plots

1

2 Frequency domain performance criteria

2

3 Gain and Phases Margin

2

4 Example 1

4

5 Example 2

6

6 Exercise

7

A Appendix - Matlab Code

7

1

Bode plots

A method for obtaining and presenting system frequency response data which
is particularly useful where the transfer function is available in factorized form
is the Bode plot. This consists of two plots normally drawn on semi-logarithmic
graph paper: a magnitude plot, log log |G(jω)|, and a phase plot, ∠G(jω), both
on a linear scale, against frequency ω plotted on a logarithmic scale. magnitude
is most commonly plotted in decibels i.e. 20 log10 |G(jω)|.
One reason for this choice of graph is that, since the magnitude is plotted
in logarithmic form, the overall magnitude and phase information can both be
obtained from the component parts by graphical addition. A sec important
advantage of such a plot is that certain approximations using straight line constructions can be quickly drawn and often suffice for accuracy.
It can be shown that any transfer function can be factorized into the form
G(s) =

K(s − z1 )(−z2 ) · · · (s − zm )
.
(s − p1 )(s − p2 ) · · · (s − pn )

(1)

The zeros z1 , z2 , · · · , zm and the poles p1 , p2 , · · · , pn will each be either zero,
real, or complex, and thus in general G(s) can be considered to be composed

1

It can be seen that there is no sharp cut-off. and zero for higher frequencies which can be thought of as unwanted noise. s. or other system where the output is intended to be equal to the input.e. but the form of curve which is typical is shown in Fig. the overall magnitude which in such cases is generally referred to as the magnification would be specified to be unity (or a constant) for all frequencies from zero to the maximum frequency component of interest in the input signal. 2 Frequency domain performance criteria Consider the case where the system in question is a positional control. or directly proportional to it. can be added to produce a plot for a known transfer function. jω. Such an ideal characteristic cannot be achieved in practice. ωn2 − ω 2 + j2ζωωn .entirely of terms of the four following types appearing on the numerator or the denominator: s2 + 2ζωn s + ωn2 K. below 0. .5 for good transient behaviour.1 to 1. the frequency at which the peak magnification occurs. 1 where the overall magnification M has been normalized to unity for low frequencies. 1 + jτ ω. All frequency components of interest should lie within the bandwidth. 1 + τ s. (2) ωn2 Hence G(jω) is composed of multiples or quotients of terms of the form K. the height of the peak. which should ideally be in the range 1. (c) ωp . The response characteristics are often described by the following parameters: (a) bandwidth-defined as the frequency beyond which the magnification drops more than 3 dB from the low frequency value. a measuring system. The input signal of interest would then be handled in an undistorted way and any noise at higher frequencies would be filtered out. Ideally. (b) peak magnification Mp .707 for the unity gain system. Ideally also there should be no phase shift for the frequencies of interest. 3 Gain and Phases Margin The gain margin is the reciprocal of the magnitude |G(jω)| at the frequency at which the phase angle is −180◦ . to 2 . i. ωn2 (3) Now the Bode plots for these types of component term. For an overdamped system there will be no peak. Defining the phase crossover frequency ω1 . In the case of an underdamped second order system this is close to the undamped natural frequency.

The gain crossover frequency is the frequency at which |G(jω)|. or γ = 180◦ + φ. The phase margin γ is 180◦ plus the phase angle φ of the open-loop transfer function at the gain crossover frequency. a positive gain margin (in decibels) means that the system is stable. the magnitude of the open-loop transfer function. and a negative gain margin (in decibels) means that the system is unstable. |G(jω1 )| (4) The gain margin expressed in decibels is positive if Kg is greater than unity and negative if Kg is smaller than unity. 3 (5) . For an unstable system. the gain margin indicates how much the gain can be increased before the system becomes unstable. Thus. is unity. The phase margin is that amount of additional phase lag at the gain crossover frequency required to bring the system to the verge of instability. For a stable minimum-phase system. the gain margin is indicative of how much the gain must be decreased to make the system stable.Figure 1: Typical frequency response characteristics for unity gain systems be the frequency at which the phase angle of the open-loop transfer function equals −180◦ gives the gain margin Kg = 1 = 20 log Kg = −20 log |G(jω1 )|.

5 = 2 rad/sec.Figure 2: Phase and gain margins of stable and unstable systems 4 Example 1 Using straight line approximations draw a Bode diagram for a system with transfer function 10 . passing through 0 dB at the frequency 1 rad/sec (c) a magnitude of 0 dB up to a break point at 1/0.5s)(1 + 0.1 = 10 rad/sec. Using straight line approximations the contributions of these terms to the overall magnitude are respectively: (a) a constant of 20 log10 10 = 20 dB for all frequencies (b) a line of slope −20 dB/decade. and thereafter a line of slope −20 dB/decade (d) a magnitude of 0 dB up to a break point at 1/0.1 sec. 3 together with the overall magnitude curve which results from summing them.5 sec (d) a simple lag of time constant 0. The true curves for (c) and (d) 4 . The overall curve is in error particularly in the region of the break points. These magnitude contributions are shown in Fig. and thereafter a line of slope −20 dB/decade.1s) This transfer function can be seen to be made up of 4 constituent components: (a) a constant gain term of 10 (b) an integrating term 1/s (c) a simple lag of time constant 0. (6) G(s) = s(1 + 0.

and hence for the overall curve can be drawn in with sufficient accuracy for most purposes by interpolating by eye. 5 .5s)(1+0. but centred about ω = 10 rad/sec. 0. It can be seen that the result is a rounding of the corners. the corner frequency (d) a similar curve to (c).2 rad/sec.1s) The contributions of these four components to the overall phase are respectively: (a) no effect (b) a constant phase lag of 900 for all frequencies (c) zero lag to ω = 0.3 dB at ±1 decade. Figure 3: Bode plot for transfer function G(s) = 10 s(1+0. and they can be drawn in by eye very easily. and a linear variation between. The true curves for phase vary from these straight line approximations by a maximum of 5. 90◦ lag for ω > 20 rad/sec. 1 dB at ±1 octave. with a lag of 45◦ at ω = 2 rad/sec. using the guide points of error being 3 dB at the corner frequency. as described earlier in this section.5◦ .

It should be noted that the effect of the quadratic lag is felt at high frequencies where the amplitude has already been markedly attenuated by the simple lag. Figure 4: Bode plot for transfer function G(s) = 6 5 (1+2s)(s2 +3s+25) . the straight line approximation is 0 dB to the corner frequency 5 rad/sec. (1 + 2s)(s2 + 3s + 25) (7) This transfer function is made up of three components for which the Bode plots can readily be drawn: (a) a constant gain term of 5/25 = 0. The phase curve passes steeply through 90◦ at ω = ωn = 5 rad/sec. and falling at 40 dB per decade beyond this. Fig.3.2. and has no effect on phase (b) a simple lag of time constant 2sec. With a value of ζ = 0.2 = −14 dB at all frequencies.5 Example 2 Draw a Bode diagram for the transfer function G(s) = 5 . this contributes a constant magnitude of 20 log10 0.3 the true curve peaks very close to 5 rad/sec.5 rad/sec √ (c) a quadratic lag with ωn = 25 = 5 and ζ = 3/(2ωn ) = 0. centred on a break point at 0. The overall magnitude and phase can now be obtained by addition. 4.

3. d2. A Appendix . d3=[1 2 2].Wcg. den.den). The commands are: C=CONV(A. crossover frequencies. 7 . Replace the numerical values for variables d1. The frequency range and number of points are chosen automatically.wcg. [Gm. 1.den) In the code segment.6 Exercise Consider the open-loop frequency transfer function G(jω)H((jω) = jω + 1 .d3). Draw Bode plots. den=conv(d1. d3 are variables. BODE(num.den draws the Bode plot of the linear time invariant (LTI) model. den=conv(den. grid on. d1=[1 0].Wcp]=MARGIN(num. The gain margin Gm is defined as 1/G where G is the gain at the -180 phase crossing.Pm. for the given function. d2=[1 2]. The phase margin Pm is in degrees. num and den are the numerator and denominator of G(jω) in terms of the jω-variable power raised. If A and B are vectors of polynomial coefficients.B) convolution and polynomial multiplication.Matlab Code num=[1 1]. and calculate the exact values at corner or break frequencies.Pm. Verify your results using Matlab commands. see the appendix. 4. d3 by your student ID number digits. jω(jω + 2)[(jω)2 + 2jω + 2] (8) Perform the following experiments. convolving them is equivalent to multiplying the two polynomials. Put you answers in the Answer Sheet and submit to the tutor during the laboratory class.den) computes the gain margin Gm. Determine the gain margin. phase margin. the phase margin Pm. Comment on the stability of the control system based on the gain and phase margin. num. d1. 2. d2. bode(num. discuss the characteristics of the control system based on it’s bode plots and identify the stability conditions. straight line approximations of magnitude and phase.wcp]=margin(num. and frequency domain performance criteria.d2). [Gm. and the associated frequencies Wcg and Wcp.