---
title: Active noise control
heading: Cancelling sound with sound, how amplitude and phase errors limit the cancellation, the small zone of quiet around an error microphone, feedforward control in ducts with its causality budget, adaptive filters that track changing noise, feedback headphones, and the coherence limit
eyebrow: S16 · Lesson 26 · Active noise control
xp: 50
---

::: hook
Mufflers and enclosures (lessons 25 and 11) need bulk that grows with wavelength, so they struggle below a few hundred hertz. A loudspeaker producing the same sound with opposite phase can cancel low frequencies with a small device: noise-cancelling headphones, quiet car cabins and silenced ventilation ducts all do it. Superposition makes the idea simple. What makes it hard is how exact the copy must be, how small the quiet region is, and how little time the electronics have.
:::

::: play
- A noise and an anti-noise of relative amplitude a (set in decibels) and phase error φ add at a microphone. The curve is how much quieter the sum is than the noise alone, against φ.
- Even a perfect amplitude match gives only 15 dB at 10° of phase error; 1 dB of amplitude error alone caps the cancellation at 18 dB.
- Above 60° of phase error the anti-noise makes things louder.
:::

```sim plot
view: graph
x: p = 0..90
y: A = -10..40
slider: m = -3..3 = 0
plot: -10*log(1 + 10^(m/10) - 2*10^(m/20)*cos(p*pi/180)) | label: attenuation, dB
plot: 0 + 0*p | dashed | label: no change
```

::: predict
## An anti-noise matches a tone's amplitude exactly but lags by 10°. How much quieter is the sum than the tone alone?

- [ ] Silent: perfect cancellation
- [ ] About 40 dB
- [x] About 15 dB
- [ ] About 3 dB

::: reveal
The residual is the difference of two equal phasors 10° apart: $|1 - e^{j10°}| = 2\sin 5°$ = 0.174, so the level falls by $-20\log 0.174$ = 15.2 dB. Thirty decibels needs phase within 1.8°, and amplitude within 0.3 dB, which is why active control works best on steady, predictable sound.
:::
:::

::: nameit
## Superposition and its limits

Adding an anti-noise of relative amplitude a and phase error φ to a sound leaves a residual
$$\frac{p_\text{res}^2}{p^2} = 1 + a^2 - 2a\cos\varphi$$
so the attenuation is $-10\log(1 + a^2 - 2a\cos\varphi)$. Errors of a few degrees or a fraction of a decibel limit it to 15 to 25 dB, and beyond 60° of phase error (with a = 1) the sum is louder than the noise.

## The zone of quiet

Cancellation at one microphone is exact only there. In a diffuse or three-dimensional field the region quieted by 10 dB or more is about a tenth of a wavelength across: 34 cm at 100 Hz but only 3.4 cm at 1 kHz, so headphones and headrests work well because the ear sits close to the cancelling speaker, and room-wide quiet is possible only at the lowest frequencies.

## Feedforward in a duct

In a duct, where sound travels as plane waves, a reference microphone upstream measures the noise, a controller filters it, and a loudspeaker downstream injects the anti-noise. The controller must finish within the acoustic travel time from microphone to speaker, L/c, about 2.9 ms per meter: converters, filter and speaker delay all come out of that budget. An error microphone downstream lets an **adaptive filter** (filtered-x LMS) adjust its coefficients continuously as the noise and the duct change, correcting for the speaker and error path with a model of them.

## Feedback headphones

Headphones place a microphone inside the ear cup and feed it back through the driver with high loop gain. Loop delay limits the gain to frequencies below about 1 kHz before the loop becomes unstable, so active cancellation handles low-frequency rumble while the cups' passive isolation handles the rest.

## The coherence limit

Only the part of the noise at the error point that's predictable from the reference can be cancelled. With magnitude-squared coherence γ² between them at some frequency, the best attenuation there is $-10\log(1 - \gamma^2)$: 10 dB at γ² = 0.9, 20 dB at 0.99. Turbulence at the reference microphone or other sources between the microphones lower it.
:::

