Equipment fault diagnosis method based on improved federated learning and mixed CNN-LSTM

Through the improved federated learning and hybrid CNN-LSTM model, the problems of limited fault samples and data privacy in equipment fault diagnosis are solved, and efficient fault diagnosis is achieved, which is suitable for multi-client equipment fault identification.

CN120597070APending Publication Date: 2025-09-05DALIAN MARITIME UNIVERSITY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510665186.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-22
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

Existing equipment fault diagnosis methods face the problems of limited fault samples and data privacy protection in data-driven fault diagnosis. Traditional machine learning methods have difficulty capturing data features, deep learning methods such as CNN ignore long-term relationships and are computationally intensive, and the federated learning framework cannot effectively utilize client information with smaller data volumes.

Method used

An improved federated learning framework is adopted to build a hybrid CNN-LSTM model through a central server. Combined with an improved federated learning algorithm, model parameters are aggregated and updated, weight distribution is optimized, and weights are dynamically adjusted using scarcity and test accuracy to prevent overfitting and realize multi-client joint modeling.

Benefits of technology

It improves the accuracy and efficiency of fault diagnosis, can effectively mine fault data characteristics, solves the problems of limited fault samples and data privacy, is applicable to non-independent and identically distributed equipment data, and realizes efficient fault classification and identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120597070A_ABST
    Figure CN120597070A_ABST
Patent Text Reader

Abstract

The invention discloses an equipment fault diagnosis method based on improved federated learning and mixed CNN-LSTM, and the method comprises the steps: constructing a global fault diagnosis model based on the mixed CNN-LSTM, and deploying the global fault diagnosis model to a plurality of clients; defining fault monitoring feature data and fault type labels according to the monitoring time sequence data to obtain a monitoring data sample set comprising a plurality of fault type labels; performing model training on the global fault diagnosis model deployed in each client through the monitoring data sample set, and obtaining an optimal global fault diagnosis model in combination with an improved federated learning algorithm; and fault diagnosis of local equipment is realized through the optimal global fault diagnosis model. The problems that in an existing method, characteristics of data on the time sequence cannot be effectively captured, consequently, the data cannot be classified to achieve equipment fault diagnosis, information from a client side with the small data size cannot be effectively extracted, contained key information is possibly ignored, and consequently the equipment fault diagnosis precision is low are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of equipment fault diagnosis, and in particular to an equipment fault diagnosis method based on improved federated learning and hybrid CNN-LSTM. Background Art

[0002] Equipment fault diagnosis is a key technical approach to ensuring the safe operation of modern industrial equipment. Effective equipment fault diagnosis methods can ensure stable equipment operation in modern industrial scenarios, thereby guaranteeing smooth industrial production. For example, in dry bulk ports, implementing appropriate equipment fault diagnosis methods can overcome the shortcomings of existing manual fault detection and improve port production efficiency. Therefore, achieving efficient and accurate equipment fault diagnosis has become a key research priority.

[0003] Currently, data-driven fault diagnosis methods have received widespread attention. These methods rely on large amounts of fault sample data for model training. However, in practical applications, given that equipment failures are generally low-probability events, the types of failures that can occur in a single piece of equipment are very limited, making it challenging to collect sufficient fault samples. To address this issue, centralized training using data from multiple pieces of equipment has become a solution. However, centralized training often raises privacy issues. For example, for port companies that utilize a large number of equipment for production operations, the monitoring data and operating parameters of their equipment may contain critical information about the company's production. This data is considered corporate privacy, and data exchange may lead to privacy leaks, making it difficult to obtain. Therefore, it is difficult to train models using centralized data training methods.

[0004] To solve this problem, a currently feasible approach is to adopt a distributed training method. Federated Learning (FL), as a method that emphasizes data privacy protection and distributed model training, is an effective way to solve such problems. However, in fault diagnosis applications, the FL framework still has some limitations. Due to differences in equipment operating environment, workload, and fault severity, the monitoring data of different equipment may also be different. Most current FL frameworks use the Federated Averaging Algorithm (FedAvg) for parameter aggregation. This algorithm aggregates parameters from different clients by considering the amount of local data, giving higher weights to clients with larger data volumes. This method cannot effectively extract information from clients with smaller data volumes, which is obviously unreasonable because clients with smaller data volumes may also contain critical information.

[0005] Furthermore, within the FL framework, the establishment of a local fault diagnosis model plays a crucial role in ensuring diagnostic accuracy. Traditional machine learning methods are widely used in fault diagnosis, but as data volumes continue to grow, data features become difficult to capture, making such methods increasingly unsuitable for current applications. Recently, deep learning methods have been increasingly applied to equipment fault diagnosis. Notably, convolutional neural networks (CNNs) are a key technology in deep learning. Their unique convolutional and pooling structures make them suitable for feature extraction and classification tasks, and have garnered widespread attention in the industry. However, it should be noted that CNNs are primarily suited to extracting local features while ignoring long-term relationships hidden in the data. Given that equipment monitoring data is often time series, recurrent neural networks (RNNs) can be used to process the data. However, as the number of time steps increases, the computational complexity increases, leading to vanishing and exploding gradients. This makes it difficult to effectively capture the temporal characteristics of the data, making it impossible to classify the data and implement equipment fault diagnosis. Summary of the Invention

