Generation, Analysis and Detection of DTMF Signaling of DSP

Publisher:WanderlustHeartLatest update time:2013-08-19 Source: 21icKeywords:DSP Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Dual Tone Multi-Frequency (DTMF) signaling is gradually being used on touch-tone telephones around the world. It quickly replaced the dial pulse signaling used in traditional rotary phones because it provides a higher dialing rate. In recent years, DTMF has also been used in interactive controls, such as voice menus, voice mail, telephone banking, and ATM terminals. Integrating the generation and detection of DTMF signaling into any system containing a digital signal processor (DSP) is a valuable engineering application.

  The DTMF codec converts keystrokes or digital information into a dual-tone signal during encoding and sends it. During decoding, it detects the presence of keystrokes or digital information in the received DTMF signal. Each key on the telephone keypad is uniquely identified by the row frequency and column frequency shown in Figure 1. The DTMF encoding and decoding scheme does not require excessive computation and can be easily executed concurrently with other tasks in the DSP system.

  


 

  Figure 1

  As shown in Figure 1, a DTMF signal is composed of two superimposed audio signals. The frequencies of the two audio signals come from two pre-assigned frequency groups: row frequency group or column frequency group. Each pair of such audio signals uniquely represents a number or symbol. In order to generate a DTMF signal, the DSP uses software to generate two sine waves and superimposes them before sending them. When decoding, the DSP uses an improved Goertzel algorithm to search for the existence of the two sine waves in the frequency domain. This article discusses the implementation of DTMF encoding and decoding on TI's fixed-point DSP chip TMS320C54x (hereinafter referred to as C54x) series.

  1. Generation of DTMF signals

  The DTMF encoder is based on two second-order digital sine wave oscillators, one for generating the line frequency and the other for generating the column frequency. By loading the corresponding coefficients and initial conditions into the DSP, only two oscillators can be used to generate the required eight audio signals. The typical DTMF signal frequency range is 700 to 1700 Hz. Selecting 8000 Hz as the sampling frequency can meet the Nyquist condition.

  

 

  Figure 2

  From the block diagram of the digital oscillator pair in Figure 2, the differential equation of the second-order system function can be obtained as follows:

  y(n) = -a1y(n-1) - a2y(n-2) (1)

  Where a1=-2cosω0, a2=1, ω0=2πf0 /fs, fs is the sampling frequency, f0 is the frequency of the output sine wave, and A is the amplitude of the output sine wave. The initial value of this formula is y(-1)=0, y(-2)=-Asinω0.

  The CCITT specification for DTMF signals is that the transmission/reception rate is 10 digits per second, that is, 100ms for each digit. The audio signal representing the digit must last at least 45ms but no longer than 55ms. The rest of the 100ms is silent in order to distinguish between two consecutive key signals.

  

 

  Figure 3 The programming process is shown in Figure 3. According to CCITT regulations, there must be silence of appropriate length between digits. Therefore, the encoder has two tasks, one is the audio signal task, which generates dual-tone samples, and the other is the silence task, which generates silence samples. After each task is completed, before starting the next task (audio signal task or silence task), the timer variable that determines its duration must be reset. After the silence task is completed, the DSP calls the next digit from the digital buffer, determines the row frequency and column frequency signals corresponding to the digital signal, and determines its initialization parameters a1=-2cosω0 and y(-2)=-Asinω0 according to different frequencies.

  The flowchart can be implemented in C language, and the generation of dual-tone signals is implemented by 54x assembly code. The entire program is used as the transmitting serial port interrupt service subroutine of the C54x multi-channel buffered serial port (McBsp). The interrupt is triggered by the external 8000Hz serial port clock, and can process in real time and output DTMF signaling signals through the D/A converter.

  2 DTMF signal detection

  Detecting DTMF signals in the input signal and converting them into actual numbers is a continuous process in nature, which requires continuous searching for the existence of DTMF signal spectrum in the input data signal stream. The entire detection process is divided into two steps: first, using the Goertzel algorithm to extract spectrum information from the input signal; then checking the validity of the detection result.

  2.1 Goertzel algorithm

  DTMF decoding is to search for valid row and column frequencies in the input signal. DFT and its fast algorithm FFT can be used to calculate the spectrum of digital signals, and the Goertzel algorithm is faster than FFT when implementing DTMF decoding. FFT can be used to calculate all spectral lines of the signal and understand the entire frequency domain information of the signal. For DTMF signals, only the 8 row/column frequencies and their second harmonic information need to be concerned (the second harmonic information is used to distinguish DTMF signals from sound signals). At this time, the Goertzel algorithm can extract spectrum information from the input signal more quickly.

  

 

  Figure 4

  The Goertzel algorithm is essentially a two-pole IIR filter, and its algorithm principle block diagram is shown in Figure 4. Since the input signal in DTMF detection is a real number sequence, it is not necessary to detect the phase of the eight row/column frequencies, but only to calculate the square of their amplitude.

  2.2 DTMF Detector Process

  The detection process can be referred to Figure 5. The detection program is used as the McBsp receive interrupt service subroutine of C54x. When each receive interrupt arrives, it indicates that a new sample point has been collected. The sample point value is substituted into formula (2), and the intermediate variable vk(n) of the 8 row/column frequencies is iteratively calculated (k is the digital frequency corresponding to the 8 row/column frequencies) until N=125 samples are collected (at a sampling frequency of 8kHz, it is about 15ms). At this time, the amplitude square of the 8 row/column frequencies |X(k)|2 is calculated according to formula (4). Next, |X(k)|2 is compared with the threshold, and a second harmonic detection is performed to determine a valid audio signal. After the audio signal is mapped to a digital signal, it is compared with the last detected digital signal to finally determine a valid digital signal.

  

 

  Figure 5

  The DTMF signaling detection program is obtained according to the flow shown in Figure 5. The entire program is used as the McBsp receiving serial port interrupt service subroutine of C54x, so that the DTMF signaling signal from the A/D converter can be analyzed in real time.

  3 Performance Analysis

  Based on the above principles and algorithm codes, the performance of the above DTMF signaling generation and detection scheme is analyzed in Code Composer Studio (CCS), a DSP development environment of TI.

  (1) According to the following memory image file report given by CCS, the two core codes of DTMF generation (gen_dtmf.obj) and DTMF detection (de_dtmf.obj) occupy 3e6H and 1e0H words (16-bit word) respectively, that is, about 1K words of memory space, consuming very low system resources;

  (2) The generation and detection procedures of DTMF signaling are placed in the McBSP interrupt service subroutine of C54x. The code execution time is analyzed by the CCS code analysis tool. When C54x runs at a main frequency of 100MHz, the DTMF generation interrupt service subroutine interrupt transmit() consumes a maximum of 283 clock cycles, that is, 2.83μs, and the DTMF detection interrupt service subroutine interrupt receive() consumes a maximum of 6148 clock cycles, about 61μs. Therefore, this solution can generate and detect DTMF signaling in real time, and can also ensure time redundancy and concurrent execution with other programs in the user system.

