# ECE 417 Lab Exercise 6 Tone detection to decode telephone numbers

\$30.00

## Description

5/5 - (1 vote)

In this lab you will investigate telephone touch-tone signals used to represent different digits used in
dialing. Each digit is represented with a distinct pair of sinusoids.

You will use this information in figuring
out unknown phone numbers from signals containing a string of digits.

You will:
 process tone signals for each digit to determine the two sinusoidal components of each digit, and
 process a signal consisting of a dialed string of unknown digits and determine the digits and the order
in which they appear.

## 1 Tone detection to decode telephone numbers

Below is some sample code to load signals:
whos % shows Fs, {tpn0,…,tpn4},
% and {u0,…,u9} (ten digits)

Here is a brief description of the data available to you:
 Fs is the sampling frequency, 8192 Hz.
 u0,u1,…,u9 are signals representing digits 0, 1, . . . , 9 respectively. These are provided so that you can
compare their spectra, and find out the “code”, i.e. the way the spectral components encode the digit.

You may use fft command and plot/subplot to plot the magnitudes of these spectra. Following is
an example.
U3 = abs(fft(u3)); % example for computing and plotting
plot(U3) % the spectrum “signature of digit 3”
 tpn0,tpn1,tpn2,tpn3, and tpn4 are signals containing five different 4-digit phone extensions. Pick
only one signal, with the number in its label given by your UIN modulo 5. For example, if your UIN
ends with 24, pick signal tpn4.

Use Matlab commands to decode telephone number. You may try different methods, but try to figure
out a reliable approach. You may “cheat” a little and first plot the tpn# signal to figure out where each
digit information resides (in time) for the four digits in the signal containing the unknown phone number.

However it is preferable to find the digit boundaries with a suitable technique like using an energy threshold
to estimates the boundaries of the signal sample segments in which each digit information resides.

Q6.1 Determine the frequencies of the pair of sinusoids in each of the signals u0,u1,…,u9representing
the digits 0, 1, . . . , 9. Show a plot of the frequency content of the signal for each digit.

Q6.2 Explain the method you devised to determine the unknown phone number. List all the steps in

Q6.3 List the digits in the order you obtained. Submit an electronic version of your code to the TA. Do
not copy code from other students and do not re-use code from past years.

## 2 Variable-duration digits and noisy data: Tone detection to decode telephone numbers

In this lab exercise you may have assumed knowledge of digit signal boundaries and that each digit is of the
same duration.

In practice the dialed tone duration is variable and user-dependent. Some people may press
the keys longer and with uneven digit duration.

A good detector design should factor in such variations.

Q6.4 Now consider relaxing this assumption, and assume no knowledge of the boundaries of the time
intervals where the digit information resides. Describe ways of modifying the procedure to figure out where
each digit information resides (in time).

Bonus exercise: The five given signals tpn# are “clean signals” with no noise. In practice noise may
contaminate the signal. Add different amount of noise using the Matlab randn (Gaussian noise) command.

First determining the number of samples in the tpn# signal and use it in running the randn command for
creating the noise signal with the same number of samples as in tpn#.

Q6.5 (Bonus) Report your results on the detection after noise is added. Increase the noise until you start
seeing errors. Report the ratio of the signal power and the noise power when you observe the error.