Cross-domain bearing fault diagnosis method based on prototype comparative learning

Through the prototype comparison learning method, the features of the source domain and the target domain are divided into different clusters, and the classifier assisted by pseudo-label sample training classifiers are solved, and the problem of feature matching errors and large-scale label dependence on the source domain in the traditional cross-domain bearing fault diagnosis method is achieved, high-precision fault diagnosis and reduced label dependence.

CN119760458AActive Publication Date: 2025-04-04XIDIAN UNIV

Patent Information

Application Number
CN202411824428.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-04-04
Estimated Expiration
2044-12-12

AI Technical Summary

Technical Problem

Traditional cross-domain bearing fault diagnosis methods have feature matching errors and dependence on a large number of labels on the source domain, resulting in low fault diagnosis accuracy.

Method used

Using a method based on prototype comparison learning, the features of the source domain and the target domain are divided into different clusters through cluster learning, and the intra-domain prototype comparison learning is used to enhance the discriminant characteristics, and the classifier is trained through pseudo-label samples to reduce the dependence on source domain labels.

Benefits of technology

It improves the accuracy of cross-domain bearing fault diagnosis, reduces the model's dependence on source domain labels, and is suitable for practical industrial application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760458A_ABST
    Figure CN119760458A_ABST
Patent Text Reader

Abstract

The invention discloses a cross-domain bearing fault diagnosis method based on prototype comparative learning, and the method comprises the implementation steps: generating a cross-domain training set of a source domain and a target domain based on an original training set, constructing a cross-domain bearing fault diagnosis network formed by connecting a residual error sub-network and a classifier in series, inputting the cross-domain training set into the residual error sub-network, and carrying out the fault diagnosis of the target domain. The features output by the residual sub-network are divided into different clusters by using K-means clustering, the features of the same cluster in a source domain and a target domain are matched to the same cluster in the other domain based on cross-domain prototype comparative learning, the classification weight of a classifier is updated based on a pseudo tag, and training is ended when the loss function of the fault diagnosis network is converged. According to the method, the features of the source domain and the target domain are accurately matched by taking the cluster as a unit, and meanwhile, fewer source domain labels are used, so that the cross-domain bearing fault diagnosis precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of mechanical equipment fault diagnosis, and further relates to a cross-domain bearing fault diagnosis method based on prototype contrast learning in the technical field of bearing fault diagnosis. The present invention can be used for cross-domain bearing fault diagnosis under multiple working conditions. Background Art

[0002] As an important component of rotating machinery, bearings operate under high speed, high pressure and heavy load conditions and are prone to failure, which not only causes serious economic losses but also threatens the life safety of workers. Deep learning technology can reveal the complex relationship between data and has been widely used in the field of bearing fault diagnosis. Traditional fault diagnosis methods based on deep learning assume that training data and test data are independent and identically distributed. However, in actual industrial scenarios, the working environment of bearings is complex and changeable, and training data and test data often follow different distributions, resulting in poor practical application of fault diagnosis models. To address this problem, different working conditions of bearings are regarded as source domains or target domains. It is assumed that the data in the source domain are all labeled and the data in the target domain are all unlabeled. By reducing the data distribution difference between the source domain and the target domain, the fault diagnosis model trained in the source domain can work in the target domain. However, this method ignores two problems: (1) Obtaining sufficient labels for source domain data requires professional knowledge and a lot of time, which cannot be met in actual applications. (2) Directly matching all features of the source domain and the target domain to reduce the data distribution difference, different samples of the same class will be matched to different categories in the other domain, resulting in poor accuracy of the fault diagnosis model.

[0003] Yanshan University proposed a cross-domain bearing fault diagnosis method based on a multi-representation adaptive network in its patent application document "A cross-domain bearing fault diagnosis method based on a multi-representation adaptive network" (patent application number: CN 202311364218.0, application publication number: CN 117606801 A). The implementation steps of this method are as follows: (1) Collect the original vibration signals under different working conditions, and pre-process the collected signals to obtain the source domain data set and the target domain data set, which are divided into training data and test data of the source domain and target domain respectively; (2) Construct a multi-representation adaptive network model, input the training data of the source domain and target domain into the model, extract multiple representations of the source domain and target domain, and minimize the joint distribution difference between the source domain and the target domain based on the joint maximum mean difference and pseudo-label, so as to extract the domain invariant features of the source domain and the target domain, and finally form domain joint distribution adaptation; (3) Input the test data into the trained feature extraction model to obtain the bearing fault diagnosis result. The shortcomings of this method are: since it needs to use all the labels of the source domain training data to train the multi-representation adaptive network model, the model effect depends on a large number of labels and is difficult to apply in practice.

