A method for fault diagnosis of rotating machinery under high noise conditions

By improving signal processing and the SwinTransformer network model, and combining local and global attention mechanisms, the accuracy problem of rotating machinery fault diagnosis in strong noise background is solved, and high-precision and robust fault diagnosis is achieved.

CN119880377BActive Publication Date: 2025-10-31CHONGQING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411655184.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-10-31
Estimated Expiration
2044-11-19

AI Technical Summary

Technical Problem

Existing methods for diagnosing rotating machinery faults are not very accurate in strong noise environments. Traditional signal processing methods are computationally intensive and inefficient. Deep learning methods are susceptible to noise interference and have poor interpretability. Local attention mechanisms are not effective in sequence context tasks.

Method used

An improved fully adaptive noise ensemble empirical mode decomposition algorithm and wavelet denoising technique are used to process the vibration acceleration signal to generate a time-frequency diagram; the SwinTGAM network model, which combines SwinTransformer and GAM-Attention mechanism, is used for fault diagnosis.

Benefits of technology

It improves the accuracy and robustness of fault diagnosis for rotating machinery, enhances the model's performance and generalization ability, and enables accurate fault diagnosis in high-noise environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119880377B_ABST
    Figure CN119880377B_ABST
Patent Text Reader

Abstract

This invention discloses a method for diagnosing rotating machinery faults under strong noise conditions, comprising the following steps: 1) collecting vibration acceleration signals of rotating machinery under different operating conditions and setting fault type labels; 2) performing noise reduction processing on the vibration acceleration signals to generate time-frequency maps with fault type labels, and dividing these time-frequency maps into a rotating machinery fault training set and a test set; 3) constructing a SwinTGAM network model based on a fusion attention mechanism; 4) training the SwinTGAM network model using the rotating machinery fault training set; 5) collecting vibration acceleration data of the rotating machinery to be diagnosed and inputting it into the tested SwinTGAM network model to obtain the rotating machinery fault diagnosis result. This invention integrates deep learning models and signal processing techniques, enabling the model to have strong robustness and high accuracy when facing signals containing strong noise.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of rotating machinery fault diagnosis, specifically a method for diagnosing rotating machinery faults under strong noise conditions. Background Technology

[0002] Rotating machinery systems often operate under continuous variable loads, significantly increasing the risk of failure. Furthermore, as the structural design of rotating machinery becomes increasingly sophisticated and complex, its failure modes tend to be more diverse and deeper-seated. Therefore, it is essential to identify failures in rotating machinery promptly and effectively to prevent potential major losses and ensure that the machinery maintains a stable and reliable operating state under extreme operating conditions.

[0003] Traditional signal processing-based diagnostic methods often have certain drawbacks. For example, Empirical Mode Decomposition (EMD) requires unpredictable iterative calculations; the decomposition results are highly sensitive to noise, and simulations show that even slight changes in noise can lead to significant differences in the final IMFs. Deep learning-based diagnostic methods, on the other hand, suffer from noise interference introduced by environmental and device operating conditions into their deep networks, resulting in unsatisfactory results. Furthermore, using global attention mechanisms alone in diagnostic model building leads to high computational costs and low efficiency. Local attention mechanisms are not effective enough when considering the entire sequence context and suffer from boundary effects and locality limitations. Moreover, deep learning generally suffers from poor interpretability, making it difficult to optimize neural networks. Summary of the Invention

[0004] The purpose of this invention is to provide a method for diagnosing faults in rotating machinery under high noise conditions, comprising the following steps:

[0005] 1) Collect vibration acceleration signals of rotating machinery under different operating conditions and set fault type labels;

[0006] 2) The vibration acceleration signal is denoised to generate time-frequency graphs labeled with fault types, and these time-frequency graphs are divided into a rotating machinery fault training set and a test set.

[0007] 3) Construct a SwinTGAM network model based on a fusion attention mechanism;

[0008] 4) The SwinTGAM network model was trained using a rotating machinery fault training set;

[0009] 5) Test the trained SwingTGAM network model using the rotating machinery fault test set. If the test is successful, proceed to step 6); otherwise, return to step 1.

[0010] 6) Collect vibration acceleration data of the rotating machinery to be diagnosed and input it into the qualified SwinTGAM network model to obtain the fault diagnosis results of the rotating machinery.

[0011] Furthermore, the sampling frequency of the vibration acceleration signal in step 1) is the same as the sampling frequency of the vibration acceleration signal in step 6).

[0012] Furthermore, in step 2), the noise reduction process for the vibration acceleration signal includes:

[0013] 2.1) The vibration acceleration signal is decomposed using an improved fully adaptive noise ensemble empirical mode decomposition algorithm to obtain multiple IMFs components;

[0014] 2.2) Calculate the sample entropy of different IMFs components, and use the wavelet denoising algorithm with improved threshold function to denoise and reconstruct the IMFs components with sample entropy greater than 0.1;

[0015] 2.3) The continuous wavelet transform method is used to transform the noise-reduced signal to generate time-frequency diagrams under different fault type labels.

[0016] Furthermore, step 2.1) involves decomposing the vibration acceleration signal, which includes:

[0017] 2.1.1) Add Gaussian white noise ω to the vibration acceleration signal. (i) ,get:

[0018]

[0019] In the formula: The first signal to be constructed; x is the vibration acceleration signal; σ1 is the expected signal-to-noise ratio of the first decomposed signal, ω (i) For the i-th added Gaussian white noise; E1(·) is the first IMF obtained after EMD decomposition; N is the number of Gaussian white noises;

[0020] 2.1.2) Calculate the first residual component and the first modal component IMF1, i.e.:

[0021]

[0022] IMF1 = x - r1 (3)

[0023] In the formula: r1 is the first residual component; <·> indicates taking the average value.

