Copyright © 2003 Texas Instruments. All rights reserved. DSP C5000 Chapter 17 DTMF generation and detection Dual Tone Multiple Frequency.

Slides:



Advertisements
Similar presentations
Chapter 17 Goertzel Algorithm
Advertisements

Chapter 17 DTMF generation and detection Dual Tone Multiple Frequency
Chapter 19 Fast Fourier Transform
Slides for Parallel Programming Techniques & Applications Using Networked Workstations & Parallel Computers 2nd ed., by B. Wilkinson & M
LECTURE Copyright  1998, Texas Instruments Incorporated All Rights Reserved Use of Frequency Domain Telecommunication Channel |A| f fcfc Frequency.
Chapter 14 Finite Impulse Response (FIR) Filters.
0 - 1 © 2010 Texas Instruments Inc Practical Audio Experiments using the TMS320C5505 USB Stick “Sine Waves” Texas Instruments University Programme Teaching.
DAT2343 Comparison of The LMC and General Computer Models © Alan T. Pinck / Algonquin College; 2003.
Digital Representation of Audio Information Kevin D. Donohue Electrical Engineering University of Kentucky.
AMI 4622 Digital Signal Processing
Chapter 10 – Digital System Projects Using HDL Copyright © 2011, 2007, 2004, 2001, 1998 by Pearson Education, Inc. Upper Saddle River, New Jersey
Dual Tone Multi-Frequency System Michael Odion Okosun Farhan Mahmood Benjamin Boateng Project Participants: Dial PulseDTMF.
Chapter 17 Goertzel Algorithm Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 17, Slide 2 Learning Objectives  Introduction.
Sampling, Reconstruction, and Elementary Digital Filters R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2002.
Chapter 15 Infinite Impulse Response (IIR) Filters.
Implementation of Basic Digital Filter Structures R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2003.
DSP Implementation of a 1961 Fender Champ Amplifier James Siegle Advisor: Dr. Thomas L. Stewart March 11, 2003.
1 Chapter 5 Multiplexing : Sharing a Medium Data Communications and Computer Networks: A Business User’s Approach.
Chapter 17 Microprocessor Fundamentals William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc. Upper.
Designs and Implementation Ring Detector circuit Design: Ring Detector circuit Design:
A Company Selling Technology and not just a Product.
GallagherP188/MAPLD20041 Accelerating DSP Algorithms Using FPGAs Sean Gallagher DSP Specialist Xilinx Inc.
GPGPU platforms GP - General Purpose computation using GPU
Adaptive Signal Processing Class Project Adaptive Interacting Multiple Model Technique for Tracking Maneuvering Targets Viji Paul, Sahay Shishir Brijendra,
0 - 1 © 2010 Texas Instruments Inc Practical Audio Experiments using the TMS320C5505 USB Stick “FIR Filters” Texas Instruments University Programme Teaching.
“TMS320C5505 USB Stick Teaching Materials”
Chapter 19 Electronics Fundamentals Circuits, Devices and Applications - Floyd © Copyright 2007 Prentice-Hall Chapter 19.
Digital Speech Transmission and Recovery. Overall System Output (speaker) Channel (coax cable) Receiver Circuit Input (microphone) Transmitter Circuit.
RM2D Let’s write our FIRST basic SPIN program!. The Labs that follow in this Module are designed to teach the following; Turn an LED on – assigning I/O.
Chapter 21 Frequency Modulation GMSK Modulation DSP C5000 Copyright © 2003 Texas Instruments. All rights reserved.
EE 445S Real-Time Digital Signal Processing Lab Fall 2013 Lab #2 Generating a Sine Wave Using the Hardware & Software Tools for the TI TMS320C6748 DSP.
Implementation of MAC Assisted CORDIC engine on FPGA EE382N-4 Abhik Bhattacharya Mrinal Deo Raghunandan K R Samir Dutt.
Chapter 6 Digital Filter Structures
Copyright © 2011 by Denny Lin1 Computer Music Synthesis Chapter 6 Based on “Excerpt from Designing Sound” by Andy Farnell Slides by Denny Lin.
ECE 448: Lab 6 DSP and FPGA Embedded Resources (Digital Downconverter)
DSP C5000 Chapter 16 Adaptive Filter Implementation Copyright © 2003 Texas Instruments. All rights reserved.
EE 113D Fall 2008 Patrick Lundquist Ryan Wong
Copyright © 2003 Texas Instruments. All rights reserved. DSP C5000 Chapter 20 Polyphase FIR Filter Implementation for Communication Systems.
Lecture 10a Infinite Impulse Response (IIR) Filters.
Z TRANSFORM AND DFT Z Transform
Sonia Hingorany & Liza Cyriac EE113D – Professor Rajeev Jain & TA Rick Huang– Winter 2008.
LIST OF EXPERIMENTS USING TMS320C5X Study of various addressing modes of DSP using simple programming examples Sampling of input signal and display Implementation.
Copyright © 2003 Texas Instruments. All rights reserved. DSP C5000 Chapter 18 Image Compression and Hardware Extensions.
Generating Sinusoidal Signals Prof. Brian L. Evans Dept. of Electrical and Computer Engineering The University of Texas at Austin EE 445S Real-Time Digital.
Digital filters Honza Černocký, ÚPGM. Aliases Numerical filters Discrete systems Discrete-time systems etc. 2.
EEE 503 Digital Signal Processing Lecture #2 : EEE 503 Digital Signal Processing Lecture #2 : Discrete-Time Signals & Systems Dr. Panuthat Boonpramuk Department.
Which one? You have a vector, a[ ], of random integers, which can modern CPUs do faster and why? //find max of vector of random ints max=0; for (inda=0;
Digital Signal Processing
Slides for Parallel Programming Techniques & Applications Using Networked Workstations & Parallel Computers 2nd ed., by B. Wilkinson & M
Student Name USN NO Guide Name H.O.D Name Name Of The College & Dept.
Fast Fourier Transforms. 2 Discrete Fourier Transform The DFT pair was given as Baseline for computational complexity: –Each DFT coefficient requires.
Signal Analyzers. Introduction In the first 14 chapters we discussed measurement techniques in the time domain, that is, measurement of parameters that.
By by  Y.MADHU KEERTHANA (084A1A0459)  RAHIM BASHA (084A1A0441)  G.BABJI REDDY (084A1A0416)  V.REVATHI (084A1A0456 ) UNDER THE GUIDENCE OF….... Mr.T.E.ARAVINDAN,
بسم الله الرحمن الرحيم Digital Signal Processing Lecture 14 FFT-Radix-2 Decimation in Frequency And Radix -4 Algorithm University of Khartoum Department.
Application of digital filter in engineering
Arduino Based Industrial appliances control system by decoding dual tone multi frequency signals on GSM / CDMA network. Submitted by:
Voice Manipulator Department of Electrical & Computer Engineering
DIGITAL SIGNAL PROCESSING ELECTRONICS
EEE4176 Applications of Digital Signal Processing
Embedded Systems Design
This chapter provides a series of applications.
Generating Sinusoidal Signals
Chapter 17 Goertzel Algorithm
Linear Predictive Coding Methods
Lab 5 Part II Instructions
Z TRANSFORM AND DFT Z Transform
Lab 2 Part II Instructions
Chapter 19 Fast Fourier Transform
Chapter 15 Infinite Impulse Response (IIR) Filters
♪ Embedded System Design: Synthesizing Music Using Programmable Logic
Presentation transcript:

Copyright © 2003 Texas Instruments. All rights reserved. DSP C5000 Chapter 17 DTMF generation and detection Dual Tone Multiple Frequency

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 2 Learning Objectives  DTMF signaling and tone generation.  DTMF signal generation  DTMF tone detection techniques and the Goertzel algorithm.  Implementation of the Goertzel algorithm for tone detection on DSP

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 3 Introduction  Dual Tone Multi-Frequency (DTMF) is a widespread used signalling system: telephone services use commonly key strokes for options selection  DTMF is mainly used by touch-tone digital telephone sets which are an alternative to rotary telephone sets.  DTMF has now been extended to electronic mail and telephone banking systems  It is easily implemented on a DSP as small part of the tasks.

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 4  In a DTMF signaling system a unique combination of two normalized frequency tones  Two types of signal processing are involved:  Coding or generation.  Decoding or detection.  For coding, two sinusoidal sequences of finite duration are added in order to represent a digit. DTMF Signaling

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 5 Dual tone Generation A key stroke on « 9 » will generate 2 added tones, one at 852Hz low frequency and one at 1477Hz The 2 tones are Both audible.

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 6 Tones Generation  Dual tone generation can be done with 2 sinewave sources connected in parallel.  Different method can be used for such implementation:  Polynomial approximation  Look-up table  Recursive oscillator  DTMF signal must meet certain duration and spacing requirements  10 Digits are sent per second.  Sampling is done via a codec at 8Khz  Each tone duration must be >40msec and a spacing of 50ms minimum between two digits is required

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 7 2 and 9 digit signal sequence

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 8 DTMF generation implementation  Tone generation of a DTMF is generally based on two programmable, second order digital sinusoidal oscillators, one for the low f l the other one for the high f h tone.  Two oscillators instead of eight reduce the code size.  Coefficient and initial conditions are set for each particular oscillation Z -1 Z Z y(n) Low freq Highfreq

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 9 Digital oscillator parameters  2 pole resonator filter with 2 complexe poles on the unit cercle (unstable) Output signal: Y(n)= -a 1 y(n-1)-y(n-2) Initial conditions: Y(-1)=0 Y(-2)=-A sin(   )    f 0 /fs f 0 is the tone freq fs is the sampling freq

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 10 C55 sine generator code   Frames of data stream of 120 samples (15msec) long contain either DTMF tone samples or pause samples.   The encoder is either in idle mode, not used to encode digits or active and generates DTMF tones and pauses   The sine equation is implemented in assembly language: Mova 1 /2, T1; coded in Q15 Mpym*AR1+,T1,AC0;;AR1 y(n-1); AR1+1 y(n-2) sub*AR1-<<#16,AC0,AC;AC1= a1/2*y(n-1)-y(n-2) AddAC0,AC1; AC1= a1*y(n-1)-y(n-2) ||delay*AR1;y(n-2)=y(n-1) Movrnd(hi(AC1)),*AR1;y(n-1)=y(n) ; output signal pointer is AR1

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 11 Oscillator parameters at fs=8Khz

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 12 DTMF Tone Detection  Goertzel algorithm is the more efficient detection algorithm for a single tone.  To detect the level at a particular frequency the DFT is the most suitable method: The Goertzel algorithm is a recursive implementationThe Goertzel algorithm is a recursive implementation of the DFT, 16 samples of the DFT are computed for 16 tones16 samples of the DFT are computed for 16 tones See DTMF.pdf file for a complete description DTMF.pdf

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 13 Goertzel Algorithm Implementation  To implement the Goertzel algorithm the following equations are required: The only coefficient needed to compute output signal level is Cos(2  f k /f s )

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 14 Goertzel Algorithm Implementation Get N input samplex(n) Compute recursive part: W k (n), n=0 to N-1 For 8 frequencies Calculate X 2 (k) for 8 freq Tests:MagnitudeHarmonic Total Energy Output Digit

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 15  The value of k determines the tone we are trying to detect and is given by: Goertzel Algorithm Implementation  Where:f k =frequency of the tone. f s =sampling frequency. N is set to 205.  Then we can calculate coefficient 2cos(2*  *k/N).

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 16 Goertzel Algorithm Implementation FrequencykCoefficient(decimal)Coefficient(Q15) x479C x x4090* x4A70* x5EE7* x63FC* x68AD* x6D02* * The decimal values are divided by 2 to be represented in Q15 format (a 1 /2<1). N = 205 fs = 8kHz

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 17 w n = x(n) - w n-2 + a 1 *w n-1 ; 0  n<N-1 = sum1+ prod1 Goertzel Algorithm Implementation Where: a 1 = 2cos(2  k/N) and N=205 This gives 205 MACs+ 205 ADD |Yk(N) | 2 = Q 2 (N) + Q 2 (N-1) - a 1 *Q(N)*Q(N-1) The last computation gives the energy of the tone and is done with: 2 SQRS and one multiplication

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 18 Goertzel Algorithm Implementation void Goertzel (void) { static short delay; static short delay_1 = 0; static short delay_2 = 0; static int N = 0; static int Goertzel_Value = 0; int I, prod1, prod2, prod3, sum, R_in, output; short input; short coef_1 = 0x4A70;// For detecting 1209 Hz R_in = mcbsp0_read();// Read the signal in input = (short) R_in; input = input >> 4; // Scale down input to prevent overflow prod1 = (delay_1*coef_1)>>14; delay = input + (short)prod1 - delay_2; delay_2 = delay_1; delay_1 = delay; N++; if (N==206) { prod1 = (delay_1 * delay_1); prod2 = (delay_2 * delay_2); prod3 = (delay_1 * coef_1)>>14; prod3 = prod3 * delay_2; Goertzel_Value = (prod1 + prod2 - prod3) >> 15; Goertzel_Value <<= 4; // Scale up value for sensitivity N = 0; delay_1 = delay_2 = 0; } output = (((short) R_in) * ((short)Goertzel_Value)) >> 15; mcbsp0_write(output& 0xfffffffe);// Send the signal out return; } ‘C’ code

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 19 C54 assembly programme Goertzel tone detection routine ;Assume input signal x(n) is read through an I/O port at address 100h ;Output level Y(k)2 is sent to a port at address 1001h ;Scratch RAM reservation.bsswn,2;w(n-1) andw(n-2).bssxn,1; input signal xn.bssY,1; tone Energy.bssalpha,1;coefficient storage ; Constant initialisation alphap.word0x68ADh; a2/2 coefficient value at fs=8khz ; (prog memory) N.set205;value of N ;DSP modes initialisation SSBXFRCT;Product shift for Q15 format SSBXSXM;Sign extension during shift RSXBOVA; no overflowmode for A and B RSXBOVB

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 20 C54 assembly programme ;Data pointers Initialisation LD#wn,AR2; AR2 is pointing w(n-1) LD#xn,AR1 LD#Y,AR4 LD#alpha,AR3 MVPD#alphap,*AR3;Move alpha value to data RAM RPTZ#1;Accumulator A=0 STLA,*AR2+, w(0) and w(-1) are set to 0 MAR*AR2-; AR2 is pointing w(n-2)

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 21 Algorithm Core STM#N-1,BRC; repeat block number RPTBloop-1 PORTR100h,*AR1 LD*AR1,16,A; AccH=x(n) SUB*AR2,16,A;A=x(n)-w(n-2) MAC*AR2,*AR3,A;A=x(n)-w(n-2)+alphaw(n-1) MAC*AR2,*AR3,A;A=x(n)-w(n-2)+2alphaw(n-1) delay*AR2;w(n-2)=w(n-1) tap delay STHA,*AR2+;w(n-1)=w(n) tap delay Loop;end of loop

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 22 Energy calculation LD*AR2,16,A;A=w(N-1) MPYA*AR2-;T=w(N-1) B=w(N-1)^2 MPY*AR2,A;A=w(N)*w(N-1) LD*AR3,T;T=alphap MPYAA;A=alphap*w(N)*w(N-1) SUBA,1,B; substract with a left shift to ;obtain 2alphap ; B=w(N-1)^2-2alphap*w(N)*w(N-1) LD*AR2,T;T=w(N) MAC*AR2,B;B=w(N-1)^2-2alphap*w(N)*w(N-1)+w(N)^2 STH*AR4;save to Y PORTW *AR4,101h;copy output level

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 23 Universal Multifrequency Tone Generator and detector (UMTG)   This software module developed by SPIRIT Corp. for the TMS320C54x and TMS320C55X platform   It can be used into embedded devices for generating various telephone services used in intelligent network systems   Or as a simple tone generator for custom applications   It is fully compliant with TMS Algorithm standard rules See SPRU 639 and SPRU 638 AN

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 24 Follow on Activities  Application 7 for the TMS320C5416 DSK  Uses a microphone to pick up the sounds generated by a touch phone. The buttons pressed are identified using the Goerztel algorithm and their values displayed on Stdout. The frequency response of each Goertzel filter is given using Matlab.