Looking for help with hybrid ANC

Hi there,
I’m building an aviation headset and trying to add ANC to it. I’ve got a working prototype with an ESP32, can make BT calls, play music, hear the radio and speak through the mic. I do want to add ANC now.
I found this GitHub project which others on this forum have also referenced, the project implements the feedback only version but the hybrid version is for sure better.
I’m a bit familiar with ML, LMS, FxLMS, FxNLMS, feedback and feedforward ANC, primary and secondary paths, but I’m a software developer and not an audio or DSP expert. I was wondering if one of you out here could help me out? Obviously help isn’t free. If you’re interested, reach out via PM :slight_smile: !
Wishing you a great day !

Hi aviation101!

Doing ANC is not trivial. Even before the challenge of getting your adaptive filter to do what you want (feedback, feedforward, hybrid, whatever), you’ve got the extreme challenge of doing it all within the absolute minimum amount of time. To be more specific: the time difference between the audio signal hitting the input and the processed signal exiting the output must be absolutely minimized for ANC. Any delay, reduces the upper frequency limit of the ANC. More delay lowers the maximum frequency that can be addressed by the ANC. In fact, it takes only a little bit of delay for ANC to fail entirely. So, you have to make sure that your hardware and software approach can handle very, very, very low latency processing.

Looking at the GitHub repo that you linked, I see that they are using the Teensy’s ADC and DAC for audio. The built-in ADC and DAC are not usually considered good enough for audio; in comparison to a dedicated audio interface chip (such as is used in the Tympan), the built-in ADC and DAC will be very noisy. The benefit of using the built-in ADC and DAC, however, is that they have much less latency than an audio-specific chip. They latency of the built-in ADC/DAC will probably be less than one sample period, whereas a dedicated audio chip will have 20-40 sample periods of latency. You cannot do any useful ANC when your latency is 20-40 samples long.

So, if you’re going to pursue ANC, be aware that there are many surprise requirements like this latency issues. Therefore, I recommend that you start your journey by simply trying to recreate what they did in the GitHub repo. Don’t try to improve anything; just build what they built. If you get it to work at all, you’re doing great. Then you can try to improve it. By listening to your system, you’ll know what you want to improve. Nosie? Frequency response? Transient response? Etc.

Good luck. ANC is hard.

Chip