A continuous unsupervised domain adaptation fault diagnosis method

Through the continuous unsupervised domain adaptation fault diagnosis method, using source domain data pre-training and feature knowledge distillation, the adaptability and forgetting problems of deep learning models when data distribution drifts are solved, and efficient fault diagnosis in industrial scenarios is achieved.

CN119226888BActive Publication Date: 2025-10-03ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411370323.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-10-03
Estimated Expiration
2044-09-29

AI Technical Summary

Technical Problem

Existing fault diagnosis models based on deep learning and transfer learning have difficulty adapting to distribution changes and cannot avoid knowledge forgetting when faced with continuous drift in data distribution in industrial scenarios, resulting in insufficient reliability and generalization in practical applications.

Method used

A continuous unsupervised domain adaptation fault diagnosis method is adopted. Through a prototype comparative learning strategy based on metric and representation learning, the fault diagnosis model is pre-trained using source domain data. Combined with source feature knowledge distillation and local domain alignment, continuous domain adaptation to the target domain is achieved to avoid knowledge forgetting.

Benefits of technology

When faced with data distribution drift, the fault diagnosis model can quickly adapt to the new data distribution while maintaining performance on the historical data distribution, avoiding knowledge forgetting and improving the reliability and generalization ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226888B_ABST
    Figure CN119226888B_ABST
Patent Text Reader

Abstract

The present invention discloses a continuous unsupervised domain adaptation fault diagnosis method. The method collects source and target domain fault data of rotating machinery and equipment. A prototype comparative learning strategy based on metric and representation learning is adopted to pre-train a fault diagnosis model with source domain data to obtain a uniformly partitioned unit hypersphere feature space. The fault diagnosis model includes a feature extractor and a cosine similarity classifier. The prototypes obtained from the source domain pre-training are frozen, and the fault diagnosis model is supervised trained with the source domain data to achieve continuous domain adaptation to the target domain. Source feature knowledge distillation and local domain alignment are performed to maximize the mutual information loss between features and prototypes. The fault diagnosis model is supervised trained with the source domain data. After the fault diagnosis model completes learning for all current target domains, it is applied to actual fault diagnosis. The present invention can quickly and effectively adapt to new data distributions while maintaining the model's performance on historical data distributions, thus avoiding knowledge forgetting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of industrial fault diagnosis and deep learning, and in particular to a continuous unsupervised domain adaptation fault diagnosis method. Background Art

[0002] Intelligent fault diagnosis is crucial to ensuring industrial safety and reliability. With the advent of Industry 4.0, modern industry has accumulated a large amount of data, and data-driven deep learning methods have been widely used in intelligent fault diagnosis.

[0003] Currently, most intelligent fault diagnosis research is inspired by the automatic feature extraction of deep learning, combining large amounts of fault data to achieve high-precision fault diagnosis. Deep learning-based fault diagnosis methods must meet the assumption that training and test data are independent and identically distributed, and they must collect comprehensive fault data to ensure reliable diagnosis. While they can achieve high accuracy in simulation or laboratory conditions, these two conditions are difficult to meet in real-world industrial scenarios, resulting in insufficient reliability and generalizability.

[0004] In actual industrial scenarios, the condition monitoring of industrial systems is often real-time, life-cycle, and full-cycle. Industrial data is collected in streams, dynamically providing real-time status information to monitoring and diagnostic systems. The complex and ever-changing operating conditions of industrial systems can cause the historical data used for model training and the real-time data used for testing to follow different distributions, thus failing to meet the independent and identically distributed (IID) condition. When encountering new operating conditions, model failures can significantly reduce reliability, and re-labeling and training new data incurs significant time, financial, and labor costs. When conducting real-time, life-cycle condition monitoring, the dimension of state information increases over time, and the data distribution continues to expand. Improving the generalization capabilities of fault diagnosis deep learning models to meet diagnostic needs in dynamic scenarios is a current research hotspot and challenge.

