Bearing fault diagnosis methods, equipment, and media based on few-sample learning
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2026-08-14
AI Technical Summary
然而,这些方法在特征提取过程中通常只能关注到局部或全局的单一信息,无法全面反映信号的多样性和复杂性;并且在训练过程中也没有有效利用无标签样本的信息,使其来深度参与训练深度学习模型,可能导致模型的性能下降
[0030]本发明将改进型U-Net特征提取模块、并联型混合注意力模块、聚类修正模块及分类预测模块相结合,构建了一种基于U形特征提取和聚类修正的原型网络,具体地:
Smart Images

Figure CN118606815B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of bearing fault diagnosis technology, and in particular to a bearing fault diagnosis method, equipment and medium based on few-sample learning. Background Technology
[0002] Rolling bearings, as an indispensable component of industrial equipment, play a crucial role in mechanical transmission systems. However, with the increase in equipment operating time, rolling bearings are often subject to various types of damage, such as wear, cracks, and loosening. If these faults are not detected and addressed in a timely manner, they may lead to equipment downtime, production losses, or even safety accidents. Therefore, real-time condition monitoring and prediction of bearings, as well as the timely detection of fault signs and the implementation of corresponding maintenance measures, are of significant practical importance to industrial production.
[0003] In the field of bearing fault diagnosis, deep learning-based intelligent detection methods can effectively avoid the shortcomings of traditional methods. Deep learning models, by establishing deeper nonlinear mapping structures, adaptively learn valuable features for fault classification and intelligently identify the fault type of the bearing through a classifier, thus completing bearing diagnosis intelligently and efficiently. However, to obtain better deep learning models, more complex models and large amounts of data are often required for training. But in some fields, obtaining large amounts of data is difficult. To alleviate the problem of data scarcity, methods such as transfer learning and few-shot learning can be actively explored.
[0004] In recent years, with the development of technologies such as deep learning and meta-learning, few-shot learning has achieved some breakthroughs and remains an active research area. In few-shot learning, techniques such as meta-learning or transfer learning are typically used to help models learn better feature representations and generalization abilities from limited data. Existing few-shot learning methods effectively improve diagnostic accuracy in situations of scarce samples by deeply mining the rich information inherent in the samples. However, during training, due to the scarcity of support set samples, the model faces a high risk of overfitting, leading to a significant decline in the model's diagnostic performance.
[0005] To make fuller use of information from small samples and extract more effective features, some experts and scholars have used prototype networks to obtain class prototypes for sample classification. However, these methods usually only focus on local or global single information during feature extraction, failing to fully reflect the diversity and complexity of the signal; and they do not effectively utilize the information of unlabeled samples during training to deeply participate in training the deep learning model, which may lead to a decline in model performance. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to provide a bearing fault diagnosis method, equipment and medium based on few-sample learning, which can effectively improve the identification accuracy.
[0007] To address the aforementioned technical problems, this invention provides a bearing fault diagnosis method based on few-shot learning, comprising: constructing a prototype network based on U-shaped feature extraction and clustering correction, wherein the prototype network includes an improved U-Net feature extraction module, a parallel hybrid attention module, a clustering correction module, and a classification prediction module; training the prototype network using labeled support set samples and labeled query set samples; and inputting target samples into the trained prototype network to generate fault diagnosis results; the step of training the prototype network using labeled support set samples and labeled query set samples includes: inputting the support set samples and query set samples into the improved U-Net feature extraction module for multi-level feature extraction and skip connection processing to generate feature information at different scales; inputting the feature information into the parallel hybrid attention module for adaptive adjustment to generate target features that fuse spatial importance and channel importance; inputting the target features into the clustering correction module for clustering and fusion processing to correct the class prototype; calculating the distance between the query set samples and the corrected class prototype through the classification prediction module to predict the classification probability of the query set samples; and updating the prototype network according to the classification probability.
[0008] As an improvement to the above scheme, the improved U-Net feature extraction module includes an encoder and a decoder; the encoder includes three convolutional blocks, each of which includes a one-dimensional convolutional layer, batch normalization, ReLU activation function and a one-dimensional max pooling layer; the decoder includes three upsampling blocks and two deconvolutional layers, each of which includes an upsampling layer, a connection layer, a one-dimensional convolutional layer, batch normalization and ReLU activation function.
[0009] As an improvement to the above scheme, the step of inputting the feature information into a parallel hybrid attention module for adaptive adjustment to generate a target feature that integrates spatial importance and channel importance includes: generating spatial features of the feature information through a spatial attention mechanism; generating channel features of the feature information through a channel attention mechanism; and fusing the spatial features and channel features by comparing elements one by one and taking the maximum value to generate the target feature.
[0010] As an improvement to the above scheme, the step of inputting the target features into the clustering correction module for clustering and fusion processing to correct the class prototype includes: calculating the mean of the target features of each category in the support set to generate an initial class prototype; clustering the unlabeled target features in the query set using the K-Means method to generate initial cluster centers with the same number of categories as the support set; calculating the mean difference between the initial class prototype and the initial cluster centers to evaluate the positional offset between the initial class prototype and the initial cluster centers; combining the positional offset with the initial cluster centers to generate corrected cluster centers; and matching and weighting the corrected cluster centers with the initial class prototype to generate corrected class prototypes.
[0011] As an improvement to the above scheme, the initial class prototype is:
[0012]
[0013] The prototype of the modified class is:
[0014]
[0015] Where, p i Let C be the prototype of the i-th initial class. k Let x be the number of samples in the k-th class. i C k The i-th sample in the dataset, y i For x i Tag categories, For feature extractor, For the prototype of the i-th modified class, Let i be the i-th corrected cluster center.
[0016] As an improvement to the above scheme, the initial cluster centers are:
[0017]
[0018] The modified cluster center is:
[0019]
[0020] Among them, a i Let k be the i-th initial cluster center. i For the cluster with the i-th initial cluster center, n i Let be the number of samples in the cluster with the i-th initial cluster center. Let ξ be the i-th corrected cluster center, and let ξ be the mean difference between the initial class prototype and the initial cluster center.
[0021] As an improvement to the above scheme, the mean difference ξ is:
[0022]
[0023] Where C represents the fault category, p i Let a be the prototype of the i-th initial class. i Let i be the i-th initial cluster center.
[0024] As an improvement to the above scheme, the step of calculating the distance between the query set sample and the corrected class prototype through the classification prediction module to predict the classification probability of the query set sample includes: calculating the Euclidean distance between the query set sample and the corrected class prototype through the classification prediction module; and predicting the classification probability of the query set sample based on the Euclidean distance.
[0025]
[0026] Among them, P k (y = c|x) represents the probability that sample x belongs to class c, and d(·) is the distance function. As the prototype of the class, For feature extractors.
[0027] Accordingly, the present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the bearing fault diagnosis method based on few-sample learning described above.
[0028] Accordingly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the bearing fault diagnosis method based on few-shot learning described above.
[0029] Implementing this invention has the following beneficial effects:
[0030] This invention combines an improved U-Net feature extraction module, a parallel hybrid attention module, a clustering correction module, and a classification prediction module to construct a prototype network based on U-shaped feature extraction and clustering correction. Specifically:
[0031] This invention utilizes an improved U-Net feature extraction module, which achieves the fusion of features at different scales through multi-level feature extraction and skip connections. It fully leverages the complementarity between features at different scales, thereby improving the discriminative power of the features and enabling the extraction of more comprehensive and richer information.
[0032] This invention introduces a parallel hybrid attention module, which helps the model extract more representative features by adaptively adjusting the importance of each space and channel in the features;
[0033] This invention corrects class prototypes through clustering, reducing the instability of class prototypes and providing more stable query results. Attached Figure Description
[0034] Figure 1 This is a flowchart of an embodiment of the bearing fault diagnosis method based on few-sample learning of the present invention;
[0035] Figure 2 This is a schematic diagram of the prototype network structure based on U-shaped feature extraction and clustering correction in this invention;
[0036] Figure 3 This is a flowchart of an embodiment of the present invention that trains a prototype network using labeled support set samples and labeled query set samples;
[0037] Figure 4 This is a schematic diagram of the structure of the improved U-Net feature extraction module in this invention;
[0038] Figure 5 This is a schematic diagram of the parallel hybrid attention module in this invention;
[0039] Figure 6 This is a diagram illustrating sample size selection;
[0040] Figure 7 This is a schematic diagram of the simulation platform.
[0041] Figure 8 It is the confusion matrix of ProNet, W+ProNet, PSSPN and the present invention on the CWRU bearing fault dataset;
[0042] Figure 9 This is a schematic diagram of the T-SNE feature visualization of ProNet, W+ProNet, PSSPN, and the present invention on the CWRU bearing fault dataset;
[0043] Figure 10 It is the confusion matrix of ProNet, W+ProNet, PSSPN and the present invention on the petrochemical dataset;
[0044] Figure 11 This is a schematic diagram of the feature visualization of ProNet, W+ProNet, PSSPN, and the present invention on a petrochemical dataset. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings.
[0046] See Figure 1 , Figure 1A flowchart illustrating an embodiment of the bearing fault diagnosis method based on few-sample learning of the present invention is shown, which includes:
[0047] S101, Construct a prototype network based on U-shaped feature extraction and clustering correction;
[0048] like Figure 2 As shown, the prototype network includes an improved U-Net feature extraction module, a parallel hybrid attention module, a clustering correction module, and a classification prediction module, wherein:
[0049] The improved U-Net feature extraction module can effectively capture feature information at different scales and improve the model's generalization ability by performing multi-level feature extraction and skip connections on one-dimensional signals.
[0050] Parallel hybrid attention modules improve classification performance by adaptively adjusting the importance of each space and channel in a feature, enabling the model to focus more effectively on key feature information.
[0051] The clustering correction module can obtain more stable class prototypes and provide more stable query results by mining information from query samples and correcting the class prototypes.
[0052] The classification prediction module can effectively perform classification prediction by calculating the distance between the input sample and the corrected class prototype, and achieves excellent performance.
[0053] S102, train the prototype network using labeled support set samples and labeled query set samples;
[0054] S103, Input the target sample into the trained prototype network to generate fault diagnosis results;
[0055] By inputting the target sample into the trained prototype network, the classification probability of the target sample can be predicted, thereby determining the fault diagnosis result.
[0056] See Figure 3 , Figure 3 A flowchart illustrating an implementation of training a prototype network using labeled support set samples and labeled query set samples is shown, comprising:
[0057] S201 will support inputting set samples and query set samples into the improved U-Net feature extraction module for multi-level feature extraction and skip connection processing to generate feature information at different scales;
[0058] Traditional one-dimensional time-series signal feature extraction methods are limited to information extraction at a single scale, failing to fully reflect the diversity and complexity of the signal and potentially leading to the loss of important information. The original U-Net network fuses shallow and deep features to capture richer information, demonstrating excellent performance in image segmentation tasks. However, it suffers from the limitation of deep feature dilution during decoding, affecting the model's focus on deep features.
[0059] Unlike existing technologies, this invention adds two deconvolutional layers to the decoder on the basis of the original U-Net network, making the model more focused on deep features and suitable for one-dimensional signal data processing.
[0060] like Figure 4 As shown, the improved U-Net feature extraction module includes an encoder and a decoder, wherein:
[0061] The encoder consists of three convolutional blocks, each of which includes a one-dimensional convolutional layer, batch normalization, ReLU activation function and a one-dimensional max pooling layer to progressively extract and compress input signal features;
[0062] The decoder consists of three upsampling blocks and two deconvolutional layers. Each upsampling block includes an upsampling layer, a connection layer, a one-dimensional convolutional layer, batch normalization, and a ReLU activation function to progressively restore the feature map size and reconstruct the feature representation. Each deconvolutional layer amplifies and reconstructs the input signal, which helps the model focus more on deep features and fuse feature information from different levels.
[0063] Therefore, the encoder in the improved U-Net feature extraction module obtains the final feature representation through feature extraction and downsampling, while the decoder obtains the final feature representation through upsampling and reconstruction. At the same time, through the alternating operation of the encoder and decoder, feature extraction and reconstruction of one-dimensional feature signals can be achieved, capturing important feature information and providing useful feature representations for subsequent tasks.
[0064] When working, you can first collect a labeled dataset D. L and from the labeled dataset D L We randomly sample C classes, and from each class we randomly sample K samples to generate a support set S. e L samples are randomly selected from each class to generate a query set Q. e Then, take the support set S. e Support set samples and query set Q e Query set samples The input is fed into the improved U-Net feature extraction module to obtain feature information: DF = {DF1, DF2, ..., DF...} n}
[0065] S202, the feature information is input into the parallel hybrid attention module for adaptive adjustment to generate target features that fuse spatial importance and channel importance;
[0066] To enable the model to more flexibly focus on information from different feature channels and locations, and to improve the model's understanding and representation of input data, this invention uses a parallel hybrid attention module to simultaneously recalibrate channel and spatial features. This allows the model to focus on features that are more meaningful to the task, suppressing noise and redundant features in the input signal, and reducing the number of model parameters and computational cost while maintaining model performance.
[0067] like Figure 5 As shown, the steps for inputting feature information into a parallel hybrid attention module for adaptive adjustment to generate target features that fuse spatial importance and channel importance include:
[0068] (1) Spatial features of feature information are generated through spatial attention mechanism;
[0069] For each location, the spatial attention mechanism learns a weight to represent the importance of that location to the overall feature representation. Specifically, the spatial feature generation steps using the spatial attention mechanism include:
[0070] (1.1) Calculate the global average value of each location feature using a global average pooling layer;
[0071] (1.2) Calculate the global maximum value of each location feature using a global max pooling layer;
[0072] (1.3) Concatenate the global average value and the global maximum value of the position to form the initial position vector;
[0073] Therefore, for the input feature information, global average pooling and max pooling operations can be performed on the features at each position, and after concatenation, an initial position vector of size L×2 can be obtained.
[0074] (1.4) The initial position vector is mapped to the target position vector through a one-dimensional convolutional layer;
[0075] This initial position vector is mapped to a U-shaped vector through a one-dimensional convolutional layer. L The target position vector.
[0076] (1.5) Spatial attention weights are generated based on the target location vector using an activation function;
[0077] The activation function is preferably the softmax function, but this is not a limitation and can be chosen according to the actual situation.
[0078] Spatial attention weights can be viewed as a measure of the importance of each location.
[0079] (1.6) Multiply the spatial attention weights element by element with the corresponding feature information to generate weighted spatial features;
[0080] By multiplying the spatial attention weight of each location element-wise with the corresponding feature, a weighted spatial feature representation can be obtained.
[0081] (1.7) Add the weighted spatial features together to generate spatial features.
[0082] The spatial features can be obtained by adding the weighted spatial features (i.e., weighted spatial features).
[0083] For example, suppose the input feature information is DF, and the output spatial feature is DF. S The calculation method for the output features at each step is as follows:
[0084] DF max =LMP(DF,dim=1)
[0085] DF mean =LAP(DF,dim=1)
[0086] DF fusion =Concat(DF) nax ,DF mean )
[0087] DF S =Sigmoid(Conv(DF) fusion ))×DF
[0088] Here, LMP performs max pooling on the channel dimension, LAP performs average pooling on the channel dimension, dim performs the operation on a specified dimension of the data, Concat concatenates multiple tensors together, and sigmoid represents a non-linear activation function.
[0089] (2) Generate channel features of feature information through channel attention mechanism;
[0090] For each feature channel, the channel attention mechanism learns a weight to represent the importance of that channel to the overall feature representation. Specifically, the steps for generating channel feature representations of feature information through the channel attention mechanism include:
[0091] (2.1) Calculate the channel global average value of each channel feature through a global average pooling layer, and compress the channel global average value to obtain the first initial vector;
[0092] (2.2) Calculate the global maximum value of each channel feature through a global max pooling layer, and compress the global maximum value of the channel to obtain the second initial vector;
[0093] For the input feature information, the global average and global maximum values of each channel feature can be calculated, and after compression, a vector of size C×1 can be obtained respectively.
[0094] (2.3) The first initial vector is mapped to the first target vector through the first fully connected layer;
[0095] (2.4) The second initial vector is mapped to the second target vector through the second fully connected layer;
[0096] (2.5) Generate channel attention weights based on the sum of the first target vector and the second target vector using an activation function;
[0097] Through two fully connected layers, these two vectors (the first initial vector and the second initial vector) are mapped to a U respectively. C The vectors (first target vector and second target vector) are summed, and then each is passed through an activation function to obtain the channel attention weights. The channel attention weights can be seen as a measure of the importance of each feature channel. Therefore, the channel attention weights in this invention are calculated using a global average pooling (GAP) layer, a global max pooling (GMP) layer, and two fully connected layers.
[0098] The preferred activation function is the sigmoid function, but this is not a limitation and can be chosen based on the actual situation.
[0099] (2.6) Multiply the channel attention weights element by element with the corresponding feature information to generate weighted channel features;
[0100] The attention weight of each feature channel (i.e., the channel attention weight) is multiplied element-wise with the corresponding feature information to obtain the weighted channel feature representation.
[0101] (2.7) Add the weighted channel features together to generate channel features.
[0102] The channel features are obtained by adding the weighted channel features (i.e., weighted channel features).
[0103] For example, suppose the input feature information is DF, and the output channel feature is DF. C The calculation method for the output features at each step is as follows:
[0104] DF max=Dense(GMP(DF))
[0105] DF mean =Dense(GAP(DF))
[0106] DF C =Sigmoid(DF) max )×DF+Sigmoid(DF mean )×DF
[0107] Here, Dense represents the feature mapping operation, and sigmoid represents the non-linear activation function that maps the output to a range between 0 and 1.
[0108] (3) Spatial features and channel features are fused using the element-wise comparison and maximum value (EWM) method to generate target features.
[0109] The specific fusion calculation formula is as follows:
[0110] Therefore, for the feature information DF={DF1,DF2,……,DF2} of the improved U-Net feature extraction module, n Let the feature dimension be C×L, where C represents the number of feature channels and L represents the feature length; inputting it into a parallel hybrid attention module yields the final target feature.
[0111] S203, Input the target features into the clustering correction module for clustering and fusion processing to correct the class prototype;
[0112] Existing methods for generating few-sample prototypes based on prototype networks use the average value of sample features from each category in the support set as the class prototype. However, they fail to effectively mine and utilize query set information and relational hierarchy information, which leads to biases in the generated class prototypes.
[0113] Unlike existing technologies, this invention inputs target features into a clustering correction module for clustering and fusion processing to correct class prototypes. Specific steps include:
[0114] (1) Calculate the mean of the target features for each category in the support set to generate an initial class prototype;
[0115] By calculating the mean of the target features for each category in the support set, we can obtain the prototype representation of each category (i.e., the initial class prototype):
[0116]
[0117] Where, p i Let C be the prototype of the i-th initial class. kLet x be the number of samples in the k-th class. i C k The i-th sample in the dataset, y i For x i Tag categories, For feature extractors.
[0118] (2) Cluster the unlabeled target features in the query set using the K-Means method to generate initial cluster centers that are equal to the number of categories in the support set;
[0119] The labels of the target features in the query set are ignored to form unlabeled target features; then, the K-Means method is used to cluster the unlabeled target features in the query set to generate cluster centers (i.e., initial cluster centers) with the same number of categories as the support set.
[0120]
[0121] Among them, a i Let k be the i-th initial cluster center. i For the cluster with the i-th initial cluster center, n i Let be the number of samples in the cluster with the i-th initial cluster center.
[0122] (3) Calculate the mean difference between the initial class prototype and the initial cluster center to assess the positional offset between the initial class prototype and the initial cluster center;
[0123] The mean difference ξ is:
[0124]
[0125] Where C represents the fault category, p i Let a be the prototype of the i-th initial class. i Let i be the i-th initial cluster center.
[0126] (4) Combine the position offset with the initial cluster centers to generate corrected cluster centers;
[0127] Combining the location offset with each initial cluster center yields the corrected cluster centers:
[0128]
[0129] Among them, a i Let i be the initial cluster center. Let ξ be the i-th corrected cluster center, and let ξ be the mean difference between the initial class prototype and the initial cluster center.
[0130] (5) Match the modified cluster centers with the initial class prototypes one by one and perform a weighted average to generate the modified class prototypes:
[0131]
[0132] Where, p i For the i-th initial class prototype C k Let k be the number of samples in the k-th class. For feature extractor, For the prototype of the i-th modified class, Let i be the i-th corrected cluster center.
[0133] Therefore, by performing clustering and fusion operations on the target features of the support set and query set, the representation of class prototypes can be effectively improved, thereby enhancing the performance and generalization ability of the model.
[0134] S204, The distance between the query set sample and the corrected class prototype is calculated through the classification prediction module to predict the classification probability of the query set sample;
[0135] Furthermore, classification prediction can be performed by calculating the Euclidean distance between each query set sample and the corrected class prototype. Specific steps include:
[0136] (1) Calculate the Euclidean distance between the query set samples and the corrected class prototypes using the classification prediction module;
[0137] Distance is measured by the distance function d(·), and this invention uses Euclidean distance metric.
[0138] (2) Predict the classification probability P of the query set samples based on Euclidean distance. k (y = c|x);
[0139] That is, the probability that a sample x in the query set belongs to category c can be expressed as:
[0140]
[0141] Where d(·) is the distance function, As the prototype of the class, For feature extractors.
[0142] S205, update the prototype network based on the classification probability.
[0143] Specifically, the loss can be determined based on the classification probability, and the loss can be fed back to update the parameters of the prototype network.
[0144] Accordingly, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the bearing fault diagnosis method based on few-shot learning described above.
[0145] Meanwhile, the present invention also discloses a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the steps of the bearing fault diagnosis method based on few-sample learning described above.
[0146] The invention will now be described in further detail with reference to specific experiments:
[0147] I. Experimental Dataset
[0148] Bearing vibration signals from the CWRU bearing fault dataset and the petrochemical bearing fault dataset were selected for analysis and verification. For example... Figure 6 As shown, in this experiment, a sliding window with a length of 1024 and a step size of 80 was used to obtain vibration data samples.
[0149] (1) CWRU bearing fault dataset
[0150] The CWRU dataset is one of the most well-known and widely used datasets in the field of bearing fault diagnosis. The dataset contains different types of bearing faults, such as inner ring faults (IF), outer ring faults (OF), and rolling element faults (RF), as well as bearing data under normal (N) conditions. Each fault type includes three fault sizes: 0.007 mm, 0.014 mm, and 0.021 mm. The experimental data uses drive-end acceleration data of SKF bearings under zero load conditions, at a speed of 1797 r / min and a sampling frequency of 12 kHz. The CWRU dataset has 10 classification types, with 1024 sampling points extracted for each sample. 500 samples were selected for training in each category, and 200 unlabeled samples were used for evaluation.
[0151] The details of the CWRU dataset used in the experiment are shown in Table 1 below:
[0152] Table 1
[0153]
[0154]
[0155] (2) Petrochemical bearing failure dataset
[0156] In industrial environments, vibration signal acquisition is often affected by various noises, such as environmental noise, temperature changes, and equipment aging, which can interfere with vibration signals and make the data more closely reflect actual industrial operating conditions. The Guangdong Provincial Key Laboratory of Petrochemical Equipment Fault Diagnosis at Guangdong University of Petrochemical Technology conducted research on a dataset in the petrochemical field, which includes various noises related to the industrial environment. Researchers established a simulation platform (see...). Figure 7The actual working environment of a petrochemical refinery and the power load of rotating machinery were simulated.
[0157] The petrochemical dataset contains five different types of failures: missing gear teeth (F1), outer ring wear of bearings (F2), inner ring wear of bearings (F3), rolling element loss (F4), missing pinion teeth (F5), and bearing data under normal (F0) conditions. The petrochemical dataset has six classification categories, with 1024 sampling points extracted for each category. 500 samples were selected for training in each category, and 200 unlabeled samples were used for evaluation.
[0158] The detailed information about the petrochemical dataset used in the experiment is shown in Table 2 below:
[0159] Table 2
[0160] Fault location Tag categories Training samples Test samples normal F0 500 200 Gear missing tooth F1 500 200 Bearing outer ring wear F2 500 200 Bearing inner ring wear F3 500 200 Rolling element closure F4 500 200 The small gear is missing a tooth. F5 500 200
[0161] II. Model Parameters
[0162] (1) The parameters of the improved U-Net feature extraction module are shown in Table 3 below:
[0163] Table 3
[0164]
[0165] (2) The parameters of the parallel hybrid attention module are shown in Table 4 below:
[0166] Table 4
[0167] operate parameter Output size Channel input 1984 Dimensional increase dim = -1 1984x1 Channel expansion Channel=64 1984x64 Average pooling dim=0 1x64 extrusion dim = -1 1x4 ReLU Units = 64 (Dense1) 1x64 Fusion / Sigmoid Units = 1984 (Dense2) 1984x64 Spatial input 1984 Dimensional increase dim = -1 1984x1 Channel expansion Channel=64 1984x64 Convolution / Sigmoid channels=1,conv_size=[1],conv_str=[1] 1984x1 extrusion dim = -1 992x1 ReLU Units = 1984 (Dense3) 1984x1 Fusion / Sigmoid Units = 64 (Dense4) 1984x64 Maximum value (Channel_input, Spatial_input) 1984x64 Dimensional reduction Dim = -1 1984
[0168] III. Comparative Experiments and Analysis
[0169] In order to verify the effectiveness of the present invention, ProNet (J.Snell, K.Swersky, and RSZemel, "Prototypical Networks for Few-shot Learning," Advances in Neural Information Processing Systems (NIPS), vol. 13, 4-9 December 2017.USA), W+ProNet (Z.Wang, H.Shen, W.Xiong, X.Zhang, and J.Hou, "Method for Diagnosing Bearing Faults inElectromechanical Equipment Based on Improved Prototypical Networks,"Sensors(Basel),vol.23,no.9,May 4 2023.),PSSPN(J.He,Z.Zhu,X.Fan,Y.Chen,S.Liu,andD.Chen,"Few-Shot Learning for Fault Diagnosis:Semi-Supervised PrototypicalNetwork with This paper compares Pseudo-Labels (Symmetry, vol. 14, no. 7, 2022) with the present invention (a prototype network based on U-shaped feature extraction and clustering correction). The feature extractor structures of ProNet and W+ProNet are consistent with PSPN. The difference lies in that W+ProNet uses KL divergence to measure the impact of sample distribution changes on specific samples, while PSPN uses a pseudo-label prediction algorithm to label unlabeled samples to increase training samples and improve classification accuracy. The activation function used is ReLU, the optimizer is Adam, the learning rate is 0.001, and the model iterations are 100. The final accuracy is obtained by averaging the experimental results after ten repetitions. All experiments were conducted on Tensorflow 2.0.
[0170] (1) Analysis of CWRU data results
[0171] This experiment used two vibration signals collected at 12kHz from the drive end. Ten categories with different fault sizes (0.007, 0.014, 0.021 inches) under the same load were selected for the experiment. Three sets of experiments were conducted on the CWRU dataset for the 5-class and 10-class classification tasks, respectively, using 1-shot, 5-shot, and 10-shot methods. The experimental results are shown in Table 5 below:
[0172] Table 5. Average Accuracy (%)
[0173]
[0174] As shown in Table 5, this invention demonstrates a significant improvement in recognition accuracy compared to other methods. Specifically, ProNet and W+ProNet use only support set samples during training, which may lead to model overfitting. Although PSSPN expands the sample size using pseudo-label data, it cannot guarantee the accuracy of pseudo-label selection. In contrast, this invention utilizes unlabeled samples from the query set for clustering and class prototype correction to reduce class prototype instability, thereby providing more stable query results.
[0175] like Figure 8 and Figure 9 As shown, for the four comparison models, the confusion matrix and T-SNE feature visualization are plotted under the CWRU bearing fault dataset 10-way and 5-shot conditions, respectively.
[0176] See Figure 8 ProNet and W+ProNet exhibit errors in classifying the four fault types, which may be attributed to the unclear boundaries between these classes. However, W+ProNet performs poorly in class 4, possibly due to the uneven distribution of samples in that class. Notably, this invention, along with PSSPN, outperforms ProNet and W+ProNet overall, especially in terms of classification accuracy.
[0177] See Figure 8 The feature visualization results of ProNet show that the boundaries between the four categories are not obvious, and the feature distribution of each category is relatively mixed, suggesting that the model may have failed to effectively capture the structure of the data. In contrast, the feature visualization results of W+ProNet show some clustering, but there is overlap in some categories, indicating that the model's ability to distinguish between these categories is limited, possibly due to information loss or confusion during feature extraction. On the other hand, the features extracted by PSSPN and this invention show obvious clustering effects in the visualization results, with different categories showing a clear distribution in the feature space, indicating that these two methods can better capture the structural information of the data. It is particularly noteworthy that this invention performs better in classification.
[0178] (2) Analysis of Petrochemical Data Results
[0179] In this experiment, three sets of experiments were conducted on the 3-class and 6-class classification tasks of the petrochemical dataset, with 1-shot, 5-shot, and 10-shot results respectively. The experimental results are shown in Table 6 below:
[0180] Table 6. Average Accuracy (%)
[0181]
[0182] As shown in the table above, ProNet performs relatively poorly in classification tasks compared to other methods, while W+ProNet outperforms ProNet. In 5-shot to 10-shot scenarios, PSSPN and this invention exhibit superior classification performance. Notably, this invention demonstrates the best performance in fault diagnosis under conditions of scarce samples, exhibiting excellent classification results.
[0183] like Figure 10 and Figure 11 As shown, for the four comparative models, the confusion matrix and T-SNE feature visualization are plotted under the 6-way 5-shot data set of petrochemical bearing failure.
[0184] See Figure 10 ProNet performed the worst in classification, possibly due to unclear boundaries between categories. W+ProNet and PSSPN performed poorly in category 0, possibly due to uneven distribution of samples in that category. In contrast, this invention performed better in terms of classification accuracy.
[0185] See Figure 11 Observations of the ProNet and W+ProNet results show that samples from multiple different categories are mixed together, lacking clear classification boundaries. This indicates that the embedding module failed to fully extract features that can distinguish each fault category. In contrast, the present invention and PSSPN show that samples of the same category can be well clustered together, and there are clear boundaries between samples of different categories. The classification effect of the present invention is better, which shows that by mining query set information, the embedding module can better extract fault features that are conducive to classification, thereby reducing the intra-class distance of sample features, increasing the inter-class distance, and generating more discriminative category prototypes.
[0186] IV. Ablation Experiments and Analysis
[0187] The prototype network based on U-shaped feature extraction and clustering correction in this invention introduces an improved U-Net feature extraction module (IUFE), a parallel hybrid attention module (PHA), and a clustering correction module (CCM). Ablation experiments were conducted to verify the effectiveness of these three modules. The experiments included combinations of the three modules individually with the original prototype network (PN), as well as pairwise combinations of the three modules with PN, totaling eight types of experiments including those with PN and this invention. Validation was performed on the CWRU dataset, and the experimental results are shown in Table 7 below.
[0188] Table 7. Accuracy (%) of each method in the ablation experiment
[0189]
[0190] Based on the ablation experiment results in Table 7, the accuracy of each method in fault diagnosis tasks was analyzed in detail. Among the first four combinations, PN with the IUFE module performed better than the other three combinations, indicating that the IUFE module has a positive impact on small-sample learning. Furthermore, PHA+PN and CCM+PN achieved significant accuracy under different task settings, verifying the effectiveness of the PHA and CCM modules. In the fifth to seventh combinations, combining the IUFE and CCM modules enabled PN to achieve the best performance in all tasks, highlighting the synergistic effect of the two. Meanwhile, IUFE+PHA+PN and PHA+CCM+PN also showed good results, demonstrating the significant improvement in diagnostic accuracy from each module combination. Finally, this invention adopted a combination of three modules (IUFE+PHA+CCM), achieving the best accuracy in all tasks, fully demonstrating the effectiveness and superiority of this invention. In summary, through in-depth analysis of the ablation experiment results, not only was the effectiveness of each module verified, but the significant advantages of this invention in small-sample fault diagnosis tasks were also confirmed.
[0191] V. Conclusion
[0192] To address the limitations of traditional feature extraction networks in processing features of the same scale and the prototype drift problem in bearing fault diagnosis, this invention proposes a prototype network based on U-shaped feature extraction and clustering correction. An improved U-Net feature extraction module is used to extract more comprehensive and richer information; a parallel hybrid attention module is introduced to help the model extract more representative features; and clustering correction of the prototype class makes the generated prototype class more robust. The effectiveness of the proposed model is verified using the CWRU dataset and a petrochemical dataset. Experimental results show that the diagnostic accuracy of this invention is superior to other methods, achieving high recognition accuracy even with limited sample sizes.
[0193] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A bearing fault diagnosis method based on few-sample learning, characterized in that, include: A prototype network based on U-shaped feature extraction and clustering correction is constructed. The prototype network includes an improved U-Net feature extraction module, a parallel hybrid attention module, a clustering correction module, and a classification prediction module. The prototype network is trained using labeled support set samples and labeled query set samples; The target sample is input into the trained prototype network to generate fault diagnosis results. The support set sample, query set sample and target sample are bearing vibration signals. The step of training the prototype network using labeled support set samples and labeled query set samples includes: The support set samples and query set samples are input into the improved U-Net feature extraction module for multi-level feature extraction and skip connection processing to generate feature information at different scales. The feature information is input into a parallel hybrid attention module for adaptive adjustment to generate target features that fuse spatial importance and channel importance. The target features are input into the clustering correction module for clustering and fusion processing to correct the class prototype; The classification prediction module calculates the distance between the query set sample and the corrected class prototype to predict the classification probability of the query set sample. The prototype network is updated based on the classification probabilities; The step of inputting the target features into the clustering correction module for clustering and fusion processing to correct the class prototype includes: calculating the mean of the target features of each category in the support set to generate an initial class prototype; clustering the unlabeled target features in the query set using the K-Means method to generate initial cluster centers with the same number of categories as the support set; calculating the mean difference between the initial class prototype and the initial cluster centers to evaluate the positional offset between the initial class prototype and the initial cluster centers; combining the positional offset with the initial cluster centers to generate corrected cluster centers; and matching and weighting the corrected cluster centers with the initial class prototype to generate corrected class prototypes.
2. The bearing fault diagnosis method based on few-sample learning as described in claim 1, characterized in that, The improved U-Net feature extraction module includes an encoder and a decoder; The encoder includes three convolutional blocks, each of which includes a one-dimensional convolutional layer, batch normalization, ReLU activation function and a one-dimensional max pooling layer; The decoder includes three upsampling blocks and two deconvolutional layers. Each upsampling block includes an upsampling layer, a connection layer, a one-dimensional convolutional layer, a batch normalization function, and a ReLU activation function.
3. The bearing fault diagnosis method based on few-sample learning as described in claim 1, characterized in that, The step of inputting the feature information into a parallel hybrid attention module for adaptive adjustment to generate target features that fuse spatial importance and channel importance includes: Spatial features of the aforementioned feature information are generated through a spatial attention mechanism; Channel features of the aforementioned feature information are generated through a channel attention mechanism; The spatial features and channel features are fused by comparing elements one by one and taking the maximum value to generate the target features.
4. The bearing fault diagnosis method based on few-sample learning as described in claim 1, characterized in that, The initial class prototype is: The prototype of the modified class is: in, p i For the first i An initial class prototype For the first The number of samples in each class. for The first in One sample, for Tag categories, For feature extractors, For the first i A modified class prototype. For the first i Corrected cluster centers.
5. The bearing fault diagnosis method based on few-sample learning as described in claim 1, characterized in that, The initial cluster centers are: The modified cluster center is: in, a i For the first i One initial cluster center, k i For the first i Clusters with initial cluster centers, n i For the first i The number of samples in each cluster with an initial cluster center. For the first i A corrected cluster center This represents the mean difference between the initial class prototype and the initial cluster centers.
6. The bearing fault diagnosis method based on few-sample learning as described in claim 1, characterized in that, The mean difference for: in, C Fault category, p i For the first i An initial class prototype a i For the first i The initial cluster centers.
7. The bearing fault diagnosis method based on few-sample learning as described in claim 1, characterized in that, The step of calculating the distance between the query set sample and the corrected class prototype through the classification prediction module to predict the classification probability of the query set sample includes: The Euclidean distance between the query set samples and the corrected class prototypes is calculated using the classification prediction module. Predict the classification probability of the query set samples based on the Euclidean distance: in, P k ( y=c|x ) as a sample x Category c The probability, Let be the distance function. As the prototype of the class, It is a feature extractor.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Rolling bearing fault diagnosis method based on semi-supervised prototype enhanced network
CN117828461A