# Fault Diagnosis Method for Rolling Bearings Based on Two-Channel CNN under Unbalanced Datasets
## 4 Experimental Analysis
### Fault Diagnosis Results under a Balanced Dataset  
In addition, 200 samples are randomly constructed for each class, and a sample set containing 2000 samples is constructed. Visualize the hierarchical feature learning process of TC-CNN using the t-distributed Stochastic Neighbor Embedding (t-SNE) method [41]. The learned features of the original input signal, fully connected layers \(FC_{1},FC_{2}\), and \(FC_{1}^{*}\) of the test dataset are mapped to two-dimensional features using t-SNE, respectively. The mapped features of different layers are shown in Figures 6-9. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Layer Name** & **Parameter** & **Layer Size** \\ \hline \(I_{1,1}\) & - & \(1\times 513\times 1\) \\ \(I_{2,1}\) & - & \(64\times 64\times 3\) \\ \(C_{1,1}\) & Conv(\(1\times 6\)), kernel size = 6 & \(1\times 508\times 6\) \\ \(C_{2,1}\) & Conv (\(3\times 6\)), kernel size = 5 & \(60\times 60\times 6\) \\ \(P_{1,1}\) & kernel size = 4 & \(1\times 127\times 6\) \\ \(P_{2,1}\) & kernel size = 2 & \(30\times 30\times 6\) \\ \(C_{1,2}\) & Conv (\(6\times 16\)), kernel size = 5 & \(1\times 123\times 16\) \\ \(C_{2,2}\) & Conv (\(6\times 16\)), kernel size = 5 & \(26\times 26\times 16\) \\ \(P_{1,2}\) & kernel size = 3 & \(1\times 41\times 16\) \\ \(P_{2,2}\) & kernel size = 2 & \(13\times 13\times 16\) \\ \(FC_{1}\) & - & 656 \\ \(FC_{2}\) & - & 2704 \\ \(C^{*}\) & - & 3360 \\ \(D\) & - & 3360 \\ \(FC_{1}^{*}\) & \(3360\times 84\) & 84 \\ \(FC_{2}^{*}\) & SVM & 10 \\ \(O\) & - & \(1\times 10\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Parameters of the TC-CNN. Figure 6: Feature visualization of input data. Figure 8: Feature visualization of fully connected layer \(FC_{2}\). Figure 7: Feature visualization of fully connected layer \(FC_{1}\). Figure 9: Feature visualization of fully connected layer \(FC_{1}^{*}\). Figures 6-9 show the feature map changes for different classes during the model learning process. As shown in Figure 6, the original data features for all classes are relatively scattered and difficult to distinguish. Figures 7 and 8 show the learned features of the fully connected layers \(FC_{1}\) and \(FC_{2}\), respectively. Compared with the original input data, it can be seen that, after the convolution and pooling operations, the samples are gradually clustered. Furthermore, the clustering of features in the fully connected layer \(FC_{2}\) is better than that in \(FC_{1}\). Finally, in Figure 9, features of the same class are very concentrated. The distance between the feature distributions in \(FC_{1}^{*}\) is the largest compared to the feature mapping results in \(FC_{1}\) and \(FC_{2}\). The classifier easily performs the classification of the dataset, illustrating the excellent classification results. The proposed methods in this paper are compared with 1D-CNN, 2D-CNN [22], CWT+2D-CNN [38], DBN [42], and 1D-CNN+2D-CNN. (1) 1D-CNN consists of an input layer, two 1D convolutional layers, two pooling layers, a fully connected layer, a softmax classifier, and an output layer. The kernel sizes of input and output channels of the convolutional and pooling layers are set as 5, 6, 3, and 6, respectively. The rest of the structural parameters are the same as the 1D-CNN in the proposed model. (2) Since the dimension of the original signal data are 1024, the original signal data are transformed into a 32 \(\times\) 32 dimensional matrix as the input of 2D-CNN. The classifier is softmax. The rest of the structural parameters are the same as the 2D-CNN in the proposed model. (3) CWT+2D-CNN uses CWT to extract the time-frequency features, and the Morlet cmor3-3 wavelet basis function is selected. The CWT time-frequency image is used as the input of the 2D-CNN, and the classifier is softmax. The rest of the structural parameters are the same as the 2D-CNN in the proposed model. (4) The DBN contains an input layer, two hidden layers, and one output layer, and the network structure is [1024, 50, 20, 10]. The learning rate is 0.05, a mini-batch size is 8, and the number of iterations is 500.