[0005] Transfer learning, with its ability to mine and transfer knowledge across domains and distributions, can, to a certain extent, overcome the identical distribution assumption of deep learning models and enable cross-domain intelligent fault diagnosis. Therefore, it has greater generalization than deep learning. However, transfer learning still has certain limitations. Transfer learning must be implemented between a limited number of specified domains and cannot handle the non-identically distributed state information generated by continuously changing operating conditions. Furthermore, knowledge transfer is typically one-time and unidirectional, inevitably leading to knowledge forgetting. This makes it difficult to master knowledge for all tasks and prevents continuous and incremental learning of state knowledge from the continuous stream of industrial big data.

[0006] In actual situations, due to the complexity and variability of operating conditions, the distribution of collected data will inevitably continue to drift. Existing fault diagnosis methods are often difficult to adapt to the distribution changes and unlabeled target domain data, while maintaining the performance of the model on the historical data distribution and avoiding the occurrence of knowledge forgetting. Summary of the Invention

[0007] Aiming at the deficiency that existing fault diagnosis models based on deep learning and transfer learning cannot solve the problem of continuous drift of data distribution, the present invention proposes a continuous unsupervised domain adaptation fault diagnosis method.

[0008] The specific technical solutions are as follows:

[0009] A continuous unsupervised domain adaptation fault diagnosis method includes the following steps:

[0010] S1: Obtain source domain and target domain fault data of rotating machinery equipment. The labeled source domain is represents the i-th source domain fault sample, express There are C categories of corresponding labels; N s represents the total number of source domain samples; the unlabeled target domain is T t represents the t-th target domain, represents the j-th target domain fault sample in the t-th target domain, represents the total number of samples in the t-th target domain;

[0011] S2: A prototype contrast learning strategy based on metric and representation learning is adopted. The prototype contrast learning strategy includes the inter-instance contrast loss achieved through supervised information noise contrast estimation and the instance-prototype contrast loss achieved through cross entropy loss. The fault diagnosis model is pre-trained with source domain data to obtain a uniformly divided unit hypersphere feature space. The fault diagnosis model includes a feature extractor and a cosine similarity classifier. The cosine similarity classifier is composed of multiple prototypes. Composition, p c represents the prototype of the cth class, ||p c ||2=1;

[0012] S3. Adapting target domain data using source domain data: Freeze the prototypes obtained from source domain pre-training and perform supervised training on the fault diagnosis model using source domain data to achieve continuous domain adaptation to the target domain. Perform source feature knowledge distillation and local domain alignment, maximize the mutual information loss between features and prototypes, and perform supervised training on the fault diagnosis model using source domain data.

[0013] S4: After the fault diagnosis model completes the learning of all current target domains, it is applied to actual fault diagnosis.

[0014] Furthermore, the fault diagnosis model θ(x)=g(f(x)) includes a feature extractor and a classifier Where m represents the output dimension of the feature extractor; the feature extractor is used to extract the fault sample features of the source domain and the target domain, and the feature extractor f θ The extracted features are expressed as h = f θ (x), h is the unit hypersphere feature space F m The unit vector in ,||h||2=1; the classifier g θ is the cosine similarity classifier.

[0015] Furthermore, in S2, the expression of the contrast loss between instances is as follows:

[0016]

[0017] in, is the feature extractor of the fault diagnosis model trained in the source domain; x + is a positive sample, the label is the same as x i Same; x - is a negative sample, the label is the same as x i Different; τ is a temperature parameter used to adjust the degree of smoothing;

[0018] The expression of the contrast loss between the instance and the prototype is as follows:

[0019]

[0020] in, Indicates the yth i The prototype of the class, and it is a positive prototype, its label is the same as x i same; Represents the prototype of the cth class, and is a negative prototype, whose label is the same as x i different;

[0021] The overall loss function L for source domain pre-training s The expression is as follows:

[0022]

[0023] Among them, L IPC Represents the IPC loss function, L IIC represents the loss function of IIC, represents the mean function; α is a hyperparameter.

[0024] Furthermore, in S3, the loss function expression of the target domain continuous domain adaptation is as follows:

[0025]

