comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » FFT and Parseval
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
FFT and Parseval [message #88452] Mon, 28 April 2014 03:58 Go to previous message
baptiste.cecconi is currently offline  baptiste.cecconi
Messages: 1
Registered: April 2014
Junior Member
Dear IDL guys,

I recently tried to check the conservation of energy (Parseval's theorem) through the IDL implementation of FFT, and I came to a somewhat surprising result.

Here a sample code that shows my point:

-----

N=1000
x = randomn(0,N) ; random series of data with 1000 elements
fft0 = fft(x,-1) ; fourier transform (to freq domain) of x

print,total(x^2.) ; total energy of the signal in time domain
print,total(abs(fft0)^2.)/N; total energy of the signal in freq domain (according to Parseval's theorem)

fft1 = fft(x,1) ; inverse fourier transform (freq to time domain) of x
print,total(abs(fft1)^2.)/N; total energy of the signal in freq domain (using inverse fft)

-----

From this little code, it is clear that

(1) total(x^2.) = total(abs(fft0)^2.)*N
(2) total(x^2.) = total(abs(fft1)^2.)/N

While quation (2) is fully consistent with Parseval's equation, (1) is not, by a N^2 factor.
In the IDL documentation, it is stated that "A normalization factor of 1/N, where N is the number of points, is applied during the forward transform." However, I'm not sure this solves anything here.

I have some difficulties to convince myself that the direct FFT transform is invoked with a negative "direction" parameter (as stated in IDL documentation).

Parseval theorem is recalled here:
http://en.wikipedia.org/wiki/Parseval's_theorem (see DFT equation)
[Message index]
 
Read Message
Read Message
Previous Topic: Problem reading HDF5
Next Topic: Running this MATLAB code in IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:13:22 PDT 2025

Total time taken to generate the page: 0.00381 seconds