# Calculating the signal shift of acoustic emissions between a source and an observer

I am attaching two sensors on a body that I would like to investigate for defects. I am creating an impulse response on the first sensor by hitting the bolt that it is fastened by with a sharp object and a hammer. Both sensors are sampled at 1 MHz. There is no intrinsic delay between the two sensors.

My aim is to calculate the delay between the two signals. I expect to calculate a delay that is close to the theoretical speed of sound in the body that I am measuring. Currently the distance between the two sensors is 80 cm and there are no deffects. Given a speed of sound of 5000 m/s (according to literature), this gives a theoretical delay of 0.16 ms.

While the signal on the second sensor is indeed shifted in time, it also has much lower frequencies and none of the high frequency components, as can be confirmed by looking at the magnitude spectrum:

I suspect that the body acts like a low-pass filter more or less, which makes sense because of the damping. I have tried to estimate the transfer function by using the MATLAB function tfestimate:

Regardless of this, I should mention that I have tried the classical approaches, such as cross-correlation, this did not lead to the value that I want:

We see from this that the value -0.16 ms does not have any peaks.

I would really appreciate your help in this regard. What do I need to do? Some kind of pre-processing of the second signal?

P.S.: I did this example in MATLAB. Python is also not a problem at all

New contributor
Tino D is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Tricky.

First you need to make sure that data capture is good enough, which does not seem to be the case here especially for the second signal.

1. You can clearly see something like quantization steps. You are maybe using 5 bits tops and the steps also look non-uniform. You need more gain before the ADC.
2. The capture is way too short. The transfer function is indeed a very aggressive low pass filter but the cutoff frequency is probably at a few 100 Hz whereas your frequency resolution of your DFT seems to be around 500 Hz.

You need to fix 1 before you can fix 2. You need better signal to noise ratio to capture enough information about the system.

Your PSD at sensor 2 shows that anything above 3 kHz is just noise. So using a MHz sample clock doesn't do you any favors here and any algorithm you can come up with should be ONLY use information up to 3 kHz.

Second: Given the extreme lowpass nature of sensor 2, this is kind of an ill posed question. This looks to be a fairly steep roll off at a very low frequency. That means the transfer function itself will have significant group delay which will vary quite a bit with frequency. Hence it would be very difficult to assign a single number to this.

It may helpful to look at the physics of the damping process and see if you can generate a model to back it out. This may be aggravated buy the fact that cutoff of the lowpass is likely to be a function of the distance in the medium. On the other hand: you may be able to use this: measure the cutoff and calculate the path length from there.

Another thing to look at are DC blocking filters in your data acquisition. None of your signals has a DC offset which probably indicates there are none or more high passes somewhere in the signal chain (sensor, preamp, instrumentation amp, AD converter, etc) . It would be a good idea to see where the cutoffs are and what the associated group delays are.

• Thanks for the answer! Ialready ordered a BNC analog amplifier which will hopefully improve the second signal. I'll collect some more data when it comes and i'll look at it then :D Commented Aug 1 at 15:29