My aim is to determine the power spectrum of a signal of finite duration using
- Its autocorrelation function
- Performing FFT directly on the time-domain data
The function is defined as follows in the finite time interval from 0 to 10: $$ \cos(10t) + \sin(20t) $$ I am using the library FFTW 3.3.4 in C source code and pretty confused about all the normalization constants involved. After some work I managed to get the purely real FFT of the real and even autocorrelation function but the FFT of the autocorrelation function has negative parts in it. My concern is that if this is the power spectrum by Wiener-Khinchin theorem why it has negative parts in it. Furthermore, how can I normalize the output so that the power spectrum from the direct FFT of the time-domain data and the power spectrum from the autocorrelation functions are exactly the same. I am very confused about this subject and would like to be nudged in the right direction, any help and/or comment is appreciated.
Thanks in advance