[0006] The present invention provides an equipment fault diagnosis method based on improved federated learning and hybrid CNN-LSTM to overcome the above technical problems.

[0007] In order to achieve the above object, the technical solution of the present invention is:

[0008] An equipment fault diagnosis method based on improved federated learning and hybrid CNN-LSTM includes the following steps:

[0009] S1: Build a global fault diagnosis model based on a hybrid CNN-LSTM through a preset central server and deploy it to several clients;

[0010] S2: Obtain monitoring time series data under several different equipment failure states;

[0011] And define fault monitoring feature data and fault type labels according to the monitoring time series data to obtain a monitoring data sample set including several fault type labels;

[0012] And randomly call the monitoring data sample set through each client;

[0013] Moreover, each client randomly calls a monitoring data sample set corresponding to a different fault type label;

[0014] S3: The global fault diagnosis model deployed on each client is used as the local fault diagnosis model, and the model is trained using the monitoring data sample set. The model parameters of the local fault diagnosis model are aggregated using the improved federated learning algorithm. The optimal model parameters of the global fault diagnosis model are iteratively updated to obtain the optimal global fault diagnosis model.

[0015] Fault diagnosis of local equipment is achieved through the optimal global fault diagnosis model.

[0016] Furthermore, a global fault diagnosis model based on hybrid CNN-LSTM was constructed, which includes an input layer, a convolutional layer, a pooling layer, an LSTM network layer, a fully connected layer, and an output layer connected in sequence;

[0017] The input layer is used to transmit the sample monitoring time series data in the monitoring data sample set to the convolution layer;

[0018] The convolution layer is used to extract the local time series features of the sample monitoring time series data;

[0019] The pooling layer is used to downsample the local temporal features of the data to obtain pooling features;

[0020] The LSTM network layer is used to further extract the pooled features and obtain the global temporal characteristics of the data.

[0021] The fully connected layer is used to perform full connection operations on the global time series features of the data to obtain the probability distribution of the fault type label;

[0022] The output layer is used to output the predicted fault type label according to the probability distribution.

[0023] Furthermore, the S3 specifically includes the following steps:

[0024] S31: Randomly divide the monitoring data sample sets corresponding to different fault type labels into local training sets and local test sets of each client;

[0025] And obtain the initial weight of each client according to the local training set, and obtain the minimum weight value of each client according to the initial weight;

[0026] S32: training the local fault diagnosis model based on the local training set, updating the local model parameters through back propagation, and transmitting them to the central server. The central server performs weighted aggregation on the model parameters based on the initial weights of each client to update the model parameters of the global fault diagnosis model.

[0027] S33: deploying the global fault diagnosis model with updated model parameters to each client and serving as the current global fault diagnosis model;

[0028] The model test accuracy function acc is used as the model loss function, and the current global fault diagnosis model is evaluated through the test set to confirm whether the output of the current global fault diagnosis model converges;

[0029] If converged, it is confirmed that the current global fault diagnosis model after training is the optimal global fault diagnosis model;

[0030] Otherwise, the weight of each client is updated based on the improved federated learning algorithm, and the model parameters of the local fault diagnosis model are replaced with the current global fault diagnosis model parameters, and step S32 is repeated.

[0031] Furthermore, the method for obtaining the minimum weight value of the client in S31 specifically includes the following steps:

[0032] S311: defining a scarcity value for each fault label according to the monitoring data sample set;

[0033] And the expression of the scarce value of the fault label is

[0034]

[0035] Where: s u Indicates the scarcity value of the fault label u; count all Indicates the total number of samples in the monitoring data sample set; count u Indicates the number of times the fault label u appears in the monitoring data sample set;

[0036] S312: Randomly divide the monitoring data sample set and obtain a local training set and a local test set for each client; and calculate and obtain the initial weight of each client based on the scarcity value of each fault label;

[0037] And the initial weight of the client The expression is

[0038]

[0039] Where: n represents the total number of fault label categories contained in client i;

[0040] S313: Normalize the initial weights of the model parameters to obtain normalized weights;

[0041] And the formula for obtaining the normalized weight is

[0042]

[0043] Where: ω i,0 represents the initial weight of the client after normalization; k represents the total number of clients;

[0044] S314: Obtaining the minimum weight value of each client according to the normalized weight;

[0045] And the formula for obtaining the minimum weight value is

[0046]

[0047] Where: ω i,min represents the minimum weight value; b represents the set adjustment benchmark parameter; θ represents the proportional coefficient used to adjust the impact of the initial weight of client i on its minimum weight; Represents an intermediate variable.

[0048] Furthermore, the method for updating the initial weight of each client based on the improved federated learning algorithm in S33 specifically includes the following steps:

[0049] S331: Aggregating the model parameters of the current local fault diagnosis model in each client through the central server, obtaining new model parameters to obtain an optimized global fault diagnosis model, and deploying the optimized global fault diagnosis model to each client;

[0050] The accuracy of the current local fault diagnosis model in each client is tested through the local test set to obtain the local test accuracy acc t,i,c ;

[0051] S332: Traverse the local test set of each client to perform accuracy test on the optimized global fault diagnosis model to obtain the global test accuracy acc t,s ;