[0024] 2.1.3) Add Gaussian white noise to the first residual component r1, and calculate the second residual component r2 and the second modal component IMF2, i.e.:

[0025] r2=<(r1+σ2E2(ω (i) ))>(4)

[0026] IMF2 = r1 - r2 (5)

[0027] In the formula, σ2 is the expected signal-to-noise ratio of the second decomposed signal, and E2(·) is the IMF obtained after EMD decomposition;

[0028] 2.1.4) Determine whether the second residual component r2 is a monotonic function. If it is, the decomposition ends and all modalities and residual components are output. Otherwise, proceed to step 2.1.5).

[0029] 2.1.5) Calculate the residual component r of the kth iteration. k With the k-th modal component IMF k Output all modalities and residual components until the k-th residual component is a monotonic function; k≥3

[0030] The residual component r of the kth iteration k With the k-th modal component IMF k As shown below:

[0031]

[0032] IMF k =r k-1 -r k (7)

[0033] In the formula, E k (·) represents the IMF obtained after EMD decomposition; r k-1 This is the residual component of the (k-1)th iteration.

[0034] Furthermore, in step 2.2), the step of using a wavelet denoising algorithm with an improved threshold function to denoise and reconstruct IMFs components with sample entropy greater than 0.1 includes:

[0035] 2.2.1) Select wavelet basis functions and decomposition levels to perform multi-scale wavelet decomposition on IMFs components to obtain a series of high-frequency wavelet coefficients at each scale;

[0036] 2.2.2) These high-frequency wavelet coefficients are processed using threshold values ​​and threshold functions to remove noise;

[0037] The threshold function is shown below:

[0038]

[0039] In the formula, ω j,k The wavelet coefficients before quantization are λ; λ is the threshold, sgn() is the sign function, and the parameter p∈(0,λ); These are the processed wavelet coefficients;

[0040] 2.2.3) The processed coefficients are reconstructed into the denoised signal using inverse wavelet transform, resulting in:

[0041]

[0042] Among them, h i [n] represents the wavelet function, * indicates convolution operation, C i [n] represents the wavelet coefficients. X[n] represents the denoised signal.

[0043] Furthermore, in step 2.3), the continuous wavelet transform is defined as:

[0044]

[0045] Where u is the translation factor, controlling the position of the wavelet window in the time domain; v is the scaling factor, controlling the size and position of the wavelet window in the frequency domain; x(t), X ∞ (u,v) represent the parameters before and after the transformation, respectively;

[0046] wavelet basis functions As shown below:

[0047]

[0048] Where ω0 is the frequency parameter, controlling the frequency of the wavelet function, i is the imaginary unit, π is pi, and t is time.

[0049] Furthermore, in step 4), the steps of training the SwinTGAM network model using the rotating machinery fault training set include:

[0050] 4.1) Input the time-frequency image into the Swin Transformer unit of the SwinTGAM network model to extract local features of the time-frequency image;

[0051] The time-frequency image is input into the convolutional pooling network of the SwinTGAM network model to extract the global spatial features of the time-frequency image;

[0052] 4.2) The local and global spatial features of the time-frequency image are fused, adaptively averaged, and flattened into a one-dimensional vector form of fused features;

[0053] 4.3) The flattened fusion features are sequentially input into the fully connected layer and the Softmax classifier to obtain the fault type label.

[0054] Furthermore, in step 4.1), the step of extracting local features of the time-frequency image includes:

[0055] 4.1.1) The H×W×3 time-frequency image is segmented into N non-overlapping and independent segments using the Patch Partition layer. Image blocks;

[0056] 4.1.2) Project the image patch onto an arbitrary dimension C using Linear Embedding, such that the dimension of the image patch... Turn to

[0057] 4.1.3) Input the transformed image patch into the Swing Transformer block, and perform layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations in sequence. Output the processed image patch through MLP.

[0058] 4.1.4) Input the image patch processed in step 4.1.3) into the Patch Merging layer to obtain a dimension of Image blocks;

[0059] 4.1.5) Dimension is The image patch is input into the Swing Transformer block, which sequentially performs layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations, and outputs the processed image patch through the MLP;

[0060] 4.1.6) Input the image patch processed in step 4.1.5) into the Patch Merging layer to obtain a dimension of Image blocks;

[0061] 4.1.7) Dimension is The image patch is input into the Swing Transformer block, which sequentially performs layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations, and outputs the processed image patch through the MLP;

[0062] 4.1.8) Input the image patch processed in step 4.1.7) into the Patch Merging layer to obtain a dimension of Image blocks;

[0063] 4.1.9) Dimension is The image patch is input into the Swing Transformer block, which sequentially performs layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations, and outputs the local features of the time-frequency image through MLP.

[0064] Furthermore, the convolutional pooling network includes three convolutional layers and three pooling layers. The convolutional layers and pooling layers obtain channel attention features and spatial attention features through the channel attention module and spatial attention module, respectively.

[0065] Furthermore, the global spatial features of the time-frequency image extracted in 4.1) are shown below:

[0066] Assume the input feature mapping is F GAM1 Calculate intermediate features:

[0067]

[0068] Among them, M c Indicates channel attention operation; M S Represents spatial attention operation; F GAM2 For intermediate feature maps; F GAM1 For input; F GAM3 These are global spatial features of the time-frequency image.

[0069] The technical effectiveness of this invention is undeniable. This invention combines a time-frequency analysis method based on signal decomposition and denoising with a network model based on the Swing Transformer and GAM-Attention mechanism, aiming to improve the accuracy of rotating machinery fault diagnosis. The model in this scheme can generate low-noise, high-resolution two-dimensional time-frequency images from the original vibration signals and effectively extract and fuse features at different levels in the images, thereby improving the model's performance and generalization ability, and achieving accurate diagnosis of rotating machinery faults.

