Autocorrelation Function and Power Spectrum

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.

• It is possible for the autocorrelation function of a real signal (which autocorrelation function itself is necessarily a real-valued function with any imaginary parts being small and caused by round-off error during fft/ifft computations) to have negative values: it is the power spectrum that is nonnegative as evidenced by the fact that its values are $|X[k]|^2$ where $X[k]$ is the DFT (and possibly complex-valued). – Dilip Sarwate May 18 '14 at 17:02