Forums

Tone Detection with Goertzel, but not DTMF.

Started by kjz June 8, 2007
I want to implement a hart modem and based on my available hardware, think
the görtzel algorithm would work.  Lay the smack down If I'm wrong.

I have one of two expected frequencies as an input.  If the input has a
1200Hz frequency, it is a Space, if it's 2200 it is a mark.  A UART with a
1200 bit/sec rate will process the final output.

The görtzel algorithm has to be run on the signal with the coefficient
for each frequency (I.E. run Görtzel on 1200, then get value, then run on
2200.  Repeat.) 

Retarded Questions:
Assume UART runs at 1000bit/sec.  My N would have to be smaller than
Fs/1000?

Would an N of 60 be feasable?  What is a "usual" value of N.  (I'm sure it
depends on the app, but obviously an N of 2 will not be useful.  Where does
it start being effective to use the output?)


Is there simpler way to process these signals?  Two band pass IIRs is
something else I thought about doing, but I like the name of the goertzel.
 :) 

-JT


Um. Lay the smack down if my statements about the algorithm are wrong.  Not
if it doesn't fit the hardware that I didn't describe....  

kjz wrote:
> I want to implement a hart modem and based on my available hardware, th=
ink
> the g=D3=C6rtzel algorithm would work. Lay the smack down If I'm wrong=
=2E There are 1001 methods to do that. From those methods the goertzel=20 algorithm is probably the least convenient.
> I have one of two expected frequencies as an input. If the input has a=
> 1200Hz frequency, it is a Space, if it's 2200 it is a mark. A UART wit=
h a
> 1200 bit/sec rate will process the final output.
If you are looking for the simplest solution, multiply the input with=20 the delayed version of the input. The delay should be equal to the half=20 period of 1200Hz. The sign of the result is the demodulated data. Hint: there is no need for multiplications. A signal can be sampled to=20 one bit and the bitwise XOR will do.
> The g=D3=C6rtzel algorithm has to be run on the signal with the coeffic=
ient
> for each frequency (I.E. run G=D3=C6rtzel on 1200, then get value, then=
run on
> 2200. Repeat.)=20 >=20 > Retarded Questions: > Assume UART runs at 1000bit/sec. My N would have to be smaller than > Fs/1000?
What is N ?
> Would an N of 60 be feasable? What is a "usual" value of N. (I'm sure=
it
> depends on the app, but obviously an N of 2 will not be useful. Where =
does
> it start being effective to use the output?) >=20 >=20 > Is there simpler way to process these signals? Two band pass IIRs is > something else I thought about doing, but I like the name of the goertz=
el. There is nothing specially good about goertzel algorithm. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
I was going to delay it and XOR it (FSK I think is the name..) But I have
no hardware to time delay and no XOR... I basically have a MAC and an ALU.
with some Ram.

I was going to delay it and XOR it (FSK I think is the name..) But I have
no hardware to time delay and no XOR... I basically have a MAC and an ALU.
with some Ram.

kjz wrote:
> I was going to delay it and XOR it (FSK I think is the name..) But I have > no hardware to time delay and no XOR... I basically have a MAC and an ALU. > with some Ram. >
Well, that's an odd combination. With the RAM you can delay the signal, and if it's really easier to use the MAC than an XOR, then you can do a signed multiplication. There may be better delays to choose than 1/2 a cycle of 1200Hz, but I'd have to think to come up with what it may be... -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" gives you just what it says. See details at http://www.wescottdesign.com/actfes/actfes.html

kjz wrote:

> I was going to delay it and XOR it (FSK I think is the name..) But I have > no hardware to time delay and no XOR... I basically have a MAC and an ALU. > with some Ram.
So? Is it a problem to implement a basic frequency counter to demodulate the FSK? Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
If you have a high signal to noise ratio, you might count the number of zero 
crossings in a bit period.  Assuming you can sync with the bit clock.

In article <MOadndSghKUaJvTbnZ2dnUVZ_v2knZ2d@giganews.com>, "kjz" 
<KJZ@cypress.com> wrote:
>I want to implement a hart modem and based on my available hardware, think >the g&ouml;rtzel algorithm would work. Lay the smack down If I'm wrong. > >I have one of two expected frequencies as an input. If the input has a >1200Hz frequency, it is a Space, if it's 2200 it is a mark. A UART with a >1200 bit/sec rate will process the final output. > >The g&ouml;rtzel algorithm has to be run on the signal with the coefficient >for each frequency (I.E. run G&ouml;rtzel on 1200, then get value, then run on >2200. Repeat.) > >Retarded Questions: >Assume UART runs at 1000bit/sec. My N would have to be smaller than >Fs/1000? > >Would an N of 60 be feasable? What is a "usual" value of N. (I'm sure it >depends on the app, but obviously an N of 2 will not be useful. Where does >it start being effective to use the output?) > > >Is there simpler way to process these signals? Two band pass IIRs is >something else I thought about doing, but I like the name of the goertzel. > :) > >-JT > >

Tim Wescott wrote:

> kjz wrote: > >> I was going to delay it and XOR it (FSK I think is the name..) > > There may be better delays to choose than 1/2 a cycle of 1200Hz, but I'd > have to think to come up with what it may be...
Good point. It looks like T = 3/[2(F0 + F1)] is optimal however it is not a very convenient value and there will be not much of a difference. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
kjz wrote:
> I was going to delay it and XOR it (FSK I think is the name..) But I have > no hardware to time delay and no XOR... I basically have a MAC and an ALU. > with some Ram.
Ram: there's your delay. I'll bet you have some registers available, too. ALU: there's your XOR. Learn about computers. It will make it easier to do DSP. Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;