Single-domain generalization rotating machinery fault diagnosis method based on frequency domain attention diffusion model

By combining the frequency domain attention diffusion model and the embedding loss function, the problem of insufficient generalization ability caused by domain offset in the fault diagnosis of rotating machinery is solved, and efficient and accurate fault diagnosis under single domain conditions is achieved, which is suitable for complex industrial environments.

CN120781173BActive Publication Date: 2026-02-06崂山国家实验室 +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511220879.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2026-02-06
Estimated Expiration
2045-08-29

AI Technical Summary

Technical Problem

Existing deep learning models struggle to maintain stable performance in unknown target domains due to domain offset issues in rotating machinery fault diagnosis, especially exhibiting insufficient generalization ability in complex industrial environments.

Method used

A single-domain generalization method based on the frequency domain attention diffusion model is adopted. The feature representations of noise perturbation and frequency domain enhancement components are generated through the frequency domain attention mechanism. Combined with the embedding loss function, feature fusion and differentiation are performed to improve feature diversity and robustness.

Benefits of technology

Under single source domain data conditions, it significantly improves the accuracy and robustness of rotating machinery fault diagnosis, and can achieve efficient and stable fault diagnosis under unknown target domain conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120781173B_ABST
    Figure CN120781173B_ABST
Patent Text Reader

Abstract

The application discloses a single-domain generalization rotating machinery fault diagnosis method based on a frequency domain attention diffusion model, comprising the following steps: obtaining a vibration signal of a rotating machinery under a source domain working condition; inputting the vibration signal into a diffusion model based on a frequency domain attention mechanism to generate a feature representation containing noise disturbance and a frequency domain enhancement component; performing frequency domain feature fusion on original features and enhanced features in a fault diagnosis model, and obtaining fused time domain features through inverse Fourier transform; introducing an embedding loss function to constrain the difference between the fused features and reference features; and inputting the fused features into a classification layer to predict the fault type of the rotating machinery. Through the combination of the frequency domain attention diffusion model, the feature fusion mechanism and the embedding loss function, the application improves the feature diversity and the model generalization ability under the single domain condition, can realize accurate diagnosis of unknown working conditions without multi-source domain data, and is suitable for fault detection and maintenance of industrial rotating machinery.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of mechanical engineering and intelligent diagnosis technology, and particularly relates to a single-domain generalization rotating machinery fault diagnosis method based on a frequency domain attention diffusion model. BACKGROUND

[0002] Reliability and safety of equipment / systems are important concerns in industries, agriculture, and defense, and rotating machinery is crucial for the normal operation of the system as they support rotating shafts and reduce friction, thereby maintaining operational efficiency; faults in these machines can lead to shutdowns, increased maintenance costs, and even catastrophic accidents. Therefore, accurate fault diagnosis is crucial for predictive maintenance, reducing work interruptions, and ensuring the smooth progress of production activities.

[0003] Deep learning, with its powerful feature learning ability, has been widely applied in the field of fault diagnosis, especially in handling complex signals from industrial monitoring data. Machine learning models such as Convolutional Neural Networks (CNN), Autoencoders, and Recurrent Neural Networks (RNN) can effectively extract valuable features from monitoring data for fault diagnosis. They are trained on the source domain (training data) and run on the target domain (test data). However, these models face the problem of domain shift, where the statistical distribution of the source domain differs significantly from that of the target domain due to changes in working conditions and environments, leading to a significant performance decline when the model is used in actual industrial applications.

[0004] Data migration is an effective method to solve domain shift, and domain adaptation and domain generalization (DG) are two main approaches. Domain adaptation-based methods attempt to align the data distribution between the source and target domains, reducing the distribution difference between the source and target domains to improve the model's performance on known target domains. However, they require target domain data for training, making it difficult to generalize to unknown target domains.

[0005] Domain generalization is another key transfer learning method that uses data from multiple labeled source domains to build a robust model without relying on target domain data. Its goal is to identify and extract features that are consistent and domain-independent across different source domains. The main implementation method is to train on data from multiple source domains, i.e., multi-domain generalization. However, in actual industrial environments, due to data availability and work limitations, it is often not feasible or extremely costly to collect multi-source domain fault data from different working conditions, so the application of multi-domain generalization is limited.

