Mechanical fault diagnosis method based on deep adversarial transfer learning
Through the improved domain adversarial neural network (E-DANN) combined with multi-scale attention and entropy minimization strategies, the problem of fault diagnosis of mechanical equipment under operating conditions is solved, and high-precision and robust cross-condition fault recognition is achieved, which is suitable for intelligent diagnosis of industrial rotary machinery.
Patent Information
- Application Number
- CN202510531693.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-07-29
AI Technical Summary
The generalization performance of the mechanical equipment fault diagnosis model in the prior art is limited under different working conditions, especially under the conditions of data distribution offset and sample imbalance, which makes it difficult for traditional methods to achieve efficient cross-working diagnosis.
The improved domain adversarial neural network (E-DANN) is adopted to achieve end-to-end training of feature extraction and classification through dynamic adversarial sample generation, multi-scale attention learning and entropy minimization strategies, combined with multi-scale convolution and channel attention mechanism, and to alleviate the problems of working condition offset and category imbalance.
Under the condition of unlabeled samples and sample imbalance, the accuracy and generalization of fault diagnosis are significantly improved, and high-precision cross-working fault recognition is achieved, which is suitable for intelligent diagnosis of industrial rotating machinery.
Smart Images

Figure CN120388234A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of mechanical fault detection and artificial intelligence, and specifically proposes a method and system for rotating mechanical equipment fault identification based on optimized deep adversarial transfer learning, which is applicable to realizing intelligent fault diagnosis of industrial rotating equipment such as motors, fans, and bearings under different working conditions. Background Art
[0002] Mechanical equipment is widely used in key industries such as aviation, manufacturing, and automotive. Whether its operating state is stable is directly related to safety and economic benefits. Once a fault occurs, it is extremely likely to cause serious accidents and huge economic losses. Traditional machine learning-based fault identification techniques usually rely on a large amount of labeled data for training. However, in actual industrial applications, the data distribution differences between different operating conditions are relatively large, and the labeled samples under the target working conditions are extremely limited, resulting in limited generalization performance of the model and unsatisfactory cross-condition diagnosis effects. Currently, intelligent fault diagnosis mainly faces two challenges: Firstly, the data distribution shift problem is significant: under different rotational speeds, loads, or environmental conditions, the characteristics of vibration signals vary greatly, making it difficult for a model trained based on a single working condition to adapt to new scenarios; Secondly, the data annotation cost is high: it is difficult to obtain sufficient target working condition samples in the industrial field, and the annotation process is time-consuming and laborious, making it difficult to popularize traditional supervision learning-based solutions.
[0003] Existing methods such as CNN, ResNet, and the classical generative adversarial network (GAN) have been used in fault diagnosis to a certain extent, but they still have deficiencies in dealing with data quality, pattern preservation, and generalization ability. Common domain adversarial methods such as DANN (Domain Adversarial Neural Network), while having a certain migration ability, are vulnerable to domain adversarial task interference when facing the problem of unbalanced sample distribution, resulting in a decline in the performance of the classifier and limited diagnostic accuracy. Therefore, a new highly robust fault diagnosis method that can effectively address data imbalance and at the same time have strong cross-domain adaptability is needed. Summary of the Invention
[0004] The objective of this patent is to develop an improved domain adversarial neural network (Enhanced Domain Adversarial Neural Network, E-DANN) diagnostic framework, which systematically integrates the following key technical elements: a dynamic adversarial sample generation module that generates cross-condition migration samples through gradient backpropagation; a multi-scale attention learning mechanism that extracts hierarchical features using a parallel convolutional structure; a joint distribution adaptation strategy that synchronously aligns the marginal distribution and the conditional distribution; and an entropy minimization strategy that enhances decision confidence by minimizing the prediction entropy of the target domain. Through feature decoupling and domain-invariant feature learning, this algorithm effectively alleviates the problems of condition shift and class imbalance commonly existing in industrial scenarios.
[0005] The main content of the present invention includes:
[0006] A method for diagnosing faults in rotating machinery based on unsupervised domain adaptation deep adversarial transfer learning, comprising the following steps:
[0007] (1) Collect vibration signals from the source domain and the target domain, and convert them into frequency-domain signals through fast Fourier transform (FFT);
[0008] (2) Generate two-dimensional images through Gramian angular field (GAF) transformation;
[0009] (3) Use the AUGMIX data augmentation algorithm to perform weighted fusion enhancement on the GAF images;
[0010] (4) Construct a feature extraction network that integrates multi-scale convolution and channel attention mechanisms to extract multi-granularity features;
[0011] (5) Conduct end-to-end training based on an improved domain adversarial neural network (DANN) structure, including a feature extractor, a domain discriminator, and an entropy minimization classifier;
[0012] (6) Jointly optimize the classification loss and the domain adversarial loss, and output the fault categories of the target domain samples.
[0013] The multi-scale attention mechanism includes: a global average pooling layer; an attention module composed of two fully connected networks; a Sigmoid activation function for generating an attention weight vector; multiplying the weight vector by the original channel features and then outputting the final attention features as the result. After pooling, convolution processing is performed to obtain the final channel attention weight v, and after adjustment, a residual connection architecture is added and then the features are output:
[0014]
[0015] Among them, represents the m-th channel of the output of the previous layer, represents the m-th channel of the current output, v mRepresents the attention weight of the m-th channel.
[0016] The entropy minimization classifier is used to minimize the prediction entropy of target domain samples to improve classification certainty and robustness. The calculation formula of the entropy minimum loss Leni(·) is:
[0017]
[0018] Where T represents the target domain, Represents the i-th sample in the target domain, G f (..,θ y ) represents the feature extractor and its parameters, which are used to extract the feature of target domain data, Represents the classifier and its parameters, which are used to calculate the probability that the current target domain sample is predicted as the j-th class, N represents the number of classes, Len i (θ f ,θ y ) represents the entropy minimum loss of the i-th sample.
[0019] The training process is carried out by mixing source domain and target domain samples in a batch of samples. Each batch of training samples contains unlabeled target domain samples and labeled source domain samples.
[0020] A rotating machinery fault diagnosis system constructed based on the above method includes the following modules: a signal acquisition module, which is used to collect vibration signals during the operation of rotating machinery (including motors, fans, bearings, etc.) under different working conditions; a frequency domain conversion module, which is used to perform FFT processing on the collected vibration signals and convert them into spectrograms; an image construction and enhancement module, which transforms the spectrogram into a two-dimensional image through GAF and enhances it through the AUGMIX algorithm to generate diverse samples; a feature extraction module, which uses multi-scale convolution and attention mechanism to extract key fault features in the image; a transfer learning module, which includes a domain adversarial network structure (DANN), a multi-scale channel attention mechanism, and an entropy minimization classifier, and is used to achieve feature alignment and classification prediction between the source domain and the target domain; a diagnosis output module, which outputs the fault type and prediction confidence of the target domain for real-time monitoring and decision support.
[0021] The improved overall loss of DANN can be expressed by the following formula:
[0022]
[0023] Where Is the within-domain classification loss of each data in the source domain and the target domain, Is the domain discrimination loss of each data in the source domain and the target domain, Is the entropy loss of each sample in the target domain.
[0024] The main innovation points of the present invention are:
[0025] Multimodal data feature extraction method: The Gramian Angular Field (GAF) encoding method is adopted to convert the vibration time series signal into a two-dimensional image representation, realizing the visualization of the geometric features of non-stationary signals; the AUGMIX data augmentation algorithm with a weight fusion mechanism is applied to augment the images generated by GAF, constructing a deep feature space with noise robustness.
[0026] Multi-scale attention mechanism feature extractor: A multi-scale architecture based on parallel convolution is designed to synchronously extract local and global features through different receptive fields, and the channel attention mechanism is used to dynamically weight the fused features, focusing on strengthening cross-domain invariant features related to fault classification.
[0027] Entropy minimization classifier: The entropy minimization criterion is introduced during the target domain adaptation process. By optimizing the loss function, the entropy loss of the training model label classifier is minimized, enabling the model to better adapt to the target domain samples and minimizing the entropy value of the target domain samples.
[0028] Unsupervised domain adaptation architecture: The adversarial training paradigm of DANN and the momentum update mechanism of EMA are fused. Feature distribution alignment is achieved through the Gradient Reversal Layer (GRL), minimizing the inter-domain difference and enhancing the cross-condition migration ability.
[0029] Improved domain adversarial neural network model: This method designs a three-branch network structure based on the traditional DANN framework, consisting of a feature extractor, a domain discriminator, and a label classifier based on entropy minimization. The entropy minimization strategy effectively enhances the discriminability of target domain samples by compressing the uncertainty of the prediction distribution, thereby improving the classification confidence on unlabeled data. The Gradient Reversal Layer (GRL), as a bridge connecting the feature extractor and the domain discriminator, realizes the gradient sign reversal during the backpropagation process, prompting the feature extractor to learn domain-indistinguishable shared features and achieving end-to-end domain adversarial training.
[0030] End-to-end joint training: The classification error, domain adversarial loss, and distribution difference loss are integrated into a unified loss function to achieve loss gradient descent, optimizing feature alignment and classification performance.
[0031] Relying on the above innovative structure and strategy design, the present invention significantly enhances the migration and generalization ability of the model under the conditions of unlabeled samples, sample imbalance, and new working conditions. Experimental verification on the typical rotating machinery fault diagnosis dataset CWRU shows that compared with benchmark methods such as traditional DANN and ResNet, the proposed model has an average improvement of about 5% to 10% in cross-domain classification accuracy; in the case of class imbalance in the training samples, the overall accuracy can still be stably maintained above 95%.
[0032] The mechanical fault diagnosis method based on deep adversarial transfer learning provided by the present invention still maintains a high recognition accuracy under the condition of data imbalance, still achieves high-precision and multi-domain recognition, and significantly improves the practicability and generalization ability of the diagnosis model. A multi-scale attention mechanism extractor is constructed, which integrates the channel attention mechanism and the spatial attention mechanism, and combines convolution kernels with different receptive fields to achieve multi-granularity feature capture, improving the model's perception ability and discrimination ability for key fault areas; combining the entropy minimization classifier and the domain discriminator to enhance the classification robustness and generalization ability; without using the target domain labels, this structure maximizes the confidence of the output distribution of the target domain samples, making the model's prediction in the target domain more certain, thereby improving the discrimination performance in an unknown environment. At the same time, the domain discriminator further promotes the feature extractor to extract deep features with domain invariance through adversarial training, effectively improving the cross-domain generalization ability of the model; the model takes into account both transferability and discriminability, and is suitable for intelligent diagnosis of the unlabeled target domain. Through the alignment of the feature space and the optimization of the classifier output entropy, accurate class determination can still be achieved under the condition that the source domain and the target domain distributions are inconsistent. This method is particularly suitable for complex working conditions with scarce labels in industrial environments. Through end-to-end training, it not only ensures the cross-domain transfer ability but also has high-precision recognition of fault categories, reflecting the practicability and high reliability in real industrial deployment scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 is a schematic diagram of the diagnosis process of the fault diagnosis model of the present invention;
[0034] Figure 2 is a two-dimensional image after Gram Angular Field (GAF) transformation;
[0035] Figure 3 is the process of the AUGMIX data augmentation method;
[0036] Figure 4 is the structure diagram of the multi-scale attention feature extractor;
[0037] Figure 5 is the structure diagram of the improved domain adversarial neural network. DETAILED DESCRIPTION OF THE INVENTION
[0038] The present invention provides a mechanical fault diagnosis method based on deep adversarial transfer learning under data imbalance, which is applicable to the intelligent diagnosis scenario of bearing faults with scarce, unbalanced target domain samples and significant working condition differences. Its specific implementation includes the following key technical steps:
[0039] In the data collection and preprocessing stage, the publicly available dataset of Case Western Reserve University is selected, and different working conditions and different numbers of target domain samples are set. In the signal processing stage, fault data augmentation is carried out. First, the Gramian Angular Field (GAF) transform is used to convert the collected vibration signals into two-dimensional images. Secondly, the weighted fusion AUGMIX algorithm is used to augment the obtained two-dimensional GAF source domain images. The images after AUGMIX augmentation are composed of the original images and the combined augmented images fused with a certain weight, and this weight is generated by the Beta distribution. For the samples in the subsequent m source domains , the AUGMIX algorithm is used to perform data augmentation on them to obtain m augmented sample sets of the source domains for subsequent model training.
[0040] In terms of the design of the diagnostic model architecture, the present invention constructs an end-to-end neural network structure composed of three core modules: a multi-scale attention feature extractor, an entropy minimization label classifier, and a domain discriminator. The feature extraction module integrates multi-scale convolutional branches and a channel attention mechanism to improve the model's ability to capture and model features in different frequency bands. The input samples are first processed by convolutional kernels with various receptive field configurations to capture local features at different scales; the extracted multi-channel features are then input into the attention mechanism module, and the channel response weights are generated through global average pooling operations, thereby obtaining the channel attention weight v, which is used to weight and modulate the feature map to highlight the key channel information, and combined with residual connections to improve the stability of feature expression and the ability of deep semantic modeling.
[0041] The label classifier introduces the entropy minimization criterion as the supervision signal. By minimizing the entropy value of the predicted output in the target domain, it guides the network to output more certain classification decisions, reduces the ambiguity of the class boundary, and improves the discrimination confidence of unlabeled samples. The domain discriminator cooperates with the Gradient Reversal Layer (GRL) to optimize the domain discrimination task of the extracted features. By virtue of the characteristic of the gradient sign reversal in the backpropagation process, it prompts the feature extractor to generate a shared feature representation with domain invariance, realizing the alignment of the feature spaces between the source domain and the target domain.
[0042] Finally, through this improved domain adversarial transfer learning model based on the channel attention mechanism, the mapping consistency between the source domain and the target domain at the feature distribution level is achieved, so as to transfer the classification decision-making ability learned in the source domain to the target domain samples. In the scenario of unlabeled target domains, the entropy regularization loss term is jointly optimized to further improve the adaptation ability and prediction confidence of the classifier in the target domain, thereby significantly enhancing the cross-domain generalization ability and stability of the diagnostic model.
[0043] In the model training stage, first, the signals in the target domain and the source domain are preprocessed, and the Gramian Angular Field (GAF) transformation is used to extract the time-frequency features of the signals. Then, the AUGMIX algorithm is used to augment the data to improve the data representation ability. During the training process, 10 labeled samples are randomly selected from the target domain and mixed with the unlabeled samples in the source domain to generate mixed samples as inputs, which are fed into the improved DANN model for training. By calculating the maximum mean difference of features between the generated samples and the real samples and minimizing their reconstruction distance loss, the feature space alignment is further optimized. The training set consists of source domain samples, augmented labeled target domain samples, and real labeled target domain samples, and is input into the improved DANN network for training. Finally, after the training is completed, the trained model is saved, and the unlabeled samples in the target domain are used for testing to output the fault identification results.
[0044] Analysis of experimental results shows that in the cross-condition transfer learning task conducted on the Case Western Reserve University bearing dataset, the method proposed in the present invention still maintains a high fault identification accuracy under the condition of sample imbalance. Under the condition of a small number of training samples (such as only 30% in the target domain), the diagnostic accuracy can reach over 95%, which is significantly better than traditional DANN and the non-augmented model.
[0045] In summary, the present invention realizes a high-precision and strong-robustness bearing fault diagnosis method in the small-sample imbalance scenario by constructing a feature-aligned GAN enhancement module and an improved DANN structure, combining multi-scale feature extraction, entropy minimization, and multi-channel fusion strategies, and is applicable to the operation status monitoring and intelligent maintenance system of industrial field equipment.
Claims
1. A method for rotating machinery fault diagnosis based on unsupervised domain adaptation deep adversarial transfer learning, characterized in that It includes the following steps: (1) Collect the vibration signals of the source domain and the target domain, and convert them into frequency-domain signals through fast Fourier transform (FFT); (2) Generate two-dimensional images through Gramian angular field (GAF) transformation; (3) Use the AUGMIX data augmentation algorithm to perform weighted fusion enhancement on the GAF images; (4) Construct a feature extraction network that combines multi-scale convolution and channel attention mechanism to extract multi-granularity features; (5) Conduct end-to-end training based on an improved domain adversarial neural network (DANN) structure, including a feature extractor, a domain discriminator, and an entropy minimization classifier; (6) Jointly optimize the classification loss and the domain adversarial loss, and output the fault categories of the target domain samples.
2. The method according to claim 1, characterized in that, The multi-scale attention mechanism includes: a global average pooling layer; an attention module composed of two fully connected networks; a Sigmoid activation function is used to generate an attention weight vector; the weight vector is multiplied by the original channel features and then output as the final attention feature; after pooling, it is processed by convolution to obtain the final channel attention weight v, and after adjustment, a residual link architecture is added and then the features are output: Among them, represents the m-th channel of the previous layer output, represents the m-th channel of the current output, v m represents the attention weight of the m-th channel.
3. The method according to claim 1, characterized in that The entropy minimization classifier is used to minimize the prediction entropy of the target domain samples to improve the classification certainty and robustness; the calculation formula of the entropy minimum loss Leni(·) is: Among them, T represents the target domain, represents the i-th sample in the target domain, G f (.., θ y ) represents the feature extractor and its parameters, which are used to extract the features of the target domain data, represents the classifier and its parameters, which are used to calculate the probability that the current target domain sample is predicted as the j-th category, N represents the number of categories, Len i (θ f , θ y ) represents the minimum entropy loss of the i-th sample.
4. The method according to claim 1, wherein The training process is carried out by mixing source domain and target domain samples in batches, and each batch of training samples contains unlabeled target domain samples and labeled source domain samples.
5. A rotating machinery fault diagnosis system constructed based on the said method, characterized in that It includes the following modules: a signal acquisition module, which is used to collect the vibration signals during the operation of rotating machinery (including motors, fans, bearings, etc.) under different working conditions; a frequency-domain conversion module, which is used to perform FFT processing on the collected vibration signals and convert them into spectrograms; an image construction and enhancement module, which transforms the spectrograms into two-dimensional images through GAF and generates diverse samples through the AUGMIX algorithm; A feature extraction module, which uses multi-scale convolution and attention mechanism to extract key fault features in the images; A transfer learning module, which includes a domain adversarial network structure (DANN), a multi-scale channel attention mechanism, and an entropy minimization classifier, and is used to achieve feature alignment and classification prediction between the source domain and the target domain; A diagnostic output module, which outputs the fault types and prediction confidence levels of the target domain and is used for real-time monitoring and decision support.
6. According to the method described in claim 1, the improved overall loss of DANN can be expressed by the following formula: Among them is the within-domain classification loss for each data in the source domain and the target domain, is the domain discrimination loss for each data in the source domain and the target domain, is the entropy loss for each sample in the target domain.
Citation Information
Cited By
Ship engine vibration signal working condition classification method and system based on domain adaptation, medium, program and terminal
CN120951129A
Small sample bearing fault diagnosis method based on deep residual network and bidirectional GRU
CN120974113A
AUV propeller fault diagnosis method based on wavelet entropy and APN
CN121144793A
AUV propeller fault diagnosis method based on wavelet entropy and apn
CN121144793B
View angle robust traffic accident detection method based on space-time attention domain adaptation
CN121191046A