# A Deep-Learning-Based Fault Diagnosis Method of Industrial Bearings Using Multi-Source Information
## 2 Bearing Fault Diagnosis Method Based on Knowledge Reasoning
### Construction of Multi-Local Fault Diagnosis Model Based on Bi-LSTM
#### 3.1.3 Local Fault Diagnosis Model Based on Bi-LSTM  
The fault diagnosis model based on Bi-LSTM is mainly composed of a feature extraction part, a feature optimization part, and a classification recognition part. The specific structure is shown in Figure 3. Among them, the feature extraction part includes a two-layer Bi-LSTM network, the feature optimization part consists of an attention mechanism layer, and the classification recognition part includes a fully connected layer and a classification layer. The vibration and current data of industrial motor bearings studied in this paper are all one-dimensional time series. The collected data changes along the time axis, with obvious time series and periodic characteristics. The long-short-term memory network (LSTM) is stronger than the general neural network structure in acquiring and storing information and is especially suitable for memorizing and processing vibration and current data of industrial motor bearings. This is because the LSTM introduces the two concepts, i.e., the memory unit and candidate state, and the path of information transmission can be controlled through the gating mechanism, thereby realizing effective control of the information flow in the network and finally retaining task information as much as possible and filter redundant information. The specific structure of the LSTM memory unit is shown in Figure 4.  
The information processing flow of the long short-term memory network is to first use the external state \(h_{t-1}\) at the previous moment and the input \(x_{t}\) at the current moment to calculate the input gate \(i_{t}\), the forgetting gate \(f_{t}\), the output gate \(l_{t}\) and the candidate state \(C_{t}^{{}^{\prime}}\), as shown in the Equations (9)-(12). \[i_{t}=\phi[\beta_{i}\cdot(h_{t-1},x_{t})+\psi_{i}]. \tag{9}\]  
\[f_{t}=\phi[\beta_{f}\cdot(h_{t-1},x_{t})+\psi_{f}]. \tag{10}\]  
\[l_{t}=\phi[\beta_{l}\cdot(h_{t-1},x_{t})+\psi_{l}]. \tag{11}\]  
\[C_{t}^{{}^{\prime}}=tanh[\beta_{c}\cdot(h_{t-1},x_{t})+\psi_{c}]. \tag{12}\]  
Figure 3: Fault Diagnosis Model Based on Bi-LSTM. where the \(\phi\) is activation function, and \(\beta_{i}\), \(\beta_{f}\), \(\beta_{l}\), \(\beta_{c}\) represent the weighting matrix of the input gate, forget gate, output gate, and memory unit, respectively. After that, the information to be forgotten is determined by the forget gate and the internal state at the previous moment, and new candidate value information is generated by the input gate and the candidate state. The two work together to update the internal memory unit, which can be expressed as follows. \[C_{t}=f_{t}C_{t-1}+i_{t}C_{t}^{{}^{\prime}}. \tag{13}\]  
The output of the LSTM network is determined by the output gate and the internal state. The output gate filters the information of the internal state and then passes it to the external state through an activation function, which can be expressed as follows:  
\[h_{t}=l_{t}tanh(C_{t}). \tag{14}\]  
The bidirectional long short-term memory network (Bi-LSTM) is developed based on the LSTM network. The Bi-LSTM network is composed of two independent LSTM networks. The data information enters different LSTM networks through the forward channel, and the reverse channel, respectively, and then the two LSTM networks output the extracted forward and reverse features together. Since the Bi-LSTM network has a special structure and makes up for the time-reversal feature part ignored by the traditional unidirectional LSTM network, it can more comprehensively obtain the time-series characteristics of relevant information data. Compared with other deep neural networks, the Bi-LSTM network has more obvious advantages in processing time series data and is currently one of the most suitable ways to process time series data of industrial motor bearings.