[0004] Chongqing University of Posts and Telecommunications proposed a cross-domain bearing fault diagnosis method based on MSCNN-ACGAN in its patent application "Transfer learning rolling bearing fault diagnosis method based on MSCNN-ACGAN" (patent application number: 202411098198.1, application publication number: CN 118981683A). The implementation steps of this method are as follows: (1) Use sensors to collect rolling bearing fault vibration signals under different states, obtain signal samples, and perform preprocessing including non-overlapping moving average cutting and standardization; (2) Build a multi-scale convolutional neural network MSCNN and an auxiliary classifier generative adversarial network ACGAN and a sub-domain adaptive network; (3) Input the source domain signal and its corresponding label into the network built in (2) for training, extract features and generate a supplementary data set for the source domain; (4) After the training of the multi-scale convolutional neural network MSCNN and the auxiliary classifier generative adversarial network ACGAN is completed, the sub-domain adaptive network is used to perform rolling bearing fault diagnosis under multiple working conditions. The shortcomings of this method are: by making the covariance matrix of the source domain features as similar as possible to the covariance matrix of the target domain features, the distribution difference between the source domain data and the target domain data is reduced, but the semantic similarity of the categories between the source domain and the target domain is not considered, which will lead to incorrect matching between features with small differences in different categories. Summary of the invention

[0005] The purpose of the present invention is to address the deficiencies of the above-mentioned prior art and propose a cross-domain bearing fault diagnosis method based on prototype contrast learning, so as to solve the problems of low fault diagnosis accuracy and heavy reliance on a large number of source domain labels caused by erroneous feature matching in traditional cross-domain bearing fault diagnosis.

[0006] The idea of ​​implementing the present invention is that the present invention divides the features of the training set samples of the source domain and the target domain into different clusters through cluster learning, and uses the intra-domain prototype contrast learning to enhance the discriminability of the features in each cluster, and uses the cross-domain prototype contrast learning to match the features in the source domain and the target domain in cluster units, so that the features in the same cluster are matched to the same cluster, thereby improving the accuracy of cross-domain bearing fault diagnosis. Clustering is an unsupervised learning method in machine learning and data mining. Samples are divided into several clusters according to a certain similarity measure, so that the similarity of samples in the same cluster is high, and the similarity of samples between different clusters is low. In the present invention, the features of the source domain and the target domain are respectively clustered by K-means to obtain several clusters. Each cluster is regarded as a category and represented by a centroid vector, that is, the prototype of each category. On this basis, the intra-domain prototype contrast learning allows each feature in the domain to be close to the prototype in the same cluster and away from other clusters, thereby reducing the number of cluster boundary features, reducing the probability of feature classification errors, and making the features discriminative. Cross-domain prototype contrast learning takes into account the semantic similarity between categories, matches the features of the source domain and the target domain in clusters, avoids matching the features in the same cluster to different clusters in another domain, thereby aligning the features of the source domain and the target domain, and improving the accuracy of cross-domain fault diagnosis. Therefore, the present invention accurately matches the features of the source domain and the target domain by clustering learning, intra-domain prototype contrast learning, and cross-domain prototype contrast learning on the features of the source domain and the target domain, thereby improving the accuracy of fault diagnosis. In addition, the present invention assists in training the classifier with pseudo-label samples of the source domain and the target domain, thereby reducing the dependence of the fault diagnosis model on the source domain label. After training the classifier with a small number of labeled samples in the source domain training set, the other unlabeled samples in the source domain and target domain training sets are predicted, and the features of the samples with a prediction probability higher than the threshold are selected. The classification weights of the classifier are updated using the average value of the features, thereby training a high-precision fault diagnosis model in the absence of labels. Therefore, using pseudo-label samples to assist in training the cross-domain fault diagnosis model can reduce the model's dependence on labels.

