Mechanical fault diagnosis method and system based on federal general multi-source domain self-adaption
Through the Federal General Multi-source Domain Adaptive Mechanical Fault Diagnosis Method, unsupervised knowledge transmission is used to use the Federal General Multi-source Deep Adversarial Network to solve the problems of data distribution differences and privacy protection, and achieve high-precision and efficient fault diagnosis.
Patent Information
- Application Number
- CN202510271875.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2045-03-10
AI Technical Summary
In the prior art, mechanical fault diagnosis models are difficult to adapt to different data distributions when the distribution of training data and test data is large, and due to data privacy protection requirements and data sharing difficulties, the diagnostic accuracy and speed are limited.
The federal general multi-source domain adaptive mechanical fault diagnosis method is adopted, and the federal general multi-source deep adversarial network is used to train and parameter aggregate the model and achieve unsupervised knowledge transmission and data privacy protection through the federal general multi-source deep adversarial network.
On the premise of protecting data privacy, the accuracy and diagnosis speed of mechanical fault diagnosis are improved, adapted to different data distributions, and achieved efficient fault pattern recognition.
Smart Images

Figure CN119782893A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of fault diagnosis, and in particular to a mechanical fault diagnosis method and system based on federated general multi-source domain adaptation. Background Art
[0002] The rapid development of deep learning has greatly promoted the research on mechanical fault diagnosis. Existing research has achieved great success when the distribution of training data and test data is similar and the training data is sufficient. However, due to different working conditions and types of machinery, there are usually significant distribution differences between training data (i.e., source domain) and test data (i.e., target domain). In order to make fault diagnosis models more adaptable to different data distributions, domain adaptation (DA) technology has received increasing attention, among which the unsupervised DA setting (i.e., the data in the target domain is completely unlabeled) is the most challenging.
[0003] Unsupervised DA can be divided into non-general DA and general DA according to whether the category of the target domain is known. According to the category relationship between the source domain and the target domain, non-general DA methods are divided into closed set DA, partial DA and open set DA, but they all assume that the failure mode of each domain is known. Closed set DA assumes that the two domains share the same failure mode. Partial DA assumes that the failure mode of the source domain contains the failure mode of the target domain. Open set DA assumes that the target domain has invisible failure modes. In recent years, some studies have tried to address the challenges of the non-general DA problem and achieved good results.
[0004] However, in most fault diagnosis cases, it is relatively difficult to know the relationship between the source domain and target domain fault modes in advance. Therefore, general DA has received more attention in recent years. General DA means that when the fault mode of the target domain is unknown, the labeled source domain knowledge should be transferred to the target domain. If the fault mode of the target domain is contained in the fault mode space of the source domain, the model needs to output the correct fault mode; if the fault mode of the target domain does not appear in the source domain, the model needs to mark it as an unknown mode.
[0005] Since there may be a wide variety of machine failures in the source domain, a limited variety of failure modes are usually included in the target domain. However, in practice, it is usually difficult to obtain enough high-performance raw data and failure modes for a single source domain due to the high cost. In order to expand the dataset at a lower cost, the individual data of multiple source domains that share similar mechanisms can be directly integrated. However, industrial users usually have potential conflicts of interest and are generally unwilling to share their own data. Therefore, direct data aggregation is not feasible. Summary of the invention
[0006] The embodiment of the present application provides a mechanical fault diagnosis method and system based on federated universal multi-source domain adaptation to solve the problem of difficulty in sharing source domain data in the prior art. The federated universal multi-source deep adversarial network proposed in this application is a model based on federated universal multi-source domain adaptation for real-time mechanical fault diagnosis. While protecting the privacy of industrial user data, it provides high-precision and low-latency diagnostic services.
[0007] On the one hand, the embodiment of the present application provides a mechanical fault diagnosis method based on federated general multi-source domain adaptation, including: Extracting target sample features of target samples in the target domain; Determine a pseudo margin vector of the target sample according to the target sample feature, and determine a source class weight and a target sample weight of the target domain based on the pseudo margin vector; Generate initial parameters, and send the initial parameters, source class weights, and target sample weights to each source domain and target domain, wherein the initial parameters include source domain parameters and target domain parameters, the source domain parameters include parameters of feature extractors, discriminators, and classifiers in each source domain, and the target domain parameters include parameters of feature extractors, discriminators, and classifiers in the target domain; Initialize the feature extractor, discriminator and classifier in the source domain and the feature extractor, discriminator and classifier in the target domain respectively using initial parameters; Using source samples and source class weights in the source domain to train a local model in the source domain, the local model in the source domain includes a feature extractor, a discriminator, and a classifier in the source domain; using target samples and target sample weights to train a local model in the target domain, the local model in the target domain includes a feature extractor and a discriminator in the target domain; After each training, the source domain parameters, target domain parameters, source class weights, and target sample weights are updated, and the updated source domain parameters and target domain parameters are aggregated to obtain aggregated parameters; The local model in the source domain and the local model in the target domain are updated using the aggregation parameters, the updated local model in the source domain is trained using the source samples and the updated source class weights, and the updated local model in the target domain is trained using the target samples and the updated target sample weights; Repeat the local model training and parameter aggregation operations until the stopping condition is reached to obtain the global model; The global model is used to perform fault detection on the data to be diagnosed.
[0008] On the other hand, the embodiment of the present application also provides a mechanical fault diagnosis system based on federated general multi-source domain adaptation, including: The cloud server is used to extract target sample features of target samples in the target domain, determine a pseudo margin vector of the target sample according to the target sample features, and determine a source class weight and a target sample weight of the target domain based on the pseudo margin vector; the cloud server also generates initial parameters, and sends the initial parameters, the source class weight and the target sample weight to each source domain and the target domain, wherein the initial parameters include source domain parameters and target domain parameters, the source domain parameters include parameters of a feature extractor, a discriminator and a classifier in each source domain, and the target domain parameters include parameters of a feature extractor, a discriminator and a classifier in the target domain; The client is used to respectively initialize the feature extractor, discriminator and classifier in the source domain and the feature extractor, discriminator and classifier in the target domain using initial parameters; train the local model in the source domain using source samples and source class weights in the source domain, the local model in the source domain including the feature extractor, discriminator and classifier in the source domain; train the local model in the target domain using target samples and target sample weights, the local model in the target domain including the feature extractor and discriminator in the target domain; After each training, the client updates the source domain parameters, target domain parameters, source class weights, and target sample weights. The cloud server aggregates the updated source domain parameters and target domain parameters to obtain aggregated parameters. The client uses the aggregated parameters to update the local model in the source domain and the local model in the target domain, and uses the source samples and the updated source class weights to train the updated local model in the source domain. It uses the target samples and the updated target sample weights to train the updated local model in the target domain. The client and the cloud server repeat the local model training and parameter aggregation operations until the stopping condition is reached to obtain the global model; the client uses the global model to perform fault detection on the data to be diagnosed.
[0009] The mechanical fault diagnosis method and system based on federated universal multi-source domain adaptation in this application have the following advantages: 1. A more practical federated universal multi-source domain adaptation model is proposed, that is, the original data of all domains (including source domains and target domains) cannot be exported from the local client, the failure mode of the target domain is completely unknown, and different source domains have different failure modes. Therefore, knowledge must be transferred from different source domains in an unsupervised manner while protecting data privacy.
[0010] 2. A federated universal multi-source deep adversarial network is proposed to address the challenges of data privacy, diagnostic accuracy, and diagnostic speed faced by the federated universal multi-source domain adaptive model. First, a new joint communication method of local training and cloud parameter aggregation is proposed to protect data privacy. Secondly, the source class weighting method and the target sample weighting method based on marginal theory are very helpful for domain alignment. Of course, all domains share the same model to make the federated universal multi-source deep adversarial network independent of the number of source domains and speed up the diagnosis.
[0011] 3. Extensive experimental results on two rotating machinery datasets demonstrate that the proposed federated universal multi-source deep adversarial network outperforms the state-of-the-art schemes. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0013] Figure 1 A flowchart of a mechanical fault diagnosis method based on federated general multi-source domain adaptation provided in an embodiment of the present application.
[0014] Figure 2 A schematic diagram of the visualization results of task T13 on the CWRU dataset provided in an embodiment of the present application. DETAILED DESCRIPTION
[0015] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0016] Figure 1 The flowchart of the mechanical fault diagnosis method based on federated universal multi-source domain adaptation provided in the embodiment of the present application. The method proposed in the present application has the following assumptions: 1. Train local models together in multiple domains (including source and target domains) with similar machinery but different working conditions. The source domain has labeled data, and the target domain has unlabeled data.
[0017] 2. The failure mode of the target domain is completely unknown, and the failure mode of each source domain is known, but any two source domains have different failure modes.
[0018] 3. The original data of all domains cannot be exported from the client.
[0019] The embodiment of the present application provides a mechanical fault diagnosis method based on federated general multi-source domain adaptation, including: S100, extracting target sample features of target samples in the target domain.
[0020] For example, like the general federated learning framework, the method of the present application is deployed on multiple clients and a cloud server. Each client represents a domain and has local data, where the local data of the source domain is called the source sample and the local data of the target domain is called the target sample. i The set of source samples in the source domain is defined as , i =1,2,···, M ,in, i and j are the labels of the source domain and source samples respectively, and It is i The source domain j source samples and corresponding failure modes, M is the number of source domains, It is from i The number of source samples in a source domain. Similarly, the set of target samples from a target domain is defined as ,in, is the first k target samples, k is the label of the target sample, is the number of target samples.
[0021] set up and Respectively represent i The failure modes of the source and target domains, Indicates i Common failure modes of source and target domains, and They are i Dedicated failure modes for source and target domains, is the failure mode composed of all source domains, is the common failure mode of the source and target domains, It is a dedicated failure mode consisting of source domains.
[0022] The goal of this application is to establish a real-time fault diagnosis model for a target domain with unknown fault modes, i.e., a global model, under the premise that the original data of all domains cannot be exported from the client. The global model is expected to identify the fault modes already contained in the source domain and distinguish the unseen fault modes that only exist in the target domain.
[0023] Inspired by the Generative Adversarial Network (GAN), the local model deployed in the client in this application is based on a domain adversarial network, which is usually divided into three parts: feature extractor G F , Discriminator G D and classifier G C . Feature Extractor G F Aims to confuse the discriminator by learning domain-invariant features G D , discriminator G D Try to use a feature extractor that is not G F Features that distinguish source and target samples in the case of confusion. G C It aims to accurately predict the failure mode of samples. Domain adversarial training reduces the distribution difference between the source and target domains by performing a GAN min-max game.
[0024] In an embodiment of the present application, the feature extractor G F It includes three convolutional modules connected in sequence. The last convolutional module is connected to two fully connected layers connected in sequence. Each convolutional module includes a convolutional layer, a batch normalization layer, an activation function, and a pooling layer connected in sequence. G D It consists of three fully connected layers connected in sequence. G C Includes a fully connected layer.
[0025] Specifically, given an input sample x and its true label y ,First, the feature extractor G F For samples x Perform feature extraction, feature extractor G F The parameters are Then, the extracted features are input into the classifier G C and the discriminator G D In which the classifier GC The output has The predicted labels of the samples of the parameters, the discriminator G D use The parameters determine whether the sample belongs to the source domain or the target domain. This process will first be executed in the target domain. After the client that has deployed the target sample and the local model in the target domain extracts the target sample features, it will proceed to the next step to continue processing.
[0026] S110, determining a pseudo margin vector of the target sample according to the target sample feature, and determining a source class weight and a target sample weight of the target domain based on the pseudo margin vector.
[0027] Exemplarily, the present application calculates the target sample set The pseudo marginal vector of , where the number of failure modes is To further understand the information of each iteration, this application also calculates the cumulative average, that is:
[0028]
[0029] in, and They are t +1 and t The cumulative average after iterations is The r The dimensional data represents the first r The confidence level of each failure mode. The initial value of the cumulative average are all 0, and the number of 0s is The number of failure modes in the T Indicates transpose.
[0030]
[0031] in, E represents the computational expectation, x For the target sample Abbreviation of Represents the target sample x The pseudo margin is the distance between the maximum probability and the second largest probability. In the case of misjudgment and unknown failure modes, the pseudo margin will be very small. Representation classifier G C The best label predicted, Indicates failure mode The number of failure modes in .
[0032]
[0033]
[0034] in, and Represent the target samples x Failure mode and y The probability of , max means taking the maximum value.
[0035] Pseudo Margin Vector No. r The element represents the r The weights of the fault modes can be directly used for source class weighting. The weight of the corresponding failure mode can be expressed as:
[0036] in, Indicates failure mode The source class weights, Indicates the calculation failure mode The pseudo margin.
[0037] Therefore, the pseudo-margin vector It can also be used directly for target sample weighting. In order to make full use of the target samples, this application is based on the pseudo-margin vector The target sample weights are further calculated using pseudo-margin theory, namely:
[0038] in, Represents the target sample The target sample weights, Representation classifier G C Calculated target sample The pseudo margin of Represents the calculation of the best label The pseudo margin.
[0039] S120, generating initial parameters, and sending the initial parameters, source class weights, and target sample weights to each source domain and target domain, wherein the initial parameters include source domain parameters and target domain parameters, the source domain parameters include parameters of feature extractors, discriminators, and classifiers in each source domain, and the target domain parameters include parameters of feature extractors, discriminators, and classifiers in the target domain.
[0040] Exemplarily, the parameters of the feature extractor, discriminator and classifier in the initial parameters can be randomly determined. After the client to which the target domain belongs calculates the source class weight and the target sample weight, it will be sent to the cloud server, and the cloud server will send the generated initial parameters together with the source class weight and the target sample weight to all clients.
[0041] S130, using initial parameters to respectively initialize the feature extractor, discriminator and classifier in the source domain, and the feature extractor, discriminator and classifier in the target domain.
[0042] Exemplarily, initializing the feature extractor, discriminator, and classifier is to set the parameters of these feature extractors, discriminators, and classifiers to the initial parameters sent by the cloud server. At this point, all clients have established their own local models.
[0043] S140, using source samples and source class weights in the source domain to train a local model in the source domain, the local model in the source domain includes a feature extractor, a discriminator and a classifier in the source domain; using target samples and target sample weights to train a local model in the target domain, the local model in the target domain includes a feature extractor and a discriminator in the target domain.
[0044] Exemplarily, the client to which the source domain belongs will train the local model therein using the source samples stored therein and the source class weights received from the cloud server, while the client to which the target domain belongs will train the local model therein using the target samples stored therein and the target sample weights received from the cloud server. Furthermore, the local model in the source domain includes a feature extractor, a discriminator, and a classifier, and these three modules will be trained separately during the training process, while the local model in the target domain also includes a feature extractor, a discriminator, and a classifier, and only the feature extractor and the discriminator are trained during the training process, and the classifier is not trained.
[0045] In the process of training local models in the source domain and the target domain, the classification loss of the classifier and the discrimination loss of the discriminator in the source domain and the target domain are calculated. The sum of the classification loss and the discrimination loss is the total loss. The source domain parameters and the target domain parameters are updated according to the total loss.
[0046] Total loss L It is expressed as:
[0047] in, L C represents the classification loss, L D represents the identification loss.
[0048] In order to fully consider the domain differences between any two different source domains, this application calculates the joint cross entropy loss of the source domain data:
[0049]
[0050] in, Represents the classification loss of the classifier of the local model in the source domain.
[0051] In order to perform domain adversarial network transfer on common failure modes of source and target domains and fully understand the characteristics of the target domain, this application calculates the discrimination loss based on the weighted source classes and the weighted target samples:
[0052] in, represents the discrimination loss of the discriminator of the local model in the source domain, Represents the discriminative loss of the discriminator of the local model in the target domain.
[0053]
[0054]
[0055] S150, after each training, source domain parameters, target domain parameters, source class weights, and target sample weights are updated, and the updated source domain parameters and target domain parameters are aggregated to obtain aggregated parameters.
[0056] Exemplarily, when updating the source domain parameters and the target domain parameters, an adjustment value is determined according to the loss of the classifier in the source domain and the loss of the discriminator in the source domain, and the difference between the current parameter of the feature extractor in the source domain and the adjustment value is used as the updated parameter of the feature extractor in the source domain; Determine the adjustment value according to the loss of the discriminator in the source domain, and use the difference between the current parameter of the discriminator in the source domain and the adjustment value as the updated parameter of the discriminator in the source domain; Determine the adjustment value according to the loss of the classifier in the source domain, and use the difference between the current parameter of the classifier in the source domain and the adjustment value as the updated parameter of the classifier in the source domain; Determine an adjustment value according to the loss of the discriminator in the target domain, and use the sum of the current parameters of the feature extractor in the target domain and the adjustment value as the updated parameters of the feature extractor in the target domain; The adjustment value is determined according to the loss of the discriminator in the target domain, and the difference between the current parameter of the discriminator in the target domain and the adjustment value is used as the updated parameter of the discriminator in the target domain.
[0057] Specifically, since local data cannot be exported from the client, this application proposes a model optimization solution for local model training and cloud aggregation by introducing a gradient reversal layer (GRL) in the back-propagation process.
[0058] In each local training iteration, the gradient reversal layer updates each parameter as follows.
[0059] The updated parameters of the feature extractor in the source domain are:
[0060] The updated parameters of the discriminator in the source domain are:
[0061] The updated parameters of the classifier in the source domain are:
[0062] The updated parameters of the feature extractor in the target domain are:
[0063] The updated parameters of the discriminator in the target domain are:
[0064] in, , , , and They are the feature extractor parameters, discriminator parameters, and classifier parameters in the source domain, and the feature extractor parameters and discriminator parameters in the target domain, respectively. λ 2 is the weight used to balance the classification loss and the discrimination loss, controlling the trade-off between domain alignment and classification performance. δ It is the learning rate parameter, which controls the step size of model parameter update and affects the convergence speed and stability of the model.
[0065] When aggregating the updated source domain parameters and target domain parameters, the sum of the updated parameters of the feature extractor in the source domain and the updated parameters of the feature extractor in the target domain is used as the feature extractor parameters in the aggregated parameters, the sum of the updated parameters of the discriminator in the source domain and the updated parameters of the discriminator in the target domain is used as the discriminator parameters in the aggregated parameters, and the sum of the updated parameters of the classifier in the source domain is used as the classifier parameters in the aggregated parameters.
[0066] Specifically, the aggregated parameters can be expressed as:
[0067]
[0068]
[0069] in, , and They represent the feature extractor parameters, discriminator parameters, and classifier parameters in the aggregation parameters respectively.
[0070] S160, using aggregation parameters to update the local model in the source domain and the local model in the target domain, using source samples and updated source class weights to train the updated local model in the source domain, and using target samples and updated target sample weights to train the updated local model in the target domain.
[0071] Exemplarily, after the cloud server aggregates the parameters of the local models in each client, it obtains aggregate parameters, which include the parameters of each module in the local model. Therefore, when the cloud server sends the aggregate parameters to each client, the local models in these clients can replace the parameters of their own modules with the aggregate parameters, thereby achieving the purpose of updating the local model.
[0072] After updating the parameters of the local model, the updated local model can continue to be trained using the local data in the client, and the updated source class weights and target sample weights will be used during the training process.
[0073] S170, repeat the local model training and parameter aggregation operations until the stopping condition is reached to obtain the global model.
[0074] For example, after an iteration, all clients will upload the parameters of each module in the local model to the cloud server, and the server will aggregate the parameters, that is, new aggregate parameters will be obtained after each iteration. After obtaining the new aggregate parameters, the cloud server will determine whether the stop condition has been met. If the stop condition has been met, the cloud server will stop the iteration and establish a global model according to the current aggregate parameters. If the stop condition has not been met, the cloud server will send the current aggregate parameters to each client for the next iteration.
[0075] In an embodiment of the present application, the stopping condition is that the maximum number of iterations is reached or the optimal parameters are found, and the optimal parameters include optimal feature extraction parameters, optimal identification parameters, and optimal classification parameters.
[0076] Furthermore, the optimal feature extraction parameters are the parameters of the feature extractor when the classification loss is minimized and the discrimination loss is maximized, the optimal discrimination parameters are the parameters of the discriminator when the discrimination loss is minimized, and the optimal classification parameters are the parameters of the classifier when the classification loss is minimized.
[0077] The optimal feature extraction parameters are expressed as:
[0078] The optimal discrimination parameters are expressed as:
[0079] The optimal classification parameters are expressed as:
[0080] in, , and They represent the optimal feature extraction parameters, the optimal discrimination parameters, and the optimal classification parameters, respectively.
[0081] After obtaining the optimal parameters, the cloud server will use these optimal parameters to build a global model. The global model can be the same as the local model in structure and also includes feature extractors, discriminators, and classifiers. After building the global model, the cloud server will send it to each client, and the client will store the global model for later fault detection.
[0082] S180, performing fault detection on the data to be diagnosed using the global model.
[0083] Exemplarily, the source samples, the target samples, and the data to be diagnosed are all mechanical vibration signal data.
[0084] In an embodiment of the present application, the vibration signal data collected from the machine is a time domain signal. The time domain vibration signal data is converted into a frequency domain signal after fast Fourier transform. The frequency domain signal is input into the global model to obtain the final fault detection result.
[0085] The embodiment of the present application also provides a mechanical fault diagnosis system based on federated general multi-source domain adaptation, the system comprising: The cloud server is used to extract target sample features of target samples in the target domain, determine a pseudo margin vector of the target sample according to the target sample features, and determine a source class weight and a target sample weight of the target domain based on the pseudo margin vector; the cloud server also generates initial parameters, and sends the initial parameters, the source class weight and the target sample weight to each source domain and the target domain, wherein the initial parameters include source domain parameters and target domain parameters, the source domain parameters include parameters of a feature extractor, a discriminator and a classifier in each source domain, and the target domain parameters include parameters of a feature extractor, a discriminator and a classifier in the target domain; The client is used to respectively initialize the feature extractor, discriminator and classifier in the source domain and the feature extractor, discriminator and classifier in the target domain using initial parameters; train the local model in the source domain using source samples and source class weights in the source domain, the local model in the source domain including the feature extractor, discriminator and classifier in the source domain; train the local model in the target domain using target samples and target sample weights, the local model in the target domain including the feature extractor and discriminator in the target domain; After each training, the client updates the source domain parameters, target domain parameters, source class weights, and target sample weights. The cloud server aggregates the updated source domain parameters and target domain parameters to obtain aggregated parameters. The client uses the aggregated parameters to update the local model in the source domain and the local model in the target domain, and uses the source samples and the updated source class weights to train the updated local model in the source domain. It uses the target samples and the updated target sample weights to train the updated local model in the target domain. The client and the cloud server repeat the local model training and parameter aggregation operations until the stopping condition is reached to obtain the global model; the client uses the global model to perform fault detection on the data to be diagnosed.
[0086] The following experiments are conducted on the CWRU (dataset from Western Reserve University) and KAT (dataset from University of Paderborn, Germany) datasets.
[0087] To verify the effectiveness, the performance of the federated universal multi-source deep adversarial network is compared with that of six state-of-the-art methods in the experiments.
[0088] Implementation details Failure Mode Collection All failure modes in are considered as “unknown” class. The non-generic method and the generic method are respectively w 0 and the target sample weight is less than w 1( w 0=0.5, w 1=0.5) to determine that the target sample belongs to the unknown class.
[0089] Evaluation details The specific setting is that there are 200 samples of each fault mode in each source domain and 200 unlabeled samples in the target domain.
[0090] 1. Diagnostic accuracy: The average accuracy of |C|+1 fault modes reflects the accuracy of diagnosis.
[0091] 2. Diagnosis speed: Inference latency reflects the diagnosis speed and represents the average running time from inputting raw data to obtaining the failure mode of each sample.
[0092] Experimental results of diagnostic accuracy In the experiment, the accuracy of the proposed federated universal multi-source deep adversarial network and the compared methods are compared under four different settings, and a visual analysis is performed.
[0093] 1. Number of source domains: Fix the common failure modes of multiple source domains and target domains (i.e. |C|=6) and their own private failure modes (i.e. =2 and =2). The number of source domains ranges from 1 to 3. Figure 2 Details of the tasks on the CWRU dataset are shown in .
[0094] Table 1 shows that the Federated Universal Multi-Source Deep Adversarial Network outperforms all the compared methods and maintains high accuracy in all tasks. In addition, the accuracy of the proposed method improves with the increase of the number of source domains. This is because more source domains can learn more transfer knowledge.
[0095] Table 1. The impact of the number of source domains
[0096]
[0097] In Table 2, FedSDA-Combined is a combined method that achieves domain adaptation through a federated communication mode and a majority voting mechanism of multi-source classifiers; FedMDA is a model based on federated multi-source domain adaptation; FedAVG is a federated average algorithm; FedPADA is a federated partial adversarial domain adaptation method; FedWATN is a weighted adversarial transmission network method for mechanical local domain fault diagnosis; FedUAN is a federated universal domain adaptation method; FedNUMDA is a method for solving federated non-universal closed set multi-source domain adaptation.
[0098] 2. The number of target domain-specific failure modes: Determine the number of source domains (i.e., M=3), the common failure modes of multiple source domains, and the common failure modes of the target domain (i.e., |C|=6). s1 ∩C s2 ∩C s3 |=0). Target domain specific failure modes (i.e. ) ranges from 0 to 4. The details of the tasks on the CWRU dataset are listed in Table 2. As can be seen in Table 2, all the compared methods have negative transfer. The federated universal multi-source deep adversarial network is t | improves domain adaptation for all sizes. This is because the federated universal multi-source deep adversarial network gives higher weights to the common failure modes of the multi-source domains and the target domain, making it less dependent on the number of failure modes specific to the target domain.
[0099] Table 2 Impact of the number of target domain-specific failure modes
[0100]
[0101] 2. Overlapping number of common fault modes in multiple source domains: Determine the source domain (i.e., M=3), the common fault modes of multiple source domains and target domains (i.e., |C|=6), and the dedicated fault modes of each source domain and target domain ( =1, = 1). The overlap number of multi-source domains, i.e., common failure modes, ranges from 0 to 4. The detailed information of the tasks on the CWRU dataset is shown in Table 3.
[0102] Table 3 Impact of overlapping times of common fault modes in multiple source domains
[0103]
[0104] As shown in Table 3, as the overlap of common fault modes in multi-source domains increases, the performance of majority voting methods tends to improve, but is still lower than that of federated universal multi-source deep adversarial network. Since majority voting methods do not consider the relationship between any two source domains, their ability to diagnose the same fault mode in different source domains may have different abilities, resulting in negative transfer in the voting process. In contrast, federated universal multi-source deep adversarial network promotes the alignment of common fault modes of sources through joint cross entropy loss, achieving more stable results.
[0105] 3. Overlapping number of fault modes dedicated to multiple source domains: Determine the number of source domains (i.e., M=3), common fault modes of multiple source domains and target domains (i.e., |C|=4), and target domain-specific fault modes (i.e., =2). Multi-source domain-specific failure mode (i.e. |C s1 ∩C s2 ∩C s3 |) ranges from 0 to 4. Table 4 shows the details of the tasks on the CWRU dataset.
[0106] Table 4 Impact of overlapping times of multi-source domain-specific fault modes
[0107]
[0108] Table 4 shows that as the number of overlaps of multi-source domain-specific fault modes increases, the comparison accuracy tends to decrease, and the results of the federated general multi-source deep adversarial network are more stable and superior. Since the federated general multi-source deep adversarial network has a lower weight for source domain-specific fault modes, it is less sensitive to the number of overlaps of multi-source domain-specific fault modes.
[0109] The experimental configuration and experimental results of the DA task are shown in Table 5 to verify the superiority of the federated general multi-source deep adversarial network method in this application on the KAT dataset.
[0110] Table 5 Experimental results on the KAT dataset
[0111]
[0112] 4. Visualization Analysis: In order to more intuitively demonstrate the effectiveness of the Federated Universal Multi-Source Deep Adversarial Network, this application also uses the t-SNE (t-distributed random neighbor embedding) algorithm to reduce the dimensionality of the features extracted by the feature extractor. The visualization results of FedNUMDA and the Federated Universal Multi-Source Deep Adversarial Network on the CWRU dataset in Task T13 are shown in Table 1. It can be seen that the two methods can distinguish H, B, I, and O faults well, and the features of the same fault mode can be clustered together, which illustrates the effectiveness of domain adaptation. However, the FedNUMDA method is poor in distinguishing the different severity of type B faults (i.e., state labels 1, 2, and 3), and the features of these three fault modes are mixed together in two-dimensional space. The Federated Universal Multi-Source Deep Adversarial Network can distinguish these three faults well, indicating that the Federated Universal Multi-Source Deep Adversarial Network can effectively reduce the influence of multi-source domain and target domain-specific fault modes and extract more discriminative features.
[0113] Table 6 shows the average inference delay of the proposed federated universal multi-source deep adversarial network and the three source domains of the comparison methods on two datasets with 64 CPU cores and 528G memory. The inference delay of the federated universal multi-source deep adversarial network and FedAVG, which use only one classifier, is lower than that of the majority voting method using three classifiers. As the number of source domains increases, the advantage of the federated universal multi-source deep adversarial network in diagnosis speed becomes more and more obvious.
[0114] Table 6 Inference latency of all methods
[0115] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0116] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A mechanical fault diagnosis method based on federated general multi-source domain adaptation, characterized in that: include: Extracting target sample features of target samples in the target domain; Determine a pseudo margin vector of the target sample according to the target sample feature, and determine a source class weight and a target sample weight of the target domain based on the pseudo margin vector; Generate initial parameters, and send the initial parameters, the source class weights, and the target sample weights to each source domain and the target domain, wherein the initial parameters include source domain parameters and target domain parameters, the source domain parameters include parameters of a feature extractor, a discriminator, and a classifier in each of the source domains, and the target domain parameters include parameters of a feature extractor, a discriminator, and a classifier in the target domain; Initializing the feature extractor, discriminator and classifier in the source domain, and the feature extractor, discriminator and classifier in the target domain respectively using the initial parameters; Using the source samples in the source domain and the source class weights to train a local model in the source domain, the local model in the source domain includes a feature extractor, a discriminator, and a classifier in the source domain; using the target samples and the target sample weights to train a local model in the target domain, the local model in the target domain includes a feature extractor and a discriminator in the target domain; After each training, the source domain parameters, the target domain parameters, the source class weights, and the target sample weights are updated, and the updated source domain parameters and target domain parameters are aggregated to obtain aggregated parameters; Using the aggregation parameters to update the local model in the source domain and the local model in the target domain, using the source samples and the updated source class weights to train the updated local model in the source domain, and using the target samples and the updated target sample weights to train the updated local model in the target domain; Repeat the local model training and parameter aggregation operations until the stopping condition is reached to obtain the global model; The global model is used to perform fault detection on the data to be diagnosed.
2. The mechanical fault diagnosis method based on federated general multi-source domain adaptation according to claim 1 is characterized in that: In the process of training the local model, the classification loss of the classifier and the identification loss of the discriminator in the source domain and the target domain are calculated, the sum of the classification loss and the identification loss is the total loss, and the source domain parameters and the target domain parameters are updated according to the total loss.
3. The mechanical fault diagnosis method based on federated general multi-source domain adaptation according to claim 2 is characterized in that: The stopping condition is that the maximum number of iterations is reached or the optimal parameters are found, and the optimal parameters include optimal feature extraction parameters, optimal identification parameters and optimal classification parameters.
4. The mechanical fault diagnosis method based on federated general multi-source domain adaptation according to claim 3 is characterized in that: The optimal feature extraction parameters are the parameters of the feature extractor when the classification loss is minimized and the identification loss is maximized, the optimal identification parameters are the parameters of the discriminator when the identification loss is minimized, and the optimal classification parameters are the parameters of the classifier when the classification loss is minimized.
5. The mechanical fault diagnosis method based on federated general multi-source domain adaptation according to claim 1 is characterized in that: When updating the source domain parameters and the target domain parameters, determining an adjustment value according to the loss of the classifier in the source domain and the loss of the discriminator in the source domain, and taking the difference between the current parameter of the feature extractor in the source domain and the adjustment value as the updated parameter of the feature extractor in the source domain; Determine an adjustment value according to the loss of the discriminator in the source domain, and use the difference between the current parameter of the discriminator in the source domain and the adjustment value as the updated parameter of the discriminator in the source domain; Determine an adjustment value according to the loss of the classifier in the source domain, and use the difference between the current parameter of the classifier in the source domain and the adjustment value as the updated parameter of the classifier in the source domain; Determine an adjustment value according to the loss of the discriminator in the target domain, and use the sum of the current parameter of the feature extractor in the target domain and the adjustment value as the updated parameter of the feature extractor in the target domain; An adjustment value is determined according to the loss of the discriminator in the target domain, and a difference between a current parameter of the discriminator in the target domain and the adjustment value is used as an updated parameter of the discriminator in the target domain.
6. The mechanical fault diagnosis method based on federated general multi-source domain adaptation according to claim 1 is characterized in that: When aggregating the updated source domain parameters and the target domain parameters, the sum of the updated parameters of the feature extractor in the source domain and the updated parameters of the feature extractor in the target domain is used as the feature extractor parameters in the aggregated parameters, the sum of the updated parameters of the discriminator in the source domain and the updated parameters of the discriminator in the target domain is used as the discriminator parameters in the aggregated parameters, and the sum of the updated parameters of the classifier in the source domain is used as the classifier parameters in the aggregated parameters.
7. The mechanical fault diagnosis method based on federated general multi-source domain adaptation according to claim 1 is characterized in that: The source samples, the target samples and the data to be diagnosed are all mechanical vibration signal data.
8. The mechanical fault diagnosis method based on federated general multi-source domain adaptation according to claim 7 is characterized in that: The vibration signal data in the time domain is converted into a frequency domain signal after fast Fourier transformation, and the frequency domain signal is input into the global model.
9. A system using the mechanical fault diagnosis method based on federated general multi-source domain adaptation according to any one of claims 1 to 8, characterized in that: include: A cloud server is used to extract target sample features of target samples in a target domain, determine a pseudo margin vector of the target sample according to the target sample features, and determine a source class weight and a target sample weight of the target domain based on the pseudo margin vector; the cloud server also generates initial parameters, and sends the initial parameters, the source class weight and the target sample weight to each source domain and the target domain, wherein the initial parameters include source domain parameters and target domain parameters, the source domain parameters include parameters of a feature extractor, a discriminator and a classifier in each of the source domains, and the target domain parameters include parameters of a feature extractor, a discriminator and a classifier in the target domain; The client is used to respectively initialize the feature extractor, discriminator and classifier in the source domain, and the feature extractor, discriminator and classifier in the target domain using the initial parameters; train the local model in the source domain using the source samples in the source domain and the source class weights, wherein the local model in the source domain includes the feature extractor, discriminator and classifier in the source domain; train the local model in the target domain using the target samples and the target sample weights, wherein the local model in the target domain includes the feature extractor and discriminator in the target domain; After each training, the client updates the source domain parameters, the target domain parameters, the source class weights, and the target sample weights, and the cloud server aggregates the updated source domain parameters and the target domain parameters to obtain aggregated parameters; the client uses the aggregated parameters to update the local model in the source domain and the local model in the target domain, uses the source samples and the updated source class weights to train the updated local model in the source domain, and uses the target samples and the updated target sample weights to train the updated local model in the target domain; The client and the cloud server repeatedly perform local model training and parameter aggregation operations until a stop condition is reached to obtain a global model; the client uses the global model to perform fault detection on the data to be diagnosed.
Citation Information
Patent Citations
Image classification method and system based on label noise domain self-adaption
CN114842267A
Cross-working-condition fault diagnosis method and system based on open set federated adversarial domain adaptation
CN117008570A
Federal transfer learning method and device
CN117689006A
Model and method for multi-source domain adaptation by aligning partial features
US20220138495A1