Audio delay circuit

Started by George W October 27, 2004
I have a need to measure the relative delay between two audio signals
arriving at a receiver via different paths.  The audio signals are standard
3 kHz audio bandwidths containing voice or music.  One could arrive as much
as 1 msec before or after the other.  I'd like to be able to measure the
difference in time of arrival between the two signals down to 1 usec if
that's possible.

Any suggestions?  I'm thinking of using a 180 degree phase shifter and
adjusting a variable delay line for a null when the signals are summed.

Thanks.

George




Hello George,

Just find the FFT of the two received signals - one from each path. Then
just find the hermitian product between the two spectra. I.e., take the
complex conjugate of the output of one FFT times the other FFT. Now find the
argument of each of the resulting values verses frequency. The slope of the
phase vs. frequency will give you the time offset. (If you are curious the
intercept yeilds the frequency offset) If you don't want to unwrap the
argument function, then you can separate the hermitian product into its two
constituent real functions. Namely I and Q. Then just find   (I*dQ - Q*dI) /
(q^2 + I^2) and this will give you the time offset. Since you get an
estimate for the time offset for each frequency (from the FFTs), just
average them all together. You can do a weighted average if you know
something about the noise density function. This is basically a frequency
domain approach to doing the correlation, but stopping short of the inverse
transform and subsequent peak search. Accurate peak searches require
interpolation, however, the phase space approaches I gave here avoid the
interpolation issues, and reduce the time offset to a simple regression
analysis.

IHTH,

Clay S. Turner




"George W" <look@signature-to-reply.com> wrote in message
news:m%Gfd.11970$6q2.11098@newssvr14.news.prodigy.com...
> I have a need to measure the relative delay between two audio signals > arriving at a receiver via different paths. The audio signals are
standard
> 3 kHz audio bandwidths containing voice or music. One could arrive as
much
> as 1 msec before or after the other. I'd like to be able to measure the > difference in time of arrival between the two signals down to 1 usec if > that's possible. > > Any suggestions? I'm thinking of using a 180 degree phase shifter and > adjusting a variable delay line for a null when the signals are summed. > > Thanks. > > George > > > >
George W wrote:

> I have a need to measure the relative delay between two audio signals > arriving at a receiver via different paths. The audio signals are standard > 3 kHz audio bandwidths containing voice or music. One could arrive as much > as 1 msec before or after the other. I'd like to be able to measure the > difference in time of arrival between the two signals down to 1 usec if > that's possible. > > Any suggestions? I'm thinking of using a 180 degree phase shifter and > adjusting a variable delay line for a null when the signals are summed. > > Thanks. > > George
Different paths imply some reflection. You will get a very mushy null unless the path properties are perfectly matched in frequency and phase responses. "Ain't gonna happen." Correlate. I understand how to do that in time, but a frequency approach is better. Jerry -- Engineering is the art of making what you want from things you can get. &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
Yes, it's helpful Clay.  One more novice question:  Since the highest
frequency I have available in the audio channels is 3 kHz (and there's not
much signal energy to work with at that frequency), will it be possible to
resolve down to 1 usec?  That's around 1/1000 of a cycle.  Seems daunting to
me, but then my DSP experience is limited  :)

Thanks.

George



"Clay Turner" <physics@bellsouth.net> wrote in message
news:rHNfd.217554$as2.105040@bignews3.bellsouth.net...
> Hello George, > > Just find the FFT of the two received signals - one from each path. Then > just find the hermitian product between the two spectra. I.e., take the > complex conjugate of the output of one FFT times the other FFT. Now find
the
> argument of each of the resulting values verses frequency. The slope of
the
> phase vs. frequency will give you the time offset. (If you are curious the > intercept yeilds the frequency offset) If you don't want to unwrap the > argument function, then you can separate the hermitian product into its
two
> constituent real functions. Namely I and Q. Then just find (I*dQ - Q*dI)
/
> (q^2 + I^2) and this will give you the time offset. Since you get an > estimate for the time offset for each frequency (from the FFTs), just > average them all together. You can do a weighted average if you know > something about the noise density function. This is basically a frequency > domain approach to doing the correlation, but stopping short of the
inverse
> transform and subsequent peak search. Accurate peak searches require > interpolation, however, the phase space approaches I gave here avoid the > interpolation issues, and reduce the time offset to a simple regression > analysis. > > IHTH, > > Clay S. Turner > > > > > "George W" <look@signature-to-reply.com> wrote in message > news:m%Gfd.11970$6q2.11098@newssvr14.news.prodigy.com... > > I have a need to measure the relative delay between two audio signals > > arriving at a receiver via different paths. The audio signals are > standard > > 3 kHz audio bandwidths containing voice or music. One could arrive as > much > > as 1 msec before or after the other. I'd like to be able to measure the > > difference in time of arrival between the two signals down to 1 usec if > > that's possible. > > > > Any suggestions? I'm thinking of using a 180 degree phase shifter and > > adjusting a variable delay line for a null when the signals are summed. > > > > Thanks. > > > > George > > > > > > > > > >
"George W" <look@signature-to-reply.com> wrote in message
news:zfOfd.12042$6q2.1183@newssvr14.news.prodigy.com...
> Yes, it's helpful Clay. One more novice question: Since the highest > frequency I have available in the audio channels is 3 kHz (and there's not > much signal energy to work with at that frequency), will it be possible to > resolve down to 1 usec? That's around 1/1000 of a cycle. Seems daunting
to
> me, but then my DSP experience is limited :) > > Thanks. > > George >
Hello George, Your accuracy will basically be limited by noise, sampling clock accuracy, bandwidth, sample duration and dispersion. If you can use the same sample clock for both samplers, that will help tremendously. Your bandwidth is fixed, so just use a longer duration. Try using several seconds worth of data. Statistically one can use the Cramer Rao bound to find the best you can do, but in practice finding the Fisher information of a signal is a lot of work. So just do some empirical testing. If you are using a phone line or some other dispersive medium, this will also create a limit to you time alignment knowledge since the different frequencies will take differing amounts of time to propagate. This gets into knowing the group delay of your path which is what you are trying to find! The potential dispersion may cause you to not be able to know to within 1uSec, because the group delay function itsel may not be flat. So I would do some experimentation to characterize my channel. So the 1 uSec resolution question will require some testing for your case before you know if this is possible. IHTH, Clay
"Jerry Avins" <jya@ieee.org> wrote in message
news:2u9p7nF27irohU1@uni-berlin.de...
> George W wrote: > > > I have a need to measure the relative delay between two audio signals > > arriving at a receiver via different paths. The audio signals are
standard
> > 3 kHz audio bandwidths containing voice or music. One could arrive as
much
> > as 1 msec before or after the other. I'd like to be able to measure the > > difference in time of arrival between the two signals down to 1 usec if > > that's possible. > > > > Any suggestions? I'm thinking of using a 180 degree phase shifter and > > adjusting a variable delay line for a null when the signals are summed. > > > > Thanks. > > > > George > > Different paths imply some reflection. You will get a very mushy null > unless the path properties are perfectly matched in frequency and phase > responses. "Ain't gonna happen." Correlate. I understand how to do that > in time, but a frequency approach is better. > > Jerry > -- > Engineering is the art of making what you want from things you can get. >
&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095; If you are trying to estimate time-delay (TDOA) between to signals using cross-correlation - forget it. Cross-correlation only works well when both signals are white. You need what has been termed Generalised Cross Correlation. The Hanan Thomson Transform,SCOT -Smoothed Covariance and so on.Most of them are based on FFTs but also the coherence.This sharpens the cross-correlation when there are multiple delays otherwise you do get a smudging. Besy way is to work out the cross-spectral density and weight this with the required function (for example the SCOT method) - then do an inverse FFT to get back to cross-correlation.There are numerous papers on this - search the IEEE or just Google for Generalized Cross Correlation TDOA.I have tried this and it works pretty well though it still has its problems.Ordinary Cross Correlation is next to useless. No 6