A gear fault diagnosis method based on improved convolutional neural network under attention mechanism

By reducing the number of channels of the convolutional neural network and introducing the convolution block attention module, the problems of poor feature learning ability and low diagnosis efficiency of traditional CNN in gear fault diagnosis are solved, and higher diagnosis accuracy and learning efficiency are achieved.

CN117315328BActive Publication Date: 2024-10-18HARBIN ENG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311124091.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-01
Publication Date
2024-10-18
Estimated Expiration
2043-09-01

AI Technical Summary

Technical Problem

Traditional convolutional neural networks have problems with poor feature learning ability and low diagnosis efficiency in gear fault diagnosis, and they cannot adaptively select important features, which affects the diagnosis accuracy.

Method used

By reducing the number of network channels, a concise SCCNN model is constructed, and a convolutional block attention module (CBAM) is embedded in the model to adaptively learn key features and improve diagnosis accuracy.

Benefits of technology

It significantly improves the accuracy of gear fault diagnosis, shortens model training time, reduces redundant feature interference, and meets the diagnosis needs in engineering practice.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117315328B_ABST
    Figure CN117315328B_ABST
Patent Text Reader

Abstract

This invention discloses a gear fault diagnosis method based on an improved convolutional neural network with an attention mechanism. The method includes the following steps: 1. Collecting gear vibration data under different fault degrees; 2. Converting the gear vibration data into 2D time-frequency maps through short-time Fourier transform, and dividing the 2D time-frequency map dataset for each fault category into a training sample set and a test sample set; 3. Using AlexNet as the basic framework, constructing a feature extraction module, a feature fusion and classification module with an attention mechanism, forming a CBAM-SCCNN model; 4. Loading the test sample set into the CBAM-SCCNN model, outputting the diagnostic results of gear tooth breakage faults, and testing the model's diagnostic performance. This method accelerates model training and shortens diagnosis time by reducing the number of network channels; and improves the accuracy of gear fault diagnosis by adding an attention module to the model to achieve adaptive learning of key features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a rotating machinery fault diagnosis method, and in particular to a gear fault diagnosis method of an improved convolutional neural network under an attention mechanism. Background Art

[0002] As an important part of the mechanical transmission system, the health status of the gear mechanism is closely related to the performance of the whole machine. Affected by its working conditions, the tooth surface is subjected to impact loads, alternating loads, etc., and the gear performance gradually deteriorates. When the performance state variable reaches the failure threshold, the gear will suffer serious failures, causing great harm to the economy and safety. Therefore, diagnosing the fault degree of the gear mechanism can provide effective support for health management and maintenance decisions.

[0003] With the development of science and technology, the shallow machine learning models used for fault diagnosis in the early days have been unable to adapt to the application in today's big data sample environment and have gradually been replaced by deep learning models. Convolutional neural networks (CNNs) have always played an important role in academic research due to their strong practicality and small number of parameters, but they still have the following two defects:

[0004] First, in order to improve its feature expression performance, traditional CNN usually sets a larger number of channels. Although this can improve network performance, not all channels learn effective feature information. Some channels even learn noise features, which leads to a bloated model structure, waste of computing power, and increased model diagnosis time.

[0005] Second, traditional CNN cannot adaptively select features to improve the model's attention to important features. The feature information obtained by the model not only contains fault feature information, but also some invalid information. If this information is treated indiscriminately, it will seriously affect the accuracy of model diagnosis. Summary of the invention

[0006] In view of the problems of poor feature learning ability and low fault diagnosis efficiency of traditional CNN models, the present invention provides a gear fault diagnosis method of improving convolutional neural network under the attention mechanism. The method reduces the number of network channels, speeds up the model training rate, and shortens the diagnosis time; and improves the gear fault diagnosis accuracy by adding an attention module to the model to achieve adaptive learning of key features.

[0007] The objective of the present invention is achieved through the following technical solutions:

[0008] A gear fault diagnosis method based on an improved convolutional neural network under an attention mechanism includes the following steps:

[0009] Step 1: Vibration data collection:

[0010] Build a gear tooth breakage fault simulation test bench, design gear test pieces with different degrees of tooth breakage, and use laser Doppler vibration measurement to collect gear vibration data at different fault levels;

[0011] Step 2: Data preprocessing:

[0012] Step 21: Convert the gear vibration data collected in the test into a 2D time-frequency diagram through short-time Fourier transform;

[0013] Step 22: Set data labels and divide the 2D time-frequency diagram data set of each fault category into a training sample set and a test sample set;

