Sign in

username:

password:



Not a member?

Search compdsp



Search tips

comp.dsp by Keywords

Adaptive Filter | ADPCM | ADSP | ADSP-2181 | Aliasing | AMR | Anti-Aliasing | ARMA | Autocorrelation | AutoCovariance | Beamforming | Bessel | Blackfin | Butterworth | C6713 | CCS | Chebyshev | CIC Filter | Circular Convolution | Code Composer Studio | Comb Filter | Compression | Convolution | Cross Correlation | DCT | Decimation | Deconvolution | Demodulation | DM642 | DSP Boards | DSP/BIOS | DTMF | Echo Cancellation | Equalization | Equalizer | ETSI | EZLITE (Ez-kit Lite) | FFT | FFTW | FIR Filter | Fixed Point | FSK | G.711 | G.723 | G.729 | Gaussian Noise | Goertzel | GPIO | Hilbert Transform | IFFT | IIR Filter | Interpolation | Invariance | JTAG | Kalman | Laplace Transform | Levinson | LPC | McBSP | MIPS | Modulation | MPEG | Multirate | Notch Filter | Nyquist | OFDM | Oversampling | Pink Noise | Pitch | PLL | Polyphase | QAM | QDMA | Quantization | Quantizer | Radar | Random Noise | Reed Solomon | Remez | Resampling | RTDX | Sampling | Sharc | TI C6711 | Undersampling | Viterbi | Wavelets | White Noise | Wiener Filter | Windowing | XDS510PP | Z Transform

Sponsor

Industry's highest performing at the lowest power DSPs now as low as $5.00*
Start development today!
*volume pricing for 10ku

Discussion Groups

Free Online Books

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | Comp.DSP | tone start/stop detection algorithms?

There are 13 messages in this thread.

You are currently looking at messages 0 to 10.


tone start/stop detection algorithms? - Ronald H. Nicholson Jr. - 2004-10-05 14:41:00

So say we've got a single sinusoid embedded in noise, but with
an S/N ratio clearly greater than unity, and we've already estimated
it's frequency using FFT methods (say in windows of 1024 samples).

Now if the tone is known to come in bursts of some minimum number of
cycles, what are the efficient DSP algorithms to determine when the tone
started or stopped?  (e.g. say we've found a tone in our FFT window,
but now want to determine if it stopped or started mid-window, and if
so, where.)  

Binary search using smaller and smaller FFT windows? Digital PLL?
FIR or bi-directional IIR filter with threshold detection?

What are the limitations on the accuracy of the measurement of the
stop/start location(s) in time?


Thanks.
-- 
Ron Nicholson   rhn AT nicholson DOT com   http://www.nicholson.com/rhn/ 
#include <canonical.disclaimer>        // only my own opinions, etc.
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: tone start/stop detection algorithms? - Jerry Avins - 2004-10-05 15:01:00



Ronald H. Nicholson Jr. wrote:

> So say we've got a single sinusoid embedded in noise, but with
> an S/N ratio clearly greater than unity, and we've already estimated
> it's frequency using FFT methods (say in windows of 1024 samples).
> 
> Now if the tone is known to come in bursts of some minimum number of
> cycles, what are the efficient DSP algorithms to determine when the tone
> started or stopped?  (e.g. say we've found a tone in our FFT window,
> but now want to determine if it stopped or started mid-window, and if
> so, where.)  
> 
> Binary search using smaller and smaller FFT windows? Digital PLL?
> FIR or bi-directional IIR filter with threshold detection?
> 
> What are the limitations on the accuracy of the measurement of the
> stop/start location(s) in time?
> 
> 
> Thanks.

How about tuning a filter -- narrow enough to block some noise, but 
broad enough to have a short enough response time -- and thresholding 
its output?

Jerry
-- 
      You know that the outhouse is in the right place if       ö¿ö
      it seems too close in summer and too far in winter.       ”º“
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: tone start/stop detection algorithms? - laki - 2004-10-05 17:17:00