[0007] The specific steps for achieving the purpose of the present invention are as follows:

[0008] Step 1: Generate cross-domain training sets of source domain and target domain based on the original training set;

[0009] Step 2: Train the cross-domain bearing fault diagnosis network based on prototype contrast learning:

[0010] Step 2.1, construct a cross-domain bearing fault diagnosis network consisting of a residual sub-network and a classifier in series, input the cross-domain training set into the residual sub-network, and use K-means clustering to divide the features output by the residual sub-network into different clusters;

[0011] Step 2.2, using cross-domain prototype contrastive learning, the features of the same cluster in the source domain and the target domain are matched to the same cluster in the other domain;

[0012] Step 2.3, update the classification weight of the classifier based on the pseudo-label;

[0013] Step 2.4, using the stochastic gradient descent method, iteratively update the network parameters until the loss function converges, and obtain the trained cross-domain bearing fault diagnosis network;

[0014] Step 3: Input the sample of the cross-domain bearing to be fault diagnosed into the trained cross-domain bearing fault diagnosis network, and output the result of the cross-domain bearing fault diagnosis.

[0015] Furthermore, the steps to generate the original training set are as follows:

[0016] In the first step, at least two working conditions with the same category are selected, and each working condition contains at least three categories;

[0017] In the second step, the sliding window technology is used to cut each type of bearing vibration signal into at least 210 one-dimensional time series data, and each one-dimensional time series data is normalized to form a sample set;

[0018] In the third step, 210 samples are randomly selected from the sample set of each category in each working condition to form the original training set for each working condition.

[0019] Furthermore, different operating conditions refer to different operating conditions where the bearing operates at different speeds or the bearing is under different load conditions.

[0020] Furthermore, the steps of generating a cross-domain training set are as follows: arbitrarily select two working conditions in the original training set as the source domain and the target domain respectively, select at most 60 samples for each category in the original training set of the source domain and annotate the fault type labels to form a source domain labeled training set; the rest of the original training set is the source domain unlabeled training set, and the source domain labeled training set, the source domain unlabeled training set and the target domain original training set are combined to form a cross-domain training set.

[0021] Furthermore, the structure of the residual subnetwork is: convolution layer, ReLu activation layer, pooling layer, first residual layer, second residual layer, third residual layer, fourth residual layer, global average pooling layer, fully connected layer; the number of convolution kernels of the convolution layer is set to 64, the size of the convolution kernel is set to 1×7, the ReLu activation layer is implemented using the ReLu function, the size of the pooling kernel of the pooling layer is set to 1×3, the pooling step is set to 1×2, the first to fourth residual layers all contain two convolution layers with the same number of convolution kernels, and the number of convolution kernels is set to 64, 128, 256 and 512 respectively.

[0022] Furthermore, the use of K-means clustering to divide the features output by the residual subnetwork into different clusters means that similar features in the source domain and the target domain are divided into the same cluster using K-means clustering, one cluster corresponds to one category, and the category prototype is calculated by the average value of all features in the cluster:

[0023]

[0024] in, Indicates the kth cluster in the source domain obtained by K-means clustering The prototype, Indicates belonging to The sample characteristics.

[0025] Furthermore, the steps of matching the features of the same cluster in the source domain and the target domain to the same cluster in another domain by using cross-domain prototype contrastive learning are as follows:

[0026] The first step is to conduct intra-domain prototype comparison learning for each feature in the source domain and the target domain and all cluster prototypes in the same domain, so that each sample is close to the prototype of the cluster to which it belongs and away from the prototypes of other clusters, thereby reducing the number of features on the boundaries between clusters in each domain.

[0027] The second step is to match the source domain and the target domain in clusters for cross-domain prototype comparative learning, so that each feature in one domain and the prototype of the cluster to which it belongs are matched to the same cluster prototype in another domain, ensuring that the features of the same cluster are matched to the same cluster in another domain.

[0028] Furthermore, the updating of the classification weight of the classifier based on the pseudo-label refers to inputting the features of the source domain unlabeled training set and the target domain original training set into the classifier, obtaining the category prediction probability of each sample feature, and assigning the features with a selection probability greater than 0.95 to the pseudo-label; obtaining the original classification weight of the classifier, calculating the feature average of the pseudo-label samples, and updating the classification weight using the following formula:

