A bearing fault detection method based on a residual neural network with cross-attention mechanism
By using a residual neural network based on a cross-attention mechanism, the problems of insufficient targeting and feature extraction in existing bearing fault detection technologies are solved, achieving efficient and accurate fault detection under different operating conditions, and improving detection accuracy and speed.
Patent Information
- Application Number
- CN202310018886.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-06
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2043-01-06
AI Technical Summary
Existing deep learning-based bearing fault detection methods are limited in their specificity and feature extraction capabilities, making it difficult to efficiently and accurately detect rolling bearing faults under different operating conditions.
A residual neural network based on the cross-attention mechanism is adopted. Through multimodal data augmentation, coarse and fine selection of feature extraction networks, and cross-attention mechanism, data feature fusion and defect detection are performed. The network structure is optimized using the Cross-Entropy loss function.
It improves the accuracy and speed of bearing fault detection, can effectively extract data features in complex environments, and is suitable for bearing fault detection under different working conditions.
Smart Images

Figure CN116296392B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of fault detection and relates to a bearing fault detection method based on a residual neural network with a cross-attention mechanism. Background Technology
[0002] Rolling bearings are widely used components in machinery production and manufacturing, and are indispensable in various types of machinery. However, the high-speed and high-temperature environment in which rolling bearings operate can easily lead to various internal failures. Once a bearing fails, it may cause the entire equipment to malfunction or be damaged, resulting in significant economic losses and safety hazards. [1] The methods for detecting faults in rolling bearings are receiving increasing attention.
[0003] Therefore, to ensure the normal and reliable operation of mechanical equipment, it is essential to monitor, provide early warnings, and protect bearings in real time. Traditional methods for inspecting rolling bearings rely on manual labor. This method requires manual operation, is heavily limited by the experience of the workers and the environment, consumes significant manpower and resources, and has limited accuracy. However, using deep learning methods for bearing fault detection is a novel approach that is simpler, more accurate, more efficient, and more economical than traditional manual methods.
[0004] Bearing fault detection tasks require answering whether a fault exists in the bearing during operation and what kind of fault it is. As a type of fault detection task, it relies on processing input data and extracting features. Mathematically, the bearing fault detection problem studies the relationship between input data X and output result Y, where Y is a real number. Taking a binary classification task as an example, Y = 0 represents the detection result as the first category. The classification category is specified. [2] Existing deep learning-based methods for bearing fault detection utilize Convolutional Neural Networks (CNNs), Recurrent Neural Networks (RNNs), and Long Short-Term Memory (LSTM) networks. While these methods offer high accuracy, they also have limitations. For example, they are highly specific, achieving high accuracy only for data on a particular type of bearing under specific operating conditions, and their feature extraction capabilities are insufficient, failing to capture fault characteristics across the entire bearing class. To address these issues, a residual neural network based on a cross-attention mechanism is proposed. Cross-Attention Mechanism [3]A novel feature extraction method is proposed, which can extract data weights between data of different dimensions or different channels. After processing by a cross-attention mechanism, the neural network can extract data features from the input data and complete the extraction and classification of bearing features.
[0005] In the field of bearing fault detection, the technical advantages of the cross-attention mechanism are reflected in the following aspects: by further extracting and segmenting the input data, more accurate data features are obtained, invalid information is filtered out, and ultimately the data is easier to detect and classify. Therefore, the cross-attention mechanism has extremely excellent feature extraction capabilities.
[0006] [1] Lü Fengxia, Miao Yi, Bie Fengfeng, Peng Jian. Fault detection of rolling bearings based on vibration and acoustic emission [J]. Mechanical Design and Research, 2022, 38(01):134-138. DOI:10.13952 / j.cnki.jofmdr.2022.0087.
[0007] [2] Li Chuanxin, Liu Zengli. Bearing fault detection based on time-frequency analysis and VGG19 transfer learning [J]. Electronic Measurement Technology, 2021, 44(05): 161-165. DOI: 10.19651 / j.cnki.emt.2105644.
[0008] [3] Liu Quan, Pei Weichi. Fault diagnosis of rolling bearings based on conditional residual generative adversarial network with self-attention mechanism [J]. Bearing, 2022(11):68-75. DOI:10.19533 / j.issn1000-3762.2022.11.013. Summary of the Invention
[0009] This invention addresses the bearing fault detection problem in industry by providing a residual neural network-based bearing fault detection method based on a cross-attention mechanism. This method can be applied to bearing fault detection under various operating conditions and environments, ensuring extremely high detection accuracy and speed for bearing fault detection in complex and extreme environments. It enables real-time, intelligent, and accurate detection.
[0010] The technical solution of the present invention is as follows:
[0011] The bearing fault detection method based on residual neural network with cross-attention mechanism has the following steps:
[0012] The first step is to preprocess the input data.
[0013] 1.1 Prepare bearing-related time series dataset;
[0014] 1.2 Data Processing
[0015] 1.3 Divide the data, using an even number of data points as a sample point according to the actual task requirements.
[0016] This invention proposes a multimodal data augmentation method for data processing;
[0017] Multimodal data augmentation methods are as follows:
[0018] The original bearing timing data is converted into bearing frequency domain data using Fast Fourier Transform (FFT). The specific formula is as follows, where X(ω) is the continuous spectrum of the timing signal x(t), and x(t) is the signal obtained in the actual control system.
[0019]
[0020] The second step is to extract features from the data.
[0021] 2.1 Training a coarse selection network for feature extraction of bearing data of different modes.
[0022] ResNet18 is used as the coarse selection network for bearing data feature extraction. The original ResNet18 is mainly used for multi-class classification tasks. This invention modifies the ResNet18 network, transforming the classification network into a detection network and a classification network. The specific network structure is as follows: Figure 1 As shown, the max-pooling layer in ResNet18 was removed and used as a coarse selection network for bearing data feature extraction.
[0023] 2.2 Training a Refinement Network for Bearing Data Feature Extraction of Different Modalities. SENet was used as the refinement network for bearing data feature extraction, further extracting features from the coarse-selection network. SENet consists of compression (Squeeze), excitation, and scaling operations. Its structure is as follows: Figure 2 As shown, for compression operations, H represents the width and W represents the height.
[0024]
[0025] For the activation operation, W1 and W2 are the weight coefficients learned by the neural network.
[0026] s = F ex (z,W)=σ(g(z,W))=σ(W2δ(W1z))
[0027] The third step is to perform data feature fusion.
[0028] For the time-series feature data, frequency domain feature data, and time-frequency domain feature data obtained after feature extraction, a pair of them are input into a cross-attention mechanism to obtain the data feature weights from each modality, where AvgPool represents the average pooling operation and MaxPool represents the max pooling operation.
[0029] M c (F)=σ(MLP(AvgPool(F))+MLP(MaxPool(F)))
[0030] The data features (feature maps) generated after the cross-attention mechanism are concatenated by channel for subsequent defect detection. Simultaneously, the generated data features (feature maps) are resized to meet specific task requirements and then concatenated to obtain the final feature map.
[0031] The fourth step is to perform data defect detection.
[0032] For the feature map output after feature fusion, four fully connected layers are added to perform nonlinear transformations on the extracted data features to determine whether the bearing has failed and the type of failure. The number of nodes in each fully connected layer is 12248, 2048, 512, and 128, respectively, and its structure is as follows: Figure 3 As shown, during network training, the Cross-Entropy loss function is used to calculate the loss value and difference between the classification categories. The specific formula is: where y and y ~ It refers to the fault category output by the neural network and the actual fault category.
[0033]
[0034] Simultaneously, the parameters of the overall network structure are adjusted, and the parameters of the fully connected layer are adjusted according to the total number of fault classification categories required by the actual task.
[0035] The final network structure is as follows Figure 4 As shown.
[0036] The fifth step is to input the processed data into the network to obtain the corresponding fault detection category and detection results.
[0037] The beneficial effects of this invention are:
[0038] Compared with the original technology, this method has a wider range of applicability to bearing fault data and higher accuracy. It can effectively improve the accuracy and speed of bearing fault detection in complex environments. Through the cross-attention mechanism, it can better extract data features. Attached Figure Description
[0039] Figure 1 Schematic diagram of the coarse selection network for bearing data feature extraction;
[0040] Figure 2 Schematic diagram of the fine-selection network for bearing fault feature extraction;
[0041] Figure 3 Defect detection diagram;
[0042] Figure 4 Residual neural networks based on cross-attention mechanism;
[0043] Figure 5 A schematic diagram illustrating the accuracy of bearing fault classification using a temporal convolutional network.
[0044] Figure 6 A schematic diagram illustrating the bearing fault classification accuracy of a residual neural network based on a cross-attention mechanism.
[0045] Figure 7 A schematic diagram of the loss values for bearing fault classification in a temporal convolutional network;
[0046] Figure 8 A schematic diagram of the loss value for bearing fault classification in a residual neural network based on the cross-attention mechanism. Detailed Implementation
[0047] To make the technical solution of the present invention clearer, the present invention will be further described below with reference to the accompanying drawings. The present invention is implemented in specific steps:
[0048] The bearing fault detection method based on residual neural network with cross-attention mechanism has the following steps:
[0049] The first step is to preprocess the input data.
[0050] (1) Prepare bearing-related time series dataset
[0051] Bearing time-series data acquired by a drive-end bearing testing device with a sampling frequency of 12kHz was selected as the testing dataset. Each time-series data point was divided into 4096 segments and treated as a single sample, with the fault type and fault number labeled accordingly. To accommodate the neural network structure, all sample data were normalized to a size of 1*1*4096, which was used to train bearing fault diagnosis and fault identification.
[0052] (2) Perform data processing
[0053] Considering the non-Gaussian and non-stationary characteristics of bearing time-series data, this invention proposes a multimodal data enhancement method to improve the robustness and recognition accuracy of the method. This method converts the original bearing time-series data into bearing frequency domain data and bearing time-frequency domain data, where the conversion from time-series data to frequency domain data is achieved using Fast Fourier Transform. Here, X(ω) represents the continuous spectrum of the time-series signal x(t), and x(t) is the signal obtained from the actual control system.
[0054]
[0055] After converting the original bearing time-series data into bearing frequency-domain data, the frequency-domain data can clearly and intuitively detect abnormal fluctuations in the data at a certain moment, which is helpful in determining whether the bearing has failed. To further highlight the fault information and characteristics present in the bearing time-series data and improve the method's recognition accuracy, this invention further processes the bearing time-series data and the bearing frequency-domain data obtained through Fast Fourier Transform (FFT) to create time-frequency domain data. This process is implemented using the `matplotlib.pyplot.Specgram` function, with the horizontal axis representing time and the vertical axis representing frequency. A Hanning window is used, and integration on the returned frequency values is allowed. After processing, the resulting bearing time-frequency domain data has a size of 640*480. After removing white borders, the final data size is 480*480. Simultaneously, the time-series data is regularized, where x represents the input data, x... ~ Indicates the output data, x min x represents the minimum value of the data in the sample. max This represents the maximum value of the data in the sample.
[0056] x ~ =(xx) min ) / (x max -x min )
[0057] (3) Perform data partitioning
[0058] An even number of data points are used as a sample point, according to the actual task requirements.
[0059] The second step is to extract data features.
[0060] (1) Training a coarse selection network for bearing data feature extraction using different modalities. ResNet18 is used as the coarse selection network for bearing data feature extraction. The original ResNet18 is mainly used for multi-class classification tasks. This invention modifies the ResNet18 network, transforming the classification network into a detection network and a classification network. The specific network structure is as follows: Figure 1 As shown, the max-pooling layer in ResNet18 was removed and used as a coarse selection network for bearing data feature extraction.
[0061] (2) Training a fine-tuning network for bearing data feature extraction using different modalities. SENet is used as the fine-tuning network for bearing data feature extraction, further extracting features obtained from the coarse-tuning network. SENet consists of compression (Squeeze), excitation, and scaling operations. Its structure is as follows: Figure 2 As shown, for compression operations, H represents the width and W represents the height.
[0062]
[0063] For the activation operation, W1 and W2 are the weight coefficients learned by the neural network.
[0064] s = F ex (z,W)=σ(g(z,W))=σ(W2δ(W1z))
[0065] The third step is to perform data feature fusion.
[0066] For the time-series feature data, frequency domain feature data, and time-frequency domain feature data obtained after feature extraction, a pair of them are input into a cross-attention mechanism to obtain the data feature weights from each modality, where AvgPool represents the average pooling operation and MaxPool represents the max pooling operation.
[0067] M c (F)=σ(MLP(AvgPool(F))+MLP(MaxPool(F)))
[0068] The data features (feature maps) generated after the cross-attention mechanism are concatenated by channel for subsequent defect detection. Simultaneously, the generated data features (feature maps) are resized to meet specific task requirements and then concatenated to obtain the final feature map.
[0069] The fourth step is to perform data defect detection.
[0070] For the feature map output after feature fusion, four fully connected layers are added to perform nonlinear transformations on the extracted data features to determine whether the bearing has failed and the type of failure. The number of nodes in each fully connected layer is 12248, 2048, 512, and 128, respectively, and its structure is as follows: Figure 3 As shown, during network training, the Cross-Entropy loss function is used to calculate the loss value and difference between the classification categories. The specific formula is: where y and y ~ These are the fault categories output by the neural network and the actual fault categories. The specific formula is: where y and y ~It refers to the fault category output by the neural network and the actual fault category. The constructed network structure is as follows: Figure 4 As shown.
[0071]
[0072] Simultaneously, the parameters of the overall network structure are adjusted, and the parameters of the fully connected layer are adjusted according to the total number of fault classification categories required by the actual task.
[0073] Fifth step: Test the detection performance of this system.
[0074] (1) During testing, the collected bearing timing data samples are input into the temporal convolutional network and the residual neural network based on the cross attention mechanism proposed in this invention to perform a ten-classification task, and output the fault detection results and fault classification respectively. The final fault classification task is shown in Table 1.
[0075] Table 1 Fault Classification Tasks
[0076] Fault type Fault Description Fault Number Normal_BaseLine_Data Normal baseline data 0 B007 0.007-inch rolling element failure 1 B014 0.014-inch rolling element failure 2 B021 0.021-inch rolling element failure 3 IR007 0.007-inch inner ring fault 4 IR014 0.014-inch inner ring fault 5 IR021 0.021-inch inner ring fault 6 0R007@3, OR007@6, OR007@12 0.007-inch outer ring fault 7 OR014@3, OR014@6, OR014@12 0.014-inch outer ring fault 8 OR021@3, OR021@6, OR021@12 0.021-inch outer ring fault 9
[0077] (2) This invention compares the detection results using a residual neural network based on a cross-attention mechanism and a temporal convolutional network. From Figure 5 As can be seen, the accuracy of using temporal convolutional networks for fault detection and fault classification tasks is 96.33%. Figure 6 As can be seen, the detection accuracy using the attention-based residual neural network is 99.45%. Figure 7 As can be seen, the loss value using the temporal neural network is 44.05. Figure 8 As can be seen, the loss value of the residual neural network based on the attention mechanism is reduced to 0.8613, indicating that the method can effectively improve the accuracy of bearing fault detection tasks.
Claims
1. A bearing fault detection method based on a residual neural network using a cross-attention mechanism, characterized by the following steps: The first step is to preprocess the input data; 1.1 Prepare bearing-related time series dataset; 1.2 Data Processing A multimodal data augmentation method is proposed for data processing. The original bearing time series data is converted into bearing frequency domain data and bearing time-frequency domain data using fast Fourier transform. The specific formula is as follows, where X(ω) is the continuous spectrum of the time series signal x(t), and x(t) is the signal obtained in the actual control system. This method further processes the bearing time-series data and the bearing frequency-domain data obtained through Fast Fourier Transform (FFT) to create time-frequency domain data. This is achieved using the `matplotlib.pyplot.Specgram` function, with the horizontal axis representing time and the vertical axis representing frequency. A Hanning window is used, and integration on the returned frequency values is allowed. After processing, the resulting bearing time-frequency domain data has a size of 640*480. After removing white borders, the final data size is 480*480. Simultaneously, the time-series data is regularized, where x represents the input data. ~ Indicates the output data, x min x represents the minimum value of the data in the sample. max This represents the maximum value of the data in the sample; x ~ =(xx) min ) / (x max -x min ) 1.3 Divide the data, using an even number of data points as a sample point according to the actual task requirements; The second step is to extract features from the data. 2.1 Training a coarse-selection network for feature extraction of bearing data in different modes; ResNet18 was used as the coarse selection network for bearing data feature extraction. 2.2 Training a fine-tuning network for bearing data feature extraction of different modes; SENet is used as the fine-tuning network for bearing data feature extraction to further extract the feature data obtained by the coarse-tuning network for bearing data feature extraction; The third step is to perform data feature fusion. For the time-series feature data, frequency domain feature data, and time-frequency domain feature data obtained by the feature extraction module, the two are input into a cross-attention mechanism to obtain the data feature weights from each modality, where AvgPool represents the average pooling operation and MaxPool represents the max pooling operation. M c (F)<σ(MLP(AvgPool(F))+MLP(MaxPool(F))) The feature maps generated after the cross-attention mechanism are stitched together by channel for use by the subsequent defect detection module; at the same time, the size of the generated feature maps is corrected to meet the specific task requirements, and then stitched together to obtain the final feature map. The fourth step is to perform data defect detection. For the feature map output by the feature fusion module, four fully connected layers are added to perform nonlinear transformations on the extracted data features to determine whether the bearing has failed and the type of failure. The number of nodes in each fully connected layer is 12248, 2048, 512, and 128, respectively. During network training, the Cross-Entropy loss function is used to calculate the loss value and difference for each classification category; the specific formula is: where y and y ~ It refers to the fault category output by the neural network and the actual fault category; At the same time, the parameters of the overall network structure are adjusted, and the parameters of the fully connected layer are adjusted according to the total number of fault classification categories required by the actual task. The fifth step is to input the processed data into the network; The segmented data is input into the network to obtain the corresponding fault detection categories and detection results.
2. The bearing fault detection method based on the cross-attention mechanism of residual neural network as described in claim 1, characterized in that, in step 2.1, the ResNet18 network is modified, the classification network is changed into a detection network and a classification network, and the max pooling layer in ResNet18 is deleted as a coarse selection network for bearing data feature extraction.
3. The bearing fault detection method based on a residual neural network with a cross-attention mechanism as described in claim 1 or 2, characterized in that, In step 2.2, the SENet consists of compression, excitation, and scaling operations; for the compression operation, H represents the width and W represents the height. For the activation operation, W1 and W2 are the weight coefficients learned by the neural network; s=F ex (z,W) = σ(g(z,W)) = σ(W2δ(W1z)).
4. The bearing fault detection method based on a residual neural network with a cross-attention mechanism as described in claim 1 or 2, characterized in that, In the first step, bearing timing data obtained by a drive-end bearing testing device with a sampling frequency of 12kHz is selected as the testing dataset. Every 4096 timing data points are divided and treated as a sample, and their fault types and fault numbers are labeled.
5. The bearing fault detection method based on a residual neural network with a cross-attention mechanism as described in claim 3, characterized in that, In the first step, bearing timing data obtained by a drive-end bearing testing device with a sampling frequency of 12kHz is selected as the testing dataset. Every 4096 timing data points are divided and treated as a sample, and their fault types and fault numbers are labeled.
Citation Information
Patent Citations
A rolling bearing fault identification method under variable working conditions based on ATT-CNN
CN109902399A
Bearing fault diagnosis method and system based on bilinear feature fusion
CN113780151A