[0070] This invention integrates deep learning models with signal processing techniques, enabling the model to exhibit strong robustness and high accuracy when faced with signals containing strong noise.

[0071] This invention innovatively combines global attention and window attention mechanisms when extracting time-frequency graph features, thereby optimizing model performance and improving the model's convergence speed and generalization ability. Attached Figure Description

[0072] Figure 1 This is a flowchart of the present invention;

[0073] Figure 2 This is a structural diagram of the signal processing part in step S2 of the present invention;

[0074] Figure 3 This is a structural diagram of the SwinTGAM network model in step S3 of the present invention;

[0075] Figure 4 The figures show the training set accuracy and loss function iteration curves in this embodiment of the invention.

[0076] Figure 5 This is the result of feature visualization in an embodiment of the present invention. Detailed Implementation

[0077] The present invention will be further described below with reference to embodiments, but it should not be construed that the scope of the present invention is limited to the following embodiments. Various substitutions and modifications made based on ordinary technical knowledge and common practices in the art without departing from the above-described technical concept of the present invention should be included within the scope of protection of the present invention.

[0078] Example 1:

[0079] See Figures 1 to 5 A method for diagnosing faults in rotating machinery under high noise conditions includes the following steps:

[0080] 1) Collect vibration acceleration signals of rotating machinery under different operating conditions and set fault type labels;

[0081] 2) The vibration acceleration signal is denoised to generate time-frequency graphs labeled with fault types, and these time-frequency graphs are divided into a rotating machinery fault training set and a test set.

[0082] 3) Construct a SwinTGAM network model based on a fusion attention mechanism;

[0083] 4) The SwinTGAM network model was trained using a rotating machinery fault training set;

[0084] 5) Test the trained SwingTGAM network model using the rotating machinery fault test set. If the test is successful, proceed to step 6); otherwise, return to step 1.

[0085] 6) Collect vibration acceleration data of the rotating machinery to be diagnosed and input it into the qualified SwinTGAM network model to obtain the fault diagnosis results of the rotating machinery.

[0086] The sampling frequency of the vibration acceleration signal in step 1) is the same as that in step 6).

[0087] Step 2) includes the following steps for noise reduction of the vibration acceleration signal:

[0088] 2.1) The vibration acceleration signal is decomposed using an improved fully adaptive noise ensemble empirical mode decomposition algorithm to obtain multiple IMFs components;

[0089] 2.2) Calculate the sample entropy of different IMFs components, and use the wavelet denoising algorithm with improved threshold function to denoise and reconstruct the IMFs components with sample entropy greater than 0.1;

[0090] 2.3) The continuous wavelet transform method is used to transform the noise-reduced signal to generate time-frequency diagrams under different fault type labels.

[0091] Step 2.1) involves decomposing the vibration acceleration signal, including:

[0092] 2.1.1) Add Gaussian white noise ω to the vibration acceleration signal. (i) ,get:

[0093]

[0094] In the formula: The first signal to be constructed; x is the vibration acceleration signal; σ1 is the expected signal-to-noise ratio of the first decomposed signal, ω (i) For the i-th added Gaussian white noise; E1(·) is the first IMF obtained after EMD decomposition; N is the number of Gaussian white noises;

[0095] 2.1.2) Calculate the first residual component and the first modal component IMF1, i.e.:

[0096]

[0097] IMF1 = x - r1 (3)

[0098] In the formula: r1 is the first residual component; <·> indicates taking the average value.

[0099] 2.1.3) Add Gaussian white noise to the first residual component r1, and calculate the second residual component r2 and the second modal component IMF2, i.e.:

[0100] r2=<(r1+σ2E2(ω (i) ))>(4)

[0101] IMF2 = r1 - r2 (5)

[0102] In the formula, σ2 is the expected signal-to-noise ratio of the second decomposed signal, and E2(·) is the IMF obtained after EMD decomposition;

[0103] 2.1.4) Determine whether the second residual component r2 is a monotonic function. If it is, the decomposition ends and all modalities and residual components are output. Otherwise, proceed to step 2.1.5).

[0104] 2.1.5) Calculate the residual component r of the kth iteration. k With the k-th modal component IMF k Output all modalities and residual components until the k-th residual component is a monotonic function; k≥3

[0105] The residual component r of the kth iteration k With the k-th modal component IMF k As shown below:

[0106]

[0107] IMF k =r k-1 -r k (7)

[0108] In the formula, E k (·) represents the IMF obtained after EMD decomposition; r k-1 This is the residual component of the (k-1)th iteration.

[0109] Step 2.2), the steps of using the wavelet denoising algorithm with an improved threshold function to denoise and reconstruct IMFs components with sample entropy greater than 0.1, include:

[0110] 2.2.1) Select wavelet basis functions and decomposition levels to perform multi-scale wavelet decomposition on IMFs components to obtain a series of high-frequency wavelet coefficients at each scale;

[0111] 2.2.2) These high-frequency wavelet coefficients are processed using threshold values ​​and threshold functions to remove noise;

[0112] The threshold function is shown below:

[0113]

[0114] In the formula, ω j,k The wavelet coefficients before quantization are λ; λ is the threshold, sgn() is the sign function, and the parameter p∈(0,λ); These are the processed wavelet coefficients;

[0115] 2.2.3) The processed coefficients are reconstructed into the denoised signal using inverse wavelet transform, resulting in:

[0116]

[0117] Among them, h i [n] represents the wavelet function, * indicates convolution operation, C i [n] represents the wavelet coefficients. X[n] represents the denoised signal.

[0118] In step 2.3), the continuous wavelet transform is defined as:

[0119]

[0120] Where u is the translation factor, controlling the position of the wavelet window in the time domain; v is the scaling factor, controlling the size and position of the wavelet window in the frequency domain; x(t), X ∞ (u,v) represent the parameters before and after the transformation, respectively;

