Deep learning method for realizing mechanical fault diagnosis

By combining wavelet-guided adaptive multi-scale convolution and frequency domain enhanced self-attention module, the performance degradation of CNN-Transformer model under high noise conditions is solved, and the accuracy of fault diagnosis in high noise environment is improved, especially maintaining a high fault recognition capability under high noise conditions.

CN121524841APending Publication Date: 2026-02-13TAIYUAN UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511636851.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-10
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

Existing fault diagnosis methods based on CNN-Transformer suffer from a sharp drop in diagnostic accuracy under high noise conditions, and temporal self-attention cannot effectively capture frequency domain features, leading to a decline in model performance.

Method used

By employing a wavelet-guided adaptive multi-scale convolutional module and a frequency-domain enhanced self-attention module, combined with a feedforward network, and through multi-scale feature extraction and frequency-domain global modeling, the feature representation capability is enhanced, noise interference is suppressed, and fault diagnosis in high-noise environments is achieved.

Benefits of technology

It significantly improves diagnostic accuracy in high-noise environments, effectively captures fault characteristic frequency components, maintains high diagnostic accuracy, and maintains high fault identification capability even under high-noise conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121524841A_ABST
    Figure CN121524841A_ABST
Patent Text Reader

Abstract

The invention discloses a deep learning method for realizing mechanical fault diagnosis, and belongs to the technical field of intelligent manufacturing fault prediction and diagnosis. Aiming at the problem that the diagnosis precision is sharply reduced along with the improvement of noise due to insufficient front-end feature extraction and mutual superposition of time domain limitation of a self-attention mechanism, a fault diagnosis classification model composed of three levels of feature processing layers is constructed; each stage comprises a wavelet-guided adaptive multi-scale convolution module and a frequency domain enhanced self-attention module; the wavelet-guided adaptive multi-scale convolution module can extract abundant multi-scale features under high noise; the frequency domain enhanced self-attention module carries out global modeling in the frequency domain, and the influence of noise on the overall recognition precision is reduced. The method has strong multi-scale feature extraction capability and anti-noise interference capability, effectively solves the problem of inaccurate diagnosis precision caused by a high-noise environment under an actual industrial condition, and is suitable for fault diagnosis of rotating mechanical equipment such as bearings and gears.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent manufacturing fault prediction and diagnosis technology, specifically involving a deep learning method for realizing mechanical fault diagnosis. Background Technology

[0002] In modern industrial systems, mechanical equipment typically operates under complex and harsh conditions, making its critical components (such as bearings and gears) highly susceptible to failure, which can lead to major safety accidents. Therefore, employing advanced fault diagnosis methods to detect and identify critical components in mechanical equipment can effectively reduce unnecessary losses.

[0003] Traditional fault diagnosis techniques typically rely on expert experience or signal processing techniques based on frequency domain analysis and time-frequency analysis. However, these methods require manual feature extraction, resulting in low efficiency and difficulty in meeting the diagnostic needs of complex operating conditions. With the increasing complexity of industrial equipment and the rapid growth of data volume, the applicability of traditional methods faces severe challenges.

[0004] To address these issues, data-driven intelligent fault diagnosis technologies have emerged and are gradually demonstrating significant advantages. Deep learning, as an emerging data-driven intelligent technology, can achieve end-to-end feature extraction and fault classification, providing an efficient and accurate solution for fault diagnosis under complex working conditions. CNN-based fault diagnosis methods excel at extracting local signal features to effectively capture fault-related information, achieving significant progress in the field. However, CNN-based fault diagnosis methods primarily emphasize local features, limiting their ability to handle global temporal relationships. With the introduction of the Transformer architecture, which efficiently captures correlations at any position in a time series through self-attention modules, it possesses powerful feature extraction and long-sequence modeling capabilities, and has been successfully applied in fault diagnosis. Unlike CNN-based fault diagnosis methods that emphasize local features, Transformer-based fault diagnosis methods place greater emphasis on global features. However, fault signals often exhibit both local abnormal patterns and global trends, and a single feature extraction method cannot fully characterize the complex attributes of a fault.

