# Measurement of Head-Related Transfer Functions: A Review
## 2 Principle of HRTF Measurements
### Golay Codes
#### 2.2.3 HRTF Measurement with Adaptive Filtering Methods  
Adaptive filtering approaches have been widely applied in various acoustic applications, such as acoustic system identification [80], echo cancellation [81], active noise cancellation [82], and crosstalk cancellation [83]. The normalized least mean square (NLMS) method is one of the most popular adaptive filtering algorithms due to its high performance and ease of implementation [56]. Therefore, this section focuses on the use of NLMS-based adaptive filtering approaches to estimate static HRTFs.  
Figure 7 shows the block diagram for the system identification using adaptive filtering approaches in the time domain. \(\mathbf{h}\) and \(\mathbf{h}_{\text{est}}(n)\) are vector representations of an unknown and the estimated system impulse response, respectively. The essential idea of this approach is to adapt \(\mathbf{h}_{\text{est}}(n)\) to \(\mathbf{h}\) in a recursive form by minimizing the residual error \(e(n)\) between the estimated and the measured system output. In general, the NLMS method consists of the following steps [56; 84]:  
1. Calculation of the estimated output signal: \(y_{\text{est}}(n)=\mathbf{h}_{\text{est}}^{T}(n)\;\mathbf{x}(n)\)
2. Calculation of the residual error between the measured and the estimated output signal: \(e(n)=y(n)-y_{\text{est}}(n)\)
3. Adaptation of the \(\mathbf{h}_{\text{est}}(n)\) based on the residual error and the input signal: \(\mathbf{h}_{\text{est}}(n+1)=\mathbf{h}_{\text{est}}(n)+\mu\frac{\mathbf{x}(n )}{\left\|\mathbf{x}(n)\right\|_{2}^{2}+e}e(n)\),  
Figure 6: An example of measured system impulse responses (time-frequency representation) by using linear (upper panel) and exponential (bottom panel) sweeps as excitation signals. The bold and thin curves represent linear and harmonic responses, respectively (adapted from Figure 2 in [73]).  
where \(\mathbf{x}(n)\) represents an input vector consisting of the most recent N samples of the input signal at the discrete time \(n\). The regularization factor \(\epsilon\) is used to avoid numerical problems when the dominator is close to zero. The step-size \(\mu\) is a key parameter for the performance of the adaptive filtering process and should be carefully chosen as a trade-off between the tracking behavior and the noise rejection performance (\(0<\mu<2\)). Alternatively, \(\mu\) can be recursively adjusted according to estimation errors (variable step-size NLMS) [85; 86].  
Broadband signals such as pseudo random sequences, white noises, and perfect sequences [87; 88] are generally employed as excitation signals to identify systems when using adaptive filtering techniques. [PERSON] et al. [89] demonstrated that the perfect sweep, derived from the class of perfect sequences, is an optimal excitation signal for identifying acoustic systems (tested with the NLMS method). The use of perfect sweep signals can accelerate the convergence speed of the adaptation process and provide high robustness against nonlinearities of measurement systems. The perfect sweep is actually a linear sweep with periodical repetitions and can be generated in the frequency domain with a constant (white) magnitude spectrum and a linear group delay. [PERSON] [80] introduced the use of adaptive filtering methods for the HRTF measurement and showed the advantages to continuously capture multi-directional HRIRs (see Section 4).