[0121] wavelet basis functions As shown below:

[0122]

[0123] Where ω0 is the frequency parameter, controlling the frequency of the wavelet function, i is the imaginary unit, π is pi, and t is time.

[0124] Step 4), which involves training the SwinTGAM network model using the rotating machinery fault training set, includes the following steps:

[0125] 4.1) Input the time-frequency image into the Swin Transformer unit of the SwinTGAM network model to extract local features of the time-frequency image;

[0126] The time-frequency image is input into the convolutional pooling network of the SwinTGAM network model to extract the global spatial features of the time-frequency image;

[0127] 4.2) The local and global spatial features of the time-frequency image are fused, adaptively averaged, and flattened into a one-dimensional vector form of fused features;

[0128] 4.3) The flattened fusion features are sequentially input into the fully connected layer and the Softmax classifier to obtain the fault type label.

[0129] Step 4.1) involves extracting local features from the time-frequency image, including:

[0130] 4.1.1) The H×W×3 time-frequency image is segmented into N non-overlapping and independent segments using the Patch Partition layer. Image blocks;

[0131] 4.1.2) Project the image patch onto an arbitrary dimension C using Linear Embedding, such that the dimension of the image patch... Turn to

[0132] 4.1.3) Input the transformed image patch into the Swing Transformer block, and perform layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations in sequence. Output the processed image patch through MLP.

[0133] 4.1.4) Input the image patch processed in step 4.1.3) into the Patch Merging layer to obtain a dimension of Image blocks;

[0134] 4.1.5) Dimension is The image patch is input into the Swing Transformer block, which sequentially performs layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations, and outputs the processed image patch through the MLP;

[0135] 4.1.6) Input the image patch processed in step 4.1.5) into the Patch Merging layer to obtain a dimension of Image blocks;

[0136] 4.1.7) Dimension is The image patch is input into the Swing Transformer block, which sequentially performs layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations, and outputs the processed image patch through the MLP;

[0137] 4.1.8) Input the image patch processed in step 4.1.7) into the Patch Merging layer to obtain a dimension of Image blocks;

[0138] 4.1.9) Dimension is The image patch is input into the Swing Transformer block, which sequentially performs layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations, and outputs the local features of the time-frequency image through MLP.

[0139] The convolutional pooling network includes three convolutional layers and three pooling layers. The convolutional layers and pooling layers obtain channel attention features and spatial attention features through the channel attention module and spatial attention module, respectively.

[0140] The global spatial features of the time-frequency image extracted in 4.1) are shown below:

[0141] Assume the input feature mapping is F GAM1 Calculate intermediate features:

[0142]

[0143] Among them, M c Indicates channel attention operation; M S Represents spatial attention operation; F GAM2 For intermediate feature maps; F GAM1For input; F GAM3 These are global spatial features of the time-frequency image.

[0144] Example 2:

[0145] A method for diagnosing faults in rotating machinery under high noise conditions includes the following steps:

[0146] 1) Collect vibration acceleration signals of rotating machinery under different operating conditions and set fault type labels;

[0147] 2) The vibration acceleration signal is denoised to generate time-frequency graphs labeled with fault types, and these time-frequency graphs are divided into a rotating machinery fault training set and a test set.

[0148] 3) Construct a SwinTGAM network model based on a fusion attention mechanism;

[0149] 4) The SwinTGAM network model was trained using a rotating machinery fault training set;

[0150] 5) Test the trained SwingTGAM network model using the rotating machinery fault test set. If the test is successful, proceed to step 6); otherwise, return to step 1.

[0151] 6) Collect vibration acceleration data of the rotating machinery to be diagnosed and input it into the qualified SwinTGAM network model to obtain the fault diagnosis results of the rotating machinery.

[0152] Example 3:

[0153] A method for diagnosing faults in rotating machinery under strong noise conditions is provided. The technical content is the same as in Embodiment 2. Furthermore, the sampling frequency of the vibration acceleration signal in step 1) is the same as the sampling frequency of the vibration acceleration signal in step 6).

[0154] Example 4:

[0155] A method for diagnosing faults in rotating machinery under strong noise conditions, with the same technical content as any one of embodiments 2-3, further comprising, in step 2), the step of noise reduction processing of the vibration acceleration signal includes:

[0156] 2.1) The vibration acceleration signal is decomposed using an improved fully adaptive noise ensemble empirical mode decomposition algorithm to obtain multiple IMFs components;

[0157] 2.2) Calculate the sample entropy of different IMFs components, and use the wavelet denoising algorithm with improved threshold function to denoise and reconstruct the IMFs components with sample entropy greater than 0.1;

[0158] 2.3) The continuous wavelet transform method is used to transform the noise-reduced signal to generate time-frequency diagrams under different fault type labels.

[0159] Example 5:

[0160] A method for diagnosing faults in rotating machinery under strong noise conditions, with the same technical content as any one of embodiments 2-4, further comprising the following steps in step 2.1):

[0161] 2.1.1) Add Gaussian white noise ω to the vibration acceleration signal. (i) ,get:

[0162]

[0163] In the formula: The first signal to be constructed; x is the vibration acceleration signal; σ1 is the expected signal-to-noise ratio of the first decomposed signal, ω (i) E1(·) represents the i-th added Gaussian white noise; E1(·) is the first IMF obtained after EMD decomposition.

[0164] 2.1.2) Calculate the first residual component and the first modal component IMF1, i.e.:

[0165]

[0166] IMF1 = x - r1 (3)

[0167] In the formula: r1 is the first residual component; <·> indicates taking the average value.

[0168] 2.1.3) Add Gaussian white noise to the first residual component r1, and calculate the second residual component r2 and the second modal component IMF2, i.e.:

[0169] r2=<(r1+σ2E2(ω (i) ))>(4)

