# Questions about Active Noise Cancellation

Being new to ANC, this is my understanding of how ANC works:

Ambient noise (n) is entering a geographically small zone. To suppress the noise, an interfering (corrective) sound is injected acoustically into the zone by a speaker. The interfering sound from the speaker is adaptively generated so that it - in theory - ends up being a 180 degree phase-shifted version of the noise ....When this phase-shifted signal is acoustically mixed with the ambient noise, the noise is ideally cancelled out.

So based on the above, I would need a microphone to record sound as it presents itself in the "zone" and then let that drive an adaptive process which calculates a digital speaker signal to send to the speaker. The energy of the recorded sound would be the indicator of how well the adaptive process is performing (in terms of cancelling out the noise).

My question is : what type of algorithm(s) are used for this kind of DSP scheme?

Is one microphone enough?

What if the speaker has to output more than just the noise cancelling signal? For example: A user is wearing headphones with ANC. The user is listening to music but wants the "outside" noise to be cancelled out. I can't imagine that it would work unless the headphone has an "inside" microphone and an "outside" microphone.

Does ANC work in dimensionally small setups? For example:

The speaker is connected to a tube through which the corrective sound travels. The open end of the tube is placed in a small zone where a microphone is also located. An algorithm receives audio from the microphone, calculates the speaker signal and sends the speaker signal to the speaker. Will that work? Or are there some fundamental requirements/assumptions which have to be met for the ANC to work?

I would like to hear from people who wish to share their experience and knowledge acquired from working with ANC. Any advice is appreciated.

Thank you.

A ANC headset has an internal microphone, that's placed as close to the ear canal as possible. It than runs a regular control loop (http://en.wikipedia.org/wiki/Control_theory): It calculates a speaker signal that tries to keep the signal at the microphone at zero. If you want to play music at the same time, you simply make the "desired signal" to be the music and not zero.

However, there are all sorts of implementation problems

1. Designing the control loop is difficult in terms of stability, cancelling performance, spectral fidelity, etc.
2. Manufacturing tolerances
3. Control loops need to be fast, so they work better at low frequencies. Most good headsets use a well tuned combination of active and passive cancellation. Passive works a lot better at high frequencies
4. While the headset cavity is small, it still has a fair amount of acoustic resonance and wave propagation, so you need to correct for the sound at the microphone vs. the sound at the ear drum
5. Many newer headsets use outside microphones as well, so it's a combination of feed-forward and feedback cancellation

Once the spaces get larger than a headset, things get a lot more complicated. Now you need to take into account the spatially distributed sound field, the environment, all kinds of propagation modes.

Typically adaptive algorithms are used for this type of DSP application. There are a lot of algorithms you can try. All of them are in the family of minimising algorithms / numerical optimalization algorithms (LMS, RLS ...) You can use an adaptive filter in a specific structure, that you tune continously with the algorithm.

x(k) + n_1(k) ──────────────────────────────┐
│
┌──────────┐        v