DSPRelated.com
Forums

Detection of frequency with minimum latency

Started by devidasbhonde March 18, 2006
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


"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. Thereafter, minimum latency is a matter of implementation. There must be some process that's as fast as can be. My guess is that there's no process as long as the data-gathering time of 1 second. So, the latency is determined mostly by physics. Fred
Thanks Fred,

Which procedure can you please suggest for this ?

Regards,

Devidas


>"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. > >Thereafter, minimum latency is a matter of implementation. >There must be some process that's as fast as can be. >My guess is that there's no process as long as the data-gathering time of
1
>second. So, the latency is determined mostly by physics. > >Fred > > >
"devidasbhonde" <devidasbhonde@hotmail.com> wrote in message 
news:koGdnavvesvL3oHZnZ2dnUVZ_vydnZ2d@giganews.com...
> Thanks Fred, > > Which procedure can you please suggest for this ? > > Regards, > > Devidas >
Take a look at: http://home.comcast.net/~kootsoop/freqalgs.htm and http://www.dspguru.com/comp.dsp/tricks/alg/mag_est.htm Fred
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 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. What if Devidas signal contains noise? (He didn't say that it didn't). How to differentiate between cosmic noise and signal noise components? You can't of course. So, using 0.01Hz resolution (as an example) for a low SNR situation when you need 1Hz resolution in the end may not even be helpful. But, it's certainly a valid observation that doing this, as implied in the earlier posts, requires a 10-second epoch and thus affects latency. Fred

Fred Marshall wrote:
> > > What if Devidas signal contains noise? (He didn't say that it didn't). How > to differentiate between cosmic noise and signal noise components? You > can't of course. > So, using 0.01Hz resolution (as an example) for a low SNR situation when you > need 1Hz resolution in the end may not even be helpful. But, it's certainly > a valid observation that doing this, as implied in the earlier posts, > requires a 10-second epoch and thus affects latency.
You are making one grand assumption that may not be valid. The OP may have something slightly simpler in mind than you do when he uses the term 'latency'. I'm no mind reader but I have a feeling his question might be far more basic. Something like: For a stream of data with the given signal frequency content and the given needed resolution how quickly and how often can I calculate the frequency of a single sine wave or the whole spectrum? (it wasn't clear which). In other words, his interest may be in how long between successive measurements rather than how long to get the first measurement. -jim ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
jim wrote:
> > Fred Marshall wrote: > >> >>What if Devidas signal contains noise? (He didn't say that it didn't). How >>to differentiate between cosmic noise and signal noise components? You >>can't of course. >>So, using 0.01Hz resolution (as an example) for a low SNR situation when you >>need 1Hz resolution in the end may not even be helpful. But, it's certainly >>a valid observation that doing this, as implied in the earlier posts, >>requires a 10-second epoch and thus affects latency. > > > You are making one grand assumption that may not be valid. The OP may > have something slightly simpler in mind than you do when he uses the > term 'latency'. I'm no mind reader but I have a feeling his question > might be far more basic. Something like: For a stream of data with the > given signal frequency content and the given needed resolution how > quickly and how often can I calculate the frequency of a single sine > wave or the whole spectrum? (it wasn't clear which). In other words, his > interest may be in how long between successive measurements rather than > how long to get the first measurement.
Another meaning of latency comes first to to my mind: how long after information is received until it affects some action. Interrupt latency is an example. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Fred Marshall wrote:

> Ron wrote:
...
> > 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.
...
> Do you know of a real application with real signals that uses that method? > I'd be interested.
Do you mean something like http://www.google.com/search?hl=de&q=frequency+estimation+linear+prediction&meta= ?
"Jerry Avins" <jya@ieee.org> wrote in message 
news:5e6dnb2WBYJLE4DZRVn-rA@rcn.net...
> jim wrote: >> >> Fred Marshall wrote: >> >>> >>>What if Devidas signal contains noise? (He didn't say that it didn't). >>>How >>>to differentiate between cosmic noise and signal noise components? You >>>can't of course. >>>So, using 0.01Hz resolution (as an example) for a low SNR situation when >>>you >>>need 1Hz resolution in the end may not even be helpful. But, it's >>>certainly >>>a valid observation that doing this, as implied in the earlier posts, >>>requires a 10-second epoch and thus affects latency. >> >> >> You are making one grand assumption that may not be valid. The OP may >> have something slightly simpler in mind than you do when he uses the >> term 'latency'. I'm no mind reader but I have a feeling his question >> might be far more basic. Something like: For a stream of data with the >> given signal frequency content and the given needed resolution how >> quickly and how often can I calculate the frequency of a single sine >> wave or the whole spectrum? (it wasn't clear which). In other words, his >> interest may be in how long between successive measurements rather than >> how long to get the first measurement. > > Another meaning of latency comes first to to my mind: how long after > information is received until it affects some action. Interrupt latency is > an example. > > Jerry
Jerry, Yes, that's a classical definition. Jim, I don't know that I'm making any assumptions about the OP's objectives. While we know that computational load for a given objective varies according to implementation, I tried to avoid that aspect because it's so variable and only the OP knows his enviroment. In the mean time, physics does play an important role in latency and I wanted to point that out. The OP said: "I have a low frequency time series data (7Hz to 50Hz) I need to get its sprectum with minimum latency. and with 1Hz resolution." No single sinusoids there - even though his preamble quoted Rune. "How often" generally has not anything to do with latency. Once the pipeline is filled then data can come out according to the bandwidth of the process (or compute power or.....). Latency implies: "how soon can I know what the spectrum was at time X?" Implementation affects "and how often thereafter?" So, to your point, this may be an important distinction that the OP hadn't though of: that there may be long latency while having a high rate of output results. Lots of processing power with 120kHz sample rate could generate 1Hz resolution spectra at 120kHz or every 8.33usec while delayed 1/2 second from the center of the necessary 1 second temporal epoch or 1 second from its beginning. Very likely overkill but a physically realizable high output rate but still very high latency in relative terms. Just don't ask me to prove that there is or is not a computer that will do that. I suspect it's feasible but I'm not trying to address *that* aspect of physics because I'm not advocating or discussing limits on any particular output *rate*. Let's see: arrays of size 120,000 samples processed every 8usec..... !! Fred