[0026] Where, L CE represents the cross entropy loss, L FKD represents the source feature knowledge distillation loss, L MIM represents the mutual information loss, L LDA represents the local domain alignment loss; β(e) represents the balance parameter, Where e is the current number of training times, and M is the total number of training times, which are set manually.

[0027] Furthermore, the cross entropy loss L CE The expression is as follows:

[0028]

[0029] Where, represents the mean function, represents the source domain data x extracted by the fault diagnosis model trained in the tth target domain i Features, is the cth element in the one-hot label of the i-th source domain fault sample in the source domain, and σ represents the softmax function.

[0030] Furthermore, the source feature knowledge distillation loss L FKD The expression is as follows:

[0031]

[0032] Where, represents the mean function, represents the source domain data x extracted by the fault diagnosis model trained in the tth target domain i Features, represents the source domain data x extracted by the fault diagnosis model trained in the t-1th target domain i characteristics.

[0033] Furthermore, in S3, the local domain alignment loss L LDA The expression is as follows:

[0034]

[0035] Where, represents the mean function, f θt (x i ) represents the source domain data x extracted by the fault diagnosis model trained in the tth target domain i The characteristics of f θt (x j ) represents the source domain data x extracted by the fault diagnosis model trained in the tth target domainj characteristics; is the target domain data x j Pseudo-label of and The maximum mean difference between them; φ represents the mapping function to the reproducing kernel Hilbert space H, ||·|| H represents the norm in H.

[0036] Furthermore, in S3, the mutual information loss L MIM The expression is as follows:

[0037]

[0038] Where, represents the mean function, represents the source domain data x extracted by the fault diagnosis model trained in the tth target domain j The features of , σ represents the softmax function, and KL represents the Kullback-Leibler divergence.

[0039] A continuous unsupervised domain adaptation fault diagnosis device, used to implement the continuous unsupervised domain adaptation fault diagnosis method, comprising: a fault database acquisition module, a source domain pre-training module, a target domain adaptation module, and a fault diagnosis module;

[0040] The fault database acquisition module is used to collect source domain and target domain fault data of rotating mechanical equipment;

[0041] The source domain pre-training module is used to pre-train the fault diagnosis model based on the source domain data to obtain a uniformly divided unit hypersphere feature space;

[0042] The target domain adaptation module is used to adapt the target domain data according to the source domain data to obtain a trained fault diagnosis model;

[0043] The fault diagnosis module is used to apply the trained fault diagnosis model to actual fault diagnosis.

[0044] The beneficial effects of the present invention are:

[0045] The fault diagnosis method provided by the present invention takes into account the problem of continuous data distribution drift caused by changes in working conditions in actual scenarios. By using existing or laboratory-collected source domain data with complete labels, the fault diagnosis model can continuously adapt to the distribution changes and unlabeled target domain data. The present invention does not require labeling for the new data distribution (i.e., the new target domain). Under the premise of strictly protecting the privacy of sensitive fault data, it does not require historical data to be memorized and replayed or re-jointly trained. It can quickly and effectively adapt to the new data distribution while maintaining the performance of the model on the historical data distribution, avoiding the occurrence of knowledge forgetting.

[0046] The present invention combines continuous learning and unsupervised domain adaptation methods to construct a diagnostic model that continuously accumulates and reuses knowledge to adapt to the fault diagnosis needs of continuous drift of data distribution caused by changes in working conditions, and establishes a continuous fault diagnosis model with greater reliability, generalization and versatility. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 4 is a flow chart of a method for continuous unsupervised domain adaptation fault diagnosis in an embodiment of the present invention.

[0048] Figure 2 Schematic diagram of the structure of rotating mechanical equipment for obtaining a bearing fault diagnosis data set in an embodiment of the present invention. DETAILED DESCRIPTION

[0049] The present invention will be described in detail below based on the accompanying drawings and preferred embodiments. The purpose and effects of the present invention will become more apparent. The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining the present invention and are not intended to limit the present invention.

[0050] Before further describing the embodiments of the present invention in detail, the nouns and terms involved in the embodiments of the present invention are explained. The nouns and terms involved in the embodiments of the present invention are subject to the following explanations.

