HDL-MIC · Documentation

Direction of arrival

Estimation of the direction of arrival (DOA) of a sound wave from the signals of a microphone array. This section presents the theoretical basis of the method; the implementation has not been experimentally verified with real sources.

Problem statement

An array of M microphones with known coordinates pi records the signal of a source. Because the distances from the source to the microphones differ, the signal arrives at them with different delays. The task is to estimate the direction to the source — the azimuth θ in the plane of the array — from the observed signals xi[n].

Fig. 1. Square array of four microphones (side a, diagonal a√2) and a plane wave arriving from the direction θ (unit vector u). Microphones are numbered clockwise: 1, 3, 2, 4.

Plane wave model

If the distance to the source is much greater than the array size (far field), the wavefront in the array region is considered plane. The far-field condition is r > 2D²/λ, where D is the array aperture and λ is the wavelength. The arrival time of the wave at microphone i relative to the array centre and the delay between microphones are:

ti = −(pi·u)/c,   u = (sin θ, cos θ);    τij(θ) = ti − tj = (pj − pi)·u / c
|τij| ≤ dij/c,   dij = |pj − pi|;    c ≈ 331.3 + 0.606·T m/s (T — air temperature, °C; at 20 °C c ≈ 343 m/s)

For an array with d = 40 cm the maximum delay between adjacent microphones is 1.17 ms, and along the diagonal 1.65 ms.

Time difference of arrival

Direction estimation methods fall into two groups: two-stage methods — estimation of the time differences of arrival (TDOA) for microphone pairs followed by solving a geometric problem; and steered response methods, in which the direction is searched directly over the space of directions. Both groups are based on the cross-correlation of the signals of microphone pairs:

Rij(τ) = Σn xi[n]·xj[n + τ];    τ̂ij = arg maxτ Rij(τ)

An array of M microphones has M(M−1)/2 pairs; for M = 4 there are six pairs (four sides and two diagonals of the square).

Generalized cross-correlation (GCC-PHAT)

The cross-correlation is computed in the frequency domain. The generalized cross-correlation method (GCC; C. Knapp, G. Carter, 1976) introduces a frequency weighting function Ψ(ω):

Rij(τ) = Σk Ψ(ωk)·Xi(ωk)·Xj*(ωk)·ejωkτ
PHAT (phase transform): Ψ(ω) = 1 / |Xi(ω)·Xj*(ω)|

The PHAT weighting normalizes the magnitude of the cross-spectrum, retaining only the phase. All frequencies contribute equally regardless of the signal spectrum; the peak of the correlation function becomes narrow. For signals with a non-uniform spectrum (for example, dominated by low frequencies) ordinary correlation gives a broad peak, GCC-PHAT a narrow one. The method is robust to reverberation but sensitive to frequencies with a low signal-to-noise ratio, so the analysis is restricted to the band in which the source energy is concentrated.

Fig. 2. Cross-correlation of two signals with a delay of 430 µs (7 samples at fs = 16,276 Hz); the signal is noise band-limited by a first-order low-pass filter at 300 Hz; simulation. Ordinary correlation and GCC-PHAT, normalized to the maximum.

SRP-PHAT method

The steered response power method with phase transform (SRP-PHAT; J. DiBiase, 2000) sums the GCC-PHAT values of all pairs at the delays corresponding to the tested direction θ:

P(θ) = Σi<j RijPHAT(τij(θ));    θ̂ = arg maxθ P(θ)

For each pair only the delay consistent with the array geometry is used; errors of individual pairs compensate each other. The value P(θ̂), normalized by the number of pairs and frequency bins, lies in the range 0…1 and characterizes coherence: it is close to 1 for a single point source and low noise, and close to 0 for diffuse (isotropic) noise.

Fig. 3. Normalized function P(θ) for a square array with a side of 10 and 40 cm; broadband noise source at θ = 120°, analysis band 80…3000 Hz, window of 2048 samples, fs = 16,276 Hz; simulation.

Spatial aliasing

The phase difference of a pair's signals at frequency f equals 2πf·τ and is defined modulo 2π. If the distance between the microphones is greater than half the wavelength, the same phase difference corresponds to several directions — spatial aliasing. The uniqueness condition for a pair with spacing d:

d < λ/2   ⇔   f < fa = c/(2d);    for the square diagonal d = a√2: a = 10 cm → fa ≈ 1.2 kHz; a = 40 cm → fa ≈ 300 Hz

For a narrow-band (tonal) signal above fa the function P(θ) has several equal maxima. For a broadband signal the positions of the spurious maxima depend on frequency, and they are attenuated when summed over the band, while the true maximum is preserved. Therefore, for broadband sources the analysis band may exceed fa, while for tonal sources its upper limit is restricted to fa.

Estimation accuracy

The lower bound on the variance of an unbiased delay estimate (the Cramér–Rao bound) is inversely proportional to the signal-to-noise ratio, the observation time and the square of the RMS bandwidth of the signal. Consequently, the accuracy of direction estimation increases:

The sensitivity of the delay to the angle is maximal for directions perpendicular to the pair axis and minimal along the axis (dτ/dθ ∝ cos of the angle between the direction and the normal to the pair axis). The square array contains pairs with four different orientations, which equalizes the accuracy over azimuth.

Sources of error

Implementation in the system

Status: the method has been implemented and verified on simulated signals; experimental verification with real sound sources has not been performed. The results should be regarded as preliminary.

Estimation is performed by the SRP-PHAT method for each window of the windowed mode (four synchronous channels, original signal). The channel spectra are computed with a Hann window and zero padding to 2W; the azimuth is searched in 1° steps with parabolic refinement of the maximum; c = 343 m/s. Pairs involving channels recognized as faulty are excluded (at least three pairs are required). Adjustable parameters: the square side a, the clockwise order of the microphones, the scale rotation, the analysis band and the coherence threshold below which the estimate is not marked.