DSPRelated.com
Forums

Removal of Time-Varying AM Contamination

Started by TheGhost June 23, 2005
Several months ago, the following problem was posted to 
alt.sci.physics.acoustics.  

"This is not strictly acoustics, (maybe more DSP), but it should be a 
familiar problem to many of you. I have recorded vocalizations at 100kHz, 
and they have a frequency content from 200Hz to about 35kHz. Unfortunately 
(what with old age...) I didn't hear that the TV monitor that we used 
generates a very strong 16kHz and 32kHz. It's quite stable in frequency but 
very variable in intensity. 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. 
Any algorithms out there (Matlab would be best) that could help me out? 
Thanks!"


While admitting my total lack of knowledge in the area of DSP, I posted the 
following reply:  

"If I were in your situation, here's what I would try. 
1) Take the digitized file and break it up into short segments containing 
exactly an integral number of cycles of the 16.xxxKHz interfering 
frequency.  2)  Perform an unwindowed FFT on each successive record.  3) 
Edit each of the spectral files and reduce the spectral lines at 16.xxxKHz 
and harmonics to a spectral level that is comparable to the broadband noise 
floor.  4) Inverse FFT the edited spectral files and recombine to create a 
new time record. 
I can't say for certain that this will work but it seems to me that if the 
segments are sufficiently short, while still containing an integral number 
of 16.xxxKHz cycles, the spectral spread due to amplitude modulation will 
be either minimal or nonexistent and the spectra should contain single 
spectral lines at the offending frequency and its harmonics. 
I welcome the DSP experts to completely trash what I have proposed.  That 
way, if/when I ever encounter the problem myself, I'll know at least one 
approach that won't work and why."


In a subsequent, unrelated post, Bob Cain stated the following:
"P.S. Your bumbling, rudimentary and wholly inadequate 
attempt at answering a DSP question recently was truly funny."


Since this is problem that is often encountered (for a variety of reasons) 
in auditory research that is conducted in the field under non-laboratory 
conditions), I for one would like to know how DSP experts would deal with 
the post-processing problem. In considering possible approaches, please 
note the statement by the original poster "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."  

 


   








 
-- 


"TheGhost" <theghost@hotmail.com> wrote in message 
news:QaIue.141346$4M.14564@fe08.news.easynews.com...
> Several months ago, the following problem was posted to > alt.sci.physics.acoustics. > > "This is not strictly acoustics, (maybe more DSP), but it should be a > familiar problem to many of you. I have recorded vocalizations at 100kHz, > and they have a frequency content from 200Hz to about 35kHz. Unfortunately > (what with old age...) I didn't hear that the TV monitor that we used > generates a very strong 16kHz and 32kHz. It's quite stable in frequency > but > very variable in intensity. 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. > Any algorithms out there (Matlab would be best) that could help me out? > Thanks!" > > > While admitting my total lack of knowledge in the area of DSP, I posted > the > following reply: > > "If I were in your situation, here's what I would try. > 1) Take the digitized file and break it up into short segments containing > exactly an integral number of cycles of the 16.xxxKHz interfering > frequency. 2) Perform an unwindowed FFT on each successive record. 3) > Edit each of the spectral files and reduce the spectral lines at 16.xxxKHz > and harmonics to a spectral level that is comparable to the broadband > noise > floor. 4) Inverse FFT the edited spectral files and recombine to create a > new time record. > I can't say for certain that this will work but it seems to me that if the > segments are sufficiently short, while still containing an integral number > of 16.xxxKHz cycles, the spectral spread due to amplitude modulation will > be either minimal or nonexistent and the spectra should contain single > spectral lines at the offending frequency and its harmonics. > I welcome the DSP experts to completely trash what I have proposed. That > way, if/when I ever encounter the problem myself, I'll know at least one > approach that won't work and why." > > > In a subsequent, unrelated post, Bob Cain stated the following: > "P.S. Your bumbling, rudimentary and wholly inadequate > attempt at answering a DSP question recently was truly funny." > > > Since this is problem that is often encountered (for a variety of reasons) > in auditory research that is conducted in the field under non-laboratory > conditions), I for one would like to know how DSP experts would deal with > the post-processing problem. In considering possible approaches, please > note the statement by the original poster "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."
OK- you have a signal with an embedded tone that is amplitude modulated and quite stable in frequency. So, it appears you may be able to derive the frequency somehow. This suggests an adaptive line canceller such as might be used to remove machinery noise. The AM will still make it a bit of a challenge. Here's how it might work: +--------------------+ | | +-----------+ | | | | | | input-+---| Delay |----------|------------>(+)----+----> e[n] | | | | +---------+-+ | ^ | +-----------+ | | | | | v | +-| Filter |--------->[LMS]------------+ | | +---------+-+ Adaptive line-cancelling filter LMS adaptive filter adjusts to minimize e[n] which cancels noise in the signal by subtracting filtered version of noise. The "filter" block is a gross bandpass filter that minimizes the signal content into the LMS filter and enhances the noise content (in this case a stable- frequency, AM'd tone). The LMS filter adjusts the amplitude and phase of its input to cancel the noise component in the signal. The delay block delays the signal so that the delay of the two filters is roughly equalized - allowing the LMS filter to make up for finer delay / phase adjustments. The system causes the noise to be subtracted at the output. It can be "trained" during quiet passages and then frozen. Thus, the annoying tone will be subtracted from the output independent of its amplitude and won't reduce the wanted signal. Fred
"Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message
news:c7KdnSLcx5fkAybfRVn-gQ@centurytel.net...
> >> The system causes the noise to be subtracted at the output. > It can be "trained" during quiet passages and then frozen. > Thus, the annoying tone will be subtracted from the output > independent of its amplitude and won't reduce the wanted signal. > > Fred > >
If you look at the original Widrow et numerous others paper you will find that the adaptive LMS line filter is nothing more than a straight digital notch filter all be it adaptive! Rimmer
Ghost,

