# Diffuse-Field Equalisation of Binaural Ambisonic Rendering
## 2 Ambisonic Rendering
### Decoding  
The amount of loudspeakers \(L\) required to reproduce the sound field is determined by \(L\geq K\), though in the case of \(L=K\), which produces the least errors in spatial reproduction, audible timbral artefacts occur when a sound is panned to the exact location of a loudspeaker [17; 18]. All loudspeaker configurations used in this paper therefore conformed to the rule \(L>K\). The three loudspeaker configurations used in this study for orders \(M=1,3\) and \(5\) were Lebedev grid [19] arrangements with \(L=6\), 26 and 50 loudspeakers respectively. Lebedev grids are quadratures well suited for practical Ambsonic playback due to their near-exact orthonormal capabilities [20] and nesting of the \(L=6\) and \(L=26\) in the \(L=50\) configuration. To test the regularity of the loudspeaker configurations for SH sampling, orthonormality error \(E_{O}\) was calculated as  
\[E_{O}=I_{K}-\frac{1}{L}C^{T}\times C, \tag{3}\]  
where \(I_{K}\) denotes the \(K\times K\) identity matrix, \(C\) is the re-encoding matrix and transposition is notated by a superscript \({}^{T}\)[18; 21]. The layout of loudspeakers and \(E_{O}\) matrix plots of the three Lebedev configurations are presented in Figure 1 for Ambsonic orders up to \(M+1\), which show the regularity for the 6 pt. and near-regularity of the 26 pt. and 50 pt. configurations. Separate decode matrices were calculated for low and high frequencies for optimal horizontal localisation. Pseudo-inverse mode-matching decoding produces the closest approximation of the original sound field for near-regular loudspeaker arrangements with a non-square re-encoding matrix [22]. For frequencies up to \(f_{alias}\) therefore, a pseudo-inverse decoding method with basic channel weighting was used. Above \(f_{alias}\), where the sound field is inadequately reconstructed, pseudo-inverse decoding with Max \(\mathbf{r_{E}}\) channel weighting was used, which aims to reproduce the energy vector \(\mathbf{r_{E}}=1\) for all directions [18; 22; 23]. The gains \(g_{m}\) to be applied to \(k\) such to maximise \(r_{E}\) are found from differentiation of \(r_{E}\) with respect to \(g_{m}\) ([18], p. 312), such that  
Figure 1: Loudspeaker layouts and orthonormality error matrices for the three Lebedev loudspeaker configurations used in this paper: (**a**) loudspeaker layout for \(M=1\) (\(L=6\)), (**b**) loudspeaker layout for \(M=3\) (\(L=26\)), (**c**) loudspeaker layout for \(M=5\) (\(L=50\)), (**d**) orthonormality error matrix plot for \(M=1\) (\(L=6\)), (**e**) orthonormality error matrix plot for \(M=3\) (\(L=26\)) and (**f**) orthonormality error matrix plot for \(M=5\) (\(L=50\)). In orthonormality error matrix plots, spherical harmonics of different orders are separated to aid visual clarity. \[ \begin{split}\frac{\delta r_{E}}{\delta g_{m}}&=0\\ &\Rightarrow r_{E}(2m+1)g_{m}=(m+1)g_{m+1}+mg_{m-1}.\end{split}  \tag{4}\]  
This recurrence equation can then be rewritten using Legendre polynomials to match Bonnets' Recursion Formula [24], if the rules \(g_{-1}=0\) and \(g_{M+1}=0\) and therefore \(g_{0}=1\) and \(g_{1}=r_{E}\) are followed, such that \(\eta=r_{E}\) and \(g_{m}=P_{m}(r_{E})\), for orders \(m=0,1,...,M\):  
\[\eta(2m+1)P_{m}(\eta)=(m+1)P_{m+1}(\eta)+mP_{m-1}(\eta), \tag{5}\]  
where \(r_{E}\) is the largest root of \(P_{M+1}\):  
\[P_{M+1}=g_{M+1}=0. \tag{6}\]  
Applying these weights to the Ambisonic channels in the decode process attempts to produce a constant value of the energy vector at all locations on the sphere, which improves high-frequency localisation and interaural level difference (ILD) reproduction [3]. However, in practice Max \(\mathbf{r_{E}}\) weighting reduces the overall amplitude of the decode; a trend that becomes more pronounced as the Ambisonic order increases. This reduction in amplitude is not uniform across the frequency spectrum but rather focused on high frequencies (see Figure 2).