Leaky FXLMS adds coefficient decay to the standard Filtered-X LMS loop.
The leakage term shrinks the adaptive filter slightly on each update. In the original fixed-point context that was a practical way to limit overflow and output growth. In this floating-point implementation it acts like a regularizer that reduces coefficient drift and makes long runs more forgiving.
Core Equation
Leaky FXLMS changes the coefficient update to:
\[\mathbf{w}(n+1) = v \mathbf{w}(n) - \mu e(n) \mathbf{x}'(n)\]with $0 < v < 1$ as the leakage factor. When $v$ approaches $1$, the controller behaves more like ordinary FXLMS. As $v$ decreases, the controller forgets older coefficients more aggressively.
Benchmark Interpretation
The primary benchmark trades attenuation for robustness: 16.408 dB in the example configuration versus the much deeper cancellation produced by plain FXLMS. That is the expected behavior. Leakage is buying margin, not free performance.
Leakage sweep
The sweep makes the tradeoff clear: stronger leakage reduces the controller's ability to settle at a deep residual minimum.
Tuning Notes
- Keep leakage close to
1.0unless you have a concrete reason to apply stronger decay. - Tune step size first, then introduce the smallest amount of leakage that stabilizes long-run behavior.
- If the controller already tracks cleanly and coefficients are well-behaved, plain FXLMS is usually the better option.
Using It From C++
The implementation reuses anc::FxlmsController with a leakage value below 1.0.
#include "anc/fxlms_controller.h"
anc::FxlmsConfig config;
config.controllerOrder = 48;
config.secondaryEstimate = {0.0, 0.12, 0.38, 0.21, -0.05};
config.stepSize = 0.005;
config.leakage = 0.999;
anc::FxlmsController controller(config);
If you are migrating between the two modes, the only code change is the config value. The runtime loop remains identical to FXLMS.
CLI Reproduction
build\Debug\anc_cli.exe `
--algorithm leaky-fxlms `
--summary analysis_output\raw\leaky_fxlms_broadband_summary.csv `
--timeseries analysis_output\raw\leaky_fxlms_broadband_timeseries.csv `
--samples 12000 `
--controller-order 48 `
--step-size 0.005 `
--leakage 0.999