DSPRelated.com
Forums

Removing high frequency hum from audio

Started by Didier A. Depireux February 4, 2005
This should be a familiar problem to many of you. I recorded animal
vocalizations at 100kHz, and they have a frequency content from 200Hz
to about 35kHz. Unfortunately (what with old age...) I didn't hear that
a TV monitor in the room generated a very strong 16kHz and 32kHz.
It's quite stable in frequency but with a strong (regular) amplitude
modulation. I am having a heck of a hard time removing the 16k. I can't just
notch filter it, because with the amplitude modulation I have to have a
somewhat wide filter, and there's signal there I don't want to remove.

I was hoping for an adaptive method to remove this high frequency hum. I
tried filtering the signal from 15k to 17 k, and minimizing an energy
functional of the form
(signal - A(t)*sin(2*pi*16000*t + phase)),
with the amplitude A(t) a second order polynomial, or filtering very
narrowly around 16k and using the Hilbert transform to determine the
amplitude of the 16k sinusoid, and then determine the phase as above, and
that reduces the noise quite a bit, but not enough.

Is there another obvious method I am missing.
I would think there should be a way, Kalman-filtering-style, to track the
16k hum, period by period, and subtract it, but I can't seem to implement
it.  Any algorithms out there (Matlab would be best) that could help me out?

			TIA!

						Didier

-- 
Didier A Depireux         ddepi001@umaryland.edu  didier@isr.umd.edu
20 Penn Str - S218E   http://neurobiology.umaryland.edu/depireux.htm
Anatomy and Neurobiology                   Phone: 410-706-1272 (lab)
University of Maryland                                   -1273 (off)
Baltimore MD 21201 USA                           Fax: 1-410-706-2512
Didier A. Depireux wrote:
> This should be a familiar problem to many of you. I recorded animal > vocalizations at 100kHz, and they have a frequency content from 200Hz > to about 35kHz. Unfortunately (what with old age...) I didn't hear that > a TV monitor in the room generated a very strong 16kHz and 32kHz. > It's quite stable in frequency but with a strong (regular) amplitude > modulation. I am having a heck of a hard time removing the 16k. I can't just > notch filter it, because with the amplitude modulation I have to have a > somewhat wide filter, and there's signal there I don't want to remove. > > I was hoping for an adaptive method to remove this high frequency hum. I > tried filtering the signal from 15k to 17 k, and minimizing an energy > functional of the form > (signal - A(t)*sin(2*pi*16000*t + phase)), > with the amplitude A(t) a second order polynomial, or filtering very > narrowly around 16k and using the Hilbert transform to determine the > amplitude of the 16k sinusoid, and then determine the phase as above, and > that reduces the noise quite a bit, but not enough. > > Is there another obvious method I am missing. > I would think there should be a way, Kalman-filtering-style, to track the > 16k hum, period by period, and subtract it, but I can't seem to implement > it. Any algorithms out there (Matlab would be best) that could help me out?
Didier, I think you may achieve better results by modeling the source of the hum. It looks like the cause is the horizontal deflection drive circuit in the TV monitor. It applies a high-voltage sawtooth-shaped waveform with frequency of 15734 Hz (for NTSC) to the CRT. So maybe you can model this waveform, synchronize it to your recorded signal, and subtract it. Some info is available here and you can find more on the net: http://www.ntsc-tv.com/ntsc-main-02.htm HTH, -- Georgi
Didier A. Depireux wrote:

> This should be a familiar problem to many of you. I recorded animal > vocalizations at 100kHz, and they have a frequency content from 200Hz > to about 35kHz. Unfortunately (what with old age...) I didn't hear that > a TV monitor in the room generated a very strong 16kHz and 32kHz. > It's quite stable in frequency but with a strong (regular) amplitude > modulation. I am having a heck of a hard time removing the 16k. I can't just > notch filter it, because with the amplitude modulation I have to have a > somewhat wide filter, and there's signal there I don't want to remove. > > I was hoping for an adaptive method to remove this high frequency hum. I > tried filtering the signal from 15k to 17 k, and minimizing an energy > functional of the form > (signal - A(t)*sin(2*pi*16000*t + phase)), > with the amplitude A(t) a second order polynomial, or filtering very > narrowly around 16k and using the Hilbert transform to determine the > amplitude of the 16k sinusoid, and then determine the phase as above, and > that reduces the noise quite a bit, but not enough. > > Is there another obvious method I am missing. > I would think there should be a way, Kalman-filtering-style, to track the > 16k hum, period by period, and subtract it, but I can't seem to implement > it. Any algorithms out there (Matlab would be best) that could help me out?
What's to adapt? If you know the modulating frequency -- 60 HZ? -- you need notch filters at 15750 (B/W) and at 15750 �60n, n = 1, 2, .... Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Didier A. Depireux wrote:
> This should be a familiar problem to many of you. I recorded animal > vocalizations at 100kHz, and they have a frequency content from 200Hz > to about 35kHz. Unfortunately (what with old age...) I didn't hear
that
> a TV monitor in the room generated a very strong 16kHz and 32kHz. > It's quite stable in frequency but with a strong (regular) amplitude > modulation. I am having a heck of a hard time removing the 16k. I
can't just
> notch filter it, because with the amplitude modulation I have to have
a
> somewhat wide filter, and there's signal there I don't want to
remove.
> > I was hoping for an adaptive method to remove this high frequency
hum. I
> tried filtering the signal from 15k to 17 k, and minimizing an energy > functional of the form > (signal - A(t)*sin(2*pi*16000*t + phase)), > with the amplitude A(t) a second order polynomial, or filtering very > narrowly around 16k and using the Hilbert transform to determine the > amplitude of the 16k sinusoid, and then determine the phase as above,
and
> that reduces the noise quite a bit, but not enough. > > Is there another obvious method I am missing. > I would think there should be a way, Kalman-filtering-style, to track
the
> 16k hum, period by period, and subtract it, but I can't seem to
implement
> it. Any algorithms out there (Matlab would be best) that could help
me out? What about going back to the lab to record the bacground noise from this equipment, find a spectrum estimate of the noise and based on that, design the inverse filter? Rune
I don't get this part:

