# Modulation Decoding Based on K-Means Algorithm for Bit-Patterned Media Recording
## 4 Simulation and Results  
In this simulation, we use a BPMR channel with read-head and pulse response parameters, as presented in Table 1[15; 16]. For a fair comparison, we should consider the same user density, which equals areal density \(\times\) code rate. When the user density is 2 Tb/in\({}^{2}\), modulation coding with the PRML detector (coded system) should be simulated at an areal  
Figure 2: Codeword list of the 4/6 modulation code. density of 3 Tb/in\({}^{2}\) because the code rate of the modulation code is 4/6. However, the PRML detector (uncoded system) should be simulated at an areal density of 2 Tb/in\({}^{2}\) to the code rate of 1. Areal densities can be achieved by adjusting the bit period \(T_{x}\) and the track pitch \(T_{z}\). Thus, we set \(T_{z}\) and \(T_{x}\) to 18 nm for achieving AD of 2.0 Tb/in\({}^{2}\), and 14.5 nm for achieving AD of 3.0 Tb/in\({}^{2}\), respectively. The channel signal-to-noise ratio (SNR) is defined as 10 log\({}_{10}\)(1/\(\sigma^{2}\)), where \(\sigma^{2}\) is additive white Gaussian noise. The performance of the modulation decoder is compared between hard and soft decisions by using the VA and SOVA, respectively. To utilize the K-means algorithm for the simulation, we use scikit-learn which is a machine learning library written in Python and which provides clustering algorithms as presented in Table 2[26; 27]. Figure 3 illustrates the BER performance of the decoding schemes according to SNR. The performance of the decoders using hard decisions is worse than that of the PRML detector. Since the hard decision detector determines a discrete or hard value (\(-\)1 or 1), where there are only two possible states, decoding loss occurs. Moreover, it is difficult to obtain the BER performance gain of the K-means decoder with hard decisions. However, the performances of the conventional and K-means decoder with soft decisions are 0.2 and 1.8 dB better than that of PRML at BER of 10\({}^{-4}\), and the K-means decoder provides the best results. Figure 4 illustrates the BER performance of the decoding schemes in accordance with TMR at SNR of 14 dB. When the TMR is varied from 0% to 30%, the K-means decoder indicates better BER performance than the PRML detector and the conventional decoder. To verify why the performance of the K-means decoder is better than that of the conventional decoder, we explain the characteristics of the centroid using a scatter plot. Figure 5 displays the scatter plot of the received sequences from SOVA and the centroids at a SNR of 6 and 14 dB. Since it is difficult to visualize a dataset in a high-dimensional space, a dimensionality-reduction technique is needed to understand how the data are organized. Thus, to represent data visualization for the modulation code, we should reduce the dimensionality of the codeword from six to two dimensions. For dimensionality reduction, we use t-distributed stochastic neighbor embedding (t-SNE) [28]. t-SNE is a dimensionality-reduction technique that visualizes clusters of datasets in a high-dimensional space. It is useful to make similar datasets closer and dissimilar datasets further apart from each other. In Figure 5, there are 16 red points representing the centroids found by K-means and 16 clusters displayed as a collection of points because the number of codewords is 16. In Figure 5a, the points for each cluster are scattered due to noise or low SNR. However, as the \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & \\ \hline Square island with length & 11 nm \\ Square island with thickness & 10 nm \\ Read-head element thickness & 4 nm \\ Read-head element width & 15 nm \\ Read-head gap distance & 6 nm \\ Read-head fixed fly height & 10 nm \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Read-head and pulse response parameters.