A method, apparatus, and computer-readable storage medium for rolling bearing fault diagnosis based on joint adversarial deep transfer learning.
By employing a joint adversarial deep transfer learning approach, and utilizing multi-granularity feature extraction and pseudo-label models, the problem of scarce and disparate fault samples in rolling bearing fault diagnosis is solved, achieving high-precision fault detection and diagnosis.
Patent Information
- Application Number
- CN202410570232.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-09
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2044-05-09
AI Technical Summary
Existing technologies for rolling bearing fault diagnosis face challenges such as scarce fault samples, large differences in data distribution, and severe noise interference, resulting in insufficient diagnostic accuracy, especially under complex operating conditions where precise processing is difficult.
We employ a joint adversarial deep transfer learning approach, which utilizes a multi-granular hierarchical feature extraction network, a Mean Teacher FixMatch pseudo-label model, and a generalized slice Wasserstein joint distance criterion, combined with a gradient inversion layer for adversarial training. This approach enables the effective fusion of source and target domain features and accurate prediction of fault labels.
It improves the accuracy and robustness of rolling bearing fault diagnosis, effectively detects new faults in unlabeled target domains, solves the problems of insufficient labels and distribution differences, and enhances the model's feature extraction capability and diagnostic accuracy.
Smart Images

Figure CN118427713B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of fault diagnosis based on transfer learning, and more specifically, relates to a method, apparatus and computer-readable storage medium for rolling bearing fault diagnosis based on joint adversarial deep transfer learning. Background Technology
[0002] In recent decades, many large-scale or catastrophic industrial accidents have been caused by mechanical equipment failures, such as those in power system turbine generator sets and rotating bearings in various mechanical equipment. Failures in these systems not only affect production and cause economic losses, but also lead to personal injury and environmental pollution. Therefore, equipment fault diagnosis is extremely important in industrial production. Bearings, as key components in mechanical equipment, account for approximately 30% of rotating machinery failures, and their proper operation directly affects the performance of the entire piece of equipment.
[0003] Chinese patent document CN110907176A discloses a fault diagnosis method for deep adversarial transfer networks based on Wasserstein distance. The method includes measuring the distance between the feature distributions of two domains in the feature space using Wasserstein distance, adapting the feature distributions to reduce the differences between the two domains, learning domain-independent features to train an effective classifier, which is responsible for mapping domain-independent features to the category space to complete the classification task.
[0004] In summary, the large datasets accumulated through long-term field monitoring of rolling bearings often face the challenge of scarce fault samples and susceptibility to noise and monitoring errors. Valuable fault information is often difficult to highlight from the massive amount of normal samples, especially under varying operating conditions and diverse scenarios, where the datasets exhibit different distribution characteristics. Directly applying deep learning-based fault diagnosis methods may lead to frequent misjudgments or omissions due to the ambiguity of the information. The accuracy of existing diagnostic technologies also needs improvement; fault diagnosis of rolling bearings is not precise enough in complex field environments. Summary of the Invention
[0005] This invention aims to overcome at least one of the shortcomings of the prior art and provide a rolling bearing fault diagnosis method based on joint adversarial deep transfer learning, thereby solving problems such as patient privacy protection in the prior art. The detailed technical solution of this invention is as follows:
[0006] To address the aforementioned technical problems, this invention provides a rolling bearing fault diagnosis method based on joint adversarial deep transfer learning. This method solves the problems in existing technologies, such as the need for a large amount of fault data to train the model, the requirement that the training and test datasets follow the same distribution, the fact that the operating conditions of rolling bearings change constantly in actual operation, the scarcity of fault data, and the lack of labeled samples.
[0007] To achieve the above objectives, this invention provides a rolling bearing fault diagnosis method based on joint adversarial deep transfer learning, comprising the following steps:
[0008] S1. Collect the original vibration signals of the bearing under different operating conditions;
[0009] S2. The acquired raw vibration signal is divided into source domain data and target domain data and preprocessed. The source domain data includes labeled fault samples, and the target domain data includes unlabeled known fault samples and unlabeled unknown new fault samples.
[0010] S3. Construct a hierarchical feature extraction network based on multi-granularity to extract source domain features and target domain features from source domain data and target domain data;
[0011] The multi-granularity hierarchical feature extraction network comprises a feature extractor and a supervised inverse optimization module.
[0012] The feature extractor includes multiple convolutional modules and skip connections, wherein each convolutional module includes a convolutional layer, a normalization layer, and a ReLU activation function; the skip connections are used in deep neural networks to connect different convolutional modules, taking the output of the previous convolutional module as the input of the next one, and directly connecting it to deeper modules in the network.
[0013] The supervised reverse optimization module includes residual blocks, feature classifiers, and auxiliary decoders;
[0014] The residual block allows the extracted features to directly reach the classifier and auxiliary decoder through this shortcut, while the network layers in the residual block transform the features; then the feature extractor is optimized in a supervised manner by the feature classification loss of the feature classifier and the reconstruction error of the auxiliary decoder.
[0015] S4. Construct a FixMatch pseudo-label model based on Mean Teacher, and use the labeled fault features in the limited source domain features and the unlabeled fault features in the large number of target domain features to perform semi-supervised learning to generate pseudo-label values of target domain features;
[0016] S5. Calculate the conditional distribution of each target domain feature under a given category condition based on the target domain feature pseudo-label values generated by the Mean Teacher FixMatch pseudo-label model. Calculate the joint distribution using the generalized slice Wasserstein joint distance criterion. The joint distribution includes edge features and conditional distribution. Then, fuse the source domain features and target domain features.
[0017] S6. Input the fused source domain features and target domain features into the domain discriminator, and then use the classifier to predict the final label;
[0018] Meanwhile, a gradient inversion layer was added between the feature extractor and the domain discriminator, introducing an adversarial training mechanism.
[0019] Furthermore, the preprocessing includes extracting the time-domain waveform sequence from the original vibration signal to obtain the time-domain vibration signal, performing Fast Fourier Transform (FFT) processing on the time-domain vibration signal to convert the time-domain vibration signal into a frequency-domain vibration signal.
[0020] Furthermore, S3 specifically includes:
[0021] S31. The source domain data and target domain data are subjected to hierarchical convolution and skip connections through a feature extractor to obtain features GS1, GS2, GS3, GS4 and GS5 from low to deep.
[0022] S32. The features GS1, GS2, GS3, GS4, and GS5 of the data are concatenated into a total feature map GS, which consists of the source domain features and the target domain features. This map is then input into the inverse optimization module. Supervised inverse optimization of the feature extractor is performed using the feature classification loss and the reconstruction error generated by the auxiliary decoder, thereby improving the multi-level extraction capability of the feature extractor. Specifically:
[0023] The feature classifier consists of a fully connected layer and a softmax function, classifying combined features. The fully connected layer outputs a K-dimensional vector representing the predicted probability of each class. The softmax function transforms the vector into a probability distribution, where the probability of each class is between [0,1], and the sum of the probabilities of all classes is 1. Therefore, this feature classifier uses the cross-entropy loss function to calculate the feature classification loss, defined as:
[0024] L (y,y_pred) = -1 / N*sum(y[i]) * log(y_pred[i,k])+(1-y[i])*1og(1-y_pred[i,k]))(1);
[0025] In formula (1), y is the true label, y_pred is the probability distribution predicted by the model, N is the number of samples, i is the sample index, and k is the class index;
[0026] In the task of reconstructing samples using an auxiliary decoder, the reconstruction error generated by the auxiliary decoder is measured using the mean squared error loss function (MSE). The parameters of the auxiliary decoder are adjusted by minimizing the MSE loss function. MSE Defined as:
[0027] L MSE =1 / N*sum((y_pred-y_true)∧2) (2);
[0028] Where N is the number of samples, y_pred is the model prediction, and y_true is the true value.
[0029] Furthermore, S4 specifically includes:
[0030] S41. Construct a FixMatch pseudo-label model based on Mean Teacher, including: student network fs and teacher network ft; wherein, the student network is the main model, used to predict and generate pseudo-labels; the teacher network is used to provide more stable pseudo-labels;
[0031] S42. Use weak augmentation to perform data augmentation on the labeled data x to obtain the weakly augmented labeled data Xweak; where the source domain features are the labeled data feature map, i.e., labeled data x, and the target domain features are the unlabeled data feature map, i.e., unlabeled data v.
[0032] S43. Input the weakly augmented labeled data Xweak into the student network fs. Use the softmax function in the student network to predict the class of Xweak, and obtain the predicted probability Px for each class, defined as:
[0033] Px = Softmax(fs(X) weak )) (3);
[0034] In formula (3), Xweak is the labeled data after weak enhancement, and fs is the student network;
[0035] S44. Calculate the supervision loss: Use the cross-entropy H(px,y) to calculate the loss between the predicted value Px and the true label y as the supervision loss, defined as:
[0036]
[0037] In formula (4), C is the number of categories, yi is the value of the true label y in the i-th category (0 or 1), and p x,iIt is the predicted probability of the model for the i-th category.
[0038] S45. Use strong augmentation to perform data augmentation on the unlabeled data v to obtain the strongly augmented unlabeled data Vstrong.
[0039] S46. Input the strongly enhanced unlabeled data Vstrong into the student network fs. Use the Softmax function in the student network to predict the class of Vstrong, and obtain the predicted probability Pv for each class, defined as:
[0040] Pv=Softmax(fs(Vweak)) (5);
[0041] In formula (5), V strong It is unlabeled data after strong enhancement processing; fs is the student network.
[0042] S47. Use weak augmentation to perform data augmentation on the same unlabeled data v to obtain the weakly augmented unlabeled data Vweak.
[0043] S48. Perform teacher network prediction: Input the weakly augmented unlabeled data Vweak into the teacher network ft, and use the Softmax function to obtain the prediction probability Qv for each class, defined as:
[0044] Qv=Softmax(ft(Vweak)) (6);
[0045] In formula (6), V weak It is unlabeled data after strong enhancement processing; ft is the teacher network.
[0046] S49. Perform threshold filtering to generate pseudo-labels: If the maximum value in the teacher network's prediction results exceeds the preset threshold μ, the prediction result is consistent with its true label. The teacher network's prediction result is retained and used in the loss calculation of the unlabeled data, and the prediction result is used as the pseudo-label PL for the unlabeled data. i If the maximum value does not exceed the threshold μ, these unlabeled data will be discarded and not allowed to participate in the current training step.
[0047] S410. Calculate the consistency loss: For the unlabeled data filtered by the threshold, calculate the consistency loss between the student network and the teacher network predictions using the mean squared error (MSE). The loss term Loss_v for the unlabeled data is defined as:
[0048]
[0049] S411. Combining labeled and unlabeled losses: The supervision loss of labeled data and the consistency loss of unlabeled data are combined to form the total loss, which is defined as:
[0050] Loss = Loss_x + Loss_v (8);
[0051] S412. Update Network Weights: After obtaining the total loss, use the backpropagation algorithm to calculate the gradient of the student network weights (w); update the student network weights using the Adam optimizer to obtain the student network weights fst at time t; use these student network weights at time t to update the teacher network weights to obtain the teacher network weights fft at time t, defined as:
[0052]
[0053] In formula (9), The student network weights at time t. τ is the teacher network weight at time t-1, and τ is a hyperparameter, which is the mixing ratio and determines the weight distribution between the old and new weights.
[0054] S413. Generate target domain feature pseudo-label values using the updated Mean Teacher-based FixMatch pseudo-label model.
[0055] Furthermore, in step S5, the conditional distribution of each target domain feature under a given category condition is calculated based on the target domain feature pseudo-label value generated by the Mean Teacher's FixMatch pseudo-label model. The joint distribution is calculated using the generalized slice Wasserstein joint distance criterion, which includes edge features and conditional distribution. Then, the source domain features and target domain features are fused.
[0056] S5 specifically includes:
[0057] S51. For each pair of source domain features and target domain features, use the Euclidean distance metric to calculate the distance between the edge features in their corresponding feature maps on the edge distribution, and the difference value D of the edge features between the two domains. mar The expression is:
[0058] D mar =GSW(P s ,P r (10);
[0059] S52. Use labels generated by the FixMatch pseudo-label model based on Mean Teacher to label the target domain features, making the predicted label values of the target domain features more consistent with the actual label values, and calculate the difference value D of the conditional distribution between the two domains.con Defined as:
[0060]
[0061] P is the probability distribution of the source domain, Q is the probability distribution of the target domain, C is the number of classes, X is the feature space, and y is the true label of the target domain feature.
[0062] S53. The Generalized Slice Wasserstein Joint Distance (GSWJD) criterion combines the difference values of edge features and the difference values of conditional distributions to form a comprehensive distance metric.
[0063] Joint distribution distance It is the difference value of the marginal features plus the difference value of the conditional distribution, that is Therefore, the joint distribution distance mentioned above is defined as:
[0064]
[0065] Furthermore, S6 specifically includes:
[0066] S61. Input the fused source domain features and target domain features into the domain discriminator, and calculate the loss function of the domain discriminator. This loss function is used to distinguish between source domain features and target domain features. The cross-entropy loss function is used and is defined as follows:
[0067]
[0068] Where N is the number of samples, and P(domain = true domain ofx) i |x i ) is the probability prediction of whether a feature comes from the source domain or the target domain by the domain discriminator;
[0069] S62. A gradient reversal layer is added between the feature extractor and the domain discriminator, introducing an adversarial training mechanism. During backpropagation, when calculating the gradient with respect to the parameters of the feature extractor, the gradient reversal layer reverses the gradient returned from the domain discriminator, so that the feature extractor can avoid being identified by the domain discriminator as to which it belongs while extracting features.
[0070] S63. After the fused source domain features and target domain features are processed by the domain discriminator, they are input into the fully connected layer of the classifier. At this time, each data point is multiplied by a weight matrix and a bias term is added. Then, the sigmoid activation function is used to generate the predicted probability of each feature category and predict the fault type of each feature.
[0071] For the sigmoid activation function, each output node independently generates a probability value f(x), representing whether the input data belongs to the corresponding fault category, defined as:
[0072] f(x)=1 / (1+e^(-x)) (14).
[0073] This invention also discloses a rolling bearing fault diagnosis device based on joint adversarial deep transfer learning, characterized in that the device comprises:
[0074] processor;
[0075] A memory on which computer programs that can run on the processor are stored;
[0076] The computer program, when executed by the processor, implements the steps of the rolling bearing fault diagnosis method based on joint adversarial deep transfer learning.
[0077] A computer-readable storage medium is characterized in that it stores a rolling bearing fault diagnosis program based on joint adversarial deep transfer learning, wherein when the rolling bearing fault diagnosis program based on joint adversarial deep transfer learning is executed by the processor, it implements the steps of the rolling bearing fault diagnosis method based on joint adversarial deep transfer learning.
[0078] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0079] (1) The present invention provides a rolling bearing fault diagnosis method based on joint adversarial deep transfer learning, which detects multiple new faults in unlabeled target data, reduces the difference between the source domain and the target domain through adversarial training, thereby realizing effective knowledge transfer, labels the unlabeled known faults in the target domain, and distinguishes between known faults and unknown new faults. It not only realizes the discriminative knowledge transfer from the source domain to the target domain, but also realizes the detection of newly emerging fault categories in the target domain.
[0080] (2) The present invention provides a rolling bearing fault diagnosis method based on joint adversarial deep transfer learning. It studies a hierarchical feature extraction network method based on multi-granularity. Based on the different levels of features extracted by multi-layer deep convolutional networks, a convolutional network is designed to extract sample features at multiple levels. On this basis, skip connections are added to construct a feature deep fusion model at different levels. This not only solves the common gradient vanishing and model degradation problems in deep learning, but also improves the performance of the model by combining feature information at different scales, improves the detailed expression ability of sample features, and provides more reliable domain-invariant features for the transfer network.
[0081] (3) The present invention provides a rolling bearing fault diagnosis method based on joint adversarial deep transfer learning. In response to the problem that it is difficult to provide a large amount of labeled training data in many practical problems, the method is based on the Mean Teacher FixMatch pseudo-label model. It uses limited labeled data and a large amount of unlabeled data to carry out semi-supervised learning to generate target domain feature pseudo-label values. In this way, the data conditional distribution is calculated, the prediction accuracy of the labels is improved, and the shortcomings of insufficient labels for rolling bearing faults in the field are made up.
[0082] (4) The present invention provides a rolling bearing fault diagnosis method based on joint adversarial deep transfer learning. In view of the problems of vanishing KL divergence gradient and difficulty in accurately calculating the feature distribution of high-dimensional data by Wasserstein Distances, the method utilizes the edge distribution and conditional distribution of fault data and studies the calculation of joint distribution based on the generalized slice Wasserstein joint distance criterion. The edge features and conditional distribution of fault sample data are fused together, which can more accurately characterize the differences between data distributions, especially in high-dimensional data feature extraction, and reduce the amount of computation and improve the training speed of the model. This not only enhances the robustness of the model, but also improves the accuracy of feature extraction, making the fault diagnosis results more accurate and reliable. Attached Figure Description
[0083] Figure 1 This is a schematic diagram of the diagnostic method of the present invention.
[0084] Figure 2 This is a schematic diagram of the hierarchical feature extraction network structure based on multi-granularity in Embodiment 1 of the present invention.
[0085] Figure 3 This is the calculation process of the FixMatch pseudo-label model based on Mean Teacher in Embodiment 1 of the present invention.
[0086] Figure 4 This is a framework diagram of the joint adversarial migration model in Embodiment 1 of the present invention. Specific Implementation
[0087] The present disclosure will be further described below with reference to the accompanying drawings and embodiments.
[0088] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of this disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains.
[0089] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this disclosure. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms “comprising” and / or “including” are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0090] Where there is no conflict, the embodiments and features described herein can be combined with each other.
[0091] Example 1
[0092] This embodiment provides a rolling bearing fault diagnosis method based on joint adversarial deep transfer learning, such as... Figure 1 As shown:
[0093] S1. Use an accelerometer to collect the original vibration signals of the bearing under different operating conditions;
[0094] S2. The collected raw vibration signal is divided into source domain data and target domain data and preprocessed; the source domain data includes labeled fault data, and the target domain data includes unlabeled known fault data and unlabeled unknown new fault data.
[0095] The preprocessing includes extracting the time-domain waveform sequence from the original vibration signal to obtain the time-domain vibration signal, performing Fast Fourier Transform (FFT) processing on the time-domain vibration signal to convert the time-domain vibration signal into a frequency-domain vibration signal;
[0096] The preprocessed source domain data and target domain data are randomly shuffled. The source domain data is divided into a source domain training set and a source domain dataset in an 8:2 ratio, and the target domain data is divided into a target domain training set and a target domain dataset in an 8:2 ratio, with no overlap in data sampling.
[0097] S3. Construct a hierarchical feature extraction network based on multi-granularity, such as... Figure 2 As shown, source domain features and target domain features are extracted from source domain data and target domain data;
[0098] The multi-granularity hierarchical feature extraction network comprises a feature extractor and a supervised inverse optimization module.
[0099] The feature extractor includes multiple convolutional modules and skip connections, wherein each convolutional module includes a convolutional layer, a normalization layer, and a ReLU activation function;
[0100] The skip connection is a structure used in deep neural networks to connect different layers. It not only uses the output of one layer as the input of the next layer, but also directly connects to deeper layers in the network, allowing information in the network to flow across multiple layers.
[0101] The supervised reverse optimization module includes residual blocks, feature classifiers, and auxiliary decoders;
[0102] Residual blocks allow extracted features to directly reach the feature classifier and auxiliary decoder through this shortcut without recalculation, while transforming the features through network layers.
[0103] Specifically, S3 includes the following steps:
[0104] S31. The source domain data and target domain data are subjected to hierarchical convolution and skip connections through the feature extractor to obtain features GS1, GS2, GS3, GS4 and GS5 from low to deep.
[0105] The skip connection is a structure used in deep neural networks to connect different layers. It not only uses the output of one layer as the input of the next layer, but also directly connects to deeper layers in the network. This allows information in the network to flow across multiple layers, thereby enhancing feature transfer and reuse, and helping to solve the problems of gradient vanishing or gradient exploding.
[0106] S32. The features GS1, GS2, GS3, GS4, and GS5 of the data are concatenated into a total feature map GS, which is the source domain feature and the target domain feature. Then, it is input into the reverse optimization module. The feature extractor is subjected to supervised reverse optimization through feature classification loss and reconstruction error generated by the auxiliary decoder, thereby improving the multi-level extraction capability of the feature extractor.
[0107] Features GS1, GS2, GS3, GS4, and GS5 are concatenated to form a total feature map GS, which is then input into the residual block for fusion. Finally, the data is input into the feature classifier and the auxiliary decoder to obtain the feature classification loss and reconstruction error.
[0108] The feature classifier consists of a fully connected layer and a softmax function, which classifies the combined features. The fully connected layer outputs a K-dimensional vector representing the predicted probability of each category. The softmax function transforms the vector into a probability distribution, where the probability of each category is between [0,1] and the sum of the probabilities of all categories is 1.
[0109] Therefore, this feature classifier uses the cross-entropy loss function to calculate the feature classification loss, defined as:
[0110] L (y,y_pred) = -1 / N*sum(y[i]) *log(y_pred[i,k])+(1-y[i])*1og(1-y_pred[i,k]))(1);
[0111] In formula (1), y is the true label, y_pred is the probability distribution predicted by the model, N is the number of samples, i is the sample index, and k is the class index;
[0112] In the task of reconstructing samples using an auxiliary decoder, the reconstruction error generated by the auxiliary decoder is measured using the mean squared error (MSE) loss function. By minimizing the MSE loss function, the parameters of the auxiliary decoder are adjusted so that its output better approximates the true result. Therefore, the mean squared error (MSE) loss function is defined as:
[0113] L MSE =1 / N*sum((y_pred-y_true)∧2) (2);
[0114] Among them, L MSE This represents the loss function, where N is the number of samples, y_pred is the model prediction, and y_true is the true value.
[0115] S4. Construct a FixMatch pseudo-label model based on Mean Teacher, using semi-supervised learning with labeled fault data from a limited source domain dataset and unlabeled fault data from a large target domain dataset to generate pseudo-label values for the target domain data, such as... Figure 3 As shown;
[0116] S4 specifically includes:
[0117] S41. Construct a Mean Teacher-based FixMatch pseudo-label model (MTFM), which includes a student network fs and a teacher network ft. The student network is the main model, used to predict and generate pseudo-labels, while the teacher network is used to provide more stable pseudo-labels.
[0118] Since the feature map GS after the multi-granularity feature extractor contains source domain features and target domain features, where the source domain features are labeled data feature maps and the target domain features are unlabeled data feature maps (here they are denoted as labeled data x and unlabeled data v respectively, and the same applies below), it is then used as the data input for the MTFM model for semi-supervised learning. In this process, the model undergoes a series of operations such as labeled data training, unlabeled data training, and network weight updates. The model will generate pseudo-label values for the target domain data. These pseudo-labels will be used to calculate the conditional distribution of the data to improve the accuracy of label prediction.
[0119] The labeled data training refers to augmenting the labeled data, then predicting its category through a student network, and calculating the cross-entropy loss between the prediction result and the true label. This is used to train the model's ability to distinguish different categories and update the network weights to optimize model performance.
[0120] S42. Perform data augmentation: Use weak augmentation to perform data augmentation on the labeled data x to obtain the weakly augmented labeled data xweak;
[0121] S43. Perform student network prediction: Input the weakly augmented labeled data Xweak into the student network fs, and use the softmax function of the student network to predict the class of Xweak, obtaining the predicted probability Px for each class, defined as:
[0122] Px = Softmax(fs(X) weak )) (13);
[0123] In formula (3), Xweak is the labeled data after weak enhancement, and fs is the student network;
[0124] S44. Calculate the supervision loss: Use the cross-entropy H(px,y) to calculate the loss between the predicted value Px and the true label y as the supervision loss, defined as:
[0125]
[0126] In formula (4), C is the number of categories, yi is the value of the true label y in the i-th category (0 or 1), and p x,i It is the predicted probability of the model for the i-th category.
[0127] The unlabeled data training refers to using a student network to make predictions on strongly augmented unlabeled data, selecting high-confidence predictions to generate pseudo-labels, then calculating the consistency loss between student and teacher network predictions, combining it with the supervised loss from labeled data, updating the network weights, and finally generating pseudo-labels to improve the model's generalization ability to unlabeled data. The specific training steps are as follows:
[0128] S45. Perform data augmentation: Use strong augmentation to perform data augmentation on the unlabeled data v to obtain the strongly augmented unlabeled data Vstrong.
[0129] S46. Perform student network prediction: Input the strongly augmented unlabeled data Vstrong into the student network fs. Use the Softmax function in the student network to predict the class of Vstrong, and obtain the predicted probability Pv for each class, defined as:
[0130] Pv=Softmax(fs(Vweak)) (5);
[0131] Among them, V strong It is unlabeled data after strong enhancement processing; fs is the student network.
[0132] S47. Perform data augmentation: Use weak augmentation to perform data augmentation on the same unlabeled data v to obtain the weakly augmented unlabeled data Vweak;
[0133] S48. Perform teacher network prediction: Input the weakly augmented unlabeled data Vweak into the teacher network ft, and use the Softmax function to obtain the prediction probability Qv for each class, defined as:
[0134] Qv=Softmax(ft(Vweak)) (6);
[0135] Among them, V weak It is unlabeled data after strong enhancement processing; ft is the teacher network.
[0136] S49. Perform threshold filtering to generate pseudo-labels: Specifically, if the maximum value in the teacher network's prediction results exceeds a preset threshold μ, the prediction results are consistent with their true labels. Therefore, the teacher network's prediction results will be retained and used in the loss calculation of the unlabeled data, and the prediction results will be used as pseudo-labels PL for the unlabeled data. i Conversely, if the maximum value does not exceed the threshold μ, this unlabeled data will be discarded and not allowed to participate in the current training step;
[0137] S410. Calculate the consistency loss: For the unlabeled data filtered by the threshold, calculate the consistency loss between the student network and the teacher network predictions using the mean squared error (MSE). The loss term Loss_v for the unlabeled data is defined as:
[0138]
[0139] S411. Combining labeled and unlabeled losses: The supervision loss of labeled data and the consistency loss of unlabeled data are combined to form the total loss, which is defined as:
[0140] Loss = Loss _x + Loss _v (8);
[0141] S412. Update Network Weights: After obtaining the total loss, use the backpropagation algorithm to calculate the gradient of the student network weights (w); update the student network weights using the Adam optimizer to obtain the student network weights fst at time t; use these student network weights at time t to update the teacher network weights to obtain the teacher network weights fft at time t, defined as:
[0142]
[0143] in, The student network weights at time t. τ is the teacher network weight at time t-1, and τ is a hyperparameter called the mixing ratio, which determines the weight distribution between the old and new weights;
[0144] S413. Generate target domain feature pseudo-label values using the updated Mean Teacher-based FixMatch pseudo-label model.
[0145] S5. Since the total feature map Gs only contains the edge features of the source domain data and the target domain data, this means that the extracted features may not be sufficient to fully describe the source domain data and the target domain data. Therefore, based on the pseudo-label values of the target domain features generated by the Mean Teacher's FixMatch pseudo-label model, the conditional distribution of each target domain feature under a given category condition is calculated. Then, the joint distribution is calculated using the generalized slice Wasserstein joint distance criterion. The joint distribution here includes edge features and conditional distribution, which together describe the complete features of the data. By calculating the generalized slice Wasserstein joint distance, the source domain features and the target domain features are fused, and the distribution differences between them are reduced, which promotes the alignment between the two domain features to a certain extent.
[0146] The generalized slice Wasserstein joint distance is inspired by the generalized Radon transform, which extends linear slices of probability measures to nonlinear slices. The generalized Radon transform is derived from the classical Radon transform, which extends integrals on hyperplanes to integrals on hypersurfaces such as manifolds. The classical Radon transform can be defined as follows:
[0147]
[0148] in, It is the result of the Radon transformation, also known as the Radon projection. f is a function defined on the original space, and dμs(x) is the probability measure along the hyperplane S, which defines the direction of the projection.
[0149] The generalized slice Wasserstein distance, inspired by the generalized Radon transform, can be defined as follows:
[0150]
[0151] Among them, P m and Q n Let M be the projection of the original probability distributions P and Q onto the m-th cross-section, M be the number of cross-sections, N be the number of projections onto each cross-section, and W be the Wasserstein distance.
[0152] To address the issue of differing probability distributions between source and target domain features using the generalized slice Wasserstein distance, it's necessary to first calculate the joint distribution difference between them. This joint distribution, composed of marginal features and conditional distributions, collectively describes the complete features of the data. Then, by minimizing the generalized slice Wasserstein distance, the fused marginal features and conditional distributions of the source and target domain features are obtained. This helps promote distribution alignment between the source and target domain data. The specific training steps are as follows:
[0153] S51. For each pair of source domain features and target domain features, use the Euclidean distance metric to calculate the distance between the edge features in their corresponding feature maps along the edge distribution, and the difference value D of the edge features between the two domains. mar The expression is:
[0154] D mar =GSW(P s ,P r (10);
[0155] S52. Use labels generated by the FixMatch pseudo-label model based on Mean Teacher to label the target domain features, making the predicted label values of the target domain features more consistent with the actual label values, and calculate the difference value D of the conditional distribution between the two domains. con Defined as:
[0156]
[0157] P is the probability distribution of the source domain, Q is the probability distribution of the target domain, C is the number of classes, X is the feature space, and y is the true label of the target domain feature.
[0158] S53. The Generalized Slice Wasserstein Joint Distance (GSWJD) criterion combines the difference values of edge features and the difference values of conditional distributions to form a comprehensive distance metric.
[0159] Joint distribution distance It is the difference value of the marginal features plus the difference value of the conditional distribution, that is Therefore, the joint distribution mentioned above can be defined as:
[0160]
[0161] S6. Input the spliced and fused source domain features and target domain features into the domain discriminator and classifier. The domain discriminator is tasked with distinguishing whether the input fault data comes from the source domain or the target domain, and generates a domain loss function. Adversarial training is introduced between the domain discriminator and the feature extractor. The classifier is used to predict the final label, i.e., the known category or the new category.
[0162] Finally, the diagnostic results for different fault types under different operating conditions are output.
[0163] S61. Input the concatenated and fused source domain features and target domain features into the domain discriminator, and calculate the loss function of the domain discriminator. This loss function is used to distinguish fault sample data between the source domain and the target domain, and to predict as accurately as possible which domain each sample comes from. Here, the cross-entropy loss function is used, defined as:
[0164]
[0165] Where N is the number of samples, and P(domain = true domain ofx) i |x i ) is the domain discriminator for sample x i Probability predictions from the real domain;
[0166] S62. To enable the feature extractor to extract features invariant between the source and target domain data, thereby helping the subsequent classifier to perform better classification, a gradient inversion layer is added between the feature extractor and the domain discriminator, introducing an adversarial training mechanism, such as... Figure 4 As shown. In
[0167] During backpropagation, when calculating the gradient with respect to the parameters of the feature extractor, the gradient inversion layer inverts the gradient returned from the domain discriminator. This allows the feature extractor to avoid being identified by the domain discriminator while extracting features, thus enabling the feature extractor to "deceive" the domain discriminator as much as possible.
[0168] S63. After the fused source domain features and target domain features are processed by the domain discriminator, they are input into the fully connected layer of the classifier. At this time, each data point is multiplied by a weight matrix and a bias term is added. Then, the sigmoid activation function is used to generate the predicted probability of each data category and predict the fault type of each data point.
[0169] For the sigmoid activation function, each output node independently generates a probability value f(x), representing whether the sample belongs to the corresponding fault category, defined as:
[0170] f(x)=1 / (1+e^(-x)) (14).
[0171] The data test results are as follows:
[0172] To demonstrate the feasibility of the above method, the algorithm will be tested using the Case Western Reserve University (CWRU dataset).
[0173] The CWRU dataset is a bearing dataset provided by Case Western Reserve University, and all of them were collected from a transmission system dynamics simulator. The two operating conditions with speed-load configurations set to 20Hz-0V and 30Hz-2V are considered as different tasks, denoted as task 0 and 1, respectively.
[0174] As shown in Table 1, each subset contains five conditions: one healthy state and five fault states; four migration methods are set, as shown in Table 2.
[0175] Table 1 Experimental bearing dataset
[0176]
[0177] Table 2 Migration Task List
[0178]
[0179]
[0180] After multiple iterations of training, the accuracy rates for known faults and new class identification in Task T1 were 92.68% and 93.66%, respectively; in Task T2, they were 92.36% and 91.76%; in Task T3, they were 95.84% and 90.99%; and in Task T4, they were 90.56% and 89.78%. This demonstrates that the proposed method can effectively learn and extract information features under different operating conditions, enabling cross-domain diagnosis.
[0181] Example 2
[0182] This embodiment discloses a rolling bearing fault diagnosis device based on joint adversarial deep transfer learning, characterized in that the device includes:
[0183] processor;
[0184] A memory on which computer programs that can run on the processor are stored;
[0185] The computer program, when executed by the processor, implements the steps of the rolling bearing fault diagnosis method based on joint adversarial deep transfer learning.
[0186] This embodiment also discloses a computer-readable storage medium, characterized in that the computer-readable storage medium stores a rolling bearing fault diagnosis program based on joint adversarial deep transfer learning, and when the rolling bearing fault diagnosis program based on joint adversarial deep transfer learning is executed by the processor, it implements the steps of the rolling bearing fault diagnosis method based on joint adversarial deep transfer learning.
[0187] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the technical solutions of the present invention, and are not intended to limit the specific implementation of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the claims of the present invention should be included within the protection scope of the claims of the present invention.
Claims
1. A method for fault diagnosis of rolling bearings based on joint adversarial deep transfer learning, characterized in that, include S1. Collect the original vibration signals of the bearing under different operating conditions; S2. The acquired raw vibration signal is divided into source domain data and target domain data and preprocessed. The source domain data includes labeled fault samples, and the target domain data includes unlabeled known fault samples and unlabeled unknown new fault samples. S3. Construct a hierarchical feature extraction network based on multi-granularity to extract source domain features and target domain features from source domain data and target domain data; The multi-granularity hierarchical feature extraction network comprises a feature extractor and a supervised inverse optimization module. The feature extractor includes multiple convolutional modules and skip connections, wherein each convolutional module includes a convolutional layer, a normalization layer, and a ReLU activation function; the skip connections are used in deep neural networks to connect different convolutional modules, taking the output of the previous convolutional module as the input of the next one, and directly connecting it to deeper modules in the network. The supervised reverse optimization module includes residual blocks, feature classifiers, and auxiliary decoders; The residual block allows the extracted features to directly reach the classifier and auxiliary decoder through this shortcut, while the network layers in the residual block transform the features; then the feature extractor is optimized in a supervised manner by the feature classification loss of the feature classifier and the reconstruction error of the auxiliary decoder. S4. Construct a FixMatch pseudo-label model based on Mean Teacher, and use the labeled fault features in the limited source domain features and the unlabeled fault features in the large number of target domain features to perform semi-supervised learning to generate pseudo-label values of target domain features; S4 specifically includes: S41. Construct a FixMatch pseudo-label model based on Mean Teacher, including: student network Teacher Network The student network is the main model, used to predict and generate pseudo-labels; the teacher network is used to provide more stable pseudo-labels. S42. Use weak augmentation to perform data augmentation on the labeled data x to obtain the weakly augmented labeled data Xweak; where the source domain feature is the labeled data feature map, i.e., labeled data x, and the target domain feature is the unlabeled data feature map, i.e., unlabeled data v. S43. Input the weakly enhanced labeled data Xweak into the student network. In the process, the softmax function is used to predict the class of Xweak through the student network, and the predicted probability Px for each class is obtained, defined as: (3); In formula (3), Xweak is the labeled data after weak enhancement. It is a student network; S44. Use cross-entropy H(px,y) to calculate the loss between the predicted value Px and the true label y as the supervision loss, defined as: (4); In formula (4), C is the number of categories, and yi is the value of the true label y in the i-th category (0 or 1). It is the model's predicted probability for the i-th category; S45. Use strong augmentation to perform data augmentation on the unlabeled data v to obtain the strongly augmented unlabeled data Vstrong. S46. Input the strongly enhanced unlabeled data Vstrong into the student network. In the process, the softmax function is used to predict the class of Vstrong through the student network, and the predicted probability Pv for each class is obtained, defined as: (5); In formula (5), V strong It is unlabeled data after strong augmentation. It is a student network; S47. Use weak augmentation to perform data augmentation on the same unlabeled data v to obtain the weakly augmented unlabeled data Vweak. S48. Input the weakly enhanced unlabeled data Vweak into the teacher network. In the above, the predicted probability Qv for each class is obtained using the Softmax function, defined as: (6); In formula (6), V weak It is unlabeled data after weak augmentation. It is a teacher network; S49. If the maximum value in the prediction results of the teacher network exceeds a preset threshold. If the prediction result is consistent with its true label, the prediction result of the teacher network is retained and used in the loss calculation of the unlabeled data, and the prediction result is used as the pseudo label of the unlabeled data. If the maximum value does not exceed the threshold If this happens, the unlabeled data will be discarded and will not be allowed to participate in the current training step. S410. For unlabeled data filtered by the threshold, the consistency loss between the predictions of the student network and the teacher network is calculated using the mean squared error. The loss term Loss_v for the unlabeled data is defined as: (7); S411. Combine the supervision loss of labeled data and the consistency loss of unlabeled data to form the total loss. Defined as: (8); S412. After obtaining the total loss, use the backpropagation algorithm to calculate the student network weights. The gradient of the student network is obtained; the weights of the student network at time t are updated using the Adam optimizer. At time t, the teacher network weights are updated using the student network weights, thus obtaining the teacher network weights at time t. t is defined as: (9); In formula (9), The student network weights at time t. It is the teacher network weight at time t-1. It is a hyperparameter, the mixing ratio, which determines the weight distribution between the old and new weights; S413. Use the updated Mean Teacher-based FixMatch pseudo-label model to generate pseudo-label values for target domain features; S5. Calculate the conditional distribution of each target domain feature under a given category based on the pseudo-label values of the target domain features, calculate the joint distribution using the Wasserstein joint distance criterion for generalized slices, and then fuse the source domain features and the target domain features. S6. The fused source domain features and target domain features are input into the domain discriminator and then the classifier is used to predict the final label. At the same time, a gradient reversal layer is added between the feature extractor and the domain discriminator to introduce an adversarial training mechanism.
2. The rolling bearing fault diagnosis method based on joint adversarial deep transfer learning according to claim 1, characterized in that, The preprocessing includes extracting the time-domain waveform sequence from the original vibration signal, obtaining the time-domain vibration signal, performing a fast Fourier transform on the time-domain vibration signal, and converting the time-domain vibration signal into a frequency-domain vibration signal.
3. A rolling bearing fault diagnosis method based on joint adversarial deep transfer learning according to claim 1 or 2, characterized in that, S3 specifically includes: S31. The source domain data and target domain data are subjected to hierarchical convolution and skip connections through a feature extractor to obtain features GS1, GS2, GS3, GS4 and GS5 from low to deep. S32. The features GS1, GS2, GS3, GS4, and GS5 of the data are concatenated into a total feature map GS, which consists of the source domain features and the target domain features. This map is then input into the inverse optimization module. Supervised inverse optimization of the feature extractor is performed using the feature classification loss and the reconstruction error generated by the auxiliary decoder, thereby improving the multi-level extraction capability of the feature extractor. Specifically: The feature classifier consists of a fully connected layer and a softmax function, which classifies the combined features. The fully connected layer outputs a K-dimensional vector representing the predicted probability of each class. The softmax function transforms the vector into a probability distribution. Therefore, this feature classifier uses the cross-entropy loss function to calculate the feature classification loss, defined as: (1); In formula (1), y is the true label, N is the number of samples, i is the sample index, and k is the class index; In the task of reconstructing samples using an auxiliary decoder, the reconstruction error generated by the auxiliary decoder is measured using the mean squared error (MSE) loss function. The parameters of the auxiliary decoder are adjusted by minimizing the MSE loss function. Defined as: (2); Where N is the number of samples, y_pred is the model prediction, and y_true is the true value.
4. The rolling bearing fault diagnosis method based on joint adversarial deep transfer learning according to claim 1, characterized in that, S5 specifically includes: S51. For each pair of source domain features and target domain features, use the Euclidean distance metric to calculate the distance between the edge features in their corresponding feature maps on the edge distribution, and the difference value of the edge features between the two domains. The expression is: (10); S52. Use labels generated by the FixMatch pseudo-label model based on Mean Teacher to label the target domain features, making the predicted label values of the target domain features more consistent with the actual label values, and calculate the difference value of the conditional distribution between the two domains. Defined as: (11); P is the probability distribution of the source domain, Q is the probability distribution of the target domain, C is the number of classes, X is the feature space, and y is the true label of the target domain feature. S53. The generalized slice Wasserstein joint distance criterion combines the difference values of edge features and the difference values of conditional distributions to form a comprehensive distance metric. Joint distribution distance It is the difference value of the marginal features plus the difference value of the conditional distribution, that is The joint distribution distance mentioned above is defined as: (12)。 5. The rolling bearing fault diagnosis method based on joint adversarial deep transfer learning according to claim 4, characterized in that, Furthermore, S6 specifically includes: S61. Input the fused source domain features and target domain features into the domain discriminator, and calculate the loss function of the domain discriminator. This loss function is used to distinguish between source domain features and target domain features. The cross-entropy loss function is used and is defined as follows: (13); Where N is the number of samples, It is the probability prediction of whether a feature comes from the source domain or the target domain by the domain discriminator; S62. A gradient inversion layer is added between the feature extractor and the domain discriminator, introducing an adversarial training mechanism; during backpropagation, when calculating the gradient with respect to the parameters of the feature extractor, the gradient inversion layer inverts the gradient returned from the domain discriminator. S63. After the fused source domain features and target domain features are processed by the domain discriminator, they are input into the fully connected layer of the classifier. At this time, each data point is multiplied by a weight matrix and a bias term is added. Then, the sigmoid activation function is used to generate the predicted probability of each feature category and predict the fault type of each feature. For the sigmoid activation function, each output node generates an independent probability value. This indicates whether the input data belongs to the corresponding fault category, defined as: (14)。 6. A rolling bearing fault diagnosis device based on joint adversarial deep transfer learning, characterized in that, The device includes: processor; A memory on which computer programs that can run on the processor are stored; When the computer program is executed by the processor, it implements the steps of the rolling bearing fault diagnosis method based on joint adversarial deep transfer learning as described in any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a rolling bearing fault diagnosis program based on joint adversarial deep transfer learning, which, when executed by the processor, implements the steps of a rolling bearing fault diagnosis method based on joint adversarial deep transfer learning as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Fault diagnosis method for deep adversarial migration network based on Wasserstein distance
CN110907176A
Multi-mode bearing fault intelligent diagnosis method based on transfer learning
CN116401603A
Bearing service life prediction method based on hidden markov model and transfer learning
WO2021042935A1