[0170] IMF2 = r1 - r2 (5)

[0171] 2.1.4) Determine whether the second residual component r2 is a monotonic function. If it is, the decomposition ends and all modalities and residual components are output. Otherwise, proceed to step 2.1.5).

[0172] 2.1.5) Calculate the residual component r of the kth iteration. k With the k-th modal component IMF k Output all modalities and residual components until the k-th residual component is a monotonic function; k≥3

[0173] The residual component r of the kth iterationk With the k-th modal component IMF k As shown below:

[0174]

[0175] IMF k =r k-1 -r k (7)

[0176] Example 6:

[0177] A method for fault diagnosis of rotating machinery under strong noise background, with the same technical content as any one of embodiments 2-5, further comprising the following steps in step 2.2), which involves using a wavelet denoising algorithm with an improved threshold function to denoise and reconstruct IMFs components with sample entropy greater than 0.1:

[0178] 2.2.1) Select wavelet basis functions and decomposition levels to perform multi-scale wavelet decomposition on IMFs components to obtain a series of high-frequency wavelet coefficients at each scale;

[0179] 2.2.2) These high-frequency wavelet coefficients are processed using threshold values ​​and threshold functions to remove noise;

[0180] The threshold function is shown below:

[0181]

[0182] In the formula, ω j,k λ represents the quantized wavelet coefficients; λ is the threshold, sgn() is the sign function, and p∈(0,λ);

[0183] 2.2.3) The processed coefficients are reconstructed into the denoised signal using inverse wavelet transform, resulting in:

[0184]

[0185] Among them, h i [n] represents the wavelet function, * indicates convolution operation, C i [n] represents the wavelet coefficients.

[0186] Example 7:

[0187] A method for diagnosing faults in rotating machinery under strong noise conditions, with the same technical content as any one of embodiments 2-6, further wherein, in step 2.3), the continuous wavelet transform is defined as:

[0188]

[0189] Where u is the translation factor, which controls the position of the wavelet window in the time domain; v is the scaling factor, which controls the size of the wavelet window and its position in the frequency domain.

[0190] wavelet basis functions As shown below:

[0191]

[0192] Where ω0 is the frequency parameter that controls the frequency of the wavelet function, i is the imaginary unit, and π is pi.

[0193] Example 8:

[0194] A method for diagnosing faults in rotating machinery under strong noise conditions, with the same technical content as any one of embodiments 2-7, further comprising the following steps in step 4), which involves training the SwinTGAM network model using a rotating machinery fault training set:

[0195] 4.1) Input the time-frequency image into the Swin Transformer unit of the SwinTGAM network model to extract local features of the time-frequency image;

[0196] The time-frequency image is input into the convolutional pooling network of the SwinTGAM network model to extract the global spatial features of the time-frequency image;

[0197] 4.2) The local and global spatial features of the time-frequency image are fused, adaptively averaged, and flattened into a one-dimensional vector form of fused features;

[0198] 4.3) The flattened fusion features are sequentially input into the fully connected layer and the Softmax classifier to obtain the fault type label.

[0199] Example 9:

[0200] A method for diagnosing faults in rotating machinery under strong noise conditions, with the same technical content as any one of embodiments 2-8, further comprising the following steps in step 4.1):

[0201] 4.1.1) The H×W×3 time-frequency image is segmented into N non-overlapping and independent segments using the Patch Partition layer. Image blocks;

[0202] 4.1.2) Project the image patch onto an arbitrary dimension C using Linear Embedding, such that the dimension of the image patch... Turn to

[0203] 4.1.3) Input the transformed image patch into the Swing Transformer block, and perform layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations in sequence. Output the processed image patch through MLP.

[0204] 4.1.4) Input the image patch processed in step 4.1.3) into the Patch Merging layer to obtain a dimension of Image blocks;

[0205] 4.1.5) Dimension is The image patch is input into the Swing Transformer block, which sequentially performs layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations, and outputs the processed image patch through the MLP;

[0206] 4.1.6) Input the image patch processed in step 4.1.5) into the Patch Merging layer to obtain a dimension of Image blocks;

[0207] 4.1.7) Dimension is The image patch is input into the Swing Transformer block, which sequentially performs layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations, and outputs the processed image patch through the MLP;

[0208] 4.1.8) Input the image patch processed in step 4.1.7) into the Patch Merging layer to obtain a dimension of Image blocks;

[0209] 4.1.9) Dimension is The image patch is input into the Swing Transformer block, which sequentially performs layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations, and outputs the local features of the time-frequency image through MLP.

[0210] Example 10:

[0211] A method for diagnosing faults in rotating machinery under strong noise backgrounds, with the same technical content as any one of embodiments 2-9, further wherein the convolutional pooling network includes 3 convolutional layers and 3 pooling layers, and the convolutional layers and pooling layers obtain channel attention features and spatial attention features through channel attention modules and spatial attention modules, respectively.

[0212] Example 11:

[0213] A method for fault diagnosis of rotating machinery under strong noise background, the technical content of which is the same as any one of embodiments 2-10, further, the global spatial features of the time-frequency image extracted in 4.1) are as follows:

[0214] Assume the input feature mapping is F GAM1 Calculate intermediate features:

[0215]

[0216] Among them, M c Indicates channel attention operation; M S Represents spatial attention operation; F GAM2 For intermediate feature maps; f GAM1 For input; F GAM3 These are global spatial features of the time-frequency image.

[0217] Example 12:

[0218] A fault diagnosis method for rotating machinery suitable for use in high-noise environments comprises the following steps:

[0219] S1. Establish the dataset: using a sampling frequency f s Collect vibration acceleration signals of rotating machinery under various working conditions, set data labels according to fault type, and establish a sample dataset.

