Stimulation of Dual Tone Multi Frequency Detection Using Bank of Filters

DOI : 10.17577/IJERTV2IS60278

Download Full-Text PDF Cite this Publication

Text Only Version

Stimulation of Dual Tone Multi Frequency Detection Using Bank of Filters

Abhay Kumar Singh

The LNM Institute of Information Technology, Jaipur, Rajasthan

1209 Hz

1336 Hz

1477 Hz

1633 Hz

697 Hz

1

2

3

A

770 Hz

4

5

6

B

852 Hz

7

8

9

C

941 Hz

*

0

#

D

1209 Hz

1336 Hz

1477 Hz

1633 Hz

697 Hz

1

2

3

A

770 Hz

4

5

6

B

852 Hz

7

8

9

C

941 Hz

*

0

#

D

Abstract

Dual-Tone Multi-frequency (DTMF) techniques have been researched for quite some time and is considered to be the basis for voice communications and is widely used worldwide in modern telephony to dial numbers and configure switchboards. The field has matured enormously over this time, number of procedures, algorithms and testbeds have been built and proposed, several manuscripts have been written, a large number of start-ups have been shaped, and DTMF technology has been deployed in the market place at a very rapid rate. The objective of this paper is to summarize the basic DTMF detection approaches, including Goertzel algorithm which deploys the advantages of Fast Fourier Transform algorithm. Along with it, this paper also presents the computational complexity associated with these algorithms to show cast the importance of Goertzel Algorithm.

  1. Introduction

    Dual Tone Multi Frequency is a system of signal tones used in the field of communication whose application ranges from voice mail and help desks to telephone banking and controlling robotics designs. There are twelve DTMF signals are made up of two tones from the following selection: 697 Hz, 770 Hz, 852 Hz, 941 Hz, 1209 Hz, 1336 Hz, and 1477 Hz. The

    tones are divided into low and high groups, and each DTMF signal uses one from each group. This prevents any harmonics from being misinterpreted as part of the signal. The table 1 shows the frequencies used for each signal. The telephones being used at the time of development of DTMF tones were thought to access computers and for this purpose a number of companies were asked to come up with a solution. This led to the addition of the number sign ( #, called as 'hash' or 'gate' in the UK) and asterisk or "star"(*) keys as well as a group of keys for menu selection: A, B, C and D. Later, the lettered keys were dropped from most phones before these keys became widely used for vertical service codes like military and government services.

    Table 1. Frequencies used in forming DTMF tones

  2. Frequency Detection in Modern Era

    Why we need an algorithm for filtering a set of frequencies which could easily be done through using bank of filters? It is because perfect filters are hard to design, implement and achieve. Through this paper we show the complexity involved in filtering the group of frequencies. Another method for filtering small range of frequencies is Goertzel Algorithm. In 1958 Gerald Goertzel came up with his algorithm which utilized the advantages of Fast Fourier Transform (FFT) algorithm but with certain modifications. General FFT algorithm computes evenly across the bandwidth of a given signal but his algorithm looked only at specific, predetermined frequencies. This made his algorithm to work fast for countable number of frequencies. Lets have a look at the algorithm.

    1. Goertzel Algorithm

      The working of Goertzel algorithm is based on equations[1]:

      Qn = x(n) + 2cos(2k/N) Qn-1 Qn-2

      | yk(N)| = Q2(N) + Q2(N-1) 2cos(2k/N)Q(N)Q(N-1)

      These equation when implemented lead to Figure 1:

      Figure 1. Goertzel Algorithm State Diagram

      In the above equation if N is set to 205[1], then the value of k needs to be determined. The value of this constant k also determines the tone we are trying to detect and is given by:

      k = N * ftone / fs Where: ftone = frequency of the tone

      fs = sampling frequency.

      Now we can calculate the value of the coefficient and obtain Table 2.

      Hence we keep only 205 samples or 25.6 ms for further processing. At this point we then use the FFT algorithm to calculate DFT. It is here that the popularity of Goertzel algorithm in estimating the DFT for small number of points has proved more efficient than the FFT algorithm.

      2cos(2k/N)

      Frequency

      K

      Coefficient

      697

      18

      1.703275

      770

      20

      1.635585

      852

      22

      1.562297

      941

      24

      1.482867

      1209

      31

      1.163138

      1336

      34

      1.008835

      1477

      38

      0.790074

      1633

      42

      0.559454

      Frequency

      K

      Coefficient

      697

      18

      1.703275

      770

      20

      1.635585

      852

      22

      1.562297

      941

      24

      1.482867

      1209

      31

      1.163138

      1336

      34

      1.008835

      1477

      38

      0.790074

      1633

      42

      0.559454

      Table 2. Calculating the coefficient of the equation

    2. MATLAB Stimulations

      The minimum duration of a DTMF signal prescribed by ITU standard is 40ms. If sampling frequency fs is taken be 8000 Hz, then 320 samples will be available for estimation and detection. The DTMF decoder needs to estimate the frequencies in these short signals. Computing the Discrete-Time Fourier Transform (DFT) samples for the fundamental tones using 205 samples in the frequency domain minimizes the error between the original frequencies and the estimated points of DFT [1].

      Method

      Number of Multiplications

      Number of Additions

      DFT

      N2

      N2 (N/2)

      FFT

      (N2/2) + (N/2)

      N2 N

      Goertzel

      N log 2 (N/2)

      (3/2)Nlog2(N/2)+4((N/2)-1)

      Table 3. Computational Complexity of algorithms

      Figure 2. Dual Tone Frequency components of keypads

      Table 3 shows the computational complexity comparison between DFT, FFT and Goertzel algorithm. Figure 2 shows the dual tone frequency components of the keypads while Figure 3 hows the Goertzel DFT magnitude estimate of each tone. Latter two stimulations were done on MATLAB and the output obtained is provided.

      Figure 3. Goertzel DFT magnitude estimate of tones

    3. Algorithm Used for implementation of Goertzel Algorithm

      Here I present the C code based algorithm which is used for the implementation of Goertzel Algorithm. This algorithm can further be programmed in assembly or high level language for hardware implementation of Goertzel Algorithm.

      Goertzel (double read) \\ declaring function

      {

      int delay_1=0; \\ Initialize three int delay_2=0; \\ variables with a int delay_3=0; \\ value of zero int N=0;

      int Goertzel=0;

      int coefficient_1=697; \\ to detect 697 Hz int I, product_1,product_2,product_3;

      int sum, output, input; double = R_input

      R_input=read; \\ read the input signal input = (int) R_input;

      product_1= (delay_2*coefficient_1); delay_1=input+product_1-delay_3; delay_3=delay_2;

      delay_2=delay_1; N++;

      if (N==206)

      {

      product_1=delay_2*delay_2; product_2=delay_3*delay_3; product_3=delay_2*coefficient_1; product_3=product_3*delay_3; Goertzel=product_1+product_2- product_3; N=delay_2=delay_3=0;

      }

        1. Analysis of different filters

          Sallen-Key configuration is also known as voltage control voltage source (VCVS), is one the widely used topologies because its configuration shows least dependence of filter performance of op-amp. In simple words it means that for a given op-amp, higher frequency filter can be designed and the op-amp gain bandwidth product will not limit the performance of the filter when compared to as in integrator. The filter is of non-inverting nature. The component spread, i.e. the ratio between highest component value and lowest component value, is low which is considered good for manufacturability. The Sallen-Key is Q-sensitive to element values which become a serious drawback of this configuration as then it is not easy to tune them due to the interaction and influence of components values on centre frequency.

          Figure 4. Sallen-Key Band-pass Filters

          output=(((int)R_input)*Goertzel); printf(Value detected is%d,output);

          }

  3. Hardware details and implementation

    The complexity of implementing the filtering of small range of frequencies within the prescribed limit of ITU is presented in this paper. The hardware basically deals with band-pass filters bandwidth range lying between 5-25 Hz. To implement this I used Sallen-Key filters used due to the fact that in Sallen Key filters, the op-amp is configured as an amplifier, as opposed to an integrator which minimizes the gain- bandwidth requirement of the op-amp. Along with Sallen-Key filters, two more filters were used of the purpose. These were state-variable filters and Biquad filters. Sate-variable Q value couldnt be tuned enough so biquad filters were then used as a replacement at certain places. Lets have a look at the basics of these filters and their working.

    Figure 5. Composite Response curve of second order Sallen-Key filters.

    Figure 4 shows the components arrangement in case of Sallen-Key band-pass filters. Their values depend upon the centre frequency. Figure 5 shows the composite curve response of a second order Sallen Key filters. Notice the ideal nature of high pass and low pass filters before the cut off frequencies which has no ripples in pass band.

    State-Variable filter offers the best implementation at the expense of more circuit elements. The major

    parameters have no effect on each other and are adjusted independently. The low pass, band pass and high pass outputs are available simultaneously but there is a phase shift in case of low pass and high pass outputs while band pass output maintain its phase. Because of the independent adjustment nature of parameters, component spread is also minimized. The added amplifier section sums the low-pass and high- pass output and a notch function come into realization. Figure 6 describe the structure of State-Variable filter and Figure 7 describe the composite response curve of state-variable filters.

    Figure 6. State-Variable Filters

    Figure 7. Response curve for State-Variable Filters

    Notice the non-ideal nature of high pass and low pass filters and their common cut-off frequency at f=fo. One can infer that the band-pass response actually utilizes the transition band-width of the two filters. The ripples in the low-pass and high-pass region are absent so it may follow the Bessel or Butterworth filter characteristics.

      1. Important Parameters for Filter Design Before we look into the working equations used in implementation, certain terms need to be defined. Quality factor (denoted by Q) denotes the selectivity of a band pass filter. The higher the value of Q, the narrower the bandwidth and better the selectivity for a given value of fo. Sometimes the band-pass filter are classified as narrow-band and wide-band depending upon the Q value. If Q value is less than 10 it is wide-

        band filter and if it is more than 10, it is narrow band filter. Inverse of quality factor is termed as Damping Factor (DF). It determines the filter response characteristics i.e. whether the response will be of Bessel characteristic for Butterworth characteristic. The third and last important parameter of a filter design is the Roll-Off Rate. It is defined as the rate of decrement in gain of a filter below or above the critical frequencies. Higher the roll-off rate, the more we move towards achieving low transition bandwidth. It is also observed that number of poles filter posses also have an effect on the roll-off rate. Number of poles a filter posses is defined by the the pairs of resistance and capacitance. It has been observed that higher the number of poles, greater the Roll-off rate.

      2. Working Equations and Hardware Implementation

    The Sallen-Key configuration, for instance, is the least dependent on the frequency response of the amplifier. All that is required is for the amplifier response to be flat to just past the frequency where the attenuation of the filter is below the minimum attenuation required. This is because the amplifier is used as a gain block. Beyond cut-off, the attenuation of the filter is reduced by the roll-off of the gain of the op-amp. This is because the output of the amplifier is phase shifted. There is also an issue with the output impedance of the amplifier rising with frequency as the open loop gain rolls-off. This causes the filter to lose attenuation.

    It means that the components values needed to design a filter would have to be chosen wisely.

    Figure 8. Scheme used for detection of DTMF tones

    With the help of 7 filters and 12 logical AND gates we will be able to the DTMF tones. Since the minimum difference between any two pure sinusoidal frequencies is 73 Hz (697 and 770 Hz), the allowed band-width for band-pass filters can range to 25 Hz. A circuit which detect the DTMF of the digit corresponding to 9 is

    built using the components and their values are discussed below. It is implemented in MULTISIM and the circuit diagram is given along-side.

    The critical frequency of the integrators is given by:

    The value of R4, R7, C1 and C2 are those which are mentioned in the State-Variable Filters.

    The centre frequency is approximately equal to the critical frequencies of the integrators.

    The Table 4 given below represents the values used in filter design. The values of resisters are given in Ohm and capacitance value is given in Farad.

    td>

    10K

    R1

    R2

    R3

    R4

    R5

    R6

    C1

    C2

    697 Hz

    10K

    10K

    10K

    100

    200

    100

    3.3µF

    3.3µF

    770 Hz

    10K

    1K

    100

    200

    100

    6µF

    6µF

    852 Hz

    10K

    10K

    1.1K

    100

    150

    400

    3.6µF

    3.6µF

    941 Hz

    10K

    10K

    10K

    200

    300

    150

    3.2µF

    3.2µF

    1209

    Hz

    10K

    10K

    1K

    150

    350

    300

    2.8µF

    2.8µF

    1336

    Hz

    10K

    10K

    1.1K

    300

    250

    350

    2.4µF

    2.4µF

    1477

    Hz

    10K

    10K

    10K

    250

    200

    250

    1.6µF

    1.6µF

    Table 4. Components value used in designing the filters

  4. Circuit Simulations

    All the stimulations are done on MULTISIM Analog Devices Edition version 10 to neglect the changes due to atmosphere and reduce human error. Figure 9 shows the band-pass configuration for 852 Hz, Figure 10 shows the band-pass configuration for 1477 Hz and Figure 11 shows the combination of these two band-pass configuration for detection of DTMF tone 9.

    Later the different values are also implemented in MULTISIM and then on bread-board to detect the DTMF tones.

    Figure 9. Band-pass configuration for 852 Hz.

    Figure 10. Band-Pass configuration for 1477Hz.

    Figure 11. Circuit diagram for Detecting DTMF tone 9.

  5. Observations

    When a filter is being assembled with components like resisters, capacitors and inductors, tradeoffs must typically be made because the calculated values of components will most likely not be available commercially as they come in standard values. Not only is the cost of components increased, which directly increases the manufacturing cost, but also the loading and tuning of a filter becomes a tedious job if we go to manufacture the filters according to our design, unless we dont have a start-up that meets to the demand of production. Further the tolerance and behaviour over a range of temperatures and time needs to be tracked continuously. As discussed above, the resonant frequency and Q value of a filter are highly

    dependent on the components used in the circuit. If the component value due to tolerance and atmospheric conditions starts drifting, the frequency and Q of filter will drift and hence will cause the frequency response to vary. The problem is prominent in case of high order filters. Very low resistance values dissipate a large amount of power. Noise also increases with the square root of resister values. Larger value of resisters was avoided due to the fact of noise increment and also because it will cause larger offsets due to effects of amplifier bias current.

  6. Conclusion

    Clearly as depicted in the oscilloscope, the performance obtained from the filters is not upto the mark. The FFT plot in Hanning window is in the prescribed limit, but the sharpness and precision is missing. Goertzel algorithm proves to be a better option to detect the DTMF tones than using the bank of filters.

  7. References

  1. http://materias.fi.uba.ar/6609/docs/Chapter14.pdf.

  2. Proakis, J.G.and Manolakis, D.G. (1996), Digital Signal Processing: Principles, Algorithms and Application, Upper Saddle River, N.J.: Prentice Hall.

  3. G. R. Cooper and C D. McGillem, Modern Communication and Spread Spectrum, McGraw-Hzl1 Internatzonal Edztaons,1986.

  4. Y Tadokoro and Y Haneda,, A Dual-tone multifrequency receiver using synchronous additions and subtractions, IEEE Trans. on Communacatzons, vol COM-35, pp 414-418, April 1987.

  5. M. J. Park, S. J. Lee, and D. H. Yoon, Signal Detection and Analysis of DTMF Receiver with Quick Fourier Transform, in Proc. 30th Annual Conference of IEEE Industrial Electronics Society, IECON 2004, Vol. 3, November 2004, pp. 2058-2064.

  6. V. Musoko, M. Pánek, and M. Mudrová, Detection of Information Carrier Signals using Band-pass Filters, in Proc. 10th MATLAB Conference 2002, Prague, November 2002.

  7. B.Widrow and S.D.Stearns, Adaptive Signal Proccessing. Prentice-Hall, Englewood Cliffs, NJ, 1985.

  8. A. V. Oppenheim and R. W. Schafer, Discrete-Time Signal Processing. Prentice-Hall, 1990.

  9. M. K. Ravishankar and K. V. S. Hari, Performance Analysis of Goertzels Algorithm based Dual-Tone Multifrequency (DTMF) Detection Schemes, Technical Report, ePrints@iisc (India), August 2004.

  10. Milo Trajkovié and Duan Radovié, Performance Analysis of the DTMF Detector based on the Goertzels Algorithm, in Proc. of the 14th Telecommunications Forum, TELFOR 2006, Serbia Belgrade, November 2006.

  11. Sanjit K. MitraDigital signal processing, A computer- based approach, Tata Mcgraw-hill Edition 1998.

  12. http://en.wikipedia.org/wiki/Goertzel_algorithm.

  13. http://en.wikipedia.org/wiki/Dual-tone_multi- frequency_signaling.

  14. http://www.jstor.org/discover/10.2307/2310304?uid=373 7496&uid=2&uid=4&sid=21101147314771.

  15. http://www.ti.com/lit/an/spra096a/spra096a.pdf/

  16. http://en.wikipedia.org/wiki/Electronic_filter_topology/

  17. http://en.wikipedia.org/wiki/Topology_%28electronics% 29#Simple_filter_topologies/

  18. Efficiently detecting a frequency using a Goertzel filter

  19. http://www.analog.com/library/analogdialogue/archives/4 3-09/EDCh%208%20filter.pdf/

  20. Floyd, Thomas L. (2005), Electronic Devices: Conventional Current Version; Pearson Education International.

  21. http://www.mathworks.in/products/signal/examples.html

    ?file=/products/demos/shipping/signal/dtmfdemo.html.

  22. http://www.ijetae.com/files/Conference_NCMIRA_0113/ IJETAE_NCMIRA_0113_05.pdf

  23. http://www.mathworks.in/products/demos/signaltlbx/dtm f/dtmfdemo.html

Leave a Reply