Method and system for multi-source domain rolling bearing fault diagnosis based on diffusion model

By combining the diffusion model with the multi-source domain adaptation algorithm, a Ghost convolution and multi-scale feature fusion network was designed to solve the problems of slow computation speed and insufficient feature extraction in cross-operating condition fault diagnosis of rolling bearings, achieving efficient fault diagnosis and improved generalization.

CN119577323BActive Publication Date: 2025-10-21HEBEI UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411449832.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-10-21
Estimated Expiration
2044-10-17

Smart Images

  • Figure CN119577323B_ABST
    Figure CN119577323B_ABST
Patent Text Reader

Abstract

The application discloses a multi-source domain rolling bearing fault diagnosis method and system based on a diffusion model. T In the forward process of the diffusion model, the source domain label is converted into a one-dimensional vector, and noise is added to destroy the original distribution to obtain y T In the reverse process, the variable of the Gaussian distribution is used to replace y T , noise distribution features added in the forward distribution are learned through a noise prediction network, and gradual denoising is performed to obtain y0 The source domain data is input into the noise prediction network to extract data features, the target domain data is input into the noise prediction network, global noise prior and local noise prior corresponding to the target domain data are obtained, the source domain data and the target domain data are input into the noise prediction network, the multi-source domain adaptation algorithm is used to map the source domain data features to the target domain, noise distribution features related to the target domain data are learned, and gradual denoising is performed to obtain the fault type of the target domain data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of mechanical fault diagnosis, and in particular to a multi-source domain rolling bearing fault diagnosis method and system based on a diffusion model. Background Art

[0002] Rolling bearings are among the most critical components of rotating machinery. They operate in harsh environments and are subject to constant changes in operating conditions. Collecting fault data under different operating conditions is not only costly but also difficult to obtain accurate label information. This limits deep learning diagnostic methods based on large amounts of training data and label information.

[0003] Domain adaptation (DA) is an important research direction in the field of transfer learning. The prerequisite is that the source and target domains have similar feature distributions. Deep learning models are trained using source domain data, and features are transferred between the source and target domains to achieve relevant tasks in the target domain. Domain adaptation algorithms include single-source and multi-source domain adaptation algorithms. The feature distributions of a single source domain and target domain differ significantly, which can easily lead to overfitting during transfer learning. In contrast, multi-source domain data has richer features and better generalization. General domain adaptation methods directly align source and target domain features one by one to minimize the difference in feature space between the two. This makes it difficult to effectively align multiple source and target domains. Furthermore, the feature extraction network has a fixed receptive field, making it difficult to extract features of different details. When the speed difference is large, it is difficult to extract effective features, resulting in poor generalization.

[0004] The diffusion model is a generative model based on a Markov chain. It disrupts the distribution of the original data by adding Gaussian noise and then restores the original data distribution during the inverse process to achieve relevant tasks. Compared with GAN and VAE architectures, the generated data generalizes better and the model converges more easily. It can fuse features of multiple scales and depths to enrich the extracted features, compensating for the monotonous information extracted by multi-source domain adaptation feature networks. However, the diffusion model suffers from high computational complexity, exacerbated by redundant sampling during the inverse reasoning process.

[0005] In summary, in order to solve the problem of rolling bearing fault diagnosis across working conditions and improve the accuracy and generalization of fault diagnosis, on the one hand, it is necessary to strengthen the feature extraction capability of deep learning. Using the diffusion model as a feature extraction model can effectively solve this problem, but it has the problems of slow calculation speed and sampling redundancy. On the other hand, it is necessary to better align the source domain data features and the target domain features. Choosing a feature alignment algorithm on the joint probability distribution can more effectively migrate the source domain features to the target domain. Summary of the Invention

[0006] In response to the problems and needs raised above, this solution proposes a multi-source domain rolling bearing fault diagnosis method and system based on a diffusion model. Due to the adoption of the following technical features, it can achieve the above technical objectives and bring about many other technical effects.

[0007] An object of the present invention is to provide a multi-source domain rolling bearing fault diagnosis method based on a diffusion model, comprising the following steps:

[0008] S10. Data collection: Collect rolling bearing vibration signals under different speed conditions, use a certain unlabeled speed condition data as target domain data, and other speed condition fault data as source domain data;

[0009] S20. Construct a diffusion model framework: This includes the forward process and the reverse process. In the forward process of the diffusion model, the source domain label is converted into a one-dimensional vector y0, and the noise prediction network is pre-trained to obtain the global noise prior. and local noise prior Add noise to y0 T times to destroy the original distribution of y0 until a variable y with an approximate Gaussian distribution is obtained. T ; Use Gaussian distributed variables in the reverse process Instead of y T , and use the noise prediction network to learn the noise distribution features added in the forward distribution. Gradually denoising, and finally getting the same distribution as y0

[0010] S30, input the source domain data into the noise prediction network to fully extract the data features, input the target domain data into the noise prediction network, use the multi-source domain adaptation algorithm to map the source domain features to the target domain, and obtain the global noise prior corresponding to the target domain data and local noise prior

[0011] S40, inputting the source domain data and the target domain data into the noise prediction network, and using a multi-source domain adaptation algorithm to map the noise prediction network features to the target domain, the noise prediction network fuses the fault data features after feature migration, and learns the noise features related to the target domain data;

[0012] S50, the Gaussian noise related to the target domain and the noise prior after migration are brought into the reverse process in step S20, and the Gaussian distributed random variables are Stepwise denoising to predict the fault data type of the target domain.

[0013] In addition, the multi-source domain rolling bearing fault diagnosis method based on the diffusion model according to the present invention may also have the following technical features:

[0014] In one example of the present invention, the noise prediction network includes a feature extraction network, a conditional guidance network and a U-Net network, the feature extraction network is configured to extract data features based on a Ghost convolutional network; the conditional guidance network is configured to extract noise priors; and the U-Net network is configured to fuse the data features and the noise priors.

[0015] In one example of the present invention, the feature extraction network includes:

[0016] The first convolutional layer, the first BN layer, the first ReLu layer, the Ghost layer and the fully connected layer are connected in series in sequence, wherein the Ghost layer includes multiple layers and is connected in series between the first ReLu layer and the fully connected layer in sequence, the first convolutional layer is configured to perform a convolution operation on the input data, the first BN layer and the first ReLu are configured to accelerate the convergence speed of the model and increase the generalization of the model; the multiple Ghost layers are configured to reduce the parameters of the model while fully extracting the data features; the fully connected layer is configured to adjust the dimension of the output features to 1024.

[0017] In one example of the present invention, the conditional guidance network includes:

[0018] ResNet18 network and CNN+Transform multi-feature fusion network. The ResNet18 network is configured to extract the global features of the fault signal and output the noise prior. The CNN+Transform multi-feature fusion network is configured to learn fault data features at different scales, concatenate the results of convolution operations at different scales at the channel scale, and then input them into the Transformer to learn the relationship between features at different scales, and finally output the noise prior.

[0019] In one example of the present invention, the CNN+Transform multi-feature fusion network includes: a convolutional unit layer, a feature fusion layer and a Transformer module connected in series, the convolutional unit layer includes a second convolutional layer, a third convolutional layer and a fourth convolutional layer connected in parallel, the third convolutional layer and the fourth convolutional layer are respectively connected in series with the fifth convolutional layer and the sixth convolutional layer, the fifth convolutional layer, the sixth convolutional layer and the second convolutional layer are connected in parallel and connected to the feature fusion layer; wherein the convolutional unit layer is configured to learn fault data features of different scales, the feature splicing layer is configured to splice the learned features of different scales to obtain the feature size required by the Transformer; the Transformer module is configured to learn the correlation and dependency between different features to make the learned fault data features more comprehensive.

[0020] In one example of the present invention, the conditional guidance network uses weighted cross entropy loss and multi-source domain adaptation loss as the loss function of the conditional guidance network, which is expressed as follows:

[0021]

[0022] in, is the cross entropy loss, is a multi-source domain adaptation loss function; the former is used to learn the classification loss in the source domain, and the latter learns the joint probability distribution difference between the feature distributions of multiple source domains and the target domain; γ is used to balance the two types of losses. It is initially 0. After learning the classification features of the source domain data, it increases with the increase in the number of training times, and the maximum value does not exceed 1.

[0023] In one example of the present invention, the U-Net network uses weighted noise difference loss and multi-source domain adaptation loss as the loss function of the U-Net network, wherein the noise difference loss includes numerical difference and distribution difference after fusing different noise priors, and its expression is as follows:

[0024]

[0025] Where, is the loss function between the noise predicted by the U-Net network and the real noise, which includes the mean square difference And the distribution difference after fusing different noise priors and λ balances the two types of losses and takes a fixed value of 0.5; It is a loss function that balances the two types of losses by taking into account the difference in data feature distribution between multiple source domains and target domains. γ1 is initially 0 and gradually increases after learning the features of the source domain data, with the maximum value not exceeding 1.

[0026] In one example of the present invention, in step S20,

[0027] The expression of the forward noise addition process of the diffusion model is as follows:

[0028]

[0029] Where ∈ is random noise, It is a parameter related to the number of times of adding noise, y0 is the one-dimensional vector that the label is transformed into, y t is the variable obtained by adding noise t times;

[0030] The expression of the denoising process of the inverse process of the diffusion model is as follows:

[0031]

[0032] Among them, ρ(x) is the feature vector learned by the feature extraction network, y t is the variable obtained by adding noise t times to the prediction, p θ is the distribution characteristic of Gaussian noise.

[0033] In one example of the present invention, in steps S30 and S40, the multi-source domain adaptation algorithm is configured to perform feature alignment on multiple source domain and target domain data on a joint probability distribution, and transform the problem of solving the feature alignment into finding the maximum value of a convex function. The specific derivation process is as follows:

[0034]

[0035] Among them, MI(h(X), Y; L) is the multi-source domain loss function, h(x), y, l, p and m are the output features, the original labels of the data, the number of source domains, the feature probability distribution, and the number of all data respectively. Formula (2) is substituted into formula (1), and the similar features contained in each source domain and target domain are approximately equal. The sample mean is used to replace the convolution to simplify and obtain formula (3); r(h(x), y, l; θ) is a linear function about θ, among which k(h(x), h(x i )) is the Gaussian kernel function, δ(y,y i ) is the indicator core, at y=y i 1 when δ(l,l i ) is also the indicator core, when l=l i , and 0 otherwise. Substitute formula (4) into formula (3) to obtain the final loss function, where the two sub-formulas in formula (5) are about Convex function.

[0036] Another object of the present invention is to provide a diagnostic system for the multi-source domain rolling bearing fault diagnosis method based on the diffusion model as described above, comprising the following steps:

[0037] A data acquisition module is configured to collect rolling bearing vibration signals under different speed conditions, using unlabeled speed condition data as target domain data and fault data under other speed conditions as source domain data;

