A rolling bearing passive domain self-adaptive fault diagnosis method based on prototype mutual comparison
Patent Information
- Application Number
- CN202610892611.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-20
- Publication Date
- 2026-10-16
AI Technical Summary
[0007]本发明的目的是解决当前SFDA方法在滚动轴承故障诊断中因伪标签噪声累积导致类坍塌、诊断精度不稳定的问题
[0066] This invention overcomes the distribution differences caused by changes in operating conditions, enabling cross-operating-condition fault diagnosis of rolling bearings without accessing source domain data or requiring any labels in the target domain. Experiments on 18 cross-operating-condition migration tasks using the CWRU and MFS bearing datasets validated the superiority of this invention over existing SFDA methods such as SHOT, ACPDA, and SDALR. The average diagnostic accuracy for each task reached over 99%, and no collapse-like phenomena were observed across all tasks.
Smart Images

Figure CN122925845A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a source-free domain adaptation (SFDA) rolling bearing fault diagnosis method based on dual-standard pseudo-label screening and dual-stream prototype consistency constraints, belonging to the field of intelligent fault diagnosis and transfer learning technology for rotating machinery. Background Technology
[0002] Rolling bearings are among the most critical components in rotating machinery systems, and their health is closely related to the safe and stable operation of the equipment. However, due to their frequent operation under high loads and high speeds, rolling bearings are prone to various failures. If potential failures in rolling bearings are not detected in time, the entire equipment operation will face the risk of failure, potentially leading to equipment downtime or damage, and even personal injury or death, posing a serious threat to life and property safety.
[0003] Currently, deep learning methods are widely used in bearing fault diagnosis, achieving high accuracy results. However, the foundation of traditional deep learning methods lies in sufficient labeled fault samples and the assumption that training and test samples follow the same distribution. In actual industrial scenarios, the operating parameters of rolling bearings, such as speed and load, are variable and unpredictable, resulting in a large difference in the vibration signal distribution between the test samples (target domain) and the training samples (source domain), i.e., domain shift, which seriously reduces the diagnostic accuracy of traditional deep learning models. To solve this problem, fault diagnosis methods based on domain adaptation (DA) have emerged. DA alleviates domain shift by mapping the data of the source domain and the target domain to a common feature space. However, traditional DA methods require simultaneous access to source domain and target domain data during the target domain adaptation stage. This premise is difficult to meet in the following practical scenarios: (1) Source domain data cannot be stored and transmitted to the target device for a long time due to equipment replacement, storage space limitations, or commercial data privacy reasons; (2) Online monitoring systems require rapid deployment of diagnostic models and cannot repeatedly load large-scale historical data to participate in online adaptation. Therefore, Source-Free Domain Adaptation (SFDA) has become a research hotspot in the field of fault diagnosis in recent years—the target domain adaptation stage only allows the use of pre-trained source model weights and strictly prohibits access to any original source domain data.
[0004] Currently, the SFDA method primarily employs Information Maximization (IM) loss to drive model adaptation in the target domain. This involves minimizing entropy and maximizing diversity to ensure the model produces deterministic and uniform predictions across the target domain, supplemented by a pseudo-label self-training strategy to iteratively improve diagnostic accuracy. However, without external constraints, IM loss can easily push all target domain samples into a minority of classes, leading to class collapse. This occurs when the model gives the same incorrect predictions to most samples, resulting in a sharp and irreversible drop in diagnostic accuracy. To address this issue, some works have introduced an exponential moving average (EMA) update mechanism for class prototypes, providing additional constraints in the feature space for the IM loss through prototype contrastive loss. However, this prototype momentum mechanism has inherent flaws: in the early stages of domain adaptation, due to the low quality of pseudo-labels, the established class prototypes themselves are unreliable; a high-momentum EMA anchors this unreliable prototype in the wrong position, making correction difficult, and the prototype contrastive loss instead guides samples to aggregate in the wrong direction, accelerating class collapse. In addition, other methods attempt to assess the reliability of pseudo-labels through data augmentation and voting mechanisms, distinguishing reliable samples from unreliable samples and applying differentiated treatment. However, high voting consistency does not guarantee the correct voting direction—when the model has a systematic bias towards a certain class, multiple augmentation results still consistently point to the wrong category, rendering the reliability assessment meaningless. In summary, the existing SFDA method has shortcomings in the following two core issues: (1) the pseudo-label quality assessment relies on a single standard (only prediction confidence or only voting consistency), which cannot effectively identify noisy pseudo-labels caused by systematic bias; (2) there is a lack of a mechanism to prevent feature space drift at the architectural level, and the unidirectional push of IM loss is irreversible once it induces drift.
[0005] To address the aforementioned issues, this invention constructs an SFDA method based on dual-standard pseudo-label screening and dual-stream prototype consistency constraints. The dual-standard pseudo-label screening mechanism jointly evaluates pseudo-label quality from two independent dimensions: prediction determinism and feature space consistency. It introduces prototype distance confidence on top of the traditional confidence threshold, effectively filtering noisy pseudo-labels caused by systematic bias. The dual-stream prototype consistency constraint constructs a dual-stream architecture of time-domain and frequency-domain streams, using cross-stream prototype alignment as a constraint to achieve mutual calibration. This ensures that class prototypes in the two independent feature spaces maintain a consistent orientation, preventing feature space drift and suppressing class collapse at the architectural level.
[0006] In summary, adaptive fault diagnosis of rolling bearings in the passive domain based on dual-standard pseudo-labels and dual-flow prototype consistency is an innovative research problem with significant research value and application potential. Summary of the Invention
[0007] The purpose of this invention is to address the problems of class collapse and unstable diagnostic accuracy caused by the accumulation of false tag noise in the current SFDA method for rolling bearing fault diagnosis. To address these issues, a dual-standard false tag screening mechanism and a dual-stream prototype consistency constraint are proposed, providing a highly stable adaptive fault diagnosis method for the passive domain of rolling bearings.
[0008] The technical solution adopted in this invention is an adaptive fault diagnosis method for passive domain of rolling bearings based on prototype comparison, which includes the following steps performed in sequence:
[0009] Step 1: Source Domain Data Acquisition and Dual-Modal Sample Construction
[0010] The original vibration signal of the rolling bearing under known operating conditions is collected by an accelerometer as source domain data, which includes vibration signals under normal conditions and various fault conditions.
[0011] The sliding window method is used to segment the one-dimensional time-series vibration signal in the source domain. A fixed sliding window length and sliding step are set, and continuous signal segments are extracted as one-dimensional time domain samples.
[0012] For each one-dimensional time-domain sample, a corresponding two-dimensional time-frequency graph sample is generated through short-time Fourier transform, so that the time-domain sample and the time-frequency graph originate from the same original vibration signal, forming a naturally paired time-domain-frequency-domain dual-modal input.
[0013] Based on the actual failure type of the rolling bearing, add a failure category label to each bimodal sample;
[0014] Step 2: Construction of the two-stream network and pre-training of the source domain model:
[0015] A two-stream feature extraction network is constructed, including: a temporal encoder, a frequency encoder, a classifier, a temporal projection head, and a frequency projection head;
[0016] The source domain dual-modal samples constructed in step one are input into the dual-stream feature extraction network in batches. The time-domain encoder receives one-dimensional time-domain samples to extract time-domain features, and the frequency-domain encoder receives two-dimensional time-frequency maps to extract frequency-domain features. The two features are fused and input into the classifier to obtain the fault category prediction probability.
[0017] The cross-entropy loss function is used to pre-train the dual-stream feature extraction network with the goal of minimizing the difference between the predicted results and the true labels.
[0018] After pre-training is completed, the complete source domain model weights are saved, and the original source domain data will no longer be accessed in the subsequent target domain adaptation phase.
[0019] Step 3: Target Domain Data Acquisition and Sample Division:
[0020] The original vibration signal of the rolling bearing under unknown operating conditions is collected as the target domain data, and the target domain operating conditions are different from the source domain operating conditions.
[0021] Using the same sliding window length, sliding step size, and short-time Fourier transform parameters as in step one, the vibration signal in the target domain is sampled to obtain a one-dimensional time-domain sample and a corresponding two-dimensional time-frequency diagram sample in the target domain.
[0022] The target domain samples are not labeled with any category and are used entirely for subsequent unsupervised adaptation and final testing.
[0023] Step 4: Passive Adaptation in the Target Domain
[0024] The source domain model weights saved in step two are loaded as the initial parameters of the target domain model. Throughout the adaptation process, the model only accesses unlabeled samples in the target domain and does not access any samples in the source domain.
[0025] This step is performed in the following order:
[0026] Step 4.1 Feature Extraction and Prototype Space Projection:
[0027] The target domain samples obtained in step 3 are input into the model in batches. The time domain encoder extracts the time domain features of the one-dimensional time domain samples, and the frequency domain encoder extracts the frequency domain features of the two-dimensional time-frequency graph.
[0028] The temporal projection head maps temporal features to a low-dimensional prototype space and performs normalization processing to obtain temporal projection vectors.
[0029] The frequency domain projection head maps frequency domain features to a prototype space of the same dimension and performs normalization processing to obtain a frequency domain projection vector.
[0030] For each fault category, maintain a class prototype vector in both the time domain stream and the frequency domain stream, with the initial state being empty;
[0031] Step 4.2 Dual-standard pseudo-label screening:
[0032] For each target domain sample, the classifier outputs the predicted probability distribution of the fault category, takes the category corresponding to the highest probability as the pseudo label of the sample, and records the corresponding highest probability value.
[0033] The prediction entropy confidence level is calculated based on the entropy value of the predicted probability distribution. The lower the entropy value, the more certain the model prediction is, and the higher the confidence level is.
[0034] The time-domain projection vector and the frequency-domain projection vector are normalized and fused. The cosine similarity between the fused vector and the prototype class corresponding to the pseudo-label of the sample is calculated and used as the prototype distance confidence. The higher the cosine similarity, the more consistent the sample features are with the existing prototype.
[0035] The joint confidence score is obtained by multiplying the prediction entropy confidence score by the prototype distance confidence score.
[0036] The pseudo-label of a sample is adopted as a reliable pseudo-label only when the joint confidence is greater than the first preset threshold and the predicted maximum probability is greater than the second preset threshold, and the sample is marked as a reliable sample.
[0037] Step 4.3 Prototype Exponential Moving Average Update:
[0038] Only the reliable samples selected in step 4.2 are used for class prototype updates;
[0039] For each reliable sample, determine the fault category it belongs to based on its pseudo-label. If the prototype of the category has not yet been established in the corresponding stream, then directly initialize the prototype of the category with the projection vector of the current sample.
[0040] If such a prototype has been established, it is updated using an exponential moving average method: the new prototype is obtained by weighting the old prototype and the current sample projection vector by a momentum coefficient, the momentum coefficient being close to 1, so that the prototype drifts to the new sample in a smooth and conservative manner.
[0041] The time-domain stream and frequency-domain stream perform the above prototype update operations independently, respectively;
[0042] Step 4.4 Cross-stream prototype consistency constraints:
[0043] Take the common fault categories from the time-domain prototype set and the frequency-domain prototype set;
[0044] Calculate the average cosine distance between the time-domain prototype and the frequency-domain prototype in the common category, and use this average distance as the cross-stream prototype consistency loss;
[0045] This loss is used to force similar prototypes in two independent feature spaces to maintain a consistent orientation: when the prototype of any flow drifts due to the unidirectional drive of entropy minimization, the consistency loss generates a gradient pointing to that flow, pulling its prototype back to the direction consistent with the other flow.
[0046] Step 4.5 Auxiliary loss calculation and parameter update:
[0047] Entropy minimization loss: Calculate the entropy value for the predicted probability distribution of all target domain samples, sum them and divide by the batch size to make the model's prediction for each sample more deterministic;
[0048] Calculate the weighted pseudo-label self-training loss: For the reliable samples selected in step 4.2, calculate the cross-entropy loss with joint confidence as the weight. The higher the joint confidence, the greater the contribution of the sample to the loss.
[0049] The cross-stream prototype consistency loss, entropy minimization loss, and weighted pseudo-label self-training loss are weighted and summed according to preset weights to obtain the total loss function;
[0050] An optimizer is used to minimize the total loss function, calculate the gradient, and update the model parameters.
[0051] Step 4.6 Preheating Stage Control:
[0052] The first few training cycles of passive adaptive training in the target domain are set as the warm-up phase. In this phase, only the entropy minimization loss calculation and parameter update in step 4.5 are performed. The pseudo-label screening in step 4.2, the prototype update in step 4.3, and the weighted pseudo-label self-training loss in step 4.5 are not performed temporarily to avoid the irreversible misleading of the model by the early low-quality pseudo-labels.
[0053] Step 5: Iterative Adaptation and Optimal Model Selection
[0054] One training cycle is defined as traversing all unlabeled samples in the target domain once. Steps 4.1 to 4.6 in step four are repeated until the preset maximum number of training cycles is reached.
[0055] Since the target domain does not contain any class labels, the optimal cycle cannot be selected through the validation set during training. Therefore, the model parameters at the end of the final iteration cycle are taken as the optimal model.
[0056] Step Six: Fault Diagnosis Output:
[0057] Input the target domain test set samples into the optimal model obtained in step five, and the model outputs the fault category prediction result for each test sample;
[0058] The diagnostic accuracy and macro average F1 score are used as performance evaluation metrics to output the final diagnostic results.
[0059] Furthermore, in step 4.2, the prototype distance confidence is evaluated using the time-domain prototype first; if the time-domain prototype has not yet been established, the frequency-domain prototype is used instead; if neither the time-domain prototype nor the frequency-domain prototype has been established, the prototype distance confidence evaluation of the sample is temporarily skipped, and the sample is screened only based on the prediction entropy confidence.
[0060] Furthermore, the momentum coefficient in step 4.3 has a value range greater than 0.9 and less than 1, which limits the correction magnitude of each newly arrived reliable sample to a small proportion, and the cumulative effect of multiple samples enables the prototype to gradually track the changes in the distribution of the target domain data.
[0061] Furthermore, the cross-stream prototype consistency loss in step 4.4 and the entropy minimization loss in step 4.5 form a synergistic mechanism: the entropy minimization loss provides a driving force for model adaptation, forcing the model to make a clear judgment on each target domain sample; the cross-stream prototype consistency loss provides a directional constraint for this driving force, preventing the unidirectional push of the entropy minimization loss from causing class collapse.
[0062] Furthermore, the temporal encoder consists of multiple stacked one-dimensional convolutional layers with batch normalization and ReLU activation functions, followed by an adaptive average pooling layer, which outputs a fixed-length temporal feature vector; the frequency domain encoder uses a pre-trained ResNet18 as the backbone network, removes its last fully connected classification layer, and uses the vector after global average pooling as the frequency domain feature vector.
[0063] Furthermore, both the time-domain projection head and the frequency-domain projection head are two-layer structures consisting of a fully connected layer, a batch normalization layer, a ReLU activation function, and a fully connected layer. The two projection heads map the output of their respective encoders to the prototype space of the same dimension and perform L2 normalization on the projection vectors so that all projection vectors lie on the unit hypersphere.
[0064] Furthermore, the first preset threshold is the lower limit of the joint confidence level, and the second preset threshold is the lower limit of the predicted maximum probability. The two thresholds together constitute the threshold for dual-standard screening. When a sample has a high predicted probability but its projection vector is far away from the corresponding class prototype, the joint confidence level is lower than the first preset threshold due to the low confidence level of the prototype distance. The sample will not be adopted, thereby blocking the propagation of noise pseudo-labels caused by systemic bias from the source.
[0065] Furthermore, this method is applied to the fault diagnosis scenario of rolling bearings under multiple operating conditions, wherein the change in operating conditions between the source domain and the target domain includes at least one of speed change and load change; and the fault state includes at least one of normal state, rolling element fault, inner ring fault, outer ring fault and compound fault.
[0066] This invention overcomes the distribution differences caused by changes in operating conditions, enabling cross-operating-condition fault diagnosis of rolling bearings without accessing source domain data or requiring any labels in the target domain. Experiments on 18 cross-operating-condition migration tasks using the CWRU and MFS bearing datasets validated the superiority of this invention over existing SFDA methods such as SHOT, ACPDA, and SDALR. The average diagnostic accuracy for each task reached over 99%, and no collapse-like phenomena were observed across all tasks. Attached Figure Description
[0067] Figure 1 This is an architecture diagram of the SFDA network for the dual-stream prototype comparison.
[0068] Figure 2 This is a flowchart illustrating the algorithm execution of the method of the present invention.
[0069] Figure 3 This is a comparative experimental result of the present invention with other SFDA methods. Detailed Implementation
[0070] This invention proposes an adaptive fault diagnosis method for the passive domain of rolling bearings based on the consistency of dual-standard pseudo-labels and dual-flow prototypes.
[0071] like Figure 1-2 As shown, the steps of this method are as follows:
[0072] S1, collect the vibration signal of the rolling bearing in the source domain, use the sliding window method to divide the one-dimensional time series sample and the corresponding two-dimensional STFT time-frequency diagram sample, and add fault category labels to the sample;
[0073] S2, construct a dual-stream feature extraction network, input source domain samples into the model in batches for pre-training, and save the source domain model weights;
[0074] S3: Collect rolling bearing vibration signals in the target domain (under different working conditions than the source domain), divide the samples in the same way as S1, and do not add any category labels;
[0075] S4. Input the target domain samples into the pre-trained source domain model in batches for passive domain adaptation: extract features from the time domain stream and frequency domain stream respectively and project them onto the prototype space; evaluate the comprehensive reliability of the pseudo-label of each sample by the dual-standard pseudo-label screening mechanism; update the time domain prototype and frequency domain prototype of the corresponding class only for the reliable samples that pass the screening; calculate the cross-stream prototype consistency loss and auxiliary loss, and update the model parameters.
[0076] S5, repeat S4 until the preset maximum number of iterations is reached, and take the model of the final iteration as the optimal model;
[0077] S6 uses the optimal model to diagnose faults in the target domain test set samples and outputs the diagnosis results.
[0078] The specific implementation method is as follows:
[0079] Step S1: Collect source domain data and segment samples. Using an accelerometer, collect various fault vibration signals and normal vibration signals of rolling bearings under different known operating conditions (such as different speeds and load conditions) from a rotating machinery experimental platform as source domain data. The source domain data includes fault category labels. ,in This represents the total number of fault categories.
[0080] To obtain sufficient fault samples for subsequent model training, a sliding window method is used to segment the one-dimensional time-series fault signal of the rolling bearing in the source domain: the sliding window size is set to be equal to the length of the required samples. (i.e., the number of sampling points contained in each sample), so that the sliding window moves across the signal in fixed steps. Slide from left to right, and take the length of the window segment after each slide. A continuous signal is taken as a one-dimensional time-domain sample If the length of the signal is The sample size is then calculated using equation (1):
[0081]
[0082] Based on the required total number of samples With sample length The corresponding stride can be calculated by back-calculating using equation (1). Finally, based on the failure type of the rolling bearing, category labels were added to several samples obtained by the sliding window method. .
[0083] For each one-dimensional time-domain sample The corresponding two-dimensional time-frequency graph is generated by using Short-Time Fourier Transform (STFT). ,in For frequency axis resolution, This represents the time-domain resolution. (Time-domain samples) and time-frequency graph The training inputs are derived from the same original vibration signal, forming a naturally paired time-domain and frequency-domain dual-modal input. For the target domain data, samples are divided according to the exact same sliding window parameters and STFT parameters, but no class labels are added.
[0084] Step S2, source domain model pre-training. Construct a two-stream feature extraction network, which consists of four parts: a temporal encoder... Frequency domain encoder Classifier and two projection heads and .
[0085] The time-domain encoder $E_{t}$ receives the raw one-dimensional vibration signal. As input, the signal consists of four batch-normalized one-dimensional convolutional layers (Conv1d+BN+ReLU), which extract temporal features of the signal layer by layer. Finally, the features are compressed into a one-dimensional feature vector by adaptive average pooling (AdaptiveAvgPool1d). Frequency domain encoder Received 2D STFT time-frequency diagram As input, ResNet18 is used as the backbone network, with its last fully connected classification layer removed, and the result is obtained after global average pooling. 3D vector as frequency domain feature .
[0086] The two stream features are added together and fused before being input into the classifier. (A fully connected layer) yields the predicted probability of the fault category:
[0087]
[0088] The source domain pre-training stage employs the cross-entropy loss function, aiming to minimize the difference between the predicted results and the true labels:
[0089]
[0090] Where $B$ is the batch size. For the sample In category The actual label on the screen (one-hot encoded, with a value of 0 or 1). For the model to sample Category The predicted probability is calculated. During training, the Adam optimizer is used to iteratively update the model parameters, and the StepLR learning rate scheduler is used (decaying to 0.5 times the original rate every 10 epochs). After training, the complete source domain model weights are saved. In the subsequent target domain adaptation phase, the source domain model weights are directly loaded, and the original source domain data is no longer accessed.
[0091] Step S3: Collect target domain data and segment the samples. The method for collecting target domain data and segmenting samples is the same as in S1, but the operating conditions of the target domain are different from those of the source domain (e.g., different speeds or loads), and no category labels are added to any samples. All samples in the target domain are used only for unsupervised adaptation and final testing.
[0092] Step S4, passive adaptation in the target domain. The source domain model weights saved in step S2 are... Load as target domain model The initial parameters are set. Throughout the adaptation process, the model only accesses unlabeled data from the target domain and does not access any samples from the source domain. Specifically, the following steps are included:
[0093] S401, feature projection onto prototype space. Temporal encoder. and frequency domain encoder Extracted The 1D feature vectors are each passed through their respective two-layer fully connected projection heads. and Map to a lower-dimensional prototype space and perform L2 normalization so that all projected vectors lie in the prototype space. The unit of dimension on the hypersphere:
[0094]
[0095]
[0096] in Represents the L2 norm of a vector, projection head and Both are two-layer structures consisting of "fully connected layer → batch normalization → ReLU activation → fully connected layer". The projectors of the two streams map the outputs of their respective encoders to a common 128-dimensional prototype space, allowing temporal and frequency domain features to be compared and aligned in the same space.
[0097] For each fault category ( Maintain a class prototype vector in both the time-domain stream and the frequency-domain stream. and Initially, it is an empty dictionary. The prototype records the model's continuous understanding of what this type of feature "should be like" during the adaptation process, and gradually evolves with the addition of high-quality samples.
[0098] S402, dual-standard pseudo-label screening. For each target domain sample, the model first uses a classifier... Obtain its predicted probability distribution The category with the highest probability is taken as the pseudo-label of the sample. The corresponding probability value is denoted as Existing methods are based solely on Whether the value exceeds a fixed threshold is used to determine the reliability of pseudo-labels, but It only reflects the model's "confidence" in a single prediction and cannot reflect whether the prediction is consistent with existing knowledge in the feature space.
[0099] This invention comprehensively evaluates the reliability of pseudo-tags from two independent dimensions:
[0100] (a) Confidence of prediction entropy : Measures the certainty of the model's prediction for the current sample. Predicted probability distribution The entropy is defined by equation (6):
[0101]
[0102] Higher entropy indicates a more "average" predicted distribution (model uncertainty), while lower entropy indicates a high degree of confidence in a particular class. Entropy can be mapped to... Confidence level of the interval:
[0103]
[0104] (b) Prototype distance confidence : Measures the projection vector of a sample in the prototype space and its pseudo-label Corresponding class prototype The closer the distance, the higher the similarity between the sample's features and the existing prototypes of that class, and the more reliable the pseudo-label. Prioritize using established time-domain prototypes; if a time-domain prototype has not yet been established, try using a frequency-domain prototype; if neither has been established, skip this evaluation for now. The prototype distance confidence score is defined by equation (8):
[0105]
[0106] in For the normalization and fusion of the two-stream projection vectors, Cosine similarity, with values ranging from 1 to 10. , This is a scaling factor used to adjust the sensitivity of the distance penalty.
[0107] Joint confidence level The product of the two indicators:
[0108]
[0109] Only if the joint confidence level of equation (9) And predict the maximum probability When both conditions are met, the pseudo-label of the sample The proposed method was adopted. In this invention, the method used... , The core advantage of dual-criteria screening lies in the fact that even if the model predicts a high probability for a particular sample ( If the sample is far from the existing prototype of its claimed class in the feature space (large), If the value is small, then the joint confidence level is... The sample size is still very low, and it will not be included in subsequent prototype updates and self-training, thus blocking the spread of noisy pseudo-labels at the source.
[0110] S403, Prototype Exponential Moving Average Update. Only reliable target domain samples selected through the S402 double-criteria screening are used to update the class prototype. Assume a pseudo-label for a reliable sample. Its time-domain projection vector $\mathbf{p}_{t}$ is used to update the time-domain prototype. The update method is exponential moving average (EMA):
[0111]
[0112] like If a reliable sample has not yet been established (i.e., the first reliable sample of this class appears during the target domain adaptation process), then it is directly initialized with the projection vector of the current sample: The update method of the frequency domain prototype is completely symmetrical. In equation (10) The momentum coefficient has a value of [value missing]. The larger momentum value makes the prototype more conservative in its response to individual samples, "drifting" towards newly arriving high-quality samples in a slow and smooth manner. This allows it to track the gradual changes in the distribution of data in the target domain without being skewed by the projection vectors of individual outliers.
[0113] S404, Cross-flow Prototype Consistency Loss. Due to differences in input modes (original one-dimensional vibration signal vs. two-dimensional STFT time-frequency plot) and network architecture (four-layer Conv1D vs. pre-trained ResNet18), the feature spaces and projection spaces of time-domain and frequency-domain flows are naturally independent. This independence provides a basis for mutual calibration: ideally, class prototypes of the same fault category in the two independent spaces should point to the same semantic direction (i.e., both represent the essential characteristics of "outer loop faults"). If there is a significant deviation between the two, it indicates that the feature extraction of at least one flow has drifted.
[0114] Define the time-domain prototype set as The frequency domain prototype set is Find the common category of the two sets. Cross-stream prototype consistency loss is defined as the average cosine distance between two stream prototypes in the common class:
[0115]
[0116] in This represents the number of shared categories. The cosine similarity value is [value missing]. When the two prototypes are in the same direction , When the directions of the two prototypes are orthogonal , The greater the difference, the greater the loss.
[0117] Cross-stream prototype consistency loss is used to prevent class collapse during target domain adaptation. In standard SFDA training, entropy minimization loss continuously pushes the model to produce more certain predictions for target domain samples, but this push is unidirectional and without external reference—once the model forms a preference for a certain class, the positive feedback of pseudo-label self-training will accelerate the accumulation of preferences, eventually leading to class collapse. In this invention, if entropy minimization loss causes a drift in the feature space of the time-domain stream (or frequency-domain stream), its class prototype consistency loss is used to prevent class collapse. It will deviate from the correct position; however, due to the independence of the input modes and network architecture of the frequency domain stream (or time domain stream), its prototype It remains stable despite the drift. Equation (11) generates a gradient pointing towards the drift flow, pulling its prototype back to the direction consistent with the stable flow. Backpropagation further transmits this gradient to the encoder parameters, thereby correcting the offset of feature extraction.
[0118] S405, Auxiliary Loss Function. In addition to the core loss in equation (11), this invention also uses entropy minimization loss as an auxiliary loss to improve the training process.
[0119] For a containing The batch of n target domain samples, let the nth sample be... The predicted probability distribution of each sample is as follows: The entropy minimization loss is defined as:
[0120]
[0121] This pushes the predicted distribution of each sample to be "sharp" (highly certain), meaning the model should make a clear judgment about which category each sample belongs to, providing a basic supervisory signal for the model's adaptation in the target domain.
[0122] S406, the weighted pseudo-label self-training loss and the total loss function. The reliable sample set selected through the S402 double criteria is denoted as... For these reliable samples, a joint confidence level is calculated. Weighted cross-entropy loss:
[0123]
[0124] in For the sample The pseudo-labels are used. The weighting mechanism ensures that there is distinction even within reliable samples: samples with higher joint confidence contribute more to training, while samples with marginal confidence are downweighted.
[0125] Taking all the above losses into account, the total loss function is:
[0126]
[0127] This paper uses the Adam optimizer to... The gradient of the objective function is calculated, and the model parameters are iteratively updated. Additionally, the first three epochs (warm-up phase) only use... Perform parameter initialization adaptation, but do not perform pseudo-label self-training for the time being, in order to avoid the noisy pseudo-labels during initialization causing irreversible misleading effects on the model.
[0128] Step S5, Iterative Adaptation. One epoch consists of iterating through all unlabeled samples in the target domain once. A total of [number] epochs are performed. Iterative adaptation occurs over several epochs. After each epoch completes the selection of all target domain samples, the model's feature extraction capability and prototype quality gradually improve, the number of reliable samples passing the dual-criteria screening gradually increases, and the cross-stream prototype consistency constraint continues to play a role. After adaptation, the model parameters at the end of the 15th epoch are taken as the final model. Under the SFDA setting of this invention, since the target domain has no labels, it is impossible to select the "optimal epoch" through the validation set during training. Therefore, a fixed number of epochs is used, and the final state model is taken as the optimal model. This setting is completely consistent with real industrial scenarios.
[0129] Step S6, Model Testing. Input test set samples from the target domain (unknown operating conditions), and the model outputs diagnostic results for the fault type, using diagnostic accuracy and macro average F1 score as performance evaluation metrics.
[0130] The network structures adopted in this invention are shown in Tables 1, 2, and 3:
[0131]
[0132] Table 1. Temporal Feature Extractor Network Structure
[0133]
[0134] Table 2. Frequency Domain Feature Extractor Network Structure
[0135]
[0136] Table 3. Shared Classifier Network Structure
[0137] To verify the performance of the proposed method, cross-condition migration experiments were conducted using the Case Western Reserve University Bearing Dataset (CWRU dataset) and the Mechanical Fault Simulation Test Bench Bearing Dataset (MFS dataset). The CWRU dataset includes four operating conditions: 0 hp (1797 rpm), 1 hp (1772 rpm), 2 hp (1750 rpm), and 3 hp (1730 rpm). Each condition contains 10 states: normal, rolling element fault, inner race fault, and outer race fault. The MFS dataset includes three speed conditions: 30 Hz, 40 Hz, and 50 Hz. Each condition contains 7 states: normal, rolling element fault, inner race fault, outer race fault, and combined fault. The source and target domains are different operating conditions within the same dataset (e.g., source domain is CWRU condition 0, target domain is CWRU condition 3). All possible source-target domain combinations were performed for each dataset, resulting in 18 cross-condition migration tasks.
[0138] In the data partitioning stage S1, the sliding window size is set. (The CWRU dataset has a sampling rate of 12kHz, corresponding to a signal segment of approximately 170 milliseconds). The number of samples in each class is 200 (the original sample size of each class exceeds 200 under each working condition; if it is less, all samples are taken). The corresponding sliding window step size is calculated according to equation (1). The STFT parameters are set to a window length of 64 and an overlap rate of 0.5. The learning rate for the source domain pre-training stage S2 is set to 0.001, with a maximum of 30 iterations. The learning rate for the target domain adaptation stage S4 is set to 0.0001, with a maximum of 15 iterations (epochs).
[0139] To verify the superior performance of the rolling bearing cross-condition passive domain adaptive fault diagnosis method of the present invention compared with other SFDA methods, comparative experiments were conducted on 18 cross-condition migration tasks. The comparison methods included: (1) SourceOnly: direct testing of the source domain model without any adaptation, as a lower bound for performance; (2) SHOT (ICML2020): the classic SFDA method based on information maximization and pseudo-label self-training; (3) ACPDA (RESS2024): the SFDA method based on adaptive centroid prototype comparison; (4) SDALR (Neurocomputing2025): the SFDA method based on label reliability assessment; and (5) the method of the present invention (Ours). The experimental results are shown in Tables 4 and 5. Figure 3 As shown.
[0140]
[0141] Table 4. Results of the comparative experiment using the CWRU dataset
[0142]
[0143] Table 5. Results of the comparative experiment using the MFS dataset.
[0144] Experimental results show that the proposed method outperforms the comparative methods in average diagnostic accuracy across all transfer tasks, and remains stable across all tasks without exhibiting any collapse-like phenomena.
[0145] To verify the effectiveness of this invention in dual-standard pseudo-label screening and cross-stream prototype consistency constraint design, ablation experiments were conducted. The complete method was compared with model variants that removed dual-standard screening, removed cross-stream prototype consistency loss, and removed both. The experimental results are shown in Tables 7 and 8. The experimental results further confirm that each part of the design significantly contributes to improving model performance.
[0146]
[0147] Table 7. Ablation Experiment Results of CWRU Dataset
[0148]
[0149] Table 8. Ablation Experiment Results on MFS Dataset
[0150] In summary, this method can complete the cross-condition fault diagnosis task of rolling bearings with good accuracy and stability by utilizing a dual-stream prototype comparison architecture in the time and frequency domains without requiring source domain data to participate in target domain adaptation or any labels in the target domain.
Claims
1. A passive domain adaptive fault diagnosis method for rolling bearings based on prototype comparison, characterized in that, The following steps are performed sequentially: Step 1: Source Domain Data Acquisition and Dual-Modal Sample Construction The original vibration signal of the rolling bearing under known operating conditions is collected by an accelerometer as source domain data, which includes vibration signals under normal conditions and various fault conditions. The sliding window method is used to segment the one-dimensional time-series vibration signal in the source domain. A fixed sliding window length and sliding step are set, and continuous signal segments are extracted as one-dimensional time domain samples. For each one-dimensional time-domain sample, a corresponding two-dimensional time-frequency graph sample is generated through short-time Fourier transform, so that the time-domain sample and the time-frequency graph originate from the same original vibration signal, forming a naturally paired time-domain-frequency-domain dual-modal input. Based on the actual failure type of the rolling bearing, add a failure category label to each bimodal sample; Step 2: Construction of the two-stream network and pre-training of the source domain model: A two-stream feature extraction network is constructed, including: a temporal encoder, a frequency encoder, a classifier, a temporal projection head, and a frequency projection head; The source domain dual-modal samples constructed in step one are input into the dual-stream feature extraction network in batches. The time-domain encoder receives one-dimensional time-domain samples to extract time-domain features, and the frequency-domain encoder receives two-dimensional time-frequency maps to extract frequency-domain features. The two features are fused and input into the classifier to obtain the fault category prediction probability. The cross-entropy loss function is used to pre-train the dual-stream feature extraction network with the goal of minimizing the difference between the predicted results and the true labels. After pre-training is completed, the complete source domain model weights are saved, and the original source domain data will no longer be accessed in the subsequent target domain adaptation phase. Step 3: Target Domain Data Acquisition and Sample Division: The original vibration signal of the rolling bearing under unknown operating conditions is collected as the target domain data, and the target domain operating conditions are different from the source domain operating conditions. Using the same sliding window length, sliding step size, and short-time Fourier transform parameters as in step one, the vibration signal in the target domain is sampled to obtain a one-dimensional time-domain sample and a corresponding two-dimensional time-frequency diagram sample in the target domain. The target domain samples are not labeled with any category and are used entirely for subsequent unsupervised adaptation and final testing. Step 4: Passive Adaptation in the Target Domain The source domain model weights saved in step two are loaded as the initial parameters of the target domain model. Throughout the adaptation process, the model only accesses unlabeled samples in the target domain and does not access any samples in the source domain. This step is performed in the following order: Step 4.1 Feature Extraction and Prototype Space Projection: The target domain samples obtained in step 3 are input into the model in batches. The time domain encoder extracts the time domain features of the one-dimensional time domain samples, and the frequency domain encoder extracts the frequency domain features of the two-dimensional time-frequency graph. The temporal projection head maps temporal features to a low-dimensional prototype space and performs normalization processing to obtain temporal projection vectors. The frequency domain projection head maps frequency domain features to a prototype space of the same dimension and performs normalization processing to obtain a frequency domain projection vector. For each fault category, maintain a class prototype vector in both the time domain stream and the frequency domain stream, with the initial state being empty; Step 4.2 Dual-standard pseudo-label screening: For each target domain sample, the classifier outputs the predicted probability distribution of the fault category, takes the category corresponding to the highest probability as the pseudo label of the sample, and records the corresponding highest probability value. The prediction entropy confidence level is calculated based on the entropy value of the predicted probability distribution. The lower the entropy value, the more certain the model prediction is, and the higher the confidence level is. The time-domain projection vector and the frequency-domain projection vector are normalized and fused. The cosine similarity between the fused vector and the prototype class corresponding to the pseudo-label of the sample is calculated and used as the prototype distance confidence. The higher the cosine similarity, the more consistent the sample features are with the existing prototype. The joint confidence score is obtained by multiplying the prediction entropy confidence score by the prototype distance confidence score. The pseudo-label of a sample is adopted as a reliable pseudo-label only when the joint confidence is greater than the first preset threshold and the predicted maximum probability is greater than the second preset threshold, and the sample is marked as a reliable sample. Step 4.3 Prototype Exponential Moving Average Update: Only the reliable samples selected in step 4.2 are used for class prototype updates; For each reliable sample, determine the fault category it belongs to based on its pseudo-label. If the prototype of the category has not yet been established in the corresponding stream, then directly initialize the prototype of the category with the projection vector of the current sample. If such a prototype has been established, it is updated using an exponential moving average method: the new prototype is obtained by weighting the old prototype and the current sample projection vector by a momentum coefficient, the momentum coefficient being close to 1, so that the prototype drifts to the new sample in a smooth and conservative manner. The time-domain stream and frequency-domain stream perform the above prototype update operations independently, respectively; Step 4.4 Cross-stream prototype consistency constraints: Take the common fault categories from the time-domain prototype set and the frequency-domain prototype set; Calculate the average cosine distance between the time-domain prototype and the frequency-domain prototype in the common category, and use this average distance as the cross-stream prototype consistency loss; This loss is used to force similar prototypes in two independent feature spaces to maintain a consistent orientation: when the prototype of any flow drifts due to the unidirectional drive of entropy minimization, the consistency loss generates a gradient pointing to that flow, pulling its prototype back to the direction consistent with the other flow. Step 4.5 Auxiliary loss calculation and parameter update: Entropy minimization loss: Calculate the entropy value for the predicted probability distribution of all target domain samples, sum them and divide by the batch size to make the model's prediction for each sample more deterministic; Calculate the weighted pseudo-label self-training loss: For the reliable samples selected in step 4.2, calculate the cross-entropy loss with joint confidence as the weight. The higher the joint confidence, the greater the contribution of the sample to the loss. The cross-stream prototype consistency loss, entropy minimization loss, and weighted pseudo-label self-training loss are weighted and summed according to preset weights to obtain the total loss function; An optimizer is used to minimize the total loss function, calculate the gradient, and update the model parameters. Step 4.6 Preheating Stage Control: The first few training cycles of passive adaptive training in the target domain are set as the warm-up phase. In this phase, only the entropy minimization loss calculation and parameter update in step 4.5 are performed. The pseudo-label screening in step 4.2, the prototype update in step 4.3, and the weighted pseudo-label self-training loss in step 4.5 are not performed temporarily to avoid the irreversible misleading of the model by the early low-quality pseudo-labels. Step 5: Iterative Adaptation and Optimal Model Selection One training cycle is defined as traversing all unlabeled samples in the target domain once. Steps 4.1 to 4.6 in step four are repeated until the preset maximum number of training cycles is reached. Since the target domain does not contain any class labels, the optimal cycle cannot be selected through the validation set during training. Therefore, the model parameters at the end of the final iteration cycle are taken as the optimal model. Step Six: Fault Diagnosis Output: Input the target domain test set samples into the optimal model obtained in step five, and the model outputs the fault category prediction result for each test sample; The diagnostic accuracy and macro average F1 score are used as performance evaluation metrics to output the final diagnostic results.
2. The method according to claim 1, characterized in that, In step 4.2, the prototype distance confidence is evaluated using the time-domain prototype first; if the time-domain prototype has not yet been established, the frequency-domain prototype is used instead; if neither the time-domain prototype nor the frequency-domain prototype has been established, the prototype distance confidence evaluation of the sample is temporarily skipped, and the sample is selected only based on the prediction entropy confidence.
3. The method according to claim 1, characterized in that, The momentum coefficient in step 4.3 is greater than 0.9 and less than 1, which limits the correction of the prototype by each newly arrived reliable sample to a small proportion. The cumulative effect of multiple samples enables the prototype to gradually track the changes in the distribution of the target domain data.
4. The method according to claim 1, characterized in that, The cross-stream prototype consistency loss in step 4.4 and the entropy minimization loss in step 4.5 form a synergistic mechanism: the entropy minimization loss provides a driving force for model adaptation, forcing the model to make a clear judgment on each target domain sample; the cross-stream prototype consistency loss provides a directional constraint for this driving force, preventing the unidirectional push of the entropy minimization loss from causing class collapse.
5. The method according to claim 1, characterized in that, The temporal encoder consists of multiple stacked one-dimensional convolutional layers with batch normalization and ReLU activation functions, followed by an adaptive average pooling layer, which outputs a fixed-length temporal feature vector. The frequency domain encoder uses a pre-trained ResNet18 as the backbone network, removes its last fully connected classification layer, and uses the vector after global average pooling as the frequency domain feature vector.
6. The method according to claim 1, characterized in that, Both the time-domain projection head and the frequency-domain projection head are two-layer structures consisting of a fully connected layer, a batch normalization layer, a ReLU activation function, and a fully connected layer. The two projection heads map the output of their respective encoders to a prototype space of the same dimension and perform L2 normalization on the projection vectors so that all projection vectors lie on the unit hypersphere.
7. The method according to claim 1, characterized in that, The first preset threshold is the lower limit of the joint confidence level, and the second preset threshold is the lower limit of the predicted maximum probability. The two thresholds together constitute the threshold for dual-standard screening. When a sample has a high predicted probability but its projection vector is far away from the corresponding class prototype, the joint confidence level is lower than the first preset threshold due to the low confidence level of the prototype distance. The sample will not be adopted, thereby blocking the spread of noise and false labels caused by systemic bias from the source.
8. The method according to claim 1, characterized in that, This method is applied to the fault diagnosis scenario of rolling bearings under multiple operating conditions. The changes in operating conditions between the source domain and the target domain include at least one of speed change and load change. The fault state includes at least one of normal state, rolling element fault, inner ring fault, outer ring fault and compound fault.