ELEC 470, Spring 2004
Prof. Rich Kozick

## ELEC 470: Project 1

Date Assigned: Tuesday, February 17, 2004
Date Due: Thursday, February 26, 2004

The "touch-tones" that we use to place a telephone call are encoded using the dual-tone multifrequency (DTMF) code. Each button on the telephone is encoded by a sum of two equal-amplitude sine waves, with frequencies as shown in the following table.

 Frequency (Hz) 1209 1336 1477 697 1 2 3 770 4 5 6 852 7 8 9 941 * 0 #

An audio file that plays each tone for 0.5 seconds is available by clicking here. The sequence is 123456789*0#.

Suppose that you are designing a system to decode the DTMF signals. How long must the DTMF signal stay "on" in order for your decoder to reliably distinguish between the 12 signals? You would like to design a system that requires a signal duration that is as small as possible. We will examine this question from three viewpoints. First, we will use Fourier transform analysis to estimate the required duration of the signals. Then we will use MATLAB to verify and further refine our estimate. Finally, we will use the Fast Fourier Transform (FFT) to analyze sampled DTMF signals. This exercise will also help introduce you to MATLAB and the FFT.

Analytical Approach

A DTMF signal with duration T seconds can be modeled as a sum of two cosine signals with frequencies fr and fc, multiplied by a rectangle function. For example, the DTMF signal for "1" is

Questions:

1.
What is the expression for the Fourier transform of a DTMF signal?
2.
Sketch the amplitude spectrum of a DTMF signal with infinite duration, i.e., with T = infinity.
3.
Sketch the amplitude spectrum of a DTMF signal with finite duration. You should make this sketch by hand, using the Fourier transform expression obtained in part 1. What happens to the DTMF spectrum when T is "too small"?
4.
What would you estimate as the smallest value of signal duration T so that the spectra of the 12 DTMF signals are distinguishable from each other? Explain your reasoning.

Plotting Fourier Transforms with MATLAB

We can use MATLAB to plot the amplitude spectra of DTMF signals. An example MATLAB program dtmf_ft.m can be downloaded from the Web page for this assignment. Note that the sinc function in MATLAB is defined as sinc(x) = sin(pi x)/(pi x), while the Lathi text defines the sinc function as sinc(x) = sin(x)/(x).

To run this program on the Sun computers or PCs:

1. Save the file in your disk space with name dtmf_ft.m
2. Start MATLAB on the Suns by typing matlab at the UNIX prompt. MATLAB is also available on most PCs on campus.
3. At the MATLAB command prompt >>, type dtmf_ft
4. You should view the file in an editor, and make sure that you understand all of the steps. For example, MATLAB has an editor that can be started by typing edit at the command prompt. Note that you can change a line in the program in order to plot the spectrum of various DTMF signals.
5. You can zoom-in on interesting portions of a plot using the "+" magnifying tool on the toolbar.
6. If you want to print a figure in MATLAB, you can use the File menu for that figure.

Run the program for various choices of signal duration T. You should be able to verify and possibly refine your estimate of the minimum duration T that you determined above. Please discuss how these results relate to your analysis in the previous section.

Analysis of Sampled DTMF Signals with the FFT

In this section, we will analyze data files that contain samples of DTMF signals. Three different values of signal duration T are used in the data files. The sampling rate is 8192 samples per second, so samples are spaced by 1/8192 seconds. Your results in this section should agree with your previous analysis.

Begin by downloading the following 15 data files. Each data set (A, B, and C) uses a different value for T.

A sample MATLAB program that uses the FFT to plot the amplitude spectrum of a data set is available at dtmf_fft.m

Please answer the following questions for each data set A, B, and C.

1. What is the duration T of the DTMF signal? Note that the number of samples N is determined in the program, and the spacing between samples is (1/Fs).
2. If possible, specify the symbol (1,2,3,4,5,6,7,8,9,*,0,#) that is encoded in each signal.
3. Do your results in this section agree with your previous estimate of the minimum value for T?
If you would like to generate DTMF signals with a different duration T, you can use the MATLAB program dtmf_gen.m