# Research on Fault Diagnosis Algorithm of Ship Electric Propulsion Motor
## 4 Experiments and Results
### Ablation Experiments  
#### 4.2.1 The Effectiveness of the VMD Algorithm Based on GWO Optimization  
This paper proposes a VMD decomposition method based on GWO optimization to remove noise in the signal. By comparing the results of inter-turn short circuit fault diagnosis using the improved VMD decomposition method with those using the traditional VMD decomposition method, the effectiveness of the improved algorithm is verified. It should be noted that the feature extraction part adopts the unimproved multi-scale feature extraction method, and the fault diagnosis part adopts the unimproved Bi-LSTM neural network model.  
Since no failure occurs in the first 0.5 s of the dataset, it was deleted. Then, 300 sets of data are collected for each of the five faults, with 2000 data in each group. The sample data of the training dataset and the test dataset are obtained by dividing each fault sample by a ratio of 5:1. For the VMD decomposition method based on GWO optimization, the initial population of the GWO algorithm is set to 20, and the maximum number of iterations is 10. The decomposition number and punishment factors are selected in the ranges of [2; 12] and [1000, 3000]. Finally, the optimized IMF decomposition number \(K=6\), and the punishment factor \(\alpha=1564\).  
Figure 8: (**a**) The waveform of the stator current signal. (**b**) The stator current. (**c**) The simulation of the stator current with a short-circuit turn ratio of 0.2.  
The training set is tested by the trained model, and then the results are compared with the original results. Finally, the ratio of the predicted correct value to the total number is calculated to obtain the correct rate of the training set, as shown in Figure 9. Figure 9a presents the result of using the unimproved VMD decomposition method, and Figure 9b presents the result of using the improved VMD decomposition method. It can be seen from the figure, the accuracy of the model before VMD improvement becomes stable after 1200 iterations, and the accuracy of the model after VMD improvement becomes stable after 1000 iterations.  
Figure 10 shows the confusion matrix of the fault classification model on the test set in the experiment. Figure 10a presents the confusion matrix of using the unimproved VMD decomposition method, and Figure 10b presents the confusion matrix of using the improved VMD decomposition method. It can be seen from Figure 10 that for fault category 2, both the unimproved and improved models can make a correct diagnosis. For fault category 1, both the unimproved and the improved VMD make three diagnostic errors. For fault category 3, both the unimproved and improved VMD make one diagnostic error. For fault category 4, the unimproved VMD makes four diagnostic errors, while the improved VMD makes three diagnostic errors. For fault category 5, the unimproved VMD makes nine diagnostic errors, while when the improved VMD makes six diagnostic errors. The final fault identification accuracy of the two methods is 93.2% and 94.8% respectively.  
Figure 10: The confusion matrix. (**a**) The confusion matrix in the training process by the unimproved VMD. (**b**) The confusion matrix in the training process by the improved VMD.  
Figure 9: The accuracy in the training process. (**a**) The accuracy in the training process by unimproved VMD. (**b**) The accuracy in the training process by improved VMD.  
The t-SNE method is used to obtain the 2D scatter plot, which can demonstrate the fault classification effect more intuitively, as shown in Figure 11. Figure 11 presents the 2D scatter plot using the unimproved VMD decomposition method, and Figure 11 presents the 2D scatter plot using the improved VMD decomposition method. The results in Figure 11 indicate that the distance between and within the VMD classes before and after the improvement is not very different, and the effect is not good.