[0005] A more effective approach is to integrate CNN with Transformer (CNN-Transformer) to achieve comprehensive extraction of local and global features from the original signal. Although the above-mentioned CNN-Transformer-based methods have made significant progress in fault diagnosis, they still have the following shortcomings: (1) In order to avoid excessive consumption of computational resources, the above-mentioned CNN-Transformer-based fault diagnosis methods usually adopt a serial architecture, in which CNN first extracts local features and then inputs these features into Transformer for global modeling. However, existing convolutional operations are sensitive to noise, which hinders effective feature extraction under high noise conditions, thereby affecting the performance of Transformer and causing a decline in the overall model performance; (2) The Transformer module in the above methods mainly calculates self-attention weights in the time domain, focusing on the dependencies between different positions in the time series. However, the essential characteristics of mechanical faults are often reflected in specific frequency components in the frequency domain, such as fault feature frequencies and their harmonic components. Time-domain self-attention cannot directly capture the intrinsic relationships between these frequency domain features and is easily affected by noise. Summary of the Invention

[0006] To address the problem that diagnostic accuracy drops sharply with increasing noise due to the combined effect of insufficient front-end feature extraction and the temporal limitations of the self-attention mechanism, this invention provides a deep learning method for mechanical fault diagnosis, which improves the diagnostic accuracy of deep learning-based fault diagnosis methods in high-noise environments and enables automated fault classification.

[0007] To achieve the above objectives, the present invention employs the following technical solutions:

[0008] A deep learning method for diagnosing mechanical faults, the method comprising the following steps:

[0009] Step 1: Construct a fault diagnosis classification model;

[0010] The fault diagnosis classification model in step 1 consists of a preprocessing layer and a three-level feature processing layer. Each feature processing layer contains a wavelet-guided adaptive multi-scale convolution module, a frequency domain enhanced self-attention module, and a feedforward network module. The model expands the channels by downsampling so that it can obtain multi-scale feature information during training. Finally, the classification of faults is achieved by global average pooling and the use of linear layers.

[0011] In the fault diagnosis classification model, the wavelet-guided adaptive multi-scale convolutional module WAMC first uses the Mallat algorithm to process the preprocessed output. Perform multi-level wavelet decomposition, as shown in the formula below:

[0012]

[0013] in, For the first The low-frequency approximate component of the layer, For the first High-frequency detail components of the layer, For discrete wavelet transform, Then, feature extraction is performed within each layer:

[0014]

[0015]

[0016]

[0017] in, Indicates the first The low-frequency and high-frequency components of the layers are spliced ​​together. The components are spliced ​​together. For learnable scaling parameters, For grouped convolution, The components are after feature extraction and scaling. This indicates that the extracted and scaled components are separated. For the first The low-frequency approximate components after layer processing For the processed first The high-frequency detail components of each layer are reconstructed using inverse wavelet transform after feature extraction of the low-frequency and high-frequency components of each layer.

[0018]

[0019]

[0020] in, This is the result of the final layer of reconstruction. for The reconstruction results of each layer, The result of the reconstruction of the previous layer, until... The refactoring ends when the value is 1. To avoid information loss during wavelet decomposition and enhance feature representation, we fuse the reconstructed multi-scale features with the temporal features of the original signal through residual connections to form the final output:

[0021]

[0022]

[0023] in, The input is the result of primary feature extraction. This represents the learnable scaling parameter. Represents grouped convolution. For input The result after adaptive multi-scale feature extraction This is the final output.

[0024] The frequency domain enhanced self-attention module FESA in the fault diagnosis classification model of step 1 transforms the time domain features obtained by the wavelet-guided adaptive multi-scale convolution module into the frequency domain, adaptively adjusts the frequency domain features, strengthens the contribution of task-related frequencies, and weakens interference components, thereby achieving adaptive enhancement of frequency domain features, as specifically shown below:

[0025]

[0026]

[0027]

[0028] in, The transformed frequency domain features, For linear transformation, For attention weights, For the enhanced frequency domain features, It is a nonlinear function. It is a nonlinear function. The DCT basis matrix is ​​used to transform features to the frequency domain, and is represented as follows:

[0029]

