Method of bearing fault diagnosis across operating conditions based on minimum entropy optimized prototype contrastive network
By using a prototype comparison network optimized with minimum entropy, the problems of variable distribution across operating conditions and small sample size in bearing fault diagnosis are solved. Through feature distribution alignment and prototype learning, the generalization ability and diagnostic accuracy of the model are improved.
Patent Information
- Application Number
- CN202511190631.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2045-08-25
AI Technical Summary
Existing technologies for bearing fault diagnosis face limitations due to the variability of distribution across operating conditions and small sample size, resulting in a decline in model generalization ability and difficulty in achieving accurate fault diagnosis.
A prototype contrast network optimized by minimum entropy is adopted. Deep features are extracted through convolutional layers and Transformer layers. The feature distribution alignment is optimized by combining sample entropy and domain adversarial loss function. The prototype is obtained by learning vector quantization, and intra-domain and cross-domain feature learning is performed. A weighted total loss function is designed to optimize the model.
It significantly improves the model's generalization performance in small sample scenarios across different operating conditions, enhances the intra-class consistency and inter-class discriminative power of features, effectively alleviates the negative transfer problem, and improves the accuracy of bearing fault diagnosis.
Smart Images

Figure CN121093079B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent fault diagnosis, and particularly relates to a prototype contrast network for bearing fault diagnosis under cross-condition small sample based on minimum entropy optimization. BACKGROUND
[0002] As a key basic component of large-scale mechanical equipment, bearings are widely used in power end, transmission end and execution end, and their health status directly determines the operation efficiency and reliability of the entire equipment. Bearing failure often leads to equipment downtime or even paralysis, and further causes huge economic losses. Therefore, timely and accurate diagnosis of bearing failure is of great significance to ensure the stable operation of equipment and reduce maintenance costs. In recent years, with the rapid development of sensor technology and data storage technology, intelligent fault diagnosis technology based on data driving has gradually emerged and been widely applied. However, intelligent fault diagnosis technology usually relies on a large number of labeled data, and assumes that the training data and test data have the same probability distribution. In actual engineering applications, due to the complex and variable operating conditions of mechanical equipment, and the limitations of fault data collection, it is difficult to obtain sufficient and uniformly distributed fault data. In addition, the differences in signal collection equipment and the uncertainty of bearing operating conditions further exacerbate the heterogeneity of data distribution, making traditional intelligent fault diagnosis methods face many challenges in actual applications. Therefore, how to break through the technical bottlenecks of existing methods and develop new methods suitable for bearing fault diagnosis under complex conditions has become a key problem to be solved in current academic research and industrial application.
[0003] For the bearing fault diagnosis task under cross-condition small sample, the traditional intelligent diagnosis method is based on the assumption that fault samples are sufficient and identically distributed, which is difficult to achieve. First, in actual engineering applications, the number of samples is limited, and DA methods cannot obtain sufficient domain-invariant features, resulting in a decline in the generalization ability of the model. Second, the traditional adversarial network aligns the feature distribution through the domain classifier, but the sample weight allocation only depends on the classification confidence, without considering the difference in sample classification difficulty. For example, difficult-to-classify samples have high uncertainty, and if they are given a large weight, they will have a large impact on the update of model parameters during the training process, thereby causing the model to learn incorrect patterns. Finally, DA methods face the inevitable challenge that heterogeneous samples in different domains may be incorrectly merged into the same category, while samples of the same category may be incorrectly mapped to different categories between different domains, resulting in suboptimal data matching.
[0004] Therefore, how to simultaneously solve the cross-condition distribution variability and small sample limitation of bearings in fault diagnosis, achieve feature-level domain alignment, and enhance feature discrimination, has become a key technical bottleneck to improve the accuracy of bearing fault diagnosis under cross-condition small sample conditions. SUMMARY
[0005] The application provides a method for bearing fault diagnosis across working conditions by using a minimum entropy optimized prototype contrast network, aiming to solve the variability of bearing sample distribution across working conditions and the small sample limitation in actual industrial systems.
[0006] The application provides a method for bearing fault diagnosis across working conditions by using a minimum entropy optimized prototype contrast network, which comprises the following steps:
[0007] Step 1: Collect bearing vibration signals under multiple working conditions to construct source domain data set and target domain data set;
[0008] Step 2: Extract deep feature representation of bearing vibration signals by using convolutional layer and transformer layer;
[0009] Step 3: Establish auxiliary information between global feature and prediction information, so that the model can capture the nonlinear relationship between global feature and prediction information;
[0010] Step 4: Calculate sample entropy to evaluate the uncertainty of sample classification, and weight the results according to the difficulty of sample classification;
[0011] Step 5: Construct four-layer fully connected domain discriminator, combine auxiliary information and sample entropy, and optimize the feature distribution alignment of source domain and target domain through domain adversarial loss function;
[0012] Step 6: Use the feature vector of bearing data to obtain the prototype of data by using learning vector quantization method;
[0013] Step 7: Perform intra-domain prototype contrast learning, compare the similarity components between feature vector and prototype, and calculate intra-domain prototype contrast loss;
[0014] Step 8: Perform cross-domain instance-prototype learning, compare the similarity components between source domain feature vector and target domain prototype, and calculate cross-domain instance-prototype loss;
[0015] Step 9: Design a weighted total loss function containing domain adversarial loss, intra-domain prototype contrast loss, cross-domain instance-prototype loss and classification loss to optimize the model;
[0016] Step 10: Use the trained model to classify and diagnose the target domain bearing fault state.
[0017] Further, the method comprises the following steps:
[0018] (1) First CNN is performed by using 16 convolution kernels with a size of 3;
[0019] (2) the second CNN is performed using 32 convolution kernels with a size of 3;
[0020] (3) the third CNN is performed using 64 convolution kernels with a size of 3;
[0021] (4) a Transformer layer is used to analyze the context relationship between each feature extracted by the CNN to form a global feature f;
[0022] (5) two fully connected layers (FC) are further passed to generate a deep feature representation;
[0023] (6) a Softmax layer is passed to obtain prediction information g.
[0024] Further, the specific method of establishing auxiliary information between the global feature and the prediction information in step S3 to capture the nonlinear relationship between the global feature and the prediction information comprises:
[0025] (1) the global feature f and the prediction information g are combined into auxiliary information
[0026] (2) the combined representation is processed using an auxiliary domain discriminator composed of four fully connected layers, and the number of neurons of the fully connected layers is 256, 128, 64, and 1 in turn;
[0027] (3) the nonlinear relationship between the feature and the prediction information is captured by the auxiliary domain discriminator, and the process is represented as:
[0028]
[0029] wherein D Auxiliary represents the auxiliary discriminator.
[0030] Further, the specific method of calculating the sample entropy in step S4 to evaluate the uncertainty of sample classification and weighting the results according to the difficulty level of sample classification comprises:
[0031]
[0032] ω(Entropy(g))=1+e -Entropy(g)
[0033] wherein N represents the number of classes, g n represents the probability of a sample being predicted to the nth class; Entropy(g) represents the sample entropy; ω(Entropy(g)) represents the weight applied to the sample; e -Entropy(g) measures the difficulty level of sample classification, and the greater the sample entropy, the smaller the weight should be.
[0034] Further, it is characterized in that the four-layer fully connected domain discriminator is constructed in step S5, and the specific method for combining auxiliary information and sample entropy to optimize the alignment of the feature distribution of the source domain and the target domain through the domain adversarial loss function includes:
[0035] The domain adversarial loss can be expressed as:
[0036]
[0037]
[0038] wherein D s represents the source domain data set; D t represents the target domain data set; i represents the source domain index; s represents the source domain; j represents the target domain index; t represents the target domain; by minimizing the weighted domain adversarial loss function, the feature distribution of the source domain (SD) and the target domain (TD) is aligned.
[0039] Further, it is characterized in that the specific method for obtaining the prototype of the data by using the learning vector quantization in step S6 includes:
[0040] Randomly select k feature vectors from SD as initial prototype vectors {p1, p2, …, pk} whose labels are corresponding preset labels {t1, t2, …, tk}, respectively. k wherein k represents the number of classes;
[0041] Randomly select a sample f from SD.
[0042] d ij =||f i s -p j ||2,j∈[1,k]
[0043] Find the nearest prototype p i s j to f j* ; if the corresponding label t j* of p j* is the same as that of f j* , then the distance between p j* and the sample is pulled closer; otherwise, the distance between p i and the sample is pushed farther:
[0044]
[0045] wherein η∈(0,1) is a hyperparameter; after 1000 iterations, the final SD prototype and the TD prototype
[0046] Further, the step S7 of performing the intra-domain prototype contrast learning includes the following steps:
[0047] In order to accurately capture the subtle differences of bearing fault signals and improve the accuracy of fault diagnosis, the similarity component between f i s And The similarity component between f
[0048]
[0049] Wherein, φ is the temperature value;
[0050] The intra-domain prototype contrast loss can be expressed as:
[0051]
[0052] Wherein, index s And index t represent the index of the input data; L CE (·) represents the cross-entropy loss;
[0053] By minimizing the intra-domain prototype contrast loss, each prototype represents the central tendency and typical characteristics of a class of data; by pulling the distance between samples of the same class and pushing the distance between samples of different classes, the model can learn more distinctive features.
[0054] Further, the step S8 of performing the cross-domain instance-prototype learning includes the following steps:
[0055] Given the feature vector f i s of the source domain and the prototype of the target domain, the similarity component is calculated as:
[0056]
[0057] In order to identify the matching relationship between the prototype and the foreign bearing features, the entropy minimization is performed on According to the difficulty of sample classification, E(V i s→t ) is obtained; finally, the cross-domain instance-prototype loss is obtained as:
[0058]
[0059] Wherein, Entropy representing similarity component of source domain feature and target domain prototype; Entropy representing similarity component of target domain feature and source domain prototype; tu Target domain label is invisible;
[0060] By minimizing cross-domain instance-prototype loss, the model can avoid the influence of bearing data outliers.
[0061] Further, the specific method of optimizing the model by the weighted total loss function including domain adversarial loss, intra-domain prototype contrastive loss, cross-domain instance-prototype loss and classification loss in step S9 comprises:
[0062] The classification loss, adversarial loss and PCL loss are used to help the training process of the model, and the parameters are used to control the influence of the global loss; the loss of each part is as follows:
[0063] (1) Sample re-weighting module:
[0064]
[0065] Wherein, λ1, λ2 are hyperparameters; For the predicted label, y is the real label; L pre-total Total loss in pre-training stage; the training process minimizes L pre-total Domain adversarial loss L Auxiliary Acting on the features f s,t And the predicted information g s,t Classification loss L CE Only acting on the source domain; And Indicate the network parameters before and after updating in the pre-training stage, and the domain discriminator Θ D Using GRL for gradient inversion, the optimization target is:
[0066]
[0067] (2) Prototype contrastive learning module:
[0068]
[0069] Wherein, λ3, λ4 are hyperparameters; L train-total Total loss in training stage; the training process minimizes L train-total Prototype contrastive loss L In And L Cross Acting on the features f s,t Classification loss L CE Only acting on the source domain; the optimization target is:
[0070]
[0071] wherein, denotes the updated network parameters in the training phase.
[0072] Compared with the prior art, the present application has the following beneficial effects:
[0073] The present application proposes a Minimum Entropy Optimization Prototypical Contrastive Network (MEOPCN), in the pre-training phase, an auxiliary domain discriminator is constructed, the discriminant information of the classifier is used to assist DA, the difficulty of classification is evaluated by sample entropy, and the performance degradation in the DA process is inhibited. In the training phase, the learning vector quantization method is adopted to find the prototype. Through intra-domain prototype contrastive learning, the sample features are closely gathered around the same class prototype in the feature space, while keeping separate from the different class prototypes. This process can significantly enhance the intra-class consistency of the features and improve the inter-class discrimination, thereby achieving precise alignment in the intra-domain feature level. In addition, the cross-domain instance-prototype learning aligns the semantic structure in the shared embedding space, effectively alleviates the negative transfer problem through the fine-grained alignment strategy, and further improves the generalization ability of the model. This framework does not require labeled data or additional modal support in the target domain, but only through pseudo-label generation and weighted loss function, it significantly improves the generalization performance of the model in the cross-condition small sample scene, and promotes the practicalization of bearing fault classification technology.
[0074] On the basis of the implementation manners of the above aspects provided by the present application, further combinations can be made to provide more implementation manners. BRIEF DESCRIPTION OF DRAWINGS
[0075] The above and other objects, features and advantages of the exemplary embodiments of the present application will be more apparent from the following detailed description taken in conjunction with the accompanying drawings, in which several embodiments of the present application are shown by way of example, and wherein like or corresponding elements refer to like or corresponding parts throughout the several views, and in which:
[0076] Figure 1 is a general framework diagram of the present application;
[0077] Figure 2 is an accuracy radar chart on the CWRU dataset of the present application;
[0078] Figure 3 is an accuracy radar chart on the HUST dataset of the present application;
[0079] Figure 4 is a confusion matrix chart on tasks H0 and H8 of the present application;
[0080] Figure 5 t-SNE feature visualization plot for tasks H0 and H8 of the present application;
[0081] Figure 6 t-SNE feature visualization plot for tasks H3 and H9 of the present application;
[0082] Figure 7 Fault diagnosis accuracy box plot on C6 and H11 tasks for different model selection of the present application;
[0083] Figure 8 CWRU experimental platform plot of the present application;
[0084] Figure 9 HUST experimental platform plot of the present application.
[0085] In the figure: 1, load motor; 2, torque sensor; 3, induction motor; 4, fan end acceleration sensor; 5, drive end acceleration sensor; 6, speed controller; 7, electric motor; 8, bearing; 9, data acquisition device; 10, acceleration sensor. DETAILED DESCRIPTION
[0086] Exemplary embodiments of the present application will be described in greater detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it is to be understood that the present application can be embodied in various forms without being limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the application to those skilled in the art. Unless otherwise specifically defined herein, technical terms used in the examples are commonly understood to those skilled in the art.
[0087] The application provides a minimum entropy optimization prototypical contrastive network (MEOPCN). In the pre-training stage, an auxiliary domain discriminator is constructed, the discriminative information of the classifier is used to assist DA, the classification difficulty is evaluated by sample entropy, and the performance degradation in the DA process is inhibited. In the training stage, the learning vector quantization method is adopted to find the prototype. Through intra-domain prototype contrastive learning, the sample features are closely gathered around the same class prototype in the feature space, while being separated from the different class prototype. This process can significantly enhance the intra-class consistency of the features and improve the inter-class discrimination, thereby realizing precise alignment in the feature level. In addition, the cross-domain instance-prototype learning aligns the semantic structure in the shared embedding space, effectively alleviates the negative transfer problem through a fine-grained alignment strategy, and further improves the generalization ability of the model. The framework does not require target domain labeled data or additional modal support, and only through pseudo-label generation and weighted loss function, the generalization performance of the model in the cross-condition small sample scene is significantly improved, and the bearing fault classification technology is promoted to practicality.
[0088] In combination Figures 1 to 9 with the optional embodiments of the application, the minimum entropy optimization prototypical contrastive network is provided in the method for cross-condition bearing fault diagnosis, and the specific steps include:
[0089] Step 1: Collect bearing vibration signals under multiple working conditions to construct a source domain data set and a target domain data set;
[0090] Step 2: Extract local features of the bearing signals by using CNN. First CNN is performed by using 16 convolution kernels with a size of 3, second CNN is performed by using 32 convolution kernels with a size of 3, and third CNN is performed by using 64 convolution kernels with a size of 3, wherein three maximum pooling layers are interspersed. The context relationship between each feature extracted by the CNN is analyzed by using a Transformer layer to form a global feature f. Then, a deep feature representation is generated through two fully connected layers;
[0091] Step 3: Establish auxiliary information between the global feature and the prediction information, so that the model can capture the nonlinear relationship between the global feature and the prediction information;
[0092] Step 4: Calculate the sample entropy to evaluate the uncertainty of sample classification, and weight the results according to the difficulty of sample classification to prevent the model from learning incorrect patterns and improve the overall classification performance of the model;
[0093] Step 5: Construct a four-layer fully connected domain discriminator, combine the sample entropy, optimize the feature representation through the adversarial loss, enhance the domain invariance, and suppress the negative transfer;
[0094] Step 6: Obtain the prototype of the data by learning vector quantization using the feature vector of the bearing data;
[0095] Step 7: Perform intra-domain prototype contrast learning, compare the similarity components between the feature vector and the prototype, and calculate the intra-domain prototype contrast loss;
[0096] Step 8: Perform cross-domain instance-prototype learning, compare the similarity components between the source domain feature vector and the target domain prototype, and calculate the cross-domain instance-prototype loss;
[0097] Step 9: Design a weighted total loss function containing domain adversarial loss, intra-domain prototype contrast loss, cross-domain instance-prototype loss and classification loss to optimize the model;
[0098] Step 10: Use the trained model to classify and diagnose the target domain bearing fault state.
[0099] Optionally, the specific method of extracting the deep feature representation of the bearing vibration signal in step S2 includes:
[0100] (1) First CNN with 16 convolution kernels of size 3;
[0101] (2) Second CNN with 32 convolution kernels of size 3;
[0102] (3) Third CNN with 64 convolution kernels of size 3;
[0103] (4) Use the Transformer layer to analyze the context relationship between each feature extracted by CNN to form global features
[0104] (5) Then pass through two fully connected layers (FC) to generate deep feature representation;
[0105] (6) Pass through the Softmax layer to get the prediction information g.
[0106] Optionally, the specific method of establishing auxiliary information between feature representation and prediction information in step S3 to capture the nonlinear relationship between feature representation and prediction information includes:
[0107] (1) Combine the feature representation f and the prediction information g into auxiliary information
[0108] (2) Use an auxiliary domain discriminator composed of four fully connected layers to process the combined representation, and the number of neurons of the fully connected layers is 256, 128, 64, and 1 in turn;
[0109] (3) The auxiliary domain discriminator captures the nonlinear relationship between the features and the prediction information, and the process is represented as:
[0110]
[0111] where D Auxiliary represents an auxiliary discriminator.
[0112] Optionally, the specific method of calculating the sample entropy, evaluating the sample classification difficulty, and minimizing the classification uncertainty in step S4 includes:
[0113] The sample entropy is calculated, the uncertainty of sample classification is evaluated, and the results are weighted according to the difficulty of sample classification:
[0114]
[0115] ω(Entropy(g))=1+e -Entropy(g)
[0116] where N represents the number of classes, g n represents the probability that a sample is predicted to be the nth class. Entropy(g) represents the sample entropy. ω(Entropy(g)) represents the weight applied to the sample. e -Entropy(g) The difficulty of sample classification is measured, and the greater the sample entropy, the smaller the weight should be.
[0117] Optionally, the specific method of constructing a four-layer fully connected domain discriminator in step S5, combining auxiliary information and sample entropy, and optimizing the alignment of feature distribution of source domain and target domain through domain adversarial loss function includes:
[0118] The domain adversarial loss can be represented as:
[0119]
[0120] where D s represents the source domain dataset; D t represents the target domain dataset; i represents the source domain index; s represents the source domain; j represents the target domain index; and t represents the target domain.
[0121] By minimizing the weighted domain adversarial loss function, the feature distribution of the source domain (SD) and the target domain (TD) is aligned.
[0122] Optionally, the specific method of obtaining the prototype of the data using the learning vector quantization in step S6 includes:
[0123] Given a feature vector:
[0124] Randomly select k feature vectors from SD as the initial prototype vectors {p1, p2, ..., pk}. k}, whose tags serve as the corresponding preset tags. Where k represents the number of classes.
[0125] Randomly select a sample from SD. Calculate the distance between the sample and each prototype:
[0126] d ij =||f i s -p j ||2,j∈[1,k]
[0127] Find the relationship with f i s The latest prototype p j* .if With p j* The corresponding tag t j* If they are the same, then bring p closer. j* Distance from the sample; otherwise, move p away. j* Distance from the sample:
[0128]
[0129] Here, η∈(0,1) are hyperparameters. The final SD prototype is obtained after 1000 iterations. and TD prototype
[0130] Optionally, the specific method for performing intra-domain prototype contrastive learning, calculating the similarity components between the feature vector and the prototype, and calculating the intra-domain prototype contrastive loss in step S7 includes:
[0131] To accurately capture subtle differences in bearing fault signals and improve the accuracy of fault diagnosis, f is calculated. i s and The similarity components between them are:
[0132]
[0133] Where φ is the temperature value;
[0134] Intra-domain prototype contrast loss can be expressed as:
[0135]
[0136] Where, index s (·) and index t (·) indicates the index of the input data; L CE(·) represents the cross-entropy loss;
[0137] By minimizing the intra-domain prototype contrast loss, each prototype represents the central tendency and typical characteristics of a class of data; by pulling the distance between samples of the same category and pushing the distance between samples of different categories, the model can learn more distinctive features.
[0138] Optionally, the specific method of performing cross-domain instance-prototype learning in step S8 includes calculating the similarity component between the source domain feature vector and the target domain prototype, and calculating the cross-domain instance-prototype loss.
[0139] Given the feature vector f i s and the prototype of the target domain Calculate the similarity component:
[0140]
[0141] In order to identify the matching relationship between the prototype and the foreign bearing features, the similarity component is calculated as: Entropy minimization is performed to obtain Finally, the cross-domain instance-prototype loss is obtained as:
[0142]
[0143] By minimizing the cross-domain instance-prototype loss, the model can avoid the influence of outliers of bearing data.
[0144] Optionally, the specific method of designing the weighted total loss function containing the domain adversarial loss, the intra-domain prototype contrast loss, the cross-domain instance-prototype loss and the classification loss to optimize the model in step S9 includes:
[0145] The classification loss, the adversarial loss and the PCL loss are used to help the training process of the model, and the parameters are used to control the influence of the global loss; the loss of each part is as follows:
[0146] (1) Sample reweighting module:
[0147]
[0148] Where λ1, λ2 are hyperparameters; is the predicted label, y is the true label; the training process minimizes L pre-total , the domain adversarial loss L Conditional acts on the features f s,t and the predicted information g s,t of the source domain and the target domain; CE The classification loss L only acts on the source domain; respectively, denote the network parameters before and after updating, and domain discriminator D The gradient inversion is performed using the GRL, and the optimization objective is:
[0149]
[0150] (2) Prototype contrastive learning module:
[0151]
[0152] where λ3, λ4 are hyperparameters; the training process minimizes L train-total , prototype contrastive loss L In and L Cross act on the features f s,t of the source domain and the target domain, the classification loss L CE only acts on the source domain; respectively, denote the updated network parameters, and the optimization objective is:
[0153]
[0154] Specifically, the present application adopts a method combining pre-training and fine-tuning, and the framework is as shown in Figure 1 Firstly, the model is pre-trained using a sample reweighting (SR) module. Then, the model is fine-tuned using a prototype contrastive learning (PCL) module. The classification loss, the adversarial loss and the PCL loss are comprehensively used to optimize the model performance, and the weight of the parameter regulating the global loss is introduced to ensure the effectiveness and efficiency of the model training. The definitions of the symbols and formulas required by the present application are as follows.
[0155] Firstly, for the fault diagnosis of bearings, the sample space with sufficient data of each state under a certain working condition is taken as the source domain, and the data set is defined as: Similarly, the sample set composed of data of each state under another working condition is taken as the target domain, and the data set is defined as: Secondly, the small sample fault diagnosis task T few is composed of a support set and a query set , and can be represented as Each set is composed of K samples of each N categories. Therefore, T few can be defined as an N way-K shot problem. In addition, the present application also details the key components such as the SR module and the PCL module, and designs the corresponding loss function to optimize the model performance, thereby improving the generalization ability of the model on the target domain.
[0156] 1. Pre-training phase
[0157] Bearing failures are of various types, each type of failure has a waveform with different frequency and amplitude, which will produce unique vibration signal characteristics. The SR module is used to pre-train the feature extractor to generate feature representations in different domains. Marginal alignment mainly focuses on reducing the difference in the marginal distribution of SD and TD in the feature space, which is usually achieved by matching the global distribution of the two domains. This way is too rough and cannot capture the difference in local feature distribution. If the difference between the two domains is too large, it may lead to a decline in model performance. In view of the deviation of cross-domain marginal probability alignment, which leads to the difference in the learned feature distribution, and the influence of the difficulty of predicting features on the DA process, the present application proposes an SR module, which uses the distribution of labels under a given input feature as auxiliary information, and realizes finer-grained alignment by considering the joint distribution of features and labels, which can more effectively reduce the risk of negative transfer. Moreover, the results are weighted according to the difficulty of sample classification, and the domain adversarial loss and classification loss are used to ensure the effectiveness of the pre-trained model. The pre-training stage consists of three parts, including the feature extractor, the classifier and the auxiliary domain discriminator, as shown in Figure 1 The feature extractor and the classifier acting on SD and TD share parameters. In order to solve the problem of difference between cross-domain feature distributions, the present application uses an auxiliary domain discriminator to combine the learned features f and the prediction information g for domain alignment, so that the feature distributions of D s and D t are as close as possible. The specific process is as follows.
[0158] The input of the network is a one-dimensional bearing vibration signal. First, the present application uses CNN to extract the local features of the bearing signal. The first CNN uses 16 convolution kernels with a size of 3, the second CNN uses 32 convolution kernels with a size of 3, and the third CNN uses 64 convolution kernels with a size of 3, with three max-pooling layers interspersed. Then, the Transformer layer is used to analyze the context relationship between each feature extracted by CNN to form global features. Finally, the feature representation f is obtained. Then, after two fully connected layers (FC), the deep feature representation is generated. Finally, after the Softmax layer, the prediction information g is obtained. The specific network parameters are shown in Table 1.
[0159] Table 1 Network structure parameters
[0160]
[0161] In order to reduce the distribution difference of bearing data under different working conditions, the application uses a four-layer FC domain discriminator with a size of (256, 128, 64, 1) to classify the domain to which the feature belongs, and specifically uses binary classification. In order to better represent the difference between the features in this process, the application considers the conditional probability of feature representation and prediction information as auxiliary information:
[0162]
[0163] Where D Auxiliary represents the auxiliary discriminator. In this way, the model can capture the nonlinear relationship between the features and the prediction information, and improve the classification performance of the model on the bearing signal. However, the bearing samples that are difficult to classify often have high uncertainty, and if they are given a large weight, they will have a large impact on the update of the model parameters during the training process, thereby causing the model to learn incorrect patterns. To solve this problem, the application proposes to use sample entropy to evaluate the difficulty of classifying the sample, and to weight the results according to the size of the sample entropy:
[0164]
[0165] ω(Entropy(g))=1+e -Entropy(g) (3)
[0166] Where N represents the number of classes, g n represents the probability that a sample is predicted to be the nth class. Entropy(g) represents the sample entropy. ω(Entropy(g)) represents the weight applied to the sample. e -Entropy(g) measures the difficulty of classifying the sample, and the larger the sample entropy, the smaller the weight should be. Therefore, the domain adversarial loss can be represented as:
[0167]
[0168] By minimizing the domain adversarial loss, the model can align the cross-domain distributions that have significant differences, learn the knowledge that can be transferred from SD to TD, and effectively deal with the bearing cross-working condition diagnosis task.
[0169] 2. Training phase
[0170] Due to the influence of factors such as set value adjustment, operation condition change and mechanical wear, the actual working condition of the bearing will change, so that the data distribution of SD and TD is different. The DA technology aims to align TD through SD. However, this technology faces inevitable challenges: different samples in different domains may be incorrectly merged into the same category, and samples of the same category may be incorrectly mapped to different categories between different domains, resulting in that the data matching cannot reach the ideal state. In order to solve the above problems, the PCL module is proposed in the application. The application only explains simple symbols on SD, and performs similar operations on TD.
[0171] 1) In-domain PCL: In order to realize high differentiation of different modes between categories in the case of limited bearing data, the in-domain PCL is designed to capture the commonality and difference of bearing signals, so as to enhance the similarity of data of the same category. At the same time, the similarity of data between categories in the category semantic space is reduced. The prototype of data is obtained by using Gaussian mixture model, so as to avoid intra-domain false clustering and feature learning without difference. This method helps to improve the recognition ability of the model to the subtle differences of bearing signal features of different categories, and enhances the distinguishability and robustness of the model in practical application.
[0172] Specifically, given a feature vector f The prototype is found by using the learning vector quantization method. The specific process is as follows: k feature vectors are randomly selected from SD as initial prototype vectors {p1, p2, …, pk} and their labels are taken as corresponding preset labels {t1, t2, …, tk}. k} respectively. Where k represents the number of categories. A sample f The distance between the sample and each prototype is calculated:
[0173] d ij =||f i s -p j ||2,j∈[1,k] (5)
[0174] The closest prototype p i s is found. j* If the label t j* corresponding to p j* is the same as that of the sample f j* , then the distance between p j* and the sample is pulled closer; otherwise, the distance between p i and the sample is pushed farther:
[0175]
[0176] Where η∈(0,1) is a hyperparameter. After 1000 iterations, the final SD prototype is obtained. and TD prototypes
[0177] To accurately capture the subtle differences of bearing fault signals and improve the accuracy of fault diagnosis, the present application is inspired by intra-domain contrastive learning, and calculates f i s and The similarity component between f
[0178]
[0179] where φ is the temperature value. The intra-domain prototype contrastive loss can be expressed as:
[0180]
[0181] where index s and index t represent the index of the input data. L CE (·) represents the cross-entropy loss. By minimizing the intra-domain prototype contrastive loss, each prototype represents the central tendency and typical features of a class of data. By pulling the distance between samples of the same class closer and pushing the distance between samples of different classes farther apart, the model can learn more discriminative features, which are particularly important for the bearing fault classification task.
[0182] 2) Cross-domain instance-prototype learning: Due to the variability of bearing working conditions, data distribution often has abnormal samples (outliers). If an outlier in SD is close to many samples in TD, this outlier may be incorrectly matched with multiple samples in TD, thereby affecting the accuracy of the entire classification process. Prototypes are specific to each fault and discriminative between different faults. The present application uses cross-domain instance-prototype learning, which eliminates the influence of outliers by matching prototypes with bearing samples from different domains, rather than matching individual samples between domains, so that the knowledge learned by the model on SD can improve the diagnostic performance on TD. Given the feature vector f i s and the prototype of TD The similarity component is calculated as:
[0183]
[0184] To identify the matching relationship between prototypes and cross-domain bearing features, the entropy minimization is performed on f According to equation (2), we get Finally, the cross-domain instance-prototype loss is obtained as:
[0185]
[0186] By minimizing the cross-domain instance-prototype loss, the model can avoid the outlier effects of bearing data.
[0187] 3. Optimize training
[0188] The MEOPCN proposed in this invention first uses the SR module to pre-train the feature extractor and classifier, and then uses the PCL module to fine-tune the network model. Classification loss, adversarial loss, and PCL loss are used to aid the model training process, and parameters are used to control the impact of the global loss. The losses for each part are as follows.
[0189] 1) Sample reweighting module:
[0190]
[0191] Where λ1 and λ2 are hyperparameters. Let y be the predicted label and y be the true label. The training process minimizes L. pre-total Domain adversarial loss L Auxiliary Features f acting on TD and SD s,t and prediction information g s,t Classification loss L CE It only applies to SD. and These represent the network parameters before and after the update, respectively, and the domain discriminator Θ. D Using GRL for gradient inversion, the optimization objective is:
[0192]
[0193] 2) Prototype Comparison Learning Module:
[0194]
[0195] Where λ3 and λ4 are hyperparameters. The training process minimizes L. train-total Prototype contrast loss L In and L Cross Features f acting on SD and TD s,t Classification loss L CE It only applies to SD. These represent the updated network parameters, and the optimization objective is:
[0196]
[0197] To gain a more thorough understanding of the present invention, the present invention will be further described in detail below with reference to specific embodiments.
[0198] Step 1: Collect bearing vibration signals under multiple operating conditions (using CWRU dataset and HUST dataset as examples).
[0199] Step 2: Extract local features of bearing signals using CNN. First CNN with 16 3x3 convolutional kernels, second CNN with 32 3x3 convolutional kernels, and third CNN with 64 3x3 convolutional kernels, with three max-pooling layers in between. Use Transformer layers to analyze the context relationship between each feature extracted by CNN to form global features f. Then, pass through two fully connected layers to generate deep feature representation.
[0200] Step 3: Establish auxiliary information between global features and prediction information, so that the model can capture the nonlinear relationship between feature representation and prediction information.
[0201] Step 4: Calculate sample entropy to assess the uncertainty of sample classification, and weight the results according to the difficulty of sample classification to prevent the model from learning incorrect patterns and improve the overall classification performance of the model.
[0202] Step 5: Build a four-layer fully connected domain discriminator, combine with sample entropy, optimize feature representation through adversarial loss, enhance domain invariance and suppress negative transfer.
[0203] Step 6: Use the feature vector of bearing data to obtain the prototype of the data through learning vector quantization.
[0204] Step 7: In-domain feature matching: calculate the similarity component between feature vector and prototype; define in-domain prototype contrast loss: calculate in-domain prototype contrast loss.
[0205] Step 8: Cross-domain feature matching: given the feature vector of the source domain and the prototype of the target domain, calculate the similarity component between the source domain feature vector and the target domain prototype; entropy minimization and matching relationship identification: perform entropy minimization on the prototype of the target domain, and identify the matching relationship between the prototype and the alien bearing features according to the relevant formula; define cross-domain instance-prototype loss: calculate cross-domain instance-prototype loss.
[0206] Step 9: Design a weighted total loss function that includes domain adversarial loss, PCL loss, and classification loss.
[0207] Step 10: Design cross-conditioning small sample experiments to verify and optimize the cross-domain model, and quantitatively analyze the contribution of SR and PCL modules through ablation experiments.
[0208] Step 11: Use confusion matrix to analyze the classification improvement of difficult-to-classify samples (such as composite faults); use t-SNE to show intra-class concentration and inter-class separation; use box plot to evaluate the robustness and adaptability of the model in cross-conditioning small sample tasks.
[0209] Experiments and results evaluation are as follows:
[0210] 1. Experimental procedure
[0211] (1) Datasets
[0212] 1) CWRU dataset: This dataset was provided by Case Western Reserve University, and the data was collected based on the experimental platform shown in Figure 8 ; the core components of this platform include: load motor 1 as the driven side, whose shaft supports the test bearing, which runs under the drive of induction motor 3 to simulate different loads; torque sensor 2 is used to measure the output torque and speed of the motor, providing feedback and recording for working condition setting; induction motor 3 as the power source, drives the entire transmission system to run, which can simulate different bearing operating conditions by adjusting the motor speed; fan end acceleration sensor 4 is used to collect the vibration acceleration signal of the bearing at this end; driving end acceleration sensor 5 directly monitors the test bearing to monitor the vibration response under various pre-set fault conditions; under 4 different working conditions, 4 faults are collected, including normal, rolling element fault, outer ring fault and inner ring fault, as shown in Table 6. Each fault includes three different diameters of damage, i.e. 7mils, 14mils and 21mils. Therefore, the dataset can be divided into 10 categories, including 9 fault categories and 1 normal category. The sampling frequency is set to 12.5kHz, and 10s is continuously collected. The signals sampled from the driving end are selected in this experiment.
[0213] Table 6 Fault types of CWRU dataset
[0214]
[0215] 2) HUST dataset: This dataset was provided by Huazhong University of Science and Technology, and the data was collected based on the experimental platform shown in Figure 9 ; the experimental platform mainly consists of speed controller 6, motor 7, measured bearing 8, acceleration sensor 10 and data collector (9); wherein the speed controller 6 is used to accurately set and adjust the speed of the motor 7, the motor 7 drives the spindle installed with the measured bearing 8 to rotate, the acceleration sensor 10 is used to monitor the vibration signal in real time when the bearing 8 is running, and the collected vibration signal is transmitted to the data collector 9 for recording and storage; under 4 different working conditions, 5 faults are set, including normal, rolling element fault, outer ring fault, inner ring fault and composite fault (inner ring + outer ring), as shown in Table 7. Each fault contains two different degrees of damage, i.e. moderate and severe. Therefore, the dataset can be divided into 9 categories. The sampling frequency is set to 25.6kHz, and 10.2s is continuously collected.
[0216] Table 7 Fault types of HUST dataset
[0217]
[0218] (2) Experimental setup
[0219] To verify the superiority of the MEOPCN, the present application selects five methods of CORAL, CDAN, DWPT, TDAM and MK-DANN for comparison. The method in the present application is realized by using the 2.3.1 Pytorch library in Python and the 12th Gen Intel(R) Core(TM) i3-12100 CPU and Intel(R) UHD Graphics 730 GPU. Each 1024 adjacent points in the collected signal is a group to constitute a sample, and 48 working condition migration tasks are designed, which contain four types of small sample tasks, i.e. 10way-5shot, 10way-10shot, 9way-5shot and 9way-10shot. The overall workflow contains two stages. In the pre-training stage, SD and TD come from different working conditions; in the training stage, SD and TD come from the same working condition, but the TD sample is invisible in SD. As shown in Table 8, the main configuration of the model is: Adam optimizer is used. λ1=0.75, λ2=0.3, λ3=0.6, λ4=0.6. For the two data sets, the pre-training learning rate is 0.001, the ratio of TD and TD is 1:1, the batch size is 600 and 800 respectively, and the epoch is 600 and 800 respectively. The fine-tuning learning rate is 0.001 and 0.0001 respectively, φ1 is set to 40 and 200, and φ2 is set to 50 and 200 respectively. In order to verify the classification accuracy of the MEOPCN method in the cross-working condition migration scene, the present application carries out 5 experiments for each task, and the average value is taken.
[0220] Table 8 Main configuration of the model
[0221]
[0222]
[0223] 2、Experimental results
[0224] In order to verify the performance of the present application, the present application is compared with different models, and the comparison results are shown in Tables 2, 3, Figure 2 and Figure 3The experimental results of MEOPCN on CWRU and HUST datasets show that its performance significantly outperforms other comparative methods. In the 10way-5shot task of CWRU dataset, the average classification accuracy of MEOPCN model reaches 99.94%, which realizes a significant improvement of 18.22%, 0.37%, 1.36%, 2.6% and 0.18% compared with CORAL, CDAN, DWPT, TDAM and MK-DANN methods respectively. When the number of samples per class in the training set increases to 10, the average classification accuracy of MEOPCN is further improved to 99.99%, and the accuracy of 10 of the 12 working condition transfer tasks reaches 100%. In addition, in the HUST dataset, when there are only 5 samples per fault type, the average classification accuracy of MEOPCN reaches 85.10%, which realizes an accuracy improvement of 24.72%, 21.01%, 23.7% and 14.64% compared with 1D-CNN, Transformer, CORAL and CDAN respectively; when the number of samples per class increases to 10, the average accuracy of MEOPCN is further improved to 95.31%, and the accuracy of 7 of the 12 working condition transfer tasks exceeds 95%.
[0225] The MEOPCN model exhibits strong adaptability and robustness, and can achieve high classification accuracy even when there is a significant difference between the SD and TD data distributions. This is mainly due to the advantages of the MEOPCN model in feature extraction and DA, which can effectively reduce the influence of domain differences and improve the data sensitivity of the model under limited sample conditions. Therefore, the MEOPCN model provides an efficient and robust solution for bearing fault diagnosis tasks and has broad application prospects.
[0226] The beneficial effects of the present application are:
[0227] 1. Cross-domain alignment fine optimization, classification accuracy steadily improved:
[0228] In order to evaluate the proposed MEOPCN method, the present application applies it to the CWRU dataset and conducts 12 cross-domain fault diagnosis experiments C0-C11, wherein the classification results are taken from the original text. According to the classification accuracy analysis of CWRU dataset (see Table 2 and Figure 2), the average classification accuracy of the method can reach 99.94%, which realizes an improvement of 18.22%, 0.37%, 1.36%, 2.6% and 0.18% compared with CORAL, CDAN, DWPT, TDAM and MK-DANN respectively. When the number of samples per class in the training set during the training phase increases to ten, the average classification accuracy of MEOPCN is further improved to 99.99%, and the accuracy of 10 tasks reaches 100% in 12 working condition transfer tasks. Experimental data fully confirms that MEOPCN can reduce the influence of domain difference and improve the data sensitivity under limited samples. In addition, under the same TD, the accuracy of the method in the 10shot task is higher than that in the 5shot task. This can be attributed to increasing the number of labeled source samples to help enhance the feature mining ability of the model.
[0229] Table 2 Classification accuracy (%) on CWRU dataset
[0230]
[0231] To further analyze the superiority of MEOPCN, the present application applies it to the HUST dataset to perform 12 cross-domain fault diagnosis experiments H0-H11, wherein each method uses the same baseline network as MEOPCN. According to the classification accuracy analysis of the HUST dataset (see Table 3 and Figure 3 ), MEOPCN significantly outperforms other comparative methods in performance. Specifically, in the case of only five samples per fault type, the average classification accuracy of the method can reach 85.10%, which realizes an accuracy improvement of 24.72%, 21.01%, 23.7% and 14.64% compared with 1D-CNN, Transformer, CORAL and CDAN. When the number of samples per class increases to ten, the average classification accuracy of MEOPCN is further improved to 95.31%. In 12 working condition transfer tasks, the accuracy of 7 tasks exceeds 95%. Experimental data fully confirms that the use of MEOPCN method can significantly improve the accuracy of fault diagnosis, and its practicability and advancement in dealing with complex fault classification problems. In addition, it is once again proved that with the increase of the number of fault type samples in the training set, the performance of the method is also enhanced.
[0232] Table 3 Classification accuracy (%) on HUST dataset
[0233]
[0234] 2、Module advantage complementary, model precision greatly improved:
[0235] The proposed method combines two modules: 1) the SR module learns domain-invariant feature representations by combining auxiliary information and sample entropy; 2) the PCL module performs feature alignment by capturing the classification semantic structure of intradomain data and cross-domain instance-prototype pairs. To further explain the effectiveness of MEOPCN, the following experiments were conducted to demonstrate the importance and complementarity of the SR and PCL modules.
[0236] Tables 4 and 5 show the bearing signal classification performance of models trained using different methods on the CWRU and HUST datasets under small sample cross-condition conditions, respectively. In the tables, w / o SR indicates... Figure 1 The SR module was removed from the model, and w / oPCL indicates the removal of the PCL module. During training, only Nway-10shot was used for fine-tuning. As shown in the table, the average accuracy of w / o SR-w / oPCL was only 94.63% and 68.02%, respectively. The results indicate that the variable operating conditions of bearings lead to significant differences in the data distribution between SD and TD, making direct feature extraction and custom classifier training on SD data ineffective. In w / oPCL, the average accuracy improved by 4.73% and 9.73% after cross-domain alignment, indicating that the SR preprocessing can improve the performance of deep learning models. However, the average accuracy is still lower than MEOPCN, suggesting that blindly using domain transfer may lead to negative transfer. In w / o SR, this invention observed that adding the PCL module improved the average accuracy by 0.69% and 5.1%, indicating that prototype learning can improve the model's performance with small sample sizes when applied across domains. However, the average accuracy is still lower than MEOPCN, indicating that PCL is difficult to adapt to new data distributions. The average accuracy of MEOPCN reached 99.99% and 95.31% respectively, indicating that the PCL optimization based on the SR module further improved the model performance.
[0237] Table 4. Bearing classification performance of different training modules on the CWRU dataset.
[0238]
[0239] Table 5. Bearing classification performance of different training modules on the HUST dataset.
[0240]
[0241] 1) Sample reweighting module
[0242] This invention uses a confusion matrix to conduct an in-depth analysis of the performance advantages of the SR module in cross-domain tasks. Taking tasks H0 and H8 as examples, the confusion matrix results are as follows: Figure 4The experimental results show that, compared with the traditional DA method, the classification accuracy of difficult-to-classify samples (the 7th and 8th classes in H0 and H8) is significantly improved by 0.51% and 5.71% and 9.9% and 24.41% respectively. Compared with w / o SR, it is improved by 1.18% and 3.42% and 3.69% and 18.49% respectively. This result shows that the SR module effectively reduces the confusion phenomenon between difficult-to-classify samples by introducing sample entropy and reweighting the classification results, thereby significantly improving the classification performance.
[0243] The t-SNE results of tasks H0 and H8 are shown in Figure 5 The limitations of the traditional DA method in dealing with outliers are particularly evident. Specifically, there is significant overlap between the classification clusters, and the distance between the samples within the cluster and the cluster center is generally far, which not only affects the accuracy of classification, but also even leads to obvious classification errors in some cases. This shows that the traditional DA method is difficult to effectively achieve accurate classification when faced with complex sample distribution and outlier interference. In contrast, the SR module finely adjusts and optimizes the samples, thereby effectively weakening the interference of outliers on the classification process. Under the action of the SR module, the boundaries between the classification clusters become clearer, and the samples within the cluster are closely distributed around the cluster center, forming a more compact and higher separation degree classification structure.
[0244] 2) Prototype contrast learning module
[0245] To further explore the effectiveness of the PCL module in feature learning, the t-SNE technology is used to visualize the learned features. Taking tasks H3 and H9 as examples, the mapping results of the features are shown in Figure 6 By comparing the feature mapping results of different methods, the influence of each module on the feature space distribution can be clearly observed.
[0246] In the traditional DA method, due to the lack of classification auxiliary information and sample perception weight term, the feature clustering effect is poor under the interference of outliers. Specifically, there is significant overlap between different class clusters, and the classification error rate is high, which shows that the traditional DA method has insufficient ability to divide the feature space. In contrast, as shown in Figure 6 (b) and (e), although the model optimized by the SR module can resist the interference of outliers and effectively distinguish different class clusters, there is still overlap and dispersion within each class cluster. This shows that the SR module has improved the robustness of the features to a certain extent, but there is still room for improvement in the clustering performance of the features. As Figure 6(c) and (f) show that when the PCL module is introduced, the distribution of the feature space has been significantly improved. The division between classes becomes clearer, the boundaries between different class clusters are more explicit, and the sample points within the class are more concentrated. This phenomenon shows that the PCL module effectively clusters samples of the same class in the feature space while pushing away samples of different classes, thereby significantly improving the separability of the features. In addition, Figure 6 The robustness of the SR module in feature clustering is again verified. Even under the influence of outliers, the clustering results of the SR module can still maintain good stability, which is consistent with the results in Figure 5 , further proving the effectiveness of the SR module in outlier suppression.
[0247] In summary, the PCL module further optimizes the distribution of the feature space through the contrastive learning mechanism, enhances the clustering performance of the features, and thus provides more effective feature representation for classification problems in cross-domain tasks. At the same time, the robustness of the SR module is also verified in multiple experimental results, indicating that it has a significant advantage in dealing with outlier interference.
[0248] 3. Improve model robustness and adaptability:
[0249] In the training of the bearing signal deep learning model, due to the limited size of the data set and the complexity of the operating conditions, the robustness of the model becomes a key consideration. The comparison of the box plot can observe the performance trend of different model combinations, so as to identify the model configuration with the best performance and stability. In order to accurately select the training model, the present application draws a diagnostic accuracy box plot for model evaluation, as shown in Figure 7 .
[0250] Taking tasks C6 and H11 as examples, the SR-w / o PCL model exhibits higher classification accuracy and shorter box compared to w / o SR-w / o PCL and other DA-w / o PCL. This indicates that the introduction of the SR module significantly enhances the robustness of the model to bearing data input, enabling it to maintain high classification accuracy when facing complex data distribution. When the PCL module is introduced, the accuracy distribution of the model becomes more concentrated, specifically manifested as further shortening of the box length and significant improvement of the median. This indicates that the PCL module significantly enhances the consistency and stability of the model in feature extraction. Through the contrastive learning mechanism, the PCL module further optimizes the distribution of the feature space, making samples of the same class more closely clustered in the feature space, and samples of different classes more effectively separated. This optimization of feature distribution directly reflects on the classification accuracy of the model, making the performance of the model more stable under different working conditions. It is particularly noteworthy that without the support of the SR module, the use of the PCL module alone does not improve the accuracy. This result is consistent with the data in Tables 4 and 5, showing that in the case of significant differences in data distribution, the PCL module is difficult to effectively improve the classification performance of bearing signals. Therefore, the combination of the SR module and the PCL module is crucial for improving the overall performance of the model, especially in improving the adaptability and stability of the model to bearing signals under different working conditions.
[0251] The above merely illustrates the specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which shall be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A method of bearing fault diagnosis across operating conditions using a minimum entropy optimized prototype contrastive network, characterized in that, The method comprises the following steps: Step 1: Collect bearing vibration signals under multiple working conditions to construct source domain data set and target domain data set; Step 2: Extract deep feature representation of the bearing vibration signals by using convolutional layers and transformer layers; Step 3: Establish auxiliary information between global features and prediction information, so that the model can capture the nonlinear relationship between global features and prediction information; Step 4: Calculate sample entropy to evaluate the uncertainty of sample classification, and weight the results according to the difficulty of sample classification; Step 5: Construct a four-layer fully connected domain discriminator, combine auxiliary information and sample entropy, and optimize the feature distribution alignment of source domain and target domain through domain adversarial loss function; Step 6: Use the feature vector of bearing data to obtain the prototype of the data by using learning vector quantization; Step 7: Perform intra-domain prototype contrast learning to compare the similarity components between the feature vector and the prototype, and calculate the intra-domain prototype contrast loss; Step 8: Perform cross-domain instance-prototype learning to compare the similarity components between the source domain feature vector and the target domain prototype, and calculate the cross-domain instance-prototype loss; Step 9: Design a weighted total loss function including domain adversarial loss, intra-domain prototype contrast loss, cross-domain instance-prototype loss and classification loss to optimize the model; Step 10: Use the trained model to classify and diagnose the target domain bearing fault state.
2. The method of claim 1, wherein the minimum entropy optimized prototype contrast network is used for bearing fault diagnosis across operating conditions. The specific method of extracting deep feature representation of the bearing vibration signals by using convolutional layers and transformer layers in step S2 comprises: (1) First CNN with 16 convolutional kernels of size 3; (2) Second CNN with 32 convolutional kernels of size 3; (3) Third CNN with 64 convolutional kernels of size 3; (4) Use the Transformer layer to analyze the context relationship between each feature extracted by CNN to form global feature f; (5) Generate deep feature representation after two fully connected layers (FC); (6) Get prediction information g after Softmax layer.
3. The method of claim 2, wherein the minimum entropy optimized prototype contrast network is used for bearing fault diagnosis across operating conditions. The specific method of establishing auxiliary information between global features and prediction information to capture the nonlinear relationship between global features and prediction information in step S3 comprises: (1) Combining the global feature f and the prediction information g into the side information (2) Use the auxiliary domain discriminator composed of four fully connected layers to process the combined representation, and the number of neurons of the fully connected layers is 256, 128, 64, and 1 in turn; (3) Capture the nonlinear relationship between features and prediction information through the auxiliary domain discriminator, and the process is represented as: wherein D Auxiliary represents an auxiliary discriminator.
4. The method of claim 3, wherein the minimum entropy optimized prototype contrast network is used for bearing fault diagnosis across operating conditions. The specific method of calculating sample entropy to evaluate the uncertainty of sample classification, and weighting the results according to the difficulty of sample classification in step S4 comprises: ω(Entropy(g)) = 1 + e -Entropy(g) Where N represents the number of classes, g n Let represent the probability that a sample is predicted to be in the nth class; Entropy(g) represents the sample entropy; ω(Entropy(g)) represents the weights applied to the sample; e -Entropy(g) To measure the difficulty of classifying a sample, the greater the sample entropy, the smaller its weight should be.
5. The method of claim 4, wherein the minimum entropy optimized prototype contrast network is used for bearing fault diagnosis across operating conditions. The specific method of constructing a four-layer fully connected domain discriminator, combining auxiliary information and sample entropy, and optimizing the feature distribution alignment of source domain and target domain through domain adversarial loss function in step S5 comprises: The domain adversarial loss can be represented as: wherein D s represents the source domain dataset; D t represents the target domain dataset; i represents the source domain index; s represents the source domain; j represents the target domain index; t represents the target domain; the feature distribution of the source domain and the target domain are aligned by minimizing the weighted domain adversarial loss function.
6. The method of claim 2, wherein the minimum entropy optimized prototype contrast network is used for bearing fault diagnosis across operating conditions. The specific method of obtaining the prototype of the data by using learning vector quantization in step S6 comprises: k eigenvectors are randomly selected from the SD as initial prototype vectors {p1, p2, …, pk} whose labels are the corresponding preset labels k} as the corresponding preset labels where k represents the number of classes. randomly select a sample from the SD calculate the distance of the sample from each prototype: d ij =||f i s -p j ||2,j∈[1,k] Find the relationship with f i s The latest prototype p j* ;if With p j* The corresponding tag t j* If they are the same, then bring p closer. j* Distance from the sample; otherwise, move p away. j* Distance from the sample: where η e (0, 1) is a hyper-parameter; the final SD prototype is obtained after 1000 iterations and TD prototype 7. The method of bearing fault diagnosis across operating conditions using the minimum entropy optimized prototype contrastive network according to claim 6, characterized in that, The specific method of performing intra-domain prototype contrast learning in step S7, comparing the similarity components between the feature vectors and the prototypes, and calculating the intra-domain prototype contrast loss includes: To accurately capture the subtle differences of bearing fault signals, the f i s and The similarity component between f Wherein, φ is the temperature value; The intra-domain prototype contrast loss can be expressed as: wherein index s and index t denote the index of the input data; L CE (·) denotes the cross-entropy loss; By minimizing the intra-domain prototype contrast loss, each prototype represents the central tendency and typical features of a class of data; by pulling the distance between samples of the same category closer and the distance between samples of different categories farther, the model can learn more discriminative features.
8. The method of claim 7, wherein the minimum entropy optimized prototype contrast network is used for bearing fault diagnosis across operating conditions. The specific method of performing cross-domain instance-prototype learning in step S8, comparing the similarity components between the source domain feature vectors and the target domain prototypes, and calculating the cross-domain instance-prototype loss includes: Given a feature vector f of the source domain i s and a prototype of the target domain Compute similarity component: To identify the matching relationship between the prototype and the out-domain bearing features, the following steps are taken Entropy minimization is performed, and E(V i s→t ); finally, the cross-domain instance-prototype loss is obtained wherein, denotes the entropy of the similarity component of the source domain feature to the target domain prototype; denotes the entropy of the similarity component of the target domain feature to the source domain prototype;D tu denotes that the target domain label is not visible; By minimizing the cross-domain instance-prototype loss, the model can avoid the influence of the outlying bearing data.
9. The method of claim 8, wherein the minimum entropy optimized prototype contrast network is used for bearing fault diagnosis across operating conditions. The specific method of designing a weighted total loss function including the domain adversarial loss, the intra-domain prototype contrast loss, the cross-domain instance-prototype loss, and the classification loss to optimize the model in step S9 includes: The classification loss, the adversarial loss, and the PCL loss are used to help the training process of the model, and the parameters are used to control the influence of the global loss; the losses of each part are as follows: (1) Sample reweighting module: where λ1, λ2 are hyperparameters; For prediction label, y is the real label; L pre-total denotes the total loss in the pre-training stage; the training process minimizes L pre-total , the domain adversarial loss L Auxiliary acts on the features f s,t and the predicted information g s ,t , the classification loss L CE only acts on the source domain; and denotes the network parameters before and after the update in the pre-training stage, and the domain discriminator Θ D Gradient inversion is performed using GRL, and the optimization objective is: (2) Prototype contrast learning module: where λ3, λ4 are hyper-parameters; L train-total denotes the total loss in the training phase; the training process minimizes L train-total , the prototype contrastive loss L In and L Cross acts on the features f s,t of the source domain and the target domain; the classification loss L CE only acts on the source domain; the optimization goal is: wherein, denotes the updated network parameters at the training phase.
Citation Information
Patent Citations
Cross-domain fault diagnosis method and system for rolling bearing with unknown inter-domain data label relation
CN117312984A
Cross-working-condition fault diagnosis method based on uncertainty estimation denoising
CN120067871A