# Measurement of Head-Related Transfer Functions: A Review
## 2 Principle of HRTF Measurements
### Basic HRTF Measurement Methods
#### 2.2.1 HRTF Measurement with Pseudo Random Sequences  
MLS/IRS  
MLS is a binary sequence that can be created by an L-stage linear feedback shift-register with a period length N = 2\({}^{\text{L}}-1\) (the case with \"all zeros\" sequence is not included) [48]. Figure 4 shows an example of such a shift-register which consists of L sequent registers and uses the \(L\)th register state as the sequence output. Under the control of clock signals, the state of each register (0 or 1) moves step by step in one direction (in this case from left to right), and can be expressed as [35; 55]:  
\[\begin{split} a_{i}(n+1)&=a_{i-1}(n),\quad\text{ for}\quad i\in\{2,3\dots\text{L}\},\\ a_{1}(n+1)&=c_{1}\ a_{1}(n)\oplus c_{2}\ a_{2}(n) \oplus...\oplus c_{\text{L}-1}\ a_{\text{L}-1}(n)\oplus c_{\text{L}}\ a_{ \text{L}}(n),\end{split} \tag{5}\]  
where \(n\) and \(n+1\) indicate the \(n\)th and \(n+1\)th clock pulses, respectively. The symbol \(\oplus\) denotes the modulo 2 adder, and \(c_{i}\) represents the feedback coefficient (\(i\in\{1,2,3,...,\text{L}\}\)), which can either be 0 or 1 except for \(c_{\text{L}}\) (\(c_{\text{L}}=1\)). After the \(n\)th clock pulse, the output state can be represented as \(a_{\text{L}}(n)=a_{1}(n-\text{L}+1)\). A bipolar form (\(s_{i}\in\{-1,1\}\)) is often applied to create signal waveforms in practice, thus the binary sequence output is remapped to a bipolar sequence with \(s_{i}=1-2\ a_{i}\). Taking the advantage that the circular auto-correlation of the MLS signal approaches an impulse function, the impulse response \(h(n)\) can be calculated by the circular cross-correlation of the recorded \(y(n)\) and the excitation signal \(x(n)\)[35; 60]:  
\[r_{xy}(n)=x(n)\otimes y(n)=h(n)+\frac{1}{\text{N}(\text{N}+1)}\sum_{n=0}^{ \text{N}-1}h(n)-\frac{1}{\text{N}}\sum_{n=0}^{\text{N}-1}h(n), \tag{6}\]  
where the second term of the equation can be neglected when using a long MLS. The third term is actually a direct current (DC) part of the impulse response, and must not be considered for an alternating current (AC) coupling system [35]. The fast Hadamard transformation (FHT) is usually applied for efficiently performing the circular cross-correlation process [55], and the length of the MLS signal should be large enough (longer than the system impulse response) to overcome the time-aliasing error caused by the circular cross-correlation operation [44]. The advantage of the MLS approach is the robustness against transient noises due to the uniform distribution of its energy over the measurement signal [60]. One disadvantage of the MLS approach is the low immunity against harmonic distortions in the measurement results caused by nonlinearities of measurement systems [61]. A straightforward solution to avoid the harmonic distortions is to reduce the playback level (at least 5-8 dB below full scale reported in [37]). In practice, an optimal reproduction level should be chosen as a compromise between maximizing the SNR and minimizing the distortions [44, 62].  
[PERSON] and [PERSON] [54] modified the MLS signal and proposed an IRS method to attenuate the harmonic distortion levels. An IRS can be formed as:  
\[\text{IRS}(n)=\begin{cases}\text{MLS}(n)&\text{if n is even},\quad n\in\{0,2,4,6,...,2\text{N}-2\},\\ -\text{MLS}(n)&\text{if n is odd},\quad n\in\{1,3,5,7,...,2\text{N}-1\}.\end{cases} \tag{7}\]  
An IRS signal has a period of 2N, where N is the period of an MLS. After the deconvolution (circular cross-correlation) process, the impulse response \(h(n)\), and its inverted version \(-h(n)\) are located in the first (from 0 to N-1) and second half (from N to 2N) of the measured impulse response, respectively. [PERSON] and [PERSON] [54] demonstrated that the IRS approach provides high immunity against even-order nonlinearities while maintaining the advantages of the MLS method. Based on the MLS/IRS, several methods have been proposed to further improve the robustness against background noises and nonlinearities [63, 64] or to accelerate the deconvolution process [65].