Signals Systems System Response
Frequency Representation Fourier Series / Transforms Background Material

The Fourier transform is a way we can take a signal as a function of time and decompose it into its frequencies. In a manner of speaking, we take a signal as a function of time and "transform" it into a function of frequency. The forward Fourier transform is dictated by the following equation.

where ω = 2πf. Since we integrate with respect to time, the 't' variable disappears in the solution and we end up with a function of frequency. The inverse Fourier transform is given below. Notice the variable with which the equation is being evaluated to.

Since we integrate with respect to frequency, the 'f' term disappears in the final solution and we regain our signal in the time domain.

Let's take a practical example of this and see what happens when we take a signal in the time domain and flip it into the frequency domain.

To start easy, let's focus on a single frequency tone and see what happens.

Type the code given to you below into MATLAB, listen to the tone, look at its plot in the time domain, take the Fourier transform, and look at the frequency plot to observe that happens when a signal in the time domain is transformed into the frequency domain.

t = 0:0.01:100;

y = cos((2*pi*t)/0.1);

figure; plot(t(1:100), y(1:100));

sound(y);

pause;

ffty = fft(y);

absy = abs(ffty);

f = t/(100*0.01);

figure; plot(f, absy);

Music is essentially sound waves traveling at a various frequencies. When we hear sounds, we are actually hearing the sound waves "transformed" into a sound by our eardrum, thus, we unconsciously use the Fourier transform on an everyday basis. Now, it is time to understand the mathmatical basis for this. Let's take a song, take the Fourier transform of it, and see what we get.

Affirmation - Savage Gardens (right click and click "Save file as...")

Use the MATLAB code below to read in the one.wav and to look at the signal in time domain as well as in frequency domain.

[one, fs, nbits] = wavread('one.wav');

t = 1:length(one);

t = t/fs;

figure; plot(t, one); % since one is a two dimension vector, we can take it apart and look at each dimension separately

xlabel('time');

ylabel('amplitude');

title('Affirmation - Savage Gardens');

figure; plot(t, one(:,1));

xlabel('time');

ylabel('amplitude');

title('Affirmation - Savage Gardens');

close all;

figure; plot(t, one(:,2));

xlabel('time');

ylabel('amplitude');

title('Affirmation - Savage Gardens');

sound(one, fs);

fftone = fft(one);

absfftone = abs(fftone);

freq = [0:length(t)-1]*fs/length(t);

plot(freq,absfftone);

xlabel('frequency');

ylabel('amplitude');

title('Frequency Content of Affirmation - Savage Gardens');

It's my Life - John Bon Jovi (right click and click "Save file as...")

[two, fs, nbits] = wavread('two.wav');

t = 1:length(two);

t = t/fs;

figure; plot(t, two); % since one is a two dimension vector, we can take it apart and look at each dimension separately

xlabel('time');

ylabel('amplitude');

title('It's My Life - bon Jovi');

figure; plot(t, two(:,1));

xlabel('time');

ylabel('amplitude');

title('It's My Life - bon Jovi');

close all;

figure; plot(t, two(:,2));

xlabel('time');

ylabel('amplitude');

title('It's My Life - bon Jovi');

sound(two, fs);

fftone = fft(two);

absfftone = abs(ffttwo);

freq = [0:length(t)-1]*fs/length(t);

plot(freq,absffttwo);

xlabel('frequency');

ylabel('amplitude');

title('Frequency Content of It's My Life - bon Jovi');

Bring Me to Life - Evanescence (right click and click "Save file as...")

[three, fs, nbits] = wavread('three.wav');

t = 1:length(three);

t = t/fs;

figure; plot(t, three); % since one is a two dimension vector, we can take it apart and look at each dimension separately

xlabel('time');

ylabel('amplitude');

title('Bring Me to Life - Evanescence');

figure; plot(t, three(:,1));

xlabel('time');

ylabel('amplitude');

title('Bring Me to Life - Evanescence');

close all;

figure; plot(t, three(:,2));

xlabel('time');

ylabel('amplitude');

title('Bring Me to Life - Evanescence');

sound(three, fs);

fftone = fft(three);

absfftthree = abs(fftthree);

freq = [0:length(t)-1]*fs/length(t);

plot(freq,absfftthree);

xlabel('frequency');

ylabel('amplitude');

title('Frequency Content of Bring Me to Life - Evanescence');

is website was sponsored by the Johns Hopkins Technology Fellowship Program and developed Bennett Landman, Issel Anne Lim, Alan Huang, William Feng, and Pavan Patel under the guidance of Dr. Michael Miller. © Copyright 2008. Johns Hopkins University. All rights reserved.

For comments and suggestions on this page, please click the link below:

Help us improve this site! Please leave us feedback!