[0006] Single domain generalization (SDG) attempts to train a robust model relying on a single source domain to achieve high performance on unknown target domains. The commonly used method is feature enhancement technology, which generates diverse samples to expand the coverage of the source domain, aiming to enhance the diversity of source domain data to better represent unknown operating scenarios and improve the generalization ability of the model. However, this method also has shortcomings: first, data enhancement techniques often lack sufficient diversity and cannot reflect the actual changes in fault states; in addition, enhancing feature diversity as an effective method to improve the generalization ability of fault diagnosis is often overlooked.

[0007] In summary, the fault diagnosis of rotating machinery is crucial in the fields of industry, agriculture and national defense, but traditional deep learning models often struggle to maintain stable performance in complex real-world environments due to domain shift. To address this issue, domain adaptation and domain generalization methods in transfer learning have been proposed, but the former relies on target domain data, and the latter is based on multiple source domain data, both of which have limitations in practical applications. In this context, single domain generalization has become a viable approach to improving model adaptability to unknown target domains through feature enhancement, but existing data enhancement methods still fall short of fully reflecting real fault changes under complex working conditions, limiting further improvement of generalization ability. SUMMARY

[0008] To address the problem of insufficient generalization ability of deep learning fault diagnosis models in unknown target domains due to domain shift, thereby making it difficult to adapt to complex industrial environments, the present application provides a single domain generalization rotating machinery fault diagnosis method based on a frequency domain attention diffusion model.

[0009] The present application is implemented as follows: a single domain generalization rotating machinery fault diagnosis method based on a frequency domain attention diffusion model, characterized in that the method comprises: S1. obtaining vibration signals of rotating machinery under source domain working conditions; S2. inputting the vibration signals into a diffusion model based on a frequency domain attention mechanism to generate feature representations containing noise disturbance and frequency domain enhancement components; S3. performing frequency domain feature fusion on the original features of the vibration signals and the enhanced features output by the diffusion model in the fault diagnosis model, and obtaining the fused time domain features through inverse Fourier transform; S4. introducing an embedding loss function to constrain the difference between the fused features and reference features to improve feature diversity; S5. inputting the fused features into a classification layer to predict the fault type of the rotating machinery.

[0010] Preferably, the diffusion model uses a codec architecture and maintains frequency domain details through skip connections in the feature extraction and reconstruction process.

[0011] Preferably, the frequency domain attention mechanism comprises: performing a fast Fourier transform on the input features to obtain frequency domain representations, calculating attention weights according to the spectral energy of each channel, and multiplying the weights with the input features element by element to highlight key frequency components.

[0012] Preferably, the diffusion model gradually adds Gaussian noise to the vibration signal during the training process and optimizes the denoising result with a mean square error loss function.

[0013] Preferably, the frequency domain feature fusion comprises: performing a fast Fourier transform on the original features and the multiple enhanced features generated by the diffusion model, respectively; introducing learnable weights to the real and imaginary parts, respectively, to perform weighted combination, to form multiple sets of fused spectral features; and performing an inverse fast Fourier transform on the fused spectral features to obtain time domain mixed features.

[0014] Preferably, the initial value of the learnable weight is a random number between 0 and 1, to adaptively adjust the fusion ratio of the features during the training process.

[0015] Preferably, the embedding loss function is realized by calculating the covariance difference between the generated features, the reference features and the fused features, to reduce the correlation between different feature sets.

[0016] Preferably, the fault diagnosis model uses a weighted sum of cross-entropy loss and embedding loss as the total loss function during the training process.

[0017] Preferably, the method is realized through two-stage training: first, the diffusion model is trained to extract frequency domain enhanced features; then, the fault diagnosis model is trained based on the enhanced features to predict the label.

[0018] Preferably, the method is suitable for training only relying on single source domain data, and can realize the generalization of fault diagnosis under unknown target domain working conditions.

[0019] Based on the above, the single-domain generalization rotating machinery fault diagnosis method based on the frequency domain attention diffusion model of the present application has significant technical advantages and application effects.

