DSPRelated.com
Forums

algorithms for location versus for frequency?

Started by Ron N. February 27, 2006
I suppose all characterization of signals inside some buffer
of samples is a form of statistical signal processing.

When asking about the frequency of some signal in comp.dsp,
all sorts of algorithms are mentioned, forms of autocorrelation
(or squared difference, etc.), or fft/dft usage (windowed, zero
padded, phase differentiated, etc.).  Also, there seem to be lots
of textbooks on these forms of analysis in the local libraries.
Very little mention of statistical techniques from old radar/sonar
textbooks.

However when asking about how to find the location of a signal
(start/stop/center position), I often get pointers to some signal
processing textbooks (of which I haven't found any in the local
library yet).

Why this difference?  Is location analysis less tractable, less
interesting, or less explainable in comp.dsp algorithms, than
is frequency?

For instance, what means could be used to measure the precise
duration (within rise time uncertainty) of a DTMF tone, Morse
code dit, or saxaphone note from a buffer of sound samples?


Thanks,

rhn A.T nicholson d.0.t C-o-M

Ron N. wrote:

> I suppose all characterization of signals inside some buffer > of samples is a form of statistical signal processing. > > When asking about the frequency of some signal in comp.dsp, > all sorts of algorithms are mentioned, forms of autocorrelation > (or squared difference, etc.), or fft/dft usage (windowed, zero > padded, phase differentiated, etc.). Also, there seem to be lots > of textbooks on these forms of analysis in the local libraries. > Very little mention of statistical techniques from old radar/sonar > textbooks.
>From what I've seen in sonar, the older techniques for frequency
estimation needed improvement.
> However when asking about how to find the location of a signal > (start/stop/center position), I often get pointers to some signal > processing textbooks (of which I haven't found any in the local > library yet). > > Why this difference? Is location analysis less tractable, less > interesting, or less explainable in comp.dsp algorithms, than > is frequency?
"Location analysis", if you know the signal you're looking for, could be thought of as a variation of matched filtering (though there is no synchronization in the location problem). Perhaps a better (well, more used) name is "detection" rather than "location"? In some of the sonar problems I've looked at, you're usually interested in "track initiation" and "loss of track" (i.e. the beginning and end of something of interest). Track initiation is generally a detection problem. Loss of track can be harder, especially if the one signal drops in an out of the noise.
> For instance, what means could be used to measure the precise > duration (within rise time uncertainty) of a DTMF tone, Morse > code dit, or saxaphone note from a buffer of sound samples?
Goertzel will do the DTMF tone detection. Ciao, Peter K.
Peter K. wrote:
> > For instance, what means could be used to measure the precise > > duration (within rise time uncertainty) of a DTMF tone, Morse > > code dit, or saxaphone note from a buffer of sound samples? > > Goertzel will do the DTMF tone detection.
I've used Goertzel algorithms to determine if some tone of known frequency is present within a given rectangular time window. But how can the Goertzel algorithm be used to allow one to detect if a DTMF tone is 5 mS shorter or longer that the spec allows, or started 5 mS too late for some allowed response time? How does one get the envelope time information as precisely as one can measure the frequency of the tones? Thanks. -- rhn A.T nicholson d.0.t C-o-M
"Ron N." <rhnlogic@yahoo.com> writes:

> But how can the Goertzel algorithm be used to allow one to detect > if a DTMF tone is 5 mS shorter or longer that the spec allows, or > started 5 mS too late for some allowed response time?
A direct appropach would be to set a threshold and say the on time is when the output of Goertzel is above that threshold and the off time is when the output falls below. The times that these happen give you whether it is late, or too short or long.
> How does one get the envelope time information as precisely as one > can measure the frequency of the tones?
That's a problem: you can't get amplitude (envelope) information as accurately as you can get frequency information. The CRLB on the variance of frequency estimators goes down as N^3 (N = number of samples); the CLRB on the variance of amplitude estimation goes down as N^2. Ciao, Peter K. -- "And he sees the vision splendid of the sunlit plains extended And at night the wondrous glory of the everlasting stars."
Peter K. wrote:
> Ron N. wrote: > > > I suppose all characterization of signals inside some buffer > > of samples is a form of statistical signal processing. > > > > When asking about the frequency of some signal in comp.dsp, > > all sorts of algorithms are mentioned, forms of autocorrelation > > (or squared difference, etc.), or fft/dft usage (windowed, zero > > padded, phase differentiated, etc.). Also, there seem to be lots > > of textbooks on these forms of analysis in the local libraries. > > Very little mention of statistical techniques from old radar/sonar > > textbooks. > > >From what I've seen in sonar, the older techniques for frequency > estimation needed improvement. > > > However when asking about how to find the location of a signal > > (start/stop/center position), I often get pointers to some signal > > processing textbooks (of which I haven't found any in the local > > library yet). > > > > Why this difference? Is location analysis less tractable, less > > interesting, or less explainable in comp.dsp algorithms, than > > is frequency? > > "Location analysis", if you know the signal you're looking for, could > be thought of as a variation of matched filtering (though there is no > synchronization in the location problem). > > Perhaps a better (well, more used) name is "detection" rather than > "location"?
In the case I'm thinking of, the signal has already been "detected". Somewhere in my buffer or FFT frame, it's obvious that there are several DTMF tones, Morse code dits or dahs, or a saxaphone hitting an E note. The frequency(s) shows up in the magnitude spectra above the noise and interference. The question is where in time is the signal of interest (within some minimum but realistic error bound), and what was its duration (say in cycle periods for the single pitch tone bursts). Could a matched filter be used for any of this? IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
Ron N. wrote:

> In the case I'm thinking of, the signal has already been "detected".
But not accurately, if you're still trying to find where in the date buffer it is.
> Somewhere in my buffer or FFT frame, it's obvious that there are > several DTMF tones, Morse code dits or dahs, or a saxaphone hitting > an E note. The frequency(s) shows up in the magnitude spectra above > the noise and interference. The question is where in time is the > signal of interest (within some minimum but realistic error bound), > and what was its duration (say in cycle periods for the single > pitch tone bursts).
I suppose I'm thinking sample-to-sample detection rather than buffer-to-buffer detection.
> Could a matched filter be used for any of this?
Definitely. That's effectively what Goertzel is doing. Ciao, Peter K.
Peter K. wrote:
> Ron N. wrote: > > > In the case I'm thinking of, the signal has already been "detected". > > But not accurately, if you're still trying to find where in the date > buffer it is. > > > Somewhere in my buffer or FFT frame, it's obvious that there are > > several DTMF tones, Morse code dits or dahs, or a saxaphone hitting > > an E note. The frequency(s) shows up in the magnitude spectra above > > the noise and interference. The question is where in time is the > > signal of interest (within some minimum but realistic error bound), > > and what was its duration (say in cycle periods for the single > > pitch tone bursts). > > I suppose I'm thinking sample-to-sample detection rather than > buffer-to-buffer detection. > > > Could a matched filter be used for any of this? > > Definitely. That's effectively what Goertzel is doing.
To which type of Goertzel algorithm were you refering and how would you use it for this purpose? A sliding Goertzel might show a slow and uncertain rising edge even when visual inspection will show a sharp envelope transistion out of the noise floor to a nearly constant (but previously unknown) amplitude. Goertzel alone has a no decision point. IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
Ron N. wrote:

> To which type of Goertzel algorithm were you refering > and how would you use it for this purpose?
http://ptolemy.eecs.berkeley.edu/papers/96/dtmf_ict/www/node3.html#SECTION00030000000000000000
> A sliding Goertzel might show a slow and uncertain rising edge > even when visual inspection will show a sharp envelope > transistion out of the noise floor to a nearly constant (but > previously unknown) amplitude. Goertzel alone has a no > decision point.
You need a change detection on the Goertzel output to get the quick response you're looking for and an indication of the decision point. Something like CUSUM could be used. Ciao, Peter K.
Peter K. wrote:
> Ron N. wrote: > > To which type of Goertzel algorithm were you refering > > and how would you use it for this purpose?
http://ptolemy.eecs.berkeley.edu/papers/96/dtmf_ict/www/node3.html#SECTION00030000000000000000 This is a non-sliding Geortzel algorithm, which seems to give zero locality information, just an average amplitude (at the choosen frequency) inside the window. Could be a tone during the first half only, the last half only, or a half amplitude tone across the entire sample window. I would at least try a sliding Geortzel across the sample buffer to give a little more, but still blurry, locality information. But that still seems like an algorithm with very poor accuracy for envelope transition measurement. IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
Peter K. wrote:
> Ron N. wrote: > > To which type of Goertzel algorithm were you refering > > and how would you use it for this purpose? > http://ptolemy.eecs.berkeley.edu/papers/96/dtmf_ict/www/node3.html#SECTION00030000000000000000
Why would this be any better than a low pass filter followed by an average amplitude measurement of some sort? Thanks. -- rhn A.T nicholson d.0.t C-o-M