## 3 Remaining Useful Life Prediction Algorithm Based on Double Bidirectional Long Short-Term Memory
### Principle of Double Bidirectional Long Short-Term Memory (DBiLSTM)  
Memory cell of LSTM network [37] is shown in Figure 3; the memory cells of the LSTM form a hidden layer composed of different nodes: input, output, and forget gates [38; 39; 40]. The selective operations of these gates allow us to save specific information, and thus the LSTM networks can avoid gradient vanishing. During backpropagation, the weights of the memory units are adjusted, which allows the LSTM to retain the underlying information. The LSTM has high performance when dealing with long-term dependencies between input and output.  
Figure 3: Memory cell of LSTM network.  
After network iteration activation, input sequence \(X=[x_{1},x_{2},\ldots,x_{n}]\) is mapped to output \(h=[h_{1},h_{2},\ldots,h_{n}]\). At time step \(t=[1,2,\ldots,t-1,\ldots,\text{T}]\), the corresponding gates in LSTM units are expressed as [40]:  
\[i_{t}=\sigma(\omega_{ix}x_{t}+\omega_{ih}h_{t-1}+b_{i}) \tag{20}\]  
\[f_{t}=\sigma(\omega_{fx}x_{t}+\omega_{fh}h_{t-1}+b_{f}) \tag{21}\]  
\[g_{t}=\tanh(\omega_{gx}x_{t}+\omega_{gh}h_{t-1}+b_{g}) \tag{22}\]  
\[o_{t}=\sigma(\omega_{ox}x_{t}+\omega_{oh}h_{t-1}+b_{o}) \tag{23}\]  
\[c_{t}=\sigma(g_{t}\otimes i_{t}+\omega_{ih}\otimes c_{t-1}) \tag{24}\]  
\[h_{t}=\varphi(c_{t})\otimes o_{t} \tag{25}\]  
where, \(\omega_{ix}\), \(\omega_{fx}\), \(\omega_{gx}\), and \(\omega_{ox}\) represent the weight matrices between the input layer and corresponding gates at time t, \(\omega_{ih}\), \(\omega_{fh}\), \(\omega_{gh}\), and \(\omega_{oh}\) represent the weight matrices of the hidden layer between time values t and t - 1, \(b_{i}\), \(b_{f}\), \(b_{g}\), and \(b_{o}\), respectively, represent the bias values of the input, forget, control, and output gates, \(h_{t-1}\) and \(c_{t-1}\), respectively, represent the hidden and cell states of the previous time value t - 1, \(i_{t}\), \(f_{t}\), \(g_{t}\), and \(o_{t}\), respectively, represent the output values of the input, forget, control, and output gates, \(c_{t}\) and \(h_{t}\), respectively, represent the current cell state and hidden state at time t, \(\varphi\) and \(\sigma\), respectively, represent the tanh and sigmoid activation functions, and \(\otimes\) represents the point-wise multiplication operator.  
BiLSTM can capture information from previous and following events. It combines two LSTM hidden layers to increase the performance of individual LSTM units. The input sequence \(X=[x_{1},x_{2},\ldots,x_{n}]\) is processed by BiLSTM, generating hidden sequences in forward and backward directions. The forward and backward hidden sequences are, respectively, denoted by \(\overset{\rightarrow}{h}=[\overset{\rightarrow}{h},\overset{\rightarrow}{h },\overset{\rightarrow}{\ldots},\overset{\rightarrow}{h}]\) and \(\overset{\leftarrow}{h}=[\overset{\leftarrow}{h},\overset{\leftarrow}{h}, \ldots,\overset{\leftarrow}{h}]\), and the concatenation of forward and backward outputs is considered as the final output. The encoding vector produced by the two hidden layers is expressed as [40]:  
\[y_{t}=\sigma(\omega_{\overset{\rightarrow}{y\overset{\rightarrow}{h}}} \overset{\rightarrow}{h}_{t}+\omega_{\overset{\leftarrow}{y\overset{ \leftarrow}{h}}}\overset{\leftarrow}{h}_{t}+b_{y}) \tag{26}\]  
\[\overset{\rightarrow}{h}_{t}=\sigma(\omega_{\overset{\rightarrow}{h}x}\,x _{t}+\omega_{\overset{\rightarrow}{h}\overset{\rightarrow}{h}-1}+b_{ \overset{