[0029]

[0030] Where w(c)' represents the updated classification weight of the c-th category, c = 1, 2, ..., n, w(c) represents the classification weight of the c-th category before updating, α represents the momentum parameter, which is 0.9, and f i Represents the sample features of the assigned pseudo label belonging to the cth category.

[0031] Furthermore, the loss function is as follows:

[0032]

[0033] in, Represents the i-th feature in the source domain and the jth cluster prototype in the target domain The contrast loss between them, the value range of j is [1, n], n represents the total number of clusters; exp(·) represents mapping the input value to a positive range, Representation calculation and The similarity between them, τ represents the temperature parameter, the value is set to 0.05, L total represents the loss function, represents the kth cluster prototype in the target domain, the value range of k is [1, n], B represents the batch size, and the value is set to 128. express The prototype of the cluster to which it belongs The contrast loss between them, the value range of r is [1,n]; Represents the target domain characteristics The prototype of the cluster to which it belongs The contrast loss between express The contrast loss distribution vector calculated with all cluster prototypes in the target domain, express The contrast loss distribution vector calculated with all cluster prototypes in the target domain, express The contrast loss distribution vector with all cluster prototypes in the source domain, express The contrast loss distribution vector with all cluster prototypes in the source domain, Represents the output of the classifier The class prediction probability of express The true label of , log represents the logarithm operation with base 10.

[0034] Compared with the prior art, the present invention has the following advantages:

[0035] First, the present invention uses K-means clustering to divide the features of the source domain and the target domain into different clusters, improves the feature discriminability of each cluster through intra-domain prototype contrast learning, and matches the features of the source domain and the target domain in clusters based on cross-domain prototype contrast learning, so that the features of the same cluster are matched to the same cluster in another domain, overcoming the deficiency of the prior art that directly matching the features of the source domain and the target domain leads to low model accuracy, so that the present invention has the advantage of accurately matching the features of the source domain and the target domain, thereby improving the accuracy of cross-domain bearing fault diagnosis.

[0036] Second, the present invention selects pseudo-label samples according to the predicted probability of unlabeled samples in the source domain and target domain training sets, and updates the classification weight of the classifier by the feature average of the pseudo-label samples, thereby overcoming the defect of the prior art that it heavily relies on a large number of source domain labels. This allows the present invention to achieve high-precision cross-domain bearing fault diagnosis while using fewer source domain labels, which is more in line with actual industrial application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 is a flow chart of an embodiment of the present invention;

[0038] Figure 2 It is a framework diagram of the cross-domain bearing fault diagnosis network constructed by the present invention;

[0039] Figure 3 It is a structural diagram of the residual sub-network used in the present invention. DETAILED DESCRIPTION

[0040] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0041] Reference Figure 1 , the specific implementation steps of the embodiment of the present invention are further described in detail.

[0042] Step 1: Generate cross-domain training sets of source domain and target domain based on the original training set.

[0043] The data set used in the embodiment of the present invention is the Huazhong University of Science and Technology bearing (HUST-Bearing) data set, which includes 4 speed conditions (65HZ, 70HZ, 75HZ, 80HZ), and each condition includes 9 types of bearing vibration signals from 0 to 8.

[0044] The steps to generate the original training set are as follows:

[0045] The first step is to select at least two working conditions of the same category, and each working condition contains at least 3 categories. Different working conditions refer to different working conditions where the bearing runs at different speeds or under different load conditions.

[0046] In the second step, the sliding window technology is used to cut each type of bearing vibration signal into 300 one-dimensional time series data, and each one-dimensional time series data is normalized to form a sample set;

[0047] According to the following formula, each sample in the sample set is normalized.

[0048]

[0049] Among them, x jRepresents the j-th one-dimensional time series data, for x j After normalization, we get x' j , x jmin Indicates the composition x j The minimum value of the data point, x jmax Indicates the composition x j The maximum value of the data points.

[0050] In the third step, 210 samples are randomly selected from the sample set of each category in each working condition to form the original training set for each working condition.

[0051] The steps to generate a cross-domain training set based on the original training set are as follows: arbitrarily select two working conditions in the original training set as the source domain and the target domain respectively, select up to 60 samples for each category in the original training set of the source domain and add fault type labels to form the source domain labeled training set. The rest of the original training set is the source domain unlabeled training set, and the source domain labeled training set, the source domain unlabeled training set and the target domain original training set form the cross-domain training set.

