A Cross-Operating Condition Fault Diagnosis Method and System Based on Open-Set Federated Adversarial Domain Adaptation
By adopting an open-series federal adversarial domain adaptation method in industrial systems, the problems of data silos, unknown faults and multi-conditions are solved, and high accuracy and robust cross-condition fault diagnosis is achieved.
Patent Information
- Application Number
- CN202310862572.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-13
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2043-07-13
AI Technical Summary
Fault diagnosis in industrial systems faces problems such as data silos, unknown faults, lack of labels and multiple operating conditions, and the existing technology is difficult to effectively solve these challenges.
A cross-condition fault diagnosis method based on open set federated adversarial domain adaptation is adopted, and by building an OS-FADA framework, federated learning and adversarial learning are used to realize domain-invariant feature extraction and unknown fault identification under data privacy protection.
It realizes open cluster domain adaptation under data privacy protection conditions, improves the accuracy and robustness of cross-working fault diagnosis, especially in multi-working and unknown fault scenarios.
Smart Images

Figure CN117008570B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fault diagnosis, and particularly relates to a cross-condition fault diagnosis method and system based on open-set federated adversarial domain adaptation. Background Art
[0002] Under the background of the increasing sophistication and complexity of modern industrial equipment, the demand for reducing equipment downtime and maintenance costs has become increasingly strong, which has promoted great progress in fault diagnosis technology in the past few decades. Especially with the development and popularization of machine learning algorithms, data-driven fault diagnosis methods have shone brightly and achieved extremely high-accuracy case applications in many fields such as aviation, energy, and transportation. However, the hidden dangers behind the prosperity cannot be ignored. The success of these machine learning methods often depends on sufficient labeled data. Here, sufficient not only refers to the requirement for the quantity of data, but also the requirement for the variety of data. For some small or newly established enterprises or units, collecting a large amount of data with sufficient quantity and comprehensive coverage for fault diagnosis requires a large amount of investment and time accumulation. Even with the development of the industry and the application of sensors, when the relevant monitoring data reaches a considerable scale, data labeling has become a major obstacle to the perfection of the diagnostic model. Good data labeling work not only requires a large amount of manpower, but also usually has certain requirements for the professional qualities of the labelers. In addition, fault diagnosis work also faces the challenge of unknown faults. The real world is open, and new things may appear at any time. Similarly, unknown fault modes may occur in equipment at different usage times and scenarios. Therefore, the research on diagnostic methods under open-set conditions has strong practical significance.
[0003] Facing the dilemma of insufficient data, a possible solution is to integrate the forces of the industry or region to establish a huge data center that can comprehensively cover equipment usage scenarios, so as to improve the performance and robustness of the fault diagnosis model. However, this solution is difficult to implement in reality. On the one hand, the cost of integrating these data is high and the efficiency is low. On the other hand, due to considerations of interests and privacy, the concentration of data may face commercial and legal risks. The emergence of federated learning has brought an opportunity to break this predicament. Federated learning is a new method for training artificial intelligence models using fragmented data. Through federated aggregation and privacy protection means, it provides a feasible solution for the efficient construction of a high-performance fault diagnosis model with data security.
[0004] Since the data owned by each client in federated learning is not shared with each other, it is difficult to ensure that they still satisfy the independent and identically distributed assumption. How to address the challenge of statistical heterogeneity among multi-party data has always been one of the key points in the research of federated learning. For fault diagnosis tasks, the operating conditions of different devices or device groups usually vary, and the resulting shift in data distribution will cause the convergence of the federated model to slow down or even fail to converge. Guided by the methodology of transfer learning, federated transfer learning is proposed to solve the problem of different data distributions among clients, as shown in Figure 1 (a). The core of federated transfer learning is to learn the feature extraction and fault classification capabilities applicable to the target domain data from the source domain data distribution. However, due to data privacy restrictions, the distance metric-based domain adaptation method widely used in centralized transfer learning methods is difficult to implement in federated transfer learning.
[0005] In fact, cross-condition federated transfer fault diagnosis may face a more severe environment where there are unknown faults and unlabeled data under a certain condition in addition to dealing with data distribution differences. When migrating a diagnostic model trained using source domain data containing only known faults to a target domain containing unknown faults, it is necessary to consider both data distribution differences and label distribution differences. Therefore, the domain adaptation method that aligns the source domain data distribution and the target domain data distribution according to the label marginal distribution will have a greatly reduced effect.
[0006] In recent years, with the popularity of generative adversarial networks, adversarial learning has also become a research hotspot, and domain adaptation tasks are cases where adversarial learning is widely applied. Different from the main goal of the adversarial process in generative adversarial networks, which is to generate new samples, adversarial domain adaptation methods focus on obtaining domain-invariant feature extraction capabilities, thus strongly promoting the success of transfer learning. In addition, the game process in adversarial learning is very beneficial for exploring the potential capabilities of the model. Achieving the open set recognition goal through the game can help the model explore the boundary between known classes and unknown classes. It is worth mentioning that the training strategy based on adversarial learning is usually friendly to data privacy because it does not require the data of multiple clients to appear in the same model at the same time. Summary of the Invention
[0007] The present invention provides a cross-condition fault diagnosis method and system based on open set federated adversarial domain adaptation to solve the technical problems of data islands, unknown faults, lack of labels, and multiple conditions faced by fault diagnosis in current industrial systems.
[0008] An embodiment of the present invention provides a cross-condition fault diagnosis method based on open set federated adversarial domain adaptation, including:
[0009] Construct an OS-FADA framework including a server, a target client, and multiple source clients according to the fault diagnosis task;
[0010] Each selected source client loads the global model parameters of this round sent by the server, and uses the global model parameters of this round to update the local model of the source client on the locally labeled source domain dataset, obtaining the local model parameters of the source client after this round of update, and sending the local model parameters of the source client after this round of update to the server;
[0011] The target client loads the global model parameters of this round sent by the server, and uses the global model parameters of this round to update the local model of the target client on the locally unlabeled target domain dataset, obtaining the local model parameters of the target client after this round of update, and sending the local model parameters of the target client after this round of update to the server;
[0012] The server uses the federated averaging algorithm to perform federated aggregation processing on the local model parameters of multiple source clients after this round of update and the local model parameters of the target client after this round of update, obtaining the global model parameters after federated aggregation processing, and sending the global model parameters after federated aggregation processing to each source client and the target client;
[0013] Repeat the above steps until the local models of each source client and the target client have the cross - operating - condition fault diagnosis ability, enabling each source client and the target client to use their local models for fault diagnosis;
[0014] Wherein, the OS - FADA refers to an open - set federated adversarial domain adaptation model.
[0015] Preferably, the local model of the source client includes a feature extractor, a fault classifier, a distribution generator, and a discriminator; the local model parameters of the source client include the network parameters of the feature extractor, the network parameters of the fault classifier, and the network parameters of the distribution generator; the local model of the target client includes a feature extractor and a fault classifier; the local model parameters of the target client include the network parameters of the feature extractor and the network parameters of the fault classifier; the global model parameters include the network parameters of the feature extractor, the network parameters of the fault classifier, and the network parameters of the distribution generator.
[0016] Preferably, after the OS - FADA framework including a server, a target client, and multiple source clients, it further includes:
[0017] The server initializes the global model parameters to obtain the initialized global model parameters, and simultaneously distributes the feature extractor network parameters and the fault classifier network parameters in the initialized global model parameters to each of the source clients and the target client, and distributes the distribution generator network parameters in the initialized global model parameters to each of the source clients.
[0018] Preferably, after each selected source client loads the global model parameters of this round issued by the server, the training loss of the local model update of the source client includes an adversarial loss and a classification loss L S ; where the adversarial loss includes: a first loss L used to measure the discriminator's judgment of whether a sample is a real feature or a virtual feature D ; a second loss L used to measure the judgment that the features extracted from the source domain data are positive samples F ; and a third loss L used to measure the judgment that the generated features are positive samples G .
[0019] Preferably, after the target client loads the global model parameters of this round issued by the server, the training loss of the local model update of the target client includes a classification loss L T .
[0020] Preferably, the labeled source domain data set of each source client refers to the sample data with data labels already annotated and does not include samples with unknown fault modes; the unlabeled target domain data set of the target client refers to the sample data without data labels annotated and includes samples with unknown fault modes.
[0021] Preferably, the federated averaging algorithm includes:
[0022]
[0023]
[0024]
[0025] Among them, the refers to the feature extractor network parameters in the global model parameters; refers to the fault classifier network parameters in the global model parameters; refers to the distribution generator network parameters in the global model parameters; refers to the feature extractor network parameters of the source client or the target client; refers to the fault classifier network parameters of the source client or the target client; refers to the distribution generator network parameters of the source client; m is the number of source clients.
[0026] An embodiment of the present invention further provides a cross-condition fault diagnosis system based on open-set federated adversarial domain adaptation, including:
[0027] A server in the OS-FADA framework, which is used to perform federated aggregation processing on the local model parameters of multiple source clients updated in this round and the local model parameters of the target client updated in this round by using the federated averaging algorithm, obtain the globally aggregated model parameters after federated aggregation processing, and send the globally aggregated model parameters after federated aggregation processing to each source client and the target client; repeat the above steps until the local client models of each source client and the target client have the cross-condition fault diagnosis ability, so that each source client and the target client use their local client models to perform fault diagnosis;
[0028] Each selected source client in the OS-FADA framework is used to load the globally aggregated model parameters in this round issued by the server, and use the globally aggregated model parameters in this round to update the local model of the source client on the locally labeled source domain dataset, obtain the local model parameters of the source client updated in this round, and send the local model parameters of the source client updated in this round to the server;
[0029] The target client in the OS-FADA framework is used to load the globally aggregated model parameters in this round issued by the server, and use the globally aggregated model parameters in this round to update the local model of the target client on the locally unlabeled target domain dataset, obtain the local model parameters of the target client updated in this round, and send the local model parameters of the target client updated in this round to the server;
[0030] Wherein, the OS-FADA architecture refers to the OS-FADA framework including a server, a target client, and multiple source clients constructed according to the fault diagnosis task; the OS-FADA refers to an open-set federated adversarial domain adaptation model.
[0031] Preferably, the local model of the source client includes a feature extractor, a fault classifier, a distribution generator, and a discriminator; the local model parameters of the source client include the network parameters of the feature extractor, the network parameters of the fault classifier, and the network parameters of the distribution generator; the local model of the target client includes a feature extractor and a fault classifier; the local model parameters of the target client include the network parameters of the feature extractor and the network parameters of the fault classifier; the globally aggregated model parameters include the network parameters of the feature extractor, the network parameters of the fault classifier, and the network parameters of the distribution generator.
[0032] Preferably, the server is further configured to initialize the global model parameters to obtain the initialized global model parameters, and simultaneously send the feature extractor network parameters and the fault classifier network parameters in the initialized global model parameters to each of the source clients and the target client, and send the distribution generator network parameters in the initialized global model parameters to each of the source clients.
[0033] The beneficial effects of the present invention include the following:
[0034] 1. An effective solution is proposed for the open-set domain adaptation problem under the condition of data privacy protection;
[0035] 2. An open-set federated domain adaptation framework including two-stage adversarial learning is proposed, which is general for cross-condition open-set fault diagnosis tasks participated by multiple industrial devices or device groups;
[0036] 3. Domain-invariant feature extraction is achieved based on the generative adversarial training strategy and is not affected by the label distribution difference;
[0037] 4. An adversarial learning strategy is deployed to establish the decision boundary between known faults and unknown faults, realizing the ability evolution based on the known fault diagnosis model;
[0038] 5. The effectiveness and superiority of the method are verified on a real gearbox fault data set. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is a schematic diagram of closed-set federated domain adaptation provided by the prior art;
[0040] Figure 2 is a schematic diagram of open-set federated domain adaptation provided by the present invention;
[0041] Figure 3 is a flowchart of a cross-condition fault diagnosis method based on open-set federated adversarial domain adaptation provided by the present invention;
[0042] Figure 4 is a schematic diagram of the OS-FADA framework provided by the present invention;
[0043] Figure 5 is a schematic diagram of a gearbox provided by the present invention;
[0044] Figure 6 is a flowchart of a cross-condition fault diagnosis method based on open-set federated adversarial domain adaptation provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0045] It should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention. In the following description, suffixes such as "module", "component", or "unit" used to represent elements are only for the convenience of describing the present invention and have no specific meaning in themselves. Therefore, "module", "component", or "unit" can be used interchangeably.
[0046] The fault diagnosis of the present invention in current industrial systems faces challenges such as data islands, unknown faults, lack of labels, and multiple working conditions. Combining the advantages of advanced algorithms such as federated learning, adversarial learning, and feature-based transfer learning, a general federated architecture for cross-condition open-set fault diagnosis is established. Considering the risk of data leakage in distance metric-based domain adaptation, we adopt an adversarial learning strategy more suitable for the federated learning framework to achieve privacy-preserving domain adaptation. Adversarial learning is also introduced into the open-set recognition process to stimulate the potential of the diagnostic model to identify unknown faults. Based on this two-stage adversarial training, we propose a new open-set federated adversarial domain adaptation model to help all clients collaboratively promote the evolution of the fault diagnosis model's capabilities. In OS-FADA, the source client obtains the ability to identify unknown faults without unknown fault samples, and the target client quickly forms the ability to diagnose faults without data labels, while not worrying about data privacy, as Figure 2 shown. The verification case of an industrial gearbox shows that in a dataset containing 10 working conditions and 8 fault states, the proposed OS-FADA improves the diagnostic accuracy by more than 20%, effectively solving the more challenging and valuable cross-condition federated open-set fault diagnosis problem.
[0047] Figure 3 is a flowchart of a cross-condition fault diagnosis method based on open-set federated adversarial domain adaptation provided by the present invention, as Figure 3 shown, including:
[0048] Step S101: According to the fault diagnosis task, construct an OS-FADA framework including a server, a target client, and multiple source clients;
[0049] Step S102: Each selected source client loads the global model parameters of this round issued by the server, and uses the global model parameters of this round to update the local model of the source client on the locally labeled source domain dataset to obtain the local model parameters of the source client updated in this round, and sends the local model parameters of the source client updated in this round to the server;
[0050] Step S103: The target client loads the global model parameters of this round sent by the server, and uses the global model parameters of this round to update the local model of the target client on the unlabeled target domain dataset locally, obtaining the local model parameters of the target client after this round of update, and sending the local model parameters of the target client after this round of update to the server;
[0051] Step S104: The server performs federated aggregation processing on the local model parameters of multiple source clients after this round of update and the local model parameters of the target client after this round of update using the federated averaging algorithm, obtaining the global model parameters after federated aggregation processing, and sending the global model parameters after federated aggregation processing to each source client and the target client;
[0052] Step S105: Repeat the above steps until the local models of each source client and the target client have the cross-condition fault diagnosis ability, enabling each source client and the target client to perform fault diagnosis using their local models.
[0053] Among them, the local model of the source client includes a feature extractor, a fault classifier, a distribution generator, and a discriminator; the local model parameters of the source client include the network parameters of the feature extractor, the network parameters of the fault classifier, and the network parameters of the distribution generator; the local model of the target client includes a feature extractor and a fault classifier; the local model parameters of the target client include the network parameters of the feature extractor and the network parameters of the fault classifier; the global model parameters include the network parameters of the feature extractor, the network parameters of the fault classifier, and the network parameters of the distribution generator.
[0054] Specifically, after the OS-FADA framework including a server, a target client, and multiple source clients, it further includes: the server initializes the global model parameters, obtaining the initialized global model parameters, and simultaneously sending the network parameters of the feature extractor and the network parameters of the fault classifier in the initialized global model parameters to each source client and the target client, and sending the network parameters of the distribution generator in the initialized global model parameters to each source client.
[0055] Further, after each selected source client loads the global model parameters of this round sent by the server, the training loss of the local model update of the source client includes an adversarial loss and a classification loss L S ; among them, the adversarial loss includes: the first loss L used to measure the discriminator's judgment of whether a sample is a real feature or a virtual feature D ; the second loss L used to measure the judgment that the features extracted from the source domain data are positive samples F; and a third loss L used to measure and judge that the generated feature is a positive sample G The target client loads the global model parameters of this round sent by the server, and the training loss for updating the local model of the target client includes a classification loss L T .
[0056] Furthermore, the labeled source domain dataset of each source client refers to sample data with labeled data tags and without unknown fault modes; the unlabeled target domain dataset of the target client refers to sample data without labeled data tags and with unknown fault modes.
[0057] Specifically, the federated averaging algorithm includes:
[0058]
[0059]
[0060]
[0061] wherein, the refers to the network parameters of the feature extractor in the global model parameters; refers to the network parameters of the fault classifier in the global model parameters; refers to the network parameters of the distribution generator in the global model parameters; refers to the network parameters of the feature extractor of the source client or the target client; refers to the network parameters of the fault classifier of the source client or the target client; refers to the network parameters of the distribution generator of the source client; m is the number of source clients.
[0062] An embodiment of the present invention further provides a cross-condition fault diagnosis system based on open-set federated adversarial domain adaptation, including: a server in the OS-FADA framework, which is used to perform federated aggregation processing on the local model parameters of multiple source clients updated in this round and the local model parameters of the target client updated in this round by using the federated averaging algorithm, obtain the globally aggregated model parameters, and send the globally aggregated model parameters to each source client and the target client; repeat the above steps until the client local models of each source client and the target client have the cross-condition fault diagnosis ability, so that each source client and the target client use their client local models to perform fault diagnosis; each selected source client in the OS-FADA framework is used to load the globally aggregated model parameters of this round sent by the server, and use the globally aggregated model parameters of this round to update the local model of the source client on the locally labeled source domain dataset, obtain the local model parameters of the source client updated in this round, and send the local model parameters of the source client updated in this round to the server; the target client in the OS-FADA framework is used to load the globally aggregated model parameters of this round sent by the server, and use the globally aggregated model parameters of this round to update the local model of the target client on the locally unlabeled target domain dataset, obtain the local model parameters of the target client updated in this round, and send the local model parameters of the target client updated in this round to the server; wherein, the OS-FADA architecture refers to the OS-FADA framework including a server, a target client, and multiple source clients constructed according to the fault diagnosis task.
[0063] Wherein, the local model of the source client includes a feature extractor, a fault classifier, a distribution generator, and a discriminator; the local model parameters of the source client include the network parameters of the feature extractor, the network parameters of the fault classifier, and the network parameters of the distribution generator; the local model of the target client includes a feature extractor and a fault classifier; the local model parameters of the target client include the network parameters of the feature extractor and the network parameters of the fault classifier; the globally aggregated model parameters include the network parameters of the feature extractor, the network parameters of the fault classifier, and the network parameters of the distribution generator.
[0064] Further, the server is also used to perform initialization processing on the globally aggregated model parameters, obtain the initialized globally aggregated model parameters, and send the network parameters of the feature extractor and the network parameters of the fault classifier in the initialized globally aggregated model parameters to each source client and the target client at the same time, and send the network parameters of the distribution generator in the initialized globally aggregated model parameters to each source client.
[0065] In the cross - operating - condition open - set federated fault diagnosis task, there are n fault data sets that do not share data with each other, including n - 1 labeled source - domain data sets and an unlabeled target - domain data set D T ={X T}, where i = 1, 2, …, n - 1. represents the data sample of the i - th source domain, is the corresponding data label, and X T is the data sample of the target domain. In addition, any source - domain data set X S ={X s1 , X s2 ,..., X sk} contains k types of data, that is, there are k types of fault data. And the target - domain data set X T ={X t1 , X t2 ,..., X tk , X t(k+1)} contains k + 1 types of fault data, where X t(k+1) represents the fault data unique to the target domain.
[0066] In order to be able to efficiently train a fault diagnosis model applicable to both the source domain and the target domain while protecting data privacy, a learning plan based on the federated learning architecture is adopted. The client with labeled training data is called the source client, and the client with unlabeled training data is called the target client. To better achieve cross - operating - condition fault diagnosis under open - set conditions, the following assumptions are made in this paper:
[0067] (1) The source client and the target client jointly train a fault diagnosis model to enable it to have the open - set fault diagnosis ability of domain adaptation;
[0068] (2) Due to different operating - condition conditions such as rotational speed and load, the distribution of fault data among clients is different, and each data set does not follow the independent and identically - distributed assumption;
[0069] (3) The label spaces of each source client are the same and are subsets of the label space of the target client;
[0070] 1. Mechanism analysis
[0071] The basic fault diagnosis model usually consists of two parts: a feature extractor F(·) and a fault classifier C(·). During the training process, without corresponding supervision, the feature extractor often learns domain-related features, which seriously hinders the application of the fault diagnosis model under different working conditions. Therefore, how to learn domain-invariant fault features and achieve efficient feature transfer is of great significance for cross-condition fault diagnosis. Under the condition of centralized learning, the distance metric such as the maximum mean discrepancy (MMD) can be used to narrow the difference in feature distributions between different domains, so as to learn domain-invariant features. However, in the federated learning architecture with privacy protection characteristics, the local data sets of different working conditions cannot be accessed by other clients and servers, resulting in difficulty in aligning the feature distributions of different domains.
[0072] Although the difference in cross-condition fault feature distributions cannot be directly measured by distance metrics, by iteratively generating a hypothetical feature distribution and approaching the feature distributions of different domains to the generated distribution, the generated distribution can be gradually trained into a truly domain-invariant feature distribution. To achieve this concept, inspired by the generative adversarial network, a distribution generator G(·) and a discriminator D(·) are added to the fault diagnosis model. Different from the process in common generative adversarial models where generated samples approach real samples, the proposed method hopes that the distribution of real fault features approaches the generated distribution. The features output by the feature extractor F(·) of each client need to be able to confuse the discriminator while being used for the classification task, making it difficult for the discriminator to distinguish whether the features come from real data or the distribution generator. On the other hand, the distribution generator is shared in the federated architecture, so the feature distributions of each client approach the same distribution, and finally a domain-invariant fault feature distribution and a feature extractor F(·) that can extract domain-invariant features are obtained.
[0073] In addition to helping obtain domain-invariant feature distributions, adversarial learning methods also have great potential in the field of open-set recognition. For an unlabeled data sample, the classifier can be trained to accept it as belonging to an unknown fault with a certain probability. On the contrary, the feature extractor is trained to increase or decrease the probability of classifying it as an unknown fault to increase the loss of the classifier. When this adversarial reaches equilibrium, the feature extractor and the classifier can relatively accurately construct the decision boundary between known and unknown faults.
[0074] Based on the above analysis, this study proposes a domain adaptation open-set fault diagnosis method that includes two-stage adversarial learning. The first-stage adversarial learning obtains a domain-invariant feature extraction model from multiple source domain data, and the second-stage adversarial learning obtains the diagnostic ability for unknown fault categories from unlabeled target domain data. By integrating this two-stage adversarial learning method into the federated learning architecture, a cross-condition open-set fault diagnosis model with data privacy protection capabilities is proposed.
[0075] As Figure 4 shown, the proposed open-set federated adversarial domain adaptation fault diagnosis model consists of a central server and n clients. Each client can only access the local dataset and the model parameters from the server, and the server can only access the model parameters of each client. For the convenience of description and reading, the symbols used in this paper are shown in Table 1.
[0076] Table 1 Meanings of Markings
[0077]
[0078] The source client model consists of four parts: a feature extractor F(·), a fault classifier C(·), a distribution generator G(·), and a discriminator D(·). The feature extractor F is used to extract potential fault features from the original fault data. The fault classifier C establishes the mapping between features and fault labels. The distribution generator G takes noise and a one-hot form of the fault label vector as inputs and generates virtual features that follow a specific distribution. The discriminator D receives the real features from the feature extractor and the virtual features from the distribution generator, distinguishes them, and outputs the probability that the received sample is a virtual feature. During the training process of the source client local model, the discrimination ability of the discriminator for the extracted features and the generated features and the extraction ability of the feature extractor for the real features that can confuse the discriminator are alternately improved. When the discriminator has difficulty excluding real features from virtual features, it indicates that the real fault feature distribution has approached the assumed distribution. The feature extractor F, the distribution generator G, and the discriminator D together constitute the generative adversarial learning method, that is, the adversarial learning in the first stage.
[0079] The target client model consists of two parts: a feature extractor F and a fault classifier C, and its model structure is the same as that of the source client. Since the target domain dataset lacks labels and contains unknown fault categories, the basic classification ability of its feature extractor and fault classifier comes from other source clients, but this is not sufficient to diagnose unknown faults. To enable the model to have the open-set recognition ability, the classifier is trained to output p(y = k + 1|X T ) = t, indicating that the sample is classified as an unknown class with probability t, and the feature extractor is trained to deceive the classifier and increase the error of the classifier by increasing or decreasing the probability of the unknown class. It is easy to see that when t = 1, the classifier tends to discriminate that all samples are unknown classes, and the feature extractor tends to construct a feature distribution similar to the known classes. According to the literature, when t is set to 0.5, the feature extractor and the fault classifier can better construct the decision boundary between the known classes and the unknown classes through adversarial training, that is, the adversarial learning in the second stage.
[0080] The central server performs federated aggregation on the feature extractor F, the fault classifier C, and the distribution generator G. After the first-stage adversarial learning and federated aggregation, the feature distribution generated by the distribution generator does not change with the domain, and the features extracted by the feature extractor gradually approach this distribution, thus realizing domain-invariant feature extraction. On this basis, after the second-stage adversarial learning and federated aggregation, the fault classifier realizes the co-evolution of the known fault diagnosis ability from the source client and the unknown fault diagnosis ability from the target client, enabling the global model to have the open-set fault diagnosis ability across working conditions.
[0081] 2. Training Process
[0082] Figure 6 Shows the main process of OS-FADA training, including 4 core steps: model initialization, local training of the source client and the target client respectively, and federated aggregation of the model.
[0083] 2.1 Initialization
[0084] In the federated learning architecture including the server, the source client, and the target client, the first step of model training is initialization. The feature extractor F(·) and the fault classifier C(·) initialized by the server are shared among all clients, and the distribution generator G(·) is shared among the source clients. At the same time, each source client performs the initialization of the discriminator D(·). On this basis, the source client and the target client respectively perform iterative training using local data.
[0085] 2.2 Local Training of Source Domain Clients
[0086] After loading the model parameters of the feature extractor, the fault classifier, and the distribution generator from the server, the training loss guiding the local model update of the source client includes two parts: one part is the adversarial loss, and the other part is the classification loss.
[0087] The adversarial loss The loss of the source client during the training of the feature extractor through the generative adversarial learning method is described by the adversarial loss, including three parts: L D 、L F and L G .
[0088] L D is used to measure the loss generated by the discriminator's judgment of whether a sample is a real feature or a virtual feature. The so-called real feature refers to the feature vector f S obtained after the source domain data sample x r passes through the feature extractor F(·), and the virtual feature is a vector f of the same dimension generated by the distribution generator G(·) according to the noise z S ),while the virtual feature is a vector f of the same dimension generated by the distribution generator G(·) according to the noise z v= G(z). As described above, virtual features are regarded as positive samples, and real features are negative samples. Using real features or virtual features and x S and the one-hot vector of the corresponding label y as inputs, the discriminator D(·) outputs the probability that it is a positive sample. Therefore, L D can be expressed as:
[0089]
[0090] where p(f r ) represents the distribution of real features, and p(f v ) represents the distribution of virtual features. x S represents the fault sample data on the source client side (x T represents the fault sample data on the target client side), y represents the fault label corresponding to x S in the form of a one-hot vector (for example, if there are a total of 3 types of faults, the one-hot vector form of the label "fault 1" is represented as (1, 0, 0), the one-hot vector form of the label "fault 2" is represented as (0, 1, 0), and so on), z represents the randomly generated noise, D(f|y) represents the output obtained by inputting the feature f with y as the label into the discriminator (the same applies to the rest of the feature extractor F(·), etc.), represents the average value of the values in the parentheses.
[0091] L F is used to measure the loss generated by judging that the features extracted from the source domain data are positive samples. When the discriminator has the ability to distinguish positive and negative samples, the features extracted by the feature extractor need to deceive the discriminator, that is, let the discriminator think that the real features are virtual features. L F can be expressed as:
[0092]
[0093] L G is used to measure the loss generated by judging that the generated features are positive samples. For a fixed discriminator, by reducing L G , the ability of the distribution generator can be improved, so as to generate a more reasonable domain-invariant feature distribution. L G can be expressed as:
[0094]
[0095] The design of the above adversarial loss is inspired by the literature, and the least squares loss helps to improve the convergence performance of the model.
[0096] Classification loss Source client fault classification loss L SMeasured by the cross-entropy function, it is used to guide the update of the feature extractor and the fault classifier. L S Can be expressed as:
[0097]
[0098] p(C(·)=y s |x s ) represents that when taking x s as the input, the fault classifier correctly classifies it into the true fault type y s with probability.
[0099] 2.3 Target Client Local Training
[0100] The target client only contains the feature extractor G and the fault classifier C. After loading the global parameters, they are trained with the help of the classification loss L T Unlike the source client, L T is measured by the binary cross-entropy function:
[0101]
[0102] where t = 0.5 is used to more reasonably divide the known and unknown fault types in the target domain.
[0103] 2.4 Server Federated Aggregation
[0104] The server randomly selects m out of n - 1 source clients in each communication round to participate in the federated learning process together with the target client, and distributes the global model parameters to the clients. After the local training of each client is completed, the model parameters of the feature extractor G, the fault classifier C, and the distribution generator G from the clients are integrated by means of the federated averaging algorithm to obtain a new round of global model parameters. The federated averaging algorithm can be expressed as:
[0105]
[0106]
[0107]
[0108] 2.5 Optimization Scheme
[0109] The complete optimization scheme of OS-FADA is shown in Algorithm 1, which generally includes two parts: server update and client update, and the two updates are interspersed.
[0110] The server update aims to organically integrate the capabilities of the source client model and the target client model through the federated averaging algorithm, and realize the evolution of the global fault diagnosis model in the domain-invariant feature extraction ability and the open-set recognition ability.
[0111] Since the focus points of the source client and the target client model capabilities are different, their update strategies are not consistent. The source client first updates the feature extractor and the fault classifier based on the classification loss L S Update the feature extractor and the fault classifier:
[0112]
[0113]
[0114] Immediately afterwards, adversarial training is carried out to improve the generation of domain-invariant fault feature distributions, and the feature extractor, the fault classifier, and the distribution generator are updated by the following formula:
[0115]
[0116]
[0117]
[0118] A gradient reversal layer is introduced between the feature extractor and the fault classifier of the target client to achieve the effect of adversarial training, and their parameters are updated according to L T to obtain the update. While the fault classifier iterates to reduce L T the feature extractor hopes to increase the classification loss:
[0119]
[0120]
[0121] where η represents the learning rate and ω· represents the parameters of the corresponding model.
[0122]
[0123]
[0124] 3. Case Study
[0125] 3.1 Data Description
[0126] To verify the effectiveness of the method proposed in this paper, the industrial gearbox dataset released by the 2009 PHM Data Challenge is used for case verification. The gearbox dataset is collected from an industrial two-stage reduction gearbox, and two types of gears can be deployed inside it: spur gears and helical gears. This case takes the reduction gearbox with spur gears deployed as an example, and its internal composition structure is as Figure 5 shown, including three shafts, four gears, and six bearings. At the input and output ends of the gearbox,
[0127] The test data set contains vibration data of gearboxes in eight different fault states (including the normal state) under ten working conditions. The working conditions include five rotational speed conditions: 30, 35, 40, 45, 50 Hz and two load conditions: low load and high load. The eight fault states include gear faults, bearing faults, shaft faults and their combinations. The detailed fault information is shown in Table 2.
[0128] Table 2 Description of Gearbox Fault States
[0129]
[0130]
[0131] In Table 2, "CT" represents tooth missing; "EF" represents eccentricity fault; "BT" represents tooth breakage; "BF" represents ball fault; "IRF" represents inner raceway fault; "ORF" represents outer raceway fault; "SI" represents shaft imbalance; "KS" represents keyway shear; the blank space represents that the corresponding component of the gearbox is normal.
[0132] The federated learning architecture established in this case contains one server and ten clients. Each client has data of gearboxes in multiple different fault states under one working condition. After 1 / 3 downsampling, the original signal is segmented into 100 data samples with a length of 1600 sampling points. The first 80 samples under each fault state are used as training data, and the remaining 20 samples are used as test data. To better verify the effectiveness of the proposed OS-FADA, the clients corresponding to the ten working conditions are sequentially used as the target client, and the remaining nine clients are all source clients. The local data set of the source client includes vibration samples and corresponding labels of seven fault states, namely Spur1 - Spur 7, under this working condition, while the local data set of the target client includes unlabeled vibration samples of all eight fault states under this working condition (the samples used for testing are labeled).
[0133] The proposed OS-FADA in the federated architecture containing multiple source domain datasets and unlabeled target domain datasets achieves accurate diagnosis of known and unknown faults. Its advantages mainly come from the application of a two-stage adversarial learning strategy. First, the generative adversarial domain adaptation strategy abandons the traditional idea of making the feature spaces of the source domain and the target domain coincide. Instead, it generates a non-existent space and makes it a domain-invariant feature space through adversarial training, thus achieving domain adaptation under multiple working conditions and having more stable performance than other methods in the open-set scenario. Then, the adversarial training strategy between the feature extractor and the fault classifier in the target client helps the classifier strengthen the boundary of known faults. By guiding the classifier to reject classifying samples belonging to the unknown class as known classes through a reasonable acceptance probability of the unknown class, the diagnosis of unknown faults is finally realized. The two-stage adversarial learning strategy perfectly fits the federated learning architecture, makes full use of the transfer of the model in the federated architecture to build a link for the co-evolution of model capabilities. All clients contribute to the cross-condition open-set fault diagnosis task and also obtain diagnostic capabilities that they do not originally have or are difficult to obtain.
[0134] Although the proposed method has a considerable improvement in diagnostic accuracy compared with other methods, the diagnostic accuracy of a small number of clients is relatively low, which may be related to the poor feature transferability between these working conditions and the target working condition. When the change of working condition has a deep impact on the fault manifestation and even the fault mechanism, the improvement brought by advanced federated transfer methods is limited, and it may be necessary to further analyze the internal relationship between the fault state and the monitoring data.
[0135] In real industrial systems, it has become a normal phenomenon that fault data cannot be shared among equipment users and there are differences in working conditions. The lack of fault labels and potential unknown faults are also the difficulties that the fault diagnosis task urgently needs to break through. In this paper, a cross-condition fault diagnosis method based on open-set federated adversarial domain adaptation is proposed to solve the problems of multi-condition domain adaptation and unknown fault identification under data privacy protection. In OS-FADA, we design a two-stage adversarial learning strategy based on the federated learning architecture. First, aiming at the problem that traditional label-alignment-based domain adaptation methods are not applicable to the open-set scenario, we propose the idea of aligning the feature distribution with the generated distribution, and use the characteristic that the generated distributions of each client are the same under the federated architecture to extract domain-invariant fault features. Then, an unknown fault identification mechanism based on the two-player minimax game is proposed to realize the evolution of the global diagnostic ability under the federated architecture.
[0136] The gearbox fault diagnosis case shows that the diagnostic accuracy of OS-FADA has been improved by more than 20% compared with other methods, and the most leading results have been achieved in both domain adaptation and open-set recognition. In the current situation where the problem of data islands is becoming increasingly serious, OS-FADA points out the direction for the rapid formation of fault diagnosis capabilities and the continuous evolution of models.
[0137] In the future, the effectiveness of this method will be verified in more general scenarios, such as adding challenges like sample imbalance and small samples. In addition, the theory of lifelong learning can be of great benefit to federated fault diagnosis, and it is also a topic worth exploring to continuously evolve the diagnostic model in an environment where the data volume and fault patterns are constantly growing and evolving.
[0138] The preferred embodiments of the present invention have been described above with reference to the accompanying drawings, but the scope of the present invention is not limited thereby. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention shall fall within the scope of the present invention.
Claims
1. A cross-condition fault diagnosis method based on open-set federated adversarial domain adaptation, characterized in that, it includes: Construct an OS-FADA framework including a server, a target client, and multiple source clients according to the fault diagnosis task; Each selected source client loads the global model parameters of this round issued by the server, and uses the global model parameters of this round to update the local model of the source client on the locally labeled source domain dataset, obtaining the local model parameters of the source client after this round of update, and sending the local model parameters of the source client after this round of update to the server; The target client loads the global model parameters of this round issued by the server, and uses the global model parameters of this round to update the local model of the target client on the locally unlabeled target domain dataset, obtaining the local model parameters of the target client after this round of update, and sending the local model parameters of the target client after this round of update to the server; The server uses the federated averaging algorithm to perform federated aggregation processing on the local model parameters of multiple source clients after this round of update and the local model parameters of the target client after this round of update, obtaining the global model parameters after federated aggregation processing, and sending the global model parameters after federated aggregation processing to each source client and the target client; wherein, the federated averaging algorithm includes: Among them, The refers to the feature extractor network parameters in the global model parameters; the refers to the fault classifier network parameters in the global model parameters; the refers to the distribution generator network parameters in the global model parameters; the refers to the feature extractor network parameters of the source client or the target client; the refers to the fault classifier network parameters of the source client or the target client; the refers to the distribution generator network parameters of the source client; where m is the number of source clients. Repeat the above steps until the local models of each source client and the target client have the cross-condition fault diagnosis ability, and each source client and the target client use their local models to perform fault diagnosis; wherein, the OS-FADA refers to an open-set federated adversarial domain adaptation model; wherein, the local model of the source client includes a feature extractor, a fault classifier, a distribution generator, and a discriminator; the local model parameters of the source client include the network parameters of the feature extractor, the network parameters of the fault classifier, and the network parameters of the distribution generator; the local model of the target client includes a feature extractor and a fault classifier; the local model parameters of the target client include the network parameters of the feature extractor and the network parameters of the fault classifier; the global model parameters include the network parameters of the feature extractor, the network parameters of the fault classifier, and the network parameters of the distribution generator.
2. The method according to claim 1, characterized in that, after the OS-FADA framework including a server, a target client, and multiple source clients, it further includes: The server performs initialization processing on the global model parameters, obtaining the initialized global model parameters, and simultaneously sending the network parameters of the feature extractor and the network parameters of the fault classifier in the initialized global model parameters to each source client and the target client, and sending the network parameters of the distribution generator in the initialized global model parameters to each source client.
3. The method according to claim 1, characterized in that, After each selected source client loads the global model parameters of this round sent by the server, the training loss for the update of the source client's local model includes an adversarial loss and a classification loss ; among them, the adversarial loss includes: a first loss used to measure the loss generated when the discriminator judges whether a sample is a real feature or a virtual feature ; a second loss used to measure the loss generated when judging that the features extracted from the source domain data are positive samples ; and a third loss used to measure the loss generated when judging that the generated features are positive samples .
4. The method according to claim 1, characterized in that, The target client loads the global model parameters of this round sent by the server, and the training loss for updating the local model of the target client includes classification loss .
5. The method according to claim 1, characterized in that, The labeled source domain dataset of each source client refers to the sample data with data labels annotated and without unknown failure modes; the unlabeled target domain dataset of the target client refers to the sample data without data labels annotated and with unknown failure modes.
6. A cross-condition fault diagnosis system based on open-set federated adversarial domain adaptation, characterized in that, it includes: The server in the OS-FADA framework is used to perform federated aggregation processing on the local model parameters of multiple source clients updated in this round and the local model parameters of the target client updated in this round by using the federated averaging algorithm, obtain the globally aggregated model parameters after federated aggregation processing, and send the globally aggregated model parameters after federated aggregation processing to each source client and the target client; Repeat the above steps until the local client models of each source client and the target client have the cross-condition fault diagnosis ability, so that each source client and the target client use their local client models to perform fault diagnosis; among them, the federated averaging algorithm includes: Among them, The refers to the network parameters of the feature extractor in the global model parameters; the refers to the network parameters of the fault classifier in the global model parameters; the refers to the network parameters of the distribution generator in the global model parameters; the refers to the network parameters of the feature extractor of the source client or the target client; the refers to the network parameters of the fault classifier of the source client or the target client; the refers to the network parameters of the distribution generator of the source client; where m is the number of source clients. Each selected source client in the OS-FADA framework is used to load the globally aggregated model parameters of this round issued by the server, and use the globally aggregated model parameters of this round to update the local model of the source client on the locally labeled source domain dataset, obtain the local model parameters of the source client updated in this round, and send the local model parameters of the source client updated in this round to the server; The target client in the OS-FADA framework is used to load the globally aggregated model parameters of this round issued by the server, and use the globally aggregated model parameters of this round to update the local model of the target client on the locally unlabeled target domain dataset, obtain the local model parameters of the target client updated in this round, and send the local model parameters of the target client updated in this round to the server; Among them, the OS-FADA framework refers to the OS-FADA framework including a server, a target client and multiple source clients constructed according to the fault diagnosis task; the OS-FADA refers to an open-set federated adversarial domain adaptation model; Among them, the local model of the source client includes a feature extractor, a fault classifier, a distribution generator and a discriminator; the local model parameters of the source client include the network parameters of the feature extractor, the network parameters of the fault classifier and the network parameters of the distribution generator; the local model of the target client includes a feature extractor and a fault classifier; the local model parameters of the target client include the network parameters of the feature extractor and the network parameters of the fault classifier; the globally aggregated model parameters include the network parameters of the feature extractor, the network parameters of the fault classifier and the network parameters of the distribution generator.
7. The system according to claim 6, characterized in that, The server is also used to perform initialization processing on the global model parameters to obtain the initialized global model parameters, and simultaneously send the feature extractor network parameters and the fault classifier network parameters in the initialized global model parameters to each of the source clients and the target client, and send the distribution generator network parameters in the initialized global model parameters to each of the source clients.
Citation Information
Patent Citations
Domain generalization method based on federal learning
CN114399055A
Mechanical fault diagnosis method and system based on federal domain generalization
CN114818996A