[0020] Firstly, the method effectively improves the feature expression ability in single-domain generalization by introducing a feature enhancement strategy combining frequency domain attention mechanism and diffusion model, so that the diagnosis model originally limited to single source domain data can simulate a wider range of working conditions. Specifically, the diffusion model not only fuses noise disturbance when generating features, but also introduces frequency domain enhancement components, thereby improving feature diversity and enhancing the sensitivity and recognition ability of the model to different fault modes.

[0021] Secondly, the method designs a frequency domain feature fusion mechanism, combines the original vibration signal features with the enhanced features generated by the diffusion model, and obtains the fused time domain features through inverse Fourier transform. This mechanism not only retains the original information of the vibration signal, but also introduces rich enhanced features, so that the model can obtain more comprehensive and representative input in the feature space, thereby significantly improving the accuracy and robustness of fault diagnosis.

[0022] In addition, in order to further improve the feature diversity, the method introduces an embedding loss function to constrain the difference between the fused features and the reference features, so that the enhanced features have more distinguishability on the basis of retaining the original information. This design not only improves the generalization ability of the model to unknown target domains, but also avoids overfitting, making the diagnosis model perform more stably and reliably in actual industrial environments.

[0023] In summary, the method has the following advantages: it can achieve effective single-domain generalization without relying on multi-source domain data; it generates diversified features through the frequency domain attention diffusion model to enhance the model's ability to identify different fault types; it retains original signal information and introduces enhanced features through the frequency feature fusion mechanism to improve diagnostic accuracy; and it enhances feature distinguishability through the embedding loss function to improve the model's generalization ability to unknown working conditions. Overall, the method can efficiently, accurately and stably diagnose rotating machinery faults under single-domain conditions, and has strong industrial application value and promotion potential. BRIEF DESCRIPTION OF DRAWINGS

[0024] Figure 1 is a structural schematic diagram of the present application; DETAILED DESCRIPTION

[0025] In order to make the purpose, technical scheme and advantages of the present application clearer, the following embodiments are used to further illustrate the present application. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.

[0026] To solve the problem that the deep learning fault diagnosis model in the prior art has insufficient generalization ability on unknown target domains due to domain shift, thereby being difficult to adapt to complex industrial environments, the present application provides a single-domain generalization rotating machinery fault diagnosis method based on a frequency domain attention diffusion model. In order to further illustrate the structure of the present application, the detailed description is as follows in combination with the drawings:

[0027] A single-domain generalization rotating machinery fault diagnosis method based on a frequency domain attention diffusion model, characterized in that the method comprises:

[0028] S1. Obtain the vibration signal of the rotating machinery under the source domain working condition.

[0029] S2. inputting the vibration signal into a diffusion model based on a frequency domain attention mechanism to generate a feature representation containing noise disturbance and a frequency domain enhancement component.

[0030] The diffusion model adopts a codec architecture and maintains frequency domain details in the feature extraction and reconstruction process through a jump connection. The frequency domain attention mechanism includes: performing a fast Fourier transform on the input features to obtain a frequency domain representation, calculating attention weights according to the spectral energy of each channel, and multiplying the weights with the input features element by element to highlight key frequency components.

[0031] The diffusion model adds Gaussian noise to the vibration signal step by step during the training process, and optimizes the denoising result with a mean square error loss function.

[0032] S3. performing frequency domain feature fusion on the original features of the vibration signal and the enhanced features output by the diffusion model in the fault diagnosis model, and obtaining the fused time domain features through inverse Fourier transform.

[0033] The frequency domain feature fusion includes: performing a fast Fourier transform on the original features and the multiple enhanced features generated by the diffusion model, respectively; introducing learnable weights to the real and imaginary parts, respectively, to perform weighted combination, to form multiple sets of fused frequency spectrum features; and performing inverse fast Fourier transform on the fused frequency spectrum features to obtain time domain mixed features. The initial value of the learnable weight is a random number between 0 and 1, to adaptively adjust the fusion ratio of the features during the training process.

[0034] The fault diagnosis model adopts a weighted sum of cross-entropy loss and embedding loss as the total loss function during the training process.

