Professional Documents
Culture Documents
Activity #5
Fourier Series and Fourier Transform
t=0:0.1:4*pi;
y1=sin(t)*(4/pi);
y3=sin(t)*(4/pi)+sin(3*t)*(4/(3*pi));
y5=sin(t)*(4/pi)+sin(3*t)*(4/(3*pi))+sin(5*t)*(4/(5*pi));
plot(t,y1,t,y3,t,y5), hold on;
x=square (t);
plot(x,t), hold off;
plot(t,x),hold off;
plot(t,y1,t,y3,t,y5,t,x)
title('Fourier Series representation')
xlabel('F(t)')
legend('n=1','n=2', 'n=3','f(t)')
We all use Fourier analysis without even knowing it: cell phones, DVDs, images, all involve Fourier transforms in
one form or another. This lab includes one exercise that illustrates the computation and interpretation of Fourier
analysis for a time signal (Touch-tone dialing).
The basis for touch-tone dialing on a phone is the Dual Tone Multi Frequency (DTMF) system. Basically, the
telephone-dialing pad acts as a 4x3 matrix (see figure 1 below).
A frequency is associated with each row and each column. These base frequencies are:
frow =[ 697 770 852 941];
fcol = [1209 1336 1477];
The tone generated by the button at position (i,j) is obtained by superposing the two fundamental tones with
frequencies frow(i) and fcol(j). Let us look for example at the signal corresponding to the button “5”. The Matlab
code for generating this signal will look like:
An important question related to telephony: is it possible to determine a phone number by simply listening to
its signal? Let us consider again the signal corresponding to the button 5. Figure 2A shows the signal generated by the
program given above, in the time interval [0 0.015s]. Note that in this representation, it is difficult to identify the two
fundamental tones that make up this signal. It is possible however to identify these tones by performing a Fourier series
analysis of the signal: figure 2B shows the Fourier coefficients corresponding to this signal in the frequency range
corresponding to the DTMF frequencies. Cleary, this signal contains two fundamental tones, at frequencies 770 and
1336, and therefore corresponds to the button 5.
Note: The figure is a graph of the sound wave in the time domain. You could call it an impulse response graph, although
when you’re looking at a sound file like this, you usually just think of it as “sound data in the time domain.” The term
“impulse response” is used more commonly for time domain filters. You might want to play the sound to be sure you have
what you think you have. The sound function requires that you tell it the number of samples it should play per second,
which for our simulation is 44,100.
sound(a, sr);
When you play the sound file and listen carefully, you can hear that it has three tones.
fftdata = fft(a);
fftmag = abs(fftdata);
figure;
freqs = [0: (sr/2)-1];
plot(freqs, fftmag(1:sr/2));
axis([0 600 0 8000]);
1. Include the Fourier Transform Matlab fft function to your previous code and record the result.
2. Write your observation to the last figure.