[0038] Construct a model module and configure it to convert the source domain label into a one-dimensional vector y0 in the forward process of the diffusion model, pre-train the noise prediction network, and obtain the global noise prior and local noise prior Add noise to y0 T times to destroy the original distribution of y0 until a variable y with an approximate Gaussian distribution is obtained. T ; Use Gaussian distributed variables in the reverse process Instead of y T, and use the noise prediction network to learn the noise distribution features added in the forward distribution. Gradually denoising, and finally getting the same distribution as y0

[0039] The pre-training module is configured to input the source domain data into the noise prediction network to fully extract the data features, input the target domain data into the noise prediction network, and use the multi-source domain adaptation algorithm to map the source domain features to the target domain to obtain the global noise prior corresponding to the target domain data. and local noise prior

[0040] The noise migration module is configured to input source domain data and target domain data into the noise prediction network and use a multi-source domain adaptation algorithm to map the noise prediction network features to the target domain. The noise prediction network then fuses the fault data features after feature migration to learn noise features related to the target domain data.

[0041] The fault prediction module is configured to bring the learned target domain related Gaussian noise and the noise prior after migration into the reverse process of the model building module, and perform the Gaussian distribution of random variables. Stepwise denoising to predict the fault data type of the target domain.

[0042] The beneficial effects of the present invention are: improving the noise prediction network in the diffusion model, designing a feature extraction network based on Ghost convolution and a conditional guidance network with multi-scale feature fusion. The feature extraction network based on Ghost convolution reduces the computational complexity of the diffusion model while ensuring that the fault data features are fully learned. The conditional guidance network with multi-scale feature fusion can learn fault data features at different scales, extract richer features, better guide the diffusion process, achieve convergence within fewer noise additions, and further reduce the computational complexity of the diffusion model. The diffusion model framework is effectively combined with the multi-source domain adaptation algorithm to effectively extract fault data features and achieve effective alignment of the source and target domains.

[0043] Hereinafter, the best embodiment of the present invention will be described in more detail with reference to the accompanying drawings so that the features and advantages of the present invention can be easily understood. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings of the embodiments of the present invention. The drawings are only used to illustrate some embodiments of the present invention, but not to limit all embodiments of the present invention thereto.

[0045] Figure 1 Flowchart of a multi-source domain rolling bearing fault diagnosis method based on a diffusion model according to an embodiment of the present invention;

[0046] Figure 2 is an overall schematic diagram of a diffusion model according to an embodiment of the present invention;

[0047] Figure 3 Schematic diagram of Ghost convolution according to an embodiment of the present invention;

[0048] Figure 4 Schematic diagram of a feature extraction network according to an embodiment of the present invention;

[0049] Figure 5 A schematic diagram of multi-scale feature fusion according to an embodiment of the present invention;

[0050] Figure 6 is a TSNE diagram of CWRU data features according to an embodiment of the present invention;

[0051] Figure 7 A TSNE diagram of data features collected in a laboratory according to an embodiment of the present invention;

[0052] Figure 8 A diagram of a denoising process of a diffusion model according to an embodiment of the present invention;

[0053] Figure 9 FIG. 1 is a confusion matrix diagram of a fault diagnosis of a data set collected in a laboratory according to an embodiment of the present invention. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the technical solution of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of specific embodiments of the present invention. The same figure marks in the drawings represent the same parts. It should be noted that the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the described embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning understood by persons of ordinary skill in the field to which the invention belongs. The words "first", "second" and similar terms used in the patent application specification and claims of the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "a" or "an" do not necessarily indicate a quantity limitation. Words such as "include" or "comprising" mean that the elements or objects preceding the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Words such as "connected" or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the object being described changes, the relative positional relationship may also change accordingly.

[0056] According to the first aspect of the present invention, a multi-source domain rolling bearing fault diagnosis method based on a diffusion model comprises the following steps:

[0057] S10. Data collection: Collect rolling bearing vibration signals under different speed conditions, use a certain unlabeled speed condition data as target domain data, and other speed condition fault data as source domain data;

[0058] S20. Construct a diffusion model framework: This includes the forward process and the reverse process. In the forward process of the diffusion model, the source domain label is converted into a one-dimensional vector y0, and the noise prediction network is pre-trained to obtain the global noise prior. and local noise prior Add noise to y0 T times to destroy the original distribution of y0 until a variable y with an approximate Gaussian distribution is obtained. T ; Use Gaussian distributed variables in the reverse process Instead of y T , and use the noise prediction network to learn the noise distribution features added in the forward distribution. Gradually denoising, and finally getting the same distribution as y0

[0059] S30, input the source domain data into the noise prediction network to fully extract the data features, input the target domain data into the noise prediction network, use the multi-source domain adaptation algorithm to map the source domain features to the target domain, and obtain the global noise prior corresponding to the target domain data and local noise prior

[0060] S40, inputting the source domain data and the target domain data into the noise prediction network, and using a multi-source domain adaptation algorithm to map the noise prediction network features to the target domain, the noise prediction network fuses the fault data features after feature migration, and learns the noise features related to the target domain data;

[0061] S50, the Gaussian noise related to the target domain and the noise prior after migration are brought into the reverse process in step S20, and the Gaussian distributed random variables are Stepwise denoising to predict the fault data type of the target domain.

[0062] This fault diagnosis method improves the noise prediction network in the diffusion model and designs a feature extraction network based on Ghost convolution and a conditional guidance network based on multi-scale feature fusion. The feature extraction network based on Ghost convolution reduces the computational complexity of the diffusion model while ensuring that the fault data features are fully learned. The conditional guidance network based on multi-scale feature fusion can learn fault data features at different scales, extracting richer features, better guiding the diffusion process, achieving convergence with fewer noise additions, and further reducing the computational complexity of the diffusion model. The diffusion model framework is effectively combined with the multi-source domain adaptation algorithm to effectively extract fault data features and achieve effective alignment between the source and target domains.