[0052] And based on the local test accuracy acc t,i,c And the global test accuracy acc t,s , obtain the client weight update formula to implement the weight update of each client;

[0053] And the client's weight update formula is

[0054]

[0055] Where: represents the weight of client i in the t+1th iteration; ω i,t represents the weight of client i in the tth iteration; r represents the set learning rate;

[0056] S333: Based on step S332 and the minimum weight value of the client, the optimal update formula for each client weight can be obtained, and the optimal update formula is

[0057]

[0058]

[0059] Where: ω i,t+1 Indicates the weight corresponding to client i in the t+1th round of iteration;

[0060] S334: Parameter aggregation is performed on the updated model parameter weights, and its expression is:

[0061]

[0062] Where: P t+1 represents the model parameters after parameter aggregation; P i,t+1 Represents the model parameter update value of the local fault diagnosis model of client i in the tth round of iterative training.

[0063] Furthermore, S3 uses the monitoring data sample set to train the global fault diagnosis model deployed to each client, and also adds a Dropout layer to prevent overfitting during the model training process.

[0064] The present invention provides an equipment fault diagnosis method based on improved federated learning and hybrid CNN-LSTM, which has the following beneficial effects:

[0065] 1. A fault diagnosis framework based on federated learning is proposed. A global fault diagnosis model based on a hybrid CNN-LSTM is constructed through a preset central server and deployed to several clients respectively. This realizes multi-client joint modeling for fault diagnosis, solving the problems of limited fault samples and data privacy.

[0066] 2. The federated learning framework has been optimized. By improving the federated learning algorithm, the model parameters of the global fault diagnosis model are aggregated, and the optimal model parameters of the global fault diagnosis model are iteratively updated and obtained. That is, the weight and minimum weight of the corresponding client are calculated based on the scarcity of fault data. At the same time, the weight is dynamically updated according to the difference in test accuracy between the local model and the global model, which greatly improves the updating accuracy and efficiency of the model parameter weights.

[0067] 3. By designing a global fault diagnosis model based on a hybrid CNN-LSTM, the fault data features are deeply mined for fault classification and identification. The experimental results on public data sets show that the combined model combined with the improved federated learning algorithm proposed in this invention can achieve better fault diagnosis accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0069] Figure 1 This is a flowchart of the equipment fault diagnosis method based on improved federated learning and hybrid CNN-LSTM of the present invention. DETAILED DESCRIPTION

[0070] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0071] This embodiment provides an equipment fault diagnosis method based on improved federated learning and hybrid CNN-LSTM, such as Figure 1 As shown, the specific steps include:

[0072] S1: Build a global fault diagnosis model based on a hybrid CNN-LSTM through a preset central server and deploy it to several clients;

[0073] Specifically, this embodiment includes a federated learning fault diagnosis framework, which is based on the following assumptions: (1) multiple similar devices are included in the federated learning fault diagnosis framework as clients; (2) each client has experienced a certain number of faults and each client shares a set of fault labels; (3) each client has local training data and is private;

[0074] For example, in a federated learning fault diagnosis framework with k clients, client i has a local monitoring dataset Data collected by sensors. i ={(x i,j ,y i,j ) j=1 L} and y∈{0,1,2,...,n}, where x i,j Indicates that client i inputs data sample j, and y i,jrepresents its corresponding fault label; L represents the total number of samples; n represents the fault label; at the beginning of training, the central server initializes a global fault diagnosis model and then assigns it to each client as its local model; after that, each client i trains the model using its local data and uploads the parameters back to the central server. The global model parameters are adjusted through parameter aggregation and redistributed to each client to update the local model until the model converges;

[0075] In a specific embodiment, a global fault diagnosis model based on a hybrid CNN-LSTM is constructed, which includes an input layer, a convolutional layer, a pooling layer, an LSTM network layer, a fully connected layer, and an output layer connected in sequence; in the fault diagnosis of large-scale equipment in this embodiment, due to the wide variety of monitoring data, directly using the original data for fault identification and classification faces great challenges and has low accuracy, so feature extraction of the monitoring data becomes an effective solution. The method proposed in this embodiment uses a CNN convolutional neural network as the feature extraction part. This deep learning algorithm performs well in image processing, computer vision, and feature extraction; the basic structure of a CNN includes an input layer, a convolutional layer, a pooling layer, a fully connected layer, and an output layer, wherein the convolutional layer extracts features through a learnable convolution kernel, the pooling layer reduces the dimension and enhances robustness through downsampling, and the fully connected layer integrates features for classification or output;

[0076] The input layer is used to transmit the sample monitoring time series data in the monitoring data sample set to the convolution layer;

[0077] The convolution layer is used to extract the local time series features of the sample monitoring time series data;

[0078] Specifically, the convolution layer is the core component of the CNN convolutional neural network. In actual training, the training data is input through the input layer and then enters the convolution layer for convolution operation. The convolution kernel traverses the input data with a certain step size to extract local time series features. Its expression is

[0079] The input layer is used to transmit the sample monitoring time series data in the monitoring data sample set to the convolution layer;

[0080] The convolution layer is used to extract local time series features of sample monitoring time series data;

[0081] And the extraction formula of local time series features of data is

[0082]

