# An Attention-Based Method for Remaining Useful Life Prediction of Rotating Machinery
## 2 Attention-Based RUL Prediction of Rotating Machinery
### Performance Evolution State Data Classification Based on Data Clustering  
The whole life cycle of rotating parts involves several performance stages: a healthy stage, degradation stage, fault stage, and failure stage [18; 19]. As previously analyzed, the performance state data of Hi-Rel rotating machinery show few changes in the time domain during the transition from the \"healthy state\" to the \"degradation-begin state\"; the \"degradation-begin state\" lasts for a long time, whereas the \"degradation-intensified state\" has multiple stages of abrupt evolution (Figure 2). The \"healthy state\" refers to the state of trouble-free operation of the rotating component, the \"degradation-begin state\" refers to the operating state at the beginning of early failure, and the \"degradation-intensified state\" refers to the operating state after the failure progresses. The regions of time-domain representation data corresponding to the performance states of rotating machinery show fuzzy boundaries and overlaps (Figure 3). To improve the accuracy of attention assigned to corresponding data regions in the subsequent selective feature extraction module, it is imperative to precisely divide the data regions. A case study of bearings, which are typical parts in rotating machinery can be conducted as follows: based on data clustering and the fact that data samples in the same performance state share high similarity in the perfor  
Figure 1: Architecture of an RUL prediction model for rotating parts. mance evolution process, the performance evolution state data region division method is specified [20]. The performance states of the machinery are divided into \(n\) progressive stages, including the healthy stage, degradation-begin stage, degradation-intensified stage, and fault stage. Each stage corresponds to a class of time-domain representation data. According to the experience of an expert panel, the clustering center of the performance representation dataset corresponding to the healthy stage is marked as \(C_{k}\), and the clustering center of other stages is \(C_{k+n-1}\). Then, the set of several clustering centers of the initial performance representation datasets corresponding to the performance state stages is expressed as Equation (1):  
\[C^{(0)}=\left\{C_{k}^{(0)},C_{k+1}^{(0)}\dots C_{k+n-1}^{(0)}\right\} \tag{1}\]  
Then, with \(t\) as the number of iterations and \(x_{i}\) as a random sample point in the performance representation dataset, we obtain the Euclidean distance from the sample point (\(x_{i}\)) to the clustering center after \(t\) clustering iterations, as shown in Equation (2):  
Figure 3: Overlaps of data regions (different colors represents time-domain representation data of different performance states). Figure 2: Changes in time-domain data of the machinery in different performance states. \[d\left(x_{i},C_{k+n-1}^{(t)}\right)=\sqrt{\left(x_{i}^{1}-C_{k+n-1}^{(t)}\right)^ {2}+\left(x_{i}^{2}-C_{k+n-1}^{(t)}\right)^{2}+\ldots+\left(x_{i}^{N}-C_{k+n-1}^ {(t)}\right)^{2}}, \tag{2}\] \[\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad k=1,2,3 \ldots;n=1,2,3\ldots;k<n.\]  
The Euclidean distance from the sample point (\(x_{i}\)) to the clustering center is calculated by Equation (2). As the data samples in the same performance state share high similarity, the sample points are classified into the data category of the clustering center to which the Euclidean distance is shortest to generate a cluster (M\({}^{(t)}\)). Then, the clustering center is updated, and the mean value of all samples in each category is considered the clustering center.