[0220] S2. Signal Processing: The collected vibration acceleration signals are denoised and a time-frequency graph is generated. The time-frequency graph is divided into a training set and a test set according to the data labels.

[0221] S3. Model Construction: Construct a SwinTGAM network model based on the fusion attention mechanism, and input the time-frequency graph into the SwinTGAM network model for training;

[0222] S4. Fault Diagnosis: Based on sampling frequency f s Vibration acceleration data of the rotating machinery to be diagnosed are collected, and the trained SwinTGAM network model is used to diagnose the faults of the rotating machinery and output the diagnosis results.

[0223] The collected vibration acceleration signals are denoised and a time-frequency graph is generated. The specific steps include:

[0224] S21. Process the data using the improved fully adaptive noise ensemble empirical mode decomposition (ICEEMDAN) algorithm to obtain the IMFs components;

[0225] S22. Calculate the sample entropy of each IMF component, and use the wavelet denoising algorithm with improved threshold function to denoise the IMF components with sample entropy greater than 0.1 and then reconstruct the signal.

[0226] S23. The noise-reduced signal is converted by continuous wavelet transform (CWT) to generate time-frequency diagrams under each label.

[0227] The step S21, which uses the ICEEMDAN algorithm to process vibration signals and obtain IMFs components, includes:

[0228] Add Gaussian white noise ω to the original signal (i) get:

[0229]

[0230] In the formula: Let x be the first signal constructed; x be the original signal; σ1 be the expected signal-to-noise ratio of the first decomposed signal; and ω be the signal-to-noise ratio of the first decomposed signal. (i) E1 is the i-th added Gaussian white noise; E1(·) is the first IMF obtained after EMD decomposition.

[0231] Calculate the first residual component:

[0232]

[0233] In the formula: r1 is the first residual component; <·> indicates taking the average value.

[0234] Calculate the first modal component IMF1:

[0235] IMF1 = x - r1

[0236] Gaussian white noise is added to the first residual component r1, and the second residual component r2 and the second modal component IMF2 are calculated:

[0237] r2=<(r1+σ2E2(ω (i) ))>

[0238] IMF2 = r1 - r2

[0239] Similarly, find the k-th (k≥2) modal component and the k-th (k≥2) residual component:

[0240]

[0241] IMF k =r k-1 -r k

[0242] Continue iterating r k The decomposition ends when the function becomes monotonic, producing all modal and residual components.

[0243] The step S22, which uses a wavelet denoising algorithm with an improved threshold function to denoise IMFs components with sample entropy greater than 0.1, includes:

[0244] Multi-scale wavelet decomposition of IMFs components is performed by selecting appropriate wavelet basis functions and decomposition levels to obtain a series of high-frequency wavelet coefficients at various scales. These high-frequency wavelet coefficients are then processed using appropriate threshold values ​​and threshold functions to remove noise. Specifically, an improved threshold wavelet function is selected. The expression for the improved threshold function is:

[0245]

[0246] In the formula, ω j,k λ represents the quantized wavelet coefficients; λ is the threshold; sgn() is the sign function; p∈(0,λ).

[0247] The processed coefficients are reconstructed into the denoised signal using inverse wavelet transform (IDWT):

[0248]

[0249] Where h i [n] represents the wavelet function, * indicates convolution operation, C i [n] represents the wavelet coefficients.

[0250] The specific steps of S23 to convert the noise-reduced signal using CWT to generate the time-frequency diagram under each tag are as follows:

[0251] For any signal x(t), its continuous wavelet transform is defined as:

[0252]

[0253] Where u is the translation factor, which controls the position of the wavelet window in the time domain; v is the scaling factor, which controls the size of the wavelet window and its position in the frequency domain. These are called wavelet basis functions, and their expressions are as follows:

[0254]

[0255] The characteristics of bearing vibration signals were analyzed using Morlet wavelets as basis functions for continuous wavelet transform. Specifically, the expression for Morlet wavelets is typically as follows:

[0256]

[0257] Where ω0 is the frequency parameter that controls the frequency of the wavelet function, i is the imaginary unit, and π is pi.

[0258] The specific steps for training the SwinTGAM network model by inputting the time-frequency graph include:

[0259] S31, Branch 1: Input the time-frequency image into the Swing Transformer unit based on the moving window attention mechanism to extract local features of the time-frequency image;

[0260] S32, Branch 2: Input the time-frequency image into a convolutional pooling network based on GAM-Attention to extract the global spatial features of the time-frequency image;

[0261] S33. After fusing the time-frequency map features obtained from S31 and S32, perform adaptive average pooling and flatten them into a one-dimensional vector form.

[0262] S34. The flattened fusion features are passed through a fully connected layer and a Softmax classifier in sequence to output the result label.

[0263] The specific steps of S31 in inputting the time-frequency image into the Swin Transformer unit are as follows:

[0264] The time-frequency image H×W×3 is segmented into N non-overlapping and independent image patches using a Patch Partition layer, where H is the image height and W is the image width. The image is divided into dimensions...<H×W×3> Turn to This vector is then projected onto an arbitrary dimension C using Linear Embedding, so that the image is transformed from dimension C. Turn to The input is then fed into the Swing Transformer block: Each time, layer normalization is performed first, followed by calculation of the window multi-head self-attention mechanism (W-MSA), then normalization again. After passing through a feedforward network, the window moving multi-head self-attention mechanism (SW-MSA) is calculated to increase information interaction between windows. The result is output through an MLP, thus completing Stage 1. The algorithm is divided into four stages. Subsequent stages contain two parts: the Patch Merging layer and the Swing Transformer block. As the network progresses, in subsequent stages, the patch feature map input to the Patch Merging layer is divided into 2×2 layers, resulting in dimensions of... After processing by the SwinTransformer block, local features of the time-frequency image are obtained.