[0083] Where: represents the i-th feature of the l-th convolutional layer; f represents the ReLU activation function; represents the i-th convolution kernel weight matrix of the l-th convolution layer; * represents the convolution operator; Xl-1 Represents the output of the l-1th convolutional layer; Represents the bias term of the lth convolutional layer;

[0084] The pooling layer is used to perform downsampling operations on the local temporal features of the data to obtain pooling features;

[0085] Specifically, after the convolution operation, the output monitoring data features are input to the pooling layer. The pooling layer downsamples the input features. This embodiment uses maximum pooling as the pooling method of the pooling layer, that is, the maximum value within each local window of the input features is selected as the output of the pooling layer. The maximum pooling operation is as follows:

[0086]

[0087] Where: Represents the element in the i-th feature of the l+1-th layer after maximum pooling; represents the element of the i-th feature of the l-th layer in the pooling kernel, express The abbreviation of D j represents the jth pooling area; in this embodiment, the output of the pooling layer Y = [y1, y2, ..., y t ] is the input sequence of LSTM. The input of LSTM at each moment is x t =y t ;

[0088] The LSTM network layer is used to further extract features from the pooled features to obtain global temporal features of the data. The output of the pooling layer is then passed to the LSTM network layer for further processing. The LSTM network layer is a unique RNN variant with excellent time series processing capabilities. It uses three gating structures: input gate, forget gate, and output gate to effectively control the input, forgetting, and output of information, solving the gradient vanishing problem of traditional RNNs. This allows for better preservation and utilization of key information in the time series, improving the model's long-term memory capacity and classification accuracy.

[0089] Among them, the forget gate plays a key role in regulating the information flow of the current time step, while the input gate is also indispensable in managing the information flow of this time step; specifically, the forget gate determines the degree of influence of the historical state on the current state, while the input gate regulates the integration of new information in the current time step. Both gates process information by using the sigmoid function. The above process can be expressed as:

[0090] f t =σ(W f ·[h t-1 ,x t ]+bias f)

[0091] i t =σ(W i ·[h t-1 ,x t ]+bias i )

[0092] Where: f t ,i t Respectively represent the output values ​​of the forget gate and input gate of the LSTM network; W f ,W i The weight matrices corresponding to the forget gate and input gate respectively; h t-1 represents the output state of the previous time step t-1; x t Indicates the current input state and bias f ,bias i Represents the bias term between the forget gate and the input gate; represents the candidate state of the current time step t;

[0093] In this embodiment, after obtaining the results of the forget gate and the input gate, the cell state is updated based on this information, retaining the required information and discarding the unnecessary information. The cell state update in the LSTM network layer can be expressed as:

[0094]

[0095] Where: W C ,bias C Representation and candidate states The corresponding weight matrix and bias term; C t-1 Represents the cell state at the previous time step t-1; C t represents the cell state at the current time step t;

[0096] The function of the output gate in the LSTM network layer in this embodiment is to determine how the current memory cell state affects the current hidden state, thereby affecting the output of the model. This process can be expressed by the following formula:

[0097] o t =σ(W o [h t-1 ,x t ]+bias o )

[0098] h t =o t ×tanh(C t )

[0099] Where: tRepresents the output gate state at the current time step t; W o ,bias o Indicates the output gate state o t The corresponding weight matrix and bias term; h t represents the output result of the current time step t; σ represents the sigmoid activation function;

[0100] The fully connected layer is used to perform a fully connected operation on the global time series features of the data to obtain a probability distribution for the fault type label;

[0101] Specifically, the output result of the output gate is passed to the fully connected layer, which maps the output result of the last time step of LSTM to the final category space, that is, the score of each fault type:

[0102] z u =W fc ·h t +bias fc

[0103] Where: W fc Represents the weight matrix of the fully connected layer; bias fc represents the bias term of the fully connected layer; z u represents the score of fault type u;

[0104] The softmax function is selected as the activation function. This function can convert the output of the fully connected layer into a normalized probability distribution, thereby achieving classification decisions for different types of equipment failures and normal conditions. The principle is shown in the following formula:

[0105]

[0106] Where: z u represents the score of the fully connected layer on fault type u; p(u) represents the probability generated by applying the softmax function, that is, the possibility of identifying a specific fault type; represents the sum of scores of all fault types output by the fully connected layer;

[0107] The output layer is used to output the predicted fault type label according to the probability distribution;

[0108] In addition, this embodiment adds a Dropout layer to the model to prevent overfitting. The Dropout layer implements an important regularization technique in deep learning. Its core concept is to randomly omit some hidden neurons in the network during training. This process can develop a more general feature representation instead of relying on a specific set of neurons. This not only reduces the risk of overfitting but also enhances the generalization ability of the network.

[0109] S2: Obtain monitoring time series data under several different equipment failure states;

[0110] And define fault monitoring feature data and fault type labels according to the monitoring time series data to obtain a monitoring data sample set including several fault type labels;

[0111] And randomly call the monitoring data sample set through each client;

[0112] Moreover, each client randomly calls a monitoring data sample set corresponding to a different fault type label;

[0113] S3: The global fault diagnosis model deployed on each client is used as the local fault diagnosis model, and the model is trained using the monitoring data sample set. The model parameters of the local fault diagnosis model are aggregated using the improved federated learning algorithm. The optimal model parameters of the global fault diagnosis model are iteratively updated to obtain the optimal global fault diagnosis model.

