real FFT from alglib
Page 1 of 1

Author:  pedrocalorio [ Tue Jun 29, 2021 2:36 pm ]
Post subject:  real FFT from alglib

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. :)

File comment: at the peak frequencies, we can see the difference between both
untitled.png [ 43.49 KiB | Viewed 11716 times ]

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group