[0265] S32 inputs the time-frequency image into a GAM-Attention-based convolutional pooling network, which includes three convolutional layers and three pooling layers. Channel attention features and spatial attention features are obtained through a channel attention module (3D CAM) and a spatial attention module (SAM), respectively. The specific steps are as follows:

[0266] Assume the input feature mapping is F GAM1 Calculate intermediate features:

[0267]

[0268] Among them, M c This represents the channel attention operation. This operation computes channel attention weights using a two-layer multilayer perceptron (MLP) structure and then modifies them with the input features F. GAM1 Element-wise multiplication to generate intermediate feature F GAM2 The channel attention module generates channel attention features by processing the input feature map using an encoder-decoder structure.

[0269] Calculate output characteristics:

[0270]

[0271] Among them, M S This represents the spatial attention operation. This operation fuses spatial information through two convolutional layers and applies it to the intermediate feature map F. GAM2 Processing is performed to generate spatial attention features F GAM3 The spatial attention module first integrates and compresses the feature maps using 3×3 convolutions, then projects and reduces the dimensionality of the intermediate feature maps, and finally uses 3×3 unfolded convolutions to generate a spatial attention map.

[0272] S33 fuses the features obtained from S31 and S32 and performs adaptive average pooling. Its main steps are to calculate the size of each pooling window and calculate the average value of each window region in the feature map, and finally adaptively pool the input feature map to the target output size.

[0273] Example 13:

[0274] The verification of a fault diagnosis method for rotating machinery under strong noise background is as follows:

[0275] S1. Establish the dataset: using a sampling frequency f sVibration acceleration signals of rotating machinery under various operating conditions were collected, and data labels were set according to fault type to establish a sample dataset. Please refer to Table 1. In this embodiment, the rolling bearing dataset from Case Western Reserve University was selected, specifically the acceleration data of the drive-end bearing 6205-2RS JEM SKF. Each sample contains 2048 sampling points, with 10 different labels, each containing 50 samples, for a total of 500 samples.

[0276] Table 1

[0277]

[0278]

[0279] S2, Signal Processing: Please refer to [link / reference needed] Figure 2 The acquired vibration acceleration signals were processed using the ICEEMDAN algorithm to obtain IMFs components. The sample entropy of each IMF component was calculated, and a wavelet denoising algorithm with an improved threshold function was used to denoise the IMF components with sample entropy greater than 0.1 before reconstructing the signal. Finally, a time-frequency plot was generated using CWT. Based on the data labels, the time-frequency plot was randomly divided into a training set and a test set, with the training set accounting for 70% and the test set accounting for 30%.

[0280] S3, Model Building: Please refer to Figure 3 A SwinTGAM network model was constructed. In the Swin Transformer branch, Patch Partition is implemented through a two-dimensional convolutional layer. After processing by Patch Partition, the time-frequency image is divided into multiple 4×4 blocks. The number of stacked Swin Transformer blocks in Stage 1, Stage 2, Stage 3, and Stage 4 are 2, 2, 6, and 2, respectively. The number of heads in the multi-head attention mechanism are 3, 6, 12, and 24, respectively. The window size is 7×7, and the output channel dimension is 96 for all stages. The convolutional pooling network branch based on GAM-Attention includes three convolutional layers with 3×3 kernels and a stride of 1. The first convolutional layer has 16 output channels, the second has 32, and the third has 64. The fused features are then passed sequentially through a fully connected layer and a Softmax classifier after being flattened to obtain the bearing fault classification result. The learning rate of the samples during model training is 0.01, the number of iterations is set to 100, and the number of samples used in each iteration is 10.

[0281] The model uses GELU as its activation function.

[0282] The model uses the cross-entropy loss function to evaluate the difference between the predicted output and the actual output for each training sample, and updates the weights using stochastic gradient descent (SGD). The formula for calculating cross-entropy is:

[0283]

[0284] The iterative process of the training set in this embodiment is shown in Figure 4. The fault identification accuracy is tested using the test set, and the average accuracy reaches 99.95%. At the same time, the convergence speed is relatively fast. Therefore, it can be considered that the rotating machinery fault diagnosis method proposed in this invention has extremely high fault identification accuracy.

[0285] To verify the model's feature extraction capability, this embodiment introduces t-distributed random neighbor embedding (t-SNE) to visualize the data features. Please refer to [link to relevant documentation]. Figure 5 The 10 different colors represent the fault labels 0-9 in the dataset.

Claims

