DSPRelated.com
Forums

FIR filtering in the Fourier domain

Started by Philip de Groot July 8, 2005
Philip de Groot wrote:

   ...

> Hello Jerry, > > Thanks for all your suggestions, but one thing is not quite clear to me. > > >>Decent voice audio goes below 400 Hz. Telephones go down to 300, and >>male voices sound noticeably more natural when the band goes down to >>200. > > If I need to keep frequencies down to 400 Hz, why should I apply a > highpass filter???
There is very little voice energy above 4 KHz, but sibilants with energy up there aid intelligibility. There is little to be gained in intelligibility or even naturalness from frequencies over 6 KHz. FM broadcast signals go up to 15 KHz, and if they're noisy, a removing frequencies above 3 (or 5, depending on how noisy) can help. If your FM signal is being received as stereo, try forcing mono to reduce the noise.
> And about the Fourier algorithm I had implemented. It is not as fast as > the FFTW (I guess; I haven't tried it because it is licensed), but the > possibility to simultaneously FFT and IFFT the left and right channels > compensates quite a lot. :) (It did work out; see my previous post).
That's a waste of time, actually. It works, but you could simply add the left and right channels and do an FFT half the size. Besides, if noise is a concern, you should be receiving mono. It behaves as if the RF signal were stronger and so is quieter.
> Thanks for the link to the paper and the software. I still have to read > the paper (I think I MUST to get a proper filter). If not to difficult > to implement (i.e. does not require too much time), I might use the > source code to generate filters on-the-fly (and hear their effects on > the audio immediately). It will definitely be fun to play with. > > For now, I will use ScopeFIR to design a more appropiate filter to try > out. (the 3-taps filter I described yesterday did not work out; probably > because I removed important frequencies, although the graph did not show > this).
Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
adrian wrote:
> Hi jerry, > > Winfilter allows to design FIR filters (BUTT, CHEB, BESS, RCOS and > RECT). > > For the "Raised Cosined" and "Rectangle": The cosine transform is > applied to a rectangular or raised cosine window. > > I know that BUTT, CHEB and BESS models are for IIR. > I wanted just to be able to implement a IIR frequency response "shape" > in a FIR filter. > In other word, the same frequency response, but with a linear phase. > For this case, I calculate the IIR frequency response and apply also > the cosine transform to get the time domain coefficients.
I surmised as much. For most applications, those types are chosen as a compromise. Complexity, phase response, transition-band width, and time-domain overshoot are all considered. Some of the qualities that make those filters good analog (and biquad derivatives) are lost with your approach. Except for overshoot, all of the other qualities considered in selecting a filter type can be directly specified the usual FIR generating programs. When I consider specifications rather than shape, your filters don't usually perform as well as others with the same number of coefficients. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
"Philip de Groot" <groot877@zonnet.nl> wrote in message 
news:Xns96936DBC5866Fgroot877zonnetnl@137.224.11.5...
> "Clay S. Turner" <Physics@Bellsouth.net> wrote in >> > Hello Clay, > > I tried your software out and obtained a filter with 21 taps. This > should also be possible to obtain in ScopeFIR, but I haven't tried this > out. It is nice to see that your DOS-application has been nicely > written. It runs smoothly in WinXP and the graphical output is no > problem. > > Thanks, > > Philip
Thanks, Philip, One of these days I'm going to revisit and update the code, but my plate is very full these (in a good way). Clay
"Jerry Avins" <jya@ieee.org> wrote in message 
news:h82dnXtxdrL3PEvfRVn-gg@rcn.net...
> Philip de Groot wrote: > >> Hello Jerry, >> >> Thanks for all your suggestions, but one thing is not quite clear to me. >>>Decent voice audio goes below 400 Hz. Telephones go down to 300, and male >>>voices sound noticeably more natural when the band goes down to >>>200. >> >> If I need to keep frequencies down to 400 Hz, why should I apply a highpass >> filter??? > > There is very little voice energy above 4 KHz, but sibilants with energy up > there aid intelligibility. There is little to be gained in intelligibility or > even naturalness from frequencies over 6 KHz. FM broadcast signals go up to 15 > KHz, and if they're noisy, a removing frequencies above 3 (or 5, depending on > how noisy) can help. If your FM signal is being received as stereo, try > forcing mono to reduce the noise.
Once again, I'm confused, Jerry. The OP is asking about a highpass and low frequencies and you are talking about a lowpass and high frequencies?!? Did you put your brain on backwards today? :-) As to the question, the reason you apply a highpass filter is to remove the very low frequency components that are not part of the human voice and detract from signal quality. Common sources of these are rumble noise from microphone handling, "popping" sounds from breath hitting an unprotected microphone (which has a broad spectrum including very low frequencies), wind noise, and mains-related noise (hum). Ideally, you set the highpass cut-off frequency just below the lowest voice frequency you are interested in, which hopefully still allows attenuating the unwanted signals significantly. In a typical full-bandwidth audio application (e.g. the low cut filter on a mixing board), I believe this is set somewhere around 80-120 Hz. For telephone quality audio, it is usually higher, I'm guessing 200-300 Hz.
Philip de Groot <groot877@zonnet.nl> wrote in
news:Xns968DAAD70D456groot877zonnetnl@137.224.11.5: 

> Hello, > > I am aware that many questions regarding FIR-filtering are posted here > and many links to websites to help people out are also included. But > these links are becoming complicated and I want to know something > simple. Therefore, I am asking. > > I have a Fourier transform and want to remove frequencies below 600 Hz > and above 6500 Hz and apply a IDFT. I can use a FIR filter (in the > frequency domain) to do so, but I want to know: > > 1. How exactly to multiply the Fourier transform with the FIR > coefficients. 2. Where to obtain the FIR coefficients (there are many > websites; please recommend). > > That's it! Thank you in advance. > > Regards, > > Philip > >
Hello all, This topic became rather complicated to read. Many offers were made to try some software and a discussion started whether FIR or IIR filters should be used. Wel, since IIR filters require extra processed signal feedback, I decided to try FIR filters first. Implementing FIR filters is not very complicated and the processor demands are lowest for this kind of filter (in the time domain). And yes, processor load is important for me because the software should use minimal processor power on (even low- end) studio PCs, say a Celeron 300 MHz (Pentium II) or perhaps even less. I got a little bit lost with the overwhelming amount of information, so I decided to use Matlab on a wave file and to implement a filter (with coefficients from Clays' application) in Matlab (just a simple 2-loop thing, nothing complicated). This way, I found a bug in my code that explains why the results were so bad (sorry to the people that feel offended). Furthermore, I had a chance to optimize the filter design to better approach my demands. A 9 taps bandpass FIR filter (frequency range: 85 - 6000 Hz) works very well for me, so I decided to stick on this filter (for the moment). Furthermore, I won't consider IIR filters because I do not need them. Thanks for the help! Philip ------------ And now a word from our sponsor ------------------ For a quality usenet news server, try DNEWS, easy to install, fast, efficient and reliable. For home servers or carrier class installations with millions of users it will allow you to grow! ---- See http://netwinsite.com/sponsor/sponsor_dnews.htm ----
Jon Harris wrote:
> "Jerry Avins" <jya@ieee.org> wrote in message > news:h82dnXtxdrL3PEvfRVn-gg@rcn.net... > >>Philip de Groot wrote: >> >> >>>Hello Jerry, >>> >>>Thanks for all your suggestions, but one thing is not quite clear to me. >>> >>>>Decent voice audio goes below 400 Hz. Telephones go down to 300, and male >>>>voices sound noticeably more natural when the band goes down to >>>>200. >>> >>>If I need to keep frequencies down to 400 Hz, why should I apply a highpass >>>filter??? >> >>There is very little voice energy above 4 KHz, but sibilants with energy up >>there aid intelligibility. There is little to be gained in intelligibility or >>even naturalness from frequencies over 6 KHz. FM broadcast signals go up to 15 >>KHz, and if they're noisy, a removing frequencies above 3 (or 5, depending on >>how noisy) can help. If your FM signal is being received as stereo, try >>forcing mono to reduce the noise. > > > Once again, I'm confused, Jerry. The OP is asking about a highpass and low > frequencies and you are talking about a lowpass and high frequencies?!? Did you > put your brain on backwards today? :-)
Only partly. He originally wanted to remove both highs and lows, decided that a bandpass filter was not for him, and investigated a low-pass, high-pass pair. Where he is now, I can't tell, but at one point he decided that he could afford only one of the pair.
> > As to the question, the reason you apply a highpass filter is to remove the very > low frequency components that are not part of the human voice and detract from > signal quality. Common sources of these are rumble noise from microphone > handling, "popping" sounds from breath hitting an unprotected microphone (which > has a broad spectrum including very low frequencies), wind noise, and > mains-related noise (hum). Ideally, you set the highpass cut-off frequency just > below the lowest voice frequency you are interested in, which hopefully still > allows attenuating the unwanted signals significantly. In a typical > full-bandwidth audio application (e.g. the low cut filter on a mixing board), I > believe this is set somewhere around 80-120 Hz. For telephone quality audio, it > is usually higher, I'm guessing 200-300 Hz.
He is trying to improve the intelligibility of voice on noisy commercial stereo FM. The first step is to disable stereo decoder, gaining 3? dB SNR, then (if it's still necessary) remove those frequencies that carry noise but not intelligence. 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;
Philip de Groot wrote:

   ...

> Wel, since IIR filters require extra processed signal feedback, I > decided to try FIR filters first. Implementing FIR filters is not very > complicated and the processor demands are lowest for this kind of filter > (in the time domain). And yes, processor load is important for me > because the software should use minimal processor power on (even low- > end) studio PCs, say a Celeron 300 MHz (Pentium II) or perhaps even > less.
FIR code is simpler, but the processing time is longer -- sometimes much longer -- than for IIR.
> I got a little bit lost with the overwhelming amount of information, so > I decided to use Matlab on a wave file and to implement a filter (with > coefficients from Clays' application) in Matlab (just a simple 2-loop > thing, nothing complicated). This way, I found a bug in my code that > explains why the results were so bad (sorry to the people that feel > offended). Furthermore, I had a chance to optimize the filter design to > better approach my demands. A 9 taps bandpass FIR filter (frequency > range: 85 - 6000 Hz) works very well for me, so I decided to stick on > this filter (for the moment). Furthermore, I won't consider IIR filters > because I do not need them.
That's reasonable. Good luck. And turn off the stereo decoder! 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;
"Jerry Avins" <jya@ieee.org> wrote in message 
news:eaSdnRKMxL7AR0rfRVn-tg@rcn.net...
> > He is trying to improve the intelligibility of voice on noisy commercial > stereo FM. The first step is to disable stereo decoder, gaining 3? dB SNR, > then (if it's still necessary) remove those frequencies that carry noise but > not intelligence.
I think it is more like 10dB better SNR, IIRC!
Jerry wrote:

> He is trying to improve the intelligibility of voice on noisy commercial > stereo FM. The first step is to disable stereo decoder, gaining 3? dB > SNR, then (if it's still necessary) remove those frequencies that carry > noise but not intelligence.
Unfortunately, much of the noise that drastically reduces intelligibility is in-band, ie. in the same frequency range as the voice itself. Imagine a voice recording covered with white noise. A bandpass filter is not going to buy much that way (unless there is very heavy high or low-frequency disturbances) - some real noise reduction algorithm is required. Seeing that the OP wants a quick and dirty solution, that seems out of the question. It wouldn't have been very difficult to do some research about this, since mobile telephony has initiated a burst of research in that area. Regards, Andor
Jon Harris wrote:
> "Jerry Avins" <jya@ieee.org> wrote in message > news:eaSdnRKMxL7AR0rfRVn-tg@rcn.net... > >>He is trying to improve the intelligibility of voice on noisy commercial >>stereo FM. The first step is to disable stereo decoder, gaining 3? dB SNR, >>then (if it's still necessary) remove those frequencies that carry noise but >>not intelligence. > > > I think it is more like 10dB better SNR, IIRC!
Thanks. 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;