[0051] (1) Source Domain: This refers to the dataset or domain on which the model is pre-trained. The source domain typically contains a large number of data samples with clear labels or supervisory information. These samples are used to train and build the starting model, enabling the model to learn effective features and patterns. The source domain can be a task, a domain, or a dataset, depending on the application scenario.

[0052] The target domain refers to the new dataset or domain to which the model will be applied. In the target domain, there are typically only a few labeled samples or no labeled samples at all (i.e., in the case of unsupervised learning). In the present invention, the target domain has no labeled samples at all. The target domain can be a different task, domain, or dataset than the source domain.

[0053] In transfer learning and domain adaptation, the source and target domains may differ in data distribution, feature distribution, and category distribution. This paper addresses this data distribution difference. The source domain is the starting point for knowledge transfer. The knowledge and features learned by the model in the source domain are transferred to the target domain to improve the model's performance in the target domain.

[0054] (2) Catastrophic forgetting refers to the phenomenon in the field of deep learning and artificial intelligence that when a neural network encounters a new task during incremental learning or continuous learning, it often significantly forgets the task knowledge it has learned previously.

[0055] (3) Continuous Learning. When building a unified network model or gradually adding new features to the network model, it is usually assumed that the training data for all tasks is always available. However, as the number of tasks increases, storing and retraining such data becomes infeasible. To address the problem of unavailability of training data for existing features when adding new features to the network model, a continuous learning method is proposed. This method only uses the new task data to train the network while retaining the original features.

[0056] (4) Source Hypothesis Transfer (SHOT), a framework for unsupervised domain adaptation, aims to address the domain adaptation problem when there is no labeled data in the target domain and the source domain data is not directly accessible. SHOT leverages the knowledge learned from a labeled source dataset to solve a similar task in a new unlabeled target domain.

[0057] (5) Mutual Information, an important concept in information theory, is used to measure the shared information or correlation between two random variables. Specifically, mutual information can be viewed as the amount of information contained in one random variable about another random variable, or the uncertainty of one random variable reduced by knowing another random variable.

[0058] Based on the above architecture, the embodiment of the present invention proposes a continuous unsupervised domain adaptation fault diagnosis method, which is applied to the diagnosis of rotating mechanical equipment faults, such as Figure 1 As shown, the specific steps include:

[0059] S1: Build a rotating machinery equipment fault database: Collect source domain and target domain fault data of rotating machinery equipment. The labeled source domain is represents the i-th source domain fault sample, express The corresponding label, That is, there are C categories of labels; s represents the source domain, N s Represents the total number of source domain samples.

[0060] The unlabeled target domain is T t represents the t-th target domain, represents the jth target domain fault sample in the tth target domain. Its corresponding label category is unknown, but should be within the label range limited by the source domain, that is, it belongs to {0, 1, …, C-1}; represents the total number of samples in the t-th target domain.

[0061] S2: Using source domain data with sufficient labels Pre-train the fault diagnosis model to obtain a uniformly divided unit hypersphere feature space O m .

[0062] The fault diagnosis model θ(x) = g(f(x)) consists of two parts: a feature extractor and a classifier Where m represents the output dimension of the feature extractor. The feature extractor is used to extract the fault sample features of the source domain and the target domain. The feature extractor f θ The extracted features are expressed as h = f θ (x), h is the unit hypersphere feature space F m The unit vector in , that is, through L2 normalization, ||h||2=1. Classifier g θ Is a cosine similarity classifier consisting of multiple prototypes Composition, where p c represents the prototype of the cth class, c=0,1,…,C-1,||p c ||2=1.

[0063] Specifically, a prototype contrast learning strategy based on metric and representation learning is adopted to obtain a uniformly divided unit hypersphere feature space O m , in order to improve the generalization performance of the fault diagnosis model, thereby better adapting to the target domain in the future. The prototype contrast learning strategy consists of two parts: instance-to-instance contrast loss (IIC) and instance-to-prototype contrast loss (IPC).

