## 3 The Proposed New Method MDA-LETCN
### Multistage Degradation Stage Distribution Matching (MDSDM)  
There is a significant distribution difference between the three degradation stages of TW generator bearings during operation from health-state degradation to bearing replacement. If the model has high prediction accuracy in each degradation stage, the prediction model must learn the domain-invariant time dependence in different degradation stages of generator bearings. However, the signals of generator bearings collected by the CMS are under composite working conditions, which will seriously affect learning the domain-invariant features. In this paper, an MDSDM module is proposed. By reducing the distribution difference between different degradation stages, the model can learn the domain-invariant degradation features between the multi-degradation stages and improve the prediction RUL accuracy of the model for generator bearings. For the same type of bearing, the internal physical degradation mechanism will not be affected by the composite working condition. So, MDSDM can effectively extract the degradation features of the bearing under the composite working condition. For the feature sets \(D_{i}\) and \(D_{j}\) of different degradation stages, the loss of MDSDM is:  
\[L_{MDSDM}(D_{i},D_{j})=\sum_{i=1}^{T}\lambda_{ij}^{t}d(x_{i}^{t},x_{j}^{t}) \tag{16}\]  
where \(x_{i}^{l}\in D_{i}\) and \(x_{j}^{l}\in D_{j}\) are the \(t\) eigenvalues of the \(i\) and \(j\) stages, respectively, \(\lambda_{ij}^{t}\) is the importance of distribution, and \(d\) is the distance function, defined as the cosine similarity function in this paper. In this paper, the importance of dynamic evaluation of temporal features is observed, that is, dynamic update parameter \(\lambda_{ij}^{t}\). Firstly, the source domain is used to take \(L_{r}+\alpha L_{\text{C}}\) as the loss pretraining model, enabling the model to better learn the temporal features in the bearing degradation process. In the training process, the initial weight is set to the same value, that is, \(\lambda_{i,j}^{t}=1/T,t=1,2,\cdots,T\). Then, with the increase in iterations during formal training, if the distribution distance of \(n\) iterations is greater than \(n-1\) iterations, the distribution difference becomes larger, so the weight is increased  
Figure 8: The degradation stage of WT bearings.  
to better reduce the distribution difference. Otherwise, the weights remain the same. The updating process of distributed importance is as follows:  
\[\lambda_{i,j}^{n+1,t}=\left\{\begin{array}{ll}\Lambda_{i,j}^{n,t}\times\left(1+ \sigma\Big{(}\lambda_{i,j}^{n,t}-\lambda_{i,j}^{n-1,t}\Big{)}\right)\,\lambda_{ i,j}^{n,t}-\lambda_{i,j}^{n-1,t}\geq\varepsilon\\ \lambda_{i,j}^{n,t}\hskip 56.905512 pt\text{otherwise}\end{array}\right. \tag{17}\]  
where \(\lambda_{i,j}^{n,t}\) represents the distribution difference of the \(t\)th feature between stage \(i\) and stage \(j\) during the \(n\)th iteration process, \(\sigma(x)=1/(1+e^{-x}),\ \varepsilon\to 0\). From Equation (17), it can be seen that \(\sigma(x)>0\); when \(\lambda_{i,j}^{n,t}-\lambda_{i,j}^{n-1,t}\geq\varepsilon\), \(\lambda_{i,j}^{n+1,t}\) will increase. Then, the final weight values are obtained by regularizing the \(\lambda_{i,j}^{n+1,t}=\lambda_{i,j}^{n+1,t}/\left(\sum\limits_{t=1}^{T}\lambda _{i,j}^{n+1,t}\right)\).