# A Review on Head-Related Transfer Function Generation for Spatial Audio
## 2 General Setting and Definitions
### Metrics for HRTF Evaluation  
For a generated HRTF, quality evaluation is usually performed by comparing with a measured one by means of objective metrics. The difference between two responses can be estimated by the mean square error (MSE), which could be calculated both in the time [23] and frequency domains [24]. However, one of the frequently used metrics is the spectral distortion (SD), or log-spectral distortion (LSD) [25; 26; 27], defined as  
\[\mathrm{SD}=\sqrt{\frac{1}{k_{2}-k_{1}+1}\sum_{k=k_{1}}^{k_{2}}\left(20\log_{ 10}\frac{|H(k)|}{|\hat{H}(k)|}\right)^{2}}, \tag{2}\]  
where \(k_{1}\) and \(k_{2}\) define the lower and the higher limits of the evaluation band \(B=[k_{1}f_{s}/K,k_{2}f_{s}/K]\), with \(K\) as the FFT length and \(f_{s}\) as the sampling frequency. \(H(k)\) is the measured HRTF, and \(\hat{H}(k)\) is the generated one.  
To take into account the binaural nature of the HRTF, the error can also be determined by evaluating the difference in the localisation cues as the ILD [28; 29] or the ITD [30]. In this regard, the just noticeable difference (JND), i.e., the limit below which no difference is perceived, can be evaluated [31]. A JND limit of 1 dB is considered for the ILD error to guarantee a significant perceptual reproduction [29], while the JND is estimated at around 8 us/\({}^{\circ}\) for ITD, defining a maximal acceptable error of 16 us [30].  
However, the objective evaluation does not accurately estimate the realistic effect of the generation process on binaural reproduction. For this reason, subjective evaluation is essential for understanding the performance of the binaural audio, which is obtained by convolving the input signal with the proper HRTFs. Subjective tests aim to evaluate the localisation error, which quantifies the spatial distortion, or the sound quality, assessed through pair-wise comparisons [32]. In the first case, fixed sound source positions [27; 28; 33] or moving sound sources [32; 34] can be considered. In the second case, the comparison can be performed among different measured HRTFs, in order to create an optimised HRTF subset [35], or between the measured HRTF and the simulated one [28]. In [27; 33], fixed sound source positions are tested, and the timbre is evaluated by comparing the interpolated and measured HRTFs following the MUSHRA methodology. In [27], spatial impression and transparency, defined in ITU-R BS.1534-3 [36], are also included in the analysis. In [34], the listening tests are performed using both fixed and moving sound sources to also evaluate the effect of the continuous sound movement. Finally, in [37],a perceptual evaluation of speech quality is carried out for an accurate analysis of speech enhancement and synthesis applications.  
Subjective perception can also be simulated through models of sound directionality localisation. In [38], the authors propose a sagittal-plane localisation model (SPLM) based on the reproduction of some aspects of auditory system processes. This auditory model uses directional cues to create an internal model of the incoming sound and, in a second stage, compares this model with a template model learned by the individual. The difference between these two models is mapped to a probability that the subject localises the sound source in a given direction.