[0064] IIC is achieved through supervised information-noise contrast estimation to encourage instances of the same category to be close to each other. The specific definition is as follows:

[0065]

[0066] in, is the feature extractor of the fault diagnosis model trained in the source domain; x + is a positive sample, the label is the same as x i Same; x - is a negative sample, the label is the same as x i Different (i.e. its value can be x i All labels except the corresponding label); τ is a temperature parameter used to adjust the degree of smoothing.

[0067] IPC is implemented through cross entropy (CE) loss, which aims to pull instances (in the source domain, that is, source domain fault samples) towards similar prototypes. The specific definition is as follows:

[0068]

[0069] in, Indicates the yth i The prototype of the class, and it is a positive prototype, its label is the same as x i same; Represents the prototype of the cth class, and is a negative prototype, whose label is the same as x i different.

[0070] The overall loss function L for source domain pre-training s The expression is as follows:

[0071]

[0072] Among them, L IPC Represents the IPC loss function, L IIC represents the loss function of IIC, represents the mean function; α is a hyperparameter used to balance the two parts of the overall loss function.

[0073] In the feature space F m In the example, IIC is used to align instances of the same category, and instances of different categories are kept away from each other, so that the feature clusters of each category are compact and evenly separated from each other; IPC is used to align instances with prototypes of the same category and keep them away from prototypes of different categories, so that each instance is close to the prototype of its own category and away from the prototypes of other categories. That is, the instance features from class c should be clustered on the prototype p. cAround, and the distance between the prototypes of each category is as far as possible, thus establishing a uniformly divided unit hypersphere feature space O m .

[0074] O m The establishment of reduces the misclassification probability in unseen instances (i.e., target domain), thereby improving the generalization performance of the fault diagnosis model. At the same time, the initial distribution information of the source domain is retained in the prototype for no-forget adaptation.

[0075] S3: Using source domain data Adapting to target domain data This is achieved through the following sub-steps:

[0076] (S3.1) Based on source hypothesis transfer, the prototype obtained by pre-training in the source domain is frozen to fix the established feature space, strictly protect data privacy, and no memory replay is required.

[0077] Specifically, the source hypothesis transfer assumes that the classifier trained in the source domain, i.e., the prototype, encodes the distribution information of the source domain data. By freezing the prototype, the uniformly divided unit hypersphere feature space O containing the source domain knowledge is m is fixed as an anchor point, and the subsequent target domain is aligned towards the anchor point. (S3.2) The fault diagnosis model is supervised and trained with source domain data to achieve continuous domain adaptation to the target domain.

[0078] Overall loss function for continuous domain adaptation in the target domain The expression is as follows:

[0079]

[0080] Where, L CE represents the cross entropy loss, L FKD represents the source feature knowledge distillation loss, L MIM represents the mutual information loss, L LDA represents the local domain alignment loss; β(e) represents the balance parameter, which is used to balance the local domain alignment loss and the mutual information loss. Where e is the current number of training times, and M is the total number of training times, which are set manually.

[0081] (1) Cross entropy loss L CE The expression is as follows:

[0082]

[0083] Where, is the cth element in the one-hot label of the i-th source domain fault sample in the source domain.

[0084] (2) Source feature knowledge distillation loss L FKDThe expression is as follows:

[0085]

[0086] Where, represents the source domain data x extracted by the fault diagnosis model trained in the tth target domain i Features, represents the source domain data x extracted by the fault diagnosis model trained in the t-1th target domain i characteristics.

[0087] Source feature knowledge distillation is achieved through measurement and The cosine similarity between them is used to ensure that the fault diagnosis model does not forget the knowledge of the old domain when adapting to the new target domain.

[0088] Using source domain data as a proxy for source feature knowledge distillation can maintain the distribution information of the unseen historical domain, thereby preventing catastrophic forgetting. At the same time, source feature knowledge distillation can also strictly protect data privacy without the need for memory replay. Specifically, ideally, the target domain to anchor point alignment assumption is successful, which means that the feature distribution of each target domain is sufficiently similar to the original feature distribution of the source domain. Under this assumption, the privacy of historical target domain data can be strictly protected. There is no need to retain a portion of the historical target domain data for memory replay. Instead, the source domain features can be used as a proxy, and the source domain features of the previous fault diagnosis model (i.e., the fault diagnosis model trained on the previous target domain) can be used to constrain the historical target domain features of the current fault diagnosis model to remain unchanged. That is, source feature knowledge distillation is used to maintain the distribution information of the unseen historical domain to prevent catastrophic forgetting.

