What does In-Ear Noise Cancelling, Occlusion and Listening Effort conclude, in numbers, about “LMS and Filtered-x LMS: Where the Step-Size Bound 2/(L·P) Really Sits”?
Answer: Chapter 1 runs least-mean-squares and filtered-x least-mean-squares on synthetic noise and shows that the textbook step bound 2/(L·P) is too loose for Gaussian input: for 16 taps the exact bound is 0.1111, and the algorithm diverges once the phase error of its secondary-path model passes 90 degrees.
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: 0.1111
| bound 2/(L P) | = 0.1250 | |||
| bound 2/((L+2) P) = 0.1111 | ||||
| fastest Gaussian step 1/((L+2) P) = 0.0556 | ||||
| mu | rho_G theory | rho_G run | rho_B theory | rho_B run |
| 0.0200 | 0.96720 | 0.96589 | 0.96640 | 0.96410 |
| 0.0556 | 0.94444 | 0.93522 | 0.93826 | 0.92360 |
| 0.1000 | 0.98000 | 0.98088 | 0.96000 | 0.95900 |
| 0.1080 | 0.99395 | 0.99686 | 0.97062 | 0.97037 |
| 0.1150 | 1.00805 | 1.01255 | 0.98160 | 0.98149 |
| 0.1220 | 1.02391 | 1.04838 | 0.99414 | 0.99414 |
| 0.1300 | 1.04420 | 1.06997 | 1.01040 | 1.01037 |
| rho > 1 means the deviation grows: the filter diverges |
Show the full program
# Chapter 1. p12: Where the step-size bound 0 < mu < 2/(L P) really sits.
# Model: noise-free LMS with L = 16 taps and white input of power P = 1.
# Exact mean-square factor per step (Gaussian input, isotropic case):
# rho_G(mu) = 1 - 2 mu P + mu^2 P^2 (L + 2) -> stable iff mu < 2/((L+2)P)
# For binary +-1 input x'x = L P exactly, so
# rho_B(mu) = 1 - 2 mu P + mu^2 P^2 L -> stable iff mu < 2/(L P)
# The run estimates the per-step factor from the slope of the log of the
# ensemble-mean deviation (24 runs, 1200 steps, fixed seed). Illustrative.
import math
import random
L, P = 16, 1.0
STEPS, RUNS = 1200, 24
def measured_rho(mu, gaussian, rng):
acc = [0.0] * (STEPS + 1)
for _ in range(RUNS):
v = [rng.gauss(0.0, 1.0) for _ in range(L)]
buf = [0.0] * L
acc[0] += math.fsum(t * t for t in v)
for k in range(1, STEPS + 1):
if gaussian:
xn = rng.gauss(0.0, math.sqrt(P))
else:
xn = math.sqrt(P) * rng.choice((-1.0, 1.0))
buf.insert(0, xn)
buf.pop()
e = math.fsum(a * b for a, b in zip(v, buf))
v = [a - mu * e * b for a, b in zip(v, buf)]
acc[k] += math.fsum(t * t for t in v)
lo, hi = acc[200], acc[STEPS]
return math.exp((math.log(hi) - math.log(lo)) / (STEPS - 200))
if __name__ == "__main__":
rng = random.Random(20261112)
print("bound 2/(L P) = {:.4f}".format(2 / (L * P)))
print("bound 2/((L+2) P) = {:.4f}".format(2 / ((L + 2) * P)))
print("fastest Gaussian step 1/((L+2) P) = {:.4f}".format(
1 / ((L + 2) * P)))
print(" mu rho_G theory rho_G run rho_B theory rho_B run")
for mu in (0.02, 0.0556, 0.10, 0.108, 0.115, 0.122, 0.13):
tg = 1 - 2 * mu * P + mu * mu * P * P * (L + 2)
tb = 1 - 2 * mu * P + mu * mu * P * P * L
rg = measured_rho(mu, True, rng)
rb = measured_rho(mu, False, rng)
print("{:>7.4f} {:>11.5f} {:>10.5f} {:>12.5f} {:>10.5f}".format(
mu, tg, rg, tb, rb))
print("rho > 1 means the deviation grows: the filter diverges")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 1: LMS and Filtered-x LMS: Where the Step-Size Bound 2/(L·P) Really Sits. 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 2 · Secondary-Path Delay: Phase Error 2πfτ and the Band Edge of 10 dB Cancellation
- Chapter 3 · The Waterbed of Feedback Cancellation: a Numerical Ledger of Bode's Sensitivity Integral
- 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