> So say we've got a single sinusoid embedded in noise, but with
> an S/N ratio clearly greater than unity, and we've already estimated
> it's frequency using FFT methods (say in windows of 1024 samples).
>
> Now if the tone is known to come in bursts of some minimum number of
> cycles, what are the efficient DSP algorithms to determine when the tone
> started or stopped?  (e.g. say we've found a tone in our FFT window,
> but now want to determine if it stopped or started mid-window, and if
> so, where.)
>
> Binary search using smaller and smaller FFT windows? Digital PLL?
> FIR or bi-directional IIR filter with threshold detection?
>
> What are the limitations on the accuracy of the measurement of the
> stop/start location(s) in time?

You can have a look at wavelettheorie.

laki


______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: tone start/stop detection algorithms? - Ronald H. Nicholson Jr. - 2004-10-05 17:58:00

In article <cjur34$jkq$2...@bob.news.rcn.net>, Jerry Avins  <j...@ieee.org> wrote:
>Ronald H. Nicholson Jr. wrote:
>
>> So say we've got a single sinusoid embedded in noise, but with
>> an S/N ratio clearly greater than unity, and we've already estimated
>> it's frequency using FFT methods (say in windows of 1024 samples).
>> 
>> Now if the tone is known to come in bursts of some minimum number of
>> cycles, what are the efficient DSP algorithms to determine when the tone
>> started or stopped?  (e.g. say we've found a tone in our FFT window,
>> but now want to determine if it stopped or started mid-window, and if
>> so, where.)  
>> 
>> Binary search using smaller and smaller FFT windows? Digital PLL?
>> FIR or bi-directional IIR filter with threshold detection?
>> 
>> What are the limitations on the accuracy of the measurement of the
>> stop/start location(s) in time?
>> 
>> 
>> Thanks.
>
>How about tuning a filter -- narrow enough to block some noise, but 
>broad enough to have a short enough response time -- and thresholding 

Wouldn't there also need to be some sort of low pass filter on the
magnitude (absolute or squared) before the threshold detection?  If both
the tuned filter and the low pass filter were implemented as IIR's then
there would seem to be a significant lag in the stop/start reporting,
and maybe too much sensitivity to the amplitude of the tone.

Whereas some sort of digital PLL might notice that it had lost lock
in perhaps even less than one full period of the tone.


IMHO. YMMV.
-- 
Ron Nicholson   rhn AT nicholson DOT com   http://www.nicholson.com/rhn/ 
#include <canonical.disclaimer>        // only my own opinions, etc.
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: tone start/stop detection algorithms? - Tim Wescott - 2004-10-05 18:09:00

Ronald H. Nicholson Jr. wrote:

> In article <cjur34$jkq$2...@bob.news.rcn.net>, Jerry Avins  <j...@ieee.org> wrote:
> 
>>Ronald H. Nicholson Jr. wrote:
>>
>>
>>>So say we've got a single sinusoid embedded in noise, but with
>>>an S/N ratio clearly greater than unity, and we've already estimated
>>>it's frequency using FFT methods (say in windows of 1024 samples).
>>>
>>>Now if the tone is known to come in bursts of some minimum number of
>>>cycles, what are the efficient DSP algorithms to determine when the tone
>>>started or stopped?  (e.g. say we've found a tone in our FFT window,
>>>but now want to determine if it stopped or started mid-window, and if
>>>so, where.)  
>>>
>>>Binary search using smaller and smaller FFT windows? Digital PLL?
>>>FIR or bi-directional IIR filter with threshold detection?
>>>
>>>What are the limitations on the accuracy of the measurement of the
>>>stop/start location(s) in time?
>>>
>>>
>>>Thanks.
>>
>>How about tuning a filter -- narrow enough to block some noise, but 
>>broad enough to have a short enough response time -- and thresholding 
> 
> 
> Wouldn't there also need to be some sort of low pass filter on the
> magnitude (absolute or squared) before the threshold detection?  If both
> the tuned filter and the low pass filter were implemented as IIR's then
> there would seem to be a significant lag in the stop/start reporting,
> and maybe too much sensitivity to the amplitude of the tone.
> 
> Whereas some sort of digital PLL might notice that it had lost lock
> in perhaps even less than one full period of the tone.
> 
> 
> IMHO. YMMV.

At it's simplest you could get by without the low-pass filter -- the 
bandpass filter will tend to have a lowpass effect on the signal envelope.