[0089] (3) Local domain alignment is achieved using distance metric methods to minimize the domain difference between the source domain and the target domain. Local domain alignment loss L LDA The expression is as follows:

[0090]

[0091] Where, is the target domain data x j Pseudo-label of and The maximum mean difference between (i.e., domain difference) is expressed as follows:

[0092]

[0093] Where φ represents the mapping function to the reproducing kernel Hilbert space H, ||·|| H represents the norm in H.

[0094] Local domain alignment can align the distribution of the source domain and the target domain in each class, which has better performance but poor stability. Therefore, it is necessary to coordinate the mutual information loss with the balanced parameters.

[0095] (4) Maximize the mutual information between features and prototypes to reduce the uncertainty of features; mutual information loss L MIM The expression is as follows:

[0096]

[0097] Where σ represents the softmax function and KL represents the Kullback-Leibler divergence.

[0098] Maximizing mutual information can reduce the uncertainty of target domain features. In the feature space, the target domain features are as close as possible to the prototype of the corresponding class to ensure the compactness of each cluster and avoid training fluctuations or even collapse caused by uncertainty.

[0099] S4: After completing the learning of all current target domains, the fault diagnosis model is applied to actual fault diagnosis.

[0100] In particular, data from all learned domains can be used to test the performance of the fault diagnosis model on new and old domains, verifying its ability to continuously adapt to domains and overcome catastrophic forgetting. Specifically:

[0101] After completing the adaptation of the t-th target domain, the fault diagnosis model needs to perform well on all learned domains, so the test data should contain The data on the network are used to verify the ability of the fault diagnosis model to continuously adapt to the domain and overcome catastrophic forgetting. Assuming that each domain (including the source domain and the target domain, where the source domain is represented as the 0th domain and the target domains are arranged in sequence) corresponds to a training stage, the fault diagnosis model is tested on all domains after the training of each stage. In this case, an accuracy matrix can be obtained to evaluate the performance of the fault diagnosis model on all domains. The accuracy matrix is ​​expressed as T represents the total number of target domains.

[0102] Specific evaluation indicators include Average Accuracy (ACC), Backward Weight Transfer (BWT), and Average Adaptation Degree (AAD). The expressions of the evaluation indicator parameters are as follows:

[0103]

[0104] Where R T,trepresents the accuracy of the fault diagnosis model trained on the T domain and tested on the t domain, R t,t represents the accuracy of the fault diagnosis model trained on the t domain and tested on the t domain.

[0105] The larger the ACC and AAD are, and the closer the BWT is to zero, the better the fault diagnosis model's ability to continuously adapt to the domain and overcome catastrophic forgetting is, and the higher the accuracy is.

[0106] The following combination Figure 2 A bearing fault diagnosis dataset was obtained for the rotating machinery shown in the figure, and a scenario with continuous data distribution drift was simulated to illustrate the superiority of the method of the present invention. This dataset covers multiple operating conditions, and the test bearing model is N205EU. The bearing fault diagnosis dataset contains 10 types of fault data, with a data sampling frequency of 25.6kHz; the speed range is 500 to 3000 rpm, namely 500, 1000, 1500, 2000, 2500, and 3000 rpm; the load range is 0 to 60 N, namely 0, 20, 40, and 60 N, resulting in a total of 24 operating conditions. Six working conditions with larger changes, namely 500r / min-20N, 1000r / min-0N, 1500r / min-20N, 2000r / min-40N, 2500r / min-60N, and 3000r / min-40N, were selected for experiments, and 6 working condition sequences were designed. The above sequence was taken as the first working condition sequence. Each time the two adjacent domains were exchanged, the next working condition sequence was 1000r / min-0N, 500r / min-20N, 1500r / min-20N, 2000r / min-40N, 2500r / min-60N, and 3000r / min-40N.

