Rotary machinery fault diagnosis method based on SE attention mechanism hybrid network and batch spectrum penalty
Through the SE attention mechanism hybrid network and batch spectrum punishment method, the problems of insufficient generalization ability and poor characteristic distinction in rotary machinery fault diagnosis are solved, and efficient and accurate cross-domain diagnosis in rotary machinery fault diagnosis are achieved. , especially in unsupervised learning and cross-domain diagnosis.
Patent Information
- Application Number
- CN202410988444.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-15
AI Technical Summary
The existing deep learning-based rotary machinery fault diagnosis method lacks generalization ability when processing data from different domains, and its feature distinction is not strong. The traditional method requires manual adjustment of network architecture parameters, resulting in cross-domain fault diagnosis in industrial environments. Not effective.
The SE attention mechanism hybrid network and batch spectrum punishment method are adopted to enhance the generalization ability and feature discrimination of the model through adaptive learning of feature weights, MixStyle data enhancement and adversarial domain adaptation models, and the maximum singular value is punished by Batch SpectralPenalization. Improve the performance of eigenvectors.
Improve the generalization ability and feature extraction ability of the model in rotary mechanical fault diagnosis, achieving higher accuracy and robustness, especially in unsupervised and cross-domain diagnostic tasks, which show that compared with other advanced methods Higher accuracy and robustness.
Smart Images