[0014] Step 3: CBAM-SCCNN model construction:

[0015] Taking AlexNet as the basic framework, a feature extraction module with attention mechanism, a feature fusion and classification module are constructed to form a CBAM-SCCNN model. The model first obtains a streamlined small channel CNN model structure (SCCNN) by reducing the number of channels in the original convolutional layer and the number of neurons in the fully connected layer. Then, a convolutional block attention module (CBAM) is embedded to solve the attention weight vector and adaptively learn key features. Finally, the fully connected layer is used to integrate the key features into a 1D feature vector for easy fault classification. The training sample set in step 2 is input into the CBAM-SCCNN model, and the training is continued until the loss function converges to obtain the CBAM-SCCNN gear fault diagnosis model.

[0016] Step 4: Gear broken tooth fault diagnosis:

[0017] Load the test sample set in step 2 and input it into the CBAM-SCCNN model trained in step 3, output the diagnosis result of gear broken tooth fault, and test the diagnostic performance of the model.

[0018] The present invention proposes an improved CNN model under the attention mechanism for gear fault diagnosis. Compared with the prior art, the present invention has the following advantages:

[0019] 1. By reducing the number of channels of traditional CNN, a SCCNN model was constructed to make the model structure more concise and effectively solve the problems of slow learning speed and low diagnostic efficiency.

[0020] 2. Embed CBAM into the SCCNN model, assign different weights through adaptive learning, enhance the focus on key features, and minimize redundant feature interference to achieve the purpose of improving diagnostic accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a schematic diagram of the fault diagnosis process.

[0022] Figure 2 It is a schematic diagram of the gear vibration test bench and signal acquisition system.

[0023] Figure 3 It is a schematic diagram of the CBAM-SCCNN model structure.

[0024] Figure 4 This is a schematic diagram of the convolutional block structure in the CBAM-SCCNN model.

[0025] Figure 5 It is the confusion matrix diagram of the three models. DETAILED DESCRIPTION

[0026] The technical solution of the present invention is further described below in conjunction with the accompanying drawings, but is not limited thereto. Any modification or equivalent replacement of the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention should be included in the protection scope of the present invention.

[0027] The present invention provides a gear fault diagnosis method based on an improved convolutional neural network under an attention mechanism, and the method comprises the following steps:

[0028] Step 1: Vibration data collection:

[0029] A gear broken tooth fault simulation test bench was built, and 9 gear test pieces with different degrees of tooth breakage were designed. The laser Doppler vibrometer method was used to collect gear vibration data under different fault degrees.

[0030] Step 2: Data preprocessing:

[0031] Step 2: 1. Convert the gear vibration data collected in the experiment into a 2D time-frequency diagram through short-time Fourier transform. Assuming the signal is s(τ), the algorithm of short-time Fourier transform is as follows:

[0032]

[0033] Where ω is the frequency value, τ is the time axis, h(t) is the window function, which moves along the time axis, and t is the center time point of the window function.

[0034] Step 22: Set data labels, and use 80% of the 2D time-frequency diagram data set of each fault category as a training sample set and 20% as a test sample set.

[0035] Step 3: CBAM-SCCNN model construction:

[0036] The present invention uses AlexNet as the basic framework, and the CBAM-SCCNN model is composed of a feature extraction module with an attention mechanism, a feature fusion and classification module. Figure 3As shown. The present invention obtains a CNN model structure with small channels (SCCNN) by reducing the number of channels in the original convolutional layer and the number of neurons in the fully connected layer, and embeds a convolutional block attention module (CBAM) in this structure to form a new CBAM-SCCNN model for gear fault diagnosis. The specific construction steps are as follows:

[0037] Step 31: Build SCCNN model:

[0038] Based on the AlexNet model structure with 5 convolutional layers containing 96, 256, 384, 384, and 256 channels and 3 fully connected layers containing 4096, 4096, and 1000 neurons, the number of channels in the original 5 convolutional layers and the number of neurons in the 6th and 7th fully connected layers are reduced to half of the original ones, that is, the number of channels becomes 48, 128, 192, 192, and 128, and the number of neurons becomes 2048 and 2048. The number of neurons in the 8th layer is determined by the number of fault categories.

[0039] Step 32: Build a feature extraction module with attention mechanism:

[0040] Add a CBAM layer after the 1st, 2nd, and 5th convolutional layers of the SCCNN model to form the following Figure 4 The convolutional block structure shown has alternatingly distributed convolutional layers, CBAM layers, normalization layers, and maximum pooling layers, which together constitute a feature extraction module with an attention mechanism.