[0114] The specific steps include:

[0115] S31: Randomly divide the monitoring data sample sets corresponding to different fault type labels into local training sets and local test sets of each client;

[0116] And obtain the initial weight of each client according to the local training set, and obtain the minimum weight value of each client according to the initial weight;

[0117] Specifically, the method for obtaining the minimum weight value of the client includes:

[0118] This embodiment takes into account that due to differences in operating environments, some equipment may experience rare types of faults, which are usually difficult to detect. In order to fully capture the information of rare fault labels and prevent these labels from being ignored due to their scarcity, this application designs an initial aggregation weight method based on the scarcity of fault labels to assign an initial weight to each client;

[0119] S311: defining a scarcity value for each fault label according to the monitoring data sample set;

[0120] And the expression of the scarce value of the fault label is

[0121]

[0122] Where: s u Indicates the scarcity value of the fault label u, which is the inverse of the proportion of the fault label u in all the data. The smaller the proportion of the fault label in all the data, the higher its corresponding scarcity value; count all Indicates the total number of samples in the monitoring data sample set; count uIndicates the number of times the fault label u appears in the monitoring data sample set;

[0123] S312: Randomly divide the monitoring data sample set and obtain a local training set and a local test set for each client; and calculate and obtain the initial weight of each client based on the scarcity value of each fault label;

[0124] And the initial weight of the client The expression is

[0125]

[0126] Where: n represents the total number of fault label categories contained in client i;

[0127] S313: Normalize the initial weights of the model parameters to obtain normalized weights;

[0128] And the formula for obtaining the normalized weight is

[0129]

[0130] Where: ω i,0 represents the initial weight of the client after normalization; k represents the total number of clients;

[0131] S314: Obtaining the minimum weight value of each client according to the normalized weight;

[0132] And the formula for obtaining the minimum weight value is

[0133]

[0134] Where: ω i,min represents the minimum weight value; b represents the set adjustment benchmark parameter; θ represents the proportional coefficient used to adjust the impact of the initial weight of client i on its minimum weight; represents an intermediate variable;

[0135] In this embodiment, clients with few fault samples typically have lower test accuracy, causing their weights to gradually decrease during dynamic updates, rendering their data ineffective for global model training. To address this issue, this embodiment sets a minimum weight for each client based on the initial weight to ensure that all clients can participate in parameter aggregation.

[0136] S32: training the local fault diagnosis model based on the local training set, updating the local model parameters through back propagation, and transmitting them to the central server. The central server performs weighted aggregation on the model parameters based on the initial weights of each client to update the model parameters of the global fault diagnosis model.

[0137] S33: deploying the global fault diagnosis model with updated model parameters to each client and serving as the current global fault diagnosis model;

[0138] The model test accuracy function acc is used as the model loss function, and the current global fault diagnosis model is evaluated through the local test set to confirm whether the output of the current global fault diagnosis model converges;

[0139] The expression of the model test accuracy function acc is

[0140]

[0141] Where: TP means True Positive, which means the predicted result is a positive sample and the true label is a positive sample; FP means False Positive, which means the predicted result is a positive sample and the true label is a negative sample; FN means False Negative, which means the predicted result is a negative sample and the true label is a positive sample; TN means True Negative, which means the predicted result is a negative sample and the true label is also a negative sample;

[0142] If converged, it is confirmed that the current global fault diagnosis model after training is the optimal global fault diagnosis model;

[0143] Otherwise, the initial weights of each client are updated based on the improved federated learning algorithm, and the model parameters of the current global fault diagnosis model are replaced and updated with the current global fault diagnosis model parameters, and step S32 is repeated;

[0144] Specifically, the method for updating the initial weight of each client based on the improved federated learning algorithm includes the following steps:

[0145] S331: Aggregating the model parameters of the current local fault diagnosis model in each client through the central server, obtaining new model parameters to obtain an optimized global fault diagnosis model, and deploying the optimized global fault diagnosis model to each client;

[0146] The accuracy of the current local fault diagnosis model in each client is tested through the local test set to obtain the local test accuracy acc t,i,c ;

[0147] S332: Traverse the local test set of each client to perform accuracy test on the optimized global fault diagnosis model to obtain the global test accuracy acc t,s ;

[0148] And based on the local test accuracy acc t,i,c And the global test accuracy acc t,s, obtain the client weight update formula to implement the weight update of each client;

[0149] And the client's weight update formula is

[0150]

[0151] Where: represents the weight of client i in the t+1th iteration; ω i,t represents the weight of client i in the tth iteration; r represents the set learning rate;

[0152] S333: Based on step S332 and the minimum weight value of the client, the optimal update formula for each client weight can be obtained, and the optimal update formula is

[0153]

[0154]

[0155] Where: ω i,t+1 Indicates the weight corresponding to client i in the t+1th round of iteration; represents an intermediate variable;

[0156] S334: Parameter aggregation is performed on the updated model parameter weights, and its expression is:

[0157]

