(Note: This article originally appeared on EE Times Europe's Analog site.)
When the insistent drone of massed vuvuzela first imposed itself on the world during televised world Cup matches, I thought "Huh! Well, they'll soon filter that out". But soon it became clear that removing this narrow-band noise was presenting challenges to broadcast engineers.
Figure 1 shows an FFT of a 1.024-second chunk of vuvuzela-dominated crowd noise. Pronounced peaks in the spectrum are at frequencies consistent with what's reported elsewhere: fundamental at ~230 Hz, with plenty of harmonics. The third harmonic at ~700 Hz is the most prominent component. That's consistent with the 'buzzy' quality of the sound.
A single vuvuzela produces a fundamental and harmonics with a narrow occupied bandwidth. Hundreds of them, each played in an unique on-off pattern, will give a broadened spectrum equivalent to a single 'carrier' modulated by a random signal with Gaussian shape. So the elimination problem is more than removing a single tone and its harmonics; we have to suppress several bands of noise.
Figure 1: FFT of a sample of vuvuzela
The starting choice for notching multiple related frequencies out is often a lowpass comb filter. It is a two-tap FIR filter where you add the input signal to a delayed version of itself. For any input frequency at which the delayed term causes a multiple of 180 degrees phase shift, the input and delayed signals cancel out. A deficiency of this method here is that the resultant notches only occur at odd multiples of the first notch frequency, shown in Figure 2.
Figure 2: Lowpass comb filter
In our case, this method leaves the even order harmonic bands unattenuated, and they now stick out like a sore thumb (or should that be a sore throat?), see Figure 3.
Figure 3: Lowpass comb only attenuates fundamental and odd harmonics
If you take the difference between input and a delayed signal, you get a highpass comb filter. If we make the delay equal to the period of the fundamental, we get notches at every multiple of the fundamental. We also get a notch at zero frequency, so we'll lose the low-frequency component of the stadium roar.
Figure 4: Highpass notch to remove all components
Figure 5: Spectrum after a highpass comb filter
The resulting sound with the highpass comb is 'lighter' because we lost the bass, but there's still a clear, annoying tonal quality to it. The problem is that near the frequencies that we're trying to remove, these cancellation notches are narrow. They are good at getting rid of single tones. But when the offending signal is broadened, they leave behind residuals that still sound like tones.
Let's look at 'proper' notch filters. Creating notch filters with single stopbands is part and parcel of the toolbox of the filter designer. Such a filter has two separated passbands, with a stopband sitting in the gap between those passbands. The order of the filter determines how "sharp" we can make the notch – note that this is different from how deep it is.
We could address the task of devuvuzalation by designing a notch filter for each of the offending frequency bands, estimating attenuation levels and passband widths from our FFT analysis. We'd connect all these filters in series, being careful that the transition bands of the two filters didn't overlap, or we'd not get a very satisfactory response between notches.
Figure 6 shows a simple example, using the simplest possible notch filter, a 2nd order biquad. I put eight of them in series, tuned to 230 Hz and the first seven harmonics. Because the width of each bulge in the FFT plot is constant on a linear scale, I've made the Q's of the individual notch transfer functions proportional to centre frequency.
Figure 6: 2nd order notch filters in series, for various Qs
The plots show the response with the Q of the fundamental's notch stepped down from 20 to 0.625 in factors of 2. The high Q responses are even narrower than the comb filter responses, while the low Q notches lose us a lot of the (presumably valuable) spectrum between the harmonics. Sure enough, when the high Q value is used, the narrow notches are not enough to remove a significant amount of the energy in the broad bands around the harmonic, while the low Q values suppress the signal between the notches too much.