FlexPro Forum – Discuss Your Topic!

FFT and IFFT

Home > Community > General > FFT and IFFT

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #12671

    I’m experiencing some strange behaviour, and I wonder if someone could explain it to me.

    1) Take a signal with only real values (the ultrasonic burst used in “The first document”, for example)
    2) Create a formula FFT(Burst)
    3) Evaluate the formula – you now have a complex signal
    4) Do an inverse FFT on that signal IFFT(Formula)

    This should return the original signal, but does not! Due to rounding errors in the calculations I would expect a small imaginary component to the results, but the magnitude of the imaginary component is not small at all!

    What am I missing here?

    Paul Warshawsky

    #9102
    Bernhard KantzBernhard Kantz
    Participant

    Since the input signal has only real values you must use IRFFT-function instead of the IFFT-function.
    IFFT Function calculates the complex time signal as the inverse transform of a complex Fourier spectrum.
    IRFFT Function calculates the real time signal as the inverse transform of a complex Fourier spectrum.

    Please look at:

    FFT Function (FPScript)
    IFFT Function (FPScript)
    IRFFT Function (FPScript)
    Fourier Transform Analysis Object

    Support@weisang.com

    #9103

    Thank you for the response, and I shall definitely use the IRFFT function. Nonetheless, IFFT(FFT(F(x))) should be the same as F(x). The imaginary component should be near 0. Using the IRFFT function will fix my application, but I would suggest someone look into the IFFT algorhythm to make sure it is correct.

    Paul

    #9104

    Ahh… I understand why this doesn’t work. When you do an FFT on a signal that is entirely real, because of the symetry of the FFT result, only the first half of the spectrum is returned (the remainder being the negative complement of the first half.) Thus you have to tell the reverse FFT algorithm whether you have the entire spectrum or just the first half.

    Paul

    #8334

    I’m experiencing some strange behaviour, and I wonder if someone could explain it to me.

    1) Take a signal with only real values (the ultrasonic burst used in “The first document”, for example)
    2) Create a formula FFT(Burst)
    3) Evaluate the formula – you now have a complex signal
    4) Do an inverse FFT on that signal IFFT(Formula)

    This should return the original signal, but does not! Due to rounding errors in the calculations I would expect a small imaginary component to the results, but the magnitude of the imaginary component is not small at all!

    What am I missing here?

    Paul Warshawsky

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.