Sub topic 8
Superposition and Beats
This chapter covers what happens when two sound waves occupy the same place at the same time. It assumes you know frequency, period, wavelength, and amplitude, and that you can handle basic algebra and a little trigonometry. The chapter ends with beats, the slow loudness pulsing you hear when two pitches are almost equal.
The superposition principle
When two sound waves pass through the same point, the pressure change at that point is the sum of the pressure changes each wave would cause alone. This is the superposition principle. In equation form:
p_total(t) = p₁(t) + p₂(t)
Superposition holds when the waves are small enough that the medium responds linearly. Ordinary speech, music, and most everyday sounds meet this condition. Very intense sounds, such as shock waves, do not, and the simple sum fails for them (the last chapter of this tutorial covers shock waves).
Two consequences follow from this principle:
- Waves pass through each other without changing. After two sounds cross, each continues as if the other had never been there.
- At any one point and instant, the combined effect can be larger or smaller than either wave alone, depending on how the waves line up.
Two sound waves of the same frequency show this clearly:
| Relationship | Phase difference | Result |
|---|---|---|
| In phase | 0 | Pressure peaks coincide. Amplitudes add. This is constructive interference. |
| Opposite phase | 180° (π rad) | A peak meets a trough. Amplitudes subtract. This is destructive interference. |
| In between | Other values | Partial reinforcement or cancellation. |
If two equal-amplitude waves of the same frequency arrive exactly out of phase, they cancel at that point. Noise-cancelling headphones use this idea. A microphone samples the outside noise, and the electronics play an inverted copy that arrives at the ear out of phase with it.
Cancellation does not destroy energy. The energy is redistributed. In a room with two speakers playing the same tone, some places are loud and others are quiet. The total power delivered is not lost.
Adding two waves of different frequency
Now take two pure tones with frequencies f₁ and f₂ that differ. At a fixed point in space, each tone makes the pressure vary like a cosine:
p₁(t) = A cos(2π f₁ t)
p₂(t) = A cos(2π f₂ t)
Both have the same amplitude A for simplicity. Because the frequencies differ, the phase relationship between the two changes continuously. Sometimes the waves are in phase and reinforce each other. A moment later they are out of phase and cancel. The pattern repeats.
The trigonometric identity for a sum of cosines gives the exact result:
cos a + cos b = 2 cos((a − b)/2) cos((a + b)/2)
Applying it:
p_total(t) = 2A cos(π (f₁ − f₂) t) · cos(π (f₁ + f₂) t)
Read this as a product of two factors:
- The second factor, cos(π (f₁ + f₂) t), oscillates at the average frequency f_avg = (f₁ + f₂)/2. This is the pitch you hear.
- The first factor, 2A cos(π (f₁ − f₂) t), changes slowly when f₁ and f₂ are close. It acts as a slowly varying envelope that sets the amplitude of the fast oscillation.
So the combined sound is a tone at the average frequency whose loudness rises and falls.
Beat frequency
The envelope cos(π (f₁ − f₂) t) has a frequency of |f₁ − f₂|/2. But loudness depends on the size of the amplitude, not its sign. The envelope reaches a maximum magnitude twice per cycle, once when it is +1 and once when it is −1. So the loudness peaks at twice the envelope frequency:
f_beat = |f₁ − f₂|
The beat frequency is the difference of the two frequencies. This is the number of loudness peaks per second.
Example: two tuning forks, one at 440 Hz and one at 444 Hz. You hear a tone near 442 Hz that swells and fades 4 times per second.
Why the difference, not half the difference
A common mistake is to use the envelope frequency |f₁ − f₂|/2 as the beat rate. The envelope itself has that frequency, but each envelope cycle contains two loudness maxima. Count loudness peaks, because that is what the ear detects. The result is |f₁ − f₂|.
You can check this with the tuning forks above. Over one second, the phase of fork 2 advances 4 more full cycles than fork 1. Each time the extra phase reaches a whole cycle, the waves line up again, and there is a loudness peak. Four extra cycles means four peaks per second.
Simulating beats in code
The following program builds two tones, adds them, and counts loudness peaks in the result. It uses only the Python standard library.
import math
def two_tone(f1, f2, duration=2.0, sample_rate=8000):
"""Return samples of cos(2*pi*f1*t) + cos(2*pi*f2*t)."""
n = int(duration * sample_rate)
return [
math.cos(2 * math.pi * f1 * i / sample_rate)
+ math.cos(2 * math.pi * f2 * i / sample_rate)
for i in range(n)
]
def envelope(samples, window):
"""Peak absolute value in each non-overlapping window."""
return [
max(abs(s) for s in samples[i:i + window])
for i in range(0, len(samples) - window + 1, window)
]
def count_peaks(values):
"""Count local maxima that are above the mean value."""
mean = sum(values) / len(values)
return sum(
1
for i in range(1, len(values) - 1)
if values[i] > values[i - 1]
and values[i] >= values[i + 1]
and values[i] > mean
)
f1, f2, duration, rate = 440.0, 444.0, 2.0, 8000
samples = two_tone(f1, f2, duration, rate)
env = envelope(samples, window=50) # 50 samples = 6.25 ms per window
peaks = count_peaks(env)
print("expected beat frequency:", abs(f1 - f2), "Hz")
print("peaks counted over", duration, "s:", peaks)
print("measured beat frequency: about", peaks / duration, "Hz")The expected beat rate is 4 Hz, so over 2 seconds you should count about 8 peaks. The count can be off by one near the ends of the recording, and noisy windows may add or remove a peak. The window size matters. It must be much shorter than the beat period (0.25 s here) and long enough to span at least one cycle of the 442 Hz tone, which lasts about 2.3 ms.
Unequal amplitudes
Real sounds rarely have equal amplitudes. If the two waves have amplitudes A₁ and A₂, the envelope no longer drops to zero. The total amplitude swings between a maximum and a minimum:
- Maximum: A₁ + A₂
- Minimum: |A₁ − A₂|
The beat frequency is still |f₁ − f₂|. But the beating is less dramatic. The sound goes from loud to less loud, and not from loud to silent. For A₂ much smaller than A₁, the pulsing is barely noticeable.
Intensity is proportional to the square of pressure amplitude (see the chapter on pressure amplitude and intensity). So the intensity ratio between the loudest and quietest moments is:
Imax / Imin = ((A₁ + A₂)/(A₁ − A₂))²
For A₁ = 2 and A₂ = 1, this ratio is (3/1)² = 9.
What the ear does with beats
The way beats sound depends on the size of the frequency difference.
| Difference | f₁ − f₂ | Column | What you hear |
|---|---|---|---|
| Below about 1 Hz | A slow swell and fade, nearly a single drifting tone | ||
| About 1 to 15 Hz | Clear pulsing at the beat rate | ||
| About 15 to 30 Hz | Roughness. The pulses blur into a rattling or buzzing quality. | ||
| Larger | Two separate pitches, once the difference is large enough for the ear to resolve them |
The exact boundaries vary by listener and by pitch. They are approximate guides and not fixed physical limits.
Practical uses
- Tuning instruments. A piano tuner plays a reference tone and a string together. Slow beats mean the pitches are close. Tuning until the beats vanish makes the frequencies match. A guitarist does the same with an adjacent string.
- Detecting small frequency differences. Beats make a tiny difference such as 0.5 Hz audible, since you can count a swell every two seconds. Measuring that difference directly from the pitches would be much harder.
- Radio and electronics. The same mathematics lets receivers mix a signal with a local oscillator and extract the difference frequency.
Common errors
- Using half the difference. The envelope has frequency |f₁ − f₂|/2, but the beat frequency is |f₁ − f₂|. Count loudness peaks.
- Expecting the beat pitch to be audible. If f₁ = 1000 Hz and f₂ = 1004 Hz, there is no 4 Hz tone in the sound. There is a 1002 Hz tone whose loudness pulses 4 times per second. The 4 Hz is a loudness rate, and it is too low to be heard as a pitch.
- Applying beats to widely separated frequencies. The envelope description is a convenient picture only when f₁ and f₂ are close. The identity is exact for any pair, but your ear does not hear a smooth envelope when the difference is large.
- Assuming cancellation destroys energy. Destructive interference moves energy to other places or times. The total is conserved.
- Ignoring linearity limits. Adding pressures is valid only for waves small enough that the medium behaves linearly.
Exercise
A tuner sounds a 523 Hz reference fork and plays a string at the same time. She hears 3 loudness pulses per second. After she tightens the string slightly, the pulses slow down to 1 per second. Then she tightens it a little more and the pulses speed up again to 2 per second. (a) What frequencies could the string have had at the start? (b) Was the string at first above or below the reference, and what does that tell you about the final frequency range? (c) What average pitch would she hear at the start for the lower candidate?
Show answer
(a) The beat rate is |f − 523| = 3, so the string was at 520 Hz or 526 Hz. (b) Tightening raises the frequency. If the string started at 526 Hz, tightening would raise it farther from 523 Hz and the beats would speed up, not slow down. So it started at 520 Hz, below the reference. It rose toward 523 Hz (1 beat per second at 522 Hz), and then passed through 523 Hz and went above it, ending at 525 Hz for 2 beats per second. The final frequency is 525 Hz (the 521 Hz alternative would correspond to 2 beats per second but is not consistent with the later tightening direction after reaching 1 beat per second at 522 Hz). (c) The average of 520 and 523 is 521.5 Hz.
Exercise
Two sources emit tones of equal amplitude at 600 Hz and 606 Hz. (a) What is the beat frequency and how many loudness peaks occur in 5 seconds? (b) What is the pitch you hear? (c) If one tone had twice the pressure amplitude of the other, what would the ratio Imax / Imin be?
Show answer
(a) The beat frequency is |606 − 600| = 6 Hz, so there are 6 × 5 = 30 loudness peaks in 5 seconds. (b) The perceived pitch is the average, (600 + 606)/2 = 603 Hz. (c) With A₁ = 2A₂, Imax / Imin = ((A₁ + A₂)/(A₁ − A₂))² = (3A₂ / A₂)² = 9.