# Fault Diagnosis of HV Cable Metal Sheath Grounding System Based on LSTM
## 5 Fault Diagnosis  
In recent years, with the wide application of data mining technology, data classification algorithms have emerged and gradually optimized, among which the traditional machine learning classification algorithms are Decision tree (DT), Naive bayes classification (NBC), Support vector machines (SVM), Discriminant analysis (DA), K-nearest neighbor (KNN), etc. [20; 21; 22]. These algorithms are mostly applicable to the processing of samples with small data volume. For samples with large amounts of data, deep learning can better mine the potential features of the data. In this paper, an LSTM neural network is chosen, which is improved based on Recurrent neural networks (RNN) and is widely used for time series \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Fault Number** & \(\mathbf{a_{1}}\) & \(\mathbf{a_{2}}\) & \(\ldots\) & \(\mathbf{b_{7}}\) \\ \hline
0 & 1.238 & 1.104 & \(\ldots\) & \(-\)0.02 \\
0 & 1.245 & 1.130 & \(\ldots\) & \(-\)0.02 \\ \(\ldots\) & \(\ldots\) & & \\
1 & 25.481 & 19.564 & \(\ldots\) & \(-\)0.03 \\
1 & 25.925 & 20.493 & \(\ldots\) & \(-\)0.03 \\ \(\ldots\) & \(\ldots\) & & \\
17 & 0.754 & 0.877 & \(\ldots\) & \(-\)2.39 \\
17 & 0.815 & 0.876 & \(\ldots\) & \(-\)2.39 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: HV cable grounding system fault database. Figure 10: Schematic diagram of horizontal laying of three-phase cable. \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Value** \\ \hline The outside diameter of cable core/mm & 34 \\ The outside diameter of insulation layer/mm & 68.8 \\ The inner diameter of metal sheath/mm & 78.8 \\ The outside diameter of metal sheath/mm & 98.8 \\ Sheath temperature coefficient) & 4.03 \\ The relative dielectric constant of main insulation & 2.3 \\ Metal sheath resistivity coefficient/(m\(\Omega\cdot\)m\({}^{-1}\)) & 28.4 \\ Cable core resistivity coefficient/(n\(\Omega\cdot\)m\({}^{-1}\)) & 16.8 \\ Length of a minor section of cable/m & 500 \\ Grounding resistance/\(\Omega\) & 1 \\ System frequency/Hz & 50 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Structural parameters of the cable. of samples due to its characteristics and is important for applications such as electricity load forecast, bearing Fault Diagnosis, and power quality classification [23, 24, 25]. The LSTM algorithm has an advantage over other algorithms in handling sequential data and can solve the gradient disappearance or explosion problem of other algorithms, which can be extended to the application of intelligent diagnosis of faults in HV cable grounding systems in conjunction with practical situations. The flow chart of cable grounding system fault diagnosis based on LSTM in this paper is shown in Figure 11.  
The fault diagnosis process of cable grounding systems based on LSTM is divided into the following stages:  
1. Data acquisition stage. This paper establishes an HV cable grounding system model through PSCAD software simulation and acquires the amplitude and phase angle signals of the first and last sheath currents of the cable for one cycle (system frequency is 50 Hz, acquisition frequency is 1000 Hz) under 17 fault operation states and normal operation states. 2. Data pre-processing stage. The fault database with 14 feature vectors according to Equations (25) and (26) is normalized. The processed database is divided into test and training sets by 4:1 according to the cross-validation method. 3. Model training stage. The model diagnosis framework based on LSTM is shown in Figure 12. The model of the LSTM is divided into the input layer, the LSTM layer, the fully connected layer, the softmax layer, and the output layer. The three gate structures, the forgetting gate, the input gate, and the output gate, form the basic unit  
Figure 11: Flow chart of cable grounding system fault diagnosis based on LSTM. of the LSTM and the structure is shown in Figure 13. The LSTM model is trained using the training set, and when the model training accuracy reaches 99%, the model is saved. The relevant calculation is shown in Equation (27).