An unsupervised cross-condition fault diagnosis method based on edge guidance
By employing an edge-guided unsupervised cross-condition fault diagnosis method, this approach utilizes feature decoupling and edge loss mechanisms to address the problem of incorrect mapping of decision boundary edge samples in unsupervised domain adaptation. This achieves fine-grained feature alignment and improves the accuracy and generalization ability of fault diagnosis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-03
- Publication Date
- 2026-06-16
AI Technical Summary
Existing unsupervised domain adaptive methods in cross-condition fault diagnosis cause incorrect mapping of decision boundary edge samples due to forced global distribution alignment, resulting in the inability to achieve fine-grained alignment of the target domain and affecting classification accuracy.
An unsupervised cross-condition fault diagnosis method based on edge guidance is adopted. Through feature decoupling, knowledge distillation and edge loss mechanism, fine-grained feature alignment between the source domain and the target domain at the decision boundary is achieved, including feature extraction, knowledge distillation and edge loss calculation.
It significantly improves the model's generalization ability and the accuracy of fault identification in the target domain, achieving an average diagnostic accuracy of 87.7%, which is superior to existing methods.
Smart Images

Figure CN121614842B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial system fault diagnosis technology, and in particular, it is a cross-condition fault diagnosis method that utilizes edge guidance and knowledge distillation strategies. Background Technology
[0002] With the increasing complexity of modern industrial systems, the reliable operation of rotating equipment has become a crucial guarantee for industrial production safety and efficiency. Therefore, real-time predictive maintenance of rotating equipment is essential. Traditional fault diagnosis methods mainly rely on expert experience to build physical models or signal processing techniques, but they face significant challenges when dealing with complex operating conditions, multi-source interference, and nonlinear systems. Deep learning technology, with its powerful feature extraction and pattern recognition capabilities, has brought revolutionary breakthroughs to the field of fault diagnosis.
[0003] However, the practical application of these deep learning models is often hindered by significant differences in data distribution, especially when rotating machinery operates under variable speeds and dynamic loads for extended periods. This challenge has spurred in-depth research into unsupervised domain adaptation. Unsupervised domain adaptation is a branch of transfer learning that aims to leverage knowledge from labeled source domains to perform tasks in unlabeled target domains.
[0004] Unsupervised domain adaptation techniques for cross-domain fault diagnosis primarily rely on statistical metrics, domain adversarial approaches, and pseudo-label learning. While these methods are widely used, a core flaw in existing domain adaptation methods lies in their forced global distribution alignment. This strategy, while pursuing macro-domain invariance, often disrupts the fine-grained class-conditional structure crucial for accurate classification. During training, the model distorts the feature space to forcibly bridge the overall domain gap, easily leading to incorrect mapping of edge samples near the decision boundary. This process has a dual negative consequence: it not only prevents fine-grained alignment of the target domain but can also erode the existing classification accuracy of the source domain, resulting in performance degradation. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the prior art and propose an unsupervised cross-condition fault diagnosis method based on edge guidance. Through feature decoupling, knowledge distillation and edge loss mechanism, it specifically addresses the core problem that the forced global distribution alignment in traditional methods easily leads to incorrect mapping of edge samples at the decision boundary, and achieves fine-grained feature alignment between the source domain and the target domain at the decision boundary.
[0006] The technical problem solved by this invention is achieved through the following technical solution:
[0007] An edge-guided unsupervised cross-condition fault diagnosis method includes the following steps:
[0008] Step 1: Acquire labeled source domain vibration data, convert it into frequency domain amplitude spectrum through fast Fourier transform, input it into teacher network for training, and optimize it with cross-entropy loss function to obtain pre-trained teacher model;
[0009] Step 2: Input the source domain data and the unlabeled target domain data into the shared feature extractor of the main network simultaneously for preliminary feature extraction;
[0010] Step 3: Divide the features output by the shared feature extractor into a first part and a second part along the channel dimension; for the first part, use knowledge distillation loss to make it approximate the frequency domain features extracted by the teacher model; for the second part, use regularization loss to maximize its difference from the first part to enhance feature diversity.
[0011] Step 4: Fuse the first part of the features with the second part of the features, and input the fused features into the main classifier and the auxiliary classifier at the same time to obtain the fault category prediction results;
[0012] Step 5: Based on the prediction results of the main classifier and the auxiliary classifier, calculate the edge loss. By minimizing the feature difference between the source domain and the target domain near the decision boundary, fine-grained feature alignment is achieved.
[0013] Step 6: Apply the trained main network model to the vibration data of rotating machinery to achieve fault diagnosis.
[0014] Moreover, the teacher network feature extractor in step 1 and the shared feature extractor in step 2 use the same network structure, including a splicing structure of a one-dimensional convolutional neural network and a Transformer module.
[0015] Furthermore, the cross-entropy loss function in step 1 is optimized as follows:
[0016]
[0017] in These are the feature extractor and classifier in the teacher network, respectively. Expressing expectations, It is the cross-entropy loss function. It converts the source domain signal into an amplitude spectrum. For source domain signal data, The label is the one corresponding to the source domain signal data.
[0018] Furthermore, the specific implementation method of step 3 is to divide the features output by the shared feature extractor into a first part of features along the channel dimension. Second part features ,
[0019] The first part of the features is approximated to the frequency domain features extracted by the teacher model through knowledge distillation loss:
[0020]
[0021] in, This represents the main classifier and the shared feature extractor. It's about balancing hyperparameters. It is the distillation loss that makes the characteristics of the student network similar to those of the teacher network;
[0022] Features learned by maximizing the frequency domain and Regularize the distance between features by analyzing the divergence between them:
[0023] .
[0024] Furthermore, the specific implementation method of step 4 is to... and Fusion And input into the main classifier and auxiliary classifier The labeled source domain data is in the main classifier The cross-entropy function is used to ensure the classification performance of the master classifier in the source domain. For unlabeled target domain data, the classification is performed based on the master classifier. and auxiliary classifier Scoring will be conducted.
[0025] Furthermore, the specific implementation method of step 5 is as follows: the edge loss is constructed based on the principle of minimizing edge difference inconsistency, and adversarial training is achieved through a gradient reversal layer.
[0026]
[0027] in, For standard cross-entropy loss, To combine cross-entropy loss, This is the interval factor.
[0028] The advantages and positive effects of this invention are:
[0029] 1. This invention proposes a feature decoupling framework based on distillation learning, which guides the feature extractor to generate feature representations that are more robust to noise and changes in operating conditions through distillation learning, thereby significantly improving the generalization ability of the model.
[0030] 2. This invention proposes a method for guiding model training by calculating edge loss, which addresses the problem of incorrect edge feature mapping caused by over-focusing on overall metric features and achieves fine-grained alignment near the decision boundary;
[0031] 3. This invention proposes a strategy for fine-grained feature alignment based on a scoring function. By introducing an auxiliary classifier and a gradient inversion layer, it effectively improves the accuracy and generalization ability of fault identification in the target domain samples.
[0032] 4. Experimental verification shows that the present invention achieves an average diagnostic accuracy of 87.7% in multiple cross-domain fault diagnosis tasks, which is significantly better than existing mainstream methods. Attached Figure Description
[0033] Figure 1 This is a schematic diagram of the overall framework, i.e., an appendix to the abstract;
[0034] Figure 2 This is a schematic diagram of the algorithm.
[0035] Figure 3 Visualization of the feature distributions of DANN, MCD, DASAN, and the method of this invention;
[0036] Figure 4 for Feature layer in Clustering results diagram;
[0037] Figure 5 for Feature layer in Clustering results on;
[0038] Figure 6 For complete feature layers in Clustering results diagram;
[0039] Figure 7 For cross-domain fault diagnosis tasks , , , and The above figure shows the results of an ablation experiment on the three parts of the method proposed in this invention. Detailed Implementation
[0040] The present invention will be further described in detail below with reference to the accompanying drawings.
[0041] An edge-guided unsupervised cross-condition fault diagnosis method is proposed. The feature extractor extracts fault features from the raw signals in the source and target domains. A prototype alignment term is introduced after the feature extractor module to further align the distribution and improve the accuracy of target samples. A pseudo-label redefinition module aims to select high-confidence target domain samples and dynamically reduce noisy labels, ultimately achieving accurate fault type identification under varying operating conditions, such as... Figure 1 and Figure 2 As shown, it includes the following steps:
[0042] Step 1: Acquire labeled source domain vibration data, convert it into frequency domain amplitude spectrum through fast Fourier transform, input it into teacher network for training, and optimize it with cross-entropy loss function to obtain pre-trained teacher model.
[0043] This invention proposes an innovative feature extractor that cleverly combines the advantages of one-dimensional convolutional neural networks (CNNs) and Transformers. This hybrid design not only retains the powerful local feature capture capabilities of CNNs but also leverages the superior global feature and long-range dependency modeling capabilities of Transformers, thus achieving a comprehensive consideration of both global and local features of fault signals. This feature extractor will serve as the feature extraction network structure for both the teacher model and the main model.
[0044] The teacher network feature extractor cleverly combines the advantages of one-dimensional convolutional neural networks and Transformers. This hybrid design not only retains the powerful local feature capture capabilities of CNNs but also leverages the superior global feature and long-range dependency modeling capabilities of Transformers, thus achieving a comprehensive consideration of both global and local features of fault signals. This feature extractor will serve as the feature extraction network structure for both the teacher model and the main model.
[0045] The internally invariant features of rotating machinery within the spectrum are those directly related to classification, embedded only in each domain and unaffected by other domains. The teacher network uses the amplitude and frequency of the Fourier spectrum and class labels as input to obtain Fourier information features for classification. The teacher model is trained using the labeled source domain data transformed into an amplitude spectrum and then converged through a cross-entropy function.
[0046]
[0047] in These are the feature extractor and classifier in the teacher network, respectively. Expressing expectations, It is the cross-entropy loss function. It converts the source domain signal into an amplitude spectrum. For source domain signal data, The label is the one corresponding to the source domain signal data.
[0048] Step 2: Input the source domain data and the unlabeled target domain data into the shared feature extractor of the main network simultaneously for preliminary feature extraction.
[0049] Labeled source domain vibration data and unlabeled target domain vibration data are input together into the shared feature extractor. Feature extraction is performed. The first convolutional layer receives the one-dimensional raw vibration signal. As input to the model, after the fourth convolutional module, two Transformer layers are embedded to better capture global features. The main feature extractor extracts features as follows:
[0050]
[0051] in, Indicates the extracted features, It is a batch input matrix.
[0052] Step 3: Divide the features output by the shared feature extractor into a first part and a second part along the channel dimension; for the first part, use knowledge distillation loss to make it approximate the frequency domain features extracted by the teacher model; for the second part, use regularization loss to maximize its difference from the first part to enhance feature diversity.
[0053] The specific implementation method of step 3 is to divide the features output by the shared feature extractor into the first part of the features along the channel dimension. Second part features ,
[0054] The first part of the features is approximated to the frequency domain features extracted by the teacher model through knowledge distillation loss:
[0055]
[0056] in, This represents the main classifier and the shared feature extractor. It's about balancing hyperparameters. It is the distillation loss that makes the characteristics of the student network similar to those of the teacher network;
[0057] Features learned by maximizing the frequency domain and Regularize the distance between features by analyzing the divergence between them:
[0058] .
[0059] Step 4: Fuse the first part of the features with the second part of the features, and input the fused features into the main classifier and the auxiliary classifier at the same time to obtain the fault category prediction results.
[0060] The specific implementation method of step 4 is as follows: and Fusion And input into the main classifier and auxiliary classifier The labeled source domain data is in the main classifier The cross-entropy function is used to ensure the classification performance of the master classifier in the source domain. For unlabeled target domain data, the classification is performed based on the master classifier. and auxiliary classifier Scoring will be conducted.
[0061] Step 5: Based on the prediction results of the main classifier and the auxiliary classifier, calculate the edge loss and achieve fine-grained feature alignment by minimizing the feature difference between the source domain and the target domain near the decision boundary.
[0062] The edge loss is constructed based on the principle of minimizing edge difference inconsistency, and adversarial training is achieved through a gradient inversion layer.
[0063] The margin loss is calculated as follows: the margin between data points and the classification surface plays a crucial role in achieving strong generalization performance. Therefore, to obtain a classification model with good generalization ability, a margin-based classification theory has been developed. In this theory, the 0-1 loss is replaced by the margin loss. The hypothetical classifier is defined. In the tag example The edge at that location is:
[0064]
[0065] Assumption The corresponding edge loss and empirical edge loss are:
[0066]
[0067]
[0068] in The empirical edge loss, representing a combination of functions, is calculated by multiplying the average edge size per sample by the edge itself. This means:
[0069]
[0070] Among them, through control The size of the edge is controlled by the size of the edge.
[0071] In traditional classification problems, the 0-1 difference is used to measure the expected 0-1 difference between two hypothetical classifiers.
[0072]
[0073] in It's an indicator function that takes the value 1 when the condition inside the parentheses is true, and 0 otherwise. The empirical 0-1 difference is determined by the condition within a given sample set. Average inconsistency on:
[0074]
[0075] Given a hypothesis space and a specific classifier ,Depend on The inconsistency caused by the difference is defined as:
[0076]
[0077] Where P represents the source domain data and Q represents the target domain data, and the classifier is calculated. and The probability of inconsistency between the predictions in the source and target domains quantifies the difference between them. Similarly, its empirical expression is:
[0078]
[0079] To extend the concept of 0-1 difference to scoring functions and marginal losses, marginal differences are introduced. For scoring functions... and the margin The inconsistency of marginal differences is defined as follows:
[0080]
[0081] Similarly, his experience can be expressed as:
[0082]
[0083] Marginal Difference Inconsistency (MDD) is well-defined because Furthermore, it satisfies nonnegativity and subadditivity. Despite the asymmetry, MDD can still measure distributional differences in domain adaptation. Using the inconsistency of marginal differences to measure the distributional differences between two domains is superior to measuring them using the traditional 0-1 distribution. The metric method can solve the problems of non-differentiability and non-trainability of Ben-David theory, as follows, for each scoring function:
[0084]
[0085] in The true difference in the target domain, It is the edge error in the source domain. It assumes the existence of an optimal model that achieves the minimum total error in both the source and target domains.
[0086] Therefore, the optimization problem for initialization is:
[0087]
[0088] Because the definition of MDD includes a maximization term. Minimizing the objective function directly constitutes a mini-maximum game. To achieve domain adaptation based on feature representation, the algorithm introduces a shared feature extractor. The goal is to learn a new data representation that minimizes the mean squared deviation (MDD) under this representation. An auxiliary classifier is also introduced. With the main classifier And by an auxiliary classifier To maximize MDD, the main classifier F performs classification tasks on the source domain data and provides the overall optimization scheme as follows:
[0089]
[0090] Combination cross-entropy loss was used to approximate the theoretical MDD, hoping to improve the performance of the MDD in the source domain. We use standard cross-entropy loss to calculate a portion of the classification error and variance divergence, while in the target domain. Use a modified cross-entropy loss This modification aims to alleviate the problem of gradient explosion or vanishing in adversarial learning.
[0091] Main classifier Minimize source domain classification loss And MDD:
[0092]
[0093] in, Hyperparameters are used to measure the impact of differences on overall model training.
[0094] Auxiliary classifier Maximize MDD and drive the feature extractor through a gradient inversion layer. Inter-domain invariant features:
[0095]
[0096] in, For standard cross-entropy loss, To correct the cross-entropy loss, This is the interval factor.
[0097] Combining the feature decoupling framework, the overall loss is:
[0098]
[0099] in, To approximate the theoretical MDD using the combined cross-entropy loss, These are the hyperparameters corresponding to the loss.
[0100] By training and iterating 300 times based on the overall loss calculated by the auxiliary classifier, a deep learning model that maintains high accuracy in both the source and target domains can be obtained.
[0101] Based on the aforementioned edge-guided unsupervised cross-condition fault diagnosis method, the following experiments were conducted to demonstrate the effectiveness of the present invention.
[0102] During the experimental verification process, seven models were selected for comparison with this invention: Correlation Alignment (CORAL), Domain Adversarial Neural Network (DANN), Deep Convolutional Transfer Learning Network (DCTLN), Linear Stacking Network (ISTEL), Multi-Kernel Maximum Mean Difference (MKMMD), Maximum Classifier Difference (MCD), and Deep Adversarial Subdomain Adaptive Network (DASAN) to obtain more convincing verification results. To ensure a fair comparison, the feature extractors, health status classifiers, and optimizers of these models were kept consistent with those in this invention; the network parameters are detailed in Table 1.
[0103] Table 1
[0104]
[0105] This invention utilizes the gearbox failure dataset published at the IEEE International Conference on Predictive and Health Management (PHM) 2009. The test setup used in the experiment is a typical industrial gearbox, comprising 3 drive shafts, 4 gears, and 6 bearings.
[0106] This dataset collects vibration signals from spur gears, corresponding to four different shaft speed conditions (30Hz, 35Hz, 40Hz, and 45Hz). Specific fault types are detailed in Table 2. The symbols in the table represent: S: input shaft, IS: input side, ID: idling shaft, OS: output shaft, OSD: output side, G: normal, C: debris, E: eccentricity, Br: damage, B: ball, In: inner ring, O: outer ring, Im: imbalance, Ks: keyway shearing. All collected raw signals were segmented, with each sample having a fixed length of 1024 data points. For each fault type, 260 samples were generated for each operating condition.
[0107] To systematically evaluate the performance of cross-domain transfer learning, this study randomly paired four different axis speed conditions to form a total of 12 cross-domain diagnostic tasks. For example, in Task 12, denoted as "30Hz→35Hz", the data under the 30Hz condition was used as the source domain, while the data under the 35Hz condition was used as the target domain.
[0108] Table 2
[0109]
[0110] First, the method proposed in this invention is compared with several domain-adaptive methods, including DANN, MKMMD, CORAL, DCTLN, MCD, and DASAN. Each model was evaluated through 10 independent trials to obtain reliable results. The experimental results are shown in Table 3. From these results, the following conclusions can be drawn: 1) The model proposed in this invention achieves an average diagnostic accuracy of 87.7%, significantly exceeding the leading methods in fault diagnosis, LSETL (82.08%) and DASAN (83.83%). Compared with the classic adversarial learning methods DANN and MCD, EGDA improves the diagnostic accuracy by 6.62% and 3.13%, respectively. This indicates that the method proposed in this invention effectively mitigates the distributional differences between working conditions and improves the diagnostic accuracy.
[0111] Table 3
[0112]
[0113] To further demonstrate the effectiveness of the proposed model and provide an intuitive understanding, it is applied in cross-domain fault diagnosis tasks. and The t-SNE technique is then used to visualize the feature distribution learned by the model. Figure 3 The feature distribution visualizations of DANN, MCD, DASAN, and the method of this invention are shown. It can be seen that, compared with other methods, this invention achieves effective alignment of the source domain and target misclassification level, and shows fewer misclassifications, demonstrating better diagnostic accuracy and generalization performance. Figure 4 and Figure 5 This invention is demonstrated Feature layer and Feature layer in The clustering results show a shift in features. Figure 6 For the complete feature layer of the model in The clustering results on the above indicate that in and By maximizing feature differences, the complete method can form a more defined and stable cluster structure. This performance improvement is mainly attributed to the implementation of granular alignment. Overall, the edge-based alignment method demonstrates significantly better generalization performance and robustness than other methods in cross-domain fault diagnosis tasks.
[0114] To verify the effectiveness of the proposed edge-guided unsupervised cross-condition fault diagnosis method, a cross-domain fault diagnosis task was performed. , , , and The three parts of the method proposed in this invention were subjected to ablation experiments. The experimental results are as follows: Figure 7 As shown, introducing only distillation loss yields limited performance improvement and, in some cases, even performance degradation. Conversely, introducing a regularization term significantly improves both the model's performance and stability.
[0115] It should be emphasized that the embodiments described in this invention are illustrative rather than limiting. Therefore, this invention includes, but is not limited to, the embodiments described in the specific implementation. Any other implementations derived by those skilled in the art based on the technical solutions of this invention are also within the scope of protection of this invention.
Claims
1. An unsupervised cross-condition fault diagnosis method based on edge guidance, characterized in that, Includes the following steps: Step 1: Acquire labeled source domain vibration data, convert it into frequency domain amplitude spectrum through fast Fourier transform, input it into teacher network for training, and optimize it with cross-entropy loss function to obtain pre-trained teacher model; Step 2: Input the source domain data and the unlabeled target domain data into the shared feature extractor of the main network simultaneously for preliminary feature extraction; Step 3: Divide the features output by the shared feature extractor into a first part and a second part along the channel dimension; for the first part, use knowledge distillation loss to make the features of the student network approximate the frequency domain features extracted by the teacher model; for the second part, use regularization loss to maximize its difference from the first part to enhance feature diversity. Step 4: Fuse the first part of the features with the second part of the features, and input the fused features into the main classifier and the auxiliary classifier at the same time to obtain the fault category prediction results; Step 5: Based on the prediction results of the main classifier and the auxiliary classifier, calculate the edge loss. By minimizing the feature difference between the source domain and the target domain near the decision boundary, fine-grained feature alignment is achieved. Step 6: Apply the trained student network to the vibration data of rotating machinery to achieve fault diagnosis. The student network includes a shared feature extractor, a main classifier, and an auxiliary classifier.
2. The unsupervised cross-condition fault diagnosis method based on edge guidance according to claim 1, characterized in that, The teacher network feature extractor in step 1 and the shared feature extractor in step 2 use the same network structure, which includes a splicing structure of a one-dimensional convolutional neural network and a Transformer module.
3. The unsupervised cross-condition fault diagnosis method based on edge guidance according to claim 1, characterized in that, The cross-entropy loss function in step 1 is optimized as follows: in These are the feature extractor and classifier in the teacher network, respectively. Expressing expectations, It is the cross-entropy loss function. It converts the source domain signal into an amplitude spectrum. For source domain signal data, The label is the one corresponding to the source domain signal data.
4. The unsupervised cross-condition fault diagnosis method based on edge guidance according to claim 1, characterized in that, The specific implementation method of step 3 is to divide the features output by the shared feature extractor into a first part of features along the channel dimension. Second part features , The first part of the features is approximated to the frequency domain features extracted by the teacher model through knowledge distillation loss: in, This represents the main classifier and the shared feature extractor. It's about balancing hyperparameters. It is the distillation loss that makes the characteristics of the student network similar to those of the teacher network; Features learned by maximizing the frequency domain and Regularize the distance between features by analyzing the divergence between them: 。 5. The unsupervised cross-condition fault diagnosis method based on edge guidance according to claim 1, characterized in that, The specific implementation method of step 4 is to maximize the features learned by frequency domain guidance. and Fusion And input into the main classifier and auxiliary classifier The labeled source domain data is in the main classifier The cross-entropy function is used to ensure the classification performance of the master classifier in the source domain. For unlabeled target domain data, the classification is performed based on the master classifier. and auxiliary classifier Scoring will be conducted.
6. The unsupervised cross-condition fault diagnosis method based on edge guidance according to claim 1, characterized in that, The specific implementation method of step 5 is as follows: the edge loss is constructed based on the principle of minimizing edge difference inconsistency, and adversarial training is achieved through a gradient inversion layer. in, For standard cross-entropy loss, To combine cross-entropy loss, This is the interval factor.
Citation Information
Patent Citations
Diagnostic report generation method and device and medium
CN118136200A
Bearing unbalance fault diagnosis method and system cooperatively guided by double classifiers
CN119827155A