[0035] The method is realized through two-stage training: first, the diffusion model is trained to extract frequency domain enhanced features; then, the fault diagnosis model is trained based on the enhanced features to predict the label. This method is suitable for training only relying on a single source domain data, and can realize the generalization of fault diagnosis in unknown target domain working conditions.

[0036] S4. The difference between the fused features and the reference features is constrained by introducing an embedding loss function to improve the diversity of the features.

[0037] The embedding loss function is realized by calculating the covariance difference between the generated features, the reference features and the fused features, to reduce the correlation between different feature sets.

[0038] S5. inputting the fused features into a classification layer to predict the fault type of the rotating machinery.

[0039] Specifically, in the single domain generalization (SDG) based fault diagnosis method, a single source domain is defined as

[0040] .

[0041] where,

[0042] is the number of samples, represents the input data (e.g. vibration signal), represents the health state of the bearing. The task is to learn a prediction function that can generalize to unknown target domains where and due to different working conditions, it needs to satisfy .

[0043] In single-domain generalization, the main challenge is the distribution difference between source and target domains, i.e. domain shift. This shift will greatly affect the performance of the model on the target data if not handled. Since only the data of one source domain is available during training, traditional domain adaptation methods cannot be directly used because they need target domain data for training. Therefore, the goal of this method is to build a model trained only on , so that it can achieve high diagnostic accuracy on any without knowing the distribution of the target domain data.

[0044] In this embodiment, the method uses a diffusion model based on spectral attention mechanism to generate enhanced features containing noise and key frequency components from vibration signals; the model also introduces an embedding loss function to enhance the difference between generated features and reference features, capturing relevant fault characteristics while improving feature diversity; finally, in the fault diagnosis network, the features from the convolutional layer and the diffusion model are adaptively fused in the frequency domain to obtain comprehensive feature representation and capture complementary information.

[0045] The overall framework of the single-domain generalization rotating machinery fault diagnosis method based on spectral attention diffusion model is as Figure 1 . This method contains two main components:

[0046] (a): spectral attention-based diffusion model (SADM) for feature enhancement;

[0047] (b): fault diagnosis model, which realizes feature differentiation by feature fusion in the frequency domain and combining embedding loss function.

[0048] As Figure 1As shown in model (a), SADM learns the robust representation of faults by adding noise to the extracted features of the vibration signal and denoising. The spectral attention mechanism further enhances the generalization ability of the generated features.

[0049] As shown in model (a), SADM learns the robust representation of faults by adding noise to the extracted features of the vibration signal and denoising. The spectral attention mechanism further enhances the generalization ability of the generated features. Figure 1 As shown in model (b), the fault diagnosis model is trained using features from the vibration signal and SADM, which are fused in the frequency domain by performing a fast Fourier transform (FFT) on the feature representations of these features and mixing the real and imaginary parts with learnable weights.

[0050] Then, the model introduces an embedding loss to increase the diversity between the generated features and the reference features, thereby improving the feature representation ability. The mixed feature representation is converted back to the time domain by inverse FFT to generate fusion features that can capture complementary information from different perspectives. Finally, these fusion features are concatenated, flattened, and input into the classification layer to predict the fault type.

[0051] By combining SADM for feature enhancement, embedding loss for feature differentiation, and frequency domain feature fusion, the model exhibits stronger robustness under different operating conditions and fault types.

[0052] 1. A diffusion model based on a frequency domain attention mechanism for feature enhancement.

[0053] In the proposed framework, SADM combines a frequency domain attention mechanism to improve feature enhancement capability and increase generalization ability in single-domain settings. The feature enhancement stage generates more rich and diverse representations of the vibration signal. SADM uses a encoder-decoder architecture with skip connections to preserve spatial details during conversion. The encoder captures fault features by gradually reducing the dimensionality of the input signal, while the decoder reconstructs the signal to provide enhanced feature representations.

[0054] As shown in model (a), the input of the SADM model is denoted as Figure 1 The input is processed by noise injection, specifically, Gaussian noise is added to the vibration signal at different levels. The signal after noise addition is represented as follows:

[0055] (1)

