# Anomaly Identification of Wind Turbine Yaw System Based on Two-Stage Attention-Informer Algorithm
## 3 Yaw Position Anomaly Recognition Model
### Model TSA-Informer  
The Informer model is a deep-learning architecture designed for time series prediction [27]. It was proposed by [PERSON] et al., Beijing University of Aeronautics and Astronautics in 2021, aiming to address the limitations of Transformer-based deep-learning models in long-sequence time prediction tasks. In the analysis of time series data, capturing long-term dependencies is the key to improving prediction accuracy [28]. The Informer effectively solves this problem by introducing a distillation mechanism and a multi-head probabilistic sparse attention mechanism; especially in scenarios where multiple future time points need to be predicted, the Informer model shows its superiority [29]. The two-stage attention (TSA) mechanism is an advanced attention allocation strategy designed to improve the performance of the model when processing multi-dimensional time series data [30]. The TSA mechanism enhances the model's understanding of complex relationships in the data through two consecutive stages. First stage: Cross-time stage. In this stage, the TSA mechanism focuses on capturing the interdependencies between time series. It is given a two-dimensional input vector \(Z\in R\) which contains the feature information of time series. In this stage, the model applies the MPSA mechanism along the time dimension. MPSA effectively identifies and strengthens the correlations between time series by analyzing the data on different time scales. The time complexity of this process is related to the sequence length and feature \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Data Set**} & \multicolumn{2}{c}{**Number of Features**} & \multirow{2}{*}{**ReliefF**} & \multirow{2}{*}{**KPCA**} & \multirow{2}{*}{**AE–ReliefF**} & \multirow{2}{*}{**SIG–ReliefF**} \\  & & & & & \\ \hline S1 & 12 & 0.832 & 0.732 & 0.801 & 0.898 \\ S2 & 17 & 0.841 & 0.814 & 0.866 & 0.902 \\ S3 & 6 & 0.794 & 0.803 & 0.849 & 0.914 \\ S4 & 11 & 0.812 & 0.846 & 0.890 & 0.942 \\ S5 & 24 & 0.867 & 0.811 & 0.877 & 0.926 \\ S6 & 9 & 0.831 & 0.791 & 0.896 & 0.837 \\ S7 & 31 & 0.857 & 0.894 & 0.896 & 0.863 \\ S8 & 5 & 0.790 & 0.726 & 0.887 & 0.927 \\ S9 & 46 & 0.794 & 0.703 & 0.825 & 0.874 \\ S10 & 82 & 0.767 & 0.681 & 0.891 & 0.946 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: F1 index based on different feature selection algorithms of the Informer model. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Data Set**} & \multicolumn{2}{c}{**Number of Features**} & \multirow{2}{*}{**ReliefF**} & \multirow{2}{*}{**KPCA**} & \multirow{2}{*}{**AE–ReliefF**} & \multirow{2}{*}{**SIG–ReliefF**} \\  & & & & & \\ \hline S1 & 12 & 0.832 & 0.732 & 0.801 & 0.898 \\ S2 & 17 & 0.841 & 0.814 & 0.866 & 0.902 \\ S3 & 6 & 0.794 & 0.803 & 0.849 & 0.914 \\ S4 & 11 & 0.812 & 0.846 & 0.890 & 0.942 \\ S5 & 24 & 0.867 & 0.811 & 0.877 & 0.926 \\ S6 & 9 & 0.831 &dimension, and is mainly determined by the number of segments in each feature dimension, which is specifically expressed as follows:  
\[\overline{w}(X_{i})=\frac{1}{n}{\sum_{j=1}^{N}SIG(X_{i};X_{j};C)+w(X_{i})} \tag{5}\]  
\[\hat{Z}_{:,d}^{t}=\text{LayerNorm}(Z_{:,d}+M_{\text{PSA}}^{t}(\overline{Z}_{:,d },Z_{:,d},Z_{:,d})) \tag{6}\]  
In the formula, \(\hat{Z}_{:,d}^{t}\) is the output sequence of the MPSA layer at a certain moment; LayerNorm is the normalization operation; \(Z_{:,d}\) is the vector of all time steps in the feature dimension d; \(M_{\text{PSA}}^{t}\) is the operation of the MPSA layer at time \(t\); \(\overline{Z}_{:,d}\) is a random vector of all time steps in the feature dimension d; MLP is a two-layer feedforward network; \(Z^{t}\) and \(Z^{t-1}\) are the output sequences of the MPSA layer at times \(t\) and \(t-1\), respectively. Second stage: Cross-feature stage. The purpose of this stage is to reveal the intrinsic connections between different feature sequences.