# Fault Diagnosis of Wind Turbine Planetary Gear Based on a Digital Twin
## 3 Fault Diagnosis Method Based on Digital Twinning
### Establishment of Fault Diagnosis Model
#### 3.1.2 Atom Search Optimization-Support Vector Machine Algorithm  
An SVM is a supervised learning model with relatively high classification accuracy and few samples. Support vector machines have been widely used in practical engineering [29]. The basic principle of an SVM is to find an optimal classification hyperplane to classify samples, as shown in Equation (4); the objective function is provided in Equation (5), and the classification model is given in Equation (6). \[\omega^{T}x+b=0, \tag{4}\]  
\[s.t. \begin{cases}\min\frac{1}{2}\lVert\omega\rVert^{2}+c\sum\limits_{i=1}^{n} \xi_{i}\\ y_{i}\left[\omega^{t}\theta(x_{i})+b\right]\geq 1-\xi_{i},\\ i=1,2,\ldots,n\end{cases}  \tag{5}\]  
\[g(x)=\sum\limits_{i=1}^{n}\alpha_{i}y_{i}K(x_{i},x)+b, \tag{6}\]  
Figure 8: Top 6 IMF components. where \(\omega\) is the weight vector; \(x\) is the sample feature; \(b\) is the offset item; \(\xi_{i}\) is the relaxation factor; and \(c\) is the penalty factor. It can be seen from the formula that the value of \(c\) will affect the model's generalization ability. If the value of \(c\) is too large, the training time will be long, and over-fitting will occur. If the value of \(c\) is too small, underfitting will occur. \(K(x_{i},x)\) is the kernel function, where \(g\) is the radius of the kernel function, and the value of \(g\) will directly affect the training speed and prediction speed of the model. Therefore, optimizing penalty factor \(c\) and kernel radius \(g\) can build a better SVM model. In the present study, an SVM was combined with an ASO algorithm to improve the classification accuracy and optimize the penalty factor \(c\) and kernel radius \(g\) of the SVM. Proposed in 2018 [30], ASO has become a popular optimization algorithm based on molecular dynamics. The algorithm is based on [PERSON]'s second law. It simulates the motion of atoms in a molecular system, i.e., the force between atoms and the binding force of the system leading to displacement. The atom's mass influences its attraction and repulsion in the molecular system [31], namely:  
\[a_{i}=\frac{F_{i}+G_{i}}{m_{i}}, \tag{7}\]  
where \(F_{i}\) is the interaction force acting on atom \(i\); \(G_{i}\) is the covalent bond between atoms \(i\); and \(m_{i}\) is the mass of atom \(i\). 1. Interaction force \(F_{i}^{d}\)  
The interaction force \(F_{i}^{d}\) represents the sum of the forces of the surrounding atoms on the current atom \(i\); it is defined as follows:  
\[F_{i}^{d}(t)=\sum_{j\in K_{best}}rand_{j}F_{ij}^{d}(t), \tag{8}\]  
where \(t\) is the number of current iterations; \(rand_{j}\) is the random number in the range of [0, 1]; \(d\) is the dimension of the atom; \(K_{best}\) represents a set of atoms with high fitness function values; and \(F_{ij}^{d}(t)\) represents the Lennard-Jones potential force on the atom \(i\) of the \(j\) iteration. \[F_{ij}^{d}(t)=-\eta(t)\Big{\{}2\big{[}h_{ij}(t)\big{]}^{13}-\big{[}h_{ij}(t) \big{]}^{7}\Big{\}}, \tag{9}\]  
where \(\eta(t)\) is the depth function used to adjust the repulsive and attractive regions; and \(h_{ij}\) is the distance between the two atoms. \[\eta(t)=-\alpha\bigg{(}1-\frac{t-1}{T}\bigg{)}^{3}e^{-\frac{2\alpha}{2}} \tag{10}\]  
\[h_{ij}=\frac{r_{ij}(t)}{\sigma(t)}, \tag{11}\]  
where \(\alpha\) is the depth weight; \(\sigma\) is the length, representing the collision diameter; and \(r_{ij}\) is the Euclidean distance between atoms. (2) Covalent bond force \(G_{i}^{d}\)  
The covalent bond force \(G_{i}^{d}\) represents the force of attraction between atoms; it is defined as follows:  
\[G_{i}^{d}=\beta e^{\frac{-20t}{T}}\Big{(}x_{best}^{d}(t)-x_{i}^{d}(t)\Big{)}, \tag{15}\]  
where \(\beta\) is the coefficient; \(x_{best}^{d}(t)\) is the optimal position of the atoms in the \(t\) iteration; and \(x_{i}^{d}(t)\) is the position of atom \(i\) in the first iteration. (3) Atomic acceleration \(a_{i}^{d}\)  
The equation for solving the acceleration of atom \(i\) in time \(t\) in dimension \(d\) is as follows:  
\[