2
$\begingroup$

I need to compute FFT components and autocorrelation of a discrete signal. When I do not use any window function before taking FFT of the signal I get a reasonable AC function from FFT that includes some information about period of the signal:

AC-1

However when I apply a window function (Hanning) before applying FFT I got an AC function that seems to be distorted:

AC-2

What is the effect of window function on an AC function that is computed from FFT?

$\endgroup$
  • $\begingroup$ What exactly are you plotting? You have plotted negative FFT values, which tells me that you are not plotting the FFT magnitude or power. FFT results are generally complex, and thus you should not be able to plot what you have unless you are ignoring the imaginary portion of the results. $\endgroup$ – Jim Clay Sep 24 '12 at 3:34
  • $\begingroup$ I've plotted the autocorrelation function which is computed using FFT. $\endgroup$ – mostar Sep 24 '12 at 5:27
3
$\begingroup$

When you are using the FFT to get a measurement of the frequency content of a signal it is appropriate to window the data first to avoid distortions due to a rectangular cutoff.

That is not what you are doing with the FFT, though. You are using the FFT and inverse FFT to efficiently calculate a correlation (an autocorrelation is just a special case of correlation). Done properly with padding and such, the FFT will get you the exact same results that you would get by calculating the correlation in the time domain. If you window, though, you will not get the same results. In short, you should not window when you are using the FFT to calculate correlations or convolutions.

$\endgroup$

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.