[0052] Step 2: Construct a cross-domain bearing fault diagnosis network.

[0053] Reference Figure 2 The cross-domain bearing fault diagnosis network constructed by the present invention is further described.

[0054] The cross-domain bearing fault diagnosis network is composed of a residual sub-network and a classifier in series.

[0055] In the embodiment of the present invention, the residual sub-network is a one-dimensional residual neural network using the prior art, and its structure is as follows: convolution layer, ReLu activation layer, first pooling layer, first residual layer, second residual layer, third residual layer, fourth residual layer, global average pooling layer, fully connected layer, such as Figure 3 As shown in (a), the fully connected layer serves as a classifier.

[0056] The structures of the first to fourth residual layers are: the first convolution layer, the first batch normalization layer, the ReLu activation layer, the second convolution layer, and the second batch normalization layer. Figure 3 (b) as shown.

[0057] The parameters of the one-dimensional residual neural network are set as follows:

[0058] The number of convolution kernels of the convolution layer is set to 64, the size of the convolution kernel is set to 1×7, the size of the pooling kernel of the first pooling layer is set to 1×3, and the pooling step is set to 1×2; among them, the number of convolution kernels of the first convolution layer and the second convolution layer in the first to fourth residual layers is equal, and the number of convolution kernels is set to 64, 128, 256 and 512 respectively, and the size of the convolution kernel is set to 1×3.

[0059] Step 3: Train the cross-domain bearing fault diagnosis network.

[0060] We select any two working conditions as the source domain and target domain, and use 90 samples in each category other than the original training set as the test set. The source domain labeled training set is represented as Represents the i-th sample in the source domain The label of the source domain unlabeled training set is represented as The original training set of the target domain is represented as N sl Set to 60, N su Set to 150, N t Set to 210.

[0061] The original training set D s ={D sl ,D su} and the original training set D of the target domain t Input into the cross-domain bearing fault diagnosis network built in step 2, extract features through a one-dimensional residual neural network, and obtain the source domain feature set and the target domain feature set Use K-means clustering to cluster F s The source domain features and F t The target domain features in are divided into n clusters, where n refers to the number of fault categories. After K-means clustering, F s Divided into n clusters F t Divided into n clusters Any cluster It can be regarded as a category, whose category prototype is represented by the average value of all features in the cluster:

[0062] Intra-domain prototype contrastive learning means that each sample in the source domain or target domain is as close as possible to the prototype of the cluster to which it belongs, and away from the prototypes of other clusters in the same domain, thereby reducing the number of samples on the boundaries between clusters in each domain and reducing the probability of classification errors.

[0063] The in-domain prototype comparison loss is as follows:

[0064]

[0065] in, Represents the i-th feature in the source domain The prototype of the cluster to which it belongs The contrast loss between them, r ranges from [1,n], n represents the total number of clusters, exp(·) represents mapping the input value to a positive range, Representation calculation and The similarity between them, τ represents the temperature parameter, and its value is set to 0.05. represents the kth cluster prototype in the source domain, and the value range of k is [1, n]; L In represents the prototype contrast loss function in the domain, B represents the batch size, and the value is set to 128. Represents the target domain characteristics The prototype of the cluster to which it belongs The contrast loss between them, log represents the logarithmic operation with base 10.

[0066] Cross-domain prototype contrastive learning converts each sample x in the source domain or target domain into i Match the prototype of each cluster in the other domain and calculate the contrast loss distribution vector; i The prototype p of the cluster to which it belongs r Match each cluster’s prototype with the other domain and compute the contrastive loss distribution vector. i With p r Belonging to the same cluster, the prototype of the same cluster should be matched in another domain. Therefore, the cross-domain prototype contrast loss of the source domain and the cross-domain prototype contrast loss of the target domain are calculated according to the contrast loss distribution vector.

[0067] The cross-domain prototype comparison loss of the source domain and the target domain is as follows:

[0068]

