# Estimating Interference with a Two-Dimensional Viterbi Algorithm for Bit-Patterned Media Recording
## 2 Estimating Interference with 2D VA  
### GPR Target  
First, had to determine the GPR target of the BPMR channel, \(\mathbf{H}\), to design an appropriate VA detector, which is the main idea of PRML. Figure 1 illustrates the estimation method for the GPR target during the training process.  
Figure 1: Training model for the GPR target and equalizer.  
We followed the procedures mentioned in [23; 24] to estimate coefficients of the target and equalizer matrices, \(\mathbf{G}\) and \(\mathbf{F}\), respectively, which can be written as:  
\[\mathbf{G}=\left[\begin{array}{cccc}g_{-1,-1}&g_{-1,0}&g_{-1,1}\\ g_{0,-1}&g_{0,0}&g_{0,1}\\ g_{1,-1}&g_{1,0}&g_{1,1}\end{array}\right],\text{ and} \tag{1}\]  
\[\mathbf{F}=\left[\begin{array}{cccc}f_{-2,-2}&f_{-2,-1}&f_{-2,0}&f_{-2,1}&f_{ -2,2}\\ f_{-1,-2}&f_{-1,-1}&f_{-1,0}&f_{-1,1}&f_{-1,2}\\ f_{0,-2}&f_{0,-1}&f_{0,0}&f_{0,1}&f_{0,2}\\ f_{1,-2}&f_{1,-1}&f_{1,0}&f_{1,1}&f_{1,2}\\ f_{2,-2}&f_{2,-1}&f_{2,0}&f_{2,1}&f_{2,2}\end{array}\right], \tag{2}\]  
From Equations (1) and (2), the signals \(d[j,k]\) and \(z[j,k]\) can be achieved as:  
\[d[j,k]=\sum_{m=-1}^{1}\sum_{n=-1}^{1}a[j-m,k-n]g_{m,n},\text{ and} \tag{3}\]  
\[z[j,k]=\sum_{m=-2}^{2}\sum_{n=-2}^{2}y[j-m,k-n]f_{m,n}. \tag{4}\]  
We defined the vectors as:  
\[\mathbf{g}=\left[\begin{array}{cccccc}g_{-1,-1}&g_{-1,0}&g_{-1,1}&g_{0,-1}& g_{0,0}&g_{0,1}&g_{1,-1}&g_{1,0}&g_{1,1}\end{array}\right]^{T}, \tag{5}\]  
\[\mathbf{f}=\left[\begin{array}{cccccc}f_{-2,-2}&f_{-2,-1}&f_{-2,0}&f_{-2,1}& \ldots&f_{2,-1}&f_{2,0}&f_{2,1}&f_{2,2}\end{array}\right]^{T}, \tag{6}\]  
\[\mathbf{a}=\left[\begin{array}{cccccc}a[j-1,k-1]&a[j-1,k]&a[j-1,k+1]&\ldots &a[j+1,k-1]&a[j+1,k]&a[j+1,k+1]\end{array}\right]^{T},\text{ and} \tag{7}\]  
\[\mathbf{y}=\left[\begin{array}{cccccc}y[j-2,k-2]&y[j-2,k-1]&y[j-2,k]&\ldots &y[j+2,k]&y[j+2,k+1]&y[j+2,k+2]\end{array}\right]^{T}, \tag{8}\]  
where \({}^{T}\) is transpose operator. Based on Equations (5)-(8), Equations (3) and (4) can be rewritten as:  
\[d[j,k]=\mathbf{g}^{T}\mathbf{a},\text{ and} \tag{9}\]  
\[z[j,k]=\mathbf{f}^{T}\mathbf{y}. \tag{10}\]  
To find the parameters of the GPR target \(\mathbf{G}\) and the equalizer \(\mathbf{F}\), we solved the following optimization problem.  
\[\text{argmin}E\bigg{\{}\Big{(}\mathbf{f}^{T}\mathbf{y}-\mathbf{g}^{T} \mathbf{a}\Big{)}^{2}\bigg{\}}, \tag{11}\]  
\[s.t.\mathbf{E}^{T}\mathbf{g}=\mathbf{c}\]  
where  
\[\mathbf{E}^{T}=\left[\begin{array}{cccccccccc}1&0&0&0&0&0&0&0\\ 0&0&1&0&0&0&0&0&0\\ 0&0&0&0&1&0&0&0&0\\ 0&0&0&0&0&0&1&0&0\\ 0&0&0&0&0&0&0&1\end{array}\right],\text{ and} \tag{12}\]  
\[\mathbf{c}=\left[\begin{array}{cccccc}0&0&1&0&0\end{array}\right]^{T}. \tag{13}\]  
The solutions to Equation (11) are presented as:  
\[\lambda=\bigg{(}\mathbf{E}^{T}\Big{(}\mathbf{A}-\mathbf{T}^{T}\mathbf{R}^{-1 }\mathbf{T}\Big{)}^{-1}\mathbf{E}\bigg{)}^{-1}\mathbf{c}, \tag{14}\]\[\mathbf{g}=\left(\mathbf{A}-\mathbf{T}^{T}\mathbf{R}^{-1}\mathbf{T}\right)^{-1} \mathbf{E}\lambda, \tag{15}\]  
\[g_{-1,-1}=g_{-1,1}=g_{1,-1}=g_{1,1}=g_{0,-1}g_{-1,0}=g_{0,-1}g_{1,0}, \tag{16}\]  
\[\mathbf{f}=\mathbf{R}^{-1}\mathbf{Tg}, \tag{17}\]  
where \(\lambda\) is a vector containing the Lagrange multipliers, \(\mathbf{A}=E[\mathbf{a}\mathbf{a}^{T}]\), \(\mathbf{R}=E[\mathbf{y}\mathbf{y}^{T}]\); and \(\mathbf{T}=E[\mathbf{y}\mathbf{a}^{T}]\). With Equations (14)-(17), the GPR target can be achieved as:  
\[\mathbf{G}=\left[\begin{array}{ccc}t&p&t\\ r&1&r\\ t&p&t\end{array}\right], \tag{18}\]  
where \(r\) and \(p\) are the horizontal and vertical interferences, respectively; and \(t=rp\).