[0107] As shown in Table 1, the experiment was repeated five times under six operating conditions to calculate the evaluation index parameters of the method of the present invention and two commonly used unsupervised domain adaptation methods, namely, Domain-Adversarial Neural Networks (DANN) and Maximum Mean Discrepancy (MMD).

[0108] As shown in Table 1, the evaluation indicators of DANN and MMD reflect that the domain adaptation fault diagnosis model without continuous learning is difficult to overcome the problem of catastrophic forgetting of the model while adapting to the new target domain. However, the method of the present invention maintains the performance in the historical domain while effectively adapting to the new target domain, thus realizing continuous unsupervised domain adaptation fault diagnosis.

[0109] Table 1 Diagnosis results under continuous drift of data distribution

[0110] ACC (%) BWT (%) AAD (%) DANN 40.77±10.71 -6.75±4.53 47.52±7.75 MMD 79.12±4.24 -11.29±2.01 90.40±3.73 Method of the present invention 97.61±1.43 -1.01±0.84 98.62±0.95

[0111] Based on the continuous unsupervised domain adaptation fault diagnosis method, the present invention also provides a continuous unsupervised domain adaptation fault diagnosis device, comprising: a fault database acquisition module, a source domain pre-training module, a target domain adaptation module, and a fault diagnosis module. The fault database acquisition module is used to collect source and target domain fault data for rotating machinery.

[0112] The source domain pre-training module is used to pre-train the fault diagnosis model based on the source domain data to obtain a uniformly divided unit hypersphere feature space.

[0113] The target domain adaptation module is used to adapt the target domain data according to the source domain data to obtain a trained fault diagnosis model.

[0114] The fault diagnosis module is used to apply the trained fault diagnosis model to actual fault diagnosis.

[0115] Those skilled in the art will understand that the foregoing descriptions are merely preferred embodiments of the invention and are not intended to limit the invention. Although the invention has been described in detail with reference to the foregoing examples, those skilled in the art will still be able to modify the technical solutions described in the foregoing examples or substitute equivalents for some of the technical features therein. Any modifications, equivalent substitutions, etc. made within the spirit and principles of the invention shall be included within the scope of protection of the invention.

Claims

1. A continuous unsupervised domain adaptation fault diagnosis method, characterized in that: The following steps are involved: S1: Obtain source domain and target domain fault data of rotating machinery equipment. The labeled source domain is represents the i-th source domain fault sample, express There are C categories of corresponding labels; N s represents the total number of source domain samples; the unlabeled target domain is T t represents the t-th target domain, represents the j-th target domain fault sample in the t-th target domain, represents the total number of samples in the t-th target domain; S2: A prototype contrast learning strategy based on metric and representation learning is adopted. The prototype contrast learning strategy includes the inter-instance contrast loss achieved through supervised information noise contrast estimation and the instance-prototype contrast loss achieved through cross entropy loss. The fault diagnosis model is pre-trained with source domain data to obtain a uniformly divided unit hypersphere feature space. The fault diagnosis model includes a feature extractor and a cosine similarity classifier. The cosine similarity classifier is composed of multiple prototypes. Composition, p c represents the prototype of the cth class, ||p c ||2=1; S3. Adapting target domain data using source domain data: Freeze the prototypes obtained from source domain pre-training and perform supervised training on the fault diagnosis model using source domain data to achieve continuous domain adaptation to the target domain. Perform source feature knowledge distillation and local domain alignment, maximize the mutual information loss between features and prototypes, and perform supervised training on the fault diagnosis model using source domain data. S4: After the fault diagnosis model completes the learning of all current target domains, it is applied to actual fault diagnosis.

