Active Noise Cancellation Functions in Matlab and C
A bunch of functions implementing active noise cancellation using various LMS algorithms (FxLMS, FuLMS, NLMS) in Matlab and C. I wrote these as part of my final project for an Audio Signal Processing class during my masters.
I've also included a short & not very serious powerpoint of a 5 minute lightning talk I gave on the project later at the Recurse Center.
Here's a slightly more serious paper I wrote about some of my experiments with ANC and this code.
Functions:
- LMS (Least Mean Squares): most basic canonical ANC algo
- FxLMS (Filtered eXtended Least Mean Squares): adds an additional learned filter for the secondary path signal - signal from cancellation speakers to users ears - to account for phase problems and audio coloration added during practical noise cancellation applications
- NLMS (Normalized Least Mean Squares): adds simple adaptively updated learning rate on top of LMS to speed convergence.
- FxNLMS (Normalized Filtered eXtended Least Mean Squares): combines FxLMS and NLMS
- FuNLMS (Filtered-u Last Mean Squares): adds an additional active LMS filter to FxNLMS to cancel out noise bleeding from the cancellation speaker to the error mic. Fairly robust but convergence not gaurunteed!