*4.2. Experimental Results*

Firstly, we verified the Cos-LSTM with the energy sequence features. We chose a test sample for explanation of the fault diagnosis process of our proposed method. The pattern number of this sample is 3 (chafing tooth), and the input speed and load of this sample are set to 480 rpm and zero respectively. The raw vibration signals and energy distribution map is shown in Figure 7. Figure 7a,c presents the raw signals *sv*<sup>1</sup> (*t*), *sv*<sup>2</sup> (*t*) of this sample collected on the gearbox and Figure 7b,d presents their energy distribution maps of the third layer WPD *Pv*<sup>1</sup> and *Pv*2. Putting the energy sequences feature of this sample into the Cos-LSTM, we got the probability of each fault pattern for the sample. The probability of the no. 3 fault pattern is 99.97% and the other 10 faults have a probability of 0.03%. The result shows that our proposed method considers that there is a fault numbered 3 (chafing tooth) in the gearbox. The result is correct for this test sample, so the method we proposed is effective.

**Figure 7.** The raw vibration signals and energy distribution map.

From Table 2, it can be seen that three different input speeds and loads are set for all 11 fault patterns. Therefore, we have a total of 99 different tests, and each test is repeated five times. In each test, the signals are collected with 10 durations, and every duration covers 1 s. Therefore, we can get 9900 vibration signals. In order to train the model, we randomly choose 2200 samples as the training dataset. With the trained model, another 550 randomly chosen samples are used to test the effectiveness of the model. The effectiveness is measured by the accuracy rate. In this experiment, the accuracy rate is the number of correctly diagnosed samples divided by all the test samples, and the precision is the ratio of the number of samples correctly diagnosed with a fault pattern to the total number of samples diagnosed with such a fault pattern. The accuracy rate of the model is 98.55% in 550 samples. The accuracy rates and precision of our proposed model for the 11 fault patterns are shown in Figures 8 and 9 respectively.

**Figure 8.** The accuracy rates for the 11 fault patterns.

**Figure 9.** The precision for the 11 fault patterns.

### *4.3. Comparison Analysis*

In this paper, the energy sequence features were used to verify the superiority of the Cos-LSTM by comparing with the traditional LSTM based on softmax loss and classic fault diagnosis methods, such as SVM, K-nearest neighbor (KNN) and backpropagation (BP) neural networks. In order to better evaluate the accuracy of the Cos-LSTM, we also used wavelet energy entropy feature for the fault diagnosis test. Table 3 shows the comparison results. Meanwhile, the different energy sequence features were extracted by changing the parameters of WPD such as wavelet basis function and data segment size, for evaluating the accuracy of the Cos-LSTM, and the results are displayed in Table 4.


**Table 3.** Comparisons with other classic fault diagnosis methods.

**Table 4.** Comparisons with different parameter of WPD.


According to Tables 3 and 4, the Cos-LSTM has the highest accuracy rate (98.55%) compared to other methods in the experimental results on the energy sequence features. After comparison and analysis, it can be found that: (1) comparison with traditional LSTM shows that the classification ability of cosine loss is better than that of softmax loss; (2) the accuracy rate of the LSTM neural network is better than KNN, SVM and BP neural networks, which indicates that the LSTM neural network has better feature-learning ability compared to classic fault diagnosis methods; (3) the evaluation results of Cos-LSTM using wavelet energy entropy are close to those using energy sequence features; (4) the accuracy rate of the Cos-LSTM is influenced by the energy sequence features extracted with different parameters of WPD, and the result shows that the energy sequence features extracted based on the wavelet basis function of Daubechies 3 (db3) and segment size 4 have better diagnostic accuracy rates; and (5) combined with the experimental results of energy sequence features and wavelet energy entropy, Cos-LSTM is able to diagnose the faults of the gearbox effectively.

### **5. Conclusions**

This paper presented a fault diagnosis method for WT gearboxes based on the optimized LSTM network with cosine loss. The energy sequence features and the wavelet energy entropy were used to evaluate the Cos-LSTM network. The effectiveness of the Cos-LSTM was verified by a fault diagnosis experiment on a gearbox. The classification results show that the performance of the Cos-LSTM is better than that of the traditional LSTM and classic fault diagnosis techniques. Thus, the proposed method has superior performance in fault diagnosis. In the future, new studies will be conducted on feature learning directly from raw vibration signals using LSTM neural networks.

**Author Contributions:** Data curation, C.L.; Methodology, A.Y. and Z.Z.; Project administration, A.Y.; Resources, R.-V.S.; Supervision, A.Y.; Writing—original draft, Y.Y.; Writing—review & editing, Y.Y. and Z.Z. All authors have read and agreed to the published version of the manuscript.

**Funding:** This work was supported by the Key Science and Technology Research Project of Chongqing under grant cstc2018jszx-cyztzxX0032.

**Conflicts of Interest:** The authors declare no conflict of interest.

## **References**


© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
