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:
|τ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:
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 Ψ(ω):
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 θ:
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:
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:
- with increasing array aperture (larger delays for the same angle);
- with a wider analysis band and a larger proportion of high frequencies (subject to spatial aliasing);
- with increasing analysis window duration (for a discrete signal, W/fs, not fs);
- with increasing signal-to-noise ratio.
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
- Reverberation (multipath propagation). Reflected waves create additional correlation maxima; the error increases indoors.
- Multiple sources. P(θ) contains several maxima; the direction to the source dominant in the analysis band is estimated.
- Near field. When the distance to the source is comparable to the aperture, the plane wave model is inaccurate.
- Elevation. For a planar array, a source outside its plane reduces the delays in proportion to cos φ (φ — elevation angle); sources symmetric with respect to the array plane are not distinguished.
- Geometry and speed of sound. Errors in the microphone coordinates and deviation of c from the assumed value introduce a systematic error.
- Channels. The method requires synchronous sampling and identical phase responses of the channels; a faulty channel is excluded together with all its pairs.
Implementation in the system
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.