# Modulation Decoding Based on K-Means Algorithm for Bit-Patterned Media Recording
## 2 Channel Model and Detector  
In Figure 1, we show the block diagram of a BPMR system. Before passing through the BPMR channel, the user data \(a_{k}\in[0,\,1]\) is encoded to the 2D array element \(c_{j,k}\in\{-1,\,+1\}\) using a modulation encoder. For BPMR channel modeling, a numerical 2D Gaussian pulse response \(H(z,x)\) can be written as [17; 18]:  
\[H(z,x)=A\cdot exp\left\{-\frac{1}{2c^{2}}\left[\left(\frac{z+\Delta_{TMR}}{PW_{ z}}\right)^{2}+\left(\frac{x}{PW_{x}}\right)^{2}\right]\right\} \tag{1}\]  
where \(A=1\) is the peak amplitude of the pulse response, \(c=1/2.3548\) is the constant that represents the relationship between \(PW_{50}\) and the standard deviation of a Gaussian function, \(z\) and \(x\) are the time indices in cross- and down-track directions, respectively, \(PW_{z}=24.8\) nm and \(PW_{x}=19.4\) nm are the PW50 of the cross- and down-track pulses, and \(\Delta_{TMR}\) is the value of head offset or track-misregistration (TMR), which degrades the system performance due to the misalignment of the read-head from the main track. \(\Delta_{TMR}\) is defined as  
\[\Delta_{TMR}=\left(TMR_{z}\times T_{z}\right)/100 \tag{2}\]  
where \(TMR_{z}\) is the percentage of TMR. The 2D discrete channel obtained by sampling the 2D Gaussian pulse response is given by  
\[h_{m,n}=H(m\cdot T_{z}+\Delta_{TMR},n\cdot T_{x}) \tag{3}\]  
where \(m\) and \(n\) are the indices of bit islands in the cross- and down-track directions, respectively, the track pitch \(T_{z}\) is the spacing of the islands in the cross-track direction, and the bit period \(T_{x}\) is the spacing of the islands in the down-track direction. The readback signal corrupted by electronic noise is given by  
\[r_{j,k}=\sum_{m=-M}^{M}\sum_{n=-N}^{N_{\text{g}}}c_{j-m,k-n}\cdot h_{m,n}+n_{j,\ k} \tag{4}\]  
where \(M\) and \(N\) are the lengths of the interference from neighboring islands in the cross- and down-track directions, respectively, and \(n_{j,k}\) is the electronic noise modeled as additive white Gaussian noise with zero mean and variance \(\sigma^{2}\). In this channel, we set \(M\) and \(N\) to 1. To address the effects of ISI and ITI, a PRML detector composed of a 2D equalizer and 1D detector was used. The 2D equalizer is determined using the minimum mean square error (MMSE) criterion [19; 20]. The equalizer output \(q_{j,k}\) and desired output \(d_{j,k}\) are defined as  
\[q_{j,k}=\sum_{m=-M_{\text{w}}}^{M_{\text{w}}}\sum_{n=-N_{\text{w}}}^{N_{\text{ w}}}w_{m,n}\cdot r_{j-m,k-n}=\mathbf{w}^{\text{T}}\mathbf{r}_{j,k} \tag{5}\]  
\[d_{j,k}=\sum_{n=-N_{\text{g}}}^{N_{\text{g}}}g_{n}\cdot c_{j,k-n}=\mathbf{g}^{ \text{T}}\mathbf{c}_{j,k} \tag{6}\]  
where \(\mathbf{w}^{\text{T}}=\left[w_{-M_{\text{w}}-N_{\text{w}}}\ \ w_{-M_{\text{w}}-N_{\text{w}}+1}\ \ \cdots\ \ w_{0,0}\ \ \cdots\ w_{M_{\text{w}},N_{\text{w}}-1}\ \ w_{M_{\text{w}},N_{\text{w}}}\ \right]\) is the equalizer coefficient, \(\mathbf{r}_{j,k}=\left[r_{j+M_{\text{w}},k+N_{\text{w}}}\ \ r_{j+M_{\text{w}},k+N_{\text{w}}-1}\ \ \cdots\ r_{j,k}\ \ \cdots\ r_{j-M_{\text{w}},k-(N_{\text{w}}-1)}\ \ r_{j-M_{\text{w}},k-N_{\text{w}}}\ \right]\) is the readback signal used as the equalizer input, \(\mathbf{g}^{\text{T}}=\left[g_{-N_{\text{g}}}\ \ \cdots\ \ g_{N_{\text{g}}}\right]\) is the target coefficient, and \(\mathbf{c}_{j,k}=\left[c_{k+N_{\text{g}}}\ \ \cdots\ \ c_{k-N_{\text{g}}}\right]\) is the user data sequence. We set \(M_{\text{w}}=1\) and \(N_{\text{w}}=5\) as the equalizer, and \(N_{\text{g}}=1\) for the partial-response (PR) target. Thus, the mean square error can be expressed as  
\[E\left[e_{j,k}^{2}\right]=\mathbf{w}^{\text{T}}\mathbf{R}\mathbf{w}-2\mathbf{ w}^{\text{T}}\mathbf{g}+\mathbf{g}^{\text{T}}\mathbf{C}\mathbf{g}-2\lambda \left(\mathbf{J}^{\text{T}}\mathbf{g}-1\right) \tag{7}\]  
where \(\mathbf{R}=E\left[\mathbf{r}_{j,k}\mathbf{r}_{j,k}^{\text{T}}\right]\) is the  
rithm (VA) which outputs the hard value or a soft-output Viterbi algorithm (SOVA) which calculates the log-likelihood ratio value [21].