1. A method for diagnosing faults in rotating machinery under high noise conditions, characterized in that, Includes the following steps: 1) Collect vibration acceleration signals of rotating machinery under different operating conditions and set fault type labels; 2) The vibration acceleration signal is denoised to generate time-frequency graphs labeled with fault types, and these time-frequency graphs are divided into a rotating machinery fault training set and a test set. 3) Construct a SwinTGAM network model based on a fusion attention mechanism; 4) The SwinTGAM network model was trained using a rotating machinery fault training set; 5) Test the trained SwingTGAM network model using the rotating machinery fault test set. If the test is successful, proceed to step 6); otherwise, return to step 1. 6) Collect vibration acceleration data of the rotating machinery to be diagnosed and input it into the tested and qualified SwinTGAM network model to obtain the fault diagnosis results of the rotating machinery; Step 2) includes the following steps for noise reduction of the vibration acceleration signal: 2.1) The vibration acceleration signal is decomposed using an improved fully adaptive noise ensemble empirical mode decomposition algorithm to obtain multiple IMFs components; 2.2) Calculate the sample entropy of different IMFs components, and use the wavelet denoising algorithm with improved threshold function to denoise and reconstruct the IMFs components with sample entropy greater than 0.1; 2.3) The denoised signal is converted using the continuous wavelet transform method to generate time-frequency diagrams under different fault type labels; Step 2.1) involves decomposing the vibration acceleration signal, including: 2.1.1) Add Gaussian white noise ω to the vibration acceleration signal. (i) ,get: In the formula: The first signal to be constructed; x is the vibration acceleration signal; σ1 is the expected signal-to-noise ratio of the first decomposed signal, ω (i) For the i-th added Gaussian white noise; E1(·) is the first IMF obtained after EMD decomposition; N is the number of Gaussian white noises; 2.1.2) Calculate the first residual component and the first modal component IMF1, i.e.: IMF1 = x - r1 (3) In the formula: r1 is the first residual component; <·> indicates taking the average value; 2.1.3) Add Gaussian white noise to the first residual component r1, and calculate the second residual component r2 and the second modal component IMF2, i.e.: r2=<(r1+σ2E2(ω (i) ))> (4) IMF2 = r1 - r2 (5) In the formula, σ2 is the expected signal-to-noise ratio of the second decomposed signal, and E2(·) is the IMF obtained after EMD decomposition; 2.1.4) Determine whether the second residual component r2 is a monotonic function. If it is, the decomposition ends and all modalities and residual components are output. Otherwise, proceed to step 2.1.5). 2.1.5) Calculate the residual component r of the kth iteration. k With the k-th modal component IMF k Output all modalities and residual components until the k-th residual component is a monotonic function; k≥3 The residual component r of the kth iteration k With the k-th modal component IMF k As shown below: IMF k =r k-1 -r k (7) In the formula, E k (·) represents the IMF obtained after EMD decomposition; r k-1 This is the residual component of the (k-1)th iteration; Step 2.2), the steps of using the wavelet denoising algorithm with an improved threshold function to denoise and reconstruct IMFs components with sample entropy greater than 0.1, include: 2.2.1) Select wavelet basis functions and decomposition levels to perform multi-scale wavelet decomposition on IMFs components to obtain a series of high-frequency wavelet coefficients at each scale; 2.2.2) These high-frequency wavelet coefficients are processed using threshold values ​​and threshold functions to remove noise; Wherein, threshold function As shown below: In the formula, ω j,k The wavelet coefficients before quantization are λ; λ is the threshold, sgn() is the sign function, and the parameter p∈(0,λ); These are the processed wavelet coefficients; 2.2.3) The processed coefficients are reconstructed into the denoised signal using inverse wavelet transform, resulting in: Among them, h i [n] represents the wavelet function, * indicates convolution operation, C i [n] represents the wavelet coefficients; X[n] represents the denoised signal; In step 2.3), the continuous wavelet transform is defined as: Where u is the translation factor, controlling the position of the wavelet window in the time domain; v is the scaling factor, controlling the size and position of the wavelet window in the frequency domain; x(t), X ∞ (u,v) represent the parameters before and after the transformation, respectively; wavelet basis functions As shown below: Where ω0 is the frequency parameter that controls the frequency of the wavelet function, i is the imaginary unit, π is pi, and t is time.

2. The method for diagnosing rotating machinery faults under strong noise background according to claim 1, wherein the sampling frequency of the vibration acceleration signal in step 1) is the same as the sampling frequency of the vibration acceleration signal in step 6).

3. The method for diagnosing faults in rotating machinery under strong noise conditions according to claim 1, characterized in that: Step 4), which involves training the SwinTGAM network model using the rotating machinery fault training set, includes the following steps: 4.1) Input the time-frequency image into the Swin Transformer unit of the SwinTGAM network model to extract local features of the time-frequency image; The time-frequency image is input into the convolutional pooling network of the SwinTGAM network model to extract the global spatial features of the time-frequency image; 4.2) The local and global spatial features of the time-frequency image are fused, adaptively averaged, and flattened into a one-dimensional vector form of fused features; 4.3) The flattened fusion features are sequentially input into the fully connected layer and the Softmax classifier to obtain the fault type label.

4. The method for diagnosing faults in rotating machinery under strong noise conditions according to claim 3, characterized in that, Step 4.1) involves extracting local features from the time-frequency image, including: 4.1.1) The H×W×3 time-frequency image is segmented into N non-overlapping and independent segments using the Patch Partition layer. Image blocks; 4.1.2) Project the image patch onto an arbitrary dimension C using Linear Embedding, such that the dimension of the image patch... Turn to 4.1.3) Input the transformed image patch into the Swing Transformer block, and perform layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations in sequence. Output the processed image patch through MLP. 4.1.4) Input the image patch processed in step 4.1.3) into the Patch Merging layer to obtain a dimension of Image blocks; 4.1.5) Dimension is The image patch is input into the Swing Transformer block, which sequentially performs layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations, and outputs the processed image patch through the MLP; 4.1.6) Input the image patch processed in step 4.1.5) into the Patch Merging layer to obtain a dimension of Image blocks; 4.1.7) Dimension is The image patch is input into the Swing Transformer block, which sequentially performs layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations, and outputs the processed image patch through the MLP; 4.1.8) Input the image patch processed in step 4.1.7) into the Patch Merging layer to obtain a dimension of Image blocks; 4.1.9) Dimension is The image patch is input into the Swing Transformer block, which sequentially performs layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations, and outputs the local features of the time-frequency image through MLP.

5. The method for diagnosing faults in rotating machinery under strong noise conditions according to claim 3, characterized in that, The convolutional pooling network includes three convolutional layers and three pooling layers. The convolutional layers and pooling layers obtain channel attention features and spatial attention features through the channel attention module and spatial attention module, respectively.

6. The method for diagnosing faults in rotating machinery under strong noise conditions according to claim 1, characterized in that, The global spatial features of the time-frequency image extracted in 4.1) are shown below: Assume the input feature mapping is F GA Calculate intermediate features: Among them, M c Indicates channel attention operation; M S Represents spatial attention operation; F GAM2 For intermediate feature maps; F GAM1 For input; F GAM3 These are global spatial features of the time-frequency image.