[0063] In one example of the present invention, the noise prediction network includes a feature extraction network, a conditional guidance network and a U-Net network, the feature extraction network is configured to extract data features based on a Ghost convolutional network; the conditional guidance network is configured to extract noise priors; and the U-Net network is configured to fuse the data features and the noise priors.

[0064] It should be noted that the U-Net network is a four-layer convolutional network, consisting of a two-layer encoder and a two-layer decoder structure. After the first layer of convolution passes through the BN layer and the Relu activation function, the features of the network are extracted by arithmetic fusion operations, and the features of the network are guided by the splicing operation fusion conditions.

[0065] In one example of the present invention, the feature extraction network includes:

[0066] The first convolutional layer, the first BN layer, the first ReLu layer, the Ghost layer and the fully connected layer are connected in series in sequence, wherein the Ghost layer includes multiple layers and is connected in series between the first ReLu layer and the fully connected layer in sequence, the first convolutional layer is configured to perform a convolution operation on the input data, the first BN layer and the first ReLu are configured to accelerate the convergence speed of the model and increase the generalization of the model; the multiple Ghost layers are configured to reduce the parameters of the model while fully extracting the data features; the fully connected layer is configured to adjust the dimension of the output features to 1024.

[0067] To fully extract the features of the data, the feature extraction network first uses a 5*5 convolution kernel with 32 channels to perform preliminary feature extraction on the input data, followed by a batch normalization layer and a ReLu activation function to accelerate the convergence of the model and increase its generalization. The maximum pooling layer is followed by three Ghost convolutions to fully extract the data features while reducing the model parameters. Finally, a fully connected layer is used to adjust the dimension of the output features to 1024.

[0068] In one example of the present invention, the Ghost convolution structure in the feature extraction network first uses a 1*1 convolution kernel to perform a convolution operation on the input data to map the data to the feature domain, and then performs a 3*3 convolution kernel operation on the obtained features to obtain more feature maps. Finally, the results of the two convolution operations are spliced ​​on the channel, the obtained features are normalized, and the ReLu function is used as the activation function to obtain the final result.

[0069] In one example of the present invention, the conditional guidance network includes:

[0070] ResNet18 network and CNN+Transform multi-feature fusion network. The ResNet18 network is configured to extract the global features of the fault signal and output the noise prior. The CNN+Transform multi-feature fusion network is configured to learn fault data features at different scales, concatenate the results of convolution operations at different scales at the channel scale, and then input them into the Transformer to learn the relationship between features at different scales, and finally output the noise prior.

[0071] In one example of the present invention, the CNN+Transform multi-feature fusion network includes: a convolutional unit layer, a feature fusion layer and a Transformer module connected in series, the convolutional unit layer includes a second convolutional layer, a third convolutional layer and a fourth convolutional layer connected in parallel, the third convolutional layer and the fourth convolutional layer are respectively connected in series with the fifth convolutional layer and the sixth convolutional layer, the fifth convolutional layer, the sixth convolutional layer and the second convolutional layer are connected in parallel and connected to the feature fusion layer; wherein the convolutional unit layer is configured to learn fault data features of different scales, the feature splicing layer is configured to splice the learned features of different scales to obtain the feature size required by the Transformer; the Transformer module is configured to learn the correlation and dependency between different features to make the learned fault data features more comprehensive.

[0072] Among them, the fifth convolutional layer, the sixth convolutional layer and the second convolutional layer are connected in parallel and connected to the feature fusion layer; among them, the second convolutional layer is connected in series with the second BN layer and the second ReLu layer, the third convolutional layer is connected in series with the third BN layer and the third ReLu layer, the fourth convolutional layer is connected in series with the fourth BN layer and the fourth ReLu layer, the fifth convolutional layer is connected in series with the fifth BN layer and the fifth ReLu layer, and the sixth convolutional layer is connected in series with the sixth BN layer and the sixth ReLu layer.

[0073] Specifically, the conditional guidance network includes two branches: the ResNet18 network and the CNN+Transform multi-feature fusion network. The ResNet18 network extracts the global features of the fault signal and outputs the noise prior. The CNN+Transform multi-feature fusion network enhances the feature extraction capability of fault data by learning the features of fault data at different scales. The network consists of three branches. The first branch passes through the 1*1 convolution layer with 32 channels, the BN layer and the Relu module. The second branch first passes through the 3*3 convolution operation with 8 channels, the BN layer and the Relu module, and then passes through the 5*5 convolution operation with 32 channels, the BN layer and the Relu module. The third branch first passes through the 5*5 convolution operation with 8 channels, the BN layer and the Relu module, and then passes through the 3*3 convolution operation with 32 channels, the BN layer and the Relu module. The results of the convolution operations at different scales are spliced ​​at the channel scale and then input into the Transformer to learn the relationship between features at different scales, and finally output the noise prior.

[0074] In one example of the present invention, in order to fully integrate the characteristics of the fault data in the target domain into the noise prior, the conditional guidance network uses weighted cross entropy loss and multi-source domain adaptation loss as the loss function of the conditional guidance network, which is expressed as follows:

[0075]

[0076] in, is the cross entropy loss, is a multi-source domain adaptation loss function; the former is used to learn the classification loss in the source domain, and the latter learns the joint probability distribution difference between the feature distributions of multiple source domains and the target domain; γ is used to balance the two types of losses. It is initially 0. After learning the classification features of the source domain data, it increases with the increase in the number of training times, and the maximum value does not exceed 1.

