cleanplay
cleanplay

Reputation: 291

discrete fourier transform in Matlab - theoretical confusion

I have a periodic term

v(x) = sum over K of [exp(iKx) V(K) ] 

where K =2*pi*n/a where a is the periodicity of the term and n =0,1,2,3....

Now I want to find the Fourier coefficient V(K) corresponding to a particular K. Suppose I have a vector for v(x) having 10000 points for

x = 0,0.01a,0.02a,...a,1.01a,....2a....100a 

such that the size of my lattice is 100a. FFT on this vector gives 10000 Fourier coefficients. The K values corresponding to these Fourier coefficients are 2*pi*n/(10000*0.01) with n=0,1,2,3,...9999.

But my K had the form 2*pi*n/a due to the periodicity of the lattice. What am I missing ?

Upvotes: 0

Views: 279

Answers (1)

Lutz Lehmann
Lutz Lehmann

Reputation: 26040

Your function probably is not complex, so you will need negative frequencies in the complex Fourier series expression. During the FFT this does not matter since the negative frequencies are aliased to the higher positive frequencies, but in the expression as continuous function this could give strange results.

That means that the range of n is from -N/2 to N/2-1 if N is the size of the sampling.

Note that the points you have given are 10001 in number if you start at 0a with 0.01a steps and end at 100a. So the last point for N=10000 points should be 100a-0.01a=99.99a.

Your sampling frequency is the reciprocal of the sampling step, Fs=1/(0.01a). The frequencies of the FFT are then 2*pi*n/N*Fs=2*pi*n/(10000*0.01a)=2*pi*n/(100*a), every 100th of them corresponds to one of your K.

This is not astonishing since the sampling is over 100 periods of the function, the longer period results in a much lower basic frequency. If the signal v(x) is truly periodic, all amplitudes except the ones for n divisible by 100 will be zero. If the signal is not exactly periodic due to noise and measurement errors, the peaks will leak out into neighboring frequencies. For a correct result for the original task you will have to integrate the amplitudes over the peaks.

Upvotes: 1

Related Questions