Equipment fault detection method based on transfer learning
Through a network structure based on class separation and automatic encoding mechanism, combined with the generation of adversarial network and in-class MMD, the problems of lack of labeled data and difference in data distribution in bearing fault diagnosis are solved, and efficient fault diagnosis is achieved without labeled data. Improved diagnostic accuracy and migration capabilities.
Patent Information
- Application Number
- CN202410936671.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-12-03
AI Technical Summary
In bearing fault diagnosis, the existing technology faces the problems of lack of labeled data and differences in data distribution, which leads to limited flexibility and generalization capabilities of transfer learning among different machines, making it difficult to achieve accurate failure without labeled fault data. diagnosis.
Using a network structure based on class separation and automatic encoding mechanism, the target domain and source domain data are preprocessed by generating an adversarial network, and the maximum average deviation (MMD) in-class and weighted domain fusion error are introduced to form a loss function in the pre-training stage. Use the backpropagation algorithm to update parameters, extract the characteristics of the target domain and the source domain, and realize fault diagnosis.
Improve the model's adaptability to unlabeled data, can effectively diagnose faults in the absence of labeled data in the target domain, adapt to data distribution in different domains, improve diagnostic accuracy and migration capabilities, and ensure the accuracy and reliability of fault diagnosis. sex.
Smart Images

