# Time Domain Spherical Harmonic Processing with Open Spherical Microphones Recording
## 3 Filter Design for Obtaining Time Domain Spherical Coefficients
### Modified Inverse Filter  
Now that the design for \(\hat{z}_{n}(\
u)\) is established, our next step is to design filters \(\rho_{n}(\
u,R_{Q})\) which satisfies  
\[p_{n}(\
u,R_{Q})*\rho_{n}(\
u,R_{Q})=\hat{z}_{n}(\
u). \tag{20}\]  
We notice in (20) that \(p_{n}(\
u,R_{Q})\) is a finite length vector and we would like \(\rho_{n}(\
u,R_{Q})\) also to be a finite length vector. However, \(\hat{z}_{n}(\
u)\) is infinitely long with a series of sinc functions. If we perform linear convolution of \(p_{n}(\
u,R_{Q})\) with \(\rho_{n}(\
u,R_{Q})\), we would obtain a vector with the length of \(2(L+L_{p})+1\) samples, where \(2L+1\) is the filter length of \(\rho_{n}\), such that \(\rho_{n}(\
u,R_{Q})\) has none-zero values for \(-L\leq\
u\leq L\). Thus, we need to truncate the infinite length \(\hat{z}_{n}(\
u)\) to \(2(L+L_{p})+1\) samples for every order of \(n\) where  
\[z_{n}(\
u)\triangleq\left\{\begin{array}{cc}\hat{z}_{n}(\
u)&-(L+L_{p}) \leq\
u\leq L+L_{p}\\ 0&\text{otherwise}\end{array}\right.. \tag{21}\]  
We can then write (20) in a finite summation form as  
\[\begin{split} z_{n}(\
u)&=p_{n}(\
u,R_{Q})*\rho_{n}(\
u,R_{Q}) \\ &=\sum_{\mu=-L}^{L}p_{n}(\
u-\mu,R_{Q})\rho_{n}(\mu,R_{Q}).\end{split} \tag{22}\]  
\begin{table}
\begin{tabular}{l l l l l} \hline
**n (Order)** & \(\mathbf{w}^{(n)}_{1}\) & \(\mathbf{w}^{(n)}_{2}\) & \(\mathbf{w}^{(n)}_{3}\) & \(\mathbf{w}^{(n)}_{4}\) \\ \hline
0 & 0.0009 & 0.1369 & 0.1439 & 0.2680 \\
1 & 0.0033 & 0.1957 & 0.2059 & 0.2680 \\
2 & 0.0276 & 0.2509 & 0.3643 & 0.2680 \\
3 & 0.0640 & 0.2680 & - & - \\ \hline \end{tabular}
\end{table}
Table 1: The first four order of \(w^{(n)}\) to derive \(\hat{z}_{n}(\
u)\) with \(f_{\max}\approx 2047\) Hz, \(\epsilon=1/40\), \(R_{Q}=0.16\) m and \(c=343\) m/s.  
We rewrite (22) into matrix form  
\[\mathbf{z}_{n}=\mathbf{P}_{n}\mathbf{\rho}_{n}, \tag{23}\]  
where \(\mathbf{z}_{n}=[z_{n}(-(L+L_{p})),z_{n}(-(L+L_{p})+1),\cdots,z_{n}((L+L_{p}))]^{T}\), \(\mathbf{\rho}_{n}=[\rho_{n}(-L,R_{Q}),\)\(\rho_{n}(-L+1,R_{Q}),\cdots,\rho_{n}(L,R_{Q})]^{T}\), and \(\mathbf{P}_{n}\) is the convolution matrix based on the Toeplitz structure of \(p_{n}(\
u,R_{Q})\), given in (24).  
\[\mathbf{P}_{n}=\] \[\begin{bmatrix}p_{n}(-L_{p},R_{Q})&0&\cdots&\cdots&\cdots&\cdots&0\\ p_{n}(-L_{p}+1,R_{Q})&p_{n}(-L_{p},R_{Q})&0&\cdots&\cdots&\cdots&0\\ \vdots&&&&\ddots&&&\vdots\\ p_{n}(L_{p},R_{Q})&\cdots&p_{n}(-L_{p},R_{Q})&0&\cdots&\cdots&0\\ 0&p_{n}(L_{p},R_{Q})&\cdots&p_{n}(-L_{p},R_{Q})&0&\cdots&0\\ \vdots&&&&\ddots&&&\vdots\\ 0&\cdots&0&p_{n}(L_{p},R_{Q})&\cdots&p_{n}(-L_{p}+1,R_{Q})&p_{n}(-L_{p},R_{Q}) \\ 0&\cdots&\cdots&0&p_{n}(L_{p},R_{Q})&\cdots&p_{n}(-L_{p}+1,R_{Q})\\ \vdots&&&&\ddots&&&\vdots\\ 0&\cdots&\cdots&\cdots&0&p_{n}(L_{p},R_{Q})&p_{n}(L_{p}-1,R_{Q})\\ 0&\cdots&\cdots&\cdots&\cdots&0&p_{n}(L_{p},R_{Q})\end{bmatrix}. \tag{24}\]  
The size of matrix \(\mathbf{P}_{n}\) is \([2(L+L_{p})+1,2L+1]\), where we choose the filter length \(2L+1\) of \(\rho_{n}(\
u,R_{Q})\) to be significantly larger than both \(2L_{p}+1\) and the main lobe width of function \(z_{n}(\
u)\), to avoid \(\mathbf{P}_{n}\) being ill-conditioned and minimize the error of truncating \(z_{n}(\
u)\) into a finite length signal. The influence of choosing \(L\) will be detailed in Section 4.2.  
Since (23) is an over-determined system of equations, we apply LMS method to (23) to obtain  
\[\mathbf{\rho}_{n}=\mathbf{P}_{n}^{\perp}\mathbf{z}_{n}, \tag{25}\]  
where \(\mathbf{P}_{n}^{\perp}\) refers to the Moore-Penrose inverse of \(\mathbf{P}_{n}\). As a result, with (16) and (25), \(a_{nm}(\
u)\) can be estimated by  
\[\begin{split} a_{nm}(\
u)&\approx b_{nm}(\
u,R_{Q})* \rho_{n}(\
u,R_{Q})\\ &=\big{(}\sum_{q=1}^{Q}S(\mathbf{x}_{q},t)Y_{nm}(\theta_{q},\phi_{q}) \big{)}*\rho_{n}(\
u,R_{Q}).\end{split} \tag{26}\]  
In this way we obtain \(a_{nm}(\
u)\) while overcoming the challenges listed in Section 2.