I have a chunk of data (samples) that need to do autocorrelation using FFT method. All data are real and lies between -1 and +1. What I have done follows:
- Zero pad the window with the length equals the samples' length.
- FFT of result from 1
- Result from 2 has Real and Imaginary parts. I used them to find Power Spectral Density by taking Re*Re + Im*Im.
- Take the inverse Fast Fourier Transform.
Now here is my question: The result from part 4 contains Real and Imaginary parts. Is the magnitude of it equals the autocorrelation result? If so, since my input contains positive and negative values, the magnitude of Result from part 4 means the autocorrelation result cannot be negative, which doesn't make sense.
Or should I take only the Real part of result from Part 4 as the autocorrelation result? My input is real and so the autocorrelation shouldn't have any imaginary part, right?