Activity 5: Physics Measurements from Discrete Fourier Transform

July 3, 2008 at 9:24 am (Uncategorized) (, )

Discrete Fourier Transform is a mathematical construct where you determine the frequency component of a signal, very much like breaking down white light (signal) to its frequency components (colors). Fourier transform can be done numerically using

-oOo-

Performing FFT (code provided by Dr. Soriano)

T = 2;
N = 256;
dt = T/256;
t = [0:dt:(N-1)*dt];
f = 5;
y = sin(2*%pi*f*t);
f1 = scf(1); plot(t,y);

FY = fft(y);
F = 1/(2*dt);
df = 2*F/256;
f = [-(df*(N/2)):df:df*(N/2 -1)];

f2 = scf(2); plot(f, fftshift(abs(FY)));

-oOo-

The method of getting Fourier transform of images is somewhat similar to the process of getting the FT of temporal signals. In the case of images, we use the pixels as our discrete time, and we now perform spatial FT. Two dimensional FT can be done using

fft2=fft(fft(im).’).’

The algorithm above as mention in the Mathworks (Matlab) perform 1d FT along each column of im and them perform FT along the row of the result.

Sine wave (f=5, T=2)

We investigate the effect of varying the number of samples N with the Fourier Transfrom. From the plot below, we can see that by increasing the number of N, we widen the domain of our FT.


On the other hand, by having the total time fixed and increasing N (and effectively decreasing dt), we find that there is not much difference on the peak frequency, and the amplitude is half the value of N. This is because we are adding more signals components as compared to with lower N.

Permalink 1 Comment