[0041] The main algorithms include:

[0042] 1) Calculate channel attention weight:

[0043] C' w =MLP(AvgPool(F))+MLP(MaxPool(F))

[0044] In the formula, F is the input feature, which is generated after average pooling (AvgPool) and maximum pooling (MaxPool) processing and Then use the multi-layer perceptron (MLP) to obtain the channel attention weight vector C' w .

[0045] 2) Output channel attention map:

[0046] M c =σ(C' w )

[0047] The obtained channel attention weight C' w After being processed by the sigmoid function (σ(·)), a signal graph containing channel attention weights is output.

[0048] 3) Calculate spatial attention weights:

[0049] S w =f 7×7 ([AvgPool(F);MaxPol(F)]

[0050] In the formula, the input feature F is generated after average pooling and maximum pooling and Then, it passes through a convolution layer with a convolution kernel of 7×7 (f 7×7 ) Output spatial attention weight vector S w .

[0051] 4) Output spatial attention map:

[0052] M s =σ(S w )

[0053] The obtained spatial attention weight S w After being processed by the sigmoid function, a signal graph containing spatial attention weights is output.

[0054] 5) Output of CBAM

[0055] Combining the above channel attention module and spatial attention module is the complete CBAM, and the calculation formula is:

[0056]

[0057]

[0058] In the formula, represents element-by-element multiplication, F' represents the new feature after the original feature is multiplied by the channel attention module, and F" represents the final feature map feature of CBAM containing the attention weight vector.

[0059] Step 33: Construct feature fusion and classification module:

[0060] The training sample set in step 2 is input into the feature extraction module with attention mechanism, the attention weight vector is solved, the key features are adaptively learned, and then the key features are integrated into 1D feature vectors using the fully connected layer to form a feature fusion and classification module for fault classification. The training process continues until the loss function converges, and then the training of the CBAM-SCCNN model is completed. The loss function expression is:

[0061]

[0062] In the formula, p(x i ) represents the feature xi The probability of belonging to the i-th type of failure, q(x i ) represents the feature x i The probability of being predicted as the i-th type of failure, n is the number of fault categories, and H is the loss value.

[0063] Step 4: Gear fault diagnosis:

[0064] Load the test sample set in step 2 and input it into the CBAM-SCCNN model constructed in step 3 to output the diagnosis results of gear faults and test the diagnostic performance of the model. The fault category accuracy calculation formula is:

[0065] Assuming that the object fault category is N, the softmax classifier calculation formula is as follows:

[0066]

[0067] Where q(n) represents the input signal and z is the probability of belonging to the nth type of fault.

[0068] Example:

[0069] This embodiment provides a gear fault diagnosis method using an improved convolutional neural network under an attention mechanism. Figure 1 As shown, the method comprises the following steps:

[0070] Step 1: Vibration signal collection. Collect the broken tooth vibration signal of the gear vibration test bench as the original signal of the network input, such as Figure 2 The test bench is powered by a drive motor, which drives the crank-connecting rod mechanism to rotate, and then drives the meshing movement between the rack and the swing arm gear. The detailed technical parameters of the rack and pinion mechanism are shown in Table 1.

[0071] Table 1 Gear rack parameters

[0072]

[0073] This embodiment uses laser Doppler vibration measurement to collect vibration signals of different broken tooth faults. There are 10 faulty test pieces in total. The detailed broken tooth parameters are shown in Table 2. During the test, the vibration signals of 10 types of broken tooth gears are collected in turn by replacing the gear test pieces one by one.

[0074] Table 2 Gear tooth breakage fault parameters

[0075]

[0076] Step 2: Data preprocessing. The original vibration signal of the gear collected in the test is divided into sample data of equal length using a sliding window to achieve sample expansion, and the vibration signal of each fault degree is divided into 200 sub-samples, each sub-sample has 1000 original data points. Then, the one-dimensional vibration data is converted into a two-dimensional short-time Fourier time-frequency diagram using short-time Fourier transform, and they are labeled in turn according to the severity of the fault. Since each sub-sample can generate a time-frequency diagram, the input data set of the CBAM-SCCNN model contains a total of 2000 sample diagrams. Finally, 80% of the generated time-frequency diagrams are used as training sample sets and 20% as test sample sets to constitute the input data set of the network model. The detailed description is shown in Table 4.

