Continuous unsupervised domain adaptive fault diagnosis method
By adopting the continuous unsupervised domain adaptation method in the fault diagnosis model, using prototype comparison learning and knowledge distillation technology, the knowledge forgetting problem of deep learning models in the face of data distribution drift is solved, and efficient fault diagnosis in industrial scenarios is achieved and adaptability.
Patent Information
- Application Number
- CN202411370323.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-09-29
AI Technical Summary
Existing fault diagnosis models based on deep learning and transfer learning are difficult to maintain reliability and generalization when the data distribution continues to drift in industrial scenarios, and they cannot continuously and incrementally learn state knowledge from industrial big data flows. , leading to the difficulty of forgetting knowledge and adapting to knowledge.
Using a continuous unsupervised domain adaptation fault diagnosis method, the comparison loss between instances and between instances and prototypes is achieved through a prototype comparison learning strategy based on metrics and characterization learning, and the supervised information noise comparison estimation and cross-entropy loss is used to achieve comparison loss between instances and between instances and between instances and prototypes, freezing The source domain pre-trained prototype performs source feature knowledge distillation and local domain alignment, maximizes the mutual information loss between the features and the prototype, and ensures the model's performance on historical data distribution and its ability to adapt to new data distribution.
This method can quickly adapt to new data distribution without re-labeling or memory replaying historical data, avoid knowledge forgetting, maintain the performance of the model on historical data, and enhance the reliability and generalization of the fault diagnosis model. , adapt to the continuous drift of data distribution caused by changes in working conditions.
Smart Images