You could use a digital PLL to detect the tone stop, but it'd be hard to 
see the tone _start_ when the PLL oscillator is in an unknown state.

Using a FIR bandpass filter has been suggested; the nice thing about 
that is that you can set your threshold to be halfway between the noise 
and the signal -- that will give you a fairly good (if delayed) estimate 
of when the start/stop happened.

No matter what you do you will have delay: the tighter you make the 
filter the better your noise rejection will be and the longer it will 
take to get an answer.

-- 

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: tone start/stop detection algorithms? - Fred Marshall - 2004-10-05 18:29:00

"Ronald H. Nicholson Jr." <r...@mauve.rahul.net> wrote in message 
news:cjups9$ikq$1...@blue.rahul.net...
> So say we've got a single sinusoid embedded in noise, but with
> an S/N ratio clearly greater than unity, and we've already estimated
> it's frequency using FFT methods (say in windows of 1024 samples).
>
> Now if the tone is known to come in bursts of some minimum number of
> cycles, what are the efficient DSP algorithms to determine when the tone
> started or stopped?  (e.g. say we've found a tone in our FFT window,
> but now want to determine if it stopped or started mid-window, and if
> so, where.)
>
> Binary search using smaller and smaller FFT windows? Digital PLL?
> FIR or bi-directional IIR filter with threshold detection?
>
> What are the limitations on the accuracy of the measurement of the
> stop/start location(s) in time?

The temporal resolution is roughtly the reciprocal of the bandwidth of the 
filter that you pass the signal through.  i.e. assuming a tone with abrupt 
starts and stops, the rise time and fall time will be related to the 
bandwidth of the filter through which the signal is passed.  This is part of 
the answer.

Signal to noise ratio is also part of the answer.  Presumably to make the 
detection you will need a filter of some bandwidth because if the bandwidth 
is infinite then the SNR won't likely be high enough.

So, we limit the bandwidth until the signal to noise ratio is adequate to 
adequately detect the presence or absence of the tone.  This determines the 
rise time of the filter which is directly related to the temporal precision. 
If the filter is narrowed further, the noise is improved at the expense of 
rise time.  If the filter is widened, the rise time is decreased at the 
expense of output SNR.

There is probably a gray area between where shorter rise time and more noise 
gives false positive transition indications and where longer rise times give 
fewer false positives but with poorer resolution - or at least latency.  If 
the amplitude of the pulse is known, one might be able to determine latency 
of detections and improve the temporal resolution.  If one can backtrack in 
the processing then one might be able to predict when a clearly present 
pulse actually started.

Example: Detect a tone and determine when it was at 90% of full amplitude.
From the apparent 90% of amplitude point, using the rise time of the filter, 
predict when the pulse actually started.

Using shorter FFT windows is equivalent to using wider bandwidth - as 
described above.  So, the SNR will be reduced if you do this.
Using overlapped FFTs might be a better way to go.
The ultimate is to overlap the FFTs by N-1 samples and to create an output 
sample at each frequency as often as input temporal samples occur.  Then you 
can look at each frequency with lots of time samples.  The output will still 
have a rise time equivalent to the length of the temporal epoch of the 
data - length of the FFT.  This may not be practical in the end but it could 
help answer some of your questions.

Fred 


______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: tone start/stop detection algorithms? - Ronald H. Nicholson Jr. - 2004-10-05 18:43:00

In article <1...@corp.supernews.com>,
Tim Wescott  <t...@wescottnospamdesign.com> wrote:
>You could use a digital PLL to detect the tone stop, but it'd be hard to 
>see the tone _start_ when the PLL oscillator is in an unknown state.

If one is working with windowed data, it might be possible to run a
digital PLL backwards (on the data time-reversed) to see if/when the
tone starts within a window.


IMHO. YMMV.
-- 
Ron Nicholson   rhn AT nicholson DOT com   http://www.nicholson.com/rhn/ 
#include <canonical.disclaimer>        // only my own opinions, etc.
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: tone start/stop detection algorithms? - Rune Allnor - 2004-10-06 02:31:00

"Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message
news:<E...@centurytel.net>...

> Using shorter FFT windows is equivalent to using wider bandwidth - as 
> described above.  So, the SNR will be reduced if you do this.
> Using overlapped FFTs might be a better way to go.