[0077] In one example of the present invention, in order to enable the U-Net network to fully learn the distribution characteristics of random Gaussian noise related to the target domain data during the forward noisy process, the U-Net network uses weighted noise difference loss and multi-source domain adaptation loss as the loss function of the U-Net network, where the noise difference loss includes numerical difference and distribution difference after fusing different noise priors, and its expression is as follows:

[0078]

[0079] Where, is the loss function between the noise predicted by the U-Net network and the real noise, which includes the mean square difference And the distribution difference after fusing different noise priors and λ balances the two types of losses and takes a fixed value of 0.5; It is a loss function that balances the two types of losses by taking into account the difference in data feature distribution between multiple source domains and target domains. γ1 is initially 0 and gradually increases after learning the features of the source domain data, with the maximum value not exceeding 1.

[0080] In one example of the present invention, in step S20,

[0081] The expression of the forward noise addition process of the diffusion model is as follows:

[0082]

[0083] Where ∈ is random noise, It is a parameter related to the number of times of adding noise, y0 is the one-dimensional vector that the label is transformed into, y t is the variable obtained by adding noise t times;

[0084] The expression of the denoising process of the inverse process of the diffusion model is as follows:

[0085]

[0086] Among them, ρ(x) is the feature vector learned by the feature extraction network, y t is the variable obtained by adding noise t times to the prediction, p θ is the distribution characteristic of Gaussian noise.

[0087] In one example of the present invention, in steps S30 and S40, the multi-source domain adaptation algorithm is configured to perform feature alignment on multiple source domain and target domain data on a joint probability distribution, and transform the problem of solving the feature alignment into finding the maximum value of a convex function. The specific derivation process is as follows:

[0088]

[0089] Among them, MI(h(X), Y; L) is the multi-source domain loss function, h(x), y, l, p and m are the output features, the original labels of the data, the number of source domains, the feature probability distribution, and the number of all data respectively. Formula (2) is substituted into formula (1), and the similar features contained in each source domain and target domain are approximately equal. The sample mean is used to replace the convolution to simplify and obtain formula (3); r(h(x), y, l; θ) is a linear function about θ, among which k(h(x), h(x i )) is the Gaussian kernel function, δ(y,y i ) is the indicator core, at y=y i 1 when δ(l,l i ) is also the indicator core, when l=l i , and 0 otherwise. Substitute formula (4) into formula (3) to obtain the final loss function, where the two sub-formulas in formula (5) are about Convex function.

[0090] In one example of the present invention, the U-Net network is a four-layer convolution structure, including a two-layer encoder and a two-layer decoder. After the first layer of convolution passes through the BN layer and the Relu activation function, the features of the network are extracted by fusion of features through arithmetic operations, and the features of the network are guided by the fusion conditions through splicing operations.

[0091] According to the second aspect of the present invention, a diagnostic system for the multi-source domain rolling bearing fault diagnosis method based on the diffusion model as described above comprises the following steps:

[0092] A data acquisition module is configured to collect rolling bearing vibration signals under different speed conditions, using unlabeled speed condition data as target domain data and fault data under other speed conditions as source domain data;

[0093] Construct a model module and configure it to convert the source domain label into a one-dimensional vector y0 in the forward process of the diffusion model, pre-train the noise prediction network, and obtain the global noise prior and local noise prior Add noise to y0 T times to destroy the original distribution of y0 until a variable y with an approximate Gaussian distribution is obtained. T ; Use Gaussian distributed variables in the reverse process Instead of y T , and use the noise prediction network to learn the noise distribution features added in the forward distribution. Gradually denoising, and finally getting the same distribution as y0

[0094] The pre-training module is configured to input the source domain data into the noise prediction network to fully extract the data features, input the target domain data into the noise prediction network, and use the multi-source domain adaptation algorithm to map the source domain features to the target domain to obtain the global noise prior corresponding to the target domain data. and local noise prior

[0095] The noise migration module is configured to input source domain data and target domain data into the noise prediction network and use a multi-source domain adaptation algorithm to map the noise prediction network features to the target domain. The noise prediction network then fuses the fault data features after feature migration to learn noise features related to the target domain data.

[0096] The fault prediction module is configured to bring the learned target domain related Gaussian noise and the noise prior after migration into the reverse process of the model building module, and perform the Gaussian distribution of random variables. Stepwise denoising to predict the fault data type of the target domain.

[0097] This fault diagnosis system improves the noise prediction network in the diffusion model and designs a feature extraction network based on Ghost convolution and a conditional guidance network based on multi-scale feature fusion. The feature extraction network based on Ghost convolution reduces the computational complexity of the diffusion model while ensuring that the fault data features are fully learned. The conditional guidance network based on multi-scale feature fusion can learn fault data features at different scales, extracting richer features, better guiding the diffusion process, achieving convergence with fewer noise additions, and further reducing the computational complexity of the diffusion model. The effective combination of the diffusion model framework and the multi-source domain adaptation algorithm not only effectively extracts fault data features, but also achieves effective alignment of the source and target domains.

[0098] Specific cases

[0099] The process of multi-source domain adaptation method based on diffusion model is as follows Figure 1 The detailed process is as follows:

[0100] S10: Collect labeled rolling bearing vibration signals under various speed conditions as source data; another unlabeled speed load is used as the target domain. The training set ratio of the source domain to the target domain is 1:1. The data set is collected by randomly selecting fault data samples using a sliding window function.

