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
 All Forums
 Origin Forum
 Origin Forum
 Wrong FFT calculation on some datasets?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
SciYY 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,
2   L A T E S T    R E P L I E S    (Newest First)
SciYY 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,
minimax 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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000