## 3 The Proposed New Method MDA-LETCN
### RUL Prediction  
As per Section 3.2, the degradation status of the generator bearings is categorized into three stages: healthy, slight degradation, and severe degradation. In the process of predicting RUL, since there is no degradation in the healthy data, it is not meaningful to predict the RUL of generator bearings in a healthy state. Therefore, in this paper, the first time point within the mild degradation stage is determined as the starting time of bearing degradation, denoted as the first predicted time (FPT), and RUL prediction for the bearings's commences from this time point. The degradation labels for the data can be represented as:  
\[y_{RUL}^{s}=\frac{n_{s}-i}{n_{s}-\text{FPT}} \tag{20}\]  
where \(n\) is the number of data in the source domain; when \(y_{RUL}=1\), the generator bearing just runs to FPT; then, the model begins to predict RUL; when \(y_{RUL}>1\), the bearing is in a healthy state and, when \(y_{RUL}<1\), this indicates that the bearing is degraded.  
This paper designs an RUL prediction model based on actual WT generator bearings' run-to-failure data collected from a wind farm in Shandong. The training process is as follows:  
Step 1: The collected vibration signals are filtered according to the date and bearing speed; then, TFs are extracted from filtered data and the missing data are completed. Next, the SG filter is used to smooth the RMS to obtain the SRMS. The source domain is \(D^{S}=\left(\mathbf{x}_{1}^{s},\mathbf{x}_{2}^{s},\cdots,\mathbf{x}_{n_{s}}^{s}\right)\) and \(n_{s}\) is the number of source domain. The target domain is \(D^{T}=\left(\mathbf{x}_{1}^{t},\mathbf{x}_{2}^{t},\cdots,\mathbf{x}_{n_{t}}^{t}\right)\), \(n_{t}^{t}\) is the number of health-state data that the target domain participates in training, and \(\mathbf{x}_{n}^{s}\) and \(\mathbf{x}_{n}^{t}\) both contain 11 features. \(D^{S}\) and \(D^{T}\) together form the training set, with the remaining samples from the target domain used as the test set.  
Step 2: The TFs of bearing vibration signals are constructed as time series. The data of T continuous TFs points are intercepted as a time series.  
\[\begin{bmatrix}\mathbf{x}_{1}&\mathbf{x}_{2}&\cdots&\mathbf{x}_{T}\\ \mathbf{x}_{2}&\mathbf{x}_{3}&\cdots&\mathbf{x}_{T+1}\\ \vdots&\vdots&\ddots&\vdots\\ \mathbf{x}_{N-T}&\mathbf{x}_{N-T+1}&\cdots&\mathbf{x}_{N}\end{bmatrix}=\begin{bmatrix}\bm {d}_{1}\\ \mathbf{d}_{2}\\ \vdots\\ \mathbf{d}_{N-T}\end{bmatrix} \tag{21}\]  
Step 3: Using source domain time series samples, with \(L_{r}+\alpha L_{\mathcal{C}}\) as the loss function and SRMS as the data label pretraining model, the objective is to learn the degradation features of source domain data and the segmentation of degradation stages. Based on the classification of the degradation status of the source domain bearing data, the FPT for the source domain bearings is determined, and then the RUL labels for the source domain bearings are calculated using Equation (20).  
Step 4: Equation (19) was used as the loss function to train MDA-LETCN. Based on the source domain data in the training set, the LETCN module was used to learn the time characteristics of bearing degradation and the MDSDM module was used to reduce the difference in feature distribution of each degradation stage based on the division results of the bearing degradation state by the pretraining model so as to learn the domain-invariant degradation characteristics of bearings. For the target domain data in the training set, which only contains health status data, the DA module is used to align the health status feature distribution in the source domain and the target domain so as to migrate the model to the adaptive target bearing.  
Step 5: Using the test set test model results, once the FTP of the target bearing is identified by the model, RUL prediction for the target bearing is started.  
Figure 9 shows the diagnostic process of MDA-LETCN.