# Fault Detection Method for Wind Turbine Generators Based on Attention-Based Modeling
## 1 Introduction
From a theoretical analysis, the effectiveness of this method is mainly due to the fact that for gearbox bearing signals, each signal component in the time and frequency domains often has its own advantages for the related tasks, and EMD can effectively decompose an unknown time series signal according to its inherent hierarchy, without human intervention, allowing RNNs to preserve the hierarchical signals that are helpful for fault diagnosis [16; 17]. In [18] a novel method was proposed that included ResDenIncepNet-CBAM with principal component analysis (PCA). PCA was utilized to reduce data dimensionality before extracting the wind turbine features. In [19] [PERSON] et al. used genetic-algorithm-based ensemble learning for anomaly detection of wind turbines using SCADA data. The proposed ensemble method consisted of XGBoost, a random forest, and an extra tree model. XGBoost was used as a meta-model. A genetic algorithm was used for the selection of optimal features. In [20] a novel fault prediction method based on the pair copula model was proposed. First, the conditional mutual information method was introduced, to screen out useful variables from a number of variables. Then, aiming at the limitation that the conventional copula model can only deal with two-dimensional variables, the pair copula model was introduced. In [21] a back propagation (BP) neural network was used to train the system, taking into account the volatility and uncertainty of wind turbine parameters, and a regression prediction model with a support vector regression (SVR) algorithm was also used for training. In [22; 23; 24] a combined principal component analysis (PCA) and convolutional neural network (CNN) was employed as the fault detection method through the optimal vibration measurements. In [25] through the residuals between gearbox oil temperature predicted by the proposed model and monitored by the SCADA, whether the gearbox faults existed could be diagnosed. In [26] a pre-training algorithm was proposed that could shorten the overall training time, especially for training multiple models simultaneously. However, for time series bearing signals, not every moment's state is effective for fault detection. In other words, in the process of neural network modeling, those moments that have a positive effect on fault prediction should be adaptively assigned greater weight. Conversely, noise, interference, and task-irrelevant signals should be assigned smaller weights. This is obviously not achievable by RNN networks, so this method often performs poorly in practical applications. To solve the above problems, this paper proposes a gearbox fault prediction method based on a soft attention mechanism and long short-term memory (LSTM) for wind turbines. For convenience, the proposed method is named \"Attention Weight-LSTM\" (AW-LSTM). Specifically, AW-LSTM first designs a time-frequency decomposition algorithm based on EMD, and hierarchically decomposes the non-stationary and nonlinear bearing signal data into corresponding intrinsic mode functions (IMFs) according to its inherent pattern hierarchy, obtaining different local feature signals of the original signal at different timescales. Secondly, an LSTM network adaptively extracts the temporal modes contained in the decomposed signal. However, for adjacent frames, LSTM can only linearly input the previous hidden state and cell state to the next cell unit, without distinguishing the importance of different time points for current signal modeling. For bearing signals, the contribution of different time points to the current frame is often different. However, the standard LSTM network can only treat all data frames equally, without explicitly modeling the differences in contribution between different frames for signal analysis. To solve this problem, an attention-weighted strategy is proposed, to assign different weights to the hidden states of different frames, through the attention mechanism, achieving the goal of distinguishing the contribution of different frames.