2. The continuous unsupervised domain adaptation fault diagnosis method according to claim 1, characterized in that The fault diagnosis model θ(x)=g(f(x)) includes a feature extractor and a classifier Where m represents the output dimension of the feature extractor; the feature extractor is used to extract the fault sample features of the source domain and the target domain, and the feature extractor f θ The extracted features are expressed as h = f θ (x), h is the unit hypersphere feature space F m The unit vector in ,||h||2=1; the classifier g θ is the cosine similarity classifier.

3. The continuous unsupervised domain adaptation fault diagnosis method according to claim 2, characterized in that: In S2, the expression of the contrast loss between instances is as follows: in, is the feature extractor of the fault diagnosis model trained in the source domain; x + is a positive sample, the label is the same as x i Same; x - is a negative sample, the label is the same as x i Different; τ is a temperature parameter used to adjust the degree of smoothing; The expression of the contrast loss between the instance and the prototype is as follows: in, Indicates the yth i The prototype of the class, and it is a positive prototype, its label is the same as x i same; Represents the prototype of the cth class, and is a negative prototype, whose label is the same as x i different; The overall loss function L for source domain pre-training s The expression is as follows: Among them, L IPC Represents the IPC loss function, L IIC represents the loss function of IIC, represents the mean function; α is a hyperparameter.

4. The continuous unsupervised domain adaptation fault diagnosis method according to claim 1, characterized in that In S3, the loss function expression of the target domain continuous domain adaptation is as follows: Where, L CE represents the cross entropy loss, L FKD represents the source feature knowledge distillation loss, L MIM represents the mutual information loss, L LDA represents the local domain alignment loss; β(e) represents the balance parameter, Where e is the current number of training times, and M is the total number of training times, which are set manually.

5. The continuous unsupervised domain adaptation fault diagnosis method according to claim 4, characterized in that: The cross entropy loss L CE The expression is as follows: Where, represents the mean function, represents the source domain data x extracted by the fault diagnosis model trained in the tth target domain i Features, is the cth element in the one-hot label of the i-th source domain fault sample in the source domain, and σ represents the softmax function.

6. The continuous unsupervised domain adaptation fault diagnosis method according to claim 4, characterized in that: The source feature knowledge distillation loss L FKD The expression is as follows: Where, represents the mean function, represents the source domain data x extracted by the fault diagnosis model trained in the tth target domain i Features, represents the source domain data x extracted by the fault diagnosis model trained in the t-1th target domain i characteristics.

7. The continuous unsupervised domain adaptation fault diagnosis method according to claim 4, characterized in that: In S3, the local domain alignment loss L LDA The expression is as follows: Where, represents the mean function, represents the source domain data x extracted by the fault diagnosis model trained in the tth target domain i Features, represents the source domain data x extracted by the fault diagnosis model trained in the tth target domain j characteristics; is the target domain data x j Pseudo-label of and The maximum mean difference between them; φ represents the mapping function to the reproducing kernel Hilbert space H, ||·|| H represents the norm in H.

8. The continuous unsupervised domain adaptation fault diagnosis method according to claim 4, characterized in that: In S3, the mutual information loss L MIM The expression is as follows: Where, represents the mean function, represents the source domain data x extracted by the fault diagnosis model trained in the tth target domain j The features of , σ represents the softmax function, and KL represents the Kullback-Leibler divergence.

9. A continuous unsupervised domain adaptive fault diagnosis device, used to implement the continuous unsupervised domain adaptive fault diagnosis method according to any one of claims 1 to 8, characterized in that: include: Fault database acquisition module, source domain pre-training module, target domain adaptation module, fault diagnosis module; The fault database acquisition module is used to collect source domain and target domain fault data of rotating mechanical equipment; The source domain pre-training module is used to pre-train the fault diagnosis model based on the source domain data to obtain a uniformly divided unit hypersphere feature space; The target domain adaptation module is used to adapt the target domain data according to the source domain data to obtain a trained fault diagnosis model; The fault diagnosis module is used to apply the trained fault diagnosis model to actual fault diagnosis.

Citation Information

Patent Citations

  • Bearing fault diagnosis method based on contrast representation learning and subdomain self-adaption

    CN118152920A

  • Rolling bearing fault cross-equipment depth domain adaptive migration diagnosis method

    CN118410306A