[0030] in, For the input length, For frequency index, It is a time-series index;

[0031] Enhanced frequency domain features Above, queries are generated through a series of one-dimensional convolutions. ,key Sum Calculate query s and keys The dot product similarity between the two values ​​is calculated, and then normalized to obtain the attention weights. After obtaining the attention weights, the values ​​are used... With attention weight The weighted frequency domain features are obtained by matrix multiplication, as shown below:

[0032]

[0033]

[0034] in, It is the normalization factor, i.e., the signal length. For self-attention weights, This is the result after self-attention calculation. Indicates transpose;

[0035] Finally, the inverse transformation of the DCT basis matrix is ​​used to map the weighted frequency domain features back to the original time domain structure, as shown below:

[0036]

[0037] in, The result is after passing through the frequency domain enhanced self-attention module. This is the transpose of the DCT basis matrix.

[0038] The frequency domain enhanced self-attention module transforms features to the frequency domain using discrete cosine transform, performs global modeling in the frequency domain to capture the intrinsic relationships between frequency components, enhances task-relevant frequency components, and suppresses noise-related components.

[0039] In the fault diagnosis classification model of step 1, the frequency domain enhanced self-attention module and the feedforward network module are combined through residual connections and layer normalization. The feedforward network module adopts a two-layer fully connected structure, as shown below:

[0040]

[0041]

[0042]

[0043] in, For layer normalization operation, This indicates a frequency-domain enhanced self-attention module. This represents the features of the output of the frequency domain enhanced self-attention module after residual connections and layer normalization. It is a feedforward network. This represents the characteristics of the output of the feedforward network module after residual connections and layer normalization. For linear transformation, It is a nonlinear function.

[0044] The fault diagnosis classification model in step 1 adopts a three-level architecture, with each level connected by a downsampling module. The downsampling module uses a one-dimensional convolution with a kernel size of 3 and a stride of 2 to achieve channel dimension expansion and spatial resolution reduction.

[0045] Step 2: Select a dataset from the existing public fault datasets, preprocess the data, and input it into the fault diagnosis classification model for classification;

[0046] The bearing data is preprocessed and input into a fault diagnosis classification model. This model operates in stages. Each stage first extracts features using a wavelet-guided adaptive multi-scale convolutional module, then enhances the extracted features using a frequency-domain enhanced self-attention module. Residual connections and a feedforward network ensure effective gradient propagation and training stability, enhancing the nonlinear expressive power of the features. Downsampling is used between stages to achieve channel expansion and resolution reduction.

[0047] In step 2, average pooling with a kernel size of 2 and a stride of 2 is used for preprocessing to reduce the signal length from 1024 to 512. Then, one-dimensional convolution with a kernel size of 15 and a stride of 2 is used to expand the number of channels to 32, and the feature length becomes 256.

[0048] Step 2 selects a bearing dataset from the existing public fault dataset, uses a sliding window method to extract the dataset from the original data for processing, and uses the (-1,1) normalization method to normalize the dataset. The dataset is then divided into training set, validation set and test set in a ratio of 7:1:2. The dataset is then fed into the model for training and testing.

[0049] Step 3: Use the cross-entropy loss function to constrain the classification results;

[0050] The specific operation of step 3 is as follows: Calculate the training loss between the model's predicted output and the true label using the cross-entropy loss function, specifically expressed as:

[0051]

[0052] in, For batch size, Fault category, For the sample Category The true label, Predict samples for the model Category The probability of;

[0053] The Adam optimizer is used to dynamically adjust the learning rate and update the model weights. The model with the highest accuracy during the iteration process is selected as the trained model on the validation set. After the input data is processed by the model's forward propagation to obtain the prediction result, gradient backpropagation is performed based on the loss value using the chain rule. The weight update process is represented as follows:

[0054]

[0055] in, For the loss function with respect to weights gradient, The gradient of the loss function with respect to the output. This outputs the gradient with respect to the weights.

[0056] Step 4: Output the final classification result.

[0057] Compared with the prior art, the present invention has the following advantages:

