Bode plots
In the previous section, we introduced the concept of frequency response. For a system with transfer function , the frequency response is given by and tells us how the system responds to sinusoidal inputs of frequency . The frequency response is most useful when written in polar form as
If the input is , then the steady-state output is a sinusoid of the same frequency, given by . In other words, the system scales the input by and shifts it in time by .
Bode plots¶
It is useful to plot the frequency response as a function of , 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 , which we will use as a running example.
Figure 1:Bode plot for the system . The top plot is the magnitude plot and the bottom plot is the phase plot.
Let’s unpack Figure 1 a bit.
The top plot is the magnitude plot; it is a plot of .
The bottom plot is the phase plot; itis a plot of .
The x-axis is (frequency, typically in rad/s) and it is plotted on a logarithmic scale (more on this later!). The magnitude and phase plots use a common frequency axis so that it is easy to read off the magnitude and phase at a given frequency.
Each factor of 10 on the frequency axis is called a decade. This plot spans four decades, from 0.01 rad/s to 100 rad/s.
The magnitude is plotted in decibels (dB), which is a logarithmic unit. We will devote a section to explaining decibels so don’t worry!
The phase is plotted in degrees on a linear scale. Negative values correspond to phase lag while positive values correspond to phase lead.
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 and is simply . This is known as the arithmetic mean.
On a log scale, we have to be a bit more careful. If is the midpoint between and on a log scale, then the ratio of to must be the same as the ratio of to . Therefore,
So on a log scale, the midpoint between and is , which is the geometric mean of and . For example, the midpoint between 1 and 10 is .
Likewise, we can show that if is a fraction of the way from to , then:
On a linear scale, .
On a log scale, .
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.
Logarithmic scales and music
One octave represents a doubling or halving of frequency. This is analogous to how a decade represents a tenfold increase or decrease in frequency.
Each octave is divided into 12 semitones, which are equally spaced (called a “half-step”) on a logarithmic scale. The semitones are named C, C♯/D♭, D, D♯/E♭, E, F, F♯/G♭, G, G♯/A♭, A, A♯/B♭, B. The note “C♯/D♭” is called “C sharp” (one half-step above C) or “D flat” (one half-step below D). Two half-steps is a “whole step”, which means C and D are a whole step apart, while E and F are only a half-step apart. On a piano, the white keys correspond to the “natural” notes (C, D, E, F, G, A, B) and the black keys correspond to the sharp/flat notes (C♯/D♭, D♯/E♭, F♯/G♭, G♯/A♭, A♯/B♭). The pattern of white and black keys repeats every octave. Here is what it looks like on a piano layout.

Figure 5:Partial piano keyboard layout showing the pattern of white and black keys. The pattern repeats every octave. Source: Bell&Co Music.
The octaves are numbered, so if we start at C4 (also called “middle C”), the next semitone is C♯4/D♭4, then D4, and so on until we reach B4. The next semitone after B4 is C5, which starts the next octave. A standard piano has 88 keys, starting at A0 and ending at C8.
So what are the frequencies of the musical notes? The note A4 is commonly used as a reference pitch and is set to 440 Hz. Therefore, A3 (one octave below A4) is 220 Hz, and A5 (one octave above A4) is 880 Hz. Since there are 12 semitones in an octave, the frequency of each semitone is given by multiplying the previous semitone by . For example, middle C (C4) is 9 semitones below A4, so its frequency is given by
The range of human hearing is typically considered to be from 20 Hz to 20 kHz, which corresponds to about 10 octaves. The lowest note on a standard piano (A0) is 27.5 Hz, and the highest note (C8) is 4186 Hz, which is well within the range of human hearing.
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 is given by
Since decibels are so ubiquitous, it is useful to memorize some common values. The following table gives some common values of and their corresponding decibel values:
Common magnitudes and their corresponding decibel values
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.
Why are decibels defined this way?
One decibel is defined as one tenth of a bel, which is a unit named after Alexander Graham Bell, inventor of the telephone. Bell was interested in measuring how signals attenuate as they travel through telephone lines, and this was conveniently expressed as the ratio of the output power to the input power. To cover a wide range of power ratios, Bell used a logarithmic scale, which we now call the “bel”:
This is because power is proportional to the square of the voltage (or current). If we then want to convert to decibels, we multiply by 10. So if voltage is amplified by a factor of , this amplification in decibels (dB) is given by:
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 and see how to read it.
Figure 6:Bode plot for the system .
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:
DC gain: The DC gain is , which is the frequency response at . Although the Bode plot does not show (that would be infinitely far to the left due to the log scale), we can see that as , we have and . So the DC gain is 0 dB, which corresponds to a magnitude of 1. We can verify this from the transfer function: . Magnitude is always positive, so if the system had been (DC gain of -1), the magnitude plot would look the same, but the phase plot would show a phase of -180° instead of 0° at low frequencies, which would tell us that the sign of the DC gain should be flipped.
High-frequency roll-off: All Bode magnitude plots for physical systems eventually have a constant-slope magnitude plot at high frequency, which is called the high-frequency roll-off. For the plot above, the high-frequency roll-off is -20 dB/decade.
Corner frequency: When the Bode plot has a frequency where the magnitude transitions from flat to sloped, this frequency is called the corner frequency (also called the break frequency or cutoff frequency). The plot above has a corner frequency at 1 rad/s. This means that the system behaves like a low-pass filter, allowing low frequencies to pass through while attenuating frequencies that are larger than the corner frequency.
We can also read off specific values from the plot and deduce what this means in terms of steady-state response. For example:
At , the magnitude is approximately 0 dB, or 1, and the phase is approximately 0°. This means that the output is essentially unchanged.
At , the magnitude is approximately -3 dB, or 0.707, and the phase is approximately -45°. This means that the output is attenuated by a factor of 0.707 and lags the input by 45°. For example:
At , the magnitude is approximately -40 dB, or 0.01, and the phase is approximately -90°. This means that the output is attenuated by a factor of 0.01 and lags the input by 90°. For example:
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 , we can compute the magnitude and phase 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 #
The DC gain is the magnitude at . From the plot, we can see that as , the magnitude approaches -20 dB, which corresponds to a magnitude of 0.1. Therefore, the DC gain is 0.1.
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.
The corner frequency, where the initial flat portion and the high-frequency roll-off intersect, is roughly at 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 . 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 . Two possible examples are:
Using would yield .
Using would yield .
Solution to Exercise 2 #
We want the largest note that is less than or equal to 20 kHz. The frequency of the semitone above A4 is given by
We want to find the largest such that Hz. Solving for , we get
The largest integer that satisfies this is . 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 Hz.
MicroPascals, measuring the root-mean-square pressure amplitude of a 1 kHz sound wave at the threshold of human hearing.