[0069] Among them, L Cross represents the sum of the cross-domain prototype comparison losses of the source domain and the target domain, express The contrast loss distribution vector calculated with all cluster prototypes in the target domain, express The contrast loss distribution vector calculated with all cluster prototypes in the target domain, express The contrast loss distribution vector with all cluster prototypes in the source domain, express The contrastive loss distribution vector with all cluster prototypes in the source domain.

[0070] D sl Input the features and labels of the source domain into the classifier and calculate the classification loss. su and the target domain original training set D tThe features of are input into the classifier, and the classifier outputs the predicted probability of each sample feature. The threshold is set to 0.95 to select features with high confidence and assign pseudo labels. The original classification weight of the classifier is obtained, the feature average of the pseudo-label samples is calculated, and the classification weight is updated using the following formula:

[0071]

[0072] Where w(c)' represents the updated classification weight of the cth category, c = 1, 2, ..., n, w(c) represents the classification weight of the cth category before updating, α represents the momentum parameter, which is 0.9, and f i Represents the sample features of the assigned pseudo label belonging to the cth category.

[0073] The classification loss function is as follows:

[0074]

[0075] Among them, L c represents the classification loss, Represents the output of the classifier The class prediction probability of express The real label.

[0076] The overall loss function L of the cross-domain bearing fault diagnosis network total Calculated by the following formula:

[0077] L total =L In +L Cross +L c

[0078] Step 4: diagnose the fault samples of the cross-domain bearing.

[0079] The test set of the target domain is input into the trained cross-domain bearing fault diagnosis network, and the result of cross-domain bearing fault diagnosis is output.

[0080] The effect of the present invention is further described below in conjunction with simulation experiments:

[0081] 1. Simulation experimental conditions.

[0082] The hardware platform of the simulation experiment of the present invention is: the processor is Intel(R) Xeon(R) Platinum 8272CL, the main frequency is 2.60GHZ, and the memory is 256GB.

[0083] The software platform of the simulation experiment of the present invention is: Ubuntu18.04 operating system and python 3.9.

[0084] The data set used in the simulation experiment of the present invention comes from the HUST Bearing public data set of Huazhong University of Science and Technology. The data set has 4 speed conditions, namely 65HZ (condition A), 70HZ (condition B), 75HZ (condition C), 80HZ (condition D), and 9 health states, namely normal (N), inner ring moderate fault (MIF), inner ring severe fault (SIF), outer ring moderate fault (MOF), outer ring severe fault (SOF), rolling element moderate fault (MBF), rolling element severe fault (SBF), outer ring inner ring composite moderate fault (MCF) and outer ring inner ring composite severe fault (SCF). All faults are preset manually, and the vibration signal of each health state contains 262144 data points.

[0085] 2. Analysis of simulation content and results.

[0086] The simulation experiment of the present invention uses the present invention and three existing technologies (DANN, DCORAL, MMSD) to perform model training and testing on the HUSTBearing data set, and obtains the test results corresponding to the four methods. The total number of simulation experiment training rounds is 150, the learning rate is 0.001, and the optimizer is the Adam optimizer.

[0087] In the simulation experiment, the three existing technologies used are:

[0088] Prior art DANN refers to a domain adversarial training method proposed by Ganin et al. in their paper “Domain-adversarial training of neural networks.2016”, referred to as DANN.

[0089] The prior art DCORAL refers to a method for measuring the difference between source and target domains proposed by Sun et al. in their paper “Deep coral: Correlation alignment for deep domain adaptation.2016”, referred to as DCORAL.

[0090] Prior art MMSD refers to a method for measuring the difference between source and target domains proposed by Qian et al. in their paper “Maximum mean square discrepancy: a new discrepancy representation metric for mechanical fault transfer diagnosis.2023”, referred to as MMSD.

[0091] In order to verify the effect of the simulation experiment of the present invention, the fault diagnosis effects of the four methods are evaluated by using accuracy, and all the evaluation calculation results are plotted in Table 1.

[0092] Table 1. Summary of training results of the present invention and three prior arts in simulation experiments

[0093]

[0094]

