Cross-domain intelligent fault diagnosis method and system for domain adaptive confrontation open set
By adopting domain adaptive adversarial open set cross-domain intelligent fault diagnosis method in open set fault diagnosis scenarios, a feature extractor and classifier are built for adversarial training, which solves the problem of private class samples recognition in the target domain and improves the accuracy of fault diagnosis.
Patent Information
- Application Number
- CN202410477413.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-19
- Publication Date
- 2025-03-18
AI Technical Summary
In the open set fault diagnosis scenario, it is difficult for the existing technology to identify the target domain private class samples as unknown classes while aligning the target domain and the source domain, resulting in a degradation of fault diagnosis performance.
Adoptional adversarial open set cross-domain intelligent fault diagnosis method is adopted, and by constructing feature extractors, private class classifiers, first auxiliary classifiers and second auxiliary classifiers, adversarial training is performed to identify private class samples of the target domain, and to maximize the prediction divergence of the first auxiliary classifier and the second auxiliary classifier to align the shared classes of the target domain and the source domain.
In the open set fault diagnosis scenario, while aligning the target domain and the source domain share class samples, the target domain private class samples are identified as unknown classes, which improves the accuracy of cross-domain intelligent fault diagnosis.
Smart Images

Figure CN119646646A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of mechanical intelligent fault diagnosis, and in particular to a domain adaptive confrontation open set cross-domain intelligent fault diagnosis method and a system thereof. Background Art
[0002] In actual industrial production, it is very dangerous for large-scale mechanical equipment to work under fault conditions, and it is unpredictable when the equipment will fail. The additional monitoring system is incomplete, which makes it difficult to obtain enough fault types for training to solve the target problem after the mechanical equipment fails. In addition, due to problems such as high speed, partial load and heavy load, the operating status of the equipment will degrade over time, and the actual production needs also require mechanical equipment to operate under different working conditions, resulting in distribution differences in fault characteristics even for the same fault type. Therefore, some intelligent fault diagnosis models based on the assumption that the source domain and the target domain share a label space have a sharp decline in fault diagnosis performance under open set conditions and complex working conditions.
[0003] Current research on intelligent mechanical fault diagnosis mainly focuses on signal processing, feature extraction, and intelligent model development. With the rapid development of the computer and artificial intelligence industries, compared with traditional signal processing methods such as Fourier transform and wavelet transform, deep learning and transfer learning methods have attracted much attention from scholars for their ability to automatically extract deep fault features and achieve end-to-end fault diagnosis. Deep learning methods can better utilize low-dimensional feature representations in high-dimensional data and have significant advantages in solving various classification problems.
[0004] However, in many deep learning models, a major assumption is that the training samples and test samples have the same feature space and label space. However, for mechanical fault diagnosis applications, since actual production requires machines to operate under different working conditions, there are distribution differences between the training data set and the target data set. In addition, it is difficult to ensure that the fault types in the source domain and the target domain are completely consistent, and there is an open set fault diagnosis scenario problem, which causes the performance of the deep learning model to seriously degrade when performing fault diagnosis under other working conditions.
[0005] In recent years, researchers have conducted in-depth research on intelligent fault diagnosis methods based on the idea of transfer learning. In response to the problem of intelligent fault diagnosis, some scholars have taken the integration of transfer learning methods and deep learning methods as the starting point, based on deep neural networks (CNNs), and used adversarial training, distance metrics and other domain adaptation methods to improve the fault diagnosis performance of deep models migrated to the target domain. However, most domain adaptation methods assume that the source domain and the target domain have the same label space. Directly using such domain adaptation methods to solve open set problems will cause unknown classes to be incorrectly classified as known classes, which seriously damages the fault diagnosis performance of the model.
[0006] Therefore, how to obtain sufficient cross-domain data feature representation under open set conditions, reject the private classes of the target domain, and align the shared classes of the target domain and the source domain in order to meet the requirements of sufficient model convergence and effective migration remains a huge challenge. Summary of the invention
[0007] The technical problem to be solved by the present invention is to provide a domain-adaptive open set cross-domain intelligent fault diagnosis method and system, which can identify the target domain private class samples as unknown classes while aligning the shared class samples of the target domain and the source domain, and has a high cross-domain intelligent fault diagnosis accuracy in the open set fault diagnosis scenario.
[0008] In order to solve the above technical problems, a technical solution adopted by the present invention is to provide a domain adaptive confrontation open set cross-domain intelligent fault diagnosis method, comprising the following steps:
[0009] S1: Simulate an open set fault diagnosis scenario, set the rolling bearing to operate under different working conditions, extract the rolling bearing including but not limited to vibration signals as the original input of the model, and divide the extracted original input signals into a source domain and a target domain, wherein the fault type in the source domain is known, the fault type in the target domain is unknown, and the fault types in the target domain include but are not limited to the known fault types in the source domain;
[0010] Among them, the labels of samples are divided according to the fault type, and the label space is:
[0011] in is the label space of the shared class between the source domain and the target domain; (y ukn ) is the private label space in the target domain;
[0012] S2: intercept the original signal under different working conditions according to the given length and step size to obtain several fault samples x of given length n =[x1,x2,...x m ], where m is the given sample length, and the source domain and target domain are constructed according to the number of samples of each type of fault set;
[0013] Then the sample space D of the source domain s and the sample space D of the target domain t It is expressed as:
[0014] Represents a distribution of p s The total number of samples selected from the source domain is n s The sample size of each type of fault is the same;
[0015] Represents a distribution of pt The total number of samples selected in the target domain is n t The sample size of each type of fault is the same; where p s ≠p t ;
[0016] Source domain training set D strain , target domain training set D ttrain and the target domain test set D ttest It is expressed as:
[0017]
[0018]
[0019]
[0020] where n s is the number of samples for source domain training, n1 is the number of samples for target domain training, n2 is the number of samples for test set training, n1+n2=n t ;
[0021] S3: Constructing a domain-adaptive adversarial open set cross-domain intelligent fault diagnosis model y(x), y = G c1 (G f (x)), mainly including a feature extractor, a gradient reversal layer, a private class classifier, a first auxiliary classifier and a second auxiliary classifier, wherein the first auxiliary classifier and the second auxiliary classifier are respectively: G c2 (·) and G c3 (·), G f (·) is the feature extractor calculation process, G c1 (·) is the calculation process of the private class classifier, and y is the model's prediction of the fault type of the input sample x;
[0022] S4: Use source domain training samples and target domain training samples to perform domain adaptive adversarial training on the model;
[0023] S5: Output the trained domain adaptive adversarial open set cross-domain intelligent fault diagnosis model, and verify it through the target domain test set.
[0024] In a preferred embodiment of the present invention, in step S3, the feature extractor automatically extracts deep fault features and inputs them into the private class classifier, the first auxiliary classifier and the second auxiliary classifier respectively; the private class classifier is used for fault type classification in the target domain, and its output is: (y1, y2, ., ., ., y k ,y k+1); The outputs of the first auxiliary classifier and the second auxiliary classifier are used to maximize the classification difference between the two classifiers so as to align the target domain shared class samples with the source domain shared class samples. The outputs of the first auxiliary classifier and the second auxiliary classifier are: (y1, y2, ., ., ., y k ).
[0025] In a preferred embodiment of the present invention, in step S4, the specific steps of the domain adaptive adversarial training include:
[0026] S401: In order to obtain good classification performance of the shared classes in the source domain and the shared classes in the target domain, the private class classifier is trained to establish the boundary between the shared classes and the private classes in the target domain, that is, to optimize the target loss function:
[0027]
[0028]
[0029] Among them, η is the balance parameter, which is calculated as: η = (k + 3) / 10; the classification loss of the source domain sample is calculated as: L s =L S1 +λ1L S2 +λ2L S3 , the cross entropy loss L of the private class classifier, the first auxiliary classifier, and the second auxiliary classifier S1 , L S2 and L S3 They are calculated as:
[0030]
[0031]
[0032]
[0033] L adv (x t )=-tlog(G c1 (G(x t ))-(1-t)log(1-G c1 (G(x t ), the probability of the private class in the target domain is t;
[0034] S402: By optimizing the objective function, outlier samples in the target domain shared class are aligned with the shared class in the source domain, and the excluded outlier target domain shared class samples are detected. The objective function is:
[0035]
[0036] Among them, the divergence between the first auxiliary classifier and the second auxiliary classifier on the target sample prediction is recalculated as:
[0037] L WCD =ω(x t )||G c2 (G f (x t ))-G c3 (G f (x t ))||,
[0038] The entropy of the probability distribution predicted by the first auxiliary classifier and the second auxiliary classifier for the target domain sample is used to reweight the weight of the target sample as follows:
[0039]
[0040] Where Z is the normalization constant, ∑ω(x t )=1,p K The average of the predicted probabilities of the first and second auxiliary classifiers for the target domain samples belonging to the shared class c is calculated as:
[0041] p K =(1 / 2)(G c2 (G f (x t ))+G c3 (G f (x t )));
[0042] S403: Force the generation of a target representation consistent with the source domain feature distribution, that is, minimize the divergence between the first auxiliary classifier and the second auxiliary classifier in predicting the target sample to update the feature extractor, and fix the parameters of the special class classifier, the first auxiliary classifier and the second auxiliary classifier, that is, optimize the objective function as follows:
[0043]
[0044] S404: Repeat steps S401 to S403 to determine whether the number of model training rounds reaches the set maximum number of iterations. If so, output the model and test it through the target domain test set, using the fault diagnosis accuracy as the evaluation criterion. If not, continue to repeat steps S401 to S403.
[0045] In order to solve the above technical problems, another technical solution adopted by the present invention is to provide a domain adaptive confrontation open set cross-domain intelligent fault diagnosis system, comprising:
[0046] A data acquisition module is used to simulate an open set fault diagnosis scenario, set the rolling bearing to operate under different working conditions, extract the rolling bearing including but not limited to vibration signals as the original input of the model, and divide the extracted original input signals into a source domain and a target domain, wherein the fault type of the source domain is known, the fault type of the target domain is unknown, and the fault types in the target domain include but are not limited to known fault types in the source domain;
[0047] Among them, the labels of samples are divided according to the fault type, and the label space is:
[0048] in is the label space of the shared class between the source domain and the target domain; (y ukn ) is the private label space in the target domain;
[0049] Construct source domain and target domain sample modules to intercept the original signals under different working conditions according to the given length and step size to obtain several fault samples x of given length n =[x1,x2,...x m ], where m is the given sample length, and the source domain and target domain are constructed according to the number of samples of each type of fault set;
[0050] Then the sample space D of the source domain s and the sample space D of the target domain t It is expressed as:
[0051] Represents a distribution of p s The total number of samples selected from the source domain is n s The sample size of each type of fault is the same;
[0052] Represents a distribution of p t The total number of samples selected in the target domain is n t The sample size of each type of fault is the same; where p s ≠p t ;
[0053] Source domain training set D strain , target domain training set D ttrain and the target domain test set D ttest It is expressed as:
[0054]
[0055]
[0056]
[0057] where n sis the number of samples for source domain training, n1 is the number of samples for target domain training, n2 is the number of samples for test set training, n1+n2=n t ;
[0058] Construct a fault diagnosis model module to build a domain adaptive adversarial open set cross-domain intelligent fault diagnosis model y(x), y = G c1 (G f (x)), mainly including a feature extractor, a gradient reversal layer, a private class classifier, a first auxiliary classifier and a second auxiliary classifier, wherein the first auxiliary classifier and the second auxiliary classifier are respectively: G c2 (·) and G c3 (·), G f (·) is the feature extractor calculation process, G c1 (·) is the calculation process of the private class classifier, and y is the model's prediction of the fault type of the input sample x;
[0059] A model training module, used to perform domain adaptive adversarial training on the domain adaptive adversarial open set cross-domain intelligent fault diagnosis model constructed by the fault diagnosis model construction module using the source domain training samples and the target domain training samples generated by the source domain and target domain sample construction module;
[0060] The model output and verification module is used to output the domain adaptive adversarial open set cross-domain intelligent fault diagnosis model trained by the model training module and verify it through the target domain test set.
[0061] In a preferred embodiment of the present invention, in the domain adaptive adversarial open set cross-domain intelligent fault diagnosis model constructed by the fault diagnosis model construction module, the feature extractor automatically extracts deep fault features and inputs them into the private class classifier, the first auxiliary classifier and the second auxiliary classifier respectively; the private class classifier is used for fault type classification in the target domain, and its output is: (y1, y2, ., ., ., y k ,y k+1 ); The outputs of the first auxiliary classifier and the second auxiliary classifier are used to maximize the classification difference between the two classifiers so as to align the target domain shared class samples with the source domain shared class samples. The outputs of the first auxiliary classifier and the second auxiliary classifier are: (y1, y2, ., ., ., y k ).
[0062] In a preferred embodiment of the present invention, the specific steps of the model training module performing domain adaptive adversarial training include:
[0063] S401: In order to obtain good classification performance of the shared classes in the source domain and the shared classes in the target domain, the private class classifier is trained to establish the boundary between the shared classes and the private classes in the target domain, that is, to optimize the target loss function:
[0064]
[0065]
[0066] Among them, η is the balance parameter, which is calculated as: η = (k + 3) / 10; the classification loss of the source domain sample is calculated as: L s =L S1 +λ1L S2 +λ2L S3 , the cross entropy loss L of the private class classifier, the first auxiliary classifier, and the second auxiliary classifier S1 , L S2 and L S3 They are calculated as:
[0067]
[0068]
[0069]
[0070] L adv (x t )=-tlog(G c1 (G(x t ))-(1-t)log(1-G c1 (G(x t ), the probability of the private class in the target domain is t;
[0071] S402: By optimizing the objective function, outlier samples in the target domain shared class are aligned with the shared class in the source domain, and the excluded outlier target domain shared class samples are detected. The objective function is:
[0072]
[0073] Among them, the divergence between the first auxiliary classifier and the second auxiliary classifier on the target sample prediction is recalculated as:
[0074] L WCD =ω(x t )||G c2 (G f (x t ))-G c3 (G f (x t ))||,
[0075] The entropy of the probability distribution predicted by the first auxiliary classifier and the second auxiliary classifier for the target domain sample is used to reweight the weight of the target sample as follows:
[0076]
[0077] Where Z is the normalization constant, ∑ω(x t )=1,p K The average of the predicted probabilities of the first and second auxiliary classifiers for the target domain samples belonging to the shared class c is calculated as:
[0078] p K =(1 / 2)(G c2 (G f (x t ))+G c3 (G f (x t )));
[0079] S403: Force the generation of a target representation consistent with the source domain feature distribution, that is, minimize the divergence between the first auxiliary classifier and the second auxiliary classifier in predicting the target sample to update the feature extractor, and fix the parameters of the special class classifier, the first auxiliary classifier and the second auxiliary classifier, that is, optimize the objective function as follows:
[0080]
[0081] S404: Repeat steps S401 to S403 to determine whether the number of model training rounds reaches the set maximum number of iterations. If so, output the model and test it through the target domain test set, using the fault diagnosis accuracy as the evaluation criterion. If not, continue to repeat steps S401 to S403.
[0082] The beneficial effects of the present invention are as follows: the present invention respectively constructs a feature extractor, a private class classifier, a first auxiliary classifier and a second auxiliary classifier; in an open set scenario, the private class classifier and the feature extractor are trained using an adversarial training method to obtain good classification performance of known classes in the source domain and shared classes in the target domain, while establishing boundaries between shared classes and private classes in the target domain; the prediction divergence of the first auxiliary classifier and the second auxiliary classifier is maximized so that the model can effectively detect excluded outlier shared class samples in the target domain and force the generation of target representations in the distribution of the source domain; the present invention can identify private class samples in the target domain as unknown classes while aligning shared class samples in the target domain and the source domain, and has a high cross-domain intelligent fault diagnosis accuracy in an open set fault diagnosis scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] Figure 1 It is a flow chart of a domain adaptive confrontation open set cross-domain intelligent fault diagnosis method of the present invention;
[0084] Figure 2 It is a structural diagram of the domain adaptive confrontation open set cross-domain intelligent fault diagnosis model;
[0085] Figure 3 is a schematic diagram of model optimization in the domain adaptive adversarial training;
[0086] Figure 4 It is a structural block diagram of the domain adaptive confrontation open set cross-domain intelligent fault diagnosis system;
[0087] Figure 5 This is a graph showing the fault diagnosis accuracy of a test set of the intelligent fault diagnosis method of the present invention under different working conditions as source domain conditions. DETAILED DESCRIPTION
[0088] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.
[0089] See also Figure 1 , the embodiment of the present invention includes:
[0090] A domain adaptive confrontation open set cross-domain intelligent fault diagnosis method, comprising the following steps:
[0091] S1: Simulate an open set fault diagnosis scenario, set the rolling bearing to operate under different working conditions, extract the rolling bearing including but not limited to vibration signals as the original input of the model, and divide the extracted original input signals into a source domain and a target domain according to the working condition differences, wherein the source domain fault type is known, the target domain fault type is unknown, and the fault types in the target domain include but are not limited to the known fault types in the source domain; specifically, the rolling bearing health status types include but are not limited to inner ring fault, outer ring fault, rolling element fault, normal (and fault types divided according to different fault sizes), and the operating conditions include but are not limited to speed changes and load changes.
[0092] Among them, the labels of samples are divided according to the fault type, and the label space is:
[0093] in is the label space of the shared class between the source domain and the target domain; (y ukn ) is the private label space in the target domain.
[0094] S2: intercept the original signal under different working conditions according to the given length and step size to obtain several fault samples x of given length n =[x1,x2,...x m ], where m is the given sample length, and the source domain and target domain are constructed according to the number of samples of each type of fault set;
[0095] Then the sample space D of the source domain s and the sample space D of the target domaint It is expressed as:
[0096] Represents a distribution of p s The total number of samples selected from the source domain is n s The sample size of each type of fault is the same;
[0097] Represents a distribution of p t The total number of samples selected in the target domain is n t The sample size of each type of fault is the same; where p s ≠p t ;
[0098] During the training process, the source domain training samples and the target domain test samples have labels to facilitate model training and verification. The target domain training samples are unlabeled. Therefore, the source domain training set D strain , target domain training set D ttrain and the target domain test set D ttest It is expressed as:
[0099]
[0100]
[0101]
[0102] where n s is the number of samples for source domain training, n1 is the number of samples for target domain training, n2 is the number of samples for test set training, n1+n2=n t .
[0103] S3: Constructing a domain-adaptive adversarial open set cross-domain intelligent fault diagnosis model y(x), y = G c1 (G f (x)), such as Figure 2 As shown, it mainly includes a feature extractor, a gradient reversal layer, a private class classifier, a first auxiliary classifier and a second auxiliary classifier. The private class classifier, the first auxiliary classifier and the second auxiliary classifier all include a linear layer, a normalization operation and a sigmod activation function and a linear layer; wherein the first auxiliary classifier and the second auxiliary classifier are respectively: G c2 (·) and G c3 (·), G f (·) is the feature extractor calculation process, G c1 (·) is the private class classifier calculation process, and y is the model’s prediction of the fault type of the input sample x.
[0104] S4: Use source domain training samples and target domain training samples to perform domain adaptive adversarial training on the model. The specific process of domain adaptive adversarial training of the model is as follows:
[0105] 4.1) The model training is randomly initialized;
[0106] 4.2) The model training is performed in steps 1) and 2), the source domain training samples and the target domain training samples are randomly selected and input into the model for training through a small batch method;
[0107] 4.3) The model training uses a feature extractor (a convolutional neural network is used in this example) to automatically extract deep fault features and input them into the private class classifier, the first auxiliary classifier and the second auxiliary classifier respectively; the private class classifier is used to classify the fault type of the target domain, and its output is: (y1, y2, ., ., ., y k ,y k+1 ), the outputs of the first auxiliary classifier and the second auxiliary classifier are used to maximize the classification difference between the two classifiers in order to align the target domain shared class (low entropy) samples with the source domain shared class samples. Therefore, the outputs of the first auxiliary classifier and the second auxiliary classifier are: (y1,y2,.,.,.,y k ); At the same time, in order to facilitate the maximum minimization process of the domain adaptive adversarial process, a gradient reversal layer is set between the feature extractor and each classifier.
[0108] 4.4) Combination Figure 3 , the model training process includes:
[0109] Step S401: In order to obtain good classification performance of shared classes in the source domain and shared classes in the target domain, the classifier is trained to establish a boundary between the shared class and the private class in the target domain, that is, to optimize the target loss function; the optimization process of the model includes minimizing the classification loss of all classifiers on the source domain, and optimizing the model through the Adam optimization algorithm; wherein the cross entropy loss is used as the loss function, and the cross entropy loss L of the private class classifier, the first auxiliary classifier, and the second auxiliary classifier is S1 , L S2 and L S3 They are calculated as:
[0110]
[0111]
[0112]
[0113] Therefore, the classification loss of source domain samples is calculated as: L s =L S1 +λ1L S2 +λ2LS3 ;
[0114] In order to make the probability of the private class of the input target domain t, the binary cross loss entropy is used as the loss function, which is calculated as follows:
[0115] L adv (x t )=-tlog(G c1 (G(x t ))-(1-t)log(1-G c1 (G(x t )))
[0116] When t is set to a very small value, the feature extractor should be more likely to increase the probability that the sample belongs to the private class. On the contrary, when t is set to a very large value, it causes the private class target domain samples to be incorrectly aligned with the source domain shared class. Therefore, for each classifier, the classification loss of the source domain data is minimized first. At the same time, the probability that the target domain data is classified as an unknown class is set to 0.5, and the binary cross loss entropy loss is minimized; for the feature extractor, the classification loss of the source domain data is first optimized, and the probability of classifying the target domain data as an unknown class is far away from 0.5, so the binary cross loss entropy loss is maximized. For the private class classifier, the first auxiliary classifier and the second auxiliary classifier, the classification loss of the source domain should be minimized; therefore, the objective loss function of step S401 is:
[0117]
[0118]
[0119] Where η is the equilibrium parameter, calculated as: η = (k + 3) / 10;
[0120] Step S402: By optimizing the objective function, the outlier samples in the target domain shared class are aligned with the shared class in the source domain, and the excluded outlier target domain shared class samples are detected; in this step, the first auxiliary classifier and the second auxiliary classifier are updated, and the feature extractor and the private class classifier are fixed; in order for the model to detect outlier target domain shared class samples, it is necessary to detect samples of the shared class target domain that are far away from the decision boundary. Therefore, the prediction difference between the first auxiliary classifier and the second auxiliary classifier is maximized, that is, the divergence of the predictions of the two classifiers on the target sample is achieved, and the loss function is calculated as follows:
[0121] L WCD =|G c2 (G f (x t ))-G c3 (G f (x t ))|
[0122] Considering that the fault types of the target domain under open set conditions may be different from those of the source domain, this obvious misalignment may potentially lead to negative transfer. Therefore, in order to first detect and separate the target domain private classes and then align only the target domain shared classes with the source domain, the entropy of the probability distribution predicted by the first and second auxiliary classifiers for the target domain samples is re-weighted for domain adaptive alignment (in fact, a target sample with a higher predicted entropy value has a lower weight and eventually plays a less important role in the domain adaptive alignment process); the weight is calculated as follows:
[0123]
[0124] Where Z is the normalization constant, ∑ω(x t )=1,p K The average of the predicted probabilities of the first and second auxiliary classifiers for the target domain samples belonging to the shared class c is calculated as:
[0125] p K =(1 / 2)(G c2 (G f (x t ))+G c3 (G f (x t )))
[0126] Therefore, the divergence between the first auxiliary classifier and the second auxiliary classifier on the target sample prediction is recalculated as follows:
[0127] L WCD =ω(x t )||G c2 (G f (x t ))-G c3 (G f (x t ))||
[0128] By training the first auxiliary classifier and the second auxiliary classifier and maximizing L WCD , the model can detect the excluded outlier target domain shared class samples; therefore, the optimization objective function of step S402 is:
[0129]
[0130] Step S403: Force the generation of a target representation that is consistent with the source domain feature distribution; therefore, the feature extractor is updated by minimizing the divergence between the first auxiliary classifier and the second auxiliary classifier in predicting the target sample, while fixing the parameters of the private class classifier, the first auxiliary classifier, and the second auxiliary classifier; therefore, the optimization objective function of step S403 is:
[0131]
[0132] S404: Repeat steps S401 to S403 to determine whether the number of model training rounds reaches the set maximum number of iterations. If so, output the model and test it through the target domain test set, using the fault diagnosis accuracy as the evaluation criterion. If not, continue to repeat steps S401 to S403.
[0133] S5: Output the trained domain adaptive adversarial open set cross-domain intelligent fault diagnosis model, and verify it through the target domain test set.
[0134] See also Figure 4 The example of the present invention also provides a domain-adaptive confrontation open set cross-domain intelligent fault diagnosis system, including a data acquisition module, a source domain and target domain sample construction module, a fault diagnosis model construction module, a model training module, and a model output and verification module.
[0135] The data acquisition module is used to simulate an open set fault diagnosis scenario, set the rolling bearing to operate under different working conditions, extract the rolling bearing including but not limited to vibration signals as the original input of the model, and divide the extracted original input signals into a source domain and a target domain, wherein the fault type of the source domain is known, the fault type of the target domain is unknown, and the fault types in the target domain include but are not limited to known fault types in the source domain;
[0136] Among them, the labels of samples are divided according to the fault type, and the label space is:
[0137] in is the label space of the shared class between the source domain and the target domain; (y ukn ) is the private label space in the target domain;
[0138] The source domain and target domain sample building module is used to intercept the original signal under different working conditions according to the given length and step size to obtain several fault samples x of given length. n =[x1,x2,...x m ], where m is the given sample length, and the source domain and target domain are constructed according to the number of samples of each type of fault set;
[0139] Then the sample space D of the source domain s and the sample space D of the target domaint It is expressed as:
[0140] Represents a distribution of p s The total number of samples selected from the source domain is n s The sample size of each type of fault is the same;
[0141] Represents a distribution of p t The total number of samples selected in the target domain is n t The sample size of each type of fault is the same; where p s ≠p t ;
[0142] Source domain training set D strain , target domain training set D ttrain and the target domain test set D ttest It is expressed as:
[0143]
[0144]
[0145]
[0146] where n s is the number of samples for source domain training, n1 is the number of samples for target domain training, n2 is the number of samples for test set training, n1+n2=n t ;
[0147] The fault diagnosis model building module is used to build a domain adaptive confrontation open set cross-domain intelligent fault diagnosis model y(x), y = G c1 (G f (x)), mainly including a feature extractor, a gradient reversal layer, a private class classifier, a first auxiliary classifier and a second auxiliary classifier, wherein the first auxiliary classifier and the second auxiliary classifier are respectively: G c2 (·) and G c3 (·), G f (·) is the feature extractor calculation process, G c1 (·) is the calculation process of the private class classifier, and y is the model's prediction of the fault type of the input sample x;
[0148] The model training module is used to perform domain adaptive adversarial training on the domain adaptive adversarial open set cross-domain intelligent fault diagnosis model constructed by the fault diagnosis model construction module using the source domain training samples and the target domain training samples generated by the source domain and target domain sample construction module;
[0149] The model output and verification module is used to output the domain adaptive adversarial open set cross-domain intelligent fault diagnosis model trained by the model training module, and verify it through the target domain test set.
[0150] A domain-adaptive open set cross-domain intelligent fault diagnosis system in this example can execute a domain-adaptive open set cross-domain intelligent fault diagnosis method provided by the present invention, can execute any combination of implementation steps of the method example, and has the corresponding functions and beneficial effects of the method.
[0151] In order to verify the accuracy of cross-domain intelligent fault diagnosis in the open set fault diagnosis scenario of the present invention, the following example is provided:
[0152] This case uses the drive-end bearing fault data from the bearing data center of Case Western Reserve University (CWRU) as the original experimental data set. The data set contains four different motor loads. According to the four different loads, the collected samples are divided into four different working conditions, as shown in Table 1.
[0153] Table 1 Classification of working conditions
[0154]
[0155] There are four health states of the bearing, namely normal bearing (NA), inner ring fault (IF), outer ring fault (OF) and ball fault (BF), and four fault sizes of 0 mm, 0.1778 mm, 0.3556 mm and 0.5334 mm, which are divided into 10 categories (1 health state and 9 fault states), as shown in Table 2.
[0156] Table 2 10 bearing fault states and fault labels
[0157]
[0158] The fault diagnosis tasks are divided according to the openness. The openness calculation formula is: ο=1-(|y s | / |y t |), where |y s | and |y t | represents the total number of fault types in the source domain and the target domain respectively. The fault diagnosis tasks are shown in Table 3.
[0159] Table 3 Fault diagnosis tasks
[0160]
[0161] Each fault sample is set to consist of 1024 continuous sampling data. According to different working conditions, the source domain and target domain are set, where the sample size of each category of source domain training samples is 100, the sample size of each category of target domain training samples is set to 80, and the sample size of each category of target domain test samples is 20. Each migration task is trained five times and the average value is taken. The fault diagnosis results of the test set are shown in Figure 2. Figure 5 As shown. Although, as the openness increases, it is difficult for the model to effectively distinguish between unknown classes and private classes, resulting in a decrease in the fault diagnosis accuracy of the model; but in different openness scenarios, the classification accuracy of the present invention for unknown classes and all samples has achieved a high fault diagnosis accuracy. Among them, the classification accuracy of all samples of task A1→A5 is not less than 99.0%; since the openness of task A6→A8 is higher than that of task A1→A5, the classification accuracy of all samples of task A6→A8 exceeds 80.0%, which fully proves the superiority and feasibility of the present invention.
[0162] Based on the above, the present invention simulates the open set fault diagnosis scenario by limiting the fault types of source domain and target domain training samples; uses the adversarial training method to train private class classifiers and feature extractors to obtain good classification performance of source domain and target domain shared classes, and at the same time establishes boundaries for shared classes and private classes in the target domain, maximizing the prediction divergence of the first auxiliary classifier and the second auxiliary classifier, so as to detect the excluded outlier target domain shared class samples and force the generation of target feature representations similar to the source domain features, thereby improving the cross-domain intelligent fault diagnosis accuracy of the fault diagnosis model under open set conditions.
[0163] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A domain-adaptive confrontation open set cross-domain intelligent fault diagnosis method, characterized in that: The following steps are involved: S1: Simulate an open set fault diagnosis scenario, set the rolling bearing to operate under different working conditions, extract the rolling bearing including but not limited to vibration signals as the original input of the model, and divide the extracted original input signals into a source domain and a target domain, wherein the fault type in the source domain is known, the fault type in the target domain is unknown, and the fault types in the target domain include but are not limited to the known fault types in the source domain; Among them, the labels of samples are divided according to the fault type, and the label space is: in is the label space of the shared class between the source domain and the target domain; (y ukn ) is the private label space in the target domain; S2: intercept the original signal under different working conditions according to the given length and step size to obtain several fault samples x of given length n =[x1,x2,...x m ], where m is the given sample length, and the source domain and target domain are constructed according to the number of samples of each type of fault set; Then the sample space D of the source domain s and the sample space D of the target domain t It is expressed as: Represents a distribution of p s The total number of samples selected from the source domain is n s The sample size of each type of fault is the same; Represents a distribution of p t The total number of samples selected in the target domain is n t The sample size of each type of fault is the same; where p s ≠p t ; Source domain training set D strain , target domain training set D ttrain and the target domain test set D ttest It is expressed as: where n s is the number of samples for source domain training, n1 is the number of samples for target domain training, n2 is the number of samples for test set training, n1+n2=n t ; S3: Constructing a domain-adaptive adversarial open set cross-domain intelligent fault diagnosis model y(x), y = G c1 (G f (x)), mainly including a feature extractor, a gradient reversal layer, a private class classifier, a first auxiliary classifier and a second auxiliary classifier, wherein the first auxiliary classifier and the second auxiliary classifier are respectively: G c2 (·) and G c3 (·), G f (·) is the feature extractor calculation process, G c1 (·) is the calculation process of the private class classifier, and y is the model's prediction of the fault type of the input sample x; S4: Use source domain training samples and target domain training samples to perform domain adaptive adversarial training on the model; S5: Output the trained domain adaptive adversarial open set cross-domain intelligent fault diagnosis model, and verify it through the target domain test set.
2. The domain adaptive confrontation open set cross-domain intelligent fault diagnosis method according to claim 1 is characterized in that: In step S3, the feature extractor automatically extracts deep fault features and inputs them into the private class classifier, the first auxiliary classifier and the second auxiliary classifier respectively; the private class classifier is used to classify the fault type of the target domain, and its output is: (y1, y2, ., ., ., y k ,y k+1 ); The outputs of the first auxiliary classifier and the second auxiliary classifier are used to maximize the classification difference between the two classifiers so as to align the target domain shared class samples with the source domain shared class samples. The outputs of the first auxiliary classifier and the second auxiliary classifier are: (y1, y2, ., ., ., y k ).
3. The domain adaptive confrontation open set cross-domain intelligent fault diagnosis method according to claim 1 is characterized in that: In step S4, the specific steps of the domain adaptive adversarial training include: S401: In order to obtain good classification performance of the shared classes in the source domain and the shared classes in the target domain, the private class classifier is trained to establish the boundary between the shared classes and the private classes in the target domain, that is, to optimize the target loss function: Among them, η is the balance parameter, which is calculated as: η = (k + 3) / 10; the classification loss of the source domain sample is calculated as: L s =L S1 +λ1L S2 +λ2L S3 , the cross entropy loss L of the private class classifier, the first auxiliary classifier, and the second auxiliary classifier S1 , L S2 and L S3 They are calculated as: L adv (x t )=-tlog(G c1 (G(x t ))-(1-t)log(1-G c1 (G(x t ))), the probability of the private class in the target domain is t; S402: By optimizing the objective function, outlier samples in the target domain shared class are aligned with the shared class in the source domain, and the excluded outlier target domain shared class samples are detected. The objective function is: Among them, the divergence between the first auxiliary classifier and the second auxiliary classifier on the target sample prediction is recalculated as: L WCD =ω(x t )||G c2 (G f (x t ))-G c3 (G f (x t ))||, The entropy of the probability distribution predicted by the first auxiliary classifier and the second auxiliary classifier for the target domain sample is re-weighted to calculate the weight of the target sample as follows: Where Z is the normalization constant, ∑ω(x t )=1,p K is the average of the predicted probabilities of the first auxiliary classifier and the second auxiliary classifier for the target domain sample belonging to the shared class c, calculated as: p K =(1 / 2)(G c2 (G f (x t ))+G c3 (G f (x t ))); S403: Force the generation of a target representation consistent with the source domain feature distribution, that is, minimize the divergence between the first auxiliary classifier and the second auxiliary classifier in predicting the target sample to update the feature extractor, and fix the parameters of the special class classifier, the first auxiliary classifier and the second auxiliary classifier, that is, optimize the objective function as follows: S404: Repeat steps S401 to S403 to determine whether the number of model training rounds reaches the set maximum number of iterations. If so, output the model and test it through the target domain test set, using the fault diagnosis accuracy as the evaluation criterion. If not, continue to repeat steps S401 to S403.
4. A domain-adaptive confrontation open set cross-domain intelligent fault diagnosis system, characterized in that: include: A data acquisition module is used to simulate an open set fault diagnosis scenario, set the rolling bearing to operate under different working conditions, extract the rolling bearing including but not limited to vibration signals as the original input of the model, and divide the extracted original input signals into a source domain and a target domain, wherein the fault type of the source domain is known, the fault type of the target domain is unknown, and the fault types in the target domain include but are not limited to known fault types in the source domain; Among them, the labels of samples are divided according to the fault type, and the label space is: in is the label space of the shared class between the source domain and the target domain; (y ukn ) is the private label space in the target domain; Construct source domain and target domain sample modules to intercept the original signals under different working conditions according to the given length and step size to obtain several fault samples x of given length n =[x1,x2,...x m ], where m is the given sample length, and the source domain and target domain are constructed according to the number of samples of each type of fault set; Then the sample space D of the source domain s and the sample space D of the target domain t It is expressed as: Represents a distribution of p s The total number of samples selected from the source domain is n s The sample size of each type of fault is the same; Represents a distribution of p t The total number of samples selected in the target domain is n t The sample size of each type of fault is the same; where p s ≠p t ; Source domain training set D strain , target domain training set D ttrain and the target domain test set D ttest It is expressed as: where n s is the number of samples for source domain training, n1 is the number of samples for target domain training, n2 is the number of samples for test set training, n1+n2=n t ; Construct a fault diagnosis model module to build a domain adaptive adversarial open set cross-domain intelligent fault diagnosis model y(x), y = G c1 (G f (x)), mainly including a feature extractor, a gradient reversal layer, a private class classifier, a first auxiliary classifier and a second auxiliary classifier, wherein the first auxiliary classifier and the second auxiliary classifier are respectively: G c2 (·) and G c3 (·), G f (·) is the feature extractor calculation process, G c1 (·) is the calculation process of the private class classifier, and y is the model's prediction of the fault type of the input sample x; A model training module, used to perform domain adaptive adversarial training on the domain adaptive adversarial open set cross-domain intelligent fault diagnosis model constructed by the fault diagnosis model construction module using the source domain training samples and the target domain training samples generated by the source domain and target domain sample construction module; The model output and verification module is used to output the domain adaptive adversarial open set cross-domain intelligent fault diagnosis model trained by the model training module and verify it through the target domain test set.
5. The domain adaptive confrontation open set cross-domain intelligent fault diagnosis system according to claim 4 is characterized in that: In the domain adaptive adversarial open set cross-domain intelligent fault diagnosis model constructed by the fault diagnosis model building module, the feature extractor automatically extracts deep fault features and inputs them into the private class classifier, the first auxiliary classifier and the second auxiliary classifier respectively; the private class classifier is used for fault type classification in the target domain, and its output is: (y1, y2, ., ., ., y k ,y k+1 ); The outputs of the first auxiliary classifier and the second auxiliary classifier are used to maximize the classification difference between the two classifiers so as to align the target domain shared class samples with the source domain shared class samples. The outputs of the first auxiliary classifier and the second auxiliary classifier are: (y1, y2, ., ., ., y k ).
6. The domain adaptive confrontation open set cross-domain intelligent fault diagnosis system according to claim 4 is characterized in that: The specific steps of the model training module performing domain adaptive adversarial training include: S401: In order to obtain good classification performance of the shared classes in the source domain and the shared classes in the target domain, the private class classifier is trained to establish the boundary between the shared classes and the private classes in the target domain, that is, to optimize the target loss function: Among them, η is the balance parameter, which is calculated as: η = (k + 3) / 10; the classification loss of the source domain sample is calculated as: L s =L S1 +λ1L S2 +λ2L S3 , the cross entropy loss L of the private class classifier, the first auxiliary classifier, and the second auxiliary classifier S1 , L S2 and L S3 They are calculated as: L adv (x t )=-tlog(G c1 (G(x t ))-(1-t)log(1-G c1 (G(x t ))), the probability of the private class in the target domain is t; S402: By optimizing the objective function, outlier samples in the target domain shared class are aligned with the shared class in the source domain, and the excluded outlier target domain shared class samples are detected. The objective function is: Among them, the divergence between the first auxiliary classifier and the second auxiliary classifier on the target sample prediction is recalculated as: L WCD =ω(x t )||G c2 (G f (x t ))-G c3 (G f (x t ))||, The entropy of the probability distribution predicted by the first auxiliary classifier and the second auxiliary classifier for the target domain sample is re-weighted to calculate the weight of the target sample as follows: Where Z is the normalization constant, ∑ω(x t )=1,p K is the average of the predicted probabilities of the first auxiliary classifier and the second auxiliary classifier for the target domain sample belonging to the shared class c, calculated as: p K =(1 / 2)(G c2 (G f (x t ))+G c3 (G f (x t ))); S403: Force the generation of a target representation consistent with the source domain feature distribution, that is, minimize the divergence between the first auxiliary classifier and the second auxiliary classifier in predicting the target sample to update the feature extractor, and fix the parameters of the special class classifier, the first auxiliary classifier and the second auxiliary classifier, that is, optimize the objective function as follows: S404: Repeat steps S401 to S403 to determine whether the number of model training rounds reaches the set maximum number of iterations. If so, output the model and test it through the target domain test set, using the fault diagnosis accuracy as the evaluation criterion. If not, continue to repeat steps S401 to S403.