Author Topic: How do noise cancelling headphones *really* work?  (Read 7095 times)

0 Members and 1 Guest are viewing this topic.

Online ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 6480
  • Country: de
Re: How do noise cancelling headphones *really* work?
« Reply #25 on: June 17, 2018, 12:32:03 pm »
One way to get rid of the delay is to develop a model for environmental noise, created by constantly sampling ambient sounds with microphones. If you are smart and lucky, you can then predict future noise levels and subtract them in realtime.

Nah... This would only work for synthesising noise. Noise isn't subtractive, it's additive.

I would put it another way: You need to add a noise signal with the correct (complex) amplitude, with exactly the opposite phase of the real-world noise. If you do that, desctructive interference will result and the noise is indeed "subtractive". But adding noise with the right intensity spectrum only, and random phase, will not do the job.
 

Offline InterestedTom

  • Regular Contributor
  • *
  • Posts: 56
  • Country: england
Re: How do noise cancelling headphones *really* work?
« Reply #26 on: June 17, 2018, 02:00:01 pm »
One way to get rid of the delay is to develop a model for environmental noise, created by constantly sampling ambient sounds with microphones. If you are smart and lucky, you can then predict future noise levels and subtract them in realtime.

Nah... This would only work for synthesising noise. Noise isn't subtractive, it's additive.

I would put it another way: You need to add a noise signal with the correct (complex) amplitude, with exactly the opposite phase of the real-world noise. If you do that, desctructive interference will result and the noise is indeed "subtractive". But adding noise with the right intensity spectrum only, and random phase, will not do the job.

Noise by it's definition is unpredictable, it is not periodic, periodic signals repeat periodically ad infinitum. Noise cannot have phase because it has no period.
 

Online ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 6480
  • Country: de
Re: How do noise cancelling headphones *really* work?
« Reply #27 on: June 17, 2018, 02:11:31 pm »
Noise by it's definition is unpredictable, it is not periodic, periodic signals repeat periodically ad infinitum. Noise cannot have phase because it has no period.

You are applying a narrow definition of noise here. I am not sure whether, even as a technical term used in signal processing, this would be generally accepted as a property for all kinds of "noise". https://en.wikipedia.org/wiki/Noise_(signal_processing)

More relevant to the present discussion: I am not sure whether "noise cancelling headphones" can actually deal with "noise" which meets your criteria. That would exactly lead back to the question whether the feed-forward correction works by simply inverting the present signal (and hence only works if the processing and output delay can be neglected), or whether it assumes a mix of frequencies which are repetitive at least over short time scales. For a pure feed-back approach, based on a microphone behind the speaker, I can't see how it would deal with random noise at all.

I think the manufacturers of "noise cancelling headphones" apply the term "noise" in the colloquial sense of "unwanted sounds" -- most of which will be periodic in nature, at least over short timescales.
 
The following users thanked this post: InterestedTom

Offline InterestedTom

  • Regular Contributor
  • *
  • Posts: 56
  • Country: england
Re: How do noise cancelling headphones *really* work?
« Reply #28 on: June 17, 2018, 02:17:28 pm »
Noise by it's definition is unpredictable, it is not periodic, periodic signals repeat periodically ad infinitum. Noise cannot have phase because it has no period.

You are applying a narrow definition of noise here. I am not sure whether, even as a technical term used in signal processing, this would be generally accepted as a property for all kinds of "noise". https://en.wikipedia.org/wiki/Noise_(signal_processing)

More relevant to the present discussion: I am not sure whether "noise cancelling headphones" can actually deal with "noise" which meets your criteria. That would exactly lead back to the question whether the feed-forward correction works by simply inverting the present signal (and hence only works if the processing and output delay can be neglected), or whether it assumes a mix of frequencies which are repetitive at least over short time scales. For a pure feed-back approach, based on a microphone behind the speaker, I can't see how it would deal with random noise at all.

I think the manufacturers of "noise cancelling headphones" apply the term "noise" in the colloquial sense of "unwanted sounds" -- most of which will be periodic in nature, at least over short timescales.

Yes. Sorry, I assumed djnz meant noise in the engineering/physics sense since most sounds are unpredictable (with just a microphone).
 

Offline InterestedTom

  • Regular Contributor
  • *
  • Posts: 56
  • Country: england
Re: How do noise cancelling headphones *really* work?
« Reply #29 on: June 17, 2018, 02:30:52 pm »
Noise by it's definition is unpredictable, it is not periodic, periodic signals repeat periodically ad infinitum. Noise cannot have phase because it has no period.