[0158] Where: P t+1 Represents the model parameter weight after parameter aggregation; P i,t+1 represents the updated model parameter value of the local fault diagnosis model of client i in the tth round of iterative training. This embodiment improves the federated learning algorithm to overcome the shortcomings of the common federated averaging algorithm in the field of fault diagnosis. In the case where the local data of each client is not independent and identically distributed, the algorithm can better perform federated distributed training on the model, accelerate model convergence, enhance the contribution of local models with better performance in the model training process, and improve the performance of the global model.

[0159] The optimized global fault diagnosis model is used as the initial global fault diagnosis model, and step S32 is repeated.

[0160] To further illustrate the advantages of the method described in this embodiment, the following uses the Case Western Reserve University bearing dataset as experimental data to verify this embodiment:

[0161] The rolling bearing fault diagnosis test dataset, released by the Rolling Bearing Data Center at Case Western Reserve University, is widely recognized as a leading authority on fault diagnosis. It covers various types of bearing faults, including inner race faults, outer race faults, rolling element faults, and bearing data under normal operating conditions. During data acquisition, accelerometers were installed at the drive and fan ends of the bearing to record bearing vibration signals. The high sampling frequency captures high-frequency vibration signals generated by bearing faults, and the dataset has a high signal-to-noise ratio, facilitating fault feature extraction. The test bench consists of a 2-horsepower (1.5-kW) motor, a torque sensor, a power meter, and an electronic controller. The bearings under test support the motor shaft. The drive-end bearing is an SKF 6205 deep-groove ball bearing, and the fan-end bearing is an SKF 6203 deep-groove ball bearing. The bearings were subjected to single-point damage electrospark machining, with damage diameters ranging from 0.007 inches, 0.014 inches, 0.021 inches, 0.028 inches, and 0.04 inches. The bearing outer ring damage points were located at three different clock positions: 3, 6, and 12 o'clock. An accelerometer was placed above the bearing housing on both the fan and drive ends of the motor to collect the vibration acceleration signal of the faulty bearing. The vibration signal was collected by a 16-channel data recorder with a sampling frequency of 12 kHz. The drive-end bearing fault also included data with a sampling frequency of 48 kHz. Power and speed were measured using a torque sensor.

[0162] Combine Figure 1 As shown in the figure, an equipment fault diagnosis method based on improved federated learning and hybrid CNN-LSTM mainly includes the following steps:

[0163] S001: The central server initializes the CNN-LSTM global model and sends it to each client.

[0164] This experiment set up five clients and used five baseline models for comparison: KNN, SVM, LSTM, CNN, and CNN-LSTM. The baseline models used the Fed Avg algorithm for parameter aggregation and were compared with the method proposed in this example. Before the experiment, each baseline model and the CNN-LSTM model included in the method proposed in this example were initialized and sent to each client as its local model.

[0165] S002: Client data preprocessing, including data serialization and fault label mapping;

[0166] The data used in this experiment is the drive-end bearing SKF6205, the motor load is 0, and the sampling frequency is 12kHz. The data are obtained under the conditions of the drive-end inner ring and rolling element damage diameters of 0.007, 0.014, 0.021, and 0.028 inches and the corresponding normal state data. A total of 9 data types are included: 1 normal data and 8 fault data, corresponding to labels 0 to 9;

[0167] In the early stages of the experiment, the sample data was first serialized. 4,000 data points were read sequentially, with a sequence length of 300 data points and a step size of 1 to generate a data sequence. The generated sequence samples were then divided into a training set and a test set at a ratio of 4:1. When assigning samples to each client, 500 sequences were randomly selected for each fault type as its fault samples, according to the specified fault type. This ensured that the fault samples between clients had a certain degree of difference and were closer to the actual situation. The sequences were used as input to the model, and feature extraction and fault diagnosis were performed on each sequence.

[0168] S003: Calculate the initial weight and minimum weight value based on the client data and given parameters.

[0169] This experiment uses the grid search method to calibrate the adjustment benchmark b, proportional coefficient θ, and learning rate r in the weighted average strategy. Combined with the data distribution of each client, the weight and minimum weight value of each client are calculated.

[0170] S004: Train the CNN-LSTM model within the federated learning fault diagnosis framework.

[0171] Each client trains a model using its local data and uploads the updated model parameters from this round of training to the central server. The central server then aggregates the model parameters based on the weights of each client, deriving a new global model. The new model parameters are then sent back to the client to update the local model. The global model and each local model are then tested on a test set to determine their respective accuracy. Finally, based on the difference in accuracy between the global model and each local model, the client weights are updated and the next round of training begins, until the model converges.

[0172] S005: Model training is completed, and fault diagnosis test is performed.

[0173] Use the trained model to test on the test set and get the corresponding output results. In the experiment, classification accuracy and F1-score are used as evaluation indicators. The experimental results are composed of the average and standard deviation of 10 experimental results.

[0174] This experiment was divided into three parts, all of which were carried out according to the above steps;

[0175] Experiment 1: Each client was trained using all types of fault data and normal data to ensure that the data was independent and identically distributed. Modeling was performed using both client data centralization and a federated learning framework. The model was tested and its diagnostic accuracy and F1-score were calculated to evaluate its performance.

[0176] The data distribution of Experiment 1 is shown in Table 1:

[0177] Table 1. Data distribution of Experiment 1

[0178]

[0179] The experimental results of Experiment 1 are shown in Table 2:

[0180] Table 2. Experimental results of Experiment 1

