DSPRelated.com
Forums

Detection of frequency with minimum latency

Started by devidasbhonde March 18, 2006
in article 9tidnQw5Oa616IDZRVn-sg@centurytel.net, Fred Marshall at
fmarshallx@remove_the_x.acm.org wrote on 03/19/2006 10:13:

> Ron, > > Do you know of a real application with real signals that uses that method? > I'd be interested.
i've been abstaining from this thread, but maybe i'll stop that now. i think that Ron's point is valid. i've written pitch detection algorithms (PDAs) (for musical tones) that had precision of less than 1 Hz and latencies of ca. 17 or 20 ms. i dunno how relevant a PDA is to the OP, but since he mentioned autocorrelation and Ron mentioned flute, i thought maybe it did. if the OP want's to measure the frequency of a single sinusoid, i think he/she ought to be able to do it to very high precision (in a noise-free environment) with a latency of one period. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Fred Marshall wrote:
> "Ron N." <rhnlogic@yahoo.com> wrote in message > news:1142751030.680996.150890@g10g2000cwb.googlegroups.com... > > Fred Marshall wrote: > >> "devidasbhonde" <devidasbhonde@hotmail.com> wrote in message > >> news:2JqdnYPAu9TltIHZnZ2dnUVZ_sidnZ2d@giganews.com... > >> > Hi , > >> > > >> > Rune said in thread of "Basics of Spectral Density and Autocorrelation" > >> > > >> > that it is possible to detect a single sine wave in a data stream. > >> > > >> > How to do it ? > >> > > >> > I have a low frequency time series data (7Hz to 50Hz) > >> > I need to get its sprectum with minimum latency. and with 1Hz > >> > resolution. > >> > > >> > What should I do ? > >> > > >> > Regards and thanks, > >> > > >> > Devidas > >> > >> Rune pretty much said it on > >> > >> Tuesday, August 02, 2005 1:50 AM > >> > >> In order to get 1Hz resolution you need to have at least 1 second of > >> data - > >> that's what he said. > > > > Only for mathematicallly pathological signals. For many signals under > > realistic conditions one can do much better. > > > > In the case of a single bandlimited sinusoid in zero noise, it only > > takes 3 points to perfectly specify the frequency. As the noise > > goes up, the certainty goes down and/or the number of points goes > > up, But in low noise, and a priori knowledge that the signal contains > > bandlimited continuous sinusoids of a small number (e.g. it's someone > > playing a flute, etc.), much less than 1 second of data is needed for > > greater than 1 Hz accuracy. > > > > So how "clean" is your signal? The latency answer will vary > > depending on whether your signal comes out of an infinite > > precision function calculation, or is dug out of cosmic noise > > after travelling from a tiny antenna near Pluto. > > > > > > IMHO. YMMV. > > -- > > rhn A.T nicholson d.0.t C-o-M > > Ron, > > Do you know of a real application with real signals that uses that method? > I'd be interested.
I would not be surprised if the people using sonar to track moving targets can find very small Doppler shifts from very short return signals. Bats apparently do something like this with low enough latency to not starve because their meal has gone by before the data has been processed. IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
How about 50 Goertzel's?

Jim Adamthwaite
Ron N. wrote:
> Fred Marshall wrote: > > "devidasbhonde" <devidasbhonde@hotmail.com> wrote in message > > news:2JqdnYPAu9TltIHZnZ2dnUVZ_sidnZ2d@giganews.com... > > > Hi , > > > > > > Rune said in thread of "Basics of Spectral Density and Autocorrelation" > > > > > > that it is possible to detect a single sine wave in a data stream. > > > > > > How to do it ? > > > > > > I have a low frequency time series data (7Hz to 50Hz) > > > I need to get its sprectum with minimum latency. and with 1Hz resolution. > > > > > > What should I do ? > > > > > > Regards and thanks, > > > > > > Devidas > > > > Rune pretty much said it on > > > > Tuesday, August 02, 2005 1:50 AM > > > > In order to get 1Hz resolution you need to have at least 1 second of data - > > that's what he said.
Hmmm... I can't find a post of mine dated as above, nor can I find the thread on google, so I don't know exactly what I might have said that the OP might have found.
> Only for mathematicallly pathological signals. For many signals under > realistic conditions one can do much better.
One have to be very careful with the terminology here. A measured signal might well be "mathematically pathological", but it is what you have to deal with. If the method is not robust enough to deal with signal imperfections, one might be in trouble.
> In the case of a single bandlimited sinusoid in zero noise, it only > takes 3 points to perfectly specify the frequency.
It does. But is that a realistic scenario? How often does one come across *measured* data, not simulated data, that are zero noise? How often does one come across *measured* data, not simulated data, that are perfect sinusoidals? True, there exist variations of these schemes that are robust towards noise and also, at least to some extent, against signal imperfections. But the price one pays is that any breakdowns might go undetected. For instance, a method like MUSIC, that estimates the frequencies of sinusoidals, will continue providing frequency estimates even though the signal actually is some sort of finite-bandwidth signal.
> As the noise > goes up, the certainty goes down and/or the number of points goes > up,
Sure.
> But in low noise, and a priori knowledge that the signal contains > bandlimited continuous sinusoids of a small number (e.g. it's someone > playing a flute, etc.), much less than 1 second of data is needed for > greater than 1 Hz accuracy.
Sure. But there is a price to pay. In the case of MUSIC, you need to set up a signal covariance matrix of dimension PxP, where P > D, D being the number of sinusoidals present. Contemplate that for a moment: In order to get a valid analysis, you need to know what you will find. Not only that the signal consists of sinusoidals (which can be hard enough to justify), but aslo how many sinusoidals will be present. Only then can you specify the design parameters for the MUSIC processor. It's a classic case of "the hen and the egg", or maybe a CATCH 22 situation. Basically, it is a matter of priorities: Get a simple, robust method that works 70% well 100% of the time, or an elaborate, "itchy" method that works 99% well 1% of the time. It's your choise.
> So how "clean" is your signal? The latency answer will vary > depending on whether your signal comes out of an infinite > precision function calculation, or is dug out of cosmic noise > after travelling from a tiny antenna near Pluto.
Agreed. Rune
"Rune Allnor" <allnor@tele.ntnu.no> wrote in message 
news:1143022162.048334.275970@i40g2000cwc.googlegroups.com...
> > I can't find a post of mine dated as above, nor can I find the thread > on google, > so I don't know exactly what I might have said that the OP might have > found.
...............
> Rune >
http://groups.google.com/group/comp.dsp/browse_thread/thread/a38a74637b29eca9/6da562c825e6e8eb?q=Basics+of+Spectral+Density+rune&rnum=1#6da562c825e6e8eb Fred
Rune Allnor wrote:
> Ron N. wrote: > One have to be very careful with the terminology here. A measured > signal > might well be "mathematically pathological", but it is what you have > to deal with. If the method is not robust enough to deal with signal > imperfections, one might be in trouble.
...
> Basically, it is a matter of priorities: Get a simple, robust method > that > works 70% well 100% of the time, or an elaborate, "itchy" method that > works 99% well 1% of the time. > > It's your choise.
Indeed. A robust method which is 70% to 90% correct would be completely useless as a musical instrument tuner, even if done 100% reliably. 99% correct might be more useful if barely, 99.75% to 99.95% is more desirable even for the cheapest products, which are often very "itchy" about placement and background noise before they even start to give a useful readout (often much less than 1% of their total battery life). Even so, the cheap guitar tuners probably far outsell the more expensive studio quality equipment in total dollar volume. Engineers in other fields (safety, medical, etc.) make completely different kinds of choices, as they should. IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
Ron N. wrote:
> Rune Allnor wrote: > > Ron N. wrote: > > One have to be very careful with the terminology here. A measured > > signal > > might well be "mathematically pathological", but it is what you have > > to deal with. If the method is not robust enough to deal with signal > > imperfections, one might be in trouble. > ... > > Basically, it is a matter of priorities: Get a simple, robust method > > that > > works 70% well 100% of the time, or an elaborate, "itchy" method that > > works 99% well 1% of the time. > > > > It's your choise. > > Indeed. > > A robust method which is 70% to 90% correct would be completely > useless as a musical instrument tuner, even if done 100% reliably. > > 99% correct might be more useful if barely, 99.75% to 99.95% is more > desirable even for the cheapest products, which are often very "itchy" > about placement and background noise before they even start to give > a useful readout (often much less than 1% of their total battery life). > Even so, the cheap guitar tuners probably far outsell the more > expensive studio quality equipment in total dollar volume. > > Engineers in other fields (safety, medical, etc.) make completely > different > kinds of choices, as they should.
Agreed. The context of the analysis determines what can be done. The high resolution spectrum analysis methods worked when I used them in interactive applications. I basically did "rough" analyses with the rubust tools to find out if the high resolution stuff might work, and then decided to try the high resolution methods. In that sort of scenario, the high resolution methods were real assets. They did not, however, work when used as "black boxes" that processed arbitrary data. Rune