::: example
## An anti-noise is 1 dB too strong and lags by 5°. What attenuation results?

::: solution
1. **Amplitude ratio.**
   $$\begin{aligned} a &= 10^{1/20} \\ &= 1.122 \end{aligned}$$
2. **Residual power.** As a fraction of the noise power:
   $$\begin{aligned} \frac{p_\text{res}^2}{p^2} &= 1 + a^2 - 2a\cos\varphi \\ &= 1 + 1.259 \\ &\quad - 2 \times 1.122\cos 5^\circ \\ &= 0.0234 \end{aligned}$$
   which is 16.3 dB.
3. **Compare with the phase error alone.** The amplitude error costs more here than the phase error: with a = 1 and 5° alone the attenuation would be 21.2 dB.
4. **In practice.** Adaptive controllers trim both continuously, because loudspeaker sensitivity and duct conditions drift.

**Answer:** 16.3 dB of attenuation.
:::
:::

::: example
## A duct's reference microphone sits 1 m upstream of the cancelling loudspeaker. How much time does the controller have, and can a system with 1 ms of converter and processing latency keep up?

::: solution
1. **Travel time.** Sound takes
   $$\begin{aligned} t &= 1/343\ \text{s} \\ &= 2.9\ \text{ms} \end{aligned}$$
   to travel 1 m, so the anti-noise must be ready within 2.9 ms of the reference sample.
2. **Time left.** With 1 ms of latency, about
   $$2.9 - 1 = 1.9\ \text{ms}$$
   remain for the filter and loudspeaker response: feasible for broadband noise.
3. **Steady tones.** For a steady tone causality matters less, since a periodic signal can be predicted a cycle ahead, which is how compact systems cancel engine harmonics with almost no lead distance.

**Answer:** the controller has 2.9 ms; with 1 ms of latency about 1.9 ms remain, so it can keep up with broadband noise.
:::
:::

::: example
## The coherence between the reference and error microphones is 0.95 at a fan's blade-pass frequency. What is the most an ideal controller can achieve there?

::: solution
1. **Coherence limit.** However good the controller:
   $$\begin{aligned} \Delta L &= -10\log(1 - 0.95^2) \\ &= -10\log 0.0975 \\ &= 10.1\ \text{dB} \end{aligned}$$
2. **Why so little.** A coherence of 0.95 sounds high, but 9.75% of the error signal's power is unrelated to the reference, and nothing derived from the reference can cancel it.
3. **Raising the limit.** Moving the reference microphone out of the turbulent flow, or averaging several, raises the coherence and the achievable attenuation.

**Answer:** at most 10.1 dB.
:::
:::

::: check
kind: parts
given: m = 0 | 0.5 | 2; p = 3 | 10 | 30

## An anti-noise has an amplitude error of {m} dB and a phase error of {p}°.

::: part
answer: -10*log(1 + 10^(m/10) - 2*10^(m/20)*cos(p*pi/180))
unit: dB
tolerance: 0.5%

### What attenuation results?

::: misses
- [any] $-10\log(1 + a^2 - 2a\cos\varphi)$ with $a = 10^{m/20}$.
:::
:::
:::

::: check
kind: parts
given: A = 20 | 30 | 40

## A designer needs {A} dB of cancellation of a tone.

::: part
answer: 2*asin(10^(-A/20)/2)*180/pi
unit: °
tolerance: 0.5%

### What is the largest phase error allowed with perfect amplitude?

::: misses
- [any] Solve $2\sin(\varphi/2) = 10^{-A/20}$.
:::
:::

::: part
answer: 20*log(1 + 10^(-A/20))
unit: dB
tolerance: 1%

### What is the largest amplitude error allowed with perfect phase?

::: misses
- [any] Solve $|1 - a| = 10^{-A/20}$.
:::
:::
:::

::: check
kind: parts
given: f = 50 | 100 | 500 | 1000

## Active cancellation quiets one point at {f} Hz in a diffuse field.

::: part
answer: 343/f/10*100
unit: cm
tolerance: 0.5%

### About how wide is the zone quieted by 10 dB or more?

