# Determining length of tube from acoustic reflection

I am interested in determining the length of a closed ended tube. I would like to do this using an acoustic signal, like a sine wave. Depending on the length of the tube, I believe the reflected signal will arrive back at the source with a different phase. The actual length of the tube is on the order of 2-3cm. I am interested in sending an acoustic wave that has a frequency of 18-20kHz.

However, I am not sure how to relate the phase to the length of the tube. Is there an intuition or equation I could use to help calculate this?

• What are the other dimensions of this tube? If it's wider than it is long, you might need to do some wave-mechanical propagation to achieve what you're after. – catalogue_number Jul 30 '19 at 2:16
• The diameter of the tube is 1cm. So it is longer than it is wide. – user2562609 Jul 30 '19 at 2:21

Assuming the tube behaves ideally, the simplest possible answer is to use $$v=f\lambda$$: If the tube has some length $$L$$, it will take $$2L/v$$ seconds for the sound to return in which $$2Lf/v = 2L/\lambda$$ cycles will have occurred.

In principle, supposing you have a source of sound with pressure wave $$P(t) = P_0 \sin(\omega t)$$ the measured signal at that precise point in space will be $$P_0\sin(\omega t) + \alpha P_0 \sin(\omega t + \phi)$$ where $$\phi = 2\pi \frac{2L}{\lambda}$$ is the relative phase offset and $$\alpha < 1$$ is some attenuation from loss of sound.

By using some tedious trigonometry, it can be shown that the net measured acoustic intensity will become

$$P' \sin(\omega t + \delta)$$

where $$P'=P_0\sqrt{1 + \alpha^2 + 2\alpha \cos(\phi)}$$ and $$\delta = \text{atan2}(\alpha \sin(\phi), 1 + \alpha \cos(\phi))$$. (Note that $$\phi$$ depends on $$\omega$$ as well, since $$\phi = 2Lv/\omega$$)

Physically, this is sensible: the detected intensity is higher than the emitted intensity, and in the limit $$\alpha\to0$$, $$P' \to P_0, \delta \to 0$$.

In principle, we're done - By (electronically) measuring the phase offset between the applied signal and measured signal, it ought to be possible to recover $$\delta$$ and hence $$L$$. However, the electronics required for such a process are not trivial to design.

In terms of engineering such a system practically, distance measurements like this are usually achieved by sending a very short pulse of sound and measuring the time until it echoes. Many commercial modules are available that achieve this.

• Thank you, could you explicitly write out the steps for how you obtained 𝐼′ and 𝛿? – user2562609 Jul 30 '19 at 6:12
• I copied them directly from Wikipedia's list of trig identities. – catalogue_number Jul 30 '19 at 6:13
• Ah got it. It is the identity for 'arbitrary phase shift'. Btw for clarity, might be good to mention you assumed 𝐼0=1 – user2562609 Jul 30 '19 at 6:26
• I assumed no such thing, it's factorised out the front of the square root in the expression for $I'$ – catalogue_number Jul 30 '19 at 6:28
• Shouldn't it be 𝛿=atan2(𝛼𝐼0sin(𝜙),𝐼0+𝛼𝐼0cos(𝜙))? Btw do you know the intuition for why the phase shift would depend on the the attenuation 𝛼? I understand it is a trig identity, I'm just not sure I get the physical intuition. – user2562609 Jul 30 '19 at 6:35