Comparison of FFT and Goertzel Algorithms Used in DTMF Detection
Total Page:16
File Type:pdf, Size:1020Kb
IJRECE VOL. 6 ISSUE 4 ( OCTOBER- DECEMBER 2018) ISSN: 2393-9028 (PRINT) | ISSN: 2348-2281 (ONLINE) Comparison of FFT and Goertzel Algorithms Used in DTMF Detection System Using GUI Pediredla Hima Bindu1, Sateesh Virothu2, Dr.M.Satya Anuradha3 1M.Tech Student, 2 Research Scholar, 3 Associate Professor Department of Electronic and Communication Engineering, Andhra University, Visakhapatnam, India (E-mail: [email protected]) Abstract— Dual Tone Multi Frequency (DTMF) signalling function when used with a microcontroller for automation of system is now-a-days a prevalent part of Industrial automation systems. and many other communication systems. In DTMF system, a At the transmitter of the DTMF system, a composite signal dial tone composed of two sine waves is generated at is generated with two tones when a key is pressed on touch tone transmitter end. At the receiver, the detection of DTMF signal keypad and is transmitted. This signal is detected at the DTMF can be achieved using different methods viz. digital filters, Fast receiver using different analog and digital detection methods. In Fourier Transform algorithm, Goertzel algorithm, correlation analog methods, analog filters are used to detect signal. In digital algorithm etc. In this paper, FFT and Goertzel algorithms are methods, Digital filters, FFT algorithm, Goertzel algorithm, used for detection of DTMF signal and these algorithms are Correlation algorithm are used. Earlier analog methods were compared under different SNR conditions. The entire system is used. But due to the rapid development in digital implemented in MATLAB Graphical User Interface (GUI). communication, these methods are replaced by efficient Digital Additive White Gaussian Noise is added. The parameters of methods. analysis considered for this work are Twist and computational EARLIER WORKS complexity. A. A. Deosthali et.al. [1] proposed the DTMF system which Keywords— DTMF; FFT; Goertzel algorithm; MATLAB, is developed by using second order Finite Impulse response AWGN; snr; Twist adaptive notch filters to eliminate unwanted noise. They have used a sophisticated Decision Logic system to validate the detected signal. The system is studied under different SNR I. INTRODUCTION values. DTMF detection using Goertzel algorithm using MATLAB is implemented by Miloš Trajkovié [2]. It introduced In today’s digital world, various methods are being the parameter tests like Twist test, SNR test and N test to test the developed to control devices wirelessly. Mobile phone is being system performance. used everywhere from household applications to industrial and military applications to operate devices from remote areas. Dual Suvad Selman[3] presented a DTMF system using various Tone Multi Frequency (DTMF) system has become an detection algorithms viz. Filter design approach, FFT algorithm, economic solution for this purpose. Goertzel algorithm and Sub-Band NDFT algorithm are used to develop the DTMF Detectors in MATLAB and this system is DTMF signaling was developed by Bell labs in United States implemented using TMS320C6713, digital signal processor. in 1960s in order to achieve the purpose of long distance The performance is compared using the parameters Figure of telephone calling. It is also being used in communication Merit and computational complexity. systems, Automation systems. It was an ideal replacement for slower pulse dialing system where it was necessary to use rotary Yongbao Song [4] had achieved the DTMF detection using type dials which are quite slow. the algorithms-FFT, Goertzel algorithm and SB-NDFT algorithm. The three algorithms are analysed and their Tone dialing is used in DTMF systems instead of pulse advantages and disadvantages were given for comparison. Liu dialing. Tone dialing uses specific tones to indicate the number Yuying [5] gave a detailed analysis of the Goertzel algorithm that was entered while pulse dialing uses a number of signal filter banks and developed the DTMF system using Goertzel pulses. This tone dialing is very quick and easy to use method detection algorithm in the MATLAB environment. for long distance communication using telephone lines. In this paper, the implementation of DTMF system using two Dual tone multi frequency signaling system or touch tone detection algorithms i.e., FFT algorithm and Goertzel algorithm. system uses a signal composed of two specific frequencies when Further, a comparison analysis is given for these detection a tone is dialed in the touch tone keypad. The touch tone keypad algorithms. consists of digits from 0 -9, alphabets A, B, C, D and symbols * and #. Each of these keys can be used to achieve a specific The paper is structured as: section 2 gives DTMF transmission and reception, section 3 gives Detection algorithms INTERNATIONAL JOURNAL OF RESEARCH IN ELECTRONICS AND COMPUTER ENGINEERING A UNIT OF I2OR 69 | P a g e IJRECE VOL. 6 ISSUE 4 ( OCTOBER- DECEMBER 2018) ISSN: 2393-9028 (PRINT) | ISSN: 2348-2281 (ONLINE) section 4 gives flowcharts and description, section 5 gives B. DTMF Reception results discussion followed by conclusion and references. At the receiver, the signal received might be the original transmitted signal or the signal with noise added to it. In practical systems, the signal gets corrupted with noise in the II. DTMF TRANSMISSION AND RECEPTION channel before reaching the receiver. Thus in our system, an Additive White Gaussian Noise (AWGN) is added to the A. DTMF Transmission received signal to validate the key under noisy conditions to replicate the practical systems. DTMF Transmitter system produces the dual tone signal by Some of the detection methods that are used are FFT selecting frequencies from a set of eight audible frequencies. algorithm, Goertzel algorithm, Correlation algorithm, SB- These frequencies are selected by AT&T and BELL Labs. This NDFT algorithm etc. In this work, FFT and Goertzel algorithms set of frequencies is transmitted in pairs to represent 16 signals, are implemented and their performance is compared using the that represent digits 0-9, the letters A- D, and the symbols * and parameters - Twist, power and Computational complexity. # in Touch tone keypad as shown in figure (1). III. DETECTION ALGORITHMS These frequencies are selected in such a way that they have the following unique properties: The detection algorithms that are used in this work are given as follows. (i)When a key is pressed then it can be detected by human ear since all tones are in audio frequency range. (ii)No frequency A. Fast Fourier Transform Algorithm is harmonic to other frequency. (iii)Difference or sum of any two Fast Fourier Transform is basically a faster way of frequencies is not equal to any other frequency. computing Discrete Fourier Transform of a signal in digital The frequencies used are divided into row and column signal processing. It is also the efficient way to calculate an N- groups depending on low and high frequencies respectively as point DFT if the number of samples is chosen to be a power of shown in figure (1). 2. The DTMF signal generated for a tone can be represented as In FFT algorithm, a discrete signal is represented as an in equation (1). algebraic sum of its frequency components. The general representation of FFT of a discrete signal 푦̈[푛] is given in 푥푡푟(푡) = 퐴0 sin(2휋푓1푡) + 퐴1 sin(2휋푓2푡) (1) equation (2). Where 퐴0=amplitude of low frequency sine signal 퐹퐹푇 {푦̈[푛]} = 푌̈ (퐾) 2휋 퐴1= amplitude of high frequency sine signal 푁−1 −푗 푛푘 = ∑푛=0 푦̈(푛)푒 푁 , 0 ≤ 푘 ≤ 푁 − 1 (2) 푓 = signal from low frequency group 1 The continuous signal that is received at the DTMF detector 푓2= signal from high frequency group be represented as 푥푟(t) and this is signal is sampled and is represented as 푥 [n] and these are given in equations (3) and (4) 푟 respectively. 푥푟(푡) = 퐵0 sin(2휋푓1푡) + 퐵1 sin(2휋푓2푡) (3) 푛 푛 푥푟[푛] = 퐵0 sin (2휋푓1( )) + 퐵1 sin (2휋푓2( )) (4) 퐹푠 퐹푠 Where 퐵0, 퐵1 = amplitudes of the two sine signals 푓1, 푓2 = frequencies of the two sine waves Fs= sampling frequency Now, FFT for the signal 푥푟[n] is given in equation (5) as follows Figure 1: Touch tone Keypad 2휋 −푗 푛푘 푋 (푘) = ∑푁−1 푥 (푛)푒 푁 , 0 ≤ 푘 ≤ 푁 − 1 (5) 푟 푛=0 푟 푁−1 −푘푛 The generated signal is transmitted to the DTMF receiver = ∑푛=0 푥푟(푛) 푊푁 , 0 ≤ 푘 ≤ 푁 − 1 (6) which is at remote distance and the corresponding key is Where N=Number of samples detected using various detection algorithms. 2휋 −푗 and 푊푁 = 푒 푁 For DFT with N number of samples, number of complex additions required are N (N-1) and number of complex multiplications required are 푁2. But by using FFT algorithm, the INTERNATIONAL JOURNAL OF RESEARCH IN ELECTRONICS AND COMPUTER ENGINEERING A UNIT OF I2OR 70 | P a g e IJRECE VOL. 6 ISSUE 4 ( OCTOBER- DECEMBER 2018) ISSN: 2393-9028 (PRINT) | ISSN: 2348-2281 (ONLINE) computations are reduced to about N푙표푔2 푁 complex additions 푁 and 푙표푔 푁 complex multiplications. The reduction in 2 2 computations is achieved by using the properties of the complex 푘푛 number 푊푁 . The properties that are used are symmetricity and periodicity. For a DTMF signal only a specific set of frequencies are to be studied, but FFT algorithm analyses the entire spectral components which leads to power wastage and increase in computational complexity. Thus more efficient algorithm is introduced i.e., Goertzel algorithm. B. Goertzel Algorithm Goertzel algorithm analyses the spectrum only at the specific frequency/set of frequencies thus is more suitable for systems like DTMF. The computational efficiency depends upon the number of samples considered for the system analysis. For the time-domain sequence푥푟[푛] , N-point DFT is 푋푟(푘) , and we know that 푊푁 − 푘푁=1, so, Figure 2: Goertzel Filter bank 푁−1 푛푘 푋푟(푘) = 퐷퐹푇{푥푟[푛]} = ∑푛=0 푥푟[푛]푊푁 (7) The transfer function for the Goertzel filter is given in −푘푁 푁−1 푛푘 equation (14) = 푊푁 ∑푛=0 푥푟[푛]푊푁 (8) ̈ ̈ 1 −(푁−푛)푘 퐻푘(푍) = 푍푇{ℎ푘(푛)} = 푗2휋푛푘 (14) 푁−1 − = ∑푛=0 푥푟[푛]푊푁 (9) (1−푒 푁 푧−1) To reduce the complex calculations, the first order single pole filter is changed into a second order double pole filter as Now consider a new sequence 푦 (푛) as defined in equation (10) 푟 given in equation (15).