Figure CN118965027A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fault diagnosis of rotating machinery, and in particular to a method for unsupervised fault diagnosis using deep learning. Background Art
[0002] As a core component of large-scale mechanical equipment, rotating machinery plays a vital role in industrial applications. The development of fault diagnosis technology is of great significance to ensure the reliability and safety of these equipment. With the rise of deep learning technology, the rotating machinery fault diagnosis method based on it has demonstrated excellent feature extraction capabilities and does not need to rely on overly professional domain knowledge. It has shown great potential in fault diagnosis in a single field. However, most of the existing deep learning-based fault diagnosis methods are based on an assumption: the data distribution of the training set and the test set is the same, and the label information is consistent. This assumption is often not true in industrial practice. Due to changes in factors such as speed, load, noise, and temperature, there are often differences in data distribution. This leads to differences in the distribution of source domain and target domain data, but there are also certain similarities. In addition, re-labeling the target domain data for training will incur significant costs.
[0003] In traditional industrial environments, cross-domain fault diagnosis becomes particularly important due to these changes in data distribution. In addition, existing convolutional neural networks often ignore the relationship between different channels when processing them, giving equal importance to all channels, resulting in poor generalization ability and the need to manually adjust network architecture parameters for different tasks. At the same time, traditional domain adversarial transfer learning methods have limited recognition capabilities in studying feature distinguishability, resulting in weak feature distinguishability. Summary of the invention
[0004] In order to solve the above problems, the present invention proposes a rotating machinery fault diagnosis method based on a hybrid network of SE attention mechanism and batch spectral penalty, which enhances the generalization ability and feature distinguishability of the model through batch spectral penalty (Batch Spectral Penalization, BSP).
[0005] To achieve the above object, the technical solution of the present invention is:
[0006] A rotating machinery fault diagnosis method based on a SE attention mechanism hybrid network and batch spectrum penalty, characterized in that it specifically includes the following steps:
[0007] S1: Problem definition, including:
[0008] S1.1: Assume that the source domain data is labeled and the purpose is to predict the unlabeled target domain data. Here we mainly study the case where the fault categories in the source domain and the target domain are the same;
[0009] S1.2: Assuming that the source domain is available, define the source domain. The definition of the source domain is as follows:
[0010]
[0011] Among them, D s represents the source domain, is the i-th sample, X s is the sum of all samples, is the i-th label of the i-th sample, Y s is the sum of all different labels, n s is the total number of samples in the source domain
[0012] S1.3: Assuming that the label of the target domain is not available, the source domain is defined as follows:
[0013]
[0014] Among them, D t represents the target domain, is the i-th sample, X t is the total number of samples, n t is the total number of target samples;
[0015] S2: Establish the SE attention mechanism to adaptively learn the weights of input features, including:
[0016] S2.1: For each convolutional layer feature map, a squeezing operation is performed to generate a channel descriptor;
[0017] S2.2: using the channel descriptor, generating a series of channel weights through a self-gating mechanism;
[0018] S2.3: The structure diagram of SE is as follows Figure 2 , different colors represent different weights, and then the output of the SE block is generated through the feature map;
[0019] S3: Implement the MixStyle data augmentation method to simulate new styles and enhance the generalization ability of source domain data, including:
[0020] S3.1: Normalize the feature vectors using the mean and standard deviation based on the specific instance, set as a batch of tensors with dimension x∈R B×C×H×W , B, C, HW represent batch, channel, height and width respectively. Then, IN is expressed as:
[0021]
[0022]
[0023]
[0024] Where μ(x) and σ(x) are the mean and standard deviation calculated for each instance in each channel across the spatial dimensions, and γ and β are learnable affine transformation parameters;
[0025] S3.2: Adaptive Instance Normalization (AdaIN) is introduced, which simply replaces the scale and shift parameters in Eq. 5 with the feature statistics of the style input y, allowing arbitrary style transfer:
[0026]
[0027] S3.3: Combine the style information of the source domain training instances with the mixed style perturbation to normalize CNN training. It can be inserted into the CNN layer as a module. MixStyle simulates a new style by randomly convexly weighting the feature statistics of two instances. It can be integrated into mini-batch training. Given an input batch, the mixed style is first generated by mixing. When the domain label is provided, it will be sampled from two different domains. The generated batch change map is shown in Figure 3 As shown;
[0028] S4: Introduce the batch spectral penalty (BSP) method to penalize the maximum singular value and enhance other eigenvectors, including:
[0029] S4.1: Using a method based on linear discriminant analysis (LDA), the between-class variance S b and the intra-class variance S w ;
[0030]
[0031] Where c is the number of categories, and each category has n j Sample, the deep feature extracted by f is f = F(x), μ j and μ are the eigenvector centers of class j and all classes respectively, F j is the set of all eigenvectors in class j;
[0032] S4.2: For the feature matrices of the source domain and the target domain, singular value decomposition (SVD) is applied to obtain the largest singular value;
[0033] S4.3: Using the maximum singular value as a regularization term to penalize the feature vectors in each batch;
[0034] S5: Build an adversarial domain adaptation model to learn transferable features through adversarial training, including:
[0035] S5.1: Generative Adversarial Networks (GANs) consist of two main components: a generator G(z) and a discriminator D(z). The loss function of GAN can be divided into two parts, corresponding to the training objectives of the generator and the discriminator respectively;
[0036] S5.2: Generate realistic samples using generators in generative adversarial networks (GANs);
[0037] S5.3: Use the discriminator to distinguish between generated samples and real samples;
[0038] S5.4: Train by minimizing the loss function between the generator and the discriminator;
[0039] S6: Conduct experimental verification, including:
[0040] S6.1: Unsupervised domain generalization experiments using the NEFU gear dataset and the JUN bearing dataset;
[0041] S6.2: If Figure 7-12 , evaluate the model performance from multiple angles such as confusion matrix, clustering graph and F1 score graph;
[0042] S6.3: Compare the proposed method with other advanced methods to verify its superiority;
[0043] S7: Apply the model and apply the trained model to the fault diagnosis of actual rotating machinery to achieve real-time monitoring and fault warning;
[0044] S8: Update the model, and continuously update the twin vibration signal database based on feedback from actual applications to optimize model performance;
[0045] Furthermore, the batch spectral penalty method further includes: defining the between-class variance and the within-class variance, and calculating the ratio of the two through linear discriminant analysis (LDA); obtaining the singular values of the feature matrix using SVD, and applying the BSP penalty to the feature vectors of each batch;
[0046] Furthermore, the MixStyle data enhancement method further includes: for each batch, sampling instance weights according to the Beat distribution; and applying the mixed feature statistics to the style normalized features.
[0047] Furthermore, the SE attention mechanism is used to extract features of the vibration signal, and the SE attention mechanism includes a squeeze operation and an excitation operation.
[0048] Furthermore, the MixStyle data augmentation step combines the instance-level feature statistics of two instances under the same fault signature at the lower CNN level through probabilistic convex combination.
[0049] Furthermore, the Batch Spectral Penalization (BSP) step enhances other eigenvectors by penalizing the largest singular value, thereby improving feature discriminability.
[0050] Furthermore, the BSP-based adversarial domain adaptation model achieves domain generalization through adversarial training, and the formula is derived as follows: L gen =-E z~p(z) [log(D(G(z)))] L disc =-E x~pdata(x) [log(D(x))]-E z~p(z) [log(1-D(G(z)))] Among them, z is the input noise of the generator, G(z) is the output of the generator, D(z) is the judgment result of the discriminator on the output of the generator, x represents the real sample, and D(x) represents the evaluation of the discriminator on the real sample.
[0051] Furthermore, the experimental verification step uses the NEFU gear dataset and the JUN bearing dataset to conduct unsupervised domain generalization experiments to verify the superiority of the proposed method. The experimental verification further includes: fixing the random seed and repeating the experiment to verify the effectiveness and repeatability of the method; comparing from multiple perspectives, such as Figure 7-12 , including confusion matrix, clustering graph and F1 score graph.
[0052] Compared with the prior art, the present invention has the following effects:
[0053] The present invention provides a rotating machinery fault diagnosis method based on a hybrid network with SE attention mechanism and batch spectrum penalty, which effectively solves the problems of insufficient generalization ability and weak feature discrimination of traditional convolutional neural networks in processing rotating machinery fault diagnosis. The SE attention mechanism dynamically allocates weights to enhance the adaptability and expression ability of the model to different fault features. The present invention adopts the MixStyle method to perform probability mixing in cross-domain training, which enhances the diversity of source domain data and improves the generalization ability of the model on target domain data. The present invention introduces Batch The SpectralPenalization (BSP) method penalizes the maximum singular value, improves the performance of other eigenvectors, thereby enhancing the discriminability of the features and optimizing the domain adversarial performance; the method of the present invention has experimentally verified its excellent performance in unsupervised fault diagnosis tasks on the NEFU gear dataset and the JUN bearing dataset, especially in cross-domain diagnosis tasks, compared with other advanced methods, it has shown higher accuracy and robustness; the present invention verifies the effectiveness of the SE module, the MixStyle module and the BSP method in the model through ablation experiments, ensuring the rationality of the model design and the synergy of each component; the method provided by the present invention provides a new perspective in the field of fault diagnosis of rotating machinery, especially in unsupervised learning and cross-domain diagnosis, and has important theoretical significance and application value; the present invention also proposes a fault diagnosis method based on an improved deep learning model, which measures domain distribution differences through data enhancement and auxiliary adversarial training, and provides a new strategy for fault diagnosis of rotating machinery. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 The comparison diagram before and after domain adaptation is shown.
[0055] Figure 2 Shows the structure of the SE attention mechanism.
[0056] Figure 3 A diagram showing how MixStyle generates batch changes.
[0057] Figure 4 The MixStyle network architecture diagram based on SE attention mechanism and BSP loss is shown.
[0058] Figure 5 A schematic diagram showing the MixStyle process.
[0059] Figure 6 Photographs showing different types of gear failures.
[0060] Figures 7 to 12 The confusion matrix, clustering diagram and F1 score diagram of different migration tasks are shown respectively.
[0061] Fig.13 The overall workflow diagram of the method is shown, which is also an illustration of the summary. DETAILED DESCRIPTION
[0062] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0063] This paper proposes a rotating machinery fault diagnosis method based on a SE attention mechanism hybrid network and batch spectrum penalty. Through dynamic weight allocation and cross-domain training, the generalization ability and feature extraction ability of the model are improved, and efficient and accurate diagnosis of rotating machinery faults is achieved.
[0064] A rotating machinery fault diagnosis method based on a SE attention mechanism hybrid network and batch spectrum penalty specifically includes the following steps:
[0065] S1: Problem definition, including:
[0066] S1.1: Assume that the source domain data is labeled and the purpose is to predict the unlabeled target domain data. Here we mainly study the case where the fault categories in the source domain and the target domain are the same;
[0067] S1.2: Assuming that the source domain is available, define the source domain. The definition of the source domain is as follows:
[0068]
[0069] Among them, D s represents the source domain, is the i-th sample, X s is the sum of all samples, is the i-th label of the i-th sample, Y s is the sum of all different labels, n s is the total number of samples in the source domain
[0070] S1.3: Assuming that the label of the target domain is not available, the source domain is defined as follows:
[0071]
[0072] Among them, D t represents the target domain, is the i-th sample, X t is the total number of samples, n t is the total number of target samples;
[0073] S2: Establish the SE attention mechanism to adaptively learn the weights of input features, including:
[0074] S2.1: For each convolutional layer feature map, a squeezing operation is performed to generate a channel descriptor;
[0075] S2.2: using the channel descriptor, generating a series of channel weights through a self-gating mechanism;
[0076] S2.3: The structure diagram of SE is as follows Figure 2 , different colors represent different weights, and then the output of the SE block is generated through the feature map;
[0077] S3: Implement the MixStyle data augmentation method to simulate new styles and enhance the generalization ability of source domain data, including:
[0078] S3.1: Normalize the feature vectors using the mean and standard deviation based on the specific instance, set as a batch of tensors with dimensions x∈R B×C×H×W , B, C, HW represent batch, channel, height and width respectively. Then, IN is expressed as:
[0079]
[0080]
[0081]
[0082] Where μ(x) and σ(x) are the mean and standard deviation calculated for each instance in each channel across the spatial dimensions, and γ and β are learnable affine transformation parameters;
[0083] S3.2: Adaptive Instance Normalization (AdaIN) is introduced, which simply replaces the scale and shift parameters in Eq. 5 with the feature statistics of the style input y, allowing arbitrary style transfer:
[0084]
[0085] S3.3: Combine the style information of the source domain training instances with the mixed style perturbation to normalize CNN training. It can be inserted into the CNN layer as a module. MixStyle simulates a new style by randomly convexly weighting the feature statistics of two instances. It can be integrated into mini-batch training. Given an input batch, the mixed style is first generated by mixing. When the domain label is provided, it will be sampled from two different domains. The generated batch change map is shown in Figure 3 As shown;
[0086] S4: Introduce the batch spectral penalty (BSP) method to penalize the maximum singular value and enhance other eigenvectors, including:
[0087] S4.1: Using a method based on linear discriminant analysis (LDA), the between-class variance S b and the intra-class variance S w ;
[0088]
[0089] Where c is the number of categories, and each category has n j Sample, the deep feature extracted by f is f = F(x), μ j and μ are the eigenvector centers of class j and all classes respectively, F j is the set of all eigenvectors in class j;
[0090] S4.2: For the feature matrices of the source domain and the target domain, singular value decomposition (SVD) is applied to obtain the largest singular value;
[0091] S4.3: Using the maximum singular value as a regularization term to penalize the feature vectors in each batch;
[0092] S5: Build an adversarial domain adaptation model to learn transferable features through adversarial training, including:
[0093] S5.1: Generative Adversarial Networks (GANs) consist of two main components: a generator G(z) and a discriminator D(z). The loss function of GAN can be divided into two parts, corresponding to the training objectives of the generator and the discriminator respectively;
[0094] S5.2: Generate realistic samples using generators in generative adversarial networks (GANs);
[0095] S5.3: Use the discriminator to distinguish between generated samples and real samples;
[0096] S5.4: Train by minimizing the loss function between the generator and the discriminator;
[0097] S6: Conduct experimental verification, including:
[0098] S6.1: Unsupervised domain generalization experiments using the NEFU gear dataset and the JUN bearing dataset;
[0099] S6.2: If Figure 7-12 , evaluate the model performance from multiple angles such as confusion matrix, clustering graph and F1 score graph;
[0100] S6.3: Compare the proposed method with other advanced methods to verify its superiority;
[0101] S7: Apply the model and apply the trained model to the fault diagnosis of actual rotating machinery to achieve real-time monitoring and fault warning;
[0102] S8: Update the model, and continuously update the twin vibration signal database based on feedback from actual applications to optimize model performance;
[0103] The above descriptions are only preferred specific embodiments of the present invention, rather than all specific embodiments. All other specific embodiments obtained by ordinary technicians in this field based on the specific embodiments of the present invention without making any creative work shall fall within the scope of protection of the present invention.
Claims
1. A rotating machinery fault diagnosis method based on SE attention mechanism hybrid network and batch spectrum penalty, It is characterized in that The specific steps include: S1: Problem definition, including: S1.1: Assume that the source domain data is labeled and the purpose is to predict the unlabeled target domain data. Here we mainly study the case where the fault categories in the source domain and the target domain are the same; S1.2: Assuming that the source domain is available, define the source domain. The definition of the source domain is as follows: Among them, D s represents the source domain, is the i-th sample, X s is the sum of all samples, is the i-th label of the i-th sample, Y s is the sum of all different labels, n s is the total number of samples in the source domain S1.3: Assuming that the label of the target domain is not available, the source domain is defined as follows: Among them, D t represents the target domain, is the i-th sample, X t is the total number of samples, n t is the total number of target samples; S2: Establish the SE attention mechanism to adaptively learn the weights of input features, including: S2.1: For each convolutional layer feature map, a squeezing operation is performed to generate a channel descriptor; S2.2: using the channel descriptor, generating a series of channel weights through a self-gating mechanism; S2.3: The structure diagram of SE is shown in Figure 2. Different colors represent different weights, and then the output of the SE block is generated through the feature map; S3: Implement the MixStyle data augmentation method to simulate new styles and enhance the generalization ability of source domain data, including: S3.1: Normalize the feature vectors using the mean and standard deviation based on the specific instance, set as a batch of tensors with dimension x∈R B×C×H×W , B, C, HW represent batch, channel, height and width respectively. Then, IN is expressed as: Where μ(x) and σ(x) are the mean and standard deviation calculated for each instance in each channel across the spatial dimensions, and γ and β are learnable affine transformation parameters; S3.2: Adaptive Instance Normalization (AdaIN) is introduced, which simply replaces the scale and shift parameters in Eq. 5 with the feature statistics of the style input y, allowing arbitrary style transfer: S3.3: Combine the style information of the source domain training instances with the mixed style perturbation to normalize CNN training. It can be inserted into the CNN layer as a module. MixStyle simulates a new style by randomly convexly weighting the feature statistics of two instances. It can be integrated into mini-batch training. Given an input batch, the mixed style is first generated by mixing. When the domain label is provided, it will be sampled from two different domains. The generated batch change map is shown in Figure 3. S4: Introduce the batch spectral penalty (BSP) method to penalize the maximum singular value and enhance other eigenvectors, including: S4.1: Using a method based on linear discriminant analysis (LDA), the between-class variance S b and the intra-class variance S w ; Where c is the number of categories, and each category has n j Sample, the deep feature extracted by f is f = F(x), μ j and μ are the eigenvector centers of class j and all classes respectively, F j is the set of all eigenvectors in class j; S4.2: For the feature matrices of the source domain and the target domain, singular value decomposition (SVD) is applied to obtain the largest singular value; S4.3: Using the maximum singular value as a regularization term to penalize the feature vectors in each batch; S5: Build an adversarial domain adaptation model to learn transferable features through adversarial training, including: S5.1: Generative Adversarial Networks (GANs) consist of two main components: a generator G(z) and a discriminator D(z). The loss function of GAN can be divided into two parts, corresponding to the training objectives of the generator and the discriminator respectively; S5.2: Generate realistic samples using generators in generative adversarial networks (GANs); S5.3: Use the discriminator to distinguish between generated samples and real samples; S5.4: Train by minimizing the loss function between the generator and the discriminator; S6: Conduct experimental verification, including: S6.1: Unsupervised domain generalization experiments using the NEFU gear dataset and the JUN bearing dataset; S6.2: As shown in Figures 7-12, the model performance is evaluated from multiple perspectives such as confusion matrix, clustering graph and F1 score graph; S6.3: Compare the proposed method with other advanced methods to verify its superiority; S7: Apply the model and apply the trained model to the fault diagnosis of actual rotating machinery to achieve real-time monitoring and fault warning; S8: Update the model and continuously update the twin vibration signal database based on feedback from actual applications to optimize model performance.
2. The method according to claim 1, It is characterized in that The batch spectral penalty method further includes: defining the between-class variance and the within-class variance, and calculating the ratio of the two through linear discriminant analysis (LDA); using SVD to obtain the singular values of the feature matrix, and applying the BSP penalty to the feature vectors of each batch.
3. The method according to claim 1, It is characterized in that The MixStyle data augmentation method further includes: for each batch, sampling instance weights according to the Beat distribution; and applying the mixed feature statistics to the style normalized features.
4. The method according to claim 1, It is characterized in that The SE attention mechanism is used to extract features of vibration signals. The SE attention mechanism includes squeezing operation and excitation operation.
5. The method according to claim 1, It is characterized in that The MixStyle data augmentation step performs a probabilistic convex combination of instance-level feature statistics of two instances with the same fault signature at the lower CNN level.
6. The method according to claim 1, It is characterized in that The Batch Spectral Penalization (BSP) step enhances other eigenvectors by penalizing the largest singular value, thereby improving feature discriminability.
7. The method according to claim 1, It is characterized in that The BSP-based adversarial domain adaptation model achieves domain generalization through adversarial training. The formula is derived as follows: L gen =-E z~p(z) [log(D(G(z)))] Among them, z is the input noise of the generator, G(z) is the output of the generator, D(z) is the judgment result of the discriminator on the output of the generator, x represents the real sample, and D(x) represents the evaluation of the real sample by the discriminator.
8. The method according to claim 1, It is characterized in that Experimental verification steps use the NEFU gear dataset and the JUN bearing dataset to conduct unsupervised domain generalization experiments to verify the superiority of the proposed method. The experimental verification further includes: fixing the random seed and repeating the experiment to verify the effectiveness and repeatability of the method; comparing from multiple perspectives, including confusion matrix, clustering graph and F1 score graph.
