# Fast Gaussian Filter Approximations Comparison on SIMD Computing Platforms
## 4 Approximations
### IIR Approximations
#### 4.2.2 Vliet-Young-Verbeek Form  
Another IIR filter was proposed in 1998 by [PERSON], [PERSON], and [PERSON] [17] and will be abbreviated in the paper as the VYV filter. While [PERSON]'s filter consists of the sum of the causal and anti-causal parts, the VYV filter is the product  
\[ \begin{split} H(z)=H^{+}(z)\cdot H^{-}(z),\\ H^{+}(z)=\prod_{i=1}^{p}\frac{d_{i}-1}{d_{i}-z^{-1}},\quad H^{-}( z)=(-1)^{p}\prod_{i=1}^{p}\frac{d_{i}-1}{z-d_{i}},\end{split}  \tag{47}\]  
where \(p\) is the order of the filter, \(d_{i}\in\mathbb{C}\) are the poles of \(H(z)\). For \(p=3\), the causal and anti-causal systems take the following form:  
\[H^{+}(z)=\frac{\alpha}{1+b_{1}\,z^{-1}+b_{2}\,z^{-2}+b_{3}\,z^{-3}},\quad H^{- }(z)=\frac{\alpha}{1+b_{1}\,z+b_{2}\,z^{2}+b_{3}\,z^{3}} \tag{48}\]  
with \(\alpha,\,b_{i}\in\mathbb{R}\), so the expressions for the third-order filter are as follows:  
\[ \begin{split} y^{+}[k]=\alpha\,x[k]-b_{1}\,y^{+}[k-1]-b_{2}\,y^{ +}[k-2]-b_{3}\,y^{+}[k-3],\\ y^{-}[k]=\alpha\,y^{+}[k]-b_{1}\,y^{-}[k+1]-b_{2}\,y^{-}[k+2]-b_{3} \,y^{-}[k+3].\end{split}  \tag{49}\]  
To implement the composite system \(H(z)\), the authors applied the causal filter to an input sequence \(x[k]\) to obtain an intermediate output sequence \(y^{+}[k]\). Then, they applied the anti-causal filter to that sequence to obtain a final output \(y[k]\). The same as [PERSON]'s method, coefficients \(b_{1},b_{2},b_{3}\) depend only on the locations of filter poles \(d_{1},d_{2}\in\mathbb{C}\), and \(d_{3}\in\mathbb{R}\), and these coefficients are the same for both the causal part \(H^{+}\) and the anti-causal part \(H^{-}\). They can be derived by minimizing the root mean square error  
\[L^{2}=\sqrt{\frac{1}{2\pi}\int_{-\pi}^{\pi}\big{(}H(\omega;\sigma_{0})-G( \omega;\sigma_{0})\big{)}^{2}\mathrm{d}\omega}=\sqrt{\sum_{n=-\infty}^{+ \infty}(g_{\sigma}[n]-h[n])^{2}}. \tag{50}\]  
The authors obtained the following poles for \(\sigma_{0}=2\):  
\[d_{1}=1.41656+1.00832\,i,\ \ d_{2}=\overline{d_{1}},\ \ d_{3}=1.86548065, \tag{51}\]  
and filter coefficients are related to poles \(d_{1},d_{2},d_{3}\) as  
\[ \begin{split}& b=\frac{1}{d_{1}\,d_{2}\,d_{3}},\\ & b_{1}=-b(d_{1}\,d_{2}+d_{1}\,d_{3}+d_{2}\,d_{3}),\ \ b_{2}=b(d_{1}+d_{2}+d_{3}),\ \ b_{3}=-b,\\ &\alpha=1+b_{1}+b_{2}+b_{3}.\end{split}  \tag{52}\]  
Note that value of error (50) for the third-order VYV filter was provided in the original paper, and our result agreed with it to a margin of error. Finally, the authors scaled poles to obtain Gaussian filters for other \(\sigma\) using  
\[d_{i}\to d_{i}^{\frac{1}{d_{i}}},\quad\sigma^{2}=\sum_{i=1}^{p}\frac{2\,d_{i}^ {\frac{1}{d_{i}}}}{\big{(}d_{i}^{\frac{1}{d_{i}}}-1\big{)}^{2}} \tag{53}\]and determining the relationship between \(q\) and \(\sigma\). For the third-order filter, examining a set of \((q,\sigma^{2})\) pairs, we approximated this relation by the least squares method as in [31] but with the second-order polynomial as in [32]  
\[\sigma^{2}=1.06042809\,q^{2}+4.62413131\,q+4.56081613. \tag{54}\]  
In this paper, in addition to the third-order filter, we also include the second-order VYV-style filter in comparison. It performs as follows:  
\[ \begin{split}& y^{+}[k]=\alpha\,x[k]-b_{1}\,y^{+}[k-1]-b_{2}\,y^{+}[k -2],\\ & y^{-}[k]=\alpha\,y^{+}[k]-b_{1}\,y^{-}[k+1]-b_{2}\,y^{-}[k+2]. \end{split}  \tag{55}\]  
Minimizing (50) for \(\sigma_{0}=2\), we obtained the pair of complex-conjugate poles  
\[d_{1}=1.69593+0.5996\,i,\,\,\,d_{2}=\overline{d_{1}}. \tag{56}\]  
The filter coefficients are  
\[ \begin{split}& b=\frac{1}{d_{1}\,d_{2}},\\ & b_{1}=-b(d_{1}+d_{2}),\,\,\,b_{2}=b,\\ &\alpha=1+b_{1}+b_{2},\end{split}  \tag{57}\]  
and, according to (53), we scaled them to \(\frac{1}{q}\) power with \(q\) computed from  
\[\sigma^{2}=1.02158395\,q^{2}+4.44944206\,q+4.53954235. \tag{58}\]  
An example of the approximation with the second-order and the third-order VYV filters is provided in Figure 6.  
Applying the VYV filter is computationally less expensive than [PERSON]'s one.