Figure CN119226888A_ABST
Abstract
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] At present, most intelligent fault diagnosis research is inspired by deep learning automatic feature extraction, combined with a large amount of fault data, to achieve high-precision fault diagnosis. Fault diagnosis methods based on deep learning must meet the assumption that training and test data are independent and identically distributed, and must fully collect the most comprehensive fault data to ensure the reliability of diagnosis. Therefore, it can achieve fairly high accuracy under simulation or laboratory conditions, but it is difficult to meet these two conditions in actual industrial scenarios, and it does not have sufficient reliability and generalization.
[0004] In actual industrial scenarios, the status monitoring of industrial systems is often real-time, full-life, and full-cycle. Industrial data is collected in the form of streams to dynamically provide real-time status information for monitoring and diagnostic systems. The complex and changeable working conditions of industrial systems will cause the historical data used in the current training model and the real-time data used in testing to follow different distributions and do not meet the independent and identically distributed conditions. When encountering new working conditions, model failure will greatly reduce reliability, and re-labeling and training new data will bring huge time, money, and labor costs. When conducting real-time full-life status monitoring, the status information will continue to increase in dimension over time, and the data distribution will continue to increase. How to improve the generalization ability of fault diagnosis deep learning models in the face of diagnostic needs in dynamic scenarios is a hot topic and challenge in current research.
[0005] Transfer learning, with its cross-domain and cross-distribution knowledge mining and transfer capabilities, can, to a certain extent, break the limitations of the same distribution assumption of deep learning models and achieve cross-domain intelligent fault diagnosis. Therefore, it has stronger generalization than deep learning. However, transfer learning still has certain limitations. Transfer learning needs to be implemented between a specified and limited number of domains, and cannot cope with the non-identically distributed state information dimensionality data continuously generated by changes in working conditions. At the same time, knowledge transfer is usually one-time and one-way, and knowledge forgetting will inevitably occur. Therefore, it is difficult to master the knowledge of all tasks, and it is impossible to continuously and incrementally learn state knowledge from a 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 often find it 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 the 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, comprising the following steps:
[0010] S1: Obtain the 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 labels have C categories; N s represents the total number of source domain samples; the unlabeled target domain is T t represents the tth target domain, represents the jth target domain fault sample in the tth target domain, represents the total number of samples in the tth target domain;
[0011] S2: A prototype contrast learning strategy based on metric and representation learning is adopted. The prototype contrast learning strategy includes the instance contrast loss realized by supervised information noise contrast estimation and the instance-prototype contrast loss realized by 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. Use source domain data to adapt to target domain data: Freeze the prototype obtained by pre-training in the source domain, and conduct supervised training on the fault diagnosis model in combination with the source domain data to achieve continuous domain adaptation to the target domain; perform source feature knowledge distillation and local domain alignment, and maximize the mutual information loss between the feature and the prototype, and conduct supervised training on the fault diagnosis model in combination with the 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 feature is represented as h = f θ (x), h is the unit hypersphere feature space F m The unit vector in , ||h||2=1; 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, with the same label as x i Same; x - is a negative sample, with the same label 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, and 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] In the formula, 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 unique 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] In the formula, 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] In the formula, 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 Features; is the target domain data x j The 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] In the formula, 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 adaptive fault diagnosis device, used to implement the continuous unsupervised domain adaptive 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 according to 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 drift of data distribution caused by changes in working conditions in actual scenarios, and uses existing or laboratory-collected source domain data with complete labels to enable the fault diagnosis model to continuously adapt to the target domain data with distribution changes and no labels. The present invention does not require labeling for new data distributions (i.e., new target domains), and under the premise of strictly protecting the privacy of sensitive fault data, does not require memory replay or re-joint training of historical data, and can quickly and effectively adapt to new data distributions while maintaining the performance of the model on historical data distributions, 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 meet the fault diagnosis needs of continuous drift of data distribution caused by changes in working conditions, and to establish a continuous fault diagnosis model with stronger 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 It is a schematic diagram of the structure of a rotating mechanical device 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 according to the accompanying drawings and preferred embodiments, and the purpose and effect of the present invention will become more clear. 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 used to explain 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 described. The nouns and terms involved in the embodiments of the present invention are subject to the following explanations.
[0051] (1) Source domain refers to the dataset or domain where the model is pre-trained. The source domain usually contains a large number of data samples with clear labels or supervision information. These samples are used to train and build the starting model so that the model can learn effective features and rules from them. 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 data set or field to which the model will be applied. In the target domain, there are usually only a small number of labeled samples or no labeled samples at all (i.e., in the case of unsupervised learning). The target domain of the present invention has no labeled samples at all. The target domain can be a task, field, or data set different from the source domain.
[0053] In transfer learning and domain adaptation, the source domain and the target domain may have differences in data distribution, feature distribution, category distribution, etc. The present invention is to use differences in data distribution. The source domain is the starting point of knowledge transfer. The knowledge and features learned by the model in the source domain are transferred to the target domain to improve the performance of the model 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 tends to significantly forget the previously learned task knowledge.
[0055] (3) Continuous learning. When building a unified network model or gradually adding new functions 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, the storage and retraining of such data becomes infeasible. In order to deal with the problem that the training data for existing functions is unavailable when adding new functions to the network model, a continuous learning method is proposed, which only uses the new task data to train the network while retaining the original functions.
[0056] (4) Source Hypothesis Transfer (SHOT), a framework for unsupervised domain adaptation, aims to solve the domain adaptation problem when there is no labeled data in the target domain and the source domain data cannot be directly accessed. SHOT solves similar tasks in a new unlabeled target domain by leveraging the knowledge learned from the labeled source dataset.
[0057] (5) Mutual Information: An important concept in information theory, it 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 adaptive 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 tth 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 defined 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 feature is represented 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, so as to better adapt to the subsequent target domain. 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, with the same label as x i Same; x - is a negative sample, with the same label as x i Different (that is, 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, the purpose of which is 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, and 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 keep instances of different categories 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 gathered on the prototype p cAround, and the distance between 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 probability of misclassification 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 forget-free 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 prototypes obtained by pre-training in the source domain are 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, namely 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 supervisedly 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] In the formula, is the cth element in the unique 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] In the formula, 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 through metrics 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 invisible 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 alignment assumptions of the target domain to the anchor point are 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, the source feature knowledge distillation is used to maintain the distribution information of the invisible 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. The local domain alignment loss L LDA The expression is as follows:
[0090]
[0091] In the formula, is the target domain data x j The 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 through balancing 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, the data of all learned domains can be used to test the performance of the fault diagnosis model on new and old domains, and verify the ability of the fault diagnosis model to continuously adapt to domains and overcome catastrophic forgetting. The details are as follows:
[0101] After the fault diagnosis model completes the adaptation of the tth target domain, it 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 order) 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] The 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] In the formula, 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 its accuracy is.
[0106] The following combination Figure 2 The rotating mechanical equipment shown in the figure obtains its bearing fault diagnosis data set, and simulates the continuous drift scenario of data distribution to illustrate the superiority of the method of the present invention. The data set has multiple working conditions, and the test bearing model is N205EU. The bearing fault diagnosis data set contains 10 types of fault data, and the data sampling frequency is 25.6kHz; the speed range is 500 to 3000r / min, that is, 500, 1000, 1500, 2000, 2500 and 3000r / min; the load range is 0 to 60N, that is, 0, 20, 40 and 60N; therefore, there are 24 working conditions in total. 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, under six operating conditions, the experiment was repeated five times 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 can be seen from 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 catastrophic forgetting problem of the model while adapting to the new target domain. 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, including: a fault database acquisition module, a source domain pre-training module, a target domain adaptation module, and a fault diagnosis module. Among them, the fault database acquisition module is used to collect source domain and target domain fault data of rotating mechanical equipment.
[0112] The source domain pre-training module is used to pre-train the fault diagnosis model according to 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 can understand that the above are only preferred examples of the invention and are not intended to limit the invention. Although the invention is described in detail with reference to the above examples, those skilled in the art can still modify the technical solutions recorded in the above examples or replace some of the technical features therein with equivalents. Any modification, equivalent replacement, etc. made within the spirit and principle of the invention shall be included in the protection scope of the invention.
Claims
1. A continuous unsupervised domain adaptation fault diagnosis method, characterized in that: The following steps are involved: S1: Obtain the 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 labels have C categories; N s represents the total number of source domain samples; the unlabeled target domain is T t represents the tth target domain, represents the jth target domain fault sample in the tth target domain, represents the total number of samples in the tth target domain; S2: A prototype contrast learning strategy based on metric and representation learning is adopted. The prototype contrast learning strategy includes the instance contrast loss realized by supervised information noise contrast estimation and the instance-prototype contrast loss realized by 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. Use source domain data to adapt to target domain data: Freeze the prototype obtained by pre-training in the source domain, and conduct supervised training on the fault diagnosis model in combination with the source domain data to achieve continuous domain adaptation to the target domain; perform source feature knowledge distillation and local domain alignment, and maximize the mutual information loss between the feature and the prototype, and conduct supervised training on the fault diagnosis model in combination with the 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 feature is represented as h = f θ (x), h is the unit hypersphere feature space F m The unit vector in , ||h||2=1; 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, with the same label as x i Same; x - is a negative sample, with the same label 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, and 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: In the formula, 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 unique 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: In the formula, 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 adaptive fault diagnosis method according to claim 4, characterized in that: In S3, the local domain alignment loss L LDA The expression is as follows: In the formula, 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 Features; is the target domain data x j The 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 adaptive fault diagnosis method according to claim 4, characterized in that: In S3, the mutual information loss L MIM The expression is as follows: In the formula, 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 according to 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
Adaptive cross-working-condition fault diagnosis method for rotary machinery based on depth discrimination and unsupervised field
CN118643324A
Intra-class adaptation fault diagnosis method for bearing under variable working conditions
US20220327035A1
Cited By
Mechanical fault diagnosis method based on prototype-driven double-view-angle collaborative comparison fusion network
CN120952053A
Intelligent fault diagnosis system of photoelectric pod image acquisition device
CN122090148A
