Re: Prefered method for tone detection



danieladams wrote:

Hi all,

I'm fairly new to DSP implementation. I studied the theory a fair bit at
uni, but now I'm out in the real world and have been asked to develop a
working DSP implementation...Something they dont teach you at uni!! :0)
(well not mine anyway)

I'm trying to develop a generic tone detection scheme using a 16bit fixed
point DSP (TI c5509) and have come across various methods of detection.
The requirements of my detector can vary significantly, but in the worse
case I need a frequency detection time of about 10-15ms of the signal
being present and a bandwidth of about 10-20Hz for each frequency being
detected. I also need the method to be fairly efficent a few MIPS for ~10
detection frequencies. My system is running at a sampling frequency of
8kHz.

A 10ms detection time implies a 100Hz bandwidth; a 10Hz bandwidth implies a 100ms detection time. This is a specification problem; unfortunately the skill that you most need to fix it will probably be diplomacy.

Currently I have implemented a scheme which uses a quadrature receiver
with cosines and sines at the frequency of interest to shift the incoming
signal to baseband. I then individually LPF the cosine and sine modulated
signal square the result then add the signals to get the signal amplitude
(well actually A^2/4).

That sounds like an excellent approach.

The problem with this is a need a very narrow band
LPF which a cant seem to quite achieve the required bandwidth due to
calculation rounding/truncation and poor snr due to input scaling because
of the large DC gain of the filter (I'm getting bandwidths of ~40Hz which
is effectively 80Hz due to the fact I'm using quadrature).

The DC gain can be handled by adjusting your input coefficients. Truncation errors must be handled with wider data paths -- a 10Hz wide 2nd-order filter at an 8kHz rate implies that you'll need 20 more bits than your input data width, which in turn implies that you need 32-bit numbers or more.

You will probably be much better served by using FIR lowpass filters. For the same number of multiplies as your quadrature demod-and-lowpass you can just run the signal through a quadrature FIR bandpass and look at the resulting (complex) result for its amplitude.

My filters are
2nd order direct form I filters, with the coefficents determined from a
elliptic filter. Is this a sensible method of detection?

Sensible, yes. Most efficient -- see my suggestion about FIR bandpass filters.

I understand that there is the Goertzel method, but I can't use this
because of the windowed approach of having a detection update period of N
samples.

What are the sliding Goertzel and sliding DFT, and in your opinion will
their use benefit my requirements?

A Goertzel filter is nothing more than a bandpass filter with its poles sitting on the unit circle. You could move these poles in and have an IIR bandpass filter with all the precision requirements of your lowpass filters.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Posting from Google? See http://cfaj.freeshell.org/google/
.



Relevant Pages

  • Re: Envelope Detector using Hilbert Transform
    ... >>> I have working with ultrasound signals from a solid state ... >>> Khz) are digitized through a sampling card and imported into MATLAB, ... >>> implementing it in real time on the DSP processor. ... >>fit for the filter to make the passband ripple small. ...
    (comp.dsp)
  • Re: Envelope Detector using Hilbert Transform
    ... The received signals from the sensor (300 ... >> Say FIR hilbert transformer, ... >> implementing it in real time on the DSP processor. ... >fit for the filter to make the passband ripple small. ...
    (comp.dsp)
  • Re: Envelope Detector using Hilbert Transform
    ... The received signals from the sensor (300 ... > implementing it in real time on the DSP processor. ... fit for the filter to make the passband ripple small. ... Understanding Digital Signal Processing ...
    (comp.dsp)
  • Prefered method for tone detection
    ... I'm fairly new to DSP implementation. ... I'm trying to develop a generic tone detection scheme using a 16bit fixed ... signal square the result then add the signals to get the signal amplitude ... elliptic filter. ...
    (comp.dsp)
  • Re: Neural netss (was Re: death of the mind.)
    ... its 30+ visual areas and 1100+ feedforward and feedback pathways, ... This whole thing makes sense, regards the cortex, if you think about ... feedback signals from the other 29 areas, ... they filter and perform the basic ...
    (sci.cognitive)