Which algorithm is used for noise canceling in earphones?
Asked Answered
X

1

20

I want to program software for noise canceling in real time, the same way it happens in earphones with active noise canceling. Are there any open algorithms or, at least, science papers about it? A Google search found info about non-realtime noise reduction only.

Xuthus answered 28/6, 2011 at 8:19 Comment(1)
Did you ever get anywhere with the software?Noose
E
34

from This site

Active noise cancelling headphones in addition to all the normal headphone circuitry, have a microphone and additional special circuitry. At a basic level the microphone on the headphone picks up the ambient noise around you and relays it to the special circuitry. The special circuitry interprets the sounds and mimics it in an inverse (opposite) manner. The inverse sound it produces is sent through the headphone speakers and cancels out the ambient noise around you.

All this is based on sound waves interference. When 2 waves of opposite phases interfere the result is no sound. (it works with light too.)

You should have a look at the wikipedia page on waves interference to find the right phase you need to produce to cancel the outside noise

For a sinusoidal system:

Let's take 2 waves :

enter image description here

and

enter image description here

We want to express the resulting wave as :

enter image description here

Given A1 you want to find A2 such that A0 = 0

It means given Phi1 you need to find Phi2 such that A0=0

You can prove that:

enter image description here

And solving A0 = 0 you will get the frequency of the wave you need to create to cancel the noise. It's called destructive interferences.

enter image description here

Sound waves are not in 1 dimension... so you will just get the destructive interference in one direction:

enter image description here

Now you just need to find some stuff of sound signals...


I will try to answer your comment.

First:

A 2D problem is not much more difficult that the 1D.

The outside noise can be approximate as a source situated at the infinity. You will create a destructive noise with a source in your headphones, and you can assume that the amplitude is the same at equal distance of the source .

You need to write that down on a x,y axis (it can be good to use polar coordinates)

enter image description here

and you will be able to get the amplitude on each point on the plan using simple trigonometry formulas like :

:\sin (A + B) = \sin A \cdot \cos B + \cos A \cdot \sin B

:\cos (A + B) = \cos A \cdot \cos B - \sin A \cdot \sin B

:\sin (A - B) = \sin A \cdot \cos B - \cos A \cdot \sin B

:\cos (A - B) = \cos A \cdot \cos B + \sin A \cdot \sin B

Second:

All the delays are modeled in the "Phi" of your destructive source. Can just Adapt the Calculated Phi so it takes the delay into account.

You may need more specific information on sound since my information is very theoretic on any types of waves.

Eventuate answered 28/6, 2011 at 9:9 Comment(3)
Let's imagine, it's 2d signal. How canceling happens when we have a little delay because of sound processing?Xuthus
I tried to answer your comment, hope it helps you start with this problem.Eventuate
In the ear canal itself the propagation is pretty much one-dimensional, so problem is reduced to basically measure-bandfilter-invert-delay-and-amplify where the delay and amplification are tuned to get the electronic (i.e. fast) signal to just match up with the audio (i.e. slow) signal and the band-filter is set by the chosen to match the limits of the devices response.Veronaveronese

© 2022 - 2024 — McMap. All rights reserved.