You are applying a narrow definition of noise here. I am not sure whether, even as a technical term used in signal processing, this would be generally accepted as a property for all kinds of "noise". https://en.wikipedia.org/wiki/Noise_(signal_processing)

More relevant to the present discussion: I am not sure whether "noise cancelling headphones" can actually deal with "noise" which meets your criteria. That would exactly lead back to the question whether the feed-forward correction works by simply inverting the present signal (and hence only works if the processing and output delay can be neglected), or whether it assumes a mix of frequencies which are repetitive at least over short time scales. For a pure feed-back approach, based on a microphone behind the speaker, I can't see how it would deal with random noise at all.

I think the manufacturers of "noise cancelling headphones" apply the term "noise" in the colloquial sense of "unwanted sounds" -- most of which will be periodic in nature, at least over short timescales.

You are right, it only works because the processing delay is sufficiently small to allow the interference signals to be sufficiently attenuated, even if they are noise-like.
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: How do noise cancelling headphones *really* work?
« Reply #30 on: June 17, 2018, 03:46:40 pm »
Just curious... I have Googled and read a bit, but find the explanations I came across unsatisfying. Sure, in principle you want to measure the incoming environmental noise with a microphone mounted to each ear's headphone; then add an inverted copy of the signal to the signal driving the respective speaker. But how does this actually work in practice?

They use optimized variants of the Least-Mean-Squares algorithm to implement an adaptive filter. Read all about it in Widrow and Stearns’ classic text “Adaptive Signal Processing.” A microphone is used to capture the noise signal outside of the ear cup, another microphone is used to capture the signal+noise (at the ears, essentially). Since you know the noise signal and you know the desired signal (after all, it’s what you’re playing through the headphones), the loop can easily derive the cancellation signal.

Such noise cancellers work well eliminating the low-frequency continuous drone of an airline cabin. They can’t follow transients, so the addition of cups that seal the ears from the environment help with that.

I did an adaptive noise canceller in a TMS320C30 a long time ago, basically implementing the example shown in the book (a fan masking the sound of a person talking through a microphone). It worked well enough.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16615
  • Country: us
  • DavidH
Re: How do noise cancelling headphones *really* work?
« Reply #31 on: June 17, 2018, 03:52:11 pm »
It really is not that difficult.  Propagation through the mechanical structure of the headphone is slow compared to electronics so delay only becomes a problem at higher frequencies where phase becomes very sensitive to the environment and this is where the effectiveness of cancellation falls off but since dampening improves at higher frequencies, this is not as much of a problem.

Analog implementations work great and only require a filter with the proper phase and amplitude response which is a textbook exercise.  If anything the largest problem in low power designs is excess noise in the active circuitry which results in an objectionable hiss.  A very noticeable improvement of 10 to 20dB up to a couple kHz is feasible.

Digital designs work the same way with phase and amplitude matching implemented with an FIR filter or equivalent.  Just as with an analog filter, delay depends on the lowest frequency of operation.  Digital designs have the advantage of being capable of adaptation.

It is instructive to think about how echo cancellation in a POTS type of modem works.  A large part of the 120 millisecond latency is delay through the FIR filter which has to be long enough to *wait* for the far end echo so that it may be cancelled.  For a noise cancelling headphone, the delay through the filter has to match the speed of sound delay through the headphone structure which is not a difficult task.
 

Online ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 6480
  • Country: de
Re: How do noise cancelling headphones *really* work?
« Reply #32 on: June 17, 2018, 05:12:23 pm »
It really is not that difficult.  Propagation through the mechanical structure of the headphone is slow compared to electronics so delay only becomes a problem at higher frequencies [...]

As I said earlier, that's one possibility. But I am not sure whether I quite believe it:

Let's say the distance between the outside microphone and the speaker is 30 mm in a headphone -- that only gives you 0.1ms of acoustical propagation delay to work with. The Infineon microphone alone which wraper linked to (reply #10 above) has 30° phase delay at 50 Hz; that's your electronic path lagging behind by 1.5ms. The speaker might add more lag; let alone digitization, if you apply digital filtering.

How do you make up for that without some predictive approach for your cancellation signal? Or what am I overlooking?