::: misses
- [343/f*100] About a tenth of a wavelength, not a whole one.
- [any] λ/10.
:::
:::
:::

::: check
kind: parts
given: L = 0.5 | 1 | 3; l = 0.5 | 1.5 | 2.5

## A duct controller's reference microphone sits {L} m upstream of its loudspeaker, and its electronics take {l} ms.

::: part
answer: L/343*1000
unit: ms
tolerance: 0.5%

### How long does the sound take to travel from microphone to speaker?

::: misses
- [any] L/c.
:::
:::

::: part
answer: L/343*1000 - l
unit: ms
tolerance: 0.5%

### How much time is left for the filter and loudspeaker (negative means acausal)?

::: misses
- [any] Travel time less latency.
:::
:::
:::

::: check
kind: parts
given: g = 0.7 | 0.9 | 0.99 | 0.999

## The magnitude-squared coherence between reference and error signals is {g} at a frequency.

::: part
answer: -10*log(1 - g)
unit: dB
tolerance: 0.5%

### What is the most attenuation any controller can achieve there?

::: misses
- [-20*log(1 - g)] The bound is $-10\log(1 - \gamma^2)$, with γ² already given.
- [any] $-10\log(1 - \gamma^2)$.
:::
:::
:::

::: check
kind: choice

## Why do noise-cancelling headphones cancel low frequencies well but leave high frequencies to the ear cups' passive isolation?

- [ ] High frequencies are too quiet to matter
- [x] The feedback loop's delay limits how much gain it can apply before it becomes unstable, and that limit falls as frequency rises; meanwhile, the cups block high frequencies well on their own
- [ ] Loudspeakers can't reproduce high frequencies
- [ ] High-frequency sound doesn't obey superposition

::: misses
- [1] Many noises have strong high-frequency content.
- [3] Headphone drivers reproduce high frequencies easily.
- [4] Linear acoustics superposes at any frequency.
:::
:::

::: check
kind: derivation
vars: a = 0.5..2, p = 0..1.5

## An anti-noise has relative amplitude a and phase error φ (radians).

::: step
answer: 1 + a^2 - 2*a*cos(p)

### What fraction of the noise power remains?
:::

::: step
answer: -10*log(1 + a^2 - 2*a*cos(p))

### What attenuation is that in decibels?
:::

::: right
Right. With a = 1 the residual is $4\sin^2(\varphi/2)$: about φ² for small errors.
:::
:::

::: explain
## Why does active noise control work well in ducts and headphones but not across a whole room?

::: model
Cancellation requires the anti-noise to match the noise in amplitude and phase wherever quiet is wanted. In a duct below its first cross mode, sound travels as a plane wave, so matching it at one cross-section matches it everywhere downstream; in headphones, the ear is within a small fraction of a wavelength of the cancelling speaker. In a room, sound arrives from many directions with phases that change over distances of a fraction of a wavelength, so an anti-noise that cancels at one point adds to the noise a short distance away. The quiet zone around a cancellation point is only about a tenth of a wavelength wide, which covers a room only at the lowest frequencies.
:::
:::

::: practice
::: check
given: m = 0.3 | 1; p = 5 | 15
answer: -10*log(1 + 10^(m/10) - 2*10^(m/20)*cos(p*pi/180))
unit: dB
tolerance: 0.5%

## Attenuation: {m} dB amplitude error, {p}° phase error?

::: misses
- [any] $-10\log(1 + a^2 - 2a\cos\varphi)$.
:::
:::

::: check
given: g = 0.5 | 0.8 | 0.9 | 0.95 | 0.99 | 0.999
answer: -10*log(1 - g)
unit: dB
tolerance: 0.5%

## Coherence limit at γ² = {g}?

::: misses
- [any] $-10\log(1 - \gamma^2)$.
:::
:::

::: check
given: L = 0.3 | 0.5 | 0.7 | 1 | 2 | 3
answer: L/343*1000
unit: ms
tolerance: 0.5%

## Causality budget for {L} m?

::: misses
- [any] L/c.
:::
:::
:::
