Академический Документы
Профессиональный Документы
Культура Документы
INTERNATIONAL
Journal of Advanced
JOURNAL
Research
OF ADVANCED
in Engineering RESEARCH
and Technology IN
(IJARET),
ENGINEERING
ISSN 0976
6480(Print), ISSN 0976 6499(Online)
Volume 5, Issue 10, October
(2014), pp. 175-184 IAEME
AND TECHNOLOGY
(IJARET)
IJARET
IAEME
Smt. Ashwini.N.Puttannavar
ABSTRACT
Dual-tone Multi-frequency (DTMF) Signals are used in touch-tone telephones as well as
many other applications such as interactive control, telephone banking, and email application. There
are many DTMF decoding algorithms, but most of them cannot comply with the related International
Telecommunications Union (ITU) and Bell Communications Research, Inc. (Bell core)
recommendations and/or are not suitable for real- time implementation, but Goertzel algorithm
comply with ITU recommendations for DTMF tones detection. Earlier works implemented this
algorithm using digital signal processors. Field programmable gate arrays (FPGA) has gain
popularity in recent years due to their flexibility, parallelism and reprogram ability. The FPGA
implementation of Modified Goertzel algorithm for the DTMF tone detection is implemented in this
work. Modified Goertzel algorithm is as effective as that of normal Goertzel algorithm, and more
hardware resources are saved than that of normal Goertzel Algorithm.
In this paper, direct form-II approach is considered for designing of Modified Goertzel
algorithm for DTMF detection, mathematical model of algorithm is tested using simulink and
implemented on FPGA. This approach gives a better performance than the common filter structures
in terms of speed of operation, cost, and power consumption in real-time. The Goertzel filter is
implemented in Altera DE2-70 Cyclone-II EP2C70F896C6 FPGA kit and simulated with the help of
Quartus-II. Software WEBEDITION project navigator 9.1 was used for synthesizing and simulation
the code.
Key Terms: Modified Goertzel Algorithm, DTMF Signal Detection, MATLAB Implementation,
FPGA Implementation.
I. INTRODUCTION
In signal processing, the function of a filter is to remove unwanted parts of the signal, such as
random noise, or to extract useful parts of the signal, such as the components lying within a certain
frequency range.
175
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
6480(Print), ISSN 0976 6499(Online) Volume 5, Issue 10, October (2014), pp. 175-184 IAEME
1336
Hz
2
1477
Hz
3
1633
Hz
A
770 Hz
852 Hz
941 Hz
Output
770 Hz
1336 Hz
Freq
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
6480(Print), ISSN 0976 6499(Online) Volume 5, Issue 10, October (2014), pp. 175-184 IAEME
operators used a 16-digit keypad to input the next portion of the destination telephone number in
order to contact the next downstream long-distance telephone operator. This semi-automated
signaling and switching proved successful in both speed and cost effectiveness. Based on this prior
success with using MF by specialists to establish long-distance telephone calls, Dual-tone multifrequency (DTMF) signaling was developed for the consumer to signal their own telephone-call's
destination telephone number instead of talking to a telephone operator.
The ITU specifications are as follows:
1. Signal frequencies:
1. Low group (Hz): 697, 770, 852, 941
2. High group (Hz): 1209, 1336, 1477, 1633
2. ITU frequency tolerances:
a. Maximum accepted frequency offset is 1.5%
b. Minimum rejected frequency offset is 3.5%
3. Signal Reception Timing:
a. Minimum accepted tone duration is 23 ms.
b. Maximum rejected tone duration is 40 ms.
c. Minimum pause time between two tones is 40 ms.
A DTMF signal consists of two superimposed sinusoidal waveforms whose frequencies are
chosen from a set of eight standardized frequencies as shown in Table 1.1. For example, by pressing
the 2 button from the Touch-tone telephone key pad, a signal made by adding a 770 Hz and a 1336
Hz sinusoid is generated as shown in figure 1.1.
1.3. Organization
Section II discusses the design stage for Goertzel filter, which includes specification of filter,
calculation of filter coefficients, and realization of filter structure.
In Section III, Results of mat lab simulation and FPGA.
In Section IV Conclusion and Future work.
SECTION II
MODIFIED GOERTZEL ALGORITHM
It is important to choose the right algorithm for detection to save memory and computation
time. The Goertzel algorithm is the optimal choice for this application because it does not use many
constants, which saves a great deal of memory space. Also, only eight DTMF frequencies need to be
calculated for this application, and the Goertzel algorithm can calculate selected frequencies. This
saves computation time. The DTMF frequency is transformed to a discrete Fourier transform (DFT)
coefficient. The relationship between the DTMF frequency (Fi) and the DFT filter coefficient (k) is
given in [9] equation (1),
k=N
Fi
Fs
Where
Fs = Sampling frequency
N = Filter length
177
(1)
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
6480(Print), ISSN 0976 6499(Online) Volume 5, Issue 10, October (2014), pp. 175-184 IAEME
Note: k is the nearest integer to equation (1). For each k, the state variable, Vk(n), is obtained by
using the recursive difference equation shown in equation (2):
Vk(n)=x(n)+2cos(2
k
) Vk(n1) Vk(n2)
N
(2)
Where n = 0, 1,.. N
Within the same k, equation (2) is iterated until the last state variable, Vk(n), is obtained.
Thereafter, the output, Yk(n), is given in equation (3):
Yk(n)=Vk(n)+Vk(n1)
Where WNk = exp (2
(3)
k
)
N
This is the desired DFT value, that is, X(k) = Yk(N) for n=N, Equations (2) and (3) are
described in the direct-form realization shown in Figure(3.1). This figure gives an overview of the
entire Goertzel algorithm, so that equation (3) is computed once after equation (2) has been
calculated N+1 times. Also, k is constant when equations (2) and (3) are evaluated.
x(n)
Vk(n)
Yk(n)
+
Z-1
+
Z-1
(4)
max=maximum(max,mag_square)
(5)
In equation 5, max is the maximum energy that initially was set to a zero value and stored in
memory. The energy from equation 4 is used for comparison with the stored maximum energy. As
soon as the new energy is greater than the stored maximum energy from the comparison, this new
energy is stored as the maximum energy for the next comparison. Also, the index that was initialized
to a zero value is changed to a number that represents the frequency of this new energy.
The comparison is performed for a total of eight times. After the final comparison, the index,
a number between 0 and 7 from the result of the comparisons, is returned to the calling program.
This number represents the detected DTMF frequency. The modified Goertzel algorithm can detect
178
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
6480(Print), ISSN 0976 6499(Online) Volume 5, Issue 10, October (2014), pp. 175-184 IAEME
all the frequencies within an offset range of 1.5%; however, it does not detect the frequency that
has an offset range of 3.0%. The modified Goertzel algorithm can detect the incoming frequency
within a 1.5% offset range.
Six tests are followed to determine if a valid DTMF digit has been detected:
1) Magnitude test: According to ITU Q.24, the maximum signal level transmit to the public network
shall not exceed 9 dBm. This limits an average voice range of 35 dBm for a very weak longdistance call to 10 dBm for a local call. A DTMF receiver is expected to operate at an average
range of 29 to +1 dBm. Thus, the largest magnitude in each band must be greater than a
threshold of 29 dBm; otherwise, the DTMF signal should not be detected. For the magnitude
test, the squared magnitude |X(k)|2 for each DTMF frequency is computed. The largest
magnitude in each group is obtained.
2) Twist test: The tones may be attenuated according to the telephone systems gains at the tonal
frequencies. Therefore, we do not expect the received tones to have same amplitude, even though
they may be transmitted with the same strength. Twist is defined as the difference, in decibels,
between the low and high-frequency tone levels. In practice, the DTMF digits are generated with
forward twist to compensate for greater losses at higher frequency within a long telephone cable.
For example, Australia allows 10 dB of forward twist, Japan allows only 5 dB, and North
America recommends not more than 8 dB of forward twist and 4 dB of reverse twist.
3) Frequency-offset test: This test prevents some broadband signals from being detected as DTMF
tones. If the effective DTMF tones are present, the power levels at those two frequencies should
be much higher than the power levels at the other frequencies. To perform this test, the largest
magnitude in each group is compared to the magnitudes of other frequencies in that group. The
difference must be greater than the predetermined threshold in each group.
4) Total-energy test: Similar to the frequency-offset test, the goal of total-energy test is to reject
some broadband signals to further improve the robustness of a DTMF decoder. To perform this
test, three different constants c1, c2, and c3 are used. The energy of the detected tone in the lowfrequency group is weighted by c1, the energy of the detected tone in the high-frequency group is
weighted by c2, and the sum of the two energies is weighted by c3. Each of these terms must be
greater than the summation of the energy from the rest of the filter outputs.
5) Second harmonic test: The objective of this test is to reject speech that has harmonics close to fk
so that they might be falsely detected as DTMF tones. Since DTMF tones are pure sinusoids,
they contain very little second harmonic energy. Speech, on the other hand, contains a significant
amount of second harmonic. To test the level of second harmonic, the detector must evaluate the
second harmonic frequencies of all eight DTMF tones. These second harmonic frequencies
(1394, 1540, 1704, 1882, 2418, 2672, 2954, and 3266 Hz) can also be detected using the
Goertzel algorithm. The coefficients of modified Goertzel algorithm is shown in figure 5.2.
Table 2.1: Goertzel Filter coefficients K for N=256, Fs= 8000Hz
DTMF Frequency in Hz
2cos((2*pi)/N)K
Coefficient K=N*fi/fs
697
770
852
941
1209
1336
1477
1633
22.304
24.64
27.264
30.112
38.688
42.752
47.264
52.256
179
1.707737809
1.645281036
1.568686984
1.478204568
1.164104023
0.99637021
0.798618389
0.568532706
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
6480(Print), ISSN 0976 6499(Online) Volume 5, Issue 10, October (2014), pp. 175-184 IAEME
Fig. 2.2: Implemented architecture of Modified Goertzel Algorithm on MATLAB and FPGA
Fig 2.2 shows the block diagram which is implemented on Altera cyclone-II FPGA kit. When
the dual tone signal is applied at the Line in input of ADC which is part of CODEC from function
generator. The WM8731 CODEC present on Altera FPGA kit, will output digitized signal from
ADC which is programmed for sampling frequency of 8 kHz. The digitized signal is applied to two
FIR band pass filters. The FIR band pass filter 1 is designed with the band of 600 Hz to 1 kHz and
FIR band pass filter 2 is designed with band of 1100 Hz to 1700 Hz. The band selected for band pass
filters is on par with ITU standard shown in Table 1.1. The row frequency is in the range from 600
Hz to 1 kHz and column frequency is in the range from 1100 Hz to 2 kHz.
The output of BPF (band pass filter) is given to bank of Goertzel filters. The Goertzel filter
are designed using direct form II architecture as shown in figure 3.1, with their respective
coefficients as shown in Table 5.2 for the row and column frequencies. The Goertzel algorithm gives
high energy at the output for the frequency which it is designed and it is displayed on seven segment
display of FPGA kit. Based on the output energy and threshold set the DTMF digit detection is done.
Here the output of band pass filter is 16-bit signed integer, where as the coefficients used in Goertzel
filter are floating point as shown in Table 5.2. The Goertzel filter coefficients are represented using
IEEE 754 32-bit floating point standard. Hence the output of band pass filter which is in 16 bit
signed integer is converted to IEEE 754 32 bit floating point representation, and output is 32 bit Hex
displayed on seven segment of FPGA kit.
180
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
6480(Print), ISSN 0976 6499(Online) Volume 5, Issue 10, October (2014), pp. 175-184 IAEME
In order to establish the communication between the CODEC and FPGA the VHDL code for
SDIN and SCLK signal generation are written considering the timing constraints provided in the
User Manual as shown in figure 2.3.
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
6480(Print), ISSN 0976 6499(Online) Volume 5, Issue 10, October (2014), pp. 175-184 IAEME
kit. If input signal is 697 Hz and 1209 Hz, then the output should produce high energy for this two
tones compared to other tones, then decision is made as digit 1 is pressed. Because digit 1
corresponds to 697 Hz and 1209 Hz. Similarly each digit can be detected based on input dual tone
applied.
SECTION III
800
600
400
200
0
500
1000
1500
2000
2500
Frequency (Hz)
3000
3500
4000
500
1000
1500
2000
2500
Frequency (Hz)
3000
3500
4000
1.5
0.5
500
1000
1500
2000
2500
Frequency (Hz)
3000
3500
4000
500
1000
1500
2000
2500
Frequency (Hz)
3000
3500
4000
0.5
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
6480(Print), ISSN 0976 6499(Online) Volume 5, Issue 10, October (2014), pp. 175-184 IAEME
SIMULINK RESULTS
Table 3.1: Energy of DTMF tones
Digits
1
2
3
A
4
5
6
B
7
8
9
C
*
0
#
D
frequency
697+1209
697+1336
697+1477
697+1633
770+1209
770+1336
770+1477
770+1633
852+1209
852+1336
852+1477
852+1633
941+1209
941+1336
941+1477
941+1633
697 Hz
340100
330000
330000
330000
120000
120000
120000
180000
29000
27000
26000
25000
14000
13000
12100
11000
770 Hz
73000
77000
79000
81000
360000
360000
360000
360000
82000
78000
76000
74000
24000
21000
20000
19000
852 Hz
9519
14000
11000
11000
43000
46000
48000
49000
210000
210000
210000
210000
54000
51000
49000
47000
941 Hz
2863
2982
3247
3497
6421
7225
7881
8388
25000
27000
29000
30000
250000
250000
250000
250000
1209
Hz
170000
8552
1536
454.5
170000
8156
1397
396.6
170000
7581
1224
352.3
170000
6722
1064
414.9
1336
Hz
10500
120000
6515
1028
10000
120000
6306
958.6
11000
120000
6019
872.4
11000
120000
5616
774.1
1477
Hz
2339
7788
120000
4777
2430
7956
120000
4653
2558
8188
120000
4491
2757
8520
120000
4277
1633
Hz
890.6
1484
5638
100000
927.3
1530
5730
100000
977.1
1591
5852
100000
1046
1674
6013
100000
FPGA RESULTS
Here the energy is in the form of float 32 bits hex which is displayed on seven segment
display. The output of FPGA is par with the energy that we obtain in Table 3.1.
CONCLUSION AND FUTURE SCOPE
Initially the Band Pass Filters and Goertzel filter were designed in MATLAB and the
mathematical model simulation of the design was done (as shown in fig (3.1), fig(3.2)). It has been
observed that frequency offset of the Goertzel designed filters are accepted within 1.5% and
rejected above 3.5%. Then the whole implementation has been done using VHDL coding. The
Analog to Digital Convertor (ADC) samples the input analog signal at 8 KHz (fs), this has been
verified by passing a sinusoidal signal as input to the ADC and increasing its frequency and
observing the DAC reconstructed signal in the CRO. It has been observed that a perfect
reconstruction is obtained until the input frequency reaches 4 KHz i.e. fs/2, after that band pass filter
and Goertzel filter are introduced after ADC. Then the functioning of the design of Goertzel filter
bank is tested by giving a dual tone signal as input to the ADC, and observed the high energy at the
output from Goertzel filter for the given dual tone signal on seven segment display on Altera
Cyclone-II FPGA kit. Hence the modified Goertzel algorithm is implemented using FPGA for
DTMF detection.
Implementation of Modified Goertzel Algorithm using FPGA can be further taken it to ASIC
design. Another future work could be proposing new frequency detection algorithm, and
implementing Goertzel algorithm using other suitable filters.
183
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
6480(Print), ISSN 0976 6499(Online) Volume 5, Issue 10, October (2014), pp. 175-184 IAEME
REFERENCES
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12]
[13]
[14]
[15]
[16]
[17]
Gay, S.L.; Hartung, J.; Smith, G.L.; , "Algorithms for multi-channel DTMF detection for the
WE DSP32 family ," Acoustics, Speech, and Signal Processing, 1989. ICASSP-89., 1989
International Conference on , vol., no., pp.1134-1137 vol.2, 23-26 May 1989
Tadokoro, Y.; Haneda, Y.; , "A Dual-Tone Multifrequency Receiver Using Synchronous
Additions and Subtractions," Communications, IEEE Transactions on , vol.35, no.4,
pp. 414- 418, Apr 1987.
Schwingshackl, D.; Mayerdorfer, T.; Straussnigg, D.; , "Universal Tone Detection Based on
the Goertzel Algorithm," Circuits and Systems, 2006. MWSCAS '06. 49th IEEE International
Midwest Symposium on , vol.1, no., pp.410-413, 6-9 Aug. 2006.
Li-Te Shen; Shaw-Hwa Hwang; , "A new single tone detection algorithm," Communications,
Control and Signal Processing, 2008. ISCCSP 2008. 3rd International Symposium on ,
vol., no., pp.600-603, 12-14 March 2008.
Kaiyi Zhang; Xiaoqing Yu; Wanggen Wan; , "A digital tone decoder based on a modified
Goertzel algorithm," Audio, Language and Image Processing, 2008. ICALIP 2008.
International Conference on , vol., no., pp.779-783, 7-9 July 2008.
Li-Te Shen; Shaw-Hwa Hwang; , "A new algorithm for DTMF detection," Wireless and
Optical Communications Networks, 2009. WOCN '09. IFIP International Conference on,
vol., no., pp.1-4, 28-30 April 2009.
Ekinci, Ahmet Suat; Atalar, Abdullah; , "A Fully Digital DTMF Receiver," Solid-State
Circuits Conference, 1995. ESSCIRC '95. Twenty-first European , vol., no., pp.438-441,
19-21 Sept. 1995.
yongbao song; Wei Sun; Liankun Zhang; Mingming Liu; , "The software generation and the
comparison of decoding approach of DTMF signal," Control and Decision Conference
(CCDC), 2010 Chinese , vol., no., pp.1054-1057, 26-28 May 2010.
Shaterian, K.; Gharaee, H.; , "DTMF detection with Goertzel algorithm using FPGA, a
resource sharing approach," Electronic Devices, Systems and Applications (ICEDSA), 2010
Intl Conf on , vol., no., pp.196-199, 11-14 April 2010.
Zhang Xinyi; , "The FPGA Implementation of Modified Goertzel Algorithm for DTMF
Signal Detection," Electrical and Control Engineering (ICECE), 2010 International
Conference on , vol., no., pp.4811-4815, 25-27 June 2010.
DE2 Development and Education Board, user manual Altera Version 1.08,
http://www.altera.com.
WM8731 Data sheet. Wolfson Microelectronics. 2004. PDF Document.
Pedroni. A. Volnei circuit design with VHDL 2nd edition.
Kastner. Daniel Embedded DSP 2002/2003.
Jaya Koshta, Vineeta Saxena(Nigam) and Rakesh .K Arya, Implementation and Validation
of Multiplier Less FPGA Based Digital Filter, International Journal of Electronics
and Communication Engineering & Technology (IJECET), Volume 4, Issue 2, 2013,
pp. 348 - 356, ISSN Print: 0976- 6464, ISSN Online: 0976 6472.
G.Prasad and N.Vasantha, Design and Implementation of Multi Channel Frame
Synchronization in FPGA, International Journal of Electronics and Communication
Engineering & Technology (IJECET), Volume 4, Issue 1, 2013, pp. 189 - 199, ISSN Print:
0976- 6464, ISSN Online: 0976 6472.
Ashish Jadhav, Prof. Minakshi Pawar, Mahesh Kumbhar, Mahesh Walunjkar and Tejas,
Advanced Design for Implementing Dual-Tone Multi-Frequency (DTMF) as an Alternative
Mean of Communication to RF Communication, International Journal of Electronics
and Communication Engineering & Technology (IJECET), Volume 3, Issue 2, 2012,
pp. 263 - 270, ISSN Print: 0976- 6464, ISSN Online: 0976 6472.
184