what is the rate of the AM of the tones you want to notch?  Is the 16
kHz amplitude changing over a period of seconds?

I would think the AM is very slow and therefore the bandwidth of the
sidebands on the 16 kHz tones should be very close to 16 kHz.?

What am I missing/

Mark

"Mark" <makolber@yahoo.com> wrote in 
news:1119623431.515098.326680@f14g2000cwb.googlegroups.com:

> Ghost, > > what is the rate of the AM of the tones you want to notch? Is the 16 > kHz amplitude changing over a period of seconds? > > I would think the AM is very slow and therefore the bandwidth of the > sidebands on the 16 kHz tones should be very close to 16 kHz.? > > What am I missing/ > > Mark
Mark, I am not the original poster, and I don't have any more information than that which is contained in the original post, which I qoted verbatim. The original poster stated "It's quite stable in frequency but very variable in intensity........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." From this I suspect that your conclusion that the sidebands are very close to the 16KHz carrier is incorrect. Since no specific information about the modulation is available, I assume that the envelope variations are random and have a bandwidth of a several KHz. TheGhost

TheGhost wrote:
> Several months ago, the following problem was posted to > alt.sci.physics.acoustics. > > "This is not strictly acoustics, (maybe more DSP), but it should be a > familiar problem to many of you. I have recorded vocalizations at 100kHz, > and they have a frequency content from 200Hz to about 35kHz. Unfortunately > (what with old age...) I didn't hear that the TV monitor that we used > generates a very strong 16kHz and 32kHz. It's quite stable in frequency but > very variable in intensity. 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. > Any algorithms out there (Matlab would be best) that could help me out? > Thanks!"
If you only care about the phase of the waveform, you could run it through a limiter to remove the AM completely. John
"Rimmer" <rimmerx@reddwarf2.com> wrote in message 
news:aRNue.9906$U4.1302125@news.xtra.co.nz...
> > "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message > news:c7KdnSLcx5fkAybfRVn-gQ@centurytel.net... >> >>> The system causes the noise to be subtracted at the output. >> It can be "trained" during quiet passages and then frozen. >> Thus, the annoying tone will be subtracted from the output >> independent of its amplitude and won't reduce the wanted signal. >> >> Fred >> >> > If you look at the original Widrow et numerous others paper you will find > that the adaptive LMS line filter is nothing more than a straight digital > notch filter all be it adaptive! > > Rimmer
I don't know that I can agree entirely. If the input is the same then I guess yes. However if the input to the embedded adapting filter block is different from the "signal of interest" then it is a system that subtracts one signal from another. It works really well if the reference input to the adapting filter block is obtained directly from an offending signal source. In this example you can have signal components in the "signal of interest" at exactly the same frequency as the interfering source (short term at least) and they won't be cancelled. Long term, different story then the adaptation would cancel the sum. Depends on the stationarity of the offending source too. But, the version I proposed must form a notch. How else could it be if you freeze the filter and are using the same source? OK.... Once more, it depends on the stationarity of the wanted signal and the unwanted signal doesn't it? If the unwanted signal isn't very stationary then that's a problem. If the wanted signal is very stationary and at the same frequency as the unwanted signal then that's also a problem. It will be cancelled. Fred
Mark wrote:
> Ghost, > > what is the rate of the AM of the tones you want to notch? Is the 16 > kHz amplitude changing over a period of seconds? > > I would think the AM is very slow and therefore the bandwidth of the > sidebands on the 16 kHz tones should be very close to 16 kHz.? > > What am I missing/
One thing is that with very slow change in amplitude, the bandwidth will approach zero. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
In article <QaIue.141346$4M.14564@fe08.news.easynews.com>,
TheGhost  <theghost@hotmail.com> wrote:
>Several months ago, the following problem was posted to >alt.sci.physics.acoustics. > >"This is not strictly acoustics, (maybe more DSP), but it should be a >familiar problem to many of you. I have recorded vocalizations at 100kHz, >and they have a frequency content from 200Hz to about 35kHz. Unfortunately >(what with old age...) I didn't hear that the TV monitor that we used >generates a very strong 16kHz and 32kHz. It's quite stable in frequency but >very variable in intensity. 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.
With sufficient amplitude modulation (a pure rectangular window, for instance), a pure sine wave can be spattered over an infinite bandwidth. So I would start by trying to characterize and extract the modulation of the 16kHz tone (e.g. is it modulation at vertical retrace frequency, AC line rate, cooling fan(s) RPM(s), multiphase, attack/decay rate limited, etc.), then phase lock, modulate and subtract an emulated carrier. I think this constitutes a form of wider notch filter, but hopefully semi-synchronously and adaptively matched in width to the the signal(s) you want to remove. If the modulation envelope is random, all bets are off. IMHO. YMMV. -- Ron Nicholson rhn AT nicholson DOT com http://www.nicholson.com/rhn/ #include <canonical.disclaimer> // only my own opinions, etc.

Jerry Avins wrote:
> Mark wrote: > > Ghost, > > > > what is the rate of the AM of the tones you want to notch? Is the 16 > > kHz amplitude changing over a period of seconds? > > > > I would think the AM is very slow and therefore the bandwidth of the > > sidebands on the 16 kHz tones should be very close to 16 kHz.? > > > > What am I missing/ > > One thing is that with very slow change in amplitude, the bandwidth will > approach zero. > > Jerry >
I thought that's what I said. Mark