The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Wrong FFT calculation on some datasets?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

SciYY

3 Posts

Posted - 09/09/2008 :  05:32:21 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

348 Posts

Posted - 09/10/2008 :  02:48:26 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

SciYY

3 Posts

Posted - 09/12/2008 :  04:36:30 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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,
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000