# Headphone-To-Ear Transfer Function Estimation Using Measured Acoustic Parameters
## 2 The Microphone Array Method for Measuring Acoustic Reflectance
### Error Analysis  
In practice, the compensated microphone output signals may contain errors due to the measurement noise and the inaccurate compensation functions. Let the compensated microphone output vector \(\mathbf{V}_{com}\) be the sum of the true values \(\mathbf{V}\) and the errors \(\Delta\mathbf{V}\)  
\[\mathbf{V}_{com}=\mathbf{J}^{-1}\mathbf{V}_{mic}=\mathbf{V}+\Delta\mathbf{V}. \tag{9}\]  
Then the estimated sound pressure vector \(\widetilde{\mathbf{P}}\) can be obtained from Equation (7)  
\[\widetilde{\mathbf{P}}=\left(\mathbf{A}^{H}\mathbf{A}\right)^{-1}\mathbf{A}^{ H}\mathbf{V}_{com}=\mathbf{P}+\left(\mathbf{A}^{H}\mathbf{A}\right)^{-1} \mathbf{A}^{H}\Delta\mathbf{V}. \tag{10}\]  
Assume that the elements of \(\Delta\mathbf{V}\) are independently distributed with zero mean and equal variance \(\sigma^{2}\), the expected value of the squared norm of the estimation error can be formulated as  
\[E[\left|\widetilde{\mathbf{P}}-\mathbf{P}\right|^{2}]=\sigma^{2}\mathbf{Tr} \left(\left(\mathbf{\Lambda}^{-1}\right)^{T}\mathbf{\Lambda}^{-1}\right)= \sigma^{2}\text{SF}^{2}, \tag{11}\]  
where E[] is the expectation value of a matrix, \(T\)r(0) is the trace value of a matrix, \(\mathbf{\Lambda}\) is the diagonal matrix containing the singular values of \(\mathbf{A}\), and SF is the singularity factor, defined as [21]  
\[\text{SF}=\sqrt{\sum_{j}\mathbf{\Lambda}_{j}^{-2}}. \tag{12}\]  
Thus, the sensitivity of the microphone array method to errors caused by measurement noise and inaccurate compensation functions can be evaluated in terms of the SF. In general, the measurement accuracy of the microphone array method can be improved by increasing the number of microphone positions [22]. However, the effects of measurement accuracy will become marginal when the number of microphone positions is greater than seven [21]. Therefore, to obtain the accurate measurement results with the rational number of microphones, five microphones are chosen in this paper. For the single microphone method [10], where the microphone spacing is \(\mathbf{d}_{pre}=[1.25,6.45,1.0,2.3]\)cm, the corresponding SF from 100 Hz to 16 kHz is plotted using the mauve line in Figure 2. In comparison, the SF determined by five microphone positions with uniform spacing of 1.0 cm is plotted using the blue line. As can be seen from Figure 2, the above non-uniform microphone array can achieve a wider effective measurement frequency range than the uniform-spacing configuration, but some fluctuations exist. The performance of the non-uniform array can be further improved if its SF can be reduced. To do so, a two-staged searching algorithm is presented to find the optimal microphone spacing over the frequency range \([f_{min},f_{max}]\). Firstly, define the collection \(\mathbf{D}_{0}\) of the microphone spacing \(\mathbf{d}_{0}\), i.e.,  
\[\mathbf{D}_{0}=\Big{\{}\mathbf{d}_{0}\Big{|}\text{SF}(f_{peak},\mathbf{d}_{0 })<\gamma\Big{\}}, \tag{13}\]where \(\mathbf{d}_{0}=[d_{21},d_{32},\ldots,d_{54}]\), \(d_{i+1,i},i=1,\ldots,4\) is the microphone spacing, \(f_{peak}\) is the frequency of SF peak within the frequency range, and \(\gamma\) is the predefined threshold. Then, the optimal microphone spacing \(\mathbf{d}_{opt}\) can be determined as follows  
\[\mathbf{d}_{opt}=\arg\min_{\mathbf{d}_{0}\in\mathbf{D}_{0}}\overline{\text{ SF}}(\mathbf{d}_{0}), \tag{14}\]  
where \(\overline{\text{SF}}=\frac{1}{K}\sum\limits_{k=1}^{K}\text{SF}(f_{k},\mathbf{ d}_{0})\), \(f_{k}=k(f_{\max}-f_{\min})/K\), and \(K\) is the number of the frequency bins. To improve the measurement accuracy by optimizing the microphone spacing, the searching algorithm is implemented between two adjacent measurement positions exhaustively at 1 mm step over \([s_{min},s_{max}]\), where \(f_{min}=100\) Hz, \(f_{max}=16\) kHz, \(s_{min}=0.45c/16000\), and \(s_{max}=0.05c/100\). The threshold \(\gamma\) is chosen as 0.85, and the number of the frequency bins is \(K=300\). Among all the configurations, the selected optimal microphone spacing is \(\mathbf{d}_{opt}=[2.0,\ 9.0,\ 5.0,\ 1.0]\) cm.