Hello guys,
So I am trying to implement PSD and CPSD (Power and Cross Power Spectral Density) functions in C++ using the FFT data. For that, I'm using ALGLIB's fft API. To check its results, I test it against MATLAB's fft, because I know it works.
But the results I had for both algorithms were quite different at the frequency peaks (as you can see from the figure attached)
FYI, I'm doing the fft in this function: S = 0.7*sin(2*pi*50*t) + sin(2*pi*120*t); From time 0 to 1.5s in 1000 points.
Do you guys know why the results are not the same? At first, I thought that ALGLIB does an automatically windowing in the signal, but I'm not sure though.
I appreciate all the help on this one. :)
Attachments: |
File comment: at the peak frequencies, we can see the difference between both
untitled.png [ 43.49 KiB | Viewed 15482 times ]
|
|