[0077] Table 4 Sample data set division and label setting

[0078]

[0079] Step 3: Build the CBAM-SCCNN model.

[0080] (1) First, build the SCCNN model. Figure 3 As shown, this embodiment is based on the AlexNet model structure with 5 convolutional layers containing 96, 256, 384, 384, 256 channels and 3 fully connected layers containing 4096, 4096, 1000 neurons, and reduces the number of channels of the original 5 convolutional layers and the number of neurons in the 6th and 7th fully connected layers to half of the original ones, that is, the number of channels becomes 48, 128, 192, 192, 128, and the number of neurons becomes 2048, 2048. The number of neurons in the 8th layer is determined by the number of fault categories, corresponding to the 10 types of gear tooth breakage faults in this embodiment, that is, the number of neurons in the 8th layer is 10, so far, the SCCNN model is built.

[0081] (2) Then, a feature extraction module with attention mechanism is constructed. In this embodiment, a CBAM layer is added after the 1st, 2nd and 5th convolutional layers of the SCCNN model to form a feature extraction module with attention mechanism. Convolutional layers, CBAM layers, normalization layers and maximum pooling layers are alternately distributed in the module, so that the model has the ability to autonomously learn important features, such as Figure 4 shown.

[0082] The convolution layer traverses the entire feature data by moving the convolution kernel, performs convolution operations to obtain the weights and deviations of the corresponding feature points, and then performs nonlinear transformations through activation functions to enhance the expressiveness of the features. The algorithm of the convolution layer can be defined as:

[0083]

[0084] In the formula, is the jth feature vector of the lth layer, f(·) represents the ReLU activation function, and the formula is f(x)=max(0,x), D j For input data, is the i-th feature vector of layer l-1, * represents the convolution operator, is the convolution kernel vector, is the j-th eigenvector deviation of layer l.

[0085] The CBAM layer retrieves the key information in the feature map output by the convolutional layer from the channel and spatial dimensions, and obtains the weight vector C' of the attention channel information respectively. w and the weight vector S that focuses on spatial information w , and then use the sigmoid function to obtain the channel attention map M c and the spatial attention map M s , and then multiply the input features element by element, and finally output the new feature map F″.

[0086] The normalization layer normalizes the new feature signal output by the CBAM layer to improve the model stability and speed up the model training, solving the problem of gradient explosion or disappearance to a certain extent. The calculation process of this layer is as follows:

[0087]

[0088]

[0089]

[0090]

[0091] In the formula, x i is the small batch input data, μ b is the mini-batch input mean, is the standard deviation of the mini-batch input, is the standardized input, y i is the output of the network, and γ and β are the parameters learned by the network.

[0092] The normalized feature signal is input into the maximum pooling layer to reduce the dimension of the extracted features and prevent overfitting to a certain extent. The algorithm is as follows:

[0093]

[0094] In the formula, represents the pooling result of the lth layer, W is the pooling kernel size, Represents the tth neuron value of the jth eigenvector in layer l-1.

[0095] In summary, the detailed parameters of the network model structure constructed in this embodiment are shown in Table 3:

[0096] Table 3 CBAM-SCCNN structural parameters

[0097]

[0098] (3) Finally, construct the feature fusion and classification module. Input the training sample set in step 2 into the network, solve the attention weight vector through the feature extraction module containing the attention mechanism, and adaptively learn the key features. Use the fully connected layer to integrate it into the 1D feature vector, and construct the feature fusion and classification module for further classification. The learning process continues until the cross entropy loss function curve converges, which means that the training of the CBAM-SCCNN model is completed.

[0099] Step 4: Gear broken tooth fault diagnosis. Load the test sample set in step 2 and input it into the network model trained in step 3. Use the softmax classifier to output the diagnosis result of the gear broken tooth fault. And compare it with the diagnosis results of the traditional CNN model and CBAM-CNN model. Figure 5 The following is a schematic diagram of the confusion matrix of the three models for fault diagnosis, from which it can be inferred that the proposed model has a stable diagnostic accuracy of more than 95% for each fault, which is significantly better than the performance of the CNN model. Although not as good as the performance of the CBAM-CNN model, the accuracy of the proposed model meets the current industrial requirements to a large extent.

[0100] In order to further verify the robustness of the model, this example conducted ten tests, and the average diagnosis results of the above three models are listed in Table 6. Compared with the results of the traditional CNN model, the diagnostic accuracy of the proposed model increased by 16.75%, the loss value decreased by 0.54, the model learning time was shortened by 1.4 times, and the precision, recall and F 1 Compared with the results of the CBAM-CNN model, the proposed model improves the model learning efficiency by 1.5 times while maintaining the diagnostic accuracy.