[0095] As can be seen from Table 1, DANN confuses the samples of the source domain and the target domain through the confrontation between the feature extractor and the domain classifier, thereby reducing the difference between the source domain and the target domain. Its fault diagnosis accuracy is generally higher than DCORAL. DCORAL and MMSD design a new metric to measure the difference between the source domain and the target domain, with the goal of reducing the difference, so as to directly align the features of the source domain and the target domain. MMSD is an improvement on the maximum mean difference, and its fault diagnosis accuracy is higher than DCORAL. The method of the present invention is based on cross-domain prototype contrast learning, matching the features of the source domain and the target domain in clusters instead of directly matching the features in the two domains, ensuring that the features of the same cluster are matched to the same cluster in another domain; in addition, updating the classifier weights based on pseudo-label samples reduces the dependence of the method of the present invention on labels. The method of the present invention achieved the highest accuracy in all tasks, proving that the present invention improves the accuracy of the fault diagnosis model.

Claims

1. A cross-domain bearing fault diagnosis method based on prototype contrast learning, characterized in that: Cluster learning is used to divide the features of the training set samples in the source domain and the target domain into different clusters. Based on prototype contrast learning, the features of the same cluster are matched to the same cluster in another domain. The classification weight of the classifier is updated based on the feature average of the pseudo-label samples. The steps of this method include the following: Step 1: Generate cross-domain training sets of source domain and target domain based on the original training set; Step 2: Train the cross-domain bearing fault diagnosis network based on prototype contrast learning: Step 2.1, construct a cross-domain bearing fault diagnosis network consisting of a residual sub-network and a classifier in series, input the cross-domain training set into the residual sub-network, and use K-means clustering to divide the features output by the residual sub-network into different clusters; Step 2.2, using cross-domain prototype contrastive learning, the features of the same cluster in the source domain and the target domain are matched to the same cluster in the other domain; Step 2.3, update the classification weight of the classifier based on the pseudo-label; Step 2.4, using the stochastic gradient descent method, iteratively update the network parameters until the loss function converges, and obtain the trained cross-domain bearing fault diagnosis network; Step 3: Input the sample of the cross-domain bearing to be fault diagnosed into the trained cross-domain bearing fault diagnosis network, and output the result of the cross-domain bearing fault diagnosis.

2. The cross-domain bearing fault diagnosis method based on prototype contrast learning according to claim 1 is characterized in that: The steps for generating the original training set described in step 1 are as follows: In the first step, at least two working conditions with the same category are selected, and each working condition contains at least three categories; In the second step, the sliding window technology is used to cut each type of bearing vibration signal into at least 210 one-dimensional time series data, and each one-dimensional time series data is normalized to form a sample set; In the third step, 210 samples are randomly selected from the sample set of each category in each working condition to form the original training set for each working condition.

3. The cross-domain bearing fault diagnosis method based on prototype contrast learning according to claim 2 is characterized in that: The different working conditions refer to different working conditions where the bearing runs at different speeds or the bearing is under different load conditions.

4. The cross-domain bearing fault diagnosis method based on prototype contrast learning according to claim 2 is characterized in that: The normalization operation is performed by the following formula: Among them, x' j represents the j-th one-dimensional time series data after normalization operation, x j represents the j-th one-dimensional time series data, x jmin represents the minimum value in the j-th one-dimensional time series data, x jmax Represents the maximum value in the j-th one-dimensional time series data.

5. The cross-domain bearing fault diagnosis method based on prototype contrast learning according to claim 1 is characterized in that: The steps for generating the cross-domain training set described in step 1 are as follows: arbitrarily select two working conditions in the original training set as the source domain and the target domain respectively, select at most 60 samples for each category in the original training set of the source domain and add fault type labels to form a source domain labeled training set; the rest of the original training set is the source domain unlabeled training set, and the source domain labeled training set, the source domain unlabeled training set and the target domain original training set are combined to form a cross-domain training set.

6. The cross-domain bearing fault diagnosis method based on prototype contrast learning according to claim 1 is characterized in that: The structure of the residual subnetwork described in step 2.1 is: convolution layer, ReLu activation layer, pooling layer, first residual layer, second residual layer, third residual layer, fourth residual layer, global average pooling layer, fully connected layer; the structures of the first to fourth residual layers are: first convolution layer, first batch normalization layer, ReLu activation layer, second convolution layer, second batch normalization layer; the number of convolution kernels of the convolution layer is set to 64, the size of the convolution kernel is set to 1×7, the ReLu activation layer is implemented using the ReLu function, the size of the pooling kernel of the pooling layer is set to 1×3, the pooling step is set to 1×2, the number of convolution kernels of the first convolution layer and the second convolution layer in the first to fourth residual layers is equal, the number of convolution kernels is set to 64, 128, 256 and 512 respectively, and the size of the convolution kernel is set to 1×3.