[0181]

[0182] In the ideal case of independent and identically distributed data, all equipment experiences the same type of fault and there is sufficient fault data. Deep learning models can mine deeper features than traditional machine learning models, showing higher accuracy and F1-score. In addition, the hybrid CNN-LSTM model, by introducing CNN as a feature extraction module, can more accurately extract deep features of equipment monitoring data than a single model, thereby achieving higher fault classification accuracy. The above analysis shows that when all equipment experiences the same type of fault and there is sufficient fault data, the method proposed in this embodiment can be used to perform fault diagnosis and achieve an accuracy comparable to that of centralized training.

[0183] Experiment 2: Each client was trained using different types of fault data and normal data. The fault types in each client's local test set were included in the fault types in the local training set to ensure that the data was not independent and identically distributed. We continued to use both client data centralization and the federated learning framework to build models, test the models, and calculate the model's diagnostic accuracy and F1-score to evaluate model performance.

[0184] The data distribution of Experiment 2 is shown in Table 3:

[0185] Table 3. Data distribution of Experiment 2

[0186]

[0187] In Experiment 2, the parameter calibration results are b = 0.03, θ = 0.8, and r = 0.01. Based on the local fault type of the client and the given adjustment benchmark and proportional coefficient, the initial weight and minimum weight of each client are calculated as shown in Table 4.

[0188] Table 4. Initial weight and minimum weight of client in Experiment 2

[0189] Weight Client 1 Client 2 Client 3 Client 4 Client 5 Initial weight 0.1834 0.1939 0.1834 0.1879 0.2514 Minimum weight 0.1767 0.1851 0.1767 0.1803 0.2

[0190] The results of Experiment 2 are shown in Table 5:

[0191] Table 5. Experimental results of Experiment 2

[0192]

[0193] When the data is not independent and identically distributed (IID), the baseline model's diagnostic accuracy and F1-score both decline. The combined model still outperforms the single model, demonstrating its advantages. In contrast, the method proposed in this embodiment still achieves a diagnostic accuracy of 99.80% and an F1-score of 99.82%, outperforming the baseline model. The above analysis demonstrates that when fault data is not independent and identically distributed (IID), and the training and test sets for each client use the same data type, the method proposed in this embodiment can be used to diagnose past faults on this equipment, maintaining a high level of fault diagnosis accuracy and possessing considerable practical application value.

[0194] Experiment 3: In practical applications, this embodiment is more likely to be able to diagnose faults that have not yet occurred in the equipment. Therefore, in this experiment, the local training set data and local test set data of each client are of different data types. We continue to use client data centralization and federated learning frameworks to build models, and calculate the model diagnosis accuracy and F1-score to evaluate model performance. The data distribution of Experiment 3 is shown in Table 6:

[0195] Table 6. Data distribution of Experiment 3

[0196]

[0197] In Experiment 3, the parameter calibration results are b = 0.02, θ = 0.7, and r = 0.1. Based on the local fault type of the client and the given adjustment benchmark and proportional coefficient, the initial weight and minimum weight of each client are calculated as shown in Table 7.

[0198] Table 7. Initial weight and minimum weight of client in Experiment 3

[0199] Weight Client 1 Client 2 Client 3 Client 4 Client 5 Initial weight 0.1826 0.1787 0.1787 0.2019 0.2581 Minimum weight 0.1479 0.1451 0.1451 0.1613 0.2

[0200] The results of Experiment 3 are shown in Table 8:

[0201] Table 8. Experimental results of Experiment 3

[0202]

[0203] In Experiment 3, a single model in the federated learning framework is almost unable to accurately perform fault diagnosis, and the stability of the model has also declined. Using the Fed Avg algorithm as a federated learning parameter aggregation method cannot achieve the model training effect achieved when the data is centralized. The weighted average strategy of the method proposed in this embodiment has shown a more obvious advantage in this experiment. From the above analysis, it can be seen that when the fault data satisfies a non-independent distribution and the training set and test set of each client use different data types, the method proposed in this embodiment can still achieve a high fault diagnosis accuracy rate, that is, the method can be used to detect faults that have not occurred in the equipment, and has a good gain effect on the current state of the art. In addition, the above experiment is implemented on the Case Western Reserve University bearing data set, but the specific implementation of the method proposed in this embodiment is not limited to bearings. Any similar scheme that collects equipment operation data through sensors and designs the scheme in accordance with the principles and ideas of this application should be considered as the scope of protection of the patent of this invention.

[0204] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for equipment fault diagnosis based on improved federated learning and hybrid CNN-LSTM, characterized in that: The specific steps include: S1: Build a global fault diagnosis model based on a hybrid CNN-LSTM through a preset central server and deploy it to several clients; S2: Obtain monitoring time series data under several different equipment failure states; And define fault monitoring feature data and fault type labels according to the monitoring time series data to obtain a monitoring data sample set including several fault type labels; And randomly call the monitoring data sample set through each client; Moreover, each client randomly calls the monitoring data sample set corresponding to the different fault type labels; S3: The global fault diagnosis model deployed on each client is used as the local fault diagnosis model, and the model is trained using the monitoring data sample set. The model parameters of the local fault diagnosis model are aggregated using the improved federated learning algorithm. The optimal model parameters of the global fault diagnosis model are iteratively updated to obtain the optimal global fault diagnosis model. Fault diagnosis of local equipment is achieved through the optimal global fault diagnosis model.

2. The equipment fault diagnosis method based on improved federated learning and hybrid CNN-LSTM according to claim 1 is characterized in that: The constructed global fault diagnosis model based on hybrid CNN-LSTM includes an input layer, a convolutional layer, a pooling layer, an LSTM network layer, a fully connected layer, and an output layer connected in sequence; The input layer is used to transmit the sample monitoring time series data in the monitoring data sample set to the convolution layer; The convolutional layer is used to extract the local time series features of the sample monitoring time series data; The pooling layer is used to downsample the local temporal features of the data to obtain pooling features; The LSTM network layer is used to further extract the pooled features and obtain the global time series features of the data. The fully connected layer is used to perform full connection operations on the global time series features of the data to obtain the probability distribution of the fault type label; The output layer is used to output the predicted fault type label according to the probability distribution.

3. The equipment fault diagnosis method based on improved federated learning and hybrid CNN-LSTM according to claim 2, characterized in that: The S3 specifically includes the following steps: S31: Randomly divide the monitoring data sample sets corresponding to different fault type labels into local training sets and local test sets of each client; And obtain the initial weight of each client according to the local training set, and obtain the minimum weight value of each client according to the initial weight; S32: training the local fault diagnosis model based on the local training set, updating the local model parameters through back propagation, and transmitting them to the central server. The central server performs weighted aggregation on the model parameters based on the initial weights of each client to update the model parameters of the global fault diagnosis model. S33: deploying the global fault diagnosis model with updated model parameters to each client and serving as the current global fault diagnosis model; The model test accuracy function acc is used as the model loss function, and the current global fault diagnosis model is evaluated through the test set to confirm whether the output of the current global fault diagnosis model converges; If converged, it is confirmed that the current global fault diagnosis model after training is the optimal global fault diagnosis model; Otherwise, the weight of each client is updated based on the improved federated learning algorithm, and the model parameters of the local fault diagnosis model are replaced with the current global fault diagnosis model parameters, and step S32 is repeated.

4. The equipment fault diagnosis method based on improved federated learning and hybrid CNN-LSTM according to claim 3 is characterized in that: The method for obtaining the minimum weight value of the client in S31 specifically includes the following steps: S311: defining a scarcity value for each fault label according to the monitoring data sample set; And the expression of the scarce value of the fault label is Where: s u Indicates the scarcity value of the fault label u; count all Indicates the total number of samples in the monitoring data sample set; count u Indicates the number of times the fault label u appears in the monitoring data sample set; S312: Randomly divide the monitoring data sample set and obtain a local training set and a local test set for each client; and calculate and obtain the initial weight of each client based on the scarcity value of each fault label; And the initial weight of the client The expression is Where: n represents the total number of fault label categories contained in client i; S313: Normalize the initial weights of the model parameters to obtain normalized weights; And the formula for obtaining the normalized weight is Where: ω i,0 represents the initial weight of the client after normalization; k represents the total number of clients; S314: Obtaining the minimum weight value of each client according to the normalized weight; And the formula for obtaining the minimum weight value is Where: ω i,min represents the minimum weight value; b represents the set adjustment benchmark parameter; θ represents the proportional coefficient used to adjust the impact of the initial weight of client i on its minimum weight; Represents an intermediate variable.

5. The equipment fault diagnosis method based on improved federated learning and hybrid CNN-LSTM according to claim 3 is characterized in that: The method for updating the initial weight of each client based on the improved federated learning algorithm in S33 specifically includes the following steps: S331: Aggregating the model parameters of the current local fault diagnosis model in each client through the central server, obtaining new model parameters to obtain an optimized global fault diagnosis model, and deploying the optimized global fault diagnosis model to each client; The accuracy of the current local fault diagnosis model in each client is tested through the local test set to obtain the local test accuracy acc t,i,c ; S332: Traverse the local test set of each client to perform accuracy test on the optimized global fault diagnosis model to obtain the global test accuracy acc t,s ; And based on the local test accuracy acc t,i,c And the global test accuracy acc t,s , obtain the client weight update formula to implement the weight update of each client; And the client's weight update formula is Where: represents the weight of client i in the t+1th iteration; ω i,t represents the weight of client i in the tth iteration; r represents the set learning rate; S333: Based on step S332 and the minimum weight value of the client, the optimal update formula for each client weight can be obtained, and the optimal update formula is Where: ω i,t+1 Indicates the weight corresponding to client i in the t+1th round of iteration; S334: Parameter aggregation is performed on the updated model parameter weights, and its expression is: Where: P t+1 represents the model parameters after parameter aggregation; P i,t+1 Represents the updated model parameter value of the local fault diagnosis model of client i in the tth round of iterative training.

6. The equipment fault diagnosis method based on improved federated learning and hybrid CNN-LSTM according to claim 5, characterized in that: In S3, the global fault diagnosis model deployed to each client is trained using a monitoring data sample set, and a Dropout layer is added to prevent overfitting during model training.

Citation Information

Cited By

  • Online early warning method and system for health state of heat storage tank based on LSTM (Long Short Term Memory)

    CN121479219A