## 3 The Proposed Method
### HI Extraction and RUL Prediction Process
#### 3.2.2 Overall Framework Flow  
The overall framework flow of MSCAE-based HI extraction and RUL prediction proposed in this paper is shown in Figure 5. The framework is divided into two main phases, offline training and online testing. There are three main steps in the offline training phase, and the process is as follows. 1. Vibration data from training bearing operation to failure are obtained using vibration sensors. Suppose the vibration data are \(X=[\mathbf{x_{1}},\mathbf{x_{2}},\ldots,\mathbf{x_{B}}]\), \(\mathbf{x_{i}}=[x_{i,1},x_{i,2},\ldots,x_{i,l}]\), \(\mathbf{x_{i}}\) represents the vibration data at the moment \(t_{i}\), \(i=1,2,\ldots B\), \(B\) is the total time of bearing operation, and \(l\) is the length of the data. 2. The degenerate labels for each moment of the vibration data are calculated using Equation (19), and the labels \(\mathbf{y}=[y_{1},y_{2},\ldots y_{B}]\) are obtained by the calculation. 3. Training the proposed MSCAE model. First, the vibration datum \(X\) of the training bearing is input to the model, and the output of the MSCAE encoding part is the extracted HI, which is denoted as \(\mathbf{\hat{y}}=[\hat{y}_{1},\hat{y}_{2},\ldots\hat{y}_{B}]\). After that, HI is used as an input to the decoding part of MSCAE to obtain the reconstructed data \(\hat{X}=[\hat{x}_{1},\hat{x}_{2},\ldots,\hat{x}_{B}]\) of the vibration data \(X\). Finally, the composite loss function is calculated using Equation (16), and the internal parameters \(\theta\) of the model are updated using the back-propagation algorithm. After the MSCAE is trained offline, it moves to the online testing phase. Figure 5: Flow chart of HI extraction and RUL prediction. The vibration data from test bearing operation to failure are obtained, which are defined as \(X^{\prime}=[\mathbf{x^{\prime}_{1}},\mathbf{x^{\prime}_{2}},\ldots\mathbf{x^{\prime}_{T}}]\), and \(T\) is the total operating time of the testing bearing. 5. The vibration signal \(X^{\prime}\) of the testing bearing is input to the encoder of the MSCAE trained in step 3 to obtain in HI \(\mathbf{H}=[h_{1},h_{2},\ldots h_{T}]\) of the test bearing. 6. After obtaining the HI of the testing bearing, the first \(N\) points of \(\mathbf{H}\) are taken to construct the training data for training the LSTM model. The training matrix can be expressed as follows. \[\mathbf{V}=\left[ \begin{array}{cccc}h_{1}&h_{2}&\cdots&h_{N-M}\\ h_{2}&h_{3}&\cdots&h_{N-M+1}\\ \vdots&\vdots&\ddots&\vdots\\ h_{M+1}&h_{M+2}&\cdots&h_{N}\end{array} \right]=\left[ \begin{array}{c}\mathbf{v_ {1}}\\ \mathbf{v_{2}}\\ \vdots\\ \mathbf{v_{M+1}}\end{array} \right]\] (20) where \(M\) is the neurons number of the LSTM output layer, \(\mathbf{v}_{i}=[h_{i},h_{i+1},\ldots,h_{i+N-M-1}]\), \((i=[1,2,\ldots,M+1])\). The LSTM is trained by taking the first \(M\) vectors of the training matrix \(\mathbf{V}\) as the input of the LSTM and the last vector \(\mathbf{v_{M+1}}\) as the output. Assuming that the mapping function of the trained LSTM is denoted as \(f\), the last \(M\) vectors of the matrix \(\mathbf{V}\) are passed as input to the trained LSTM to obtain the first prediction result \(\bar{\mathbf{v}}_{\mathbf{M+2}}\), and the specific expression is: \[\bar{\mathbf{v}}_{\mathbf{M+2}}=f([\mathbf{v_{2}},\mathbf{v_{3}},\cdots,\mathbf{v_{M+1}}])\] (21) Then, the matrix \(\mathbf{V}\) can be updated as follows: \[\mathbf{V}=[\mathbf{v_{1}},\mathbf{v_{2}},\cdots,\mathbf{v_{M+1}},\bar{\mathbf{v}}_{\mathbf{M+2}}]^{T}\] (22) The above method allows the prediction of HI vectors to be performed continuously and the matrix \(\mathbf{V}\) to be continuously updated.