DTMF Detection using Goertzel

Started by Mannai_Murali March 4, 2009
Hello,

I am implementing DTMF detection using Goertzel Algorithm.I have two
questions

1.Since the duration of DTMF signal present is 40 msec and Goertzel takes
25msec should I detect the energy of incoming signal (at 3Khz) and then
start Goertzel.(If I start my Goertzel after 20msec of actual signal I need
another 5 msec more DTMF signal presence.But valid DTMF is available only
for 20 msec.I started my Goertzel late by 20 msec).To avoid this can I
check the signal energy in the entire 3 KHz band for say 5 msec compare
with a threshold and then based on this start Goertzel.I will have 35 msec
signal left.


2.I have to scale by 8 bits to implement Goertzel (I need 201 and 205
samples at 8KHz) to avoid overflow.Since the signal itself may at low level
(not at 0dBm) should I have an AGC before Goertzel.Or else the entire
signal could be lost due to a) siganl being low level and may not occupy
entire 16 bits precision.b)Scaling of 8 bits for Goertzel

Kindly give feedback on 1 and 2.

Thanks,

V.Muralidharan


 > should I detect the energy of incoming signal
Dial-tone in a lower frequency band and all
sort of background noise from the microphone
may prevent that.

> I have to scale by 8 bits to implement Goertzel
What sort of hardware do you intend to use ? Goertzel is not viable on simple 8 bit controllers. MfG JRD

Mannai_Murali wrote:
> Hello, > > I am implementing DTMF detection using Goertzel Algorithm.
Don't use Goertzel. http://www.abvolt.com/research/Multitone%20detect-IEEE.pdf Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Rafael Deliano wrote:
> > should I detect the energy of incoming signal > Dial-tone in a lower frequency band and all > sort of background noise from the microphone > may prevent that. > >> I have to scale by 8 bits to implement Goertzel > What sort of hardware do you intend to use ? > Goertzel is not viable on simple 8 bit controllers.
I don't have a link, but someone at Rice university published and linked to an 8-bit Goertzel implementation. I read it about 5 years ago. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
>> Goertzel is not viable on simple 8 bit controllers. > I don't have a link, but someone at Rice university published and linked > to an 8-bit Goertzel implementation. I read it about 5 years ago.
Fast 16 bit controller like the Mitsubishi M16C with 16x16 multiplier, DMA, would do it via Goertzel in 1999 like a DSP: http://www.embeddedFORTH.de/temp/dtmf1.pdf ( text in german. But there is reference to more literature at the end of the article. The code and probably a application note on it should be available at Mitsubishi ) For a low end 16 bit controller MPS430 in 1997: "Generation and Recognition of DTMF Signals With the Microcontroller MSP430" http://focus.ti.com/general/docs/techdocsabstract.tsp?abstractName=slaae16 Resonators like Goertzel, but implemented as wave digital filters. There has been a band-split variant for DTMF via wave digital filters too: http://www.embeddedFORTH.de/temp/dtmf2.pdf Hardware was a Intel 2920 then. But probably could be done on a controller. I would assume Goertzel on less then 16/32 bit registers and without a reasonable multiplier will not be much fun. MfG JRD
Rafael Deliano wrote:
>>> Goertzel is not viable on simple 8 bit controllers. >> I don't have a link, but someone at Rice university published and >> linked to an 8-bit Goertzel implementation. I read it about 5 years ago. > > Fast 16 bit controller like the Mitsubishi M16C with 16x16 multiplier, > DMA, would do it via Goertzel in 1999 like a DSP: > http://www.embeddedFORTH.de/temp/dtmf1.pdf > ( text in german. But there is reference to more literature at the > end of the article. The code and probably a application note on it > should be available at Mitsubishi ) > > For a low end 16 bit controller MPS430 in 1997: > "Generation and Recognition of DTMF Signals With the Microcontroller > MSP430" > http://focus.ti.com/general/docs/techdocsabstract.tsp?abstractName=slaae16 > Resonators like Goertzel, but implemented as wave digital filters. > > There has been a band-split variant for DTMF > via wave digital filters too: > http://www.embeddedFORTH.de/temp/dtmf2.pdf > Hardware was a Intel 2920 then. But probably could be > done on a controller. > > I would assume Goertzel on less then 16/32 bit registers and without > a reasonable multiplier will not be much fun.
IIRC, the author of the Rice had a DTMF decoder on a 60MHz Z-80 with capacity to spare. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������

Jerry Avins wrote:

> Rafael Deliano wrote: > >>>> Goertzel is not viable on simple 8 bit controllers. >>> >>> I don't have a link, but someone at Rice university published and >>> linked to an 8-bit Goertzel implementation. I read it about 5 years ago. >> >> >> Fast 16 bit controller like the Mitsubishi M16C with 16x16 multiplier, >> DMA, would do it via Goertzel in 1999 like a DSP: >> http://www.embeddedFORTH.de/temp/dtmf1.pdf >> ( text in german. But there is reference to more literature at the >> end of the article. The code and probably a application note on it >> should be available at Mitsubishi ) >> >> For a low end 16 bit controller MPS430 in 1997: >> "Generation and Recognition of DTMF Signals With the Microcontroller >> MSP430" >> http://focus.ti.com/general/docs/techdocsabstract.tsp?abstractName=slaae16 >> >> Resonators like Goertzel, but implemented as wave digital filters. >> >> There has been a band-split variant for DTMF >> via wave digital filters too: >> http://www.embeddedFORTH.de/temp/dtmf2.pdf >> Hardware was a Intel 2920 then. But probably could be >> done on a controller. >> >> I would assume Goertzel on less then 16/32 bit registers and without >> a reasonable multiplier will not be much fun. > > > IIRC, the author of the Rice had a DTMF decoder on a 60MHz Z-80 with > capacity to spare.
Z80 at 60 MHz ? What are you talking about? The most non-trivial DTMF decoder I've seen was done on PIC16 and it utilized about 5 MIPS (Amey A. Deosthali, Shawn R. McCaslin, Brian L. Evans). They used the adaptive notch filters and frequency counters. My compliant encoder/decoder does the accumulation into the frequency bins. It takes about 6 MIPS of Atmel AVR. The working (although not 100% compliant) decoder takes only ~ 0.5 MIPS and can be implemented using any microcontroller such as PIC, AVR, x51 or HC08. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Vladimir Vassilevsky wrote:
> > > Jerry Avins wrote: > >> Rafael Deliano wrote: >> >>>>> Goertzel is not viable on simple 8 bit controllers. >>>> >>>> I don't have a link, but someone at Rice university published and >>>> linked to an 8-bit Goertzel implementation. I read it about 5 years >>>> ago. >>> >>> >>> Fast 16 bit controller like the Mitsubishi M16C with 16x16 >>> multiplier, DMA, would do it via Goertzel in 1999 like a DSP: >>> http://www.embeddedFORTH.de/temp/dtmf1.pdf >>> ( text in german. But there is reference to more literature at the >>> end of the article. The code and probably a application note on it >>> should be available at Mitsubishi ) >>> >>> For a low end 16 bit controller MPS430 in 1997: >>> "Generation and Recognition of DTMF Signals With the Microcontroller >>> MSP430" >>> http://focus.ti.com/general/docs/techdocsabstract.tsp?abstractName=slaae16 >>> >>> Resonators like Goertzel, but implemented as wave digital filters. >>> >>> There has been a band-split variant for DTMF >>> via wave digital filters too: >>> http://www.embeddedFORTH.de/temp/dtmf2.pdf >>> Hardware was a Intel 2920 then. But probably could be >>> done on a controller. >>> >>> I would assume Goertzel on less then 16/32 bit registers and without >>> a reasonable multiplier will not be much fun. >> >> >> IIRC, the author of the Rice had a DTMF decoder on a 60MHz Z-80 with >> capacity to spare. > > Z80 at 60 MHz ? What are you talking about?
Typo. 6-Mhz. One key over.
> The most non-trivial DTMF decoder I've seen was done on PIC16 and it > utilized about 5 MIPS (Amey A. Deosthali, Shawn R. McCaslin, Brian L. > Evans). They used the adaptive notch filters and frequency counters. > > My compliant encoder/decoder does the accumulation into the frequency > bins. It takes about 6 MIPS of Atmel AVR. > > The working (although not 100% compliant) decoder takes only ~ 0.5 MIPS > and can be implemented using any microcontroller such as PIC, AVR, x51 > or HC08.
Then try to find that Rice paper. I lost the URL in a computer disaster. You might find something helpful in it. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������