1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Different forms of the discrete Fourier Transform

  1. Sep 29, 2015 #1
    Hi

    I am trying to program excel to take the DFT of a signal, then bring it back to the time domain after a low pass filter. I have a code that can handle simple data for example
    t = [ 0, 1, 2, 3]
    y = [2, 3, -1, 4]

    So I think everything is great and so I plug in my real signal and things go off the rails. Firstly my transform doesn't seem to work. In the simple cases I have a start frequency of 0 and an end frequency of 4. Everything works. I know my data has equal spacing, but I do not know my frequency to start or stop so I pick 0 and some arbitrary numbers. I have the number of points within the frequency interval as variable.

    My output looks like no transform I have ever seen and bringing it back to time is equally bad. Am I missing something when I move to real data?

    Now I was following this blog http://excelunusual.com/spectral-analysis-a-fourier-transform-tutorial/, as a basis for my code and I found that gave me a decent looking tranform of my real data but failed on a simple problem as stated above. The expression for the transform is different.

    G(f) = ∫g(t)e-2π*j*f*t where as most text books have n/N in the exponent.

    Not sure what the disconnect is but looking for some opinions on this.

    Thanks in advance.
     
    Last edited: Sep 29, 2015
  2. jcsd
  3. Sep 29, 2015 #2
    Look at the link in my sig and download some code that has been debugged for computing fourier transforms.

    You can also download the file cos10000.txt as a sample input. You will see it is the sum of 5 cosine terms for 10000 points. Testing Fourier transform code on a known input like this is a valuable step in validation.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Different forms of the discrete Fourier Transform
Loading...