[0058] (1) The present invention provides a deep learning method for realizing mechanical fault diagnosis, which uses a wavelet-guided adaptive multi-scale convolution module as a feature extractor for each stage to extract features. This module utilizes the multi-resolution characteristics of wavelet transform to perform adaptive multi-scale feature extraction, ensuring the richness and reliability of features under high noise.

[0059] (2) Set up a frequency domain enhanced self-attention module. This module uses discrete cosine transform to convert features to the frequency domain and performs global modeling in the frequency domain. By constructing attention relationships in the frequency domain, it can directly capture the intrinsic relationship between frequency components of fault features, effectively enhance task-related frequency components and suppress noise interference, and significantly improve the diagnostic accuracy of the model in high-noise environments.

[0060] (3) The deep learning method provided by the present invention adopts a three-level architecture design, which connects each level through a downsampling module to realize channel dimension expansion and spatial resolution reduction, so that the model can gradually extract feature representations from low level to high level.

[0061] (4) The method of the present invention is highly versatile and can be used on fault datasets of multiple rotating machines. Attached Figure Description

[0062] Figure 1 This is a schematic diagram of the overall architecture of the fault diagnosis classification model of the present invention;

[0063] Figure 2 A schematic diagram of the wavelet-guided adaptive multi-scale convolution module structure;

[0064] Figure 3 A schematic diagram of the frequency domain enhanced self-attention module structure;

[0065] Figure 4 This is a schematic diagram of the connection of the three-level feature processing layer. Detailed Implementation

[0066] To gain a deeper understanding of this invention, we will provide a comprehensive and detailed description. However, this invention has various implementations and is not limited to the specific examples listed herein. These examples are presented to enhance a full understanding of the disclosure of this invention.

[0067] A deep learning method for diagnosing mechanical faults, the method comprising the following steps:

[0068] Step 1: Construct a fault diagnosis classification model (model such as...) Figure 1 (as shown)

[0069] The fault diagnosis classification model in step 1 consists of a preprocessing layer and three feature processing layers. Each feature processing layer contains a wavelet-guided adaptive multi-scale convolution module (e.g., Figure 2 As shown), frequency domain enhanced self-attention module (such as...) Figure 3 As shown in the figure, the model expands the channels through downsampling, enabling the model to obtain multi-scale feature information during training; finally, the model achieves fault classification through global average pooling and the use of linear layers.

[0070] In the fault diagnosis classification model, the wavelet-guided adaptive multi-scale convolutional module WAMC first uses the Mallat algorithm to process the preprocessed output. Perform multi-level wavelet decomposition, as shown in the formula below:

[0071]

[0072] in, For the first The low-frequency approximate component of the layer, For the first High-frequency detail components of the layer, For discrete wavelet transform, Then, feature extraction is performed within each layer:

[0073]

[0074]

[0075]

[0076] in, Indicates the first The low-frequency and high-frequency components of the layers are spliced ​​together. The components are spliced ​​together. For learnable scaling parameters, For grouped convolution, The components are after feature extraction and scaling. This indicates that the extracted and scaled components are separated. For the first The low-frequency approximate components after layer processing For the processed first The high-frequency detail components of each layer are reconstructed using inverse wavelet transform after feature extraction of the low-frequency and high-frequency components of each layer.

[0077]

[0078]

[0079] in, This is the result of the final layer of reconstruction. for The reconstruction results of each layer, The result of the reconstruction of the previous layer, until... The refactoring ends when the value is 1. To represent the inverse wavelet transform, and to avoid information loss during wavelet decomposition and enhance feature representation, we fuse the reconstructed multi-scale features with the temporal features of the original signal through residual connection, forming the final output:

[0080]

[0081]

[0082] in, The input is the result of primary feature extraction. This represents the learnable scaling parameter. Represents grouped convolution. For input The result after adaptive multi-scale feature extraction This is the final output.

[0083] The frequency domain enhanced self-attention module FESA in the fault diagnosis classification model of step 1 transforms the time domain features obtained by the wavelet-guided adaptive multi-scale convolution module into the frequency domain, adaptively adjusts the frequency domain features, strengthens the contribution of task-related frequencies, and weakens interference components, thereby achieving adaptive enhancement of frequency domain features, as specifically shown below:

[0084]

