A harmonic reducer fault diagnosis method and system based on federal prototype domain generalization under unknown working conditions
Patent Information
- Application Number
- CN202610349122.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-20
- Publication Date
- 2026-06-23
Smart Images

Figure CN122262497A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of machine fault diagnosis technology, and in particular to the fault diagnosis of harmonic reducers. Background Technology
[0002] In the context of Industry 4.0, traditional manufacturing is rapidly moving towards intelligence and digitalization. As one of the core supporting equipment in the transformation, industrial robots can complete a series of complex tasks such as precision assembly, welding, spraying, and handling. Harmonic reducers have the advantages of small size, large load capacity, and high precision, and are key components of industrial robots [1]. However, due to the working characteristics of industrial robots, harmonic reducers are in high-speed and high-torque working conditions for a long time, and are extremely prone to tooth breakage, wear and other faults, which leads to a significant reduction in the working efficiency of industrial robots [2]. Therefore, accurate fault diagnosis of harmonic reducers is of great practical significance for improving the reliability and safety of industrial robots.
[0003] In recent years, with the vigorous development of artificial intelligence technology, data-driven intelligent fault diagnosis methods have been successfully developed and applied to the field of harmonic reducer fault diagnosis. Jia et al. [3] used a hidden Markov model to extract the mapping relationship between external excitation and vibration signal of harmonic reducer under actual working conditions, and used a convolutional neural network for fault state identification. Wang et al. [4] proposed a Transformer based on ProbSparse attention mechanism for fault diagnosis of harmonic reducers. Zhou et al. [5] proposed a fault diagnosis method based on a one-dimensional convolutional neural network, which uses time-domain vibration signal as a dataset to train the fault diagnosis model of harmonic reducer. Zhi et al. [6] proposed a fault diagnosis method for harmonic reducers that combines convolutional neural network and long short-term memory network. Long et al. [7] proposed a method that combines sparse autoencoder and support vector machine, which learns from a pose dataset containing various harmonic reducer fault information to build an intelligent fault diagnosis model. The above-mentioned deep learning-based fault diagnosis methods require a large amount of labeled data for training the model. However, in actual industry, it is often expensive to build a sufficient number of labeled harmonic reducer datasets [8]. In addition, due to concerns about data privacy and competition among enterprises, it is difficult for different enterprises to share data on industrial robot harmonic reducers, which further exacerbates the formation of the "data silo" problem [9].
[0004] McMahan et al.
[10] first proposed federated learning (FL) to solve the problem of data silos. It achieves knowledge interaction and sharing by aggregating user model parameters, while protecting data privacy. Although FL has made many research progress in the field of mechanical intelligent fault diagnosis, traditional FL usually assumes that user data distribution is consistent
[11] . However, in reality, different industrial robots have different working conditions, environmental noise and other differences, resulting in significantly different distributions of vibration data of harmonic reducers, which weakens the adaptability of traditional FL in complex industrial robot operation scenarios
[12] .
[0005] As a new research hotspot in federated learning, Personalized Federated Learning (PFL) has been proposed to reduce the impact of data distribution differences on user local models and global models
[13] . PFL trains personalized models for each user to better adapt to user-specific data distributions. Methods such as knowledge distillation and feature enhancement have been introduced into personalized federated learning. To meet the personalized diagnostic needs of different industrial users, Wang et al.
[14] proposed a model-independent knowledge extraction framework based on federated learning, which introduced bidirectional knowledge distillation to mitigate the impact of data distribution differences between different users. Deng et al.
[15] proposed a cross-location mechanical fault diagnosis method based on personalized federated learning, which used user alignment algorithm to eliminate feature differences between users. Li et al.
[16] enhanced user personalized feature information by applying residual multi-head attention mechanism and learned global feature information through global category embedding layer. Wu et al.
[17] analyzed the sensitivity of user models to data distribution and reduced the impact of data distribution differences by aggregating only key parameters. In addition to the above methods, model decoupling strategy is also an effective personalized federated learning scheme. Its core idea is to decouple the user's local model into a shared feature extractor and a private personalized classifier. The shared feature extractor is responsible for capturing general features and using them for user interactions, while the personalized classifier focuses on mining the uniqueness of each user's data, so that the model can better adapt to the specific needs and data distribution of each user
[18] . Lin et al.
[19] divided the power transformer fault diagnosis model in the federated learning framework into shallow and deep layers. The shallow layer shares and aggregates parameters to learn customer features, while the deep layer retains parameters locally to learn user features. Li et al.
[20] decoupled the local diagnosis model, uploaded only the feature extractor model to the server for model aggregation, and used the head model for local personalized updates, realizing multi-user collaborative fault diagnosis under different working conditions. Fan et al.
[21] proposed a personalized federated learning framework based on two components. The first component is the shallow layer of the model for parameter aggregation, and the second component is the deep layer of the model for personalized training. Zhao et al.
[22] proposed a personalized federated learning method based on community awareness. By aggregating the shared layer in each community and introducing the federated community contrastive loss, the model performance in the community is improved. However, the above methods have two potential drawbacks: (1) Most model decoupling strategies treat the last layer of the user model as a personalized layer and the rest as shared layers. This fixed decoupling method is based on prior assumptions and lacks flexibility; (2) The personalized layer relies solely on local data for training, which can easily lead to the loss of global information. In addition, in actual production, the data of the harmonic reducer to be diagnosed is usually collected directly by sensors, and data labeling is time-consuming and laborious. Therefore, users within the federated learning framework may only have unlabeled data.This results in the global model being unable to train a personalized model for users with unlabeled data in the aforementioned personalized federated learning methods, thus affecting the practical application of personalized federated learning frameworks that rely on labeled data for training.
[0006] To overcome the above difficulties, scholars have proposed a federated domain adaptation method to alleviate the impact of insufficient labels and data distribution differences
[23] . This method aligns the feature distribution between labeled data users (source domain) and unlabeled data users (target domain) while protecting user privacy, thereby improving the diagnostic performance of the model on target domain users. Chen et al.
[24] proposed a federated transfer learning method based on maximum average difference, which realized fault diagnosis on unlabeled bearing data of target users. Yuan et al.
[25] introduced subdomain adaptation in the local model training of the federated learning framework, which realized cross-condition collaborative fault diagnosis between unlabeled rolling bearing data and labeled rolling bearing data. Yang et al.
[26] proposed a federated semi-supervised transfer learning fault diagnosis framework based on the distribution centroid medium, which uses the distribution centroid medium to perform targeted transfer learning, reduces the distribution difference between labeled data in the source domain and unlabeled data in the target domain, and achieves good experimental results on bearing and RV reducer datasets. Wang et al.
[27] proposed a bearing cloud-edge collaborative transfer fault diagnosis method, which uses the target adaptation module to eliminate the distribution difference between source domain users and target domain users. Kang et al.
[28] proposed a rolling bearing fault diagnosis method based on federated multi-representation domain adaptation. Zhao et al.
[29] narrowed the distribution difference between source domain user data and target domain user data through federated feature alignment method and joint voting strategy, and obtained good experimental results on three rotating machinery datasets. In the above federated domain adaptation methods, it is usually assumed that the data to be diagnosed by the target domain user can be used for global model training. However, due to the randomness and accidental nature of the occurrence of harmonic reducer faults, it is difficult to obtain the data of the harmonic reducer to be diagnosed in advance, and it cannot effectively participate in the collaborative training within the federated learning framework, thus making the federated domain adaptation method face certain challenges in practical applications.
[0007] The above challenges lead to a more challenging task called federated domain generalization (FDG). In FDG, since the target user's diagnostic data does not participate in the federated learning training process, this places higher demands on the generalization ability of the global model to ensure that it can adapt to the data distribution under unknown working conditions
[30] . To this end, scholars have applied data generation, domain alignment, adversarial generative networks and other methods to federated domain generalization. LI et al.
[31] proposed a reference domain-based federated domain generalization fault diagnosis method, which achieves privacy-preserving feature alignment by constructing a shared reference domain, and achieved good generalization results on the bearing dataset. Zhao et al.
[32] proposed a federated distillation domain generalization framework, which enhances the generalization ability of the model by extracting the domain-invariant features between the real data of rotating machinery and the distillation generated data. Zhao et al.
[33] introduced a two-stage training mechanism in the cloud-edge collaborative bearing fault diagnosis framework to extract domain-invariant features, so that the global model can obtain better diagnostic results on the unseen target domain. Wang et al.
[34] used adversarial generative networks with category information to generate reference distributions and conducted adversarial training between the reference distributions and the real user distributions to achieve bearing fault diagnosis under the federated domain generalization framework. Zhang et al.
[35] proposed a global objective function based on generalization metric to reduce the generalization gap, thereby promoting the uniformity of fairness and flatness among users within the federated domain generalization framework. Li et al.
[36] proposed a federated domain generalization method based on information bottlenecks. The core idea is to use information bottleneck technology and cross-domain reweighting strategy to enhance the generalization of the global model. Chen et al.
[37] proposed a knowledge transfer strategy to enable the global model to acquire generalization knowledge and domain classification knowledge, thereby enabling the global model to generalize to unknown domains. Guo et al.
[38] implicitly learned domain invariant relations from multi-user models to improve the generalization of the global model. In the above federated domain generalization literature, it is usually assumed that the label space and quantity of all user private data are the same. However, as mentioned above, the working conditions, ambient noise, etc. of different industrial robots vary, and the occurrence of harmonic reducer failures is random. These factors may collectively lead to different harmonic reducer fault diagnosis tasks and different amounts of data for different users, that is, an imbalance in the types and quantities of data among users, making it difficult to meet the above assumptions.
[0008] In summary, when solving the generalization problem of federated domain under the privacy distribution of data islands in multi-user industrial robot harmonic reducers, the following challenges are faced: (1) When the global fault diagnosis model is applied to unseen working condition data outside the federated learning framework, the impact of distribution differences caused by data imbalance among users on the model's generalization ability needs to be considered; (2) Traditional model decoupling methods lack flexibility, and the personalized layer only relies on local data for training, which can easily lead to the loss of global information. Summary of the Invention
[0009] The purpose of this invention is to solve the technical problem of federated domain generalization in the context of data silos and privacy distribution of harmonic reducers for multi-user industrial robots, and to provide a method and system for fault diagnosis of harmonic reducers based on federated prototype domain generalization under unknown operating conditions.
[0010] The technical solution adopted by this invention to solve the above problems is: a method for fault diagnosis of harmonic reducers based on federated prototype domain generalization under unknown operating conditions, the method comprising:
[0011] Step 1: The user uses the received global model as the local diagnostic model, improves the source domain user local diagnostic model based on the Adaptive Normalized Hypersphere Network Module (ANHM), and trains the local diagnostic model based on the prior prototype guided learning mechanism (PPGLM).
[0012] The Adaptive Normalized Hypersphere Network Module (ANHM) consists of an Adaptive Normalization Module (ANN) and a Hypersphere Embedding Layer (HE). The ANN adaptively combines Batch Normalization (BN) and Instance Normalization (IN), while the HE maps feature vectors to a unit hypersphere.
[0013] The Prototype-Guided Learning Mechanism (PPGLM) is an optimization objective based on a cosine distance ternary loss function, guided by a fixed prior prototype.
[0014] Step 2: Each user uploads the trained local model parameters to the central server, and the central server updates the global model using the FedAvg algorithm;
[0015] Step 3: The central server distributes the updated global model parameters to all users. Users then use the personalized aggregation strategy DMD based on dynamic model decoupling to reconstruct their local initial model and continue training their local model.
[0016] The personalized aggregation strategy DMD based on dynamic model decoupling includes dynamic personalized layer selection and dynamic aggregation of personalized models. Dynamic personalized layer selection is based on the alignment of the output features of each network layer in the local diagnostic model with the distribution and transmission of user-private data. Dynamic aggregation of personalized models introduces global information by weighted fusion of the personalized layer of each user model with the corresponding layer of the global model.
[0017] Step 4: Iterate through steps 1-3 until the stopping condition is met, then deploy the global diagnostic model to the target domain users for testing, thereby achieving fault diagnosis that is generalized to unknown operating conditions.
[0018] The beneficial effects of this invention are:
[0019] This invention proposes a harmonic reducer fault method and system based on federated prototype domain generalization under unknown operating conditions, which can improve the generalization performance of the model on unknown operating condition data.
[0020] 1. A fault diagnosis method and system based on federated prototype domain generalization is proposed, aiming to achieve effective generalization of harmonic reducer fault diagnosis for unknown operating conditions under the differential distribution of multi-user isolated privacy data.
[0021] 2. Construct an Adaptive Normalized Hypersphere Network (ANHM) module to improve the source domain user local diagnostic model and enhance its ability to extract user local data domain invariant features.
[0022] 3. To improve the generalization ability of the global model to unknown working condition data, a priori prototype-guided learning mechanism (PPGLM) is proposed. This mechanism enhances the consistency of domain-invariant features among all source domain users through explicit alignment, thereby improving the generalization ability of the global model.
[0023] 4. To address the shortcomings of traditional model decoupling methods, a personalized model aggregation strategy based on dynamic model decoupling (DMD) is proposed. This strategy uses the feature distribution transition distance as the basis for selecting the personalized layer, dynamically determines the personalized layer, and performs fusion at the parameter level, effectively mitigating the impact of data distribution differences caused by varying user working conditions and category imbalances.
[0024] This invention is applicable to the fault diagnosis of harmonic reducers under unknown operating conditions. Attached Figure Description
[0025] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is a schematic diagram of a fault diagnosis framework based on federated domain generalization. Figure 2 This forms the framework for the FPDG in this application; Figure 3 A schematic diagram of ANHM; Figure 4 Visualize the relationship between user data and prior fixed prototypes; Figure 5 This refers to the process of building a local initial model based on dynamic aggregation of personalized models. Figure 6 For the SDUST_BD test bench; Figure 7 For PU_BD modular experimental platform; Figure 8 This is a test bench for signal acquisition of harmonic reducers. Figure 9 For the test bench measurement and control system; Figure 10 This is a sensor location map; Figure 11 This is the time-domain plot of the original vibration signal; Figure 12 The time-domain plot of the vibration signal after adding Gaussian noise; Figure 13 The data categories and their quantity distribution for each user in T1-T4; Figure 14The data categories and their quantity distribution for each user in T5-T8; Figure 15 The experimental results are for the comparison method of SDUST_BD; Figure 16 The experimental results are for the comparison method of PU_BD; Figure 17 A comparison of confusion matrices for different methods in task T1; Figure 18 A comparison of confusion matrices for different methods in task T7; Figure 19 Visualize the features of different methods in Task T1; Figure 20 Visualization of the features of different methods in Task T7; Figure 21 The data categories and their quantity distribution for each user in T9-T13; Figure 22 Comparative experimental results of different methods in HRD; Figure 23 The confusion matrix for different methods in the T12 task; Figure 24 Visualize and compare the features of each method in task T12 on the target domain user data. Figure 25 Visualize the data characteristics of all users in task T12 using different methods; Figure 26 Ablation experiment results for different diagnostic tasks; Figure 27 Comparative experimental results of selecting methods for different personalization layers; Figure 28 Select results for the personalized layer for different users. Detailed Implementation
[0027] Combined with appendix Figure 1-28 The implementation of the harmonic reducer fault diagnosis method based on federated prototype domain generalization under unknown operating conditions described in this invention is described below:
[0028] 1. Overview of a Fault Diagnosis Method for Harmonic Reducers Based on Federated Prototype Domain Generalization under Unknown Operating Conditions
[0029] To address the privacy and data silo issues in fault diagnosis of harmonic reducers for multi-user industrial robots, federated learning offers a solution for protecting data privacy through distributed collaborative training of intelligent global diagnostic models. However, when the global fault diagnosis model is applied to unseen operating condition data outside the federated learning framework and when data categories among users are imbalanced, diagnostic performance degrades. Therefore, this paper proposes a fault diagnosis method and system for harmonic reducers based on federated prototype domain generalization under unknown operating conditions. Specifically, firstly, an adaptive normalized hyperspherical module is constructed to enhance the ability of user-local models to extract local data domain-invariant features. Secondly, a local model training mechanism guided by a priori fixed prototype is designed to improve the consistency of domain-invariant features among all users, thereby enhancing the generalization performance of the global model on unseen operating condition data. Finally, to reduce the negative impact of data distribution differences caused by data category imbalance among users, a personalized model aggregation strategy based on dynamic model decoupling is proposed. Experimental results on two public bearing datasets and one self-built harmonic reducer dataset show that the average fault diagnosis accuracy of the proposed method is improved by at least 7.28% compared to other federated domain generalization methods.
[0030] 2. The method follows the following basic assumptions:
[0031] (1) In the federated domain generalization framework, there is a server, multiple source domain users and target domain users. Each source domain user's private data is tagged, but the number of them is small and it is difficult to build a model independently; the target domain user's private data does not contain tags.
[0032] (2) The data of the target domain users comes from unknown working conditions and does not participate in the collaborative training between the source domain users and the server.
[0033] (3) Because the data of each source domain user comes from different operating conditions and the label space is heterogeneous, the distribution of harmonic reducer data among users is different.
[0034] (4) No original data is transmitted between the source domain user and the server, and users cannot communicate with each other. The remaining information interaction process is carried out under the security mechanism to ensure that the information is not accessed, leaked or hijacked.
[0035] Figure 1 This is a schematic diagram of a fault diagnosis framework based on federated domain generalization. Assume there are K source domain users and 1 target domain user. It is a set of K source domain users. The dataset representing the k-th source domain user, and These represent private data and their corresponding labels, N. k This represents the amount of private data. A private dataset representing users in the target domain. N represents private data. * The amount of data represents the quantity of data. The research objective of this paper is to enable individual users to collaboratively train and construct personalized local fault diagnosis models for K users and a global diagnostic model that can be effectively generalized to users in the target domain, under the coordination of a central server, without compromising data privacy, using labeled private harmonic reducer data.
[0036] 3 FPDG Method
[0037] 3.1 Overview of FPDG Method
[0038] like Figure 2 As shown, the FPDG framework proposed in this paper includes a central server, K source domain users, and one target domain user. It aims to collaboratively train and construct personalized diagnostic models suitable for each source domain user and a global diagnostic model that generalizes to unknown operating conditions. The server is responsible for aggregating model parameters from source domain users to update the global model parameters, while source domain users are responsible for training their local models using their own private data and shared prior prototypes. The FPDG method consists of an Adaptive Normalized Hypersphere Module (ANHM), a Prior Prototype Guided Learning Mechanism (PPGLM), and a Personalized Aggregation Strategy (DMD) based on Dynamic Model Decoupling. The ANHM and PPGLM aim to improve the consistency of domain-invariant features among users to enhance the generalization of the global model, while the DMD aims to reduce the impact of differences in data distribution among users.
[0039] Next, the components and strategies of FPDG will be described in detail.
[0040] 3.2 Adaptive Normalized Hyperspherical Module
[0041] The user-local fault diagnosis model is a crucial foundation for the federated domain generalization framework. To enhance the domain-invariant feature extraction capability of the user model, an Adaptive Normalized Hypersphere Module (ANHM) is proposed. This module consists of two parts: an Adaptive Normalization Module (ANN) and a Hypersphere Embedding Layer (HE).
[0042] ANN (Area-invariant representation learning) forms a novel architecture by adaptively combining batch normalization (BN) and instance normalization (IN), dynamically adjusting their contribution ratios using learnable weights. BN standardizes the input data for each batch, enabling faster convergence of the neural network and improving model accuracy. IN calculates the mean and variance for each channel of each sample, standardizing the features of each channel and eliminating statistical differences within samples. Combining BN and IN preserves batch-level statistical features to maintain discriminative power while removing domain-specific features from user-private data, thus flexibly adapting to different tasks and data distributions. The mathematical expression of ANN is:
[0043] (1)
[0044] in, These are the inputs and outputs of the current layer. and These are the mean and variance captured by the IN layer, respectively.
[0045] and These are the mean and variance captured by the BN layer, respectively. , , , These are affine parameters. It is used for stable minimum values. and It represents the weight ratio of IN and BN, which can be updated through backpropagation.
[0046] The Hypersphere Embedding (HE) layer normalizes features by mapping feature vectors to a unit hypersphere. This layer is located before the last fully connected layer in the local diagnostic model. The introduction of the HE layer not only improves the stability of numerical computation but also enhances the discriminative power of the model's decision boundaries, thus significantly improving the model's generalization ability. Given a feature vector... Its dimension is d, and the output of the hyperspherical embedding layer Defined as:
[0047] (2)
[0048] in, It is the L2 norm of f, defined as
[0049] (3)
[0050] in, It is the i-th vector of f.
[0051] Improved convolutional network structures based on ANHM, such as Figure 3 As shown.
[0052] 3.3 Prior Prototype-Guided Learning Mechanism
[0053] In federated learning frameworks, it is difficult to explicitly align the feature distributions of different users. To address this issue, a Prototype-Guided Learning (PPGLM) mechanism is proposed. The goal of this module is to align the features of each user to a unified, fixed prior prototype, thereby enhancing the separability between user classes and improving the consistency of domain-invariant features among different users, thus significantly improving the generalization ability of the global diagnostic model.
[0054] The prototype-guided learning mechanism comprises two core components: the Pre-Prototype (PFP) and the Cosine Distance-Based Triple Loss (TLF). The PFP is a pre-defined embedding vector that remains unchanged during training, representing a pre-defined feature distribution for each class. In addressing imbalanced data distributions, this fixed prototype ensures effective separation of all classes in the feature space. All users share the same PFP as a reference for feature alignment, attracting similar samples to cluster near their corresponding class prototypes in the feature space. A schematic diagram is shown below. Figure 2 As shown within the red dashed circle, different shapes of different colors represent prototypes of different categories. The cosine distance-based ternary loss function optimizes feature learning by maximizing the similarity between a sample and the correct class prototype while minimizing the similarity to prototypes of other classes, making the model's feature representation close to the correct class prototype and far away from prototypes of other classes.
[0055] To ensure that the prior fixed prototypes have sufficient distance, a prototype generation method based on hypersphere space is proposed. Let the number of initial prototypes be C, and the dimension of each prototype be v. This represents the parameter matrix consisting of all prototypes, with each column representing a prototype vector. First, the matrix is initialized using a normal distribution to ensure random weight distribution. The expression for the normal distribution is:
[0056] (4)
[0057] This indicates a mean of 0 and a variance of 0.01. Subsequently, each column of the prototype is homogenized to ensure a uniform distribution of weights in the high-dimensional space. Finally, a loss function based on Euclidean distance is used to minimize the uniform distribution. The training objective is to achieve a more uniform distribution among prototypes, thereby improving inter-class separability. Uniform distribution loss function. The expression is shown in formula (5):
[0058] (5)
[0059] in, and These represent the prototype vectors of the i-th and j-th classes, respectively. It is the Euclidean distance between the two prototypes. Figure 4 It demonstrates the role of the prior fixed prototype in the user's local model training process and provides an intuitive demonstration of the relationship between different categories of data and the prior fixed prototype.
[0060] The core idea of the cosine distance-based ternary loss function is to use the features of each data point as anchors, prototypes of the same class as positive samples, and prototypes of different classes as negative samples. It minimizes the loss between the anchor point and the positive samples to ensure compactness within the same class, and maximizes the loss between the anchor point and the negative samples to ensure separability between different classes. The cosine distance-based ternary loss function... The definition is shown in formula (6):
[0061] (6)
[0062] in, It is an intra-class compact loss. Inter-class separation loss. The expression is shown in formula (7) below.
[0063] (7)
[0064] Where N is the number of samples in a batch. It is the output of the hyperspherical embedding layer of the i-th sample. It is a prototype of the same type as the i-th sample. yes and The cosine distance between them. The expression is shown in formula (8):
[0065] (8)
[0066] in, represent Is with Different types of prototypes, yes and The cosine distance between them.
[0067] 3.4 Personalized Model Aggregation Strategy Based on Dynamic Model Decoupling
[0068] Traditional model decoupling methods typically use the last fully connected layer of the user model as the personalization layer, which lacks flexibility and may lead to the loss of global information by training the personalization layer using only local data, thus affecting the performance of the personalized model. To overcome these shortcomings, a personalized model aggregation strategy based on dynamic model decoupling (DMD) is proposed, aiming to mitigate the impact of differences in user data distribution on model performance. This strategy consists of two key steps: dynamic personalization layer selection and dynamic aggregation of personalized models.
[0069] The core idea of dynamic personalization layer selection is to use the feature distribution transition distance D. F This is used to measure the alignment between the output features of each layer in the local diagnostic model and the user's private data distribution transmission, thereby increasing the flexibility and effectiveness of personalized layer selection. In the DMD strategy, the feature distribution transfer distance D is selected. F The smallest network layer serves as the user's personalization layer, and the selection range for the network layer is all fully connected layers in the user model. Feature distribution transfer distance D F The mathematical formula is shown in formula (9):
[0070] (9)
[0071] in, This represents the Wasserstein distance, used to test the distance between two distributions; and This represents the low-dimensional feature distribution of the g-th and g-1-th layers of the local model. and These represent the distribution of local data and their corresponding labels, respectively. and It is a Gaussian distribution constructed using the mean and standard deviation of the output of the g-th layer of the network model. and It is a Gaussian distribution constructed using the mean and standard deviation of the input samples and their labels of the network model. Part I represents the Wasserstein distance between the distribution of the output of the g-th layer and the original data, while part II represents the Wasserstein distance between the distribution of the output of the (g-1)-th layer and the original data. By comparing the difference between the two parts, the increment of the feature distribution transfer distance of the g-th layer can be evaluated. Equation (9) quantifies the transfer distance of the neural network from the original data. and Feature transformation and from input To tag The degree of matching of data distribution changes can better reflect the dynamic changes of feature transformation throughout the network, rather than relying solely on the feature distribution of a single layer.
[0072] Personalized model dynamic aggregation effectively incorporates global information by weighted fusion of the personalized layer of each user model with the corresponding layer of the global model, thereby mitigating the problem of easy loss of global information during personalized modeling. In the proposed FPDG, the global model... It is aggregated from the local models of all users according to the FedAvg method, and the aggregation formula is shown in formula (10):
[0073] (10)
[0074] in, It is the weight of the k-th user model. These are the model parameters for the k-th user. Taking user 2 as an example, the process of reconstructing the local initial model based on dynamic aggregation of personalized models is as follows: Figure 5 As shown, the formula is as shown in formula (11):
[0075] (11)
[0076] in, It is the g-th layer of the initial model parameters for the k-th user in the t-th round. It is the first The g-th layer of the local model parameters for the k-th user in round 1. It is the first The g-th layer of the global model parameters issued by the server in the round. yes Hadamard operation. This represents the personalized aggregate weight for the k-th user. User k is trained using a gradient-based learning method. :
[0077] (12)
[0078] in, L is the learning rate for training aggregate weights. CE Represents the cross-entropy loss function. It is the gradient of the cross-entropy loss function with respect to the current model parameters.
[0079] In summary, the loss function during the local model training process for each user can be expressed as:
[0080] (13)
[0081] Among them, L CE It is the cross-entropy loss function, and its specific expression is: , This represents the one-shot encoding of the i-th sample belonging to class j. N is the probability that the i-th sample is the predicted label of class j. k It refers to the amount of data, C is the number of classes, and L is the number of classes. COS It is a ternary loss function based on cosine distance.
[0082] 3.5 Overview of Multi-User Collaborative Fault Diagnosis Process
[0083] In summary, the proposed FPDG method consists of ANHM, PPGLM, and DMD, and its multi-user collaborative fault diagnosis process is shown in Algorithm 1. This diagnostic process has three core stages: user local training, server global model aggregation, and user local model personalization aggregation. First, users use the received global model as their local diagnostic model and, guided by the proposed prior fixed prototype, train the local diagnostic model with a cosine distance-based ternary loss function as the optimization objective. Second, each user uploads the trained local model parameters to the central server. Subsequently, the central server updates the global model using the FedAvg algorithm. Finally, the central server distributes the updated global model parameters to all users, who then use the proposed DMD to reconstruct their initial local model and continue training their local model. By iterating through these steps until the stopping condition is met, the global diagnostic model is deployed to target domain users for testing, thereby achieving fault diagnosis generalized to unknown operating conditions.
[0084]
[0085] 4. Experiment and Analysis
[0086] This section verifies the effectiveness and superiority of the proposed FPDG method through experiments on two public bearing datasets and one laboratory harmonic reducer dataset. Experiments include comparative experiments between FPDG and other intelligent fault diagnosis methods, ablation experiments using the FPDG method, and runtime analysis.
[0087] 4.1 Dataset Description
[0088] (1) Public bearing dataset: Shandong University of Science and Technology bearing dataset (SDUST_BD). This dataset was collected from, for example, Figure 6The test bench shown consists of a motor, rotor, test bearings, gearbox, and brake. The sampling frequency during data acquisition was 25.6 kHz. The SDUST_BD dataset covers normal conditions (N) as well as inner race faults (IR), outer race faults (OR), and rolling element faults (RB), each further subdivided into three fault levels: 0.2 mm, 0.4 mm, and 0.6 mm. The experimental data in this section are vibration signal data collected at 1500 r / min under no-load (0N), 2ON load, 4ON load, and 6ON load conditions, labeled as 1500-0, 1500-20, 1500-40, and 1500-60, respectively.
[0089] (2) Public bearing dataset: University of Paderborn bearing dataset (PU_BD). This dataset was collected from, for example, Figure 7 The modular experimental platform shown is composed of a motor, torque measurement shaft, rolling bearing test module, flywheel, and load motor. The platform collects vibration signals of the 6203 bearing under four operating conditions at a sampling frequency of 64kHz. Each condition has five health states. The four operating conditions are represented by the symbols PUC1 (900 r / min, 0.7 N·m, 1000 N), PUC2 (1500 r / min, 0.1 N·m, 1000 N), PUC3 (1500 r / min, 0.7 N·m, 1000 N), and PUC4 (1500 r / min, 0.7 N·m, 400 N). This section selects the signals from five health states as experimental data: no fault (N), bearing inner ring first-level fault (IR1), bearing inner ring second-level fault (IR2), bearing outer ring first-level fault (OR1), and bearing outer ring second-level fault (OR2). The corresponding datasets are numbered K001, KA05, KA06, KI03, and KI07. All of the above fault states were artificially generated using electrical discharge machining (EDM).
[0090] (3) Harmonic reducer dataset (HRD). For example... Figure 8 As shown, the harmonic reducer signal experimental platform mainly consists of a drive motor, a load motor, a vibration sensor, a coupling, a torque and speed sensor, and the harmonic reducer under test. The model of the harmonic reducer under test is LCSG-32-50-I, which is a typical cup-type harmonic reducer. The structure diagram of the experimental platform's measurement and control system is shown below. Figure 9 As shown. Figure 10As shown, the vibration sensor is positioned at the 12 o'clock position at the input end of the device under test. The harmonic reducer uses a fixed rigid wheel as the input and a flexible bearing as the output, driving the crossed roller bearing to rotate. The HRD applies two loads (0 N·m and 5 N·m) at a sampling frequency of 100 kHz under five different speed conditions (900 r / min, 1000 r / min, 1200 r / min, 1400 r / min, 1600 r / min). For ease of differentiation and recording, all operating conditions are identified using a specific notation method, as follows: 900-0, 900-5, 1000-0, 1000-5, 1200-0, 1200-5, 1400-0, 1400-5, 1600-0, 1600-5. The first digit in the notation represents the speed value, and the second digit represents the load value. As shown in Table 1, the HRD contains vibration signals for 13 health states, with a sampling frequency of 100kHz. The inner ring fault, outer ring fault, rolling element fault, and cross roller fault are manufactured using laser pitting; the numbers represent the number of laser pitting operations, with an output energy of 2.6 joules. The faulty parts with missing teeth on the rigid wheel and worn flexible wheel are manufactured using wire cutting. Some fault appearances are shown below. Figure 8 As shown by the inner blue dashed line.
[0091] Table 1 HRD Details
[0092]
[0093] 4.2 Experimental Setup
[0094] 4.2.1 Data Preprocessing
[0095] To fully simulate real-world data, Gaussian white noise was added to the vibration signals of the three datasets in Section 4.1. Specifically, Gaussian white noise was added to the original vibration signals to generate a noise signal with a signal-to-noise ratio of 30 dB. This process aims to simulate data acquisition scenarios performed by different users under different environments. Figure 11 and Figure 12 This is a time-domain comparison of the vibration signals of a harmonic reducer under various health conditions at 900 r / min - 0 N·m. From... Figure 11 and Figure 12 As can be seen, the time-domain plot of the signal changed significantly after adding noise. For example, comparing... Figure 11 (c) and Figure 12 (c) shows that the amplitude of the time-domain signal increases significantly after adding Gaussian noise.
[0096] To fairly verify the effectiveness of the proposed method, the same sample truncation method and dataset creation method were used for the preprocessing of the three datasets. To ensure that the samples fully contain fault feature information, the sample length n for each dataset is:
[0097] (14)
[0098] Where V h This refers to the input rotational speed, measured in r / min; f s This represents the sampling frequency of each dataset, measured in Hz; 3 represents the number of cycles. The datasets are created by transforming a one-dimensional time-domain plot into a time-frequency plot using continuous wavelet transform. The dimensions of the time-frequency plot samples are all... .
[0099] 4.2.2 Experimental Hyperparameter Settings
[0100] The experiments using the proposed FPDG were conducted on a computer with 64GB of RAM and an NVIDIA RTX 3080 Ti graphics card, running PyTorch 1.13.1 and Python 3.8. This experiment utilized the proposed ANHM-modified AlexNet network to build a local model for the user, the specific structure of which is shown in Table 2. The local model was trained using the SGD optimizer with a learning rate of 0.001. The global training epoch was set to 50, and the local training epoch was 15. To reduce the randomness of the experimental results, all results in this section are the average of five trials.
[0101] Table 2 User Local Model Structure
[0102]
[0103] 4.2.3 Experimental Verification Indicators
[0104] To evaluate the performance of the proposed method FPDG, generalization test accuracy (Acc-DG) is used as the evaluation metric. Generalization test accuracy refers to the accuracy obtained by testing the trained global model on a private dataset of users in the target domain after generalization training in the federated domain. The formula is as follows:
[0105] (15)
[0106] Where TP (True Positive) is the number of positive samples correctly classified, TN (True Negative) is the number of negative samples correctly classified, and N... test This is the number of samples in the test set.
[0107] 4.3 Comparison Methods
[0108] (1) Centralized: This method follows the classic model training scheme. By integrating data from all users, a larger dataset is obtained, which allows for efficient training of the fault diagnosis model. The performance of models trained using the centralized method is generally the upper limit compared to the FL method.
[0109] (2) FedAvg
[10] : FedAvg is a widely used benchmark federated learning method. The server distributes the global model to each user as the initial version of their local model. Subsequently, users train their local models using their own private data. Finally, the server aggregates the local models of all users by averaging the parameters to generate a new global model.
[0110] (3) FedBABU
[18] : This method is a personalized federated learning method based on model decoupling. It decomposes the user model into two parts: one part is a feature extractor related to generality, and the other part is a classifier related to personalization. During model aggregation, only the feature extractor part is updated, while the classifier is fine-tuned to achieve personalization. The decoupling of the model is fixed in this method, which is equivalent to a static decoupling method.
[0111] (4) FedCAC
[17] : This method is a personalized federated learning method. It decouples the model parameters by quantitatively evaluating the sensitivity of each parameter to the user's private data, and dynamically selects collaborating users based on the similarity of the distribution of user data, thereby achieving more accurate collaborative training.
[0112] (5) FedG2G
[37] : This method proposes a federated domain generalization framework, which includes two steps: user local knowledge transfer and global cross-domain training. Local knowledge transfer is achieved through cross-entropy loss function and KL divergence loss function to realize bidirectional knowledge transfer between the global model and the local model; global cross-domain training enables the model to acquire general knowledge and improve its generalization ability.
[0113] (6) FedIIR
[38] : This method is a federated domain generalization method. Its main idea is to achieve generalization to unseen users by implicitly learning the invariant relationship between the input and the target variable. FedIIR uses prediction discrepancies to quantify invariant relationships and implicitly reduces prediction discrepancies by cross-user gradient alignment, thereby enabling the model to make accurate predictions on all users.
[0114] 4.4 Experiment with the Public Bearing Dataset
[0115] 4.4.1 Diagnostic Task Settings
[0116] As shown in Table 3, eight FDG fault diagnosis tasks are designed. Each fault task in Table 3 includes three source domain users and one target domain user. In tasks T1 to T4 designed based on SDUST_BD, the amount of data possessed by each user and its category distribution are as follows: Figure 13 As shown in the figure, the length of the bubble radius represents the amount of data. The data quantities for the three users are 482, 484, and 534, respectively. The data quantity and category distribution for each user in tasks T5 to T8 based on the PU_BD design are as follows: Figure 14 As shown, the data quantities for the three users are 308, 90, and 352, respectively. The source domain user data is divided into training and test sets in a 1:1 ratio. The target domain data covers all fault categories, with 200 samples in each category. Taking source domain user S1 in task T1 as an example, its data identifier is 1500-0-G, indicating a sample made from a 1500 r / min, 0 N vibration signal with added noise; the G symbol represents the addition of noise.
[0117] Table 3. Details of Fault Diagnosis Tasks Based on SDUST_BD and PU_BD
[0118]
[0119] 4.4.2 Analysis of Experimental Results for Fault Diagnosis Task
[0120] According to the design in Table 3, the experimental results of different intelligent fault diagnosis methods on SDUST_BD and PU_BD are as follows: Figure 15 and Figure 16 As shown. From Figure 15 and Figure 16 As can be observed, the centralized method exhibits the highest accuracy across all tasks. Following closely is the proposed method, FPDG, with average generalization test accuracies of 85.99% and 81.85% on two public datasets, respectively. These results significantly outperform other federated learning methods such as FedAvg, FedBABU, FedCAC, FedG2G, and FedIIR. Among the compared methods, FedAvg yields the lowest results. This is because FedAvg constructs the global model simply by aggregating parameters, failing to effectively mitigate the impact of differences in user data distribution on the global model, resulting in a lack of generalization ability. In contrast, FedBABU and FedCAC are personalized federated learning methods, effectively reducing the impact of differences in user data distribution on the global model; FedG2G and FedIIR are federated domain generalization methods, significantly improving the generalization ability of the global model. Therefore, the average generalization test accuracy of these four methods is higher than that of FedAvg. The above experimental results confirm the effectiveness of the proposed method in solving the fault diagnosis problem of generalization to unknown operating conditions.
[0121] To further illustrate the diagnostic results, confusion matrices and feature visualizations of the diagnostic results from FedAvg and the proposed FPDG method were plotted for tasks T1 and T7. The confusion matrices are shown below. Figure 17 and Figure 18 As shown, the fault diagnosis accuracy obtained by the FedAvg method is low, and most fault categories are misclassified. The FPDG proposed in this paper can effectively solve the fault diagnosis of generalized operating conditions, so the fault diagnosis accuracy of the proposed method is high.
[0122] exist Figure 19 and Figure 20 The results of UMAP visualization
[39] show the features learned from unknown working condition data by two methods. Figure 19 and Figure 20 As can be seen, compared with FedAvg, the features learned by the proposed FPDG have clearer classification boundaries. Figure 19 In (a), except for the sample features of N, OF0.6, and IF0.6 which have clear boundaries, the sample features of the other categories all exhibit aliasing. Figure 19 The aliasing phenomenon in (b) mainly occurs between the sample features of IF0.2 and IF0.4, RB0.2, RB0.4 and RB0.6. Figure 20 (a) There is aliasing among the sample features of IR2, OR1, and OR2. Figure 20 In (b), each category has a clear classification boundary. The above analysis further verifies the superiority of the proposed method.
[0123] 4.5 Experiment with a self-built harmonic reducer dataset
[0124] 4.5.1 Diagnostic Task Settings
[0125] Tasks T9-T13 are harmonic reducer fault diagnosis tasks. Each task includes 4 source domain users and 1 target domain user. The operating condition details of all user data are shown in Table 4, and the user data distribution is as follows: Figure 21 As shown, the data volumes for the four source domain users are 494, 264, 580, and 662, respectively. The training and test sets for each user are split in a 1:1 ratio. Furthermore, the target domain user dataset contains 13 categories, with 200 samples per category. Taking source domain user S2 in task T9 as an example, this user possesses a sample generated from a vibration signal of 1000 r / min - 5 N·m with added noise.
[0126] Table 4. Details of HRD-based fault diagnosis tasks
[0127]
[0128] 4.5.2 Analysis of Experimental Results for Fault Diagnosis Task
[0129] Figure 22 Experimental results of different methods on a harmonic reducer dataset are presented. From the perspective of fault diagnosis methods, the centralized method exhibits the highest diagnostic accuracy, with an average generalization test accuracy of 86.63%. The proposed method's diagnostic results are second only to the centralized method, with an average generalization test accuracy of 83.82% for tasks T9-T13. The superiority of the proposed method is attributed to the consistency of features extracted among different users and the DMD strategy. The FedAvg method has the lowest generalization performance. The FedBABU, FedCAC, FedG2G, and FedIIR methods all outperform FedAvg. Among them, FedG2G and FedIIR, being federated domain generalization methods, outperform FedBABU and FedCAC in diagnostic results. These analyses demonstrate that the proposed method, by extracting domain-invariant features, demonstrates excellent generalization ability across different operating conditions, further confirming its applicability and effectiveness in complex industrial scenarios.
[0130] In addition to the average accuracy from multiple experiments, this section also uses the confusion matrix of the classification results as an evaluation metric for comparative studies, thus more clearly demonstrating the classification results. Due to space limitations, taking the fault diagnosis results of task T12 as an example, the confusion matrices of the FedAvg method and the proposed method are plotted as follows: Figure 19 As shown. From Figure 23 (a) As can be seen, the FedAvg algorithm has a high diagnostic accuracy for health states such as N, IR5, OR1, OR5, OR10, and COR, while the diagnostic accuracy for other types is lower. From Figure 23 (b) It can be seen that the proposed method has a low diagnostic accuracy only for RB10, RB30, and COR, while the diagnostic accuracy for other fault types is high.
[0131] To visually demonstrate the feature learning capabilities of various methods on unknown working condition data, this paper adopts the UMAP method to map high-dimensional features onto a three-dimensional unit sphere. Figure 24 The proposed methods FPDG and FedAvg are visualized using feature distribution visualizations on target domain user data. Figure 24 As can be observed in (a), most categories failed to be effectively distinguished, and relatively independent clusters were few. In contrast, Figure 24 (b) FPDG can effectively cluster different categories (such as inner ring faults, outer ring faults, etc.) into feature clusters with clear boundaries and compact distribution, exhibiting stricter decision boundaries and stronger inter-class separability, which is highly consistent with the classification effect in the confusion matrix. The above results show that the proposed method FPDG exhibits stronger feature discrimination ability and generalization performance when dealing with unknown operating condition data.
[0132] 4.5.3 Generalization Verification
[0133] To further verify the proposed method's ability to extract domain-invariant features among multiple users under conditions of isolated privacy protection and differential distribution, this paper uses the UMAP method to visualize and analyze the data features of source domain users within the federated learning framework and target domain users outside the framework in Task T12. Figure 25 As can be seen, the baseline method FedAvg performs poorly after feature visualization. Samples from different health states are mixed and have blurred boundaries, indicating that the knowledge learned from the source domain is difficult to effectively generalize to the unknown target domain, exhibiting a significant domain bias problem. For example, Figure 25 In (a), there is overlap between fault categories OR1, OR5, and N in the U1_AVG region, and unclear boundaries between IR10 and OR10 in the U2_AVG region. In contrast, in Figure 25 In (b), the proposed method significantly improves the discriminative power of features, successfully aligning the distribution of samples with the same health status across all users, while also effectively distinguishing feature clusters under different health statuses, thus helping to reduce the risk of misdiagnosis during the diagnostic process. For example, Figure 25 As shown in the red and blue boxes in (b), there are clear classification boundaries between the fault categories OR1, OR5, N, IR10 and OR10.
[0134] In summary, the feature visualization results of all user data further validate the good generalization performance of the proposed method for harmonic reducer data under unknown operating conditions.
[0135] 4.5.4 Ablation Test
[0136] To evaluate the actual effectiveness of each module of the FPDG method, multiple ablation experiments were designed and implemented. These experiments systematically analyzed the impact of each component on the final performance by systematically removing key components or strategies from FPDG, thereby verifying its necessity and effectiveness. The design of the ablation experiments is as follows:
[0137] (1) Baseline: Using AlexNet as the local model, update the global model parameters using the FedAvg method;
[0138] (2) Improvement I: Based on the baseline, use AlexNet improved based on the ANHM module as the local model, and keep the other steps and parameters unchanged;
[0139] (3) Improvement II: Based on Improvement I, a priori prototype-guided learning mechanism is added, while the remaining steps and parameters remain unchanged;
[0140] (4) Improvement III: Based on Improvement 2, add DMD strategy to form the proposed FPDG method.
[0141] from Figure 26 It can be clearly observed that, based on FedAvg, the generalization test accuracy shows a steady upward trend with the gradual introduction of ANHM, PPGLM, and DMD. For example, after introducing ANHM and PPGLM, the generalization test accuracy of the model improved by an average of 6.19%. In Task 12, the test accuracies for each scheme were as follows: Baseline was 55.53%, Improvement I improved to 68.3%, Improvement II reached 82.3%, and the final Improvement III (FPDG) method achieved the highest accuracy of 87.03%. In summary, the ablation experiments verified the importance of each module in the FPDG method.
[0142] Furthermore, to further verify the effectiveness of adaptive personalization layer selection in DMD, five comparative experiments with fixed personalization layer selection were designed, taking tasks T9 and T10 as examples. The results of the comparative experiments are as follows: Figure 27 As shown.
[0143] (1) FC1: When reconstructing the user's local initialization model, select FC1 for personalized aggregation;
[0144] (2) FC2: When reconstructing the user's local initialization model, select FC2 for personalized aggregation;
[0145] (3) FC3: When reconstructing the user's local initialization model, select FC3 for personalized aggregation;
[0146] (4) FC1+2: When reconstructing the user's local initialization model, select FC1+FC2 for personalized aggregation;
[0147] (5) FC1+2+3: When reconstructing the user's local initialization model, select FC1+FC2+FC3 for personalized aggregation.
[0148] from Figure 27 As can be seen, selecting FC1 as the personalization layer based solely on experience yields better diagnostic results. However, the diagnostic accuracy of selecting only FC1, FC2, or FC3 as the personalization layer based on experience is lower than that of the proposed method FPDG, indicating that the proposed dynamic selection of the personalization layer is superior. Furthermore, comparative experimental results also show that schemes (4) and (5) that select multiple layers as the personalization layer are not optimal choices. Next, taking task T9 as an example, the personalization layer selection results for four users are plotted, with gray representing the selection of FC1, orange representing the selection of FC2, and blue representing the selection of FC3.
[0149] Since the global epoch in the experimental setup is 50, and the user does not perform personalized model aggregation during the first global iteration, therefore... Figure 28 There are 49 blocks in the game. Figure 28 It can be seen that FC1 was selected the most times by each user as the personalization layer: User 1 selected it 30 times, User 2 selected it 45 times, User 3 selected it 43 times, and User 4 selected it 44 times, accounting for approximately 82.65% of all selections. This trend is consistent with... Figure 27 The results are consistent with the highest accuracy achieved by the FC1 scheme.
[0150] 4.5.5 Runtime Analysis
[0151] After analyzing the diagnostic accuracy of different intelligent fault diagnosis methods on HRD, this section will evaluate the operational efficiency of all methods, i.e., record their running time under the same experimental environment to analyze their feasibility and efficiency in practical applications. The average training time of different algorithms for all generalized fault diagnosis tasks is shown in Table 5.
[0152] Table 5. Running time (s) of different methods under different diagnostic tasks
[0153]
[0154] As shown in Table 5, the centralized model training method has the shortest average runtime of 1923 seconds because it builds the model solely through local training without requiring model interaction. In comparison, the FedAvg algorithm has the second longest runtime, second only to centralized training. Personalized federated learning algorithms and federated domain generalization methods have longer average runtimes, with the proposed FPDG method being the longest. This is due to the significant overhead inherent in these algorithms. For example, the FedBABU algorithm requires local model fine-tuning, the FedCAC method requires parameter decoupling based on parameter sensitivity, and FedG2G and FedIIR require additional steps such as knowledge transfer and cross-user gradient alignment, respectively.
[0155] Furthermore, Table 5 lists the runtime of Improved I, Improved II, and the proposed method in the ablation experiments, with average runtimes of 2641 s, 2740 s, and 3373 s, respectively. Theoretically, the main reason for the longest runtime of the proposed method is the introduction of additional dynamic decoupling and aggregation operations of personalized layers during local model training, which significantly increases computational resource consumption. For a model containing L fully connected layers, it is assumed that each user computes and fits a Gaussian distribution. The time complexity is The time complexity of calculating the Wasserstein distance of layer L according to formula (9) is: Therefore, the total time complexity of model decoupling is It mainly depends on N k The size of the aggregation. During the aggregation process at the personalization layer, since only the aggregation weights of one layer of the network need to be learned, the time complexity is... abbreviated as It mainly depends on N k From the perspective of actual experimental results, based on the running time of Improvement I and Improvement II, it can be inferred that the DMD strategy is the main reason for the long running time of FPDG, which is consistent with the theoretical analysis.
[0156] In summary, although the introduction of additional dynamic decoupling and personalized layer aggregation operations leads to increased computational resources, these improvements significantly enhance the model's performance, enabling it to excel in handling complex data distributions and personalized needs. Therefore, the proposed method has high practicality and value in real-world applications, especially in scenarios with high model performance requirements.
[0157] 5. Conclusion
[0158] To address the problem of multi-user harmonic reducer fault diagnosis under data silos, a federated prototype domain generalization method that guarantees data privacy is proposed, enabling multi-user collaborative fault diagnosis under different operating conditions. Experiments using two public bearing datasets and one self-built harmonic reducer dataset yield the following conclusions:
[0159] (1) To improve the ability of user-local models to extract domain-invariant features and the consistency of domain-invariant features among users while protecting privacy, an adaptive normalized hypersphere module and a priori prototype-guided learning mechanism are proposed to enhance the generalization performance of the global model. Ablation experiments show that the generalization test accuracy of the model is improved by an average of 6.19% after introducing ANHM and PPGLM.
[0160] (2) To address the lack of flexibility and the tendency to lose global information in traditional model decoupling strategies, a personalized model aggregation strategy based on dynamic model decoupling is proposed. Comparative experimental results of the personalized layer selection process show that this strategy provides effective guidance for the selection of personalized layers.
[0161] (3) The proposed fault diagnosis method based on federated prototype domain generalization can achieve generalized fault diagnosis for unknown operating conditions in the case of differential distribution of privacy data among multiple users in isolated environments. Experimental results show that, compared with other federated domain generalization methods, the average fault diagnosis accuracy of the proposed method is improved by at least 7.28%.
[0162] In the experiments described above, the data label space of the target user was consistent with the overall data label space of all users within the federated learning framework. However, in real-world industrial scenarios, the operating conditions of industrial robots are complex and variable, and faults exhibit significant uncertainty, making it impossible to guarantee that the data label space of the target user is completely consistent with that of other users within the federated learning framework. Therefore, future work will focus on how to identify unknown categories of faults in datasets with unknown operating conditions.
[0163] The following is a list of references cited in this invention:
[0164] [1] Guan XN, Huang FQ, Ma XG, et al. Few-shot fault diagnosis ofharmonic reducer of industrial robot based on TCIFMN[J]. IEEE SensorsJournal, 2024, 24(22): 38298-38308, 10.1109 / JSEN.2024.3467162.
[0165] [2] Sun SL, Ding H, Zhao ZD, et al. SCG-GFFE: A Self-constructed graph fault feature extractor based on graph Auto-encoder algorithm for unlabeled single-variable vibration signals of harmonic reducer[J]. AdvancedEngineering Informatics, 2024, 62(A): 102579, https: / / doi.org / 10.1016 / j.aei.2024.102579.
[0166] [3] Jia YZ, Li YQ, Xu MQ, et al. A fault diagnosis scheme for harmonic reducer under practical operating conditions[J]. Measurement, 2024, 227: 114234, https: / / doi.org / 10.1016 / j.measurement.2024.114234.
[0167] [4] Wang Y M, He Y M, Kang B, et al. ProbSparse Attention-based faultdiagnosis for industrial robots under different working conditions[J]. IEEETransactions on Instrumentation and Measurement, 2024, 73: 1-12, 10.1109 / TIM.2024.3374323.
[0168] [5] Zhou X, Zhou H C, He Y M, et al. Harmonic reducer in-situ faultdiagnosis for industrial robots based on deep learning[J]. Sci. ChinaTechnol. Sci. 2022, 65: 2116-2126, https: / / doi.org / 10.1007 / s11431-022-2129-9.
[0169] [6] Zhi Z, Liu L S, Liu D T, et al. Fault detection of the harmonicreducer based on CNN-LSTM with a novel denoising algorithm[J]. IEEE SensorsJournal, 2022, 22(3): 2572-2581, 10.1109 / JSEN.2021.3137992.
[0170] [7] Long J Y, Mou J D, Zhang L W, et al. Attitude data-based deephybrid learning architecture for intelligent fault diagnosis of multi-jointindustrial robot[J]. Journal of Manufacturing Systems, 2021, 61: 736-745,https: / / doi.org / 10.1016 / j.jmsy.2020.08.010.
[0171] [8] Zhao Z D, Sun S L, Wang D, et al. MCVAE-GAN: A novel diagnosismethod for solving harmonic reducer fault signal scarcity and samplediversity problem[J]. IEEE Transactions on Instrumentation and Measurement,2024, 73: 1-10, 10.1109 / TIM.2024.3472781.
[0172] [9] Xiao Y M, Shao H D, Lin J, et al. BCE-FL: A secure and privacy-preserving federated learning system for device fault diagnosis under non-IIDcondition in IIoT [J]. IEEE Internet of Things Journal, 2024, 11(8): 14241-14252, 10.1109 / JIOT.2023.3340745.
[0173]
[10] McMahan H, Moore E, Ramage D, et al. Communication-Efficientlearning of deep networks from decentralized data [C]. Proceedings of the20th International Conference on Artificial Intelligence and Statistics,2017, 54: 1273-1282, 10.48550 / arXiv.1602.05629.
[0174]
[11] Zhang Y, Kong H T, Han Y, et al. Fed-MWFP: Lightweight federatedlearning with interpretable multiple wavelet fusion network for faultdiagnosis under variable operating conditions[J]. Knowledge-Based Systems,2025, 315: 113277, https: / / doi.org / 10.1016 / j.knosys.2025.113277.
[0175]
[12] Sun Y L, Kang S Q, Wang Y J, et al. Fault diagnosis method forharmonic reducer based on personalized federated aggregation strategy withskip cycle weight[J]. Measurement, 2025, 242: 116275, https: / / doi.org / 10.1016 / j.measurement.2024.116275.
[0176]
[13] Zhang H M, Su Q Q. PJPFL: Personalized federated learning withprivacy preservation based on sample similarity[J]. Information Fusion, 2025,122: 103221, https: / / doi.org / 10.1016 / j.inffus.2025.103221.
[0177]
[14] Wang J Y, Song P Y, Zhao C H. Towards consensual representation:Model-agnostic knowledge extraction for dual heterogeneous federated faultdiagnosis[J]. Neural Networks, 2024, 179: 106618, https: / / doi.org / 10.1016 / j.neunet.2024.106618.
[0178]
[15] Deng D S, Zhao W, Wu X G, et al. DecFFD: A personalizedfederated learning framework for cross-location fault diagnosis[J]. IEEETransactions on Industrial Informatics, 2024, 20(5): 7082-7091, https: / / doi.org / 10.1109 / TII.2024.3353920.
[0179]
[16] Li Z B, Zhong Z X, Zuo P L, et al. A personalized federatedlearning method based on the residual multi-head attention mechanism[J].Journal of King Saud University-Computer and Information Sciences, 2024, 36(4): 102043, https: / / doi.org / 10.1016 / j.jksuci.2024.102043.
[0180]
[17] Wu X H, Liu X F, Niu J W, et al. Bold but cautious: Unlockingthe potential of personalized federated learning through cautiouslyaggressive collaboration[C], Proceedings of the IEEE / CVF internationalconference on computer vision. 2023: 19375-19384, https: / / arxiv.org / abs / 2309.11103.
[0181]
[18] Oh J, Kim S, Yun S Y. Fedbabu: Towards enhanced representationfor federated image classification[C]. International Conference on LearningRepresentations ,2022, https: / / doi.org / 10.48550 / arXiv.2106.06042.
[0182]
[19] Lin J, Ma J, Zhu J G. Hierarchical federated learning for powertransformer fault diagnosis[J]. IEEE Transactions on Instrumentation andMeasurement, 2022, 71: 1-11, https: / / doi.org / 10.1109 / TIM.2022.3196736.
[0183]
[20] Li H D, Wang X W, Cao P, et al. FedCPG: A class prototype guidedpersonalized lightweight federated learning framework for cross-factory faultdetection[J]. Computers in Industry, 2025, 164: 104180, https: / / doi.org / 10.1016 / j.compind.2024.104180.
[0184]
[21] Fan Y W, Xi W, Zhu H Y, et al. MiniPFL: Mini federations forhierarchical personalized federated learning[J]. Future Generation ComputerSystems, 2024, 157: 41-50, https: / / doi.org / 10.1016 / j.future.2024.03.026.
[0185]
[22] Zhao H, Liu Q, Sun H, et al. Community awareness personalizedfederated learning for defect detection[J]. IEEE Transactions onComputational Social Systems, 2024, https: / / doi.org / 10.1109 / TCSS.2024.3405556.
[0186]
[23] Qian Q, Zhang B, Li C, et al. Federated transfer learning formachinery fault diagnosis: A comprehensive review of technique andapplication[J]. Mechanical Systems and Signal Processing, 2025, 223: 111837,https: / / doi.org / 10.1016 / j.ymssp.2024.111837.
[0187]
[24] Chen J B, Li J P, Huang R Y, et al. Federated transfer learningfor bearing fault diagnosis with discrepancy-based weighted federatedaveraging[J]. IEEE Transactions on Instrumentation and Measurement, 2022, 71:1-11, https: / / doi.org / 10.1109 / TIM.2022.3180417.
[0188]
[25] Yuan X M, Shi D L, Shi N, et al. Intelligent fault diagnosis ofrolling bearing based on an active federated local subdomain adaptationmethod[J]. Advanced Engineering Informatics, 2024, 62: 102807, https: / / doi.org / 10.1016 / j.aei.2024.102807.
[0189]
[26] Yang B, Lei Y G, Li X, et al. Targeted transfer learning throughdistribution barycenter medium for intelligent fault diagnosis of machineswith data decentralization[J]. Expert Systems with Applications, 2024, 244:122997, https: / / doi.org / 10.1016 / j.eswa.2023.122997.
[0190]
[27] Wang R, Hang WG, Lu YX, et al. Cloud-edge collaborativetransfer fault diagnosis of rotating machinery via federated fine-tuning and target self-adaptation[J]. Expert Systems with Applications, 2024, 250:123859, https: / / doi.org / 10.1016 / j.eswa.2024.123859.
[0191]
[28] Kang Shouqiang, Yang Jiawei, Wang Yujing, et al. Fault diagnosis method for rolling bearings under different working conditions based on federated multi-representation domain adaptation [J]. Journal of Instrumentation, 2023, 44(06): 165-176. 10.19650 / j.cnki.cjsi.J2210528.
[0192]
[29] Zhao K, Hu JC, Shao HD, et al. Federated multi-source domainadversarial adaptation framework for machinery fault diagnosis with dataprivacy[J]. Reliability Engineering & System Safety, 2023, 236: 109246, https: / / doi.org / 10.1016 / j.ress.2023.109246.
[0193]
[30] Yang JC, Gu YJ, Gao SJ, et al. Fed-GFM-DG: A privacy-preserving framework for fundus image segmentation via generative-basedfeature generalization and mask-guided aggregation[J]. Biomedical SignalProcessing and Control, 2025, 106: 107725, https: / / doi.org / 10.1016 / j.bspc.2025.107725.
[0194]
[31] Li B X, Song P Y, Zhao C H. Fusing consensus knowledge: Afederated learning method for fault diagnosis via privacy-preservingreference under domain shift[J]. Information Fusion, 2024, 106: 102290,https: / / doi.org / 10.1016 / j.inffus.2024.102290.
[0195]
[32] Zhao C, Shen W M. A federated distillation domain generalizationframework for machinery fault diagnosis with data privacy[J]. EngineeringApplications of Artificial Intelligence, 2024, 130: 107765, https: / / doi.org / 10.1016 / j.engappai.2023.107765.
[0196]
[33] Zhao C, Shen W M. Federated domain generalization: A secure androbust framework for intelligent fault diagnosis[J]. IEEE Transactions onIndustrial Informatics, 2023, 20(2): 2662-2670, 10.1109 / TII.2023.3296894.
[0197]
[34] Wang R, Huang W G, Shi M K, et al. Federated adversarial domaingeneralization network: A novel machinery fault diagnosis method with dataprivacy[J]. Knowledge-Based Systems, 2022, 256: 109880.https: / / doi.org / 10.1016 / j.knosys.2022.109880.
[0198]
[35] Zhang R P, Xu Q W, Yao J C, et al. Federated domaingeneralization with generalization adjustment[C]. Proceedings of the IEEE / CVFConference on Computer Vision and Pattern Recognition. 2023: 3954-3963,10.1109 / CVPR52729.2023.00385.
[0199]
[36] Li F Y, Chen X Q, Han Z, et al. Federated learning viareweighting information bottleneck with domain generalization[J]. InformationSciences, 2024, 677: 120825, https: / / doi.org / 10.1016 / j.ins.2024.120825.
[0200]
[37] Chen X Q, Zhang J, Gong X L. G2G: Generalized learning by cross-domain knowledge transfer for federated domain generalization [C]. ICASSP2024-2024 IEEE International Conference on Acoustics, Speech and SignalProcessing. IEEE, 2024: 5150-5154, 10.1109 / ICASSP48485.2024.10447043.
[0201]
[38] Guo Y M, Guo K, Cao X F, et al. Out-of-distributiongeneralization of federated learning via implicit invariant relationships[C].International Conference on Machine Learning. PMLR, 2023: 11905-11933,10.5555 / 3618408.3618886.
[0202]
[39] McInnes L, Healy J, Melville J. UMAP: Uniform manifoldapproximation and projection for dimension reduction. 2020, https: / / doi.org / 10.48550 / arXiv.1802.03426。
Claims
1. A method for fault diagnosis of harmonic reducers based on federated prototype domain generalization under unknown operating conditions, characterized in that, The method includes: Step 1: The source domain user uses the received global model as the local diagnostic model, improves the source domain user's local diagnostic model based on the Adaptive Normalized Hypersphere Network Module (ANHM), and trains the local diagnostic model based on the prior prototype guided learning mechanism (PPGLM). The Adaptive Normalized Hypersphere Network Module (ANHM) consists of an Adaptive Normalization Module (ANN) and a Hypersphere Embedding Layer (HE). The ANN adaptively combines Batch Normalization (BN) and Instance Normalization (IN), while the HE maps feature vectors to a unit hypersphere. The Prototype-Guided Learning Mechanism (PPGLM) is an optimization objective based on a cosine distance ternary loss function, guided by a fixed prior prototype. Step 2: Each source domain user uploads the trained local model parameters to the central server, and the central server updates the global model using the FedAvg algorithm; Step 3: The central server distributes the updated global model parameters to all source domain users. The source domain users use the personalized aggregation strategy DMD based on dynamic model decoupling to reconstruct the local initial model and continue to train the local model. The personalized aggregation strategy DMD based on dynamic model decoupling includes dynamic personalized layer selection and dynamic aggregation of personalized models. Dynamic personalized layer selection is based on the alignment of the output features of each network layer in the local diagnostic model with the distribution and transmission of user-private data. Dynamic aggregation of personalized models introduces global information by weighted fusion of the personalized layer of each user model with the corresponding layer of the global model. Step 4: Iterate through steps 1-3 until the stopping condition is met, then deploy the global diagnostic model to the target domain users for testing, thereby achieving fault diagnosis that is generalized to unknown operating conditions.
2. The method for fault diagnosis of harmonic reducers based on federated prototype domain generalization under unknown operating conditions as described in claim 1, characterized in that: In step 1, the mathematical expression of the adaptive normalization module ANN is: in, These are the inputs and outputs of the current layer. and These are the mean and variance captured by the IN layer, respectively. and These are the mean and variance captured by the BN layer, respectively. , , , These are affine parameters. It is used for stable minimum values. and It represents the weight ratio of IN and BN, which can be updated through backpropagation; The hyperspherical embedding layer (HE) is located before the last fully connected layer in the local diagnostic model. Given a feature vector... Its dimension is d, and the output of the hyperspherical embedding layer Defined as: in, It is the L2 norm of f, defined as in, It is the i-th vector of f.
3. The method for fault diagnosis of harmonic reducers based on federated prototype domain generalization under unknown operating conditions as described in claim 1, characterized in that: In step 1, the prior fixed prototype is a pre-set embedding vector that remains unchanged during training, representing the preset feature distribution of each category; The cosine distance-based ternary loss function uses the features of each data point as anchors, prototypes of the same class as positive samples, and prototypes of different classes as negative samples. It minimizes the loss between the anchor point and the positive sample to ensure compactness of the same class, and maximizes the loss between the anchor point and the negative sample to ensure separation of different classes.
4. The method for fault diagnosis of harmonic reducers based on federated prototype domain generalization under unknown operating conditions as described in claim 1, characterized in that: Step 1, the method for generating the prior fixed prototype, specifically includes: Let the number of initial prototypes be C, and the dimension of each prototype be v. This represents the parameter matrix consisting of all prototypes, with each column representing a prototype vector; First, initialize the matrix using a normal distribution to ensure that the weights are randomly distributed. The expression for the normal distribution is: This indicates that the mean is 0 and the variance is 0.01; Subsequently, each prototype column is homogenized to ensure that the weights are evenly distributed in the high-dimensional space. Finally, the loss function based on the uniform distribution of Euclidean distance is minimized. The training objective is to achieve a more uniform distribution among prototypes, improve inter-class separability, and uniformly distribute the loss function. The expression: in, and These represent the prototype vectors of the i-th and j-th classes, respectively. It is the Euclidean distance between the two prototypes.
5. The method for fault diagnosis of harmonic reducers based on federated prototype domain generalization under unknown operating conditions as described in claim 1, characterized in that: In step 1, the ternary loss function based on cosine distance... Definition: in, It is an intra-class compact loss. Inter-class separation loss; The expression: Where N is the number of samples in a batch. It is the output of the hyperspherical embedding layer of the i-th sample. It is a prototype of the same type as the i-th sample. yes and The cosine distance between them; The expression: in, represent Is with Different types of prototypes, yes and The cosine distance between them.
6. The method for fault diagnosis of harmonic reducers based on federated prototype domain generalization under unknown operating conditions as described in claim 1, characterized in that: In step 3, the selection of the dynamic personalization layer specifically includes: selecting the feature distribution transition distance D. F The smallest network layer serves as the user's personalization layer, and the selection range of network layers is all fully connected layers of the user model. Feature distribution transfer distance D F The mathematical formula is: in, This represents the Wasserstein distance, used to test the distance between two distributions; and The low-dimensional feature distributions representing the g-th and g-1-th layers of the local model are Gaussian distributions constructed using the mean and standard deviation of the output of the g-th layer of the network model. and The distributions representing the local data and their corresponding labels are Gaussian distributions constructed using the mean and standard deviation of the input samples and their labels of the network model. Part I represents the Wasserstein distance between the distribution output of the g-th layer and the original data, and Part II represents the Wasserstein distance between the distribution output of the (g-1)-th layer and the original data.
7. The method for fault diagnosis of harmonic reducers based on federated prototype domain generalization under unknown operating conditions as described in claim 1, characterized in that: In step 3, the personalized aggregation strategy DMD based on dynamic model decoupling reconstructs the local initial model and continues to train the local model, specifically including: in, It is the g-th layer of the initial model parameters for the k-th user in the t-th round. It is the first The g-th layer of the local model parameters for the k-th user in round 1. It is the first The g-th layer of the global model parameters issued by the server in the round. yes Hadamard operation. It is the personalized aggregation weight of the k-th user; User k is trained using a gradient-based learning method. : in, L is the learning rate for training aggregate weights. CE Represents the cross-entropy loss function; It is the gradient of the cross-entropy loss function with respect to the current model parameters; The loss function for each user's local model training process is expressed as follows: Among them, L CE It is the cross-entropy loss function, and its specific expression is: , This represents the one-shot encoding of the i-th sample belonging to class j. N is the probability that the i-th sample is the predicted label of class j. k It refers to the amount of data, C is the number of classes, and L is the number of classes. COS It is a ternary loss function based on cosine distance.
8. A system for diagnosing harmonic reducer faults under unknown operating conditions based on federated prototype domain generalization, characterized in that: The system has a program module corresponding to the steps of any one of claims 1-7, and executes the steps in the method for diagnosing harmonic reducers based on federated prototype domain generalization under unknown operating conditions when it is run.
9. A computer device, characterized in that: It includes a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, it performs the steps of the harmonic reducer fault diagnosis method based on federated prototype domain generalization under unknown operating conditions as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The storage medium is used to store a computer program that executes a harmonic reducer fault diagnosis method based on federated prototype domain generalization under unknown operating conditions, as described in any one of claims 1-7.