# RUL Prediction of Rolling Bearings Based on a DCAE and CNN
## 4 Prediction of the RUL Based on 1D-CNN
Therefore, this paper selected the extracted HI as labels to add to the original data and input them into the RUL model for training. The structure of the convolutional neural network established in this paper is shown in Figure 13. The convolution layer was expressed as Conv_layer (number of convolution kernels, kernel size, padding and stride), and the maximum pooling layer was expressed as MaxPool1d (kernel size and stride). During training, the optimizer chose RMSProp, where the learning rate was 0.001, the batch size was 32, and the maximum iterations was 100. In order to prevent overfitting, the early-stopping mechanism was introduced in the subsequent training process. The original vibration data in the dataset were selected again for life prediction. The HI value was constructed with a single sample length of 2560. In order to maintain the consistency of the data in the RUL prediction model with the added labels, the sample length was also set at 2560. After segmented processing, the original samples were added with labels and directly input into the model for training. The training set and testing set were divided by an alternate method; that is, one numbered bearing of the seven bearings was selected as the test set, and the other six bearings were selected as the training set, again, taking Bearing1_3 as an example. Therefore, the data of Bearing1_3 were used as the testing set, and the life prediction effect of the model is shown in Figure 14. The model could accurately predict the residual life of Bearing1_3. Figure 12: Two function curves describing the labeling method: (**a**) linear function; (**b**) piecewise function. In order to verify the advantages of this method, two common ways of adding labels were selected for comparison. In [41], the method of adding labels in Figure 12a was  
Figure 14: Life prediction results of Bearing1_3. Figure 13: The structure of the 1D-CNN. selected, named Method2. The method of adding labels in [39] is shown in Figure 12b, named Method3. The method in this paper is named HI-Method. After the same data were segmented, labels were added in three diverse ways. All three kinds of data were input into the 1D-CNN model, and the three models were trained. The recognition effect of the seven bearings of the three models under working condition 1 is shown in Figure 15.  
Figure 15: _Cont._  
As can be seen from Figure 15, the second half of the training results of Method3 had a large gap with its own label but was closer to the label value of HI-Method. The features extracted from the original vibration signals by the model were more in line with the trend of adding labels with HI-Method. On the whole, the predicted value of Method3 fluctuated more violently in comparison with HI-Method, and in most cases, the predicted value was more unstable after the selected obvious degradation point. In the life prediction of several bearings, the predicted value of Method2 produced a large oscillation near the real value, demonstrating that the way of adding labels to linear functions was not consistent with the actual situation, resulting in the data with the same status being added with greatly different label values. In order to quantitatively analyze and evaluate the prediction results to ensure the validity of the prediction results, this paper selected the mean absolute error (MAE), root mean squared error (RMSE) and the score given in the PHM2012 dataset, and these three evaluation indicators are defined as follows.