Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Bode plots

In the previous section, we introduced the concept of frequency response. For a system with transfer function G(s)G(s), the frequency response is given by G(jω)G(j\omega) and tells us how the system responds to sinusoidal inputs of frequency ω\omega. The frequency response is most useful when written in polar form as

G(jω)=M(ω)ejϕ(ω){M(ω)=G(jω)magnitudeϕ(ω)=G(jω)phaseG(j\omega) = M(\omega)\,e^{j\phi(\omega)} \quad \begin{cases} M(\omega) = |G(j\omega)| & \textsf{magnitude} \\ \phi(\omega) = \angle G(j\omega) & \textsf{phase} \end{cases}

If the input is u(t)=sin(ωt)u(t) = \sin(\omega t), then the steady-state output is a sinusoid of the same frequency, given by y(t)=M(ω)sin(ωt+ϕ(ω))y(t) = M(\omega)\sin(\omega t + \phi(\omega)). In other words, the system scales the input by M(ω)M(\omega) and shifts it in time by ϕ(ω)\phi(\omega).

Bode plots

It is useful to plot the frequency response as a function of ω\omega, as this allows us to evaluate the behavior of a system at a glance. There is a standardized way of plotting the frequency response, which is called a Bode plot.

The Bode plot consists of two separate plots stacked vertically. Here is the Bode plot for the system G(s)=1s+1G(s) = \frac{1}{s+1}, which we will use as a running example.

Bode plot for the system G(s) = \frac{1}{s+1}. The top plot is the magnitude plot and the bottom plot is the phase plot.

Figure 1:Bode plot for the system G(s)=1s+1G(s) = \frac{1}{s+1}. The top plot is the magnitude plot and the bottom plot is the phase plot.

Let’s unpack Figure 1 a bit.

Review of logarithmic scales

Logarithmic scales are useful for plotting quantities that are (1) positive and (2) vary over several orders of magnitude, which is often the case for frequency responses.

On a linear scale, the distance between any two numbers is proportional to their difference. For example, the distance between 1 and 2 is the same as the distance between 30 and 31. Here is an example of a linear scale:

Linear scales can also capture negative numbers, but they struggle to capture large ranges. For example, if we wanted to plot 0.01, 0.1, and 100, we would have to choose a scale that is large enough to include 100, which would make the points for 0.01 and 0.1 very close together and hard to read.

On a logarithmic scale, the distance between any two numbers is proportional to their ratio. For example, the distance between 1 and 3 is the same as the distance between 10 and 30, since both pairs have a ratio of 3. Here is an example of a logarithmic scale:

For example, 1,2,4,8 are equally spaced (factors of 2), and so are 1,3,9 (factors of 3). Similarly, the distance between 1 and 5 is the same as the distance between 2 and 10, since both pairs have a ratio of 5. Log scales cannot capture negative numbers, but they can capture large ranges of positive numbers. Here is the above scale extended in both directions:

Major ticks are drawn at powers of 10 (which are called decades), while minor ticks are drawn at intermediate values. For example, the ticks between 10-1 and 100 correspond to {0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9}, while the minor ticks between 101 and 102 correspond to {20, 30, 40, 50, 60, 70, 80, 90}.

Intermediate values on a log scale

On a linear scale, the midpoint between aa and bb is simply a+b2\frac{a+b}{2}. This is known as the arithmetic mean.

On a log scale, we have to be a bit more careful. If xx is the midpoint between aa and bb on a log scale, then the ratio of aa to xx must be the same as the ratio of xx to bb. Therefore,

ax=xb    x2=ab    x=ab\frac{a}{x} = \frac{x}{b} \implies x^2 = ab \implies x = \sqrt{ab}

So on a log scale, the midpoint between aa and bb is ab\sqrt{ab}, which is the geometric mean of aa and bb. For example, the midpoint between 1 and 10 is 103.16\sqrt{10} \approx 3.16.

Likewise, we can show that if xx is a fraction α\alpha of the way from aa to bb, then:

Logarithmic scales and music

What makes musical notes sound different is their pitch (frequency). Logarithmic scales are important in music, because the human ear perceives changes in pitch on a logarithmic scale.

There are many conventions associated with musical notes, but once you get past the jargon, it’s really just a logarithmic scale of frequencies! For more details, expand the section below.

Decibels and common values

The magnitude in a Bode plot is typically plotted in decibels (dB), which is a logarithmic unit. The decibel value of a magnitude MM is given by

MdB=20log10(M)M_\text{dB} = 20\log_{10}(M)

Since decibels are so ubiquitous, it is useful to memorize some common values. The following table gives some common values of MM and their corresponding decibel values:

Common magnitudes and their corresponding decibel values

M\MMdB\M_\text{dB}
00  dB-\infty \text{ dB}
0.0010.001 60 dB-60 \text{ dB}
0.010.01 40 dB-40 \text{ dB}
0.10.1 20 dB-20 \text{ dB}
0.50.5 6 dB\approx -6 \text{ dB}
1/20.7071/\sqrt{2} \approx 0.7073 dB\approx -3 \text{ dB}
11 0 dB0 \text{ dB}
21.414\sqrt{2} \approx 1.4143 dB\approx 3 \text{ dB}
22 6 dB\approx 6 \text{ dB}
1010 20 dB20 \text{ dB}
100100 40 dB40 \text{ dB}
10001000 60 dB60 \text{ dB}
\infty  dB\infty \text{ dB}

In other words, every time the magnitude is multiplied by 10, the decibel value increases by 20 dB. Likewise, every time the magnitude is doubled, the decibel value increases by approximately 6 dB.

Decibels and sound intensity

The decibel scale is also used to measure the loudness of sound. The reference value is typically the threshold of human hearing, which is around 20 μPa[1]. For example, a whisper is around 30 dB, normal conversation is around 60 dB, and a rock concert can be around 120 dB. The decibel scale allows us to express a wide range of sound intensities in a compact way. This means that the pressure wave of a rock concert is 1,000 times stronger than that of a normal conversation.

Interpreting a Bode plot

Let’s return to the bode plot for the system G(s)=1s+1G(s) = \frac{1}{s+1} and see how to read it.

Bode plot for the system G(s) = \frac{1}{s+1}.

Figure 6:Bode plot for the system G(s)=1s+1G(s) = \frac{1}{s+1}.

The Bode plot of Figure 6 spans 4 decades (10-2 to 102 rad/s). We can read off some key features of the system from the plot:

We can also read off specific values from the plot and deduce what this means in terms of steady-state response. For example:

u(t)=cos(0.01t)      y(t)1cos(0.01t+0°)=cos(0.01t)\begin{aligned} u(t) &= \cos(0.01 t) \\\implies\; y(t) &\approx 1\cdot \cos(0.01 t + 0\degree) = \cos(0.01 t) \end{aligned}
u(t)=cos(t)      y(t)0.707cos(t45°)\begin{aligned} u(t) &= \cos(t) \\\implies\; y(t) &\approx 0.707\cdot \cos(t - 45\degree) \end{aligned}
u(t)=cos(100t)      y(t)0.01cos(100t90°)=0.01sin(100t)\begin{aligned} u(t) &= \cos(100 t) \\\implies\; y(t) &\approx 0.01\cdot \cos(100 t - 90\degree) = 0.01\cdot \sin(100 t) \end{aligned}

Experimentally measuring a Bode plot

In practice, we often do not have access to the transfer function of a system, but we can still measure its frequency response and plot its Bode plot. To do this, we can apply sinusoidal inputs of different frequencies to the system and measure the steady-state output. For each input frequency ω\omega, we can compute the magnitude M(ω)M(\omega) and phase ϕ(ω)\phi(\omega) from the input and output signals, plot them, and connect the dots.

This approach only works if the system is stable, since otherwise the output will not settle to a steady-state sinusoid.


Test your knowledge

Solution to Exercise 1 #
  1. The DC gain is the magnitude at ω0\omega \to 0. From the plot, we can see that as ω0\omega \to 0, the magnitude approaches -20 dB, which corresponds to a magnitude of 0.1. Therefore, the DC gain is 0.1.

  2. The high-frequency roll-off is the slope of the magnitude plot at high frequencies. From the plot, we can see that the magnitude decreases from -40 dB to -80 dB during the final decade, which corresponds to a roll-off of -40 dB/decade.

  3. The corner frequency, where the initial flat portion and the high-frequency roll-off intersect, is roughly at ω=3\omega = 3 rad/s.

To observe the maximum amplification in the response, we should use a sinusoidal input at the resonance frequency, which is approximately equal to the corner frequency of 3 rad/s. At this frequency, we have M14 dBM \approx -14 \text{ dB}. Since this is about 6 dB (factor of 2) larger than -20 dB (factor of 0.1), we have a net gain of 0.2. We also have ϕ90°\phi \approx -90\degree. Two possible examples are:

  • Using u(t)=sin(3t)u(t) = \sin(3 t) would yield y(t)0.2sin(3t90°)y(t) \approx 0.2 \sin(3 t - 90\degree).

  • Using u(t)=cos(3t)u(t) = \cos(3 t) would yield y(t)0.2cos(3t90°)y(t) \approx 0.2 \cos(3 t - 90\degree).

Solution to Exercise 2 #

We want the largest note that is less than or equal to 20 kHz. The frequency of the nthn^\text{th} semitone above A4 is given by

fn=4402n/12f_n = 440 \cdot 2^{n/12}

We want to find the largest nn such that fn20,000f_n \leq 20{,}000 Hz. Solving for nn, we get

n12log2(20,000440)12log2(45.45)125.5166.1\begin{aligned} n &\leq 12 \log_2\left(\frac{20{,}000}{440}\right) \\ &\approx 12 \log_2(45.45) \\ &\approx 12 \cdot 5.51 \\ &\approx 66.1 \end{aligned}

The largest integer nn that satisfies this is n=66n=66. Each octave has 12 semitones, so 66 semitones equals 5 octaves plus 6 semitones. We started at A4, so adding 5 octaves brings us to A9. Writing out the next six semitones (using Figure 5 as a reference), we get the following notes:

A9, A♯9/B♭9, B9, C10, C♯10/D♭10, D10, D♯10/E♭10, ...

Therefore, the highest note that a human can hear is D♯10/E♭10, which has a frequency of approximately 440266/1219,912440 \cdot 2^{66/12} \approx 19{,}912 Hz.

Footnotes
  1. MicroPascals, measuring the root-mean-square pressure amplitude of a 1 kHz sound wave at the threshold of human hearing.