# A Review on Head-Related Transfer Function Generation for Spatial Audio
## 2 General Setting and Definitions
### Mathematical Setting  
In this section, we will formulate the mathematical setting underlying the definition of an HRTF given by Equation (1). In general terms, the problem can be formulated as a scattering problem, where a sound wave generated by a point source \(S\) is scattered by a body (the head and torso of an individual) in an anechoic environment. The scattering surface is indicated with \(\Sigma\) and the boundless simulation domain outside to \(\Sigma\) with \(\Omega\). The normal vector to the surface \(\Sigma\) is conventionally directed toward the external of the simulation domain \(\Omega\) (that is, toward the internal of the body). The scheme is depicted in Figure 3.  
The pressure field \(p(\mathbf{r},t)\) generated at a point \(\mathbf{r}\) at time \(t\) by a point source \(S\) placed at \(\mathbf{r_{S}}\) can be subdivided into an incoming wave \(p_{\mathrm{in}}(\mathbf{r},t)\) and a scattered wave \(p_{\mathrm{sc}}(\mathbf{r},t)\) as  
\[p(\mathbf{r},t)=p_{\mathrm{in}}(\mathbf{r},t)+p_{\mathrm{sc}}(\mathbf{r},t). \tag{3}\]  
The scattered wave is a solution of the free field wave equation  
\[\frac{\partial^{2}p_{\mathrm{sc}}(\mathbf{r},t)}{\partial^{2}t}-c^{2}\
abla^{ 2}p_{\mathrm{sc}}(\mathbf{r},t)=0, \tag{4}\]  
where \(c\) is the speed of sound in air. Figure 3: Mathematical definition of the problem: the sound wave \(p_{\mathrm{in}}\) generated by a point source \(S\) is scattered by a surface \(\Sigma\). The scattered wave is indicated with \(p_{\mathrm{sc}}\). The simulation domain is the boundless space \(\Omega\) external to \(\Sigma\). By convention, the normal vector \(\mathbf{n}\) is directed outward from the simulation domain. The incoming wave is given by a spherical wave propagating from the source position \(\mathbf{r_{S}}\). For large values of \(|\mathbf{r_{S}}|\), the spherical wave can be approximated with a plane wave. For a normalised monochromatic excitation at the angular frequency \(\omega\), we have, respectively,  
\[p_{\text{in}}(\mathbf{r},t)=\frac{1}{4\pi|\mathbf{r}-\mathbf{r_{S}}|}e^{i(k| \mathbf{r}-\mathbf{r_{S}}|-\omega t)},\hskip 28.452756 ptp_{\text{in}}(\mathbf{r},t)=e^ {i(k\cdot\mathbf{r}-\omega t)}, \tag{5}\]  
where \(\mathbf{k}\) is the wave vector and \(k=|\mathbf{k}|=\frac{\omega}{c}\) is the wave number.When Equation (4) is supplemented with boundary conditions at the surface \(\Sigma\) and with the Sommerfeld radiation condition at infinity, the scattering problem has a unique solution. For the sake of simplicity, Neumann boundary conditions, corresponding to the assumption of infinite impedance and, hence, hard surface, are frequently chosen. This approximation is valid in many cases, even though the acoustic impedance of human skin varies with frequency and across different individuals [39]. We assume Neumann boundary conditions in the remaining part of this section. An infinite impedance corresponds to a null normal derivative of the sound pressure field at points on \(\Sigma\):  
\[\frac{\partial p_{\text{in}}(\mathbf{r},t)}{\partial\mathbf{n}}=-\frac{ \partial p_{\text{sc}}(\mathbf{r},t)}{\partial\mathbf{n}}\quad\mathbf{r}\in\Sigma, \tag{6}\]  
where \(\frac{\partial}{\partial\mathbf{n}}\) is the normal derivative to the surface \(\Sigma\). The sound pressure field in Equation (6) is subdivided into the incoming and scattered waves, as in Equation (3). The Sommerfeld radiation condition corresponds to the requirement that the energy is radiated outward from the scatterer, without allowing inbound waves propagating from the infinity. In the time domain, the Sommerfeld condition is as follows:  
\[\lim_{r\rightarrow\infty}\left[r\Big{(}\frac{\partial p_{\text{sc}}(\mathbf{r },t)}{\partial t}+c\frac{\partial p_{\text{sc}}(\mathbf{r},t)}{\partial r} \Big{)}\right]=0, \tag{7}\]  
where \(r=\|\mathbf{r}\|\) is the radial coordinate. Together with conditions (6) and (7), Equation (4) gives a unique solution to the scattering problem. The problem can be reformulated in the frequency domain via the Fourier transform.