EDIT: Probably the group delay (along the electronic path for the cancellation signal) is what one should be looking at, rather than the phase delay. But that has a similar order of magnitude for the Infineon microohone: Extrapolating from the range shown in Fig. 10 of the application note, I would estimate 1.5ms group delay at 50 Hz.
« Last Edit: June 17, 2018, 05:42:28 pm by ebastler »
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11887
  • Country: us
Re: How do noise cancelling headphones *really* work?
« Reply #33 on: June 17, 2018, 05:22:52 pm »
Just curious... I have Googled and read a bit, but find the explanations I came across unsatisfying. Sure, in principle you want to measure the incoming environmental noise with a microphone mounted to each ear's headphone; then add an inverted copy of the signal to the signal driving the respective speaker. But how does this actually work in practice?

I think there are only two options for this technology. Either it is a trade secret held by Bose, Sony and others, or there are patents filed for IP protection. In the first case you won't easily find out, but in the second case you should be able to look up the relevant patents and find a description.

There are at least some patents filed in this area.
 

Online ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 6480
  • Country: de
Re: How do noise cancelling headphones *really* work?
« Reply #34 on: June 17, 2018, 05:51:40 pm »
[...] you should be able to look up the relevant patents and find a description.
There are at least some patents filed in this area.

I agree, and admit that -- although I do often enjoy studying patents -- I have been too lazy to do so in this case, so far. There are many patents in this field... Bose claims that its most recent pilot headset alone is covered by 30 patents (or applications, I assume).

And one never quite knows which of the patented ideas are actually used in real-world products. E.g. while the second, downstream microphone (used to control the adaptive filtering) is described in DSP application notes and probably patents, I had not expected to see them used in consumer headphones. The teardown photos on the web, and Howardlong's report on having taken one apart himself, were most helpful -- and surprising to me!
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 8646
  • Country: gb
Re: How do noise cancelling headphones *really* work?
« Reply #35 on: June 17, 2018, 06:12:42 pm »
Just curious... I have Googled and read a bit, but find the explanations I came across unsatisfying. Sure, in principle you want to measure the incoming environmental noise with a microphone mounted to each ear's headphone; then add an inverted copy of the signal to the signal driving the respective speaker. But how does this actually work in practice?

They use optimized variants of the Least-Mean-Squares algorithm to implement an adaptive filter. Read all about it in Widrow and Stearns’ classic text “Adaptive Signal Processing.” A microphone is used to capture the noise signal outside of the ear cup, another microphone is used to capture the signal+noise (at the ears, essentially). Since you know the noise signal and you know the desired signal (after all, it’s what you’re playing through the headphones), the loop can easily derive the cancellation signal.

Such noise cancellers work well eliminating the low-frequency continuous drone of an airline cabin. They can’t follow transients, so the addition of cups that seal the ears from the environment help with that.

I did an adaptive noise canceller in a TMS320C30 a long time ago, basically implementing the example shown in the book (a fan masking the sound of a person talking through a microphone). It worked well enough.
What you describe is the basis of classic noise cancelling with speakers. However, headphones can generally much simpler, because the setup has a lot less variability. I know that most noise cancelling headphones are simple analogue designs, and its not clear to me that even the high ones are any different.
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11887
  • Country: us
Re: How do noise cancelling headphones *really* work?
« Reply #36 on: June 17, 2018, 06:31:36 pm »
What you describe is the basis of classic noise cancelling with speakers. However, headphones can generally much simpler, because the setup has a lot less variability. I know that most noise cancelling headphones are simple analogue designs, and its not clear to me that even the high ones are any different.

What is clear, is that some headphones work better than others.

I think part of this is down to engineering. You can innovate and come up with all sorts of clever ideas, but if you don't engineer the product well the clever ideas will come to nothing. I suspect the difference between products that perform more or less well is often down to how good a job the engineers did in implementing the solution.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16615
  • Country: us
  • DavidH
Re: How do noise cancelling headphones *really* work?
« Reply #37 on: June 17, 2018, 07:06:53 pm »
I have used a couple of analog implementations over the years and they all worked about the same and had the same design flaw with excess noise.  Micropower CMOS operational amplifiers just suck for audio but that is what they use and I have no faith that the digital ones are any better in this respect and they are probably even worse.

 

Online ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 6480
  • Country: de
Re: How do noise cancelling headphones *really* work?
« Reply #38 on: June 17, 2018, 07:34:45 pm »
A microphone is used to capture the noise signal outside of the ear cup, another microphone is used to capture the signal+noise (at the ears, essentially). Since you know the noise signal and you know the desired signal (after all, it’s what you’re playing through the headphones), the loop can easily derive the cancellation signal.

