Chapter 10: Direction of Arrival (DOA) Estimation
When using an array of sensors, the delay between the signals received by different sensors can be used to estimate the direction of arrival (DOA) of the signal emitted by an object. For the case of two microphones, the problem of DOA estimation is depicted in the figure below. As the figure shows, the distance \(x\cos\theta\) is the additional distance that the second propagation path has to travel before reaching its microphone, compared to the first propagation path. Therefore, by estimating this time difference, we can use the following simple relation to estimate the DOA angle:
\[ \boxed{\theta=\cos^{-1}\left(\frac{c\tau_0}{x}\right)} \]
This formula comes from the equation that relates velocity to displacement. Namely, from the equations of motion, we have:
\[ \delta x = v\delta t \]
Since the speed of sound is constant, we can write:
\[ \delta x = c\tau_0 \]
Combining this with the geometric relation \(\delta x=x\cos\theta\), we obtain the above formula. A simple DOA estimation method is based on estimating the time delay \(\tau_0\) by computing the cross-correlation between the signals received by different microphones. Mathematically, the continuous-time cross-correlation function is defined as:
\[ R_{xy}(\tau) = \int_{-\infty}^{\infty}x(t)y(t+\tau),dt \]
If we assume that the signal received by the first microphone is the continuous-time function \(x(t)\), then the signal received by the second microphone is a shifted version of it, namely:
\[ s_1(t)=x(t),\qquad s_2(t)=x(t-\tau_0) \]
Therefore, the cross-correlation formula we defined above reduces to:
\[ \begin{aligned} R_{s_1s_2}(\tau) &=\int_{-\infty}^{\infty}x(t)x(t+\tau-\tau_0),dt\ &=R_{xx}(\tau-\tau_0) \end{aligned} \]
Here, because we are computing the cross-correlation of a function with itself, the resulting function is called the autocorrelation of \(x(t)\). It can be shown that the autocorrelation function \(R_{xx}(\tau)\) attains its maximum value at \(\tau=0\). Therefore, \(R_{s_1s_2}(\tau)\) attains its maximum at \(\tau=\tau_0\). Consequently, by computing the cross-correlation function and finding the argument that maximizes it, we can estimate the time delay, which in turn allows us to estimate the DOA. A problem here, however, is that when implementing the cross-correlation method on a microcontroller (MCU), the microcontroller samples continuous-time signals at regular intervals, typically integer multiples of the sampling interval \(T_s\). Because of this, we only have access to discrete values of the signals \(s_1(t)\) and \(s_2(t)\), which we denote by \(s_1[n]\) and \(s_2[n]\), respectively. Having discrete-time signals instead of continuous-time signals, the microcontroller computes the discrete-time cross-correlation function as:
\[ \boxed{ r_{s_1s_2}[\ell] =\sum_{n=-\infty}^{\infty}s_1[n]s_2[n-\ell] } \]
This expression is called the discrete-time cross-correlation. How are the values of the discrete-time cross-correlation related to those of the continuous-time cross-correlation? It can be shown that, under the condition that the signals are bandlimited and sampled at or above the Nyquist rate, the discrete-time cross-correlation function, multiplied by the sampling interval \(T_s\), gives samples of the continuous-time cross-correlation function at integer multiples of \(T_s\) 1. More precisely, with the definition of discrete-time cross-correlation used above, we have:
\[ \boxed{ R_{s_1s_2}(-\ell T_s) =T_s r_{s_1s_2}[\ell] } \]
Originally, however, we were looking for the value of \(\tau\) that maximizes the continuous-time cross-correlation function. To estimate this value using the discrete-time cross-correlation, we can take its peak value and the two neighboring samples, fit a polynomial through these three points using polynomial interpolation, and then find the maximum of that polynomial [2]. This allows us to obtain a more accurate estimate of the time delay than simply selecting the discrete sample with the maximum value.