[0056] Here, is the signal with added noise at time step t, is the noise control factor, is the Gaussian noise sampled from a normal distribution with mean zero.

[0057] Then, a convolutional layer generates feature maps ​Max-pooling is used to reduce the dimension of the spectral attention output , resulting in the pooled output . After another convolutional layer, the features are obtained. Again, max-pooling is used to generate corresponding to the second frequency domain attention output .

[0058] Subsequently, a convolutional layer is applied to generate the bottleneck features . These features are upsampled and concatenated with through a skip connection, forming . The concatenated features are processed by a convolutional layer to generate . Next, is further upsampled and concatenated with through a skip connection, forming .

[0059] Finally, is processed by a convolutional layer to obtain the output features . The final output is generated by a convolutional layer acting on , converting the features back to the original input dimension.

[0060] To improve the quality of the enhanced features, SADM integrates a frequency domain attention mechanism. This mechanism emphasizes key frequency components in the input signal, thereby enhancing the model's attention to important frequency domain features. Given an input feature map where N is the batch size, T is the time length, and C is the number of channels, its frequency domain representation is calculated through the Fast Fourier Transform (FFT):

[0061] (2)

[0062] The energy of the frequency domain representation is calculated by squaring the absolute value of the FFT result:

[0063] (3)

[0064] The average value of this energy in the time dimension is taken to obtain the frequency domain information for each channel:

[0065] (4)

[0066] The channel attention weights in the frequency domain are calculated through two fully connected layers, with a ReLU activation function between them:

[0067] (5)

[0068] where, , , are all learnable parameters, represents the SIGMOD activation function.

[0069] Subsequently, the frequency domain attention weights are reshaped to match the dimensions of the input signal and multiplied element-wise:

[0070] (6)

[0071] This element-wise multiplication (⊙) ensures that important frequency domain components are highlighted, resulting in a more informative feature representation. The output of the frequency domain attention mechanism is an enhanced feature map, which is used for further processing in the SADM. The features and are used as enhanced features in the fault diagnosis model.

[0072] The diffusion model is trained using the following loss function:

[0073] (7)

[0074] where is calculated as follows:

[0075] (8)

[0076] is the output of the SADM when the input is , where is the added noise, is the batch size, and the summation is over all elements in the batch.

[0077] 2. Feature fusion in the frequency domain.

[0078] To improve the reliability of the rotating machinery fault diagnosis model under different working conditions, we adopted a feature fusion strategy in the frequency domain, which combines the features of the original vibration signal with those generated by the diffusion model. This fusion process utilizes the spectral characteristics of the vibration signal to capture frequency domain components indicative of faults. Specifically, it involves using the Fast Fourier Transform (FFT) on each set of features, separating the real and imaginary parts, and employing a probabilistic weighting scheme for fusion.

[0079] Given three sets of features , and , from the original signal, and from the diffusion model, their Fourier transforms are , , , the real and imaginary parts of the features are weightedly fused by learnable parameters 、 、 、 、 and , all initialized between 0 and 1, to absorb a wide range of frequencies. and are fused as follows:

[0080] (9)

[0081] (10)

[0082] (11)

[0083] Similarly, and , and are also fused as follows:

[0084] (12)

[0085] (13)

[0086] (14)

[0087] (15)

[0088] (16)

[0089] (17)

[0090] After that, the fused features in the frequency domain are converted back to the time domain by inverse fast Fourier transform (IFFT):

[0091] (18)

[0092] (19)

[0093] (20)

[0094] The final mixed features contain rich frequency domain characteristics, providing detailed feature identification for accurate fault classification.

[0095] 3. Embedding loss function for feature differentiation.

[0096] The invention adopts an embedding loss function to ensure that the features generated by the diffusion model maintain diversity with the reference features obtained by the fault diagnosis model. This method helps to generate diverse and rich fault data representations, which is crucial for improving the model's generalization ability under different fault types and working conditions.

[0097] The feature embedding loss is calculated by comparing the generated features 、 with the reference features . In addition, the fusion features 、 and are also considered in the loss calculation to further improve the diversity of fault representations. The feature embedding loss is obtained by calculating the sum of the covariance loss between the generated features, the reference features and the fusion features:

