A bearing fault diagnosis method based on attention mechanism and convolutional gated recurrent unit model
By combining attention mechanism and convolutional gating cycle unit model in bearing fault diagnosis, the problems of insufficient data utilization and incomplete feature extraction are solved, and more efficient bearing fault diagnosis is achieved, reducing errors and improving diagnosis. Accuracy and interpretability.
Patent Information
- Application Number
- CN202111449350.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-01
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2041-12-01
AI Technical Summary
In the prior art, inadequate data utilization, incomplete feature extraction and redundant feature interference in bearing fault diagnosis, resulting in insufficient accuracy of fault judgment.
Using the method based on attention mechanism and convolutional gating recurrent unit model, features are extracted through convolutional neural network, attention mechanism module screens out significant features and inputs them into the gated recurrent unit to capture the time correlation of time sequence data. Finally, Use the softmax classifier to output the classification tag.
It improves the accuracy of bearing fault diagnosis, maximizes the use of information in different dimensions of bearings, reduces errors, and is intelligent, robust and simple and interpretable in the model.
Smart Images

Figure CN114118282B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of bearing fault diagnosis based on deep learning, and in particular to a bearing fault diagnosis method based on an attention mechanism and a convolutional gated recurrent unit model. Background Art
[0002] As one of the core components of mechanical equipment, the health of rolling bearings is a key factor in ensuring the normal operation of the equipment. According to relevant literature statistics, about 30% of the faults are caused by fault damage. Once a large-scale mechanical failure is caused by a bearing failure, it will cause problems in the operation of the entire system, which will inevitably lead to immeasurable personal and property losses. Therefore, the research on bearing fault diagnosis technology has important economic value and social benefits.
[0003] With the rapid development of artificial intelligence and big data technology, intelligent fault diagnosis technology has gradually become a hot issue in the industrial field as an important means to ensure the safe operation of mechanical equipment in the context of industrial big data. Fault diagnosis has also made new research progress with the help of deep learning technology. As typical technologies of deep learning, attention mechanism, convolutional neural network (CNN) and gated recurrent unit (GRU) have also made great progress in the research of fault diagnosis.
[0004] CNN can reduce the number of parameters that need to be trained by optimizing using local receptive fields and weight distribution strategies, effectively reducing the computational burden during training. However, the translation invariance and pooling layer of CNN will cause a lot of very valuable spatial information to be lost, and the association between the local and the whole is also ignored. For sequence signals, there is a lack of long-term dependencies between the internal ones. However, this long-term dependency hidden within the sequence is considered to be a feature that helps fault diagnosis. GRU is a variant of the Long Short Term Memory (LSTM). LSTM has three different gate structures, many parameters, and is difficult to train. GRU only contains two gate structures. When all hyperparameters are tuned, the performance of the two is comparable, and the GRU structure is simpler and easier to implement. The gating mechanism is to better capture the dependency of the time step distance in the time series. It controls the flow of information through the learned gates. The gating mechanism controls the input and memory and makes predictions at the current time step. The characteristic of the gating mechanism is that it can preserve the information in the sequence for a long time and will not disappear over time. Similarly, although GRU solves the gradient vanishing and gradient exploding problems of recurrent neural networks in fault diagnosis of time series data, its inherent sequentiality makes the GRU model fail to take into account the local characteristics of the data, which will lead to incomplete feature extraction, insufficient data utilization, and information loss. Summary of the invention
[0005] Purpose of the invention: The purpose of the present invention is to overcome the problems of insufficient data utilization, incomplete feature extraction, and redundant features interfering with fault judgment, and to propose a bearing fault diagnosis method based on attention mechanism and convolutional gated recurrent unit model.
[0006] To achieve the above object, the present invention adopts the following technical solution:
[0007] A bearing fault diagnosis method based on an attention mechanism and a convolutional gated recurrent unit model comprises the following steps:
[0008] Step a, dividing the data set into a training set and a test set, and normalizing the original signal;
[0009] Step b, converting the normalized data in step a into two-dimensional grayscale images corresponding to different fault conditions and setting corresponding labels;
[0010] Step c, inputting the grayscale image obtained in step b into a convolutional neural network (CNN) for feature extraction;
[0011] Step d: Use the attention mechanism module to extract the salient features of the image and constrain the output value to be between 0 and 1;
[0012] Step e, multiplying the features extracted from the convolutional neural network (CNN) in step c by the saliency features output by the corresponding attention mechanism module element by element;
[0013] Step f, input the result of the multiplication in step e into the Gated Recurrent Unit (GRU), and capture the temporal correlation of the time series data through the Gated Recurrent Unit;
[0014] In step g, the softmax classifier is finally used to output the classification label.
[0015] In step a, the bearing signal is normalized by using the min-max normalization method, and the result is mapped to [0, 255]. The specific formula is:
[0016]
[0017] Among them, X is the original data, Xnorm is the result after normalization, Xmax is the maximum value in the original data, and Xmin is the minimum value in the original data. In order to eliminate decimals, the round function is used to round the values.
[0018] In the step b, during the conversion process, a direct conversion method is used to randomly intercept a segment N from the one-dimensional signal. 2 The signal is filled into the N×N matrix row by row, that is, every N signal values can be filled into a row of the matrix, and then the matrix is standardized to obtain the corresponding grayscale image; the filled data is normalized to 0 to 255, and zero padding is used to prevent size loss when the data is input into the convolutional neural network. This reduces the data loss caused by traditional signal processing methods and improves the overall operation efficiency of the model.
[0019] In the step c, the convolutional neural network adopts the structure of LeNet-5, which consists of two parts: a convolutional encoder: consisting of two convolutional layers; and a fully connected layer dense block: consisting of three fully connected layers.
[0020] In step d, the attention mechanism module in parallel with the convolutional neural network is used to extract the salient features of the image. At the same time, the output of the attention mechanism module is consistent with the output dimension of the convolutional neural network, and its output value is constrained between 0 and 1 by the Sigmoid function. The specific formula is:
[0021]
[0022] Among them, x is the output result of the attention mechanism module.
[0023] The present invention adds an attention mechanism module in parallel with the CNN module, so that the model can obtain more comprehensive context information, that is, it can distinguish the features extracted from the CNN network with different importance levels, and improve the influence of more important features through the attention mechanism, so as to better obtain the features of the grayscale image and improve the accuracy of the fault diagnosis task; for unimportant features, their influence level is reduced, and the interference ability of unimportant features on the model is suppressed.
[0024] In step f, the key features extracted in step e are input into the gated recurrent unit. The complete gated recurrent unit includes multiple computing units, and its forward transfer is described as:
[0025] z t =σ(W xz x t +W hz h t-1 +b z )
[0026] r t =σ(W xr x t +W hr h t-1 +b r )
[0027]
[0028]
[0029] y t =σ(W o ·H t )
[0030] Among them, z t With r t represents the update gate and reset gate; With H t is the candidate hidden state and hidden state; x t is the data input for a given time step t; y t is the output layer output; W xz , W hz , W xr , W hr , W o Both represent the weight matrix of the corresponding link; b z , b r , They all represent the bias vector of the corresponding link; σ is the sigmoid function; tanh is the hyperbolic tangent function; ⊙ is the dot product.
[0031] In step f, GRU is used to extract data correlation and time dependency between sample data. Compared with the Long Short Term Memory (LSTM) network, GRU only contains two gating structures, and when all hyperparameters are tuned, the performance of the two is comparable, but the GRU structure is simpler and easier to implement; at the same time, GRU can also effectively solve the gradient vanishing and gradient exploding problems of ordinary recurrent neural networks.
[0032] Beneficial effects: The present invention proposes a bearing fault diagnosis method based on attention mechanism and convolutional gated recurrent unit model, which has the following advantages:
[0033] (1) In the data conversion process, a direct conversion method is adopted, that is, the one-dimensional vibration signal is randomly intercepted with a fixed-length signal and filled into a matrix of corresponding size row by row, which reduces the data loss caused by traditional signal processing methods and improves the overall operation efficiency of the model.
[0034] (2) The classic convolutional neural network and attention mechanism modules are used in parallel to multiply the two results element by element, which effectively ensures that the result is more critical feature information and shields the interference of redundant features.
[0035] (3) The Convolutional Neural Network (CNN) is used as the front end to extract bearing signal features, and the Gated Recurrent Unit (GRU) is used as the back end to mine the temporal nature of bearing data for bearing fault diagnosis, thereby reducing the error of bearing fault diagnosis and maximizing the use of information in different dimensions of the bearing.
[0036] (4) The method of the invention can automatically learn features and has good intelligence and robustness. The model is simple and interpretable, and is easy for operators to understand and promote. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 This is the overall algorithm flow chart of the bearing fault diagnosis method based on the attention mechanism and convolutional gated recurrent unit model;
[0038] Figure 2 It is the basic principle diagram of converting vibration signal into grayscale image;
[0039] Figure 3 This is the schematic diagram of the zero-filling method;
[0040] Figure 4 It is a convolutional neural network module diagram;
[0041] Figure 5 It is the attention mechanism module diagram;
[0042] Figure 6 It is a diagram of the gated recurrent unit module. DETAILED DESCRIPTION
[0043] The present invention will be further described below in conjunction with the accompanying drawings:
[0044] The purpose of the present invention is mainly to target traditional fault diagnosis methods that either only consider the influence of attribute dimensions or only consider the influence of single attribute time series, without taking these two factors into consideration. The present invention uses the CNN-GRU method to perform fault diagnosis. The CNN layer can implicitly complete the automatic extraction of features, but the importance of different local features is different. In order to obtain more important features, the attention mechanism module is used to increase their influence, thereby better extracting features from the input image; for non-important features, their influence is reduced to suppress the interference of non-important features on the model.
[0045] The present invention provides a bearing fault diagnosis method based on the attention mechanism and convolutional gated recurrent unit model. The prediction data adopts the bearing data set of Case Western Reserve University in the United States, such as Figure 1 The main process of mechanical bearing fault diagnosis is given. It mainly includes the following contents:
[0046] (1) The experimental data comes from the rolling bearing fault vibration data set published by the Bearing Data Center of Case Western Reserve University in the United States. It includes the vibration signals of the rolling bearings at the drive end and the fan end measured by using acceleration sensors under different loads. Each load contains four states of the rolling bearing: normal, ball fault, inner ring fault and outer ring fault, and each fault type contains three different fault degrees, namely 0.07 inch damage diameter, 0.14 inch damage diameter and 0.21 inch damage diameter;
[0047] (2) The data set is divided into a training set and a test set in proportion, and the original signal is preprocessed and normalized using the min-max normalization method, and the result is mapped to the range [0, 255]. The specific formula is:
[0048]
[0049] Among them, X is the original data, X nrom is the result after normalization, X max is the maximum value in the original data, X minIt is the minimum value in the original data. In order to eliminate decimals, the round function is used to round the value.
[0050] (3) The normalized data is directly converted to extract the one-dimensional signal according to a fixed length and fill it into a two-dimensional matrix row by row, converting it into a two-dimensional grayscale image corresponding to different fault conditions and setting corresponding labels;
[0051] (4) Input the obtained grayscale image into the Convolutional Neural Network (CNN) for feature extraction;
[0052] (5) The parallel attention mechanism module is used to extract the salient features of the image. At the same time, the output of the attention mechanism module is consistent with the output dimension of the CNN module, and its output value is constrained between 0 and 1 through the Sigmoid function. The specific formula is:
[0053]
[0054] Among them, x is the output result of the attention mechanism module;
[0055] (6) Multiply the features extracted from CNN by the saliency features output by its corresponding attention mechanism module element by element;
[0056] (7) The multiplication result is input into the gated recurrent unit (GRU) to capture the temporal correlation of the time series data;
[0057] (8) Finally, the softmax classifier is used to output the classification label.
[0058] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A bearing fault diagnosis method based on attention mechanism and convolutional gated recurrent unit model, characterized in that: The following steps are involved: Step a, dividing the data set into a training set and a test set, and normalizing the original signal; Step b, converting the normalized data in step a into two-dimensional grayscale images corresponding to different fault conditions and setting corresponding labels; Step c: Input the grayscale image obtained in step b into the convolutional neural network for feature extraction; the convolutional neural network adopts the structure of LeNet-5, which consists of two parts: Composition: Convolutional encoder: consists of two convolutional layers; Fully connected layer dense block: consists of three fully connected layers; Step d: Use the attention mechanism module in parallel with the convolutional neural network to extract the salient features of the image. At the same time, the output of the attention mechanism module is consistent with the output dimension of the convolutional neural network, and its output value is constrained between 0 and 1 through the Sigmoid function. The specific formula is: Among them, x is the output result of the attention mechanism module; Step e, multiplying the features extracted from the convolutional neural network in step c by the saliency features output by the corresponding attention mechanism module element by element; Step f, inputting the result obtained by multiplication in step e into a gated recurrent unit, and capturing the time correlation of the time series data through the gated recurrent unit; In step g, the softmax classifier is finally used to output the classification label.
2. The bearing fault diagnosis method based on the attention mechanism and convolutional gated recurrent unit model according to claim 1 is characterized in that: In step a, the bearing signal is normalized using the min-max normalization method, and the result is mapped to [0, 255]. The specific formula is: Among them, X is the original data, Xnorm is the result after normalization, Xmax is the maximum value in the original data, and Xmin is the minimum value in the original data. In order to eliminate decimals, the round function is used to round the values.
3. The bearing fault diagnosis method based on the attention mechanism and convolutional gated recurrent unit model according to claim 1 is characterized in that: In the step b, during the conversion process, a direct conversion method is used to randomly intercept a segment N from the one-dimensional signal. 2 The signal is filled into an N×N matrix row by row, that is, every N signal values can be filled into a row of the matrix, and then the matrix is standardized to obtain the corresponding grayscale image; the filled data is normalized to 0 to 255, and zero padding is used to prevent size loss when the data is input into the convolutional neural network.
4. The bearing fault diagnosis method based on the attention mechanism and convolutional gated recurrent unit model according to claim 1 is characterized in that: In step f, the key features extracted in step e are input into the gated recurrent unit. The complete gated recurrent unit includes multiple computing units, and its forward transfer is described as: z t =σ(W xz x t +W hz h t-1 +b z ) r t =σ(W xr x t +W hr h t-1 +b r ) y t =σ(W o ·H t ) Among them, z t With r t represents the update gate and the reset gate; With H t is the candidate hidden state and hidden state; x t is the data input for a given time step t; y t is the output layer output; W xz , W hz , W xr , W hr , W o Both represent the weight matrix of the corresponding link; b z , b r , They all represent the bias vector of the corresponding link; σ is the sigmoid function; tanh is the hyperbolic tangent function; ⊙ is the dot product.
