## 2 Materials and Methods
### Methods
#### 2.2.4 RNN  
RNN was a type of neural network model capable of processing sequential data. This enabled it to excel in tasks such as speech recognition, natural language processing, and time series prediction [38; 39]. Especially in RUL prediction, RNN could capture the temporal relationships in data by passing information through hidden states across time steps. To better extract features from equipment condition monitoring data, the independent recurrent neural network (IndRNN) [40] network was employed. IndRNN achieved this by making the update of each neuron independent, meaning that each neuron was updated based solely on its own state and input, without relying on the states of other neurons. This approach effectively avoided the gradient vanishing and explosion issues present [41; 42; 43] in RNN and LSTM. Since each neuron's computation was independent, the information transfer over long time steps became more stable.  
Figure 6: Layered architecture of EM-Net.  
As shown in Figure 7. The hidden layer \(h_{t}\) was updated based on \(X_{t}\) and the previously hidden layer \(h_{t-1}\) at step \(t\).  
\[h_{t}=\sigma(W_{X_{t}}+u_{t-1}\cdot h_{t-1}+b) \tag{16}\]  
The hidden state update of each neuron was calculated based on the current input and the hidden state from the previous time step. For the \(n\) neuron, the hidden state \(h_{n,t}\) at time step \(t\) was given by the following equation.  
\[h_{n,t}=\sigma(W_{nX_{t}}+u_{n,t-1}\cdot h_{n,t-1}+b_{n}) \tag{17}\]  
\(X_{t}\in\mathbb{R}^{M}\) represents the input at time step \(t\), \(h_{t-1}\in\mathbb{R}^{N}\) was the hidden state from the previous time step, \(W_{n}\) and \(h_{n}\) were the weight matrices for the current input and the previous hidden state, respectively, \(b_{n}\) was the bias term, and \(\sigma\) was the activation function. In this equation, the current hidden state was influenced not only by the input but also by the hidden state from the previous time step, reflecting the temporal dependency characteristic of recurrent neural networks. In IndRNN, the design of the loss function was crucial for the optimization process. A commonly used loss function was the mean absolute error, which was given by the following form.  
\[L=\frac{1}{M}\sum_{1}^{M}|y_{t}-y^{\prime}_{t}| \tag{18}\]  
Among them, \(y_{t}\) represented the actual target output, while \(y^{\prime}_{t}\) was the predicted output of the network at time step \(t\). The loss function was computed based on the errors at all time steps, which reflected the difference between the network's output and the actual target. By minimizing this loss function, IndRNN could continuously adjust its parameters to improve prediction accuracy. To minimize the loss function and optimize the network parameters, IndRNN used the backpropagation algorithm. The core idea of backpropagation was to gradually update the weights and biases in the network based on the gradient information of each neuron with respect to the loss function.  
\[\frac{\partial J_{n}}{\partial h_{n,t}}=\frac{\partial J_{n}}{\partial h_{n,T} }\frac{\partial h_{n,T}}{\partial h_{n,t}}=\frac{\partial J_{n}}{\partial h_{ n,T}}\prod_{k=t}^{T-1}\sigma^{\prime}_{n,k+1}u_{n}=\frac{\partial J_{n}}{ \partial h_{n,T}}u_{n}^{T-1}\prod_{k=t}^{T-1}\sigma^{\prime}_{n,k+1} \tag{19}\]  
Since the hidden state update of each neuron was independent, IndRNN could accelerate the training process by performing independent backpropagation operations when computing gradients.  
Figure 7: Basic structure of IndRNN.