Figure BDA0004941530960000031 
Figure BDA0004941530960000042 
Figure BDA0004941530960000047
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of bearing fault diagnosis, and in particular relates to a device fault detection method based on transfer learning. Background Art
[0002] Vibration signal analysis is an important means to evaluate the condition of bearings. Fault diagnosis methods can be divided into two categories: model-based and data-driven. Model-based methods rely on deep expertise to build fault models, but rotating machinery involves complex electrical, mechanical and magnetic field interactions, which makes it challenging to establish accurate models. In contrast, data-driven methods can automatically extract features and reduce reliance on expertise, so they have been widely used in bearing fault diagnosis. In recent years, the development of deep learning has injected new impetus into data-driven fault diagnosis. In machine condition monitoring systems, deep learning is widely used, including autoencoders (AEs), convolutional neural networks (CNNs), restricted Boltzmann machines, and recurrent neural networks. Although data-driven fault diagnosis methods are effective, the key to their success lies in having sufficient labeled fault data and assuming that the distribution of training and test data is consistent. However, since most machines are in normal condition most of the time, it becomes very difficult to obtain enough labeled data, especially fault data. In addition, for safety reasons, some machines are not even allowed to have serious faults. At the same time, factors such as operating conditions, loads, bearing types, and noise can cause differences in data distribution. Manually labeling each machine under each data distribution is both prohibited and impractical.
[0003] Transfer learning is a strategy to transfer knowledge learned in previous tasks to new tasks, which provides an effective way to deal with the problems of scarce labeled data and different data distribution. According to the different data distribution and task similarity to be solved, transfer learning can be divided into inductive transfer learning (ITL), transductive transfer learning (TTL) and unsupervised transfer learning (UTL). Among them, ITL mainly solves the problem of knowledge transfer between different tasks in the same field; UTL focuses on the transfer between different fields and tasks, and is often used in unsupervised learning tasks such as clustering; while TTL focuses on the situation where the tasks are the same but the fields are different. In the practice of transfer learning, we usually call the data set with known knowledge the source domain, and the unknown or to-be-predicted data set the target domain. For bearing fault diagnosis, although there are differences in data distribution, the classification task itself is consistent, which happens to be in line with the application scenario of TTL. Therefore, TTL provides an effective solution to the problem of data distribution differences in bearing fault diagnosis.
[0004] When the distribution of transfer learning data does not match that of the original data, current research on knowledge transfer between different machines mainly relies on a single alignment strategy, that is, trying to make the overall distribution of data in the source domain and the target domain consistent, or only focusing on aligning the normally distributed data in the two domains. However, these studies often ignore the potential impact of the source domain model in the migration process, which to some extent limits the flexibility and generalization ability of the algorithm when migrating between different machines. Specifically, current methods usually require at least a certain amount of labeled fault data in the target domain to achieve a high migration accuracy. These limitations prompted us to explore a more efficient and accurate transfer learning method in order to smoothly promote bearing fault diagnosis technology to new machines. Ideally, even if there is no labeled fault data in the new machine, we can still perform effective transfer learning to ensure the accuracy and reliability of fault diagnosis. Summary of the invention
[0005] In view of the above-mentioned deficiencies in the prior art, the present invention provides a device fault detection method based on transfer learning, which solves the problems of lack of labeled data and data distribution differences in bearing fault diagnosis.
[0006] In order to achieve the above objectives, the technical solution adopted by the present invention is: a device fault detection method based on transfer learning, comprising the following steps:
[0007] S1. Collect sample data of the device to be detected and sample data of similar devices, wherein the sample data of the device to be detected is the target domain data of transfer learning, and the sample data of similar devices is the source domain data of transfer learning;
[0008] S2. Use generative adversarial networks to preprocess target domain data and source domain data;
[0009] S3, extracting the features of the target domain and the source domain based on the preprocessed target domain data and the source domain data by using the network structure based on the class separation and automatic encoding mechanism;
[0010] S4. Based on the extracted features, fault diagnosis is performed on the data in the target domain to complete the fault detection of the equipment.
[0011] Furthermore, step S3 includes the following steps:
[0012] S301, using a network structure based on class separation and automatic encoding mechanism, calculating the reconstruction error of the first hidden layer source domain data and the target domain data, wherein the intra-class MMD is introduced in the pre-training process as a metric for estimating the distance between cross-domain sample pairs in the same class;
[0013] S302, using all the data of the source domain data and the target domain data, calculating a weighted domain fusion error, wherein all the data includes normal data and fault data;
[0014] S303, forming a loss function of the pre-training stage by minimizing the reconstruction error and the weighted domain fusion error;
[0015] S304, using a back propagation algorithm to update parameters, and using the update result as the input of the second hidden layer;
[0016] S305. Repeat steps S301-S304 until all hidden layers are trained and features of the target domain and the source domain are extracted.
[0017] Furthermore, the expression of the reconstruction error in step S301 is as follows:
[0018]
[0019] Where J1 represents the reconstruction error, The node data of the neural network representing the l-th layer encoder of the source domain, The node data of the neural network representing the l-th layer encoder of the target domain, When the input data is the source domain, the jth node of the lth layer of the hidden layer of the decoder neural network is When the input data is the source domain, the jth node of the lth layer of the hidden layer of the encoder neural network is When the input data is the target domain, the jth node of the lth layer of the hidden layer of the encoder neural network is It represents the jth node of the lth layer of the hidden layer of the decoder neural network when the input data is the target domain, β represents the sparse weight coefficient, KL represents the divergence, ρ represents the sparsity parameter, and σ represents the average activation of the lth hidden layer node of all input data.
[0020] Furthermore, in step S301, the intra-class MMD is introduced in the pre-training process, and its expression is as follows:
[0021]
[0022] Among them, MMD2(·) represents the referenced intra-class MMD, X s,c represents all data of category c in the source domain, X t,c represents all data of category c in the target domain, represents the number of all data of category c in the source domain, It represents the value of the i-th data of category c in the source domain after being processed by the encoder. represents the number of all data of category c in the target domain, It represents the value of the j'th data of category c in the target domain after being processed by the encoder, and c represents the index of the label of each category.
[0023] Furthermore, the expression of the weighted domain fusion error in step S302 is as follows:
[0024]
[0025] k2=C2D(x s ,x t )
[0026] Among them, J2 represents the weighted domain fusion error, k1 and k2 represent the fine-grained and coarse-grained weights of the fusion, C1 and C2 represent constants, l represents the number of hidden layers, and M represents the total number of hidden layers. and Respectively represent the values of the normal data of the source domain and the target domain when passing through the lth hidden layer of the encoder network, represents the value of all data in the source domain after passing through the lth hidden layer of the encoder network, h l t represents the value of all data in the target domain after passing through the lth hidden layer of the encoder network, D(h s ,h t ) represents the distance between the source domain and the target domain, N s and N t denote the data volume of the source domain and the target domain respectively, h s and h t Represent the hidden layer data of the source domain and the target domain respectively, It represents the distance between the source domain and the target domain when the input data is normal data, D(x s ,x t ) represents the distance between the source domain and the target domain when the input data is all data. and denote the normal input data in the source domain and the target domain respectively, x s and x t Represents all data in the source domain and the target domain respectively. All data includes normal data and fault data. and Respectively represent the values of the normal data of the source domain and the target domain when passing through the lth hidden layer of the encoder network, express and The distance between.
[0027] Furthermore, the expression of the loss function in step S303 is as follows:
[0028]
[0029] Among them, J* represents the loss function, y i' Indicates whether the i'th sample belongs to the class corresponding to the label, p i' Indicates the probability that the i'th sample is a specified class. If the i'th sample belongs to the specified class, then y i' =1, otherwise y i' =0.
[0030] The beneficial effects of the present invention are:
[0031] (1) The present invention utilizes a network structure based on class separation and automatic encoding mechanism, and improves the adaptability of the model (network structure based on class separation and automatic encoding mechanism) to unlabeled data by introducing transfer learning and domain fusion-based strategies, thereby effectively solving the problems of lack of labeled data and data distribution differences in equipment fault diagnosis.
[0032] (2) Lack of sufficient labeled fault data: Through transfer learning, the model can be trained using labeled data from the source domain, and then the model (network structure based on class separation and automatic encoding mechanism) can be applied to the target domain, so that fault diagnosis can be performed even if the target domain does not have labeled data. Its purpose is that the algorithm can extend bearing fault diagnosis to new machines even if there is no labeled fault data in the new machine. In addition, the algorithm can also be generalized to other machine learning algorithms.
[0033] (3) Different data distributions in the source domain and the target domain: This paper introduces strategies based on class separation and domain fusion, including weighted domain fusion and class separation, to adapt to the data distribution of different domains, thereby improving the migration ability of the model (network structure based on class separation and automatic encoding mechanism) and improving the diagnostic accuracy. The core of these two strategies lies in how to effectively transfer the knowledge of the source domain to the target domain while maintaining the uniqueness of the target domain data.
[0034] (4) The present invention adopts a sub-domain adaptation strategy with dynamic weight terms instead of a single-domain adaptation strategy, and better learns the distinction between different classes by minimizing the sample distance in each category of the source domain and the target domain. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 The present invention is a flow chart of the method.
[0036] Figure 2 It is a fault diagnosis structure based on stack auto-encoding (SAE).
[0037] Figure 3 It is a network structure based on automatic encoding and class separation mechanism. DETAILED DESCRIPTION
[0038] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0039] Example
[0040] like Figure 1 As shown, the present invention provides a device fault detection method based on transfer learning, and its implementation method is as follows:
[0041] S1. Collect sample data of the device to be detected and sample data of similar devices, wherein the sample data of the device to be detected is the target domain data of transfer learning, and the sample data of similar devices is the source domain data of transfer learning.
[0042] In this embodiment, sample data of the device to be tested (target domain) and sample data of similar devices (source domain) are collected, and the source domain and target domain data of transfer learning are defined as follows: In the source domain, a certain amount of labeled data is available in various states (such as normal state, inner loop fault state, etc.). However, in the target domain, only normal data labels are available, while fault data lacks corresponding labels. s and D t They represent the source domain and the target domain respectively, and their feature spaces are χ s and χ t . Let X s and X t Yes D s and D t Assume that the source domain has labeled data N s,l and unlabeled data N s,u (Total N s samples), can be expressed as Among them, i ranges from 1 to N s,l , j ranges from 1 to N s,u , It is sample D s The label of the i'th sample in, N s,l and N s,uThey represent the i-th labeled data in the source domain, the label of the i-th labeled data in the source domain, the j'th unlabeled data in the source domain, the number of labeled data in the source domain, and the number of unlabeled data in the source domain (Note: data can be divided into labeled data and unlabeled data according to whether they are labeled; data can be divided into source domain and target domain according to whether they are transfer learning data or transferred learning data, so they can be divided into four categories: labeled data in the source domain, unlabeled data in the source domain, labeled data in the target domain, and unlabeled data in the target domain). For the target domain, there are N t(0) labeled normal data and N t,u unlabeled data (the total number of samples is N t ). These samples can be represented as Among them, i ranges from 1 to N t(0) , j' from 1 to N t_u , N t_u 、N t(0) , and They respectively represent the number of unlabeled data in the target domain, the number of labeled data in the target domain, the i-th labeled data in the target domain, the label of the i-th labeled data in the target domain, and the label of the j'th unlabeled data in the target domain.
[0043] S2. Use the generative adversarial network to preprocess the target domain data and source domain data.
[0044] In this embodiment, the source domain data and the target domain data are preprocessed by a GAN network (generative adversarial network):
[0045] The GAN network consists of two main parts: the generator and the discriminator. The task of the generator G is to generate images that are as realistic as possible, while the task of the discriminator D is to distinguish whether the input image comes from a real dataset or is generated by the generator.
[0046] During adversarial training, two models, the generator and the discriminator, compete with each other. The goal of the generator G is to deceive the discriminator D to maximize the classification error, and the discriminator D attempts to measure the distance between the real data PR and the generated data PZ. The optimization object and value function V(D,G) are expressed as follows:
[0047]
[0048] in, represents the sum of logD(x) of the real data PR(x) in data x. D(x) represents the value after the discriminator network processes the input data, which is the degree to which the discriminator determines whether the value is true or false. It represents the sum of log(1-D(G(z))) of the generated data PZ(z) in the data z. Note: Here, data x and data z are variable names. D(G(z) means that G(z) is the value after the generator processes the data z. This value can be understood as the data generated by the generator based on the data z. D(G(z)) is the value after the discriminator processes G(z). It can be understood that the two-bit discriminator determines whether the value generated by the generator is true or false.
[0049] For domain adaptation tasks, the source domain X s and the target domain X t are two different distributions. A domain adaptation learning algorithm is to learn a discriminative classifier, labeling samples from the source domain X s , the unlabeled samples come from the target domain X t .
[0050] Use the generator in the GAN network to learn domain-invariant features, and the discriminator distinguishes whether the data comes from the source domain X s Or target domain X t In adversarial training, the feature extractor continuously learns high-level features from the source domain and the target domain, denoted as f and s and f t At the same time, the discriminator observes the continuously updated f s and f t The difference between them. Using adversarial training, the back propagation algorithm can minimize f s and f t The difference between them is then used by the feature extractor to learn domain-invariant features.
[0051] S3. Based on the preprocessed target domain data and source domain data, the network structure based on class separation and automatic encoding mechanism is used to extract the features of the target domain and the source domain. The implementation method is as follows:
[0052] S301, using a network structure based on class separation and automatic encoding mechanism, calculating the reconstruction error of the first hidden layer source domain data and the target domain data, wherein the intra-class MMD is introduced in the pre-training process as a metric for estimating the distance between cross-domain sample pairs in the same class;
[0053] S302, using all the data of the source domain data and the target domain data, calculating a weighted domain fusion error, wherein all the data includes normal data and fault data;
[0054] S303, forming a loss function of the pre-training stage by minimizing the reconstruction error and the weighted domain fusion error;
[0055] S304, using a back propagation algorithm to update parameters, and using the update result as the input of the second hidden layer;
[0056] S305. Repeat steps S301-S304 until all hidden layers are trained and features of the target domain and the source domain are extracted.
[0057] In this embodiment, in the training phase, the first layer input based on the class separation and automatic encoding mechanism is frequency domain data. First, the reconstruction error of the source domain and target domain data of the first hidden layer is calculated, and then the normal data and all data of the source domain and target domain are used to calculate the weighted domain fusion error. Thereafter, the loss function of the pre-training phase is formed by minimizing the reconstruction error and the domain fusion error. Then, the back propagation algorithm is used to update the parameters, and the obtained features are used as the input of the second hidden layer, and the process is repeated. Through layer-by-layer training, the network structure based on the class separation and automatic encoding mechanism can not only reconstruct the input data, but also realize knowledge sharing between the source domain and the target domain.
[0058] In this embodiment, the network structure based on the automatic encoding and class separation mechanism is as follows: Figure 3 shown.
[0059] In this embodiment, the autoencoder (AE) is a semi-supervised deep learning algorithm, which is unique in that it can perform classification tasks well using only a small amount of labeled data. In the pre-training stage, the algorithm can effectively extract features without label information by gradually reducing the reconstruction error. In the fine-tuning stage, the top classifier uses limited labeled data for supervised learning to accurately complete the classification task.
[0060] Figure 2 The fault diagnosis structure based on stack autoencoder (SAE) is shown, where the input x is the vibration signal and the output result is the load status. In this embodiment, in this structure, the pre-training of each layer includes two parts: encoder and decoder. Taking the lth layer as an example, the encoder generates the feature h of this layer according to the specific formula (1). l The decoder is used to extract the feature h l Reconstruct the input signal h of this layer l-1 , the reconstructed signal is given by formula (2). The core goal of pre-training is to find the features that can minimize the reconstruction error J through formula (3), thereby providing strong support for subsequent fault diagnosis:
[0061] h l =f(W l,1 h l-1 +b l,1 )(1)
[0062]
[0063] Where J represents the reconstruction error, and Respectively represent the value of the jth node in the l-1th layer of the decoder network and the value of the jth node in the l-1th layer of the encoder network, N s represents the number of all samples in the source domain, W l,1 and W l,2 Denote the weight matrices of the encoder and decoder, respectively, and b l,1 and b l,2 Both represent deviation vectors, h l and h l-1 They represent the lth layer of the encoder network and the l-1th layer of the encoder network respectively, f and f' both represent activation functions, and the present invention selects the sigmoid function, one of the most widely used activation functions, as the activation function.
[0064] In order to avoid overfitting, a sparse constraint described by KL divergence is introduced in the autoencoder SAE, as shown in formulas (5) and (6). The sigmoid function is used as the activation function, and the range of activation values is (0,1). It is hoped that the activation values of the nodes are mostly inactive, that is, close to 0.
[0065]
[0066] Among them, ρ represents the sparsity parameter, σ represents the average activation of the lth hidden layer node of all input data, and h l (x j ) represents the value after the l-th layer encoder network processes the j-th node, N s Indicates the amount of source domain data.
[0067] The reconstruction error can be expressed as:
[0068] J1=J+βKL(ρ||σ) (6)
[0069] Combined with formula (3), the reconstruction error can be written as follows:
[0070]
[0071] Where J1 represents the reconstruction error, and Respectively represent the number of parameters of the source domain and target domain data after passing through the l-th layer encoder network, When the input data is the source domain, the jth node of the lth layer of the hidden layer of the encoder neural network is When the input data is the source domain, the jth node of the lth layer of the hidden layer of the decoder neural network, the encoder "parses" from data to labels layer by layer, and the decoder "reconstructs" from labels to data layer by layer, see Figure 2 . It represents the jth node of the lth layer of the hidden layer of the encoder neural network when the input data is the target domain, β represents the sparse weight coefficient, KL represents the divergence, ρ represents the sparsity parameter, and σ represents the average activation of the lth hidden layer node of all input data.
[0072] In this embodiment, in the fine-tuning stage, the hidden layer is initialized using the weights and biases obtained from pre-training. Compared with random initialization parameters, these initialization parameters can alleviate the gradient vanishing phenomenon. The entire network can only be updated with a small portion of labeled data. Its task is to minimize the loss function of the classifier through the following equation:
[0073]
[0074] Among them, J* represents the loss function, y i' Indicates whether the i'th sample belongs to the class corresponding to the label, p i' Indicates the probability that the i'th sample is a specified class. If the i'th sample belongs to the specified class, then y i' =1, otherwise y i' =0.
[0075] In this embodiment, a source model with high class separation characteristics is conducive to the implementation of transfer learning. Therefore, the concept of class separation is introduced to measure the model recognition degree of each class in the source domain. The class separation method can make the boundary after migration clearer by expanding the differences between different classes in the source domain.
[0076] In pre-training, the source domain data X s and target domain data X t It is the input of the m-layer autoencoder SAE, which reduces the dimension through signal reconstruction and completes feature extraction. Source domain data X s and target domain data X t The hidden layer data are represented by h s (h1 s ,h2 s ,...,h M s ) and h t (h1 t ,h2 t ,...,h M t ) indicates that, where h M s and h M t They respectively represent the result of the encoder's M-th layer neural network processing the source domain data and the result of the encoder's M-th layer neural network processing the target domain data.
[0077] In this embodiment, the subdomain adaptation problem is solved by intra-class MMD (maximum mean deviation). During the training process, the marginal distribution deviation between the source domain and the target domain is reduced by minimizing the meta-MMD (maximum mean deviation) between the source sample and the target sample features. The minimization process is also called the domain adaptation process. Maximum mean difference (MMD) is a non-parametric distance metric used to measure the distribution deviation between two data sets. MMD (maximum mean discrepancy) is used to evaluate the distribution difference between domains, as shown in (9):
[0078]
[0079] Where f represents the feature mapping function, represents the i-th data input of the source domain, Represents the j'th data input of the target domain.
[0080] If the mean values of the samples generated by the two distributions are the same in the mapping f, then the two distributions can be considered to have the same distribution under f. The correlation between the two datasets is negatively correlated with MMD, and MMD is applied to represent the domain fusion error.
[0081] In this embodiment, in order to handle the domain adaptation problem more finely, the present invention introduces the concept of intra-class MMD. It measures the relationship between samples within each class of each domain, which helps to solve the subdomain adaptation problem. The reason for introducing intra-class MMD is that it is not enough to adapt to the marginal distribution between the source domain and the target domain only through domain adaptation, because it is necessary to ensure that each identical class in the domain is also matched. The optimization goal of intra-class MMD is to minimize the distance between all pairs of samples of the same class in each domain, so that the model can better handle differences within the class. In this way, the differences between the source domain and the target domain can be considered more comprehensively, thereby achieving more effective domain adaptation.
[0082] Therefore, based on formula (9), the intra-class MMD (denoted as MMD2) is used as a metric to estimate the distance between cross-domain sample pairs in the same class as follows:
[0083]
[0084] Among them, MMD2(·) represents the referenced intra-class MMD, X s,c represents all data of category c in the source domain, X t,c represents all data of category c in the target domain, represents the number of all data of category c in the source domain, It represents the value of the i-th data of category c in the source domain after being processed by the encoder. represents the number of all data of category c in the target domain, It represents the value of the j'th data of category c in the target domain after being processed by the encoder, and c represents the index of the label of each category.
[0085] In addition to the classification error, the present invention also introduces domain fusion error and class separation in the fine-tuning stage. The domain fusion error includes two aspects: the fusion of normal data and the fusion of the entire data (including normal data and fault data), as expressed in formula (11) and formula (12):
[0086]
[0087] The above formula represents the distance between the source domain and the target domain.
[0088]
[0089] The above formula represents the domain fusion error, where h s and h t are the hidden layer data of the source domain and the target domain respectively, k1 and k2 represent the fine-grained and coarse-grained weights of the fusion respectively, and Respectively represent the values of the normal data of the source domain and the target domain when passing through the lth hidden layer of the encoder network, express and The distance between.
[0090] The greater the difference between the input data of the two domains, the greater the weight that should be assigned to the corresponding item of the weighted domain fusion error J2. Therefore, k1 and k2 can be expressed as formula (13) and formula (14) respectively. C1 and C2 are constants, which can improve the flexibility of the two weights. and represent the normal input data in the source domain and target domain respectively.
[0091]
[0092] k2=C2D(x s ,x t ) (14)
[0093] Where C1 and C2 are constants. It represents the distance between the source domain and the target domain when the input data is normal data, D(x s ,x t ) represents the distance between the source domain and the target domain when the input data is all data. and denote the normal input data in the source domain and the target domain respectively, x s and x tRepresents all data in the source domain and target domain respectively, and all data includes normal data and fault data.
[0094] In this embodiment, the optimization goal of training is to minimize the reconstruction error J1 and minimize the domain fusion error J2, as shown in formula (15):
[0095] J target =J1+J2 (15)
[0096] Among them, J target Represents the total error of the optimization objective for training.
[0097] S4. Based on the extracted features, fault diagnosis is performed on the data in the target domain to complete the fault detection of the bearing.
[0098] In this embodiment, based on the source domain and target domain features extracted during the training process, fault diagnosis is performed on the data in the target domain, that is, the target domain data is classified to identify which data is faulty data (which bearings are faulty) and what the fault type is.
Claims
1. A device fault detection method based on transfer learning, characterized in that: The following steps are involved: S1. Collect sample data of the device to be detected and sample data of similar devices, wherein the sample data of the device to be detected is the target domain data of transfer learning, and the sample data of similar devices is the source domain data of transfer learning; S2. Use generative adversarial networks to preprocess target domain data and source domain data; S3, extracting the features of the target domain and the source domain based on the preprocessed target domain data and the source domain data by using the network structure based on the class separation and automatic encoding mechanism; S4. Based on the extracted features, fault diagnosis is performed on the data in the target domain to complete the fault detection of the equipment.
2. The device fault detection method based on transfer learning according to claim 1 is characterized in that: The step S3 comprises the following steps: S301, using a network structure based on class separation and automatic encoding mechanism, calculating the reconstruction error of the first hidden layer source domain data and the target domain data, wherein the intra-class MMD is introduced in the pre-training process as a metric for estimating the distance between cross-domain sample pairs in the same class; S302, using all the data of the source domain data and the target domain data, calculating a weighted domain fusion error, wherein all the data includes normal data and fault data; S303, forming a loss function of the pre-training stage by minimizing the reconstruction error and the weighted domain fusion error; S304, using a back propagation algorithm to update parameters, and using the update result as the input of the second hidden layer; S305. Repeat steps S301-S304 until all hidden layers are trained and features of the target domain and the source domain are extracted.
3. The device fault detection method based on transfer learning according to claim 2 is characterized in that: The expression of the reconstruction error in step S301 is as follows: Where J1 represents the reconstruction error, The node data of the neural network representing the l-th layer encoder of the source domain, The node data of the neural network representing the l-th layer encoder of the target domain, When the input data is the source domain, the jth node of the lth layer of the hidden layer of the decoder neural network is When the input data is the source domain, the jth node of the lth layer of the hidden layer of the encoder neural network is When the input data is the target domain, the jth node of the lth layer of the hidden layer of the encoder neural network is It represents the jth node of the lth layer of the hidden layer of the decoder neural network when the input data is the target domain, β represents the sparse weight coefficient, KL represents the divergence, ρ represents the sparsity parameter, and σ represents the average activation of the lth hidden layer node of all input data.
4. The device fault detection method based on transfer learning according to claim 2 is characterized in that: In step S301, the intra-class MMD is introduced in the pre-training process, and its expression is as follows: Among them, MMD2(·) represents the referenced intra-class MMD, X s,c represents all data of category c in the source domain, X t,c represents all data of category c in the target domain, represents the number of all data of category c in the source domain, It represents the value of the i-th data of category c in the source domain after being processed by the encoder. represents the number of all data of category c in the target domain, It represents the value of the j'th data of category c in the target domain after being processed by the encoder, and c represents the index of the label of each category.
5. The device fault detection method based on transfer learning according to claim 2, characterized in that: The expression of the weighted domain fusion error in step S302 is as follows: k2=C2D(x s ,x t ) Among them, J2 represents the weighted domain fusion error, k1 and k2 represent the fine-grained and coarse-grained weights of the fusion, C1 and C2 represent constants, l represents the number of hidden layers, and M represents the total number of hidden layers. and Respectively represent the values of the normal data of the source domain and the target domain when passing through the lth hidden layer of the encoder network, Represents the value of all data in the source domain when passing through the lth hidden layer of the encoder network, represents the value of all data in the target domain after passing through the lth hidden layer of the encoder network, D(h s ,h t ) represents the distance between the source domain and the target domain, N s and N t denote the data volume of the source domain and the target domain respectively, h s and h t Represent the hidden layer data of the source domain and the target domain respectively, It represents the distance between the source domain and the target domain when the input data is normal data, D(x s ,x t ) represents the distance between the source domain and the target domain when the input data is all data. and x ( t 0) denote the normal input data in the source domain and the target domain respectively, x s and x t Represents all data in the source domain and the target domain respectively. All data includes normal data and fault data. and Respectively represent the values of the normal data of the source domain and the target domain when passing through the lth hidden layer of the encoder network, express and The distance between.
6. The device fault detection method based on transfer learning according to claim 2 is characterized in that: The expression of the loss function in step S303 is as follows: Among them, J* represents the loss function, y i' Indicates whether the i'th sample belongs to the class corresponding to the label, p i' Indicates the probability that the i'th sample is a specified class. If the i'th sample belongs to the specified class, then y i' =1, otherwise y i' =0.
Citation Information
Cited By
Sensor error self-calibration and state monitoring method based on domain adaptive feature alignment
CN122192399A