[0085]

[0086]

[0087] in, The transformed frequency domain features, For linear transformation, For attention weights, For the enhanced frequency domain features, It is a nonlinear function. It is a nonlinear function. The DCT basis matrix is ​​used to transform features to the frequency domain, and is represented as follows:

[0088]

[0089] in, For the input length, For frequency index, It is a time-series index;

[0090] Enhanced frequency domain features Above, queries are generated through a series of one-dimensional convolutions. ,key Sum Calculate query s and keys The dot product similarity between the two values ​​is calculated, and then normalized to obtain the attention weights. After obtaining the attention weights, the values ​​are used... With attention weight The weighted frequency domain features are obtained by matrix multiplication, as shown below:

[0091]

[0092]

[0093] in, It is the normalization factor, i.e., the signal length. For self-attention weights, This is the result after self-attention calculation. Indicates transpose;

[0094] Finally, the inverse transformation of the DCT basis matrix is ​​used to map the weighted frequency domain features back to the original time domain structure, as shown below:

[0095]

[0096] in, The result is after passing through the frequency domain enhanced self-attention module. This is the transpose of the DCT basis matrix.

[0097] The frequency domain enhanced self-attention module transforms features to the frequency domain using discrete cosine transform, performs global modeling in the frequency domain to capture the intrinsic relationships between frequency components, enhances task-relevant frequency components, and suppresses noise-related components.

[0098] In the fault diagnosis classification model of step 1, the frequency domain enhanced self-attention module and the feedforward network module are combined through residual connections and layer normalization. The feedforward network module adopts a two-layer fully connected structure, as shown below:

[0099]

[0100]

[0101]

[0102] in, For layer normalization operation, This indicates a frequency-domain enhanced self-attention module. This represents the features of the output of the frequency domain enhanced self-attention module after residual connections and layer normalization. It is a feedforward network. This represents the characteristics of the output of the feedforward network module after residual connections and layer normalization. For linear transformation, It is a nonlinear function.

[0103] The fault diagnosis classification model in step 1 adopts a three-level architecture, with each level connected by a downsampling module. The downsampling module uses a one-dimensional convolution with a kernel size of 3 and a stride of 2 to achieve channel dimension expansion and spatial resolution reduction.

[0104] Step 2: Select a dataset from the existing public fault datasets, preprocess the data, and input it into the fault diagnosis classification model for classification;

[0105] The detailed structure of each component of this invention is shown in Table 1. Bearing data is preprocessed and input into the fault diagnosis classification model. This classification model operates in stages. Each stage first extracts features using a wavelet-guided adaptive multi-scale convolution module, then enhances the extracted features using a frequency-domain enhanced self-attention module. Simultaneously, residual connections and a feedforward network ensure effective gradient propagation and training stability, enhancing the nonlinear expressive power of the features. Downsampling is used between stages to achieve channel expansion and resolution reduction.

[0106] Table 1 Detailed Composition of Each Component of the Invention

[0107]