[0098]

[0099]

[0100] (21)

[0101] The covariance loss between the two sets of features is defined as:

[0102]

[0103] where is the covariance matrix between the centralized feature vectors of and , is the Frobenius norm. This norm measures the square root of the sum of the squares of the matrix elements, ensuring that the feature sets maintain low correlation, thus controlling the degree of enhancement, ensuring that they are both related and different.

[0104] The covariance loss function aims to minimize the correlation between different feature sets, which is crucial for the robustness of the fault diagnosis model, as it can promote feature diversity and reduce redundancy.

[0105] 4. Model training.

[0106] The training process includes two iterative training steps to enhance the model's generalization ability. In each training cycle, a batch of samples is randomly selected. The diffusion model is trained using the loss function . The fault diagnosis model is trained using a combination of cross-entropy loss and embedding loss, with the total loss being the sum of the cross-entropy loss and the embedding loss :

[0107] (22)

[0108] wherein is calculated as follows:

[0109] (23)

[0110] wherein, is the true label of the i-th sample, is the predicted probability of the i-th sample. The training process is divided into two stages: first, the SADM model is trained to refine the features in the input data; then, the refined features are used to train the fault diagnosis model to predict the label.

[0111] The above merely describes the preferred embodiments of the present application and is not used to limit the present application, and any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A single-domain generalized rotating machinery fault diagnosis method based on a frequency domain attention diffusion model, characterized in that, The method includes: S1. Acquire vibration signals of rotating machinery under source domain operating conditions; S2. Input the vibration signal into a diffusion model based on a frequency domain attention mechanism to generate a feature representation that includes noise perturbation and frequency domain enhancement components; The frequency domain attention mechanism includes: performing a fast Fourier transform on the input features to obtain a frequency domain representation, calculating attention weights based on the spectral energy of each channel, and multiplying the weights element-wise with the input features to highlight key frequency components. The diffusion model is trained by gradually adding Gaussian noise to the vibration signal and optimizing the denoising result using the mean square error loss function. S3. In the fault diagnosis model, the original features of the vibration signal and the enhanced features output by the diffusion model are fused in the frequency domain, and the fused time domain features are obtained by inverse Fourier transform; the fault diagnosis model uses the weighted sum of cross-entropy loss and embedding loss as the total loss function during the training process. The frequency domain feature fusion includes: performing fast Fourier transform on the original features and multiple enhanced features generated by the diffusion model respectively; introducing learnable weights into the real and imaginary parts respectively and combining them to form multiple sets of fused spectral features; and performing inverse fast Fourier transform on the fused spectral features to obtain time-domain hybrid features. S4. By introducing an embedding loss function to constrain the differences between the fused features and the reference features, feature diversity can be improved; The embedding loss function is achieved by calculating the covariance difference between generated features, reference features, and fused features, in order to reduce the correlation between different feature sets; S5. Input the fused features into the classification layer to predict the fault type of the rotating machinery; The method is applicable to training based on data from a single source domain and can generalize to fault diagnosis under unknown target domain conditions.

2. The single-domain generalized rotating machinery fault diagnosis method based on the frequency domain attention diffusion model according to claim 1, characterized in that: The diffusion model employs an encoder-decoder architecture and preserves frequency domain details during feature extraction and reconstruction through skip connections.

3. The single-domain generalized rotating machinery fault diagnosis method based on the frequency domain attention diffusion model according to claim 1, characterized in that: The initial value of the learnable weights is a random number between 0 and 1, so as to adaptively adjust the fusion ratio of features during training.

4. The single-domain generalized rotating machinery fault diagnosis method based on the frequency domain attention diffusion model according to claim 1, characterized in that: The method is implemented through two-stage training: first, the diffusion model is trained to extract frequency domain enhancement features; then, a fault diagnosis model is trained based on the enhancement features to predict labels.

Citation Information

Patent Citations

  • Unsupervised domain adaptive fault diagnosis method and system for rotating machinery

    CN118708931A

  • Single-source-domain generalization bearing fault diagnosis method and system based on multi-Gaussian attention

    CN119150100A