[0101] Table 6 Average diagnostic results of three models

[0102]

[0103] The results of the present invention show that by reducing the model channels, the learning efficiency of the model can be significantly improved and the diagnosis time can be shortened. More importantly, by introducing CBAM in the network structure, important features can be adaptively focused on to improve the diagnostic accuracy of the model. By analyzing the experimental data of broken tooth faults, the performance of the proposed model in gear fault diagnosis is compared with that of the traditional CNN model and the CBAM-CNN model. It is verified that the CBAM-SCCNN model guarantees the diagnostic accuracy to a large extent, while significantly improving the learning efficiency, making it more suitable for reliability analysis and maintenance planning in engineering practice.

Claims

1. A gear fault diagnosis method based on an improved convolutional neural network under an attention mechanism, characterized in that The method comprises the following steps: Step 1: Vibration data collection: Build a gear tooth breakage fault simulation test bench, design gear test pieces with different degrees of tooth breakage, and use laser Doppler vibration measurement to collect gear vibration data at different fault levels; Step 2: Data preprocessing: Step 21: Convert the gear vibration data collected in the test into a 2D time-frequency diagram through short-time Fourier transform; Step 22: Set data labels and divide the 2D time-frequency diagram data set of each fault category into a training sample set and a test sample set; Step 3: CBAM-SCCNN model construction: Taking AlexNet as the basic framework, a feature extraction module with attention mechanism, a feature fusion and classification module are constructed to form the CBAM-SCCNN model. The training sample set in step 2 is input into the CBAM-SCCNN model, and the training is continued until the loss function converges to obtain the CBAM-SCCNN gear fault diagnosis model. The specific construction steps are as follows: Step 31: Build SCCNN model Based on the AlexNet model structure with 5 convolutional layers containing 96, 256, 384, 384, and 256 channels and 3 fully connected layers containing 4096, 4096, and 1000 neurons, the number of channels in the original 5 convolutional layers and the number of neurons in the 6th and 7th fully connected layers are reduced to half of the original ones, that is, the number of channels becomes 48, 128, 192, 192, and 128, and the number of neurons becomes 2048 and 2048. The number of neurons in the 8th layer is determined by the number of fault categories. Step 3.2: Build a feature extraction module with attention mechanism A CBAM layer is added after the 1st, 2nd, and 5th convolutional layers of the SCCNN model to form a convolutional block structure. The structure has alternating convolutional layers, CBAM layers, normalization layers, and maximum pooling layers, which together form a feature extraction module with an attention mechanism. Step 33: Build feature fusion and classification module The training sample set in step 2 is input into the feature extraction module with attention mechanism to solve the attention weight vector, adaptively learn the key features, and then use the fully connected layer to integrate the key features into 1D feature vectors to form a feature fusion and classification module to facilitate fault classification. The training process continues until the loss function converges, and then the training of the CBAM-SCCNN model is completed; Step 4: Gear broken tooth fault diagnosis: Load the test sample set in step 2 and input it into the CBAM-SCCNN model trained in step 3, output the diagnosis result of gear broken tooth fault, and test the diagnostic performance of the model.

2. The gear fault diagnosis method based on the improved convolutional neural network under the attention mechanism according to claim 1 is characterized in that In step 21, assuming that the signal is s(τ), the algorithm of short-time Fourier transform is as follows: Where ω is the frequency value, τ is the time axis, and t is the center time point of the window function.

3. The gear fault diagnosis method based on the improved convolutional neural network under the attention mechanism according to claim 1 is characterized in that The loss function expression is: In the formula, p(x i ) represents the feature x i The probability of belonging to the i-th type of failure, q(x i ) represents the feature x i The probability of being predicted as the i-th type of failure, n is the number of fault categories.

4. The gear fault diagnosis method based on the improved convolutional neural network under the attention mechanism according to claim 1 is characterized in that In step 4, assuming that the number of object fault categories is N, the softmax classifier calculation formula is as follows: Where q(n) represents the output signal and z is the probability of belonging to the nth type of fault.

Citation Information

Patent Citations

  • Epicyclic gearbox fault diagnosis method based on residual-capsule network

    CN114548153A

  • Rolling bearing fault diagnosis method and device based on multiple algorithms, equipment and medium

    CN115659223A