Bearing fault detection method based on parallel LSTM-CNN and BiGRU
Through parallel LSTM-CNN and BiGRU neural networks, combined with attention mechanism and global pooling, the problems of feature extraction redundancy and gradient disappearance in bearing failure detection are solved, and high accuracy and stable fault diagnosis are achieved.
Patent Information
- Application Number
- CN202410995126.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-11-22
AI Technical Summary
The existing bearing fault detection methods have redundant features and gradient vanishing problems during feature extraction, resulting in a decrease in classification effect and it is difficult to effectively identify faults on small data sets.
Parallel LSTM-CNN and BiGRU neural networks are used to extract features simultaneously through LSTM and CNN, introduce attention mechanism to screen key features, and use BiGRU to consider timing information, combine global pooling and Softmax layer for classification, optimize the accuracy and efficiency of the model .
It improves the accuracy and stability of bearing fault detection, achieves 100% fault diagnosis accuracy, and significantly improves the fault detection performance in industrial processes.
Smart Images

Figure CN119004252A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a bearing fault detection method, and in particular to a bearing fault detection method based on parallel LSTM-CNN and BiGRU. Background Art
[0002] The development of modern industry has promoted the automation and precision of rotating machinery and equipment, making it increasingly difficult to monitor the health of such equipment. As one of the basic components of rotating machinery, rolling bearings are widely used, and the unexpected failure of bearing components will cause serious economic losses and safety issues. Therefore, effective fault monitoring and diagnosis of bearings at an early stage is of great significance to ensure the safe and reliable operation of complex mechanical systems.
[0003] The traditional fault detection method first extracts features from the signal, and then uses a classifier to identify and classify these features. Common signal processing methods include short-time Fourier transform, wavelet transform, spectrum analysis, etc.; common classification methods include back propagation neural network, support vector machine, etc. Although these methods have achieved certain results in bearing fault diagnosis, due to the reliance on manual experience for feature extraction, the use of traditional methods for bearing fault diagnosis may face many challenges.
[0004] With the continuous iteration and update of deep learning technology, more and more scholars have begun to use deep learning for the research of bearing fault diagnosis. Zhang et al. proposed to first transform the bearing vibration signal from the time domain to the frequency domain with the help of continuous wavelet transform, and then use multiple parallel convolutional neural networks to train the data. This method has good robustness. Chen Baojia et al. combined the network architecture of long short-term memory network and CNN, optimized the model parameters using grid search algorithm, and effectively identified different types of bearing faults. Wang Yongding et al. proposed to use one-dimensional convolution and two-dimensional convolution to extract vibration signal features at the same time, and then input the fused features into the support vector machine optimized by particle swarm optimization for fault classification, which improved the noise resistance of the model. Sun Jiedi et al. used deep convolutional network to adaptively extract features of vibration signals, and then introduced LSTM network to perform time series analysis on data to mine deeper information, thereby improving the reliability of bearing fault diagnosis model. Zhou Qicai et al. proposed a bearing fault diagnosis method based on improved stacked recurrent neural network. By reasonably stacking gated recurrent units and recurrent neural networks, the gradient disappearance phenomenon during model training was effectively prevented. Zhang Lipeng et al. proposed to build a bidirectional gated recurrent unit fault diagnosis model to extract features from vibration signals, and used the attention mechanism to optimize the accuracy of the model. Compared with traditional fault detection algorithms, the accuracy and noise resistance were improved. Although bearing fault diagnosis based on deep learning has made significant research progress, many methods are still insufficient in feature extraction. Although more features can be extracted by increasing the number of convolutional neural network layers, many features are redundant and useless for small data sets. This not only increases the amount of computation in the classification process, but also introduces unimportant features, which interferes with the classification effect, resulting in a decrease in fault recognition rate. Therefore, it is of great significance to improve the traditional neural network and improve the efficiency and accuracy of bearing fault detection. Summary of the invention
[0005] The purpose of the present invention is to provide a bearing fault detection method based on parallel LSTM-CNN and BiGRU. The present invention aims at the complex data characteristics of large-scale, high-dimensional, nonlinear and other complex data characteristics of bearing data in industrial processes and the fault detection problems, and proposes a bearing data fault detection method based on improved LSTM, CNN and BiGRU neural networks. It realizes feature extraction of industrial bearing data under the conditions of large-scale, high-dimensional and nonlinear data, and improves the accuracy of traditional neural network fault detection.
[0006] The objective of the present invention is achieved through the following technical solutions:
[0007] A bearing fault detection method based on parallel LSTM-CNN and BiGRU, the method comprising the following steps:
[0008] Step 1: Collect bearing sample data sets under different working conditions in industrial processes and divide the data sets into training sets and test sets;
[0009] Then, LSTM and CNN are used to extract features from the original data simultaneously. The LSTM processing flow is shown in formulas (1)-(6):
[0010] At time t, X t 、h t The forget gate is responsible for calculating and determining the cell information that needs to be forgotten from the previous moment. The calculation formula of the forget gate is:
[0011] f t =σ(W f h t-1 +W f X t +b f ) (1)
[0012] Where W f is the weight matrix of the forget gate, b f is the forget gate bias vector, σ is the Sigmoid activation function;
[0013] The input gate determines the information that needs to be retained and creates a new cell state. First, it determines the information that needs to be updated, and then uses this information to create a new cell state. The input gate calculation formula is as follows:
[0014] i t =σ(W i h t-1 +W i X t +b i ) (2)
[0015]
[0016] Where W i is the input gate weight vector, b i is the input gate bias vector, tanh is the hyperbolic tangent activation function;
[0017] Linear processing of the results of formula (2) and formula (3) can obtain the state of the neuron at this moment, as shown in formula (4):
[0018]
[0019] Finally, the output gate determines the information that the neuron ultimately outputs. The output calculation formula is as follows:
[0020] O t =σ(W o ht-1 +W o X t +b o ) (5)
[0021] h t =O t *tanh(C t ) (6)
[0022] Where W o is the output gate weight vector, b o is the output gate bias vector.
[0023] The CNN processing flow is shown in formulas (7)-(10):
[0024]
[0025] In the formula, is the jth element of the output vector of the lth layer; is the i+jth element of the input vector of the lth layer; is the bias term of the jth element in the lth layer; w j is the jth weight of the convolution kernel; σ((·) is the ReLU activation function;
[0026] The Relu function is widely used in neural network models because of its fast convergence speed and ability to avoid gradient disappearance. Its calculation formula is:
[0027]
[0028] The pooling layer is an indispensable part of the convolutional neural network. It has two modes: maximum pooling and average pooling. It is used to deal with the problem of high data dimension and overfitting after convolution. Its calculation formula is:
[0029]
[0030] In the formula, l(i,n) represents the activation value of the nth neuron in the i-th channel of the l-th layer, H represents the sliding window size, and v l(i ,n) Represents the result of pooling the jth neuron in the i-th channel of the current l-th layer.
[0031] The pooling layer reduces the dimension of the data through the maximum pooling or average pooling operation, so that the model can retain the main features of the data while reducing the parameters and calculation amount, and can also prevent the model from overfitting. The function of the fully connected layer is to classify the feature information after the convolution layer and the pooling layer, and output the result.
[0032] Step 2: Input the data extracted by LSTM and CNN into the attention layer. Because the data features extracted by LSTM and CNN are relatively redundant, the model designs an attention layer to screen key features. The attention layer mainly uses the attention mechanism to perform weighted summation on the data features extracted by LSTM and CNN, and then determines the contribution of different data features to the final output result based on the attention weight of each time step, and filters out non-critical information. This not only improves the accuracy of the model in detecting faults, but also speeds up the training of the model.
[0033] First, perform global maximum pooling on the features on each channel to obtain the maximum feature vector z on each channel c , the calculation formula is shown in (11):
[0034]
[0035] Where L is the length and C is the number of channels. The maximum feature vector z on each channel is c The final weight vector s is obtained by two one-dimensional convolutional layers, ReLU activation function layer and Sigmoid activation function respectively. The calculation formula is shown in (12-15):
[0036] s c =Conv1d 1 (z c ) (12)
[0037] s c =ReLU(s c ) (13)
[0038] s c =Conv1d 2 (s c ) (14)
[0039] s c =σ(s c ) (15)
[0040] Where σ is the Sigmoid activation function;
[0041] Finally, use the generated channel weight vector s to adjust the original features Figure X Each channel of is readjusted to enhance the important channel features and suppress the unimportant channel features. The calculation formula is shown in (16):
[0042]
[0043] In the formula, s c is the value of the cth channel in the channel weight s, X i,c is the input feature Figure X The value at position i and channel c.
[0044] Step 3: Input the data processed by the attention layer into the BiGRU neural network. In order to further improve the accuracy of model fault detection and dig deeper into data features, the data features weighted by the attention layer are input into the BiGRU layer to extract higher-level features. BiGRU considers both past and future information at each time step, which helps the model to understand and model time series data more comprehensively, thereby better adapting to different sequence patterns and improving the fault detection rate of the model. The BiGRU processing flow is shown in formulas (17)-(19):
[0045]
[0046] In the formula, h 1 (t) and h 2 (t) are the hidden states of forward propagation and backward propagation, respectively, and h 1 (t-1) and h 2 (t+1) are the hidden states of the previous moment and the next moment relative to a certain moment, respectively, x (t) and H (t) are the input and output at time t, σ(·) is the Sigmoid activation function, U and W are weight matrices, and the arrows indicate the propagation direction;
[0047] Step 4: Considering that BiGRU often passes the output of the last hidden neuron cell to the subsequent neural network and ignores the information of other GRU cells, the model designs global average pooling, which can comprehensively consider the feature outputs of each GRU, while also reducing the pressure of model training and improving detection efficiency; for one-dimensional data, assuming that the input feature Figure X The dimension is L×C, where L is the length and C is the number of channels. The global average pooling formula for one-dimensional data is as follows:
[0048]
[0049] Step 5: After global pooling, the data features will be transmitted to the fully connected layer to complete the data classification, and then pass through the Softmax layer to convert the final result into a probability estimate to improve the accuracy of the classification result; the Softmax layer performs fault classification, and the result is a number between 0 and 1, which is finally compared with the fault value set in advance. The one with a larger proportion can be identified as this type of fault, thereby completing the fault diagnosis. The Softmax formula is as follows:
[0050]
[0051] In the formula, k is a specific category, n is the number of categories, and v is the value of the category.
[0052] Step 6: Calculate the cross entropy loss function between the predicted value and the actual label, continuously update the model network parameters, and save the best performing model for subsequent testing; the formula of the cross entropy loss function is as follows:
[0053]
[0054] In the formula, y represents the true label of the sample, Indicates the label predicted by the model. When y=1, it means the sample belongs to the positive class; when y=0, it means the sample belongs to the negative class;
[0055] Step 7: Fault detection phase, the process is as follows:
[0056] (1) Collect vibration data, preprocess the original data set, and divide the data set into a training set and a test set;
[0057] (2) Build a network model and set the model’s hyperparameters, such as the number of network layers, number of channels, batch size, and number of iterations;
[0058] (3) Input the training set into the model for training, calculate the target loss function of the model, and update the network weights using the gradient descent method;
[0059] (4) When the model training times reaches the number of iterations and meets the performance requirements, save the model network parameters; otherwise, reset the parameters for training;
[0060] (5) Input the test set into the trained model to perform fault identification;
[0061] (6) Calculate the loss rate and accuracy of fault identification and output the results.
[0062] The advantages and effects of the present invention are:
[0063] The advantages and positive effects of the present invention are:
[0064] (1) The parallel structure of LSTM-CNN is used to fully extract the bearing fault features. This method uses the local connection characteristics of the convolutional neural network to extract local information. The receptive field of multiple convolutional layers is gradually expanded, and the multiple convolution kernels of different sizes in each convolutional layer can fully learn the local related information between the data. This improves the training efficiency of the model and ensures a high degree of robustness.
[0065] (2) The attention mechanism is introduced to divide the weights of features extracted from different channels. By dynamically adjusting the weights of different channels, the model can capture key features more effectively and improve the discriminability of the model.
[0066] (3) The introduction of the BiGRU algorithm enables the model to consider both past and future information at each time step, thereby more comprehensively understanding and modeling time series data and further mining feature information. Therefore, the model can better adapt to different sequence patterns and achieve more effective fault detection.
[0067] The accuracy of the method proposed in the present invention in bearing fault detection can reach 100%, successfully realizing the accurate diagnosis of bearing faults, and showing higher stability. In addition, through the verification of multiple visual analysis, we further confirmed the effectiveness of this method, and it has significant advantages over traditional deep learning models. In short, the method of the invention greatly improves the accuracy of bearing fault detection in industrial processes. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 The present invention is a schematic diagram of a bearing data acquisition test bench based on Case Western Reserve University;
[0069] Figure 2 It is a flow chart of the bearing fault detection model based on parallel LSTM-CNN and BiGRU neural network of the present invention;
[0070] Figure 3 The present invention is a structural diagram of a bearing fault detection model based on parallel LSTM-CNN and BiGRU neural networks;
[0071] Figure 4 The loss rate curve of the training set and the test set when the learning rate parameter of the present invention is set to 0.01;
[0072] Figure 5 The accuracy curve of the training set and the test set when the learning rate parameter of the present invention is set to 0.01;
[0073] Figure 6 A visualization diagram of the initial data feature distribution of the present invention;
[0074] Figure 7 This is a visualization diagram of the data features of the present invention after passing through the LSTM and CNN neural network layers;
[0075] Figure 8 This is a visualization diagram of the data features of the present invention after passing through the BiGRU neural network layer;
[0076] Fig. 9 This is a visualization diagram of the data features of the present invention after passing through the global average pooling layer and the Softmax layer;
[0077] Fig.10 It is a confusion matrix diagram of the detection results of each fault category according to the present invention. DETAILED DESCRIPTION
[0078] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0079] The present invention takes the bearing data collected by the test bench of Case Western Reserve University as an example. The schematic diagram of the test bench is as follows: Figure 1 As shown in the figure, the flow chart of the bearing fault detection model based on parallel LSTM-CNN and BiGRU neural network is as follows Figure 2 As shown in the figure, the bearing fault detection model architecture based on parallel LSTM-CNN and BiGRU neural network is shown in Figure 3 shown.
[0080] Specific experimental steps:
[0081] Step 1: Collect bearing sample data under different working conditions of the test bench. The data set collection platform of the Case Western Reserve University (CWRU) Bearing Data Center is mainly composed of motors, power testers and torque sensors. The data set includes four types of working conditions, including normal, outer ring fault, inner ring fault, and rolling element fault. Each fault type contains three damage diameters, namely 0.1778mm, 0.3556mm and 0.5334mm. Therefore, the experimental data includes nine sets of fault data and one set of normal data. This experiment uses the SKF-6205 drive end shaft, the bearing speed is 1772r / min, the signal sampling frequency is 12kHz, the sampling length of each sample is set to 1024, 300 samples are sampled for each bearing state, and they are divided into training set and test set according to 7:3. In this experiment, LSTM and CNN are used to extract data features at the same time: the LSTM processing flow is shown in formulas (23)-(28):
[0082] f t =σ(W f h t-1 +W f X t +b f ) (twenty three)
[0083] i t =σ(W i h t-1 +W i X t +b i ) (twenty four)
[0084]
[0085] O t =σ(W o h t-1 +W o X t +b o ) (27)
[0086] h t =O t *tanh(C t ) (28)
[0087] Among them, formula (23) is the forget gate calculation formula, which is responsible for calculating and determining the cell information that needs to be forgotten from the previous moment, W f is the weight matrix of the forget gate, b f is the forget gate bias vector. Formula (24) (25) is the input gate calculation formula, which is responsible for determining the information that needs to be updated and then using this information to create a new cell state, W i is the input gate weight vector, b i is the input gate bias vector. Formulas (26)-(28) are the input gate calculation formulas, which determine the final output information of the neuron, W o is the output gate weight vector, b o is the output gate bias vector.
[0088] The CNN processing flow is shown in formulas (29)-(31):
[0089]
[0090] Among them, formula (29) is the calculation formula of the convolution process, is the jth element of the output vector of the lth layer; is the i+jth element of the input vector of the lth layer; is the bias term of the jth element in the lth layer; w j is the jth weight of the convolution kernel; σ(·) is the ReLU activation function. The convolution layer mainly performs convolution operations on the input data through a set of weighted convolution kernels, and then uses a nonlinear activation function to extract features from the input data. Formulas (30) and (31) are the maximum pooling or average pooling calculation formulas, where l(i,n) represents the activation value of the nth neuron in the i-th channel of the l-th layer, H represents the sliding window size, and v l(i,n)Represents the result of pooling the jth neuron in the i-th channel of the current layer l. The pooling layer completes the dimensionality reduction of the data through the operation of maximum pooling or average pooling. This study mainly uses a two-layer LSTM network to extract global spatiotemporal features of the input data. The hidden state of the first layer LSTM output is used as the input of the second layer LSTM. Then, the data features extracted by the two layers of LSTM are pooled and passed to the attention layer for weighted calculation. The architecture of the CNN network consists of four convolutional layers and two pooling layers. After each convolutional layer extracts the data features, the batch normalization layer is used to speed up the network training speed and reduce the overfitting of the network. The pooling layer reduces the dimensionality of the convolutional features, and then fuses them with the data features extracted by LSTM and inputs them into the attention layer.
[0091] Step 2: Input the data extracted by LSTM and CNN into the attention layer. Because the data features extracted by LSTM and CNN are relatively redundant, the model designs an attention layer to screen key features. The attention layer mainly uses the attention mechanism to perform weighted summation calculations on the data features extracted by LSTM and CNN, and then determines the contribution of different data features to the final output results based on the attention weights of each time step, and filters out non-critical information. This not only improves the accuracy of the model's fault detection, but also speeds up the model's training. The attention layer design of this study is as follows:
[0092] First, perform global maximum pooling on the features on each channel to obtain the maximum feature vector z on each channel c , the calculation formula is shown in (32):
[0093]
[0094] Where L is the length and C is the number of channels. The maximum feature vector z on each channel is c The final weight vector s is obtained by two one-dimensional convolutional layers, a ReLU activation function layer, and a Sigmoid activation function. The calculation formulas are shown in (33)-(36):
[0095] s c =Conv1d 1 (z c ) (33)
[0096] s c =ReLU(s c ) (34)
[0097] s c =Conv1d 2 (s c ) (35)
[0098] s c=σ(s c ) (36)
[0099] Where σ is the Sigmoid activation function.
[0100] Finally, use the generated channel weight vector s to adjust the original features Figure X Each channel of is readjusted to enhance the important channel features and suppress the unimportant channel features. The calculation formula is shown in (37):
[0101]
[0102] In the formula, s c is the value of the cth channel in the channel weight s, X i,c is the input feature Figure X The value at position i and channel c.
[0103] Step 3: This study inputs the data processed by the attention layer into the BiGRU neural network. In order to further improve the accuracy of model fault detection and dig deeper into data features, the data features weighted by the attention layer are input into the BiGRU layer to extract higher-level features. BiGRU can consider both past and future information at each time step, which helps the model to more comprehensively understand and model time series data, thereby better adapting to different sequence patterns and improving the model's fault detection rate.
[0104] The BiGRU processing flow is shown in formulas (38)-(40):
[0105]
[0106] In the formula, h 1 (t) and h 2 (t) are the hidden states of forward propagation and backward propagation, respectively, and h 1 (t-1) and h 2 (t+1) are the hidden states of the previous moment and the next moment relative to a certain moment, respectively, x (t) and H (t) are the input and output at time t, σ(·) is the Sigmoid activation function, U and W are weight matrices, and the arrows indicate the propagation direction.
[0107] Step 4: Considering that BiGRU often passes the output of the last hidden neuron cell to the subsequent neural network and ignores the information of other GRU cells, the model designs a global average pooling, which can comprehensively consider the feature output of each GRU, while also reducing the pressure of model training and improving detection efficiency. For one-dimensional data, assuming that the input feature Figure X The dimension is L×C, where L is the length and C is the number of channels. The global average pooling formula for one-dimensional data is as follows:
[0108]
[0109] Step 5: After global pooling, the data features will be transmitted to the fully connected layer to complete the data classification, and then pass through the Softmax layer to convert the final result into a probability estimate to improve the accuracy of the classification result. The Softmax layer performs fault classification, and the result is a number between 0 and 1. Finally, it is compared with the fault value set in advance. The one with a larger proportion can be identified as this type of fault, thereby completing the fault diagnosis. The Softmax formula is as follows:
[0110]
[0111] In the formula, k is a specific category, n is the number of categories, and v is the value of the category.
[0112] Step 6: The cross entropy loss function measures the performance of the model in the classification task by calculating the difference between the true label distribution and the predicted probability distribution. Therefore, this study uses the cross entropy loss function for fault classification, calculates the cross entropy loss function between the predicted value and the actual label, continuously updates the model network parameters, and saves the best performing model for subsequent testing. The formula of the cross entropy loss function is as follows:
[0113]
[0114] In the formula, y represents the true label of the sample, Indicates the label predicted by the model. When y=1, it means the sample belongs to the positive class; when y=0, it means the sample belongs to the negative class.
[0115] Step 8: Fault detection phase, the process is as follows:
[0116] 1) In order to achieve the best detection effect of the model, this study inputs the training set into the model for training, calculates the target loss function of the model, and uses the gradient descent method to update the network weights. After multiple parameter adjustments, this study finally determined that the BatchSize of the model was set to 128, the number of iterations was 120, and the pooling type was maximum pooling. In addition, in order to make the model converge faster, this study selected the Adam optimizer, which can effectively reduce the oscillation of parameter weights and stabilize the optimization process to a certain extent, thereby achieving better optimization results. When the model training times reach the number of iterations and meet the performance requirements, save the model network parameters.
[0117] 2) Input the test set into the model saved in the training phase for fault detection.
[0118] Analysis of simulation experiment results:
[0119] In this embodiment, the fault detection accuracy of the training set and the test set can reach 100% after 40 iterations. It can be seen from the results that the fault detection model of the invention has a good fault detection performance based on the two statistics of comprehensive loss rate and accuracy.
[0120] Next, the fault detection performance of the present invention is analyzed. Figure 4 and Figure 5 It can be seen that when the learning rate parameter of the model is set to 0.01, the loss rate curve and accuracy curve of the training set perform best. After the 40th iteration, they are basically stable and converge quickly. The fault detection rate of the training set can reach 100%, which greatly enhances the accuracy and stability of the model. The loss rate curve and accuracy curve of the test set can also achieve relatively high accuracy at a faster speed and remain stable. The fault detection rate of the test set can reach 100% after 40 iterations. In summary, the improved traditional neural network fault detection model in this study has a high accuracy.
[0121] from Figure 6 It can be seen that the initial state distribution of the signal is relatively chaotic, and the fault samples and normal samples are randomly distributed together. Figure 7 It means that after the signal features pass through the LSTM and CNN neural networks, although there is obvious separation, there is no aggregation, and the categories are too close to each other, so the effect is not very ideal. Figure 8 It means that the features extracted by LSTM and CNN are fused and weighted, and then BiGRU is used to learn the features more deeply and comprehensively. Figure 8 It can be seen that with the increase of neural networks, the data features have been completely distinguished and clustered, and the distances between different categories are far apart. Fig. 9This means that after the features are learned by the fully connected layer, samples of different categories are farther apart and clustered in their respective areas, and the data set is accurately divided into ten groups. In summary, the use of multi-layer neural networks is very helpful in improving model performance.
[0122] In order to further verify the model's recognition results for each fault category, this study introduced a multi-classification confusion matrix for detailed analysis. Fig.10 As shown in the confusion matrix, the horizontal axis represents the predicted label of the model, the vertical axis represents the true label, and the numbers on the main diagonal represent the number of samples of each normal state correctly identified by the model. In addition, the data in each column of the confusion matrix represents the correct and incorrect classification of samples, as well as the situation where a certain fault is mistakenly identified as other faults. The experimental results show that all ten fault types have achieved 100% accuracy on the test set, indicating that the method proposed in the present invention has a good effect in fault identification.
[0123] In summary, the invention effectively improves the fault detection performance and fully verifies the effectiveness and feasibility of the fault detection method of the invention.
[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope defined by the claims of the present invention.
Claims
1. A bearing fault detection method based on parallel LSTM-CNN and BiGRU, It is characterized in that The method comprises the following steps: Step 1: Collect bearing sample data sets under different working conditions in industrial processes and divide the data sets into training sets and test sets; Then, LSTM and CNN are used to extract features from the original data simultaneously. The LSTM processing flow is shown in formulas (1)-(6): At time t, X t 、h t The forget gate is responsible for calculating and determining the cell information that needs to be forgotten from the previous moment. The calculation formula of the forget gate is: f t =σ(W f h t-1 +W f X t +b f ) (1) Where W f is the weight matrix of the forget gate, b f is the forget gate bias vector, σ is the Sigmoid activation function; The input gate determines the information that needs to be retained and creates a new cell state. First, it determines the information that needs to be updated, and then uses this information to create a new cell state. The input gate calculation formula is as follows: i t =σ(W i h t-1 +W i X t +b i ) (2) Where W i is the input gate weight vector, b i is the input gate bias vector, tanh is the hyperbolic tangent activation function; Linear processing of the results of formula (2) and formula (3) can obtain the state of the neuron at this moment, as shown in formula (4): Finally, the output gate determines the information that the neuron ultimately outputs. The output calculation formula is as follows: O t =σ(W o h t-1 +W o X t +b o ) (5) h t =O t *tanh(C t ) (6) Where W o is the output gate weight vector, b o is the output gate bias vector; The CNN processing flow is shown in formulas (7)-(10): In the formula, is the jth element of the output vector of the lth layer; is the i+jth element of the input vector of the lth layer; is the bias term of the jth element in the lth layer; w j is the jth weight of the convolution kernel; σ((·) is the ReLU activation function; The Relu function is widely used in neural network models because of its fast convergence speed and ability to avoid gradient disappearance. Its calculation formula is: The pooling layer is an indispensable part of the convolutional neural network. It has two modes: maximum pooling and average pooling. It is used to deal with the problem of high data dimension and overfitting after convolution. Its calculation formula is: In the formula, l(i,n) represents the activation value of the nth neuron in the i-th channel of the l-th layer, H represents the sliding window size, and v l(i,n) Represents the result of pooling the jth neuron in the i-th channel of the current l-th layer; Step 2: Input the data extracted by LSTM and CNN into the attention layer. Because the data features extracted by LSTM and CNN are relatively redundant, the model designs an attention layer to screen key features. First, perform global maximum pooling on the features on each channel to obtain the maximum feature vector z on each channel c , the calculation formula is shown in (11): Where L is the length and C is the number of channels; the maximum eigenvector z on each channel is c The final weight vector s is obtained by two one-dimensional convolutional layers, ReLU activation function layer and Sigmoid activation function respectively. The calculation formula is shown in (12-15): s c =Conv1d 1 (z c ) (12) S c =ReLU(s c ) (13) s c =Conv1d 2 (s c ) (14) s c =σ(s c ) (15) Where σ is the Sigmoid activation function; Finally, the generated channel weight vector s is used to readjust each channel of the original feature map X to enhance important channel features and suppress unimportant channel features. The calculation formula is shown in (16): In the formula, s c is the value of the cth channel in the channel weight s, X i,c is the value of the input feature map X at position i and channel c; Step 3: Input the data processed by the attention layer into the BiGRU neural network. In order to further improve the accuracy of model fault detection and to dig deeper into data features, the data features weighted by the attention layer are input into the BiGRU layer to extract higher-level features. BiGRU considers both past and future information at each time step, which helps the model to understand and model time series data more comprehensively, thereby better adapting to different sequence patterns and improving the fault detection rate of the model. The BiGRU processing flow is shown in formulas (17)-(19): In the formula, h 1 (t) and h 2 (t) are the hidden states of forward propagation and backward propagation, respectively, and h 1 (t-1) and h 2 (t+1) are the hidden states of the previous moment and the next moment relative to a certain moment, respectively, x (t) and H (t) are the input and output at time t, σ(·) is the Sigmoid activation function, U and W are weight matrices, and the arrows indicate the propagation direction; Step 4: Considering that BiGRU often passes the output of the last hidden neuron cell to the subsequent neural network and ignores the information of other GRU cells, the model designs global average pooling, which can comprehensively consider the feature outputs of each GRU, while also reducing the pressure of model training and improving detection efficiency; for one-dimensional data, assuming that the dimension of the input feature map X is L×C, where L is the length and C is the number of channels; the global average pooling formula for one-dimensional data is as follows: Step 5: After global pooling, the data features will be transmitted to the fully connected layer to complete the data classification, and then pass through the Softmax layer to convert the final result into a probability estimate to improve the accuracy of the classification result; the Softmax layer performs fault classification, and the result is a number between 0 and 1, which is finally compared with the fault value set in advance. The one with a larger proportion can be identified as this type of fault, thereby completing the fault diagnosis. The Softmax formula is as follows: In the formula, k is a specific category, n is the number of categories, and v is the value of the category; Step 6: Calculate the cross entropy loss function between the predicted value and the actual label, continuously update the model network parameters, and save the best performing model for subsequent testing; the formula of the cross entropy loss function is as follows: In the formula, y represents the true label of the sample, Represents the label predicted by the model; when y=1, it means that the sample belongs to the positive class; when y=0, it means that the sample belongs to the negative class; Step 7: Fault detection phase, the process is as follows: (1) Collect vibration data, preprocess the original data set, and divide the data set into a training set and a test set; (2) Build a network model and set the model’s hyperparameters, such as the number of network layers, number of channels, batch size, and number of iterations; (3) Input the training set into the model for training, calculate the target loss function of the model, and update the network weights using the gradient descent method; (4) When the model training times reaches the number of iterations and meets the performance requirements, save the model network parameters; otherwise, reset the parameters for training; (5) Input the test set into the trained model to perform fault identification; (6) Calculate the loss rate and accuracy of fault identification and output the results.
Citation Information
Patent Citations
Mechanical vibration fault diagnosis method based on deep learning
CN116592993A
Rolling bearing multi-fault classification and diagnosis method based on MF2-CNN-LSTM model
CN117828437A
Gravity wave instrument fault prediction model and method based on multi-task fusion network
CN118260547A
Data processing method and apparatus, device, and storage medium
WO2024000852A1
Cited By
Rolling bearing fault diagnosis method
CN119357645A
Locomotive wheel polygon damage detection method based on lightweight neural network
CN120507436A
Classroom behavior and emotion collaborative analysis system based on multi-modal AI
CN120708116A
Pump fault detection method based on data fragmentation and gated double-attention neural network
CN121614957A