[0101] S20: Construct a diffusion model framework based on the Markov process, including the forward denoising process and the reverse denoising process. In the forward denoising process, the original label is transformed into a one-dimensional vector y0, and the variable y with an approximate Gaussian distribution is obtained by denoising the one-dimensional label vector T times. T , so that it can be used with random Gaussian distribution in the reverse process Instead of y T , complete the reverse process of the diffusion model and the domain adaptation task. In the reverse process, the noise prediction network is used to learn the noise distribution features added to the forward distribution. Gradually denoising, and finally getting the same distribution as the label variable y0 To achieve fault diagnosis tasks, we designed a diffusion model noise prediction network, which consists of three parts: feature extraction network, conditional guidance network and U-Net network. The noise prediction network structure and the noise addition and denoising process are shown in the figure below. Figure 2 As shown in the figure, the noise coefficient is 0.0001-0.002. The number of noise additions needs to be fine-tuned to achieve the best effect as the dataset changes. The number of noise additions for the CWRU dataset is 80, and the number of noise additions for the laboratory-made bearing dataset is 100. Linear noise addition is selected as the noise addition method. In order to fully extract the source domain data features, a multi-layer Ghost convolution layer is set. The specific network structure and parameters are shown in Table 1. The structure is as follows Figure 3 and Figure 4 As shown, Figure 3 This is a schematic diagram of Ghost convolution. Figure 4 This is a schematic diagram of the feature extraction network. The conditional guidance network includes ResNet18 and CNN+Transform multi-feature fusion network. The output of the ResNet18 network is the global noise prior. The CNN+Transform multi-feature fusion network consists of three branches. Different branches learn fault features of different scales, and finally fuse the features and output them to the Transformer to further learn the relationship between the features. The network structure is as follows: Figure 5 As shown, the output local noise prior

[0102] Table 1 shows the network structure and parameters of the diffusion model framework

[0103]

[0104] S30: Input the source domain data into the conditional guidance network to fully extract the source domain data features, then input the target domain fault data, and use the multi-source domain adaptation algorithm to map the source domain features to the target domain to obtain the global noise prior and local noise prior The pre-training is performed for 20 epochs. The first 10 epochs only learn the source domain data features, and the domain adaptation loss function is added from the 11th epoch.

[0105] S40: Input the source domain data into the feature extraction network to fully learn the source domain data features, then input the target domain data, use the multi-source domain adaptation algorithm to map its features to the target domain, and use the U-Net network to fuse the feature extraction network features after migration and the pre-trained conditional guidance network features to predict Gaussian noise related to the target domain data.

[0106] S50: Bring the Gaussian noise and noise prior related to the target domain into the inverse process of the diffusion model in step 2, and perform random Gaussian noise Step by step denoising, we get the same distribution as the target domain fault data type y0

[0107] Experimental verification:

[0108] To verify the effectiveness and generalization of the proposed model, we used a publicly available bearing dataset from Case Western Reserve University and a bearing dataset collected in our laboratory as experimental objects. We compared the proposed model with several mainstream domain adaptation methods, including ADACL, MSSA, MFSAN, DAN, CORAL, DANN, and ACDANN. To reduce the impact of random errors on fault diagnosis, we used the average of five fault diagnosis runs as the final result.

[0109] Experimental Dataset 1:

[0110] Data collected from the drive side of the CWRU dataset was selected for this experiment, with a sampling frequency of 12kHz. Four operating conditions were included: 1730 rpm, 1750 rpm, 1772 rpm, and 1797 rpm, denoted by the letters A to D. Within each operating condition, the fault locations included three fault types: inner race, outer race, and rolling element. Each fault type had three fault diameters: 0.1778 cm, 0.3556 cm, and 0.5334 cm. The labels and fault types are shown in Table 2 below. 100 instances of each fault type were selected for both the training and test sets. The experimental results are shown in Table 3.

[0111] Table 2 shows the CWRU data labels and fault types.

[0112]

[0113] Table 3 shows the accuracy of data processed by different models

[0114]

[0115]

[0116] Experimental Dataset 2:

[0117] To further verify the generalizability of the proposed model, a laboratory-built dataset with a greater speed variation was selected to validate the model's effectiveness. This laboratory-collected bearing dataset uses SKF1007ECP cylindrical roller bearings, sampled at a frequency of 102.4 kHz. It includes three operating conditions: 1000 rpm, 2000 rpm, and 3000 rpm, denoted by the letters EG. Four fault types are included: normal data, inner ring spalling, outer ring cracking, and ball spalling. The fault types and labels are shown in Table 4 below. 150 instances of each fault type were selected in both the training and test sets. The experimental results are shown in Table 5 below.

[0118] Table 4 shows the bearing fault and label types

[0119]

[0120] Table 5 shows the accuracy of data processed by different models

[0121]

[0122] Table 3 shows that the average accuracy on the Case Western Reserve University bearing dataset is 99.57%, while the accuracy of the comparison algorithms is 96.44%, 96.53%, 93.72%, 95.07%, 95.07%, 94.26%, and 95.53%, respectively. The proposed method improves the accuracy by 3.08%-5.85% over the other methods. Table 4 shows that on the laboratory-collected bearing dataset with greater speed variation, the proposed method achieves an accuracy of 96.46%, while the comparison methods achieve accuracy of 93.05%, 91.96%, 90.81%, 90.67%, 90.82%, 87.87%, and 87.81%, respectively. The proposed method improves the accuracy by 3.43%-8.65% over the comparison algorithms. Due to the greater speed variation, the accuracy of each method decreases, but the multi-source domain adaptation method based on the diffusion model still achieves the highest accuracy.

