Author |
Topic |
|
SciYY
3 Posts |
Posted - 09/09/2008 : 05:32:21 AM
|
Hello, I'm using OriginPro 8 SR1. It seems that the result of the FFT (on real signals) dramatically depends on the number of points (even/odd) in the selected column. E.g. if my column is filled with 1 and -1 (alternating) and the total number of points is even the resulting spectrum shows that I have sinusoidal signal at 0.5 frequency (which is wrong!). If the number of points is odd, I have more realistic results with other spectral components. As far as I understand, Origin 8 doesn't cut or pad data but passes it to the FFTW library which might use different algorithms depending on the data characteristics. Maybe FFTW uses wrong algorithm when the number of points is even or I have to customize some parameters from within Origin? Thank you, |
|
minimax
350 Posts |
Posted - 09/10/2008 : 02:48:26 AM
|
Hi SciYY,
The formula for FFT is defined to be (x[t] represents the original signal.):
Therefore, for 256 data points, the 128th point's formula turns to be:
And thus you can easily calculate out the result is 256.
That is to say, at 0.5 frequency the FFT result should be 256.
I compare the result with MATLAB and also get a same one.
Therefore, I am not sure why you would say "it is wrong".
One note that is that in Origin there is a "Shift" option (Under the "Options" branch in FFT dialog).
The Shift checkbox determines how the FFT data will be presented.
If the checkbox is checked, the transform is shifted around to be displayed with both positive and negative frequencies centered at zero. Otherwise positive frequencies will be displayed only.
Hope it helps.
Max OriginLab Technical Support |
|
|
SciYY
3 Posts |
Posted - 09/12/2008 : 04:36:30 AM
|
Hello,
Thank you for your answer! In fact, you are right that the results obtained from the formulae that you gave me are correct. But this is slow Fourier transformation (or more precisely Discrete Fourier Transformation [DFT]), because for the classical FFT you need 2^N points. This was the reason for confusion when I started working with the new version of Origin.
I thought that FFTW library must pad my data with zeroes to get 2^N points (or use some other methods to get the correct vector size). This should have entailed additional spectral components because the signal is finite. So this is what I meant to say when I said that the result was wrong.
But FFTW library indeed does DFT by some very fast methods. So unlike classical FFT it doesn't change the input data. It is worth to be noted in the new version of Origin :-).
Thanks, |
|
|
|
Topic |
|
|
|