What you describe is the basis of classic noise cancelling with speakers. However, headphones can generally much simpler, because the setup has a lot less variability.

Why would you say that? As mentioned above several times, and shown in the teardown video and pictures, the approach with two microphones, upstream and downstream, seems common in consumer ANC headphones. (At least the ones from Bose.)

Quote
I know that most noise cancelling headphones are simple analogue designs, and its not clear to me that even the high ones are any different.

This looks pretty digital to me. (Bose QC35)

 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 28379
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 8646
  • Country: gb
Re: How do noise cancelling headphones *really* work?
« Reply #40 on: June 17, 2018, 08:46:19 pm »
A microphone is used to capture the noise signal outside of the ear cup, another microphone is used to capture the signal+noise (at the ears, essentially). Since you know the noise signal and you know the desired signal (after all, it’s what you’re playing through the headphones), the loop can easily derive the cancellation signal.
What you describe is the basis of classic noise cancelling with speakers. However, headphones can generally much simpler, because the setup has a lot less variability.
Why would you say that? As mentioned above several times, and shown in the teardown video and pictures, the approach with two microphones, upstream and downstream, seems common in consumer ANC headphones. (At least the ones from Bose.)
What relevance does that have to whether a complex adaptive scheme is needed or not?
Quote
I know that most noise cancelling headphones are simple analogue designs, and its not clear to me that even the high ones are any different.
This looks pretty digital to me. (Bose QC35)
The QC35 is a bluetooth headset, so it clearly has considerable digital and RF hardware. That doesn't mean the cancellation is digital. What looks digital about the board, anyway?
 

Online ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 6480
  • Country: de
Re: How do noise cancelling headphones *really* work?
« Reply #41 on: June 17, 2018, 09:02:19 pm »
As mentioned above several times, and shown in the teardown video and pictures, the approach with two microphones, upstream and downstream, seems common in consumer ANC headphones. (At least the ones from Bose.)
What relevance does that have to whether a complex adaptive scheme is needed or not?

I assume the second microphone (error detection, behind the speaker) is there to provide the input for the adaptive scheme. Otherwise, why would it be needed in addition to the first microphone (outside, to detect the environmental noise)?

Quote
This looks pretty digital to me. (Bose QC35)
What looks digital about the board, anyway?

Largish chips and a quartz clock?

Bose does state that they have moved to digital signal processing, apparently starting with the QC25 (which is not wireless). https://media.americanmusical.com/ItemFiles/Manual/Bose_QC25_FAQ.pdf
 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 28379
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: How do noise cancelling headphones *really* work?
« Reply #42 on: June 17, 2018, 09:08:44 pm »
The QC35 has corded input too, BT is only there if you need to use it and selectable. Battery life is of course less when  you do.
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 8646
  • Country: gb
Re: How do noise cancelling headphones *really* work?
« Reply #43 on: June 17, 2018, 09:46:42 pm »
This looks pretty digital to me. (Bose QC35)
What looks digital about the board, anyway?
Largish chips and a quartz clock?
That's what most bluetooth solutions look like.
Bose does state that they have moved to digital signal processing, apparently starting with the QC25 (which is not wireless). https://media.americanmusical.com/ItemFiles/Manual/Bose_QC25_FAQ.pdf
The description in that document is odd. It seems to imply they changed to digitising the signal only to get the size of the hardware down, but still using the techniques from the older headphones. They also say their approach to digitising is low latency, to avoid problems other digital solutions cause. That doesn't sound like an adaptive solution.
 

Offline CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5231
  • Country: us
Re: How do noise cancelling headphones *really* work?
« Reply #44 on: June 18, 2018, 03:40:52 am »
One thing that helps in wrapping your head around how these things work is to remember the wavelength of the sounds involved.  As mentioned previously the cancellation works best at low frequencies, typically a couple of thousand Hertz and lower.  With sound velocity about 340 meters/second, a 2000 Hz "noise" has a wavelength of about 17 cm, which is huge compared to the headphone volumes. 

The second thing that helps is recognizing that they don't help nearly as much for white noise.  They are really good for engine rotation frequencies and their overtones, resonant frequencies of aircraft structures and the like.  My Bose headphones are magic for reducing cabin noise in an airliner.  Not nearly so magical for office noise, unless that noise is dominated by things like the hum from fluorescent lights, fan noise and the like.
 

