Maximum data extraction from autocorrelation

Started by September 16, 2014
```On Thursday, September 18, 2014 6:36:23 PM UTC-4, Randy Yates wrote:
> 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

May I suggest sushi diet then ?

It helps :)
```
```I have two problems I am trying to solve with one machine. The main one is determining timing distance between two sets of sine waves at the same frequency to less than one sample resolution. Each set of sine waves is defined by 160 data points, so crudely I might expect a root 160 increase in accuracy over a single sample resolution provided by autocorrelation.

The other is measuring a doppler shift of one part in a million, approximately. This latter problem is of secondary importance.
```
```On Friday, September 19, 2014 5:23:21 AM UTC-4, Dirk Bruere at NeoPax wrote:
> I have two problems I am trying to solve with one machine. The main one is determining timing distance between two sets of sine waves at the same frequency to less than one sample resolution. Each set of sine waves is defined by 160 data points, so crudely I might expect a root 160 increase in accuracy over a single sample resolution provided by autocorrelation. The other is measuring a doppler shift of one part in a million, approximately. This latter problem is of secondary importance.

Simple interpolation might not work if you don't have enough samples per period, but you can try to best-fit an artificial sine wave with same exact frequency but a lot higher sampling frequency to a piece of your recorded sinewave somewhere in the middle where amplitude is not changing too much, then amplitude-modulate this artificial sinewave with the measured envelope of your signal. You can get the envelope, can't you ?
And with Doppler shift this small you shouldn't have much of a problem with correlating signal and its reflection having slightly different frequencies
```
```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?

So you have 125 kHz ultrasound sampled at 2 mHz (16 samples per period)

What kind of ADC hardware are you using ?

And you are looking for better than 0.17 mm distance resolution ?

What kind of project is that ?
```
```On Friday, September 19, 2014 8:57:09 PM UTC+1, angrydude wrote:
> 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?
>
>
>
> So you have 125 kHz ultrasound sampled at 2 mHz (16 samples per period)
>
>
>
> What kind of ADC hardware are you using ?
>
>
>
> And you are looking for better than 0.17 mm distance resolution ?
>
>
>
> What kind of project is that ?

I am looking for resolution in microns over approximately 70mm.
There is a tradeoff in precision between speed of sound, path length and temperature. Fix two, and you can find the third. So, it's a general purpose high precision instrument for gas measurements. I can also do flow and absorption coefficient with the same apparatus. The MCU is provisionally the STM32F303x
```
```On Monday, September 22, 2014 4:05:11 AM UTC-4, Dirk Bruere at NeoPax wrote:
> On Friday, September 19, 2014 8:57:09 PM UTC+1, angrydude wrote: > 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? > > > > So you have 125 kHz ultrasound sampled at 2 mHz (16 samples per period) > > > > What kind of ADC hardware are you using ? > > > > And you are looking for better than 0.17 mm distance resolution ? > > > > What kind of project is that ? I am looking for resolution in microns over approximately 70mm. There is a tradeoff in precision between speed of sound, path length and temperature. Fix two, and you can find the third. So, it's a general purpose high precision instrument for gas measurements. I can also do flow and absorption coefficient with the same apparatus. The MCU is provisionally the STM32F303x

I'm affraid you can't get this kind of resolution with your present setup

The acoustic wavelength at 125kHz is 2.7mm (in air)

The limit on distance resolution is some fraction of this wavelength, say 1/8, but it depends... (provided sufficient sampling, low noise AND correct DSP algorithms)

You have to use higher frequency ultrasound to get to microns

E.g. medical ultrasound runs at several Mhz
```
```Oversampling
```
```Hi,

I built a ultrasonic windspeed meter and have a similar setup. I modulate
the ultrasonic carrier with a slow pseudorandom sequence. The ultrasonic
transducers are small bandwidth but you have a couple of kilohertz. The bit
sequence is modulated in BPSK scheme and demodulated using I/Q carriers. So
you not only get a correlation peak but also a phase angle, which gives you
subsample resolution. You can use several different pseudorandom sequences
on the same carrier in a CDMA setup.

------> But: Temperature is the main concern. First, you get a change in
speed of sound with temperature. Second, the path length changes with
temperature. In my case both effekts are 100 times larger than the value
want to measure, i.e. flight time difference. I use the path in both
directions, so I get rid of changes in path length and absolute speed of
sound.

What I want to say:
- Use I/Q carrier for subsample resolution
- Use slow BSPK pseudorandom CDMA modulation against wavelength ambiguity
- Watch out for temperature effects: difference measurement only.

Hope that helps.

Cheers
Detlef

_____________________________
Posted through www.DSPRelated.com
```
```On Wednesday, September 24, 2014 10:31:48 PM UTC+1, Detlef _A wrote:
> Hi,
>
>
>
> I built a ultrasonic windspeed meter and have a similar setup. I modulate
>
> the ultrasonic carrier with a slow pseudorandom sequence. The ultrasonic
>
> transducers are small bandwidth but you have a couple of kilohertz. The bit
>
> sequence is modulated in BPSK scheme and demodulated using I/Q carriers. So
>
> you not only get a correlation peak but also a phase angle, which gives you
>
> subsample resolution. You can use several different pseudorandom sequences
>
> on the same carrier in a CDMA setup.
>
>
>
> ------> But: Temperature is the main concern. First, you get a change in
>
> speed of sound with temperature. Second, the path length changes with
>
> temperature. In my case both effekts are 100 times larger than the value
>
> want to measure, i.e. flight time difference. I use the path in both
>
> directions, so I get rid of changes in path length and absolute speed of
>
> sound.
>
>
>
> What I want to say:
>
> - Use I/Q carrier for subsample resolution
>
> - Use slow BSPK pseudorandom CDMA modulation against wavelength ambiguity
>
> - Watch out for temperature effects: difference measurement only.
>
>
>
> Hope that helps.

Thanks - that sounds useful. This instrument will only be used in temperature controlled environments and ideally will have been calibrated under known conditions and path length compensated for temperature eg by calculating thermal expansion of materials
```