What does In-Ear Noise Cancelling, Occlusion and Listening Effort conclude, in numbers, about “The Waterbed of Feedback Cancellation: a Numerical Ledger of Bode's Sensitivity Integral”?
Answer: Chapter 3 checks Bode's sensitivity integral numerically: the quiet side and the loud side of an illustrative feedback loop are each 32.9 dB·kHz.
Scope of the numbers: Chapter 3 checks Bode's sensitivity integral numerically: the quiet side and the loud side of an illustrative feedback loop are each 32.9 dB·kHz. Chapter 5 prices cancellation with the Speech Intelligibility Index: one decibel at 250 Hz is worth only 0.00206 and one at 2000 Hz 0.00883, and in the illustrative scene cancellation lowers the playback level needed for equal intelligibility by 5.1 dB.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 32.9
| K = 10, d = 2 samples (41.7 us); max |closed-loop root| = 0.6206 | |
| f (Hz) | |S| dB |
| 50 | -20.71 |
| 100 | -20.37 |
| 200 | -19.23 |
| 500 | -15.04 |
| 1000 | -9.92 |
| 2000 | -3.97 |
| 3000 | -0.25 |
| 4000 | 2.34 |
| 5000 | 3.99 |
| 6000 | 4.74 |
| 8000 | 4.32 |
| 12000 | 1.70 |
| 20000 | -1.23 |
| integral of ln|S|: quiet side -0.49621, loud side 0.49621 | |
| net 0.00e+00 (Bode: zero) | |
| as area in dB x kHz: quiet -32.9, loud 32.9 |
Show the full program
# Chapter 3. p31: The waterbed, computed: Bode's integral for feedback ANC.
# Model (illustrative): sampling 48 kHz; open loop of the error mic
# feedback canceller L(z) = K z^-d (1 - a) / (1 - a z^-1): a loop gain K,
# a one-pole roll-off at 300 Hz (a = exp(-2 pi 300 / fs)) and d samples
# of delay standing for driver, converters and acoustics. S = 1/(1 + L)
# is the ratio of noise with control to noise without. With L stable and
# strictly proper, the discrete Bode integral says
# integral over 0..pi of ln|S(e^jw)| dw = 0 (sum of log closed-loop
# instabilities, zero here). Closed-loop roots are checked directly.
import cmath
import math
FS, FP = 48000.0, 300.0
A = math.exp(-2 * math.pi * FP / FS)
def loop(f, k, d):
z1 = cmath.exp(-2j * math.pi * f / FS)
return k * z1 ** d * (1 - A) / (1 - A * z1)
def sens_db(f, k, d):
return 20 * math.log10(abs(1 / (1 + loop(f, k, d))))
def roots(k, d):
# z^d - a z^(d-1) + k (1 - a) = 0, Durand-Kerner iteration
c = [1.0, -A] + [0.0] * (d - 1)
c[d] += k * (1 - A)
z = [0.9 * cmath.exp(2j * math.pi * (i + 0.25) / d) for i in range(d)]
for _ in range(500):
new = []
for i, zi in enumerate(z):
p = 0j
for co in c:
p = p * zi + co
den = 1 + 0j
for j, zj in enumerate(z):
if j != i:
den *= zi - zj
new.append(zi - p / den)
z = new
return z
def integral(k, d, n=40000):
h = math.pi / n
vals = []
for i in range(n):
w = (i + 0.5) * h
f = w * FS / (2 * math.pi)
vals.append(math.log(abs(1 / (1 + loop(f, k, d)))))
neg = math.fsum(v for v in vals if v < 0) * h
pos = math.fsum(v for v in vals if v > 0) * h
return neg, pos
if __name__ == "__main__":
k, d = 10.0, 2
rmax = max(abs(r) for r in roots(k, d))
print("K = {:.0f}, d = {} samples ({:.1f} us); max |closed-loop root| "
"= {:.4f}".format(k, d, d / FS * 1e6, rmax))
print(" f (Hz) |S| dB")
for f in (50, 100, 200, 500, 1000, 2000, 3000, 4000, 5000, 6000,
8000, 12000, 20000):
print("{:>9} {:>7.2f}".format(f, sens_db(f, k, d)))
neg, pos = integral(k, d)
print("integral of ln|S|: quiet side {:.5f}, loud side {:.5f}".format(
neg, pos))
print("net {:.2e} (Bode: zero)".format(neg + pos))
scale = 20 / math.log(10) * FS / (2 * math.pi) / 1000
print("as area in dB x kHz: quiet {:.1f}, loud {:.1f}".format(
neg * scale, pos * scale))Single source and citation
Fan, Y. (2026). LMS Adaptive Filtering in In-Ear Active Noise Cancellation, Occlusion-Effect Bone-Conduction Gain and SNR-Driven Cognitive Recovery (Version 1.0.0), Chapter 3: The Waterbed of Feedback Cancellation: a Numerical Ledger of Bode's Sensitivity Integral. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-164 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026164,
author = {Fan, Yafu},
title = {LMS Adaptive Filtering in In-Ear Active Noise Cancellation, Occlusion-Effect Bone-Conduction Gain and SNR-Driven Cognitive Recovery},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · LMS and Filtered-x LMS: Where the Step-Size Bound 2/(L·P) Really Sits
- Chapter 2 · Secondary-Path Delay: Phase Error 2πfτ and the Band Edge of 10 dB Cancellation
- Chapter 4 · The Occlusion Effect: Lumped Equations of a Closed Ear Canal and the Price of a Vent
- Chapter 5 · An Exchange Rate for Signal-to-Noise: Pricing Cancellation with the Speech Intelligibility Index
- Chapter 6 · Listening Effort: Kahneman's Capacity Model and the Inverted U of the Pupil
- Chapter 7 · Sources Examined: "The Great Sound Is Faint" and Lueg's Duct
- Chapter 8 · Practice and Refutation: a Persuasive-Copy Checker and Pre-Registered Tests