"
It's quite stable in frequency but with a strong (regular) amplitude
modulation. I am having a heck of a hard time removing the 16k. I can't
just notch filter it, because with the amplitude modulation I have to
have a somewhat wide filter, and there's signal there I don't want to
remove.
"
If the frequency of the 16k tone stays constant, a tight notch should
do the trick (why a wider filter?). Amplitude modulation doesn't matter
in that case. Can you elaborate?

Andor wrote:

> I don't get this part: > > " > It's quite stable in frequency but with a strong (regular) amplitude > modulation. I am having a heck of a hard time removing the 16k. I can't > just notch filter it, because with the amplitude modulation I have to > have a somewhat wide filter, and there's signal there I don't want to > remove. > " > If the frequency of the 16k tone stays constant, a tight notch should > do the trick (why a wider filter?). Amplitude modulation doesn't matter > in that case. Can you elaborate? >
His interfering signal carrier frequency is VERY stable at 15750 Hz. The AM modulation is a 30 Hz ( TV frame rate ) rectangular wave with a duty cycle determined by the duration of the vertical blanking pulse. And, depending on the design of the interfering TV, there could be a dependence on the average brightness of the displayed picture. Thus he has 16 kHz carrier with strong sidebands every 30 Hz. Since the sounds wavelength is ~2 cm, I suppose he could also have misfortune of some of those sidebands displaying resonance effects.
Richard Owlett wrote:

> Andor wrote: > >> I don't get this part: >> >> " >> It's quite stable in frequency but with a strong (regular) amplitude >> modulation. I am having a heck of a hard time removing the 16k. I can't >> just notch filter it, because with the amplitude modulation I have to >> have a somewhat wide filter, and there's signal there I don't want to >> remove. >> " >> If the frequency of the 16k tone stays constant, a tight notch should >> do the trick (why a wider filter?). Amplitude modulation doesn't matter >> in that case. Can you elaborate? >> > > His interfering signal carrier frequency is VERY stable at 15750 Hz. The > AM modulation is a 30 Hz ( TV frame rate ) rectangular wave with a duty > cycle determined by the duration of the vertical blanking pulse. And, > depending on the design of the interfering TV, there could be a > dependence on the average brightness of the displayed picture. > > Thus he has 16 kHz carrier with strong sidebands every 30 Hz. > > Since the sounds wavelength is ~2 cm, I suppose he could also have > misfortune of some of those sidebands displaying resonance effects.
Almost exactly right. For NTSC color, the frame rate is around 59.94, making the horizontal rate 15734+. But as you point out, the harmonics are those of the field rate, half of what I had written. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Jerry Avins wrote:

> Richard Owlett wrote:
(snip)
>>His interfering signal carrier frequency is VERY stable at 15750 Hz. The >>AM modulation is a 30 Hz ( TV frame rate ) rectangular wave with a duty >>cycle determined by the duration of the vertical blanking pulse. And, >>depending on the design of the interfering TV, there could be a >>dependence on the average brightness of the displayed picture.
>>Thus he has 16 kHz carrier with strong sidebands every 30 Hz.
>>Since the sounds wavelength is ~2 cm, I suppose he could also have >>misfortune of some of those sidebands displaying resonance effects.
> Almost exactly right. For NTSC color, the frame rate is around 59.94, > making the horizontal rate 15734+. But as you point out, the harmonics > are those of the field rate, half of what I had written.
If it is receiving a broadcast signal it should be extremely stable, the FCC requirements are pretty strict. If the source is local, the output of a VCR for example, it won't be quite as good, and if it is free running (no input signal) it could be almost anything. -- glen
"Andor" <an2or@mailcircuit.com> wrote in message
news:1107603850.407068.221420@g14g2000cwa.googlegroups.com...
> I don't get this part: > > " > It's quite stable in frequency but with a strong (regular) amplitude > modulation. I am having a heck of a hard time removing the 16k. I can't > just notch filter it, because with the amplitude modulation I have to > have a somewhat wide filter, and there's signal there I don't want to > remove. > " > If the frequency of the 16k tone stays constant, a tight notch should > do the trick (why a wider filter?). Amplitude modulation doesn't matter > in that case. Can you elaborate?
It comes down to the transient behavior of the filter. The narrower the notch, the longer it takes to achieve maximum attenuation. You also can have interesting effects where when the notched signal goes away, the filter actually "generates" the notched signal for short transient period. Basically, the filter is ringing. So any changes in the amplitude of the signal being notched can cause undesirable transient behavior. If you can, try this experiment: set-up an IIR filter for a very narrow notch. Inject a signal at the notch center frequency and listen to it decay. Then mute the injected signal and listen to the result. The filter output will quickly increase, and then decay to nothing. The narrower/deeper the filter, the more noticeable the effect.
I remember once my boss told me a similar story: He was asked to design
a notch filter at some custom frequency. He chose a special filter
architecture suited for notching, and implemented an extremely tight
notch. Listening test confirmed that it worked (music with and withou
sine wave).

The customer sent the module back and told us to test it with a vocal
signal. We did - and it sounded like a robot effect! Appearantly, the
strong formants of the voice signal excited the filter to ring,
something which didn't happen with the music signa ...