DSPRelated.com
Forums

How to calculate time differrent between two signals?

Started by Hieu Le Trung October 3, 2006
Hi all,

As described in the subject, i'm finding a way to calculate time different
between two signals.
I have two signals which were captured from two unknown position and now i
want to calculate the time different to see is it on the same location.

Thanks,
Hieu LE


Hieu Le Trung skrev:
> Hi all, > > As described in the subject, i'm finding a way to calculate time different > between two signals. > I have two signals which were captured from two unknown position and now i > want to calculate the time different to see is it on the same location.
Cross correlation ought to be a good place to start? Rune
Rune Allnor wrote:
> Hieu Le Trung skrev: > > Hi all, > > > > As described in the subject, i'm finding a way to calculate time different > > between two signals. > > I have two signals which were captured from two unknown position and now i > > want to calculate the time different to see is it on the same location. > > Cross correlation ought to be a good place to start? > > Rune
Cross correlation only works well when the signals are white. You need to look up 'Generalized Cross Correlation' which is performed in teh frequency domain and uses amongst other things the coherence function. There are several methods including the SCOT method, Hannan-Thomson and so on. Naebad
naebad wrote:

   ...

> Cross correlation only works well when the signals are white. You need > to look up 'Generalized Cross Correlation' which is performed in teh > frequency domain and uses amongst other things the coherence function. > There are several methods including the SCOT method, Hannan-Thomson and > so on.
Oh, come now! Cross correlation works very well indeed on any two signals that are differently delayed versions of the same signal and whose period is longer than the differential delay. Jerry -- "The rights of the best of men are secured only as the rights of the vilest and most abhorrent are protected." - Chief Justice Charles Evans Hughes, 1927 ���������������������������������������������������������������������
On Wed, 04 Oct 2006 23:18:20 -0400, Jerry Avins <jya@ieee.org> wrote:

>naebad wrote: > > ... > >> Cross correlation only works well when the signals are white. You need >> to look up 'Generalized Cross Correlation' which is performed in teh >> frequency domain and uses amongst other things the coherence function. >> There are several methods including the SCOT method, Hannan-Thomson and >> so on. > >Oh, come now! Cross correlation works very well indeed on any two >signals that are differently delayed versions of the same signal and >whose period is longer than the differential delay. > >Jerry
I think naebad was just thinking that some waveforms don't have good autocorrelation sequences for this sort of task. Particularly bad sequences can make it difficult to accurately determine the delay. So I think the reality is somewhere in the middle, but for the most part one would expect cross-correlation to yield usable results. Eric Jacobsen Minister of Algorithms, Intel Corp. My opinions may not be Intel's opinions. http://www.ericjacobsen.org
Eric Jacobsen skrev:
> On Wed, 04 Oct 2006 23:18:20 -0400, Jerry Avins <jya@ieee.org> wrote: > > >naebad wrote: > > > > ... > > > >> Cross correlation only works well when the signals are white. You need > >> to look up 'Generalized Cross Correlation' which is performed in teh > >> frequency domain and uses amongst other things the coherence function. > >> There are several methods including the SCOT method, Hannan-Thomson and > >> so on. > > > >Oh, come now! Cross correlation works very well indeed on any two > >signals that are differently delayed versions of the same signal and > >whose period is longer than the differential delay. > > > >Jerry > > I think naebad was just thinking that some waveforms don't have good > autocorrelation sequences for this sort of task. Particularly bad > sequences can make it difficult to accurately determine the delay. > > So I think the reality is somewhere in the middle, but for the most > part one would expect cross-correlation to yield usable results.
...which is exactly why I suggested cross correlation as a *starting* point... Rune
Hi,
I am trying to look at different methods of correlation and when they
are most suitable.  Does anyone know a good resource?  Also, the use of
windows when correlating - when to use and the effects of using?

thanks kindly,
chris


Rune Allnor wrote:
> Eric Jacobsen skrev: > > On Wed, 04 Oct 2006 23:18:20 -0400, Jerry Avins <jya@ieee.org> wrote: > > > > >naebad wrote: > > > > > > ... > > > > > >> Cross correlation only works well when the signals are white. You need > > >> to look up 'Generalized Cross Correlation' which is performed in teh > > >> frequency domain and uses amongst other things the coherence function. > > >> There are several methods including the SCOT method, Hannan-Thomson and > > >> so on. > > > > > >Oh, come now! Cross correlation works very well indeed on any two > > >signals that are differently delayed versions of the same signal and > > >whose period is longer than the differential delay. > > > > > >Jerry > > > > I think naebad was just thinking that some waveforms don't have good > > autocorrelation sequences for this sort of task. Particularly bad > > sequences can make it difficult to accurately determine the delay. > > > > So I think the reality is somewhere in the middle, but for the most > > part one would expect cross-correlation to yield usable results. > > ...which is exactly why I suggested cross correlation as a *starting* > point... > > Rune
chrislee skrev:
> Hi, > I am trying to look at different methods of correlation and when they > are most suitable. Does anyone know a good resource? Also, the use of > windows when correlating - when to use and the effects of using?
Bendat & Piersol: "Random Data" Wiley, 2000. Rune
> Oh, come now! Cross correlation works very well indeed on any two > signals that are differently delayed versions of the same signal and > whose period is longer than the differential delay.
Just wondering why "period is longer than the differential delay" is a factor? I can see that for two continuous sinusoids, if the differential delay is longer than a period then you can't uniquely identify what the real delay is. But IMHO that is nothing to do with cross correlation. If you show somone a picture of these two sinusoids, they will be able to tell you the phase delay, but not the actual differential time delay. Just curious. Regards Andrew
>> Oh, come now! Cross correlation works very well indeed on any two >> signals that are differently delayed versions of the same signal and >> whose period is longer than the differential delay. > >Just wondering why "period is longer than the differential delay" is a >factor? I can see that for two continuous sinusoids, if the >differential delay is longer than a period then you can't uniquely >identify what the real delay is. But IMHO that is nothing to do with >cross correlation. If you show somone a picture of these two sinusoids, >they will be able to tell you the phase delay, but not the actual >differential time delay. > >Just curious. > >Regards >Andrew > >
So i can use "Generalize Cross Correlation" to compute sound source location is it? If yes, which does any algorithm exists or i must look through the theory to implement a new one? And where can i find out some theory about "Generalize Cross Correlation"? Thanks Hieu