Professional Documents
Culture Documents
The first touch tone telephone installation was in While the actual DFT is based on the aforementioned
1963[3]. DTMF signaling uses voiceband tones to send Goertzel algorithm, the windowing, level detection, and
address signals and other digital information from push- timing logic involved in developing a working design
button telephones and other devices such as modems ensure that digital DTMF detection is a non-trivial
and fax machines[2]. Analog DTMF detection is done problem.
using bandpass filter banks with center frequencies at
the DTMF signal frequencies. As can be seen in Table 1, the DTMF signaling
frequencies are very closely spaced. It is obvious that
Analog receivers have wide tolerances to compensate the bandwidth of the filter used for detection must be
for distortion caused by aging transmitters, variations in narrow enough to avoid any bleeding of adjacent
keying characteristics, and transmission line distortion. frequencies. An even more limited bandwidth is
These distortions compound the problem of digital introduced when one considers that some of today’s
DTMF detection[4]. DTMF signal generators(phones, modems, etc.) are
p o o r l y m a d e t o s u c h a n ext e n t t h a t t h e ac t u a l
The introduction of digital pulse code frequencies generated are not as shown in Table 1.
modulation(PCM) switches in 1976 signaled the
beginning of the end of the analog telephone network. In
the past 20 years telephone networks have been rapidly
moving from totally analog to totally digital. In digital
switching systems is desirable to treat all signals
uniformly, bringing all signals through A/D converters
and switching them through the PCM system[4].
Therefore the need for digital DTMF detection is
justifiable to avoid the costs of hardware and D/A
∑ x(ω)e
rejected. This specification is instrumental for ensuring – jω 0 n
robustness to noise and speech. Interdigit time is the x(ω ) = , n = 0, 1, …, N – 1
0
n=0
50.0
25.0
0.0
-25.0
-50.0
-250.0 -150.0 -50.0 50.0 150.0 250.0
Sampling Frequency
b)
75.0
Frequency Response (dB)
50.0
25.0
0.0
-25.0
-50.0
-250.0 -150.0 -50.0 50.0 150.0 250.0
Sampling Frequency
c)
75.0
Frequency Response (dB)
50.0
25.0
0.0
-25.0
-50.0
-250.0 -150.0 -50.0 50.0 150.0 250.0
Sampling Frequency
Figure 1: Frequency response for: a) Rectangular Window, b) Triangular Window, and
c) Hamming Window
Rectangle -13.3 dB 1.00 0.89 Three primary factors led to the selection of this
technique. First, the DFT has been shown by Proakis [9]
Triangle -26.5 dB 1.33 1.28 to be a linear operation, i.e. any noise that is contained
in the time-domain signal representation is not amplified
Hamming -43 dB 1.36 1.30 in the frequency-domain by the DFT. Secondly, the DFT
is well-studied, and several efficient algorithms exist to
Table 2: Characteristics of Windows compute the DFT.
were tested. This table shows why the sidelobe 4.2. The Modifications
attenuation characteristics of the Hamming window
were preferable to the others given the slight difference
in bandwidth. As previously stated, the algorithm presented here is
based heavily on Goertzel’s algorithm. Several
substantial modifications were made, however, to
4. GOERTZEL’S ALGORITHM improve the overall computational efficiency of the
DTMF detector. First, we recognize that we are
4.1. The Algorithm interested in computing the DFT at a very small set of
frequencies. We create an array of size eight containing
The algorithm we used to compute the Fourier only the values of k corresponding to the eight
transform X(w) is based substantially on Goertzel’s frequencies with which we are interested. The algorithm
algorithm. Goertzel’s Algorithm. This algorithm models was then modified to compute the DFT at only these
the computation of the DFT as a linear filtering frequencies.
operation [9]. This operation takes the form of a parallel
bank of resonators, where each resonator selects one of Secondly, we recognized that the values of k need not be
the frequencies of the DFT [8]. The output of each of restricted to integers. This results directly from the fact
theses filters at n=N yields the value of the DFT at the that X(w) is continuous in w [9]. By allowing k to take
frequency wk = 2*PI*k/N. on floating point values, the DFT can be computed at
precisely the frequency of interest, within roundoff
The advantages of this approach over other algorithms error, regardless of the value of N. This single
are two-fold: 1) it is computationally more efficient, and modification eliminated altogether the problems
2) the value of the DFT can be computed at any associated with frequency resolution.
frequency desired. The extent to which the Goertzel
algorithm is more efficient than other algorithms (such A third improvement came from the realization that
as Fast Fourier Transforms) depends on the number of Goertzel’s algorithm was designed to handle a complex
frequencies at which the DFT is to be computed[9]. input data sequence x(n). However, the real and
Each iteration of the Goertzel algorithm requires one complex portions of the computations are separated in
real multiplication and two real additions. If the value of the algorithm. Because samples of a real signal are real-
the DFT is required at M points, then the total cost for valued, many of the computations were unnecessary and
computing the DFT is M*N multiplications and 2*M*N were eliminated. This effectively halved the number of
additions. For values of M < Log N, Goertzel’s computations required for each iteration.
algorithm is less expensive computationally than an FFT
algorithm which is O(N*Log N). A fourth modification that was made was to precompute
the phase factors Wk. This saves sixteen trigonometric
A second advantage to Goertzel’s algorithm is that, evaluations per DFT computation, at a cost of the
unlike FFT algorithms require N and N to be equal and a storage of sixteen floating point numbers.
power of 2[9], Goertzel’s algorithm places no artificial
constraints on these values. Hence, Goertzel’s algorithm Finally, the algorithm was modified to extract the input
sequence x(n) from a circular buffer. The original algorithm was simulated using these recorded files, and
Goertzel algorithm assumes that the data is stored in a the results were noted. Each of these files was then
vector with x(0) located in element 0 of the vector. combined in various ratios with the noise file previously
LiNear storage of the data proved to be awkward, at described to again create noisy data. Simulations were
best. The entire vector had to be reconstructed each time done with SNRs ranging from -30 to 30 and the results
the DFT was to be recomputed. Using a circular buffer, were noted.
only `stale’ data need be changed as new data is
received, while updating the pointers appropriately.
Software Generated Data 100 files
7 windows
100 files with noise
5. EVALUATION 7 windows
100.0
Rectangular
80.0 Triangular
Hamming
60.0
Percent Error
40.0
20.0
0.0
-40.0 -20.0 0.0 20.0 40.0
SNR
Figure 2: Percent Error VS SNR
Percent Error VS N
100.0
Rectangular
Hamming
Triangular
80.0
60.0
Percent Error
40.0
20.0
0.0
0.0 100.0 200.0 300.0 400.0
N
Figure 3: Percent Error VS N
0.0
f=697 Hz
f=770 Hz
-10.0
f=852 Hz
f=941 Hz
DFT Magnitude (dB)
-20.0
-30.0
-40.0
-50.0
0.0 500.0 1000.0 1500.0 2000.0
Time
Figure 4: Rectangular Window
0.0
f=697 Hz
-10.0 f=770 Hz
f=852 Hz
f=941 Hz
DFT Magnitude (dB)
-20.0
-30.0
-40.0
-50.0
0.0 500.0 1000.0 1500.0 2000.0
Time
Figure 5: Triangular Window N=330
-10.0
f=697 Hz
f=770 Hz
f=852 Hz
DFT Magnitude (dB)
f=941 Hz
-20.0
-30.0
-40.0
0.0 500.0 1000.0 1500.0 2000.0
Time
Figure 6: Hamming Window N=330
The DTMF detector was also evaluated for real time 7. ACKNOWLEDGEMENTS
operation. Data was taken from a touch-tone telephone
via a microphone and an A/D converter. The narecord
We would like to thank Dr. Joseph Picone for his
program was used to set the channel preference and
guidance and patience throughout this project. We
sample frequency and pipe the sampled data to the
would also like to thank Dr. and Mrs. Picone for their
detector. The pipe command was also utilized to send
help in data collection and the use of their telephones
files to the input of the detector for real time testing.
and recording equipment.
The two parameters that affected real time operation
We wish to thank Dr. William J. Ebel for his support,
were N(total number of points computed) and the size of
ideas, and the use of his personal library. We also want
sliding window(number of points computed each
to acknowledge the staff of ISIP for their technical
iteration). Real time performance deteriorates as N
support, and especially Mary Weber for her help in
grows large(>400) or the sliding window size grows
scanning images.
small(<64). This highlights the interdependence
between parameters. Decrease N for real time and the
bandwidth grows large accordingly.
6. SUMMARY
Systems:
WWW Sites: