DSPRelated.com
Forums

Maximum data extraction from autocorrelation

Started by Dirk Bruere at NeoPax September 16, 2014
So, I have a 1024 data set containing a signal and it's reflection. The signal and reflections are around 10 cycles of sine wave, eye-shaped. I need to find the time between the two. I do autocorrelation and get peaks at zero and the samples where there is maximum correlation. However, this only gives me an accuracy of one sample size - there must be far more information in the data than that. How do I get at it?
On Tue, 16 Sep 2014 03:28:01 -0700, Dirk Bruere at NeoPax wrote:

> So, I have a 1024 data set containing a signal and it's reflection. The > signal and reflections are around 10 cycles of sine wave, eye-shaped. I > need to find the time between the two. I do autocorrelation and get > peaks at zero and the samples where there is maximum correlation. > However, this only gives me an accuracy of one sample size - there must > be far more information in the data than that. How do I get at it?
Mix with sine and cosine waves. Use the peak for the coarse timing, and the phase for the fine timing. It'll matter if the reflection has some phase shift to it, but hopefully that'll be something you can calibrate out. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Hi,

I have two algorithms here
http://www.dsprelated.com/showarticle/26.php
that may do what you want.

The first is iteratively oversampled correlation. Brute force, in a way.
The downside is that the correlation peak is relatively shallow, and it's
slow for long signals ("long" meaning 10M+ samples).

The second one is based on the idea that a time delay is equivalent to a
linear phase shift in the frequency domain. The problem is the periodicity
of the phase. It's usually faster and more accurate, but fails under heavy
group delay distortion.

Neither would be my choice for an embedded implementation, but they are
good for labwork (I've used them for many years to characterize power
amplifiers etc).

Note that the problem (regardless of the algorithm) is very sensitive to
truncation of signals / windowing of the received signal. 
What happens is that the result gets biased towards maximizing the area of
overlap.

	 

_____________________________		
Posted through www.DSPRelated.com
PS note that from an algorithm's point-of-view, a sine wave is about the
worst possible test signal for large delays because of its periodic
autocorrelation.	 

_____________________________		
Posted through www.DSPRelated.com
On Wednesday, September 17, 2014 1:02:58 PM UTC+1, mnentwig wrote:
> PS note that from an algorithm's point-of-view, a sine wave is about the > > worst possible test signal for large delays because of its periodic > > autocorrelation. >
Thanks Unfortunately I am stuck with sine waves due to the high Q of the transducers. At best, I can get a double eye shaped set of pulses Dirk
Hi,

a chirp could be a possibility. Ramp the frequency slowly and it's "almost"
a sine wave. But, I'm sure this can be solved, sounds like a fairly
standard problem in that particular application. 
I'd look for existing solutions to the specific problem. Some patent search
seems like a good idea.
	 

_____________________________		
Posted through www.DSPRelated.com
On Wednesday, September 17, 2014 6:42:03 PM UTC+1, mnentwig wrote:
> Hi, > > > > a chirp could be a possibility. Ramp the frequency slowly and it's "almost" > > a sine wave. But, I'm sure this can be solved, sounds like a fairly > > standard problem in that particular application. > > I'd look for existing solutions to the specific problem. Some patent search > > seems like a good idea. >
The problem has been solved before, by at least one company. However, they use custom built dual peak transducers that nobody anywhere provides as a COTS solution. In short, I am locked into sine waves at a single frequency.
What I have so far is an autocorrelation of the signal 
http://imgur.com/Yz5rUkY 

The distance (in samples) between peak at the origin and the peak at the next pulse train down (at about -0.006) gives the time separation in samples. Currently one sample size is 500nS. So measuring between those two peaks gives me a time resolution of about 1 part in 700.

The question: if I do another series of measurements to find the times between all the corresponding peaks and troughs and then do an average is that a valid way of increasing the timing resolution to better than 1 sample?
On Thursday, September 18, 2014 7:05:21 AM UTC-4, Dirk Bruere at NeoPax wrote:
> What I have so far is an autocorrelation of the signal http://imgur.com/Yz5rUkY The distance (in samples) between peak at the origin and the peak at the next pulse train down (at about -0.006) gives the time separation in samples. Currently one sample size is 500nS. So measuring between those two peaks gives me a time resolution of about 1 part in 700. The question: if I do another series of measurements to find the times between all the corresponding peaks and troughs and then do an average is that a valid way of increasing the timing resolution to better than 1 sample?
Very nice. And how does your figure look if there is Doppler shift in reflected signal (e.g. moving target) ? Maybe not so nice... Can you measure Doppler shift ? Just trying to keep this discussion going :)
angrydude <simfidude@gmail.com> writes:
> [...] > And how does your figure look if there is Doppler shift in reflected > signal (e.g. moving target) ?
Doppler shift doesn't change my figure one bit! -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com