A while ago I blogged on the topic of active noise cancellation in general, and how it is often (falsely) perceived as a panacea for getting rid of noise in just about any situation. While the theory is seductively simple and sounds quite attractive – “just add anti-noise and the noise goes away” – determining exactly what that “anti-noise” is and generating an approximation to it in real-time, as well as deciding just where and how to actually add it can be devilishly complex. In addition to such practical implementation issues, there are often limitations imposed by basic physics. But, as I mentioned in my previous post, there are some specific situations where active noise control (ANC) can indeed work very well, with products out there taking advantage of the ANC concept. One of these situations is when a person is able to wear headphones or an in-ear device (e.g., earbuds), in which case active noise cancellation techniques can be quite feasible and effective to apply. So, for this blog, I’d like to go a bit more into why this is the case and how active noise canceling headphones actually work.
The “anti-noise” mentioned above is actually just the inverse of the sound pressure waveform we want to cancel – that is, something like a loudspeaker is used to try to produce an exact replica of that “disturbance” waveform (as measured by a microphone) except that it’s 180 degrees out of phase with it so that when the two waves (the one from the disturbance and the one from the loudspeaker) combine in the air they add together so as to cancel each other out. Of course, this “destructive interference” only works if the strength and frequency of both waves exactly match each other and they truly are 180º out of phase, and if the canceling waveform provided by the speaker can “keep up” with any changes in the disturbing noise (i.e., this is all easier to do for a processor utilizing adaptive control algorithms if this sound is relatively steady or varies slowly – speech sounds are often changing too fast (and many of the frequencies are too high for ANC to be effective) so using ANC to silence any nearby loudmouths usually won’t be all that successful). Any departure from these conditions will lead to less than perfect cancellation and can even make matters much worse than doing nothing at all if the departures are too great. Implicit in all this is the notion that, while the “combining” actually takes place over a large space, the simplistic operation described above focuses on these conditions being met at just one specific location within this space. So, even if perfect cancellation were achieved at that single point, there very well could be other locations where the phase or amplitude of the canceling wave from the speaker is not quite right (or even quite incorrect) to achieve cancellation.
Now here’s where the main advantage of a headphone application comes into play. Because the space over which we’re trying to achieve cancellation in this situation is so small (i.e., the volume between the headphone speaker and the eardrum, or an even smaller volume for an in-ear device) compared to that in, say, a room, we don’t have to worry nearly so much about non-uniform cancellation within the volume. That’s because, for frequencies less than around 1000 to 2000 Hz or so, the typical length dimensions in this small enclosed volume are much less than the wavelengths of sound (higher frequencies will have smaller wavelengths, so this condition will eventually not be met as frequency increases). This implies a more uniform sound field, which means that cancellation is much more likely to be effective over the entire volume, and we avoid the problem of possibly making matters worse at some locations within that space.
But what about unwanted sounds at those higher frequencies? Headphones, especially if they are the circumaural (over-ear) in design, as well as earbuds, also have the advantage of employing passive noise attenuation just due to the material forming a seal around the ear (or in the ear canal in the case of earbuds). Such attenuation tends to be more effective at higher frequencies than at low, thus complementing active noise cancellation with its higher effectiveness at lower frequencies. Finally, headphones have the inherent advantage of already having loudspeakers in place, so they are well suited for the application of ANC which, of course, needs this component.
Besides speakers, other basic components needed in an ANC headphone are one or more microphones, a power supply, and circuitry (analog or digital) for turning those microphone signals into appropriate signals that can drive the speakers to produce the necessary “anti-sound”. In the most simplistic implementations (and without thinking for now about any desired audio content that may be going into the headphone), the microphone is placed inside the earcup so as to sense the noise getting in from the outside of the headphone into the space within the earcup. In this implementation, the ANC system is configured to utilize feedback control to minimize the sound level in the earcup as sensed by this “error” microphone. As discussed above, since the volume within the earcup is “small”, minimizing the sound at the microphone position will mean it’s also minimized where it counts, which is, of course, at the eardrum. So, if you think about it, the ANC system has to do things very fast – that is, at any point in time, it has to sense the noise inside the earcup, create basically an inverted representation of that noise and then send that signal out to the headphone speaker to produce the anti-noise to cancel the noise being measured right then at the microphone. In practice, this is a continuous process and the ANC “guts” can be thought of as basically producing a filter that’s continuously adjusted/adapted on the fly as the incoming noise changes. And all without introducing artifacts or going unstable (as some feedback systems are prone to doing if not designed correctly). Analog implementations of this feedback control have the advantage of not having any inherent processing delay. Digital implementations offer greater flexibility in control algorithms (and, potentially, greater noise reduction), but care has to be taken to ensure that the digitization and processing steps do not introduce too much delay – otherwise the cancellation wave will no longer be 180 degrees out of phase with the sound to be canceled (cancellation performance at higher frequencies will be the most sensitive to such delays). Digital implementations also tend to be more power-hungry than analog, which will have implications for battery size/life.
Another implementation of ANC utilizes a microphone placed on the outside of the earcup to obtain a “reference” signal instead of an interior microphone to obtain an error signal. This “feedforward” approach has the advantage of sensing the disturbing noise a bit sooner than an interior microphone (and the headphone wearer) would, thus buying some critical time for the system to determine an appropriate cancellation signal to send to the headphone speaker (this is more of a factor for digital implementations than analog). Also, since an external microphone is much more acoustically isolated from the speaker than an internal microphone, the system is less susceptible to feedback instability. In practice, the extra time to figure out things generally allows the system to cancel sounds up to higher frequencies than a feedback system could, but since the microphone is on the outside it has some disadvantages. Among these is that it does not sense the actual sound that the ear hears within the earcup, and so cannot adapt to changes brought on by, say, the wearer shifting the position of the headphone (it relies on a predetermined/modeled transfer path between the external microphone and the inside of the earcup). Another disadvantage is that an exterior microphone is susceptible to wind-induced noise, which can adversely affect the cancellation signal that the system thinks it needs to produce. For in-ear ANC devices (earbuds), as opposed to headphones, a feedforward design with its externally located microphone is usually more practical than trying to fit an error microphone on the interior side of the earbud, although there has been some research effort in this area to produce just such a device.
As you might have guessed, there are also combination feedback/feedforward implementations that utilize both interior and exterior microphones. Such “hybrid” systems, if they are well-designed, can maximize the best of both approaches, creating a more adaptive version of the feedforward system that can provide higher noise reductions under more conditions. They will, however, tend to be more expensive due to their added hardware and complexity.
But what about audio, where you actually want to use the ANC headphone to listen to music or other content? That is, after all, the main point of headphones. So far I’ve sidestepped this detail, but not because it’s unimportant, but because it turns out that, if implemented properly, adding an audio signal to the cancellation signal being sent to the headphone speakers does not affect the inner workings and primary design of an ANC headphone. This may be a bit counterintuitive since when you think about it, what’s to prevent at least a feedback system from also trying to cancel out the audio? After all, the audio sound will be present within the earcup space and be picked up by the “error” microphone. The trick here is to also feed that same audio signal into an estimate of the transfer path between the speaker and the microphone, and then subtract the result from the microphone output. As long as a reasonably accurate estimate of the path is available (which is fairly straightforward to obtain by direct measurement), this compensation will in effect remove the audio content from the microphone signal so it won’t figure into the generation of the cancellation signal (i.e., the cancellation will only try to cancel the disturbing noise). However, with all this processing being carried out, some people do get concerned that the original audio can suffer when ANC is active.
The above are just some of the broader issues that govern the inner workings of active noise cancellation headphones. It is indeed a rich area, partly because, as I have tried to explain, ANC works so well in this particular situation, and this success, in turn, makes it worthwhile for companies and others to strive to refine and improve this type of widely adopted “anti-noise” product.