I would test wavelets before using STFTs. I don't have any experience 
with wavelets, though, but STFTs are not awfully good to do detailed 
transient analysis. 

> The ultimate is to overlap the FFTs by N-1 samples and to create an output 
> sample at each frequency as often as input temporal samples occur.  Then you 
> can look at each frequency with lots of time samples.  The output will still 
> have a rise time equivalent to the length of the temporal epoch of the 
> data - length of the FFT.  This may not be practical in the end but it could 
> help answer some of your questions.

Check out detection theory. The books by van Loan ought to be a good 
starting point:

van Loan: Detection, estimation and modulation theory, vols I-IV, 
          Wiley. 

Rune
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: tone start/stop detection algorithms? - Rick Lyons - 2004-10-06 05:53:00

On Tue, 5 Oct 2004 18:41:13 +0000 (UTC), r...@mauve.rahul.net (Ronald
H. Nicholson Jr.) wrote:

>So say we've got a single sinusoid embedded in noise, but with
>an S/N ratio clearly greater than unity, and we've already estimated
>it's frequency using FFT methods (say in windows of 1024 samples).
>
>Now if the tone is known to come in bursts of some minimum number of
>cycles, what are the efficient DSP algorithms to determine when the tone
>started or stopped?  (e.g. say we've found a tone in our FFT window,
>but now want to determine if it stopped or started mid-window, and if
>so, where.)  
>
>Binary search using smaller and smaller FFT windows? Digital PLL?
>FIR or bi-directional IIR filter with threshold detection?
>
>What are the limitations on the accuracy of the measurement of the
>stop/start location(s) in time?
>
>
>Thanks.
>-- 
>Ron Nicholson   rhn AT nicholson DOT com   http://www.nicholson.com/rhn/ 
>#include <canonical.disclaimer>        // only my own opinions, etc.

Hi,
   Maybe the Sliding DFT algorithm would be useful 
to you.  It's worth a try.  That algorithm computes a new DFT 
sample (a single N-point DFT bin output value) 
upon the arrival of each new input time-sample.

Good Luck,
[-Rick-]

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: tone start/stop detection algorithms? - Jesse Hansen - 2004-10-06 06:30:00

I am assuming the problem is as follows:

x[n] = s[n] + w[n]
s[n] = A*cos(2*pi*f_0/f_s*n + phi) * (u[n - n_0] - u[n - n_1])

where

x[n] is the data you have
s[n] is the signal you wish to detect
w[n] is white Gaussian noise
A is the unknown amplitude (a nuisance parameter)
f_0 is the unknown frequency
f_s is the sampling rate
phi is the unknown phase (a nuisance parameter)
u[n] is the unit step function
n_0 is the start sample
n_1 is the end sample
n_1 - n_0 is the total number of samples in the burst (known?)

I believe S. Kay has derived the optimal detector for a similar
problem: a sinusiod of known frequency, unkown start and stop samples,
embedded in white Gaussian noise.  I will check when I get to work,
but I think this is fairly simple, especially if n_1 - n_0 is known. 
The maximum likelihood estimator (MLE) will probably be the STFT with
high overlap between windows.

Please look at Kay's text: "Fundamentals of Statistical Signal
Processing,
Vol II - Detection Theory"
 
- Jesse


r...@mauve.rahul.net (Ronald H. Nicholson Jr.) wrote in message news:<cjups9$ikq$1...@blue.rahul.net>...
> So say we've got a single sinusoid embedded in noise, but with
> an S/N ratio clearly greater than unity, and we've already estimated
> it's frequency using FFT methods (say in windows of 1024 samples).
>
> Now if the tone is known to come in bursts of some minimum number of
> cycles, what are the efficient DSP algorithms to determine when the tone
> started or stopped?  (e.g. say we've found a tone in our FFT window,
> but now want to determine if it stopped or started mid-window, and if
> so, where.)  
> 
> Binary search using smaller and smaller FFT windows? Digital PLL?
> FIR or bi-directional IIR filter with threshold detection?
> 
> What are the limitations on the accuracy of the measurement of the
> stop/start location(s) in time?
> 
> 
> Thanks.
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

| 1 | 2 | next