Keywords:DSP Reference address:Generation, Analysis and Detection of DTMF Signaling of DSP

Previous article:Design and implementation of embedded clock manager
Next article:Realization of the electronic control unit of the mechatronic brake system based on CAN bus

Recommended ReadingLatest update time:2024-11-23 02:51

Introduction to the main frequency of common DSP chips
Introduction to the main frequency of common DSP chips The highest main frequency of TI's DSP can be obtained from the chip model, but it is not necessarily the same for each series. 1) TMS320C2000 series: TMS320F206 - maximum main frequency 20MHz. TMS320C203/C206 - maximum main frequency 40MHz. TMS320F2
[Embedded]
Design and implementation of DSP Ethernet interface based on DM9000A
DSP (Digital Signal Processor) is a unique microprocessor that processes large amounts of information using digital signals. Its powerful data processing capabilities and high operating speed are two of its most commendable features. With the development of network technology, in the fields of industrial control, inte
[Embedded]
Design and implementation of DSP Ethernet interface based on DM9000A
Design of 3G video helmet based on ARM11 and DSP
1 Introduction In order to improve the controllability of on-site operations in high-risk workplaces, this paper adopts bionic principles and high-integration design to realize a 3G video helmet with the same viewing angle as the human eye. This design consists of a video helmet and a waist-span data processing term
[Microcontroller]
Design of 3G video helmet based on ARM11 and DSP
Design and Optimization of H.264 Encoder Based on DSP
1 Introduction H.264 is a video compression standard jointly developed by the Video Coding Experts Group (VCEG) of ITU-T and the Moving Picture Experts Group (MPEG) of ISO/IEC. It is developed on the basis of H.263/H.263++. While inheriting all the advantages of coding and compression technology, it introdu
[Embedded]
A DSP-based blind recognition method for space-time coding in MIMO systems
 Space-Time Block Coding (STBC) is an effective coding method that reaches or approaches the capacity of MIMO wireless channels. Blind recognition of space-time coding is an area that needs urgent research in the field of communication countermeasures. It can provide the basis and technical support for MIMO system
[Embedded]
A DSP-based blind recognition method for space-time coding in MIMO systems
Research and Implementation of Chaotic Secure Communication Based on DSP Builder
Abstract: Using DSP Builder development tool, chaotic signals are used to realize encryption and decryption of communication digital signals. First, a system communication model is established in Simulink, and FM is used to perform differential keying on chaotic signals to form FM-DCSK signals. Then, digital s
[Embedded]
Research and Implementation of Chaotic Secure Communication Based on DSP Builder
Design of battery management module circuit based on DSP and OZ890
  This design mainly realizes functions such as data acquisition, battery status calculation, balancing control, thermal management, various communications and fault diagnosis. The battery management system circuit consists of a power module, a DSP chip TMS320LF2407A (referred to as "LF2407"), a data acquisition modul
[Embedded]
Design of battery management module circuit based on DSP and OZ890
Design of Asynchronous Serial Communication between TMS320C3x DSP and PC
TMS320C3x DSP is one of the most widely used DSP chips in China. It provides a serial interface that can communicate with external serial devices, supports 8/16/24/32-bit data exchange, and provides great flexibility for designing A/D and D/A interface circuits. However, when the DSP system communicates with the PC,
[Embedded]
Latest Power Management Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号