7. The cross-domain bearing fault diagnosis method based on prototype contrast learning according to claim 1 is characterized in that: The use of K-means clustering in step 2.1 to divide the features output by the residual subnetwork into different clusters means that similar features in the source domain and the target domain are divided into the same cluster using K-means clustering. One cluster corresponds to one category, and the category prototype is calculated by the average value of all features in the cluster: in, Indicates the kth cluster in the source domain obtained by K-means clustering The prototype, Indicates belonging to The sample characteristics.

8. The cross-domain bearing fault diagnosis method based on prototype contrast learning according to claim 1 is characterized in that: The steps described in step 2.2 to use cross-domain prototype contrast learning to match the features of the same cluster in the source domain and the target domain to the same cluster in another domain are as follows: The first step is to conduct intra-domain prototype comparison learning for each feature in the source domain and the target domain and all cluster prototypes in the same domain, so that each sample is close to the prototype of the cluster to which it belongs and away from the prototypes of other clusters, thereby reducing the number of features on the boundaries between clusters in each domain. The second step is to match the source domain and the target domain in clusters for cross-domain prototype comparative learning, so that each feature in one domain and the prototype of the cluster to which it belongs are matched to the same cluster prototype in another domain, ensuring that the features of the same cluster are matched to the same cluster in another domain.

9. The cross-domain bearing fault diagnosis method based on prototype contrast learning according to claim 1 is characterized in that: Updating the classification weight of the classifier based on pseudo labels in step 2.3 means inputting the features of the source domain unlabeled training set and the target domain original training set into the classifier, obtaining the category prediction probability of each sample feature, and assigning the features with a selection probability greater than 0.95 to the pseudo labels; obtaining the original classification weight of the classifier, calculating the feature average of the pseudo-label samples, and updating the classification weight using the following formula: Where w(c)' represents the updated classification weight of the cth category, c = 1, 2, ..., n, w(c) represents the classification weight of the cth category before updating, α represents the momentum parameter, which is 0.9, and f i Represents the sample features of the assigned pseudo label belonging to the cth category.

10. The cross-domain bearing fault diagnosis method based on prototype contrast learning according to claim 1 is characterized in that: The loss function described in step 2.4 is as follows: in, Represents the i-th feature in the source domain and the jth cluster prototype in the target domain The contrast loss between them, the value range of j is [1, n], n represents the total number of clusters; exp(·) represents mapping the input value to a positive range, Representation calculation and The similarity between them, τ represents the temperature parameter, the value is set to 0.05, L total represents the loss function, represents the kth cluster prototype in the target domain, the value range of k is [1, n], B represents the batch size, and the value is set to 128. express The prototype of the cluster to which it belongs The contrast loss between them, the value range of r is [1,n]; Represents the target domain characteristics The prototype of the cluster to which it belongs The contrast loss between express The contrast loss distribution vector calculated with all cluster prototypes in the target domain, express The contrast loss distribution vector calculated with all cluster prototypes in the target domain, express The contrast loss distribution vector with all cluster prototypes in the source domain, express The contrast loss distribution vector with all cluster prototypes in the source domain, Represents the output of the classifier The class prediction probability of express The true label of , log represents the logarithm operation with base 10.

Citation Information

Patent Citations

  • Rolling bearing fault diagnosis method based on self-supervised learning and clustering

    CN113792758A

  • Rolling bearing fault diagnosis method based on few-label data feature migration

    CN113988126A

  • Emotion recognition method and device based on ensemble learning and transfer learning

    CN116089874A

  • Variable working condition bearing fault diagnosis method, system, medium, equipment and terminal

    CN116242609A

  • Railway vehicle wheel set bearing fault diagnosis method and device under non-stable working condition

    CN116337447A

Cited By

  • Multi-fault diagnosis method for lithium battery sample scarcity and data imbalance

    CN120804819A

  • A multi-fault diagnosis method for lithium battery sample scarcity and data imbalance

    CN120804819B