[0108] According to step 2, select an existing public dataset (Xi'an Jiaotong University Planetary Gear Dataset), use the sliding window method to extract enough dataset from the original data for processing, and use the (-1,1) normalization method to normalize the dataset. Divide the created dataset into training set, validation set and test set in a ratio of 7:1:2, and then send the dataset into the model for training and testing.

[0109] Step 3: Use the cross-entropy loss function to constrain the classification results;

[0110] The specific operation of step 3 is as follows: Calculate the training loss between the predicted output of the computational model and the true label using the cross-entropy loss function, specifically expressed as:

[0111]

[0112] in, For batch size, Fault category, For the sample Category The true label, Predict samples for the model Category The probability of.

[0113] The Adam optimizer is used to dynamically adjust the learning rate and update the model weights. The model with the highest accuracy during the iteration process is selected as the trained model on the validation set. After the input data is processed by the model's forward propagation to obtain the prediction result, gradient backpropagation is performed based on the loss value using the chain rule. The weight update process is represented as follows:

[0114]

[0115] in, For the loss function with respect to weights gradient, The gradient of the loss function with respect to the output. This outputs the gradient with respect to the weights.

[0116] Cross-entropy loss is used to constrain the classification results of this model. The cross-entropy loss function can effectively measure the difference between the predicted distribution and the true distribution. By minimizing the loss function through the gradient descent optimization algorithm, the model can learn more accurate feature representations.

[0117] Step 4: Output the final classification result.

[0118] To verify the effectiveness of the proposed method, ResNet18, Transformer, and LiconvFormer were used as references. The average accuracy of 10 experiments was used as the evaluation metric at signal-to-noise ratios of 0 dB, -2 dB, -6 dB, and -8 dB. The classification results were analyzed and compared, as shown in Table 2. The table shows that the proposed method maintains the highest accuracy at all noise levels, especially under high noise conditions (-6 dB, -8 dB), demonstrating a significant advantage over other methods. Furthermore, as noise gradually increases, the accuracy of the proposed method decreases less than that of other methods, exhibiting stronger stability.

[0119] Table 2. Results analysis of different methods under different signal-to-noise ratios.

[0120] In summary, this invention proposes an intelligent fault diagnosis method for machinery in noisy environments. This method consists of a wavelet-guided adaptive multi-scale convolution module, a frequency-domain enhanced self-attention module, and a feedforward network module. The wavelet-guided adaptive multi-scale convolution ensures rich and reliable feature extraction under noise conditions, while the frequency-domain enhanced self-attention module enhances the method's anti-interference capability in the face of noise. The three-level architecture design guarantees feature representation from low to high levels, and the cross-entropy loss function provides effective training supervision. A case study using the Xi'an Jiaotong University planetary gear dataset with varying signal-to-noise ratios demonstrates that this invention can achieve accurate fault identification in low-noise environments and maintains high diagnostic accuracy even under high-noise conditions, fully showcasing its excellent noise resistance and stability.

[0121] Contents not described in detail in this specification are prior art known to those skilled in the art. Although illustrative specific embodiments of the invention have been described above to facilitate understanding by those skilled in the art, it should be understood that the invention is not limited to the scope of the specific embodiments. Various modifications are readily apparent to those skilled in the art as long as they fall within the spirit and scope of the invention as defined and determined by the appended claims, and all inventions utilizing the concept of this invention are protected.

Claims

1. A deep learning method for diagnosing mechanical faults, the method comprising the following steps: Step 1: Construct a fault diagnosis classification model; Step 2: Select a dataset from the existing public fault datasets, preprocess the data, and input it into the fault diagnosis classification model for classification; Step 3: Use the cross-entropy loss function to constrain the classification results; Step 4: Output the final classification result; The fault diagnosis classification model in step 1 is characterized by being composed of a preprocessing layer and a three-level feature processing layer. Each level of the feature processing layer contains a wavelet-guided adaptive multi-scale convolution module, a frequency domain enhanced self-attention module, and a feedforward network module. The channel is expanded by downsampling so that the model can obtain multi-scale feature information during training. In the fault diagnosis classification model, the wavelet-guided adaptive multi-scale convolutional module WAMC first uses the Mallat algorithm to process the preprocessed output. Perform multi-level wavelet decomposition, as shown in the formula below: ,in, For the first The low-frequency approximate component of the layer, For the first High-frequency detail components of the layer, Represents discrete wavelet transform. Then, feature extraction is performed within each layer: , , , in, Indicates the first The low-frequency and high-frequency components of the layers are spliced ​​together. The components are spliced ​​together. For learnable scaling parameters, For grouped convolution, The components are after feature extraction and scaling. This indicates that the extracted and scaled components are separated. For the first The low-frequency approximate components after layer processing For the processed first The high-frequency detail components of each layer are reconstructed using inverse wavelet transform after feature extraction of the low-frequency and high-frequency components of each layer. , , in, This is the result of the final layer of reconstruction. for The reconstruction results of each layer, The result of the reconstruction of the previous layer, until... The refactoring ends when the value is 1. This represents the inverse wavelet transform, which fuses the reconstructed multi-scale features with the time-domain features of the original signal through residual connections to form the final output: , , in, The input is the result of primary feature extraction. This represents the learnable scaling parameter. Represents grouped convolution. For input The result after adaptive multi-scale feature extraction This is the final output.

2. The deep learning method for mechanical fault diagnosis according to claim 1, characterized in that, The frequency domain enhanced self-attention module FESA in the fault diagnosis classification model of step 1 transforms the time domain features obtained by the wavelet-guided adaptive multi-scale convolution module into the frequency domain and adaptively adjusts the frequency domain features, as specifically shown below: , , , in, The transformed frequency domain features, For linear transformation, For attention weights, For the enhanced frequency domain features, It is a nonlinear function. It is a nonlinear function. The DCT basis matrix is ​​used to convert time-domain features into frequency-domain features, and is represented as follows: , in, For the input length, For frequency index, It is a time-series index; Enhanced frequency domain features Above, queries are generated through a series of one-dimensional convolutions. ,key Sum Calculate query s and keys The dot product similarity between the two values ​​is calculated, and then normalized to obtain the attention weights. After obtaining the attention weights, the values ​​are used... With attention weight The weighted frequency domain features are obtained by matrix multiplication, as shown below: , ,in, It is the normalization factor, i.e., the signal length. For self-attention weights, This is the result after self-attention calculation. Indicates transpose; Finally, the inverse transformation of the DCT basis matrix is ​​used to map the weighted frequency domain features back to the original time domain structure, as shown below: ,in, The result is after passing through the frequency domain enhanced self-attention module. This is the transpose of the DCT basis matrix.

3. The deep learning method for mechanical fault diagnosis according to claim 2, characterized in that, In the fault diagnosis classification model of step 1, the frequency domain enhanced self-attention module and the feedforward network module are combined through residual connections and layer normalization. The feedforward network module adopts a two-layer fully connected structure, as shown below: , , , in, For layer normalization operation, This indicates a frequency-domain enhanced self-attention module. This represents the features of the output of the frequency domain enhanced self-attention module after residual connections and layer normalization. It is a feedforward network. This represents the characteristics of the output of the feedforward network module after residual connections and layer normalization. For linear transformation, It is a nonlinear function.

4. The deep learning method for mechanical fault diagnosis according to claim 3, characterized in that, The fault diagnosis classification model in step 1 adopts a three-level architecture, with each level connected by a downsampling module. The downsampling module uses a one-dimensional convolution with a kernel size of 3 and a stride of 2 to achieve channel dimension expansion and spatial resolution reduction.

5. A deep learning method for diagnosing mechanical faults according to claim 4, characterized in that, In step 2, average pooling with a kernel size of 2 and a stride of 2 is used for preprocessing to reduce the signal length from 1024 to 512. Then, one-dimensional convolution with a kernel size of 15 and a stride of 2 is used to expand the number of channels to 32, and the feature length becomes 256.

6. The deep learning method for mechanical fault diagnosis according to claim 5, characterized in that, Step 2 selects a dataset from the existing public fault dataset, uses a sliding window method to extract the dataset from the original data for processing, and uses the (-1,1) normalization method to normalize the dataset. The created dataset is divided into training set, validation set and test set in a ratio of 7:1:

2. Then the dataset is sent into the model for training and testing.

7. A deep learning method for diagnosing mechanical faults according to claim 6, characterized in that, The specific operation of step 3 is as follows: Calculate the training loss between the model's predicted output and the true label using the cross-entropy loss function, specifically expressed as: ,in, For batch size, Fault category, For the sample Category The true label, Predict samples for the model Category The probability of; The Adam optimizer is used to dynamically adjust the learning rate and update the model weights. The model with the highest accuracy during the iteration process is selected as the trained model on the validation set. After the input data is processed by the model's forward propagation to obtain the prediction result, gradient backpropagation is performed based on the loss value using the chain rule. The weight update process is represented as follows: ,in, For the loss function with respect to weights gradient, The gradient of the loss function with respect to the output. This outputs the gradient with respect to the weights.

Citation Information

Cited By

  • Agricultural machinery wet clutch gear shifting system fault diagnosis method based on closed continuous time unit

    CN121743679A

  • Fault diagnosis method for wet clutch shifting system of agricultural machinery based on closed continuous time unit

    CN121743679B