Online ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 6480
  • Country: de
Re: How do noise cancelling headphones *really* work?
« Reply #45 on: June 18, 2018, 05:37:49 am »
Largish chips and a quartz clock?
That's what most bluetooth solutions look like.

Yes, but they wouldn't use two identical chips on the same PCB, would they? (I'm not sure what these are in the context of digital signal processing either, of course.)

There are a few more disassembly photos in this thread: https://community.bose.com/t5/Wireless-Headphones/QC35-Bluetooth-Stuttering-Drop-outs/td-p/23495/page/23. Having seen a few PCBs of analog ANC implementations, I would say there is simply not enough analog stuff present in the QC35 to do the filtering etc. in analog hardware.
 

Offline InterestedTom

  • Regular Contributor
  • *
  • Posts: 56
  • Country: england
Re: How do noise cancelling headphones *really* work?
« Reply #46 on: June 18, 2018, 04:27:58 pm »
Largish chips and a quartz clock?
That's what most bluetooth solutions look like.

Yes, but they wouldn't use two identical chips on the same PCB, would they? (I'm not sure what these are in the context of digital signal processing either, of course.)

There are a few more disassembly photos in this thread: https://community.bose.com/t5/Wireless-Headphones/QC35-Bluetooth-Stuttering-Drop-outs/td-p/23495/page/23. Having seen a few PCBs of analog ANC implementations, I would say there is simply not enough analog stuff present in the QC35 to do the filtering etc. in analog hardware.

Erm could either be digital or analog.

Digital: two DSPs running independent algorithms.

Analog: Switched capacitor filters.

But I doubt a company would get away with saying they are using one technology when actually they are using another.
 

Offline mark03

  • Frequent Contributor
  • **
  • Posts: 711
  • Country: us
Re: How do noise cancelling headphones *really* work?
« Reply #47 on: June 18, 2018, 05:36:51 pm »
As far as I am aware, no one is using digital, LMS adaptive-filter-based noise cancelation in a headphone form factor.  If anyone has definitive evidence to the contrary I would be *very* interested to see it.  The reason is fairly obvious, as already pointed out in this thread:  the acoustic delay from a microphone mounted *on* the headphones, to the inside of your ear, is nowhere near long enough to do DSP, unless you gin up something really crazy with analog-based discrete-time processing.  The A/D and D/A delays alone would kill you.  Now, of course this doesn't matter if the noise is periodic, but in practice those systems don't perform very well, in fact not as well as the analog-based feedback/feedforward combos.  (Austria Microsystems, or whatever they are called now, have a whole range of chips intended for this application, and some nice app notes to learn more about it.)

I believe the better analog ANC systems, like the ones from Bose, have a certain amount of digital tunability to optimize performance across different users and varying fit.  That's more than enough for a marketing department to claim "digital ANC!!!!"  ;)
 
The following users thanked this post: ebastler

Offline m98

  • Frequent Contributor
  • **
  • Posts: 615
  • Country: de
Re: How do noise cancelling headphones *really* work?
« Reply #48 on: June 18, 2018, 07:36:28 pm »
In terms of aviation headsets, Lightspeed Zulu 3 has, at least subjectively to me a little better noise canceling performance than the Bose A20. And they seem to use a lot of discrete analog signal processing for their ANR technology.
https://fccid.io/2AFOMLSA01/Internal-Photos/Internal-Photos-3759648
 
The following users thanked this post: ebastler

Offline bson

  • Supporter
  • ****
  • Posts: 2270
  • Country: us
Re: How do noise cancelling headphones *really* work?
« Reply #49 on: June 19, 2018, 03:36:18 am »
(a) I assume that there is a phase delay in the microphone, and in driving the speaker. So if you simply invert the microphone's signal, your resulting speaker output will probably be "too late" -- right?
Reactive phase, i.e. an angle between voltage and current is a delay (on either voltage or current).  But this is not the only use of "phase"; if you go back to the basics:
S = M*sin(wt+p) where p is the phase, you can see there is no "delay" here.  For any t that produces S=M, making p=pi makes S=-M for exactly the same t.  Hence, signal inversion is a 180 degree phase change, just not a reactive one.  Of course, inverting a signal without delaying a full cycle is trivial.  (Other non-reactive phase changes are much harder in a circuit, but trivial using DSP.)
« Last Edit: June 19, 2018, 03:38:27 am by bson »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf