I know the question has been asked about why it's a bad idea to zero bins in an FFT, but those all seemed to be taking the IFFT afterwards. What if I want to do all my analysis in the frequency domain? Then would it be alright to zero the bins with frequencies i don't care about, and then perform my analysis?

And to add to that, if I only care about a certain range of frequencies, can I perform the DFT instead of an FFT, but were I'm only calculating the bins that I care about (I believe this should be the same as zeroing out all the other frequencies).

For example, lets say I have a signal sampled at 16000Hz. and the frequency range I care about is between 2000-4000Hz. if I'm taking a 64 point FFT/DFT, then I only care about bins 8-16. Since my signal is real, that should save some time on the DFT (real number multiplied by complex number as opposed to two complex numbers multiplied), and then I just do 9 DFT calculations and forget about the other 55. I think this should be less memory need and should perform the calculation quicker. I think this is right, but I'm probably missing something. Thanks for your time!

  • $\begingroup$ I believe you are correct on both accounts. (Can someone please explain the downvotes?) I just wouldn't call this "zeroing", since you just ignore the values, rather than explicitly setting them to 0 and then doing some processing on them. One of the usual issues still applies, though: You need to apply an appropriate window function first, to avoid lots of different frequency content leaking into your 9 bins. $\endgroup$ – Sebastian Reichelt Mar 2 '16 at 21:34
  • $\begingroup$ I was wondering about the downvotes also. As for the windowing, that would be in the time domain, correct? such as a bandpass filter around 2000-4000Hz? I'm planing on doing a circular convolution on my 64-point FFT signal, which would include all of the zeroed out/not calculated bins so this is my main reason for asking about the zeroing of the bins. $\endgroup$ – gerrgheiser Mar 3 '16 at 3:32

The FFT result bins representing frequencies outside your frequency range of interest still carry information about spectrum within your frequency range slice. So you would lose some information, especially near the edges of your frequency block, by not doing a full FFT.

Also, if the number of bins within your frequency slice is anywhere close to (or larger than) log(N), doing a full FFT using a well optimized library might well be faster than naively calculating just the frequency bins you think you need.

  • $\begingroup$ Thanks for the response! if I do a DFT calculation for 8 bins on a 64 point transform, that's almost double log(64). does that rule of thumb still hold true if my signal is only real? I thought that might help out the processing time for the DFT. I know i'm wanting to do a 4096 FFT on another signal, but due to memory constraints, I think I have to use a DFT instead to calculate around 800 bins. but since I'm not doing an FFT, I can do some of the calculations for my transforms as i'm sampling in stead of having to wait until i have all the samples. Does that sound correct? Thanks again! $\endgroup$ – gerrgheiser Mar 4 '16 at 5:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.