ELEC 470
Prof. Rich Kozick
Spring, 1998

ELEC 470: Project 1


Date Assigned: Wednesday, January 28, 1998
Date Due: Wednesday, February 4, 1998


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 \begin{displaymath}
g_1(t) = {\rm rect}(t/T) \cdot \left[
\cos (2 \pi 697 t) + \cos (2 \pi 1209 t)
\right]\end{displaymath}

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.
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. To run this program:

  1. Save the file in your directory with name dtmf_ft.m
  2. Start MATLAB version 5 by typing matlab5 at the UNIX prompt on the Sun computers.
  3. At the MATLAB prompt, type dtmf_ft
  4. You should view the file in an editor, and make sure that you understand all of the steps. Note that you can change a line in the program in order to plot the spectrum of various DTMF signals.
  5. The imzoom feature in MATLAB is useful to zoom-in on interesting portions of a plot.
  6. If you want to print a figure in MATLAB, first click on the window for that figure, and then type at the MATLAB prompt:
    print -Plwc
    This will print in the second-floor Sun lab. You can specify other printers, such as lw3 for room 350.

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.


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?
  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