3

What is wrong with just taking the Fourier transform of a signal, setting the unwanted frequency components to zero, then doing an inverse Fourier transform to get the filtered signal?

cpc333
  • 171
  • 5
  • 2
    That is filtering. – Samuel Feb 20 '14 at 02:39
  • Because an IIR filter will do the job in about 1/1000th the instruction cycles... – Matt Young Feb 20 '14 at 02:43
  • 1
    On dsp.se: http://dsp.stackexchange.com/questions/6220/why-is-it-a-bad-idea-to-filter-by-zeroing-out-fft-bins – Theran Feb 20 '14 at 03:08
  • What if you don't have a high-speed MCU - a simple RC filter requires no power supply and can do the job wonderfully. I take it this question is aimed at systems where the signal is digitized to begin with. – Andy aka Feb 20 '14 at 12:59

2 Answers2

4

The biggest reason is that the FFT is a block-oriented algorithm. You break the samples up into blocks of, say, 1024 points in order to run the algorithm.

The Fourier Transform assumes that the signal is periodic, in the sense that the block of samples is assumed to repeat forever, both before and after the given block. In other words, the last sample in the block is assumed to be followed by another copy of the first sample in the block, and vice versa.

If you just do a FFT and then an IFFT, this assumption is of no consequence. However, if you modify the frequency-domain data in the middle, the continuity of the waveform at the ends of the block is no longer guaranteed, and you will get horrible artifacts, primarily at frequencies related to the block rate.

Dave Tweed
  • 168,369
  • 17
  • 228
  • 393
0

Your describing a sinc filter which is used by some analog devices ADC converters: http://www.analog.com/static/imported-files/application_notes/AN-0979.pdf

It seems the reason not to do an ideal block filter is the computational effort and time required. In some applications the time to compute this would be an unacceptable delay in the signal path. I'm short on experience but it looks like the ideal filter is usually just as good as a smaller FIR filter that is computationally cheap and fast.

Jason
  • 302
  • 2
  • 9