[0123] In order to more intuitively demonstrate the feature transfer effect and classification ability of the method proposed in this paper, a t-distributed stochastic neighborhood embedding (T-SNE) visualization analysis is performed on the feature fusion layer in the U-Net network. Figures 6 to 8 They are domain adaptation graph and diffusion model denoising process graph respectively. Figure 6 and Figure 7 As can be seen, multiple source domain features and target domain features can be well aligned, and the classification effect is very obvious. Since the domain adaptation diagram has already demonstrated the classification effect of the model, here we only select the highest speed condition in the two sets of data as the model denoising process for demonstration, as shown in Figure 2. Figure 8 As shown in the figure, t represents the predicted result after t times of denoising. It can be seen that as the number of denoising increases, the noise added to the data features is gradually removed, and a clear and visible classification effect is obtained.

[0124] In order to further verify the generalization performance of the proposed method, the confusion matrix diagram is used to analyze the experimental results, such as Figure 9 As shown in the figure, due to the high diagnostic accuracy of the CWRU, only the laboratory-generated data set was analyzed. The figure shows that the majority of the fault data was correctly diagnosed, with only a small portion of the outer race crack data being diagnosed as other fault types.

[0125] The above describes in detail an exemplary implementation of the multi-source domain rolling bearing fault diagnosis method and system based on the diffusion model proposed in the present invention with reference to the preferred embodiments. However, those skilled in the art will understand that, without departing from the concept of the present invention, various modifications and variations can be made to the above-mentioned specific embodiments, and various technical features and structures proposed in the present invention can be combined in various ways without exceeding the scope of protection of the present invention, which is determined by the appended claims.

Claims

1. A multi-source domain rolling bearing fault diagnosis method based on diffusion model, characterized in that: The steps include: S10. Data collection: Collect rolling bearing vibration signals under different speed conditions, use a certain unlabeled speed condition data as target domain data, and other speed condition fault data as source domain data; S20. Construct a diffusion model framework: This includes the forward process and the reverse process. In the forward process of the diffusion model, the source domain label is converted into a one-dimensional vector y0, and the noise prediction network is pre-trained to obtain the global noise prior. and local noise prior Add noise to y0 T times to destroy the original distribution of y0 until a variable y with an approximate Gaussian distribution is obtained. T ; Use Gaussian distributed variables in the reverse process Instead of y T , and use the noise prediction network to learn the noise distribution features added in the forward distribution. Gradually denoising, and finally getting the same distribution as y0 Among them, the noise prediction network includes a feature extraction network, a conditional guidance network and a U-Net network. The feature extraction network is configured to extract data features based on the Ghost convolutional network; the conditional guidance network is configured to extract noise priors; the U-Net network is configured to fuse the data features and the noise priors; the feature extraction network includes: a first convolutional layer, a first BN layer, a first ReLu layer, a Ghost layer and a fully connected layer connected in series, wherein the Ghost layer includes multiple layers and is connected in series between the first ReLu layer and the fully connected layer, the first convolutional layer is configured to perform convolution operations on the input data, the first BN layer and the first ReLu are configured to accelerate the convergence speed of the model and increase the generalization of the model; the multiple Ghost layers are configured to reduce the parameters of the model while fully extracting data features; the fully connected layer is configured to adjust the dimension of the output features to 1024; the conditional guidance network includes: a ResNet18 network and a CNN+Transform multi-feature fusion network, the ResNet18 network is configured to extract the global features of the fault signal and output noise priors The CNN+Transform multi-feature fusion network is configured to learn fault data features at different scales, concatenate the results of convolution operations at different scales at the channel scale, and then input them into the Transformer to learn the relationship between features at different scales, and finally output the noise prior. S30, input the source domain data into the noise prediction network to fully extract the data features, input the target domain data into the noise prediction network, use the multi-source domain adaptation algorithm to map the source domain features to the target domain, and obtain the global noise prior corresponding to the target domain data and local noise prior S40, inputting the source domain data and the target domain data into the noise prediction network, and using a multi-source domain adaptation algorithm to map the noise prediction network features to the target domain, the noise prediction network fuses the fault data features after feature migration, and learns the noise features related to the target domain data; S50, the Gaussian noise related to the target domain and the noise prior after migration are brought into the reverse process in step S20, and the Gaussian distributed random variables are Stepwise denoising to predict the fault data type of the target domain.

2. The multi-source domain rolling bearing fault diagnosis method based on diffusion model according to claim 1 is characterized in that: The CNN+Transform multi-feature fusion network includes: a convolutional unit layer, a feature fusion layer and a Transformer module connected in series, the convolutional unit layer includes a second convolutional layer, a third convolutional layer and a fourth convolutional layer connected in parallel, the third convolutional layer and the fourth convolutional layer are respectively connected in series with the fifth convolutional layer and the sixth convolutional layer, the fifth convolutional layer, the sixth convolutional layer and the second convolutional layer are connected in parallel and connected to the feature fusion layer; wherein the convolutional unit layer is configured to learn fault data features of different scales, the feature splicing layer is configured to splice the learned features of different scales to obtain the feature size required by the Transformer; the Transformer module is configured to learn the correlation and dependency between different features to make the learned fault data features more comprehensive.

3. The multi-source domain rolling bearing fault diagnosis method based on diffusion model according to claim 1 is characterized in that: The conditional guidance network uses weighted cross entropy loss and multi-source domain adaptation loss as the loss function of the conditional guidance network, which is expressed as follows: in, is the cross entropy loss, is a multi-source domain adaptation loss function; the former is used to learn the classification loss in the source domain, and the latter learns the joint probability distribution difference between the feature distributions of multiple source domains and the target domain; γ is used to balance the two types of losses. It is initially 0. After learning the classification features of the source domain data, it increases with the increase in the number of training times, and the maximum value does not exceed 1.

4. The multi-source domain rolling bearing fault diagnosis method based on diffusion model according to claim 1 is characterized in that: The U-Net network uses weighted noise difference loss and multi-source domain adaptation loss as the loss function of the U-Net network, where the noise difference loss includes the numerical difference and the distribution difference after fusing different noise priors. Its expression is as follows: Where, is the loss function between the noise predicted by the U-Net network and the real noise, which includes the mean square difference And the distribution difference after fusing different noise priors and λ balances the two types of losses and takes a fixed value of 0.5; It is a loss function that balances the two types of losses by taking into account the difference in data feature distribution between multiple source domains and target domains. γ1 is initially 0 and gradually increases after learning the features of the source domain data, with the maximum value not exceeding 1.

5. The multi-source domain rolling bearing fault diagnosis method based on diffusion model according to claim 1 is characterized in that: In the step S20, The expression of the forward noise addition process of the diffusion model is as follows: Where ∈ is random noise, It is a parameter related to the number of times of adding noise, y0 is the one-dimensional vector that the label is transformed into, y t is the variable obtained by adding noise t times; The expression of the denoising process of the inverse process of the diffusion model is as follows: Among them, ρ(x) is the feature vector learned by the feature extraction network, y t is the variable obtained by adding noise t times to the prediction, p θ is the distribution characteristic of Gaussian noise.

6. The multi-source domain rolling bearing fault diagnosis method based on diffusion model according to claim 1 is characterized in that: In steps S30 and S40, the multi-source domain adaptation algorithm is configured to perform feature alignment on multiple source domain and target domain data on a joint probability distribution, and transform the problem of solving feature alignment into finding the maximum value of a convex function. The specific derivation process is as follows: Among them, MI(h(X), Y; L) is the multi-source domain loss function, h(x), y, l, p and m are the output features, the original labels of the data, the number of source domains, the feature probability distribution, and the number of all data respectively. Formula (2) is substituted into formula (1), and the similar features contained in each source domain and target domain are approximately equal. The sample mean is used to replace the convolution to simplify and obtain formula (3); r(h(x), y, l; θ) is a linear function about θ, among which k(h(x), h(x i )) is the Gaussian kernel function, δ(y,y i ) is the indicator core, at y=y i 1 when δ(l,l i ) is also the indicator core, when l=l i , and 0 otherwise. Substitute formula (4) into formula (3) to obtain the final loss function, where the two sub-formulas in formula (5) are about Convex function.

7. A diagnostic system for a rolling bearing fault diagnosis method based on a multi-source domain diffusion model according to any one of claims 1 to 6, characterized in that: The steps include: A data acquisition module is configured to collect rolling bearing vibration signals under different speed conditions, using unlabeled speed condition data as target domain data and fault data under other speed conditions as source domain data; Construct a model module and configure it to convert the source domain label into a one-dimensional vector y0 in the forward process of the diffusion model, pre-train the noise prediction network, and obtain the global noise prior and local noise prior Add noise to y0 T times to destroy the original distribution of y0 until a variable y with an approximate Gaussian distribution is obtained. T ; Use Gaussian distributed variables in the reverse process Instead of y T , and use the noise prediction network to learn the noise distribution features added in the forward distribution. Gradually denoising, and finally getting the same distribution as y0 Among them, the noise prediction network includes a feature extraction network, a conditional guidance network and a U-Net network. The feature extraction network is configured to extract data features based on the Ghost convolutional network; the conditional guidance network is configured to extract noise priors; the U-Net network is configured to fuse the data features and the noise priors; the feature extraction network includes: a first convolutional layer, a first BN layer, a first ReLu layer, a Ghost layer and a fully connected layer connected in series, wherein the Ghost layer includes multiple layers and is connected in series between the first ReLu layer and the fully connected layer, the first convolutional layer is configured to perform convolution operations on the input data, the first BN layer and the first ReLu are configured to accelerate the convergence speed of the model and increase the generalization of the model; the multiple Ghost layers are configured to reduce the parameters of the model while fully extracting data features; the fully connected layer is configured to adjust the dimension of the output features to 1024; the conditional guidance network includes: a ResNet18 network and a CNN+Transform multi-feature fusion network, the ResNet18 network is configured to extract the global features of the fault signal and output noise priors The CNN+Transform multi-feature fusion network is configured to learn fault data features at different scales, concatenate the results of convolution operations at different scales at the channel scale, and then input them into the Transformer to learn the relationship between features at different scales, and finally output the noise prior. The pre-training module is configured to input the source domain data into the noise prediction network to fully extract the data features, input the target domain data into the noise prediction network, and use the multi-source domain adaptation algorithm to map the source domain features to the target domain to obtain the global noise prior corresponding to the target domain data. and local noise prior The noise migration module is configured to input source domain data and target domain data into the noise prediction network and use a multi-source domain adaptation algorithm to map the noise prediction network features to the target domain. The noise prediction network then fuses the fault data features after feature migration to learn noise features related to the target domain data. The fault prediction module is configured to bring the learned target domain related Gaussian noise and the noise prior after migration into the reverse process of the model building module, and perform the Gaussian distribution of random variables. Stepwise denoising to predict the fault data type of the target domain.

Citation Information

Patent Citations

  • Rolling bearing intelligent fault diagnosis method and system based on enhanced event visual data

    CN116380466A

  • Signal denoising method and system based on denoising generative adversarial network and diffusion model

    CN117743768A