Rotating machine fault diagnosis method suitable for strong noise background

By adopting the SwinTGAM network model based on the fusion attention mechanism and improved signal processing technology in rotary mechanical fault diagnosis, the shortcomings of the existing methods in the context of strong noise are solved, and the fault diagnosis effect with high accuracy and robustness is achieved.

CN119880377AActive Publication Date: 2025-04-25CHONGQING UNIV

Patent Information

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

AI Technical Summary

Technical Problem

The existing rotary machinery fault diagnosis methods are not effective in the context of strong noise, especially the methods based on signal processing and deep learning have problems such as noise sensitivity, high computational volume, low efficiency and poor interpretability.

Method used

The SwinTGAM network model based on the fusion attention mechanism is adopted, combined with the improved fully adaptive noise ensemble empirical mode decomposition algorithm and wavelet noise reduction technology, the vibration acceleration signal is denoised, time-frequency diagram is generated, and local and global features are extracted through Swin Transformer for fusing to achieve fault diagnosis.

Benefits of technology

It improves the accuracy and robustness of rotary machinery fault diagnosis, can accurately identify faults in a highly noise environment, and improves the performance and generalization capabilities of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119880377A_ABST
    Figure CN119880377A_ABST
Patent Text Reader

Abstract

The invention discloses a rotating machinery fault diagnosis method suitable for a strong noise background, and the method comprises the following steps: 1) collecting vibration acceleration signals of rotating machinery equipment under different working conditions, and setting a fault type label; 2) carrying out noise reduction processing on the vibration acceleration signals to generate time-frequency diagrams with fault type labels, and dividing the time-frequency diagrams 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 by using the rotating machinery fault training set; and 5) collecting vibration acceleration data of to-be-diagnosed rotating mechanical equipment, and inputting the vibration acceleration data into the SwinTGAM network model which is tested to be qualified to obtain a rotating mechanical fault diagnosis result. According to the method, a deep learning model and a signal processing technology are integrated, so that the model has relatively high robustness and very high accuracy when facing a signal containing strong noise.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of rotating machinery fault diagnosis, in particular to a rotating machinery fault diagnosis method suitable for use under a strong noise background. Background Art

[0002] Rotating machinery systems often need to operate under continuously changing load conditions, which significantly increases the risk of failure. As the design of rotating machinery structures becomes increasingly sophisticated and complex, its failure modes tend to be diversified and in-depth. Therefore, it is necessary to promptly and effectively identify the failures of rotating machinery to prevent potential major losses and ensure that the machinery maintains a stable and reliable operating state under extreme operating environments.

[0003] Most traditional signal processing-based diagnostic methods have certain defects. For example, empirical mode decomposition (EMD) requires unpredictable multiple iterative calculations; the decomposition results are very sensitive to noise, and simulation signals show that a slight change in noise may lead to a significant difference in the final IMFs. In the diagnosis method based on deep learning, its deep network will introduce noise interference due to the environment and equipment operation, which also makes the results unsatisfactory. In the establishment of the diagnostic model, the use of the global attention mechanism alone will bring about problems such as large amount of calculation and low efficiency. At the same time, the local attention mechanism is not effective enough when considering the entire sequence context task, and it also has defects such as boundary effects and local limitations. In addition, deep learning generally has the problem of poor interpretability, and it is difficult to optimize the neural network. Summary of the invention

[0004] The object of the present invention is to provide a method for diagnosing faults of rotating machinery in a strong noise background, comprising the following steps:

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

[0006] 2) De-noise the vibration acceleration signal, generate time-frequency diagrams with fault type labels, and divide these time-frequency diagrams into a training set and a test set for rotating machinery faults;

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

[0008] 4) Use the rotating machinery fault training set to train the SwinTGAM network model;

[0009] 5) Use the rotating machinery fault test set to test the trained SwinTGAM network model. If the test is qualified, proceed to step 6), otherwise, return to step 1);

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

[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] Further, in step 2), the step of performing noise reduction processing on the vibration acceleration signal includes:

[0013] 2.1) The vibration acceleration signal is decomposed using the 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 denoised signal to generate time-frequency diagrams under different fault type labels.

[0016] Further, in step 2.1), the step of decomposing the vibration acceleration signal includes:

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

[0018]

[0019] Where: is the first signal constructed; x is the vibration acceleration signal; σ1 is the expected signal-to-noise ratio of the first decomposition signal, ω (i) is the i-th Gaussian white noise added; E1(·) is the first IMF obtained by 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, that is:

[0021]

[0022] IMF1=x-r1 (3)

[0023] Where: r1 is the first residual component; <·> means 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, that is:

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

[0026] IMF2=r1-r2 (5)

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

[0028] 2.1.4) Determine whether the second residual component r2 is a monotonic function. If so, the decomposition is completed and all modes and residual components are output. Otherwise, go to step 2.1.5);

[0029] 2.1.5) Calculate the kth residual component r k and the kth modal component IMF k , until the kth residual component is a monotonic function, output all modes and residual components; k ≥ 3

[0030] The kth residual component r k and the kth modal component IMF k As shown below:

[0031]

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

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

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

[0035] 2.2.1) Select the wavelet basis function and the number of decomposition levels to perform multi-scale wavelet decomposition on the 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 as follows:

[0038]

[0039] In the formula, ω j,k is the wavelet coefficient before quantization; λ is the threshold, sgn() sign function, parameter p∈(0,λ); is the wavelet coefficient after processing;

[0040] 2.2.3) Use inverse wavelet transform to reconstruct the processed coefficients into the denoised signal, and get:

[0041]

[0042] Among them, h i [n] is the wavelet function, * represents the convolution operation, C i [n] is the wavelet coefficient. X[n] is the signal after noise reduction.

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

[0044]

[0045] Among them, 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 the position 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] Among them, ω0 is the frequency parameter that controls the frequency of the wavelet function, i is the imaginary unit, π is the circumference of a circle, and t is the time.

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

[0050] 4.1) Input the time-frequency image into the Swin Transformer unit of the SwinTGAM network model to extract the 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) Fusing the local features and global spatial features of the time-frequency image, adaptively averaging and pooling, and flattening the fused features into a one-dimensional vector form;

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

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

[0055] 4.1.1) Use the Patch Partition layer to split the time-frequency image of dimension H×W×3 into N independent non-overlapping images of dimension The image block;

[0056] 4.1.2) Project the image block to any dimension C through Linear Embedding, so that the dimension of the image block is Convert to

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

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

[0059] 4.1.5) Set the dimension to The image block is input into the Swin Transformer block, which performs layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations in sequence, and outputs the processed image block through MLP;

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

[0061] 4.1.7) Set the dimension to The image block is input into the Swin Transformer block, which performs layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations in sequence, and outputs the processed image block through MLP;

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

[0063] 4.1.9) Set the dimension to The image block is input into the Swin Transformer block, and layer normalization, window multi-head self-attention mechanism calculation, normalization, window moving multi-head self-attention mechanism calculation operations are performed in sequence, and the local features of the time-frequency image are output through MLP.

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

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

[0066] Assume that the input feature map is F GAM1 , calculate the intermediate features:

[0067]

[0068] Among them, M c represents the channel attention operation; M S represents spatial attention operation; F GAM2 is the intermediate feature map; F GAM1 is the input; F GAM3 is the global spatial feature of the time-frequency image.

[0069] The technical effect of the present invention is unquestionable. The present invention combines the time-frequency analysis method based on signal decomposition and noise reduction with the network model based on Swin Transformer and GAM-Attention mechanism, aiming to improve the accuracy of rotating machinery fault diagnosis. The model of this scheme can generate low-noise, high-resolution two-dimensional time-frequency images from the original vibration signal, and effectively extract and fuse features at different levels in the image, thereby improving the performance and generalization ability of the model and realizing accurate diagnosis of rotating machinery faults.

[0070] The present invention integrates deep learning models and signal processing technology, so that the model has strong robustness and high accuracy when facing signals containing strong noise.

[0071] The present invention innovatively combines the global attention mechanism and the window attention mechanism when extracting time-frequency graph features, which optimizes the model performance and improves the convergence speed and generalization ability of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1 It is a flow chart of the present invention;

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

[0074] Figure 3 The SwinTGAM network model structure diagram of step S3 of the present invention;

[0075] Figure 4 It is the training set accuracy and loss function iteration curve in the embodiment of the present invention;

[0076] Figure 5 This is the result of feature visualization in the embodiment of the present invention. DETAILED DESCRIPTION

[0077] The present invention is further described below in conjunction with the embodiments, but it should not be understood that the above subject matter of the present invention is limited to the following embodiments. Without departing from the above technical ideas of the present invention, various substitutions and changes are made according to the common technical knowledge and customary means in the art, which should all be included in the protection scope of the present invention.

[0078] Embodiment 1:

[0079] See also Figures 1 to 5 , a rotating machinery fault diagnosis method suitable for strong noise background, comprising the following steps:

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

[0081] 2) De-noise the vibration acceleration signal, generate time-frequency diagrams with fault type labels, and divide these time-frequency diagrams into a training set and a test set for rotating machinery faults;

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

[0083] 4) Use the rotating machinery fault training set to train the SwinTGAM network model;

[0084] 5) Use the rotating machinery fault test set to test the trained SwinTGAM network model. If the test is qualified, proceed to step 6), otherwise, return to step 1);

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

[0086] 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).

[0087] In step 2), the step of performing noise reduction processing on the vibration acceleration signal includes:

[0088] 2.1) The vibration acceleration signal is decomposed using the 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 denoised signal to generate time-frequency diagrams under different fault type labels.

[0091] In step 2.1), the step of decomposing the vibration acceleration signal includes:

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

[0093]

[0094] Where: is the first signal constructed; x is the vibration acceleration signal; σ1 is the expected signal-to-noise ratio of the first decomposition signal, ω (i) is the i-th Gaussian white noise added; E1(·) is the first IMF obtained by 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, that is:

[0096]

[0097] IMF1=x-r1 (3)

[0098] Where: r1 is the first residual component; <·> means 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, that is:

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

[0101] IMF2=r1-r2 (5)

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

[0103] 2.1.4) Determine whether the second residual component r2 is a monotonic function. If so, the decomposition is completed and all modes and residual components are output. Otherwise, go to step 2.1.5);

[0104] 2.1.5) Calculate the kth residual component r k and the kth modal component IMF k , until the kth residual component is a monotonic function, output all modes and residual components; k ≥ 3

[0105] The kth residual component r k and the kth modal component IMF k As shown below:

[0106]

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

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

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

[0110] 2.2.1) Select the wavelet basis function and the number of decomposition levels to perform multi-scale wavelet decomposition on the 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 as follows:

[0113]

[0114] In the formula, ω j,k is the wavelet coefficient before quantization; λ is the threshold, sgn() sign function, parameter p∈(0,λ); is the wavelet coefficient after processing;

[0115] 2.2.3) Use inverse wavelet transform to reconstruct the processed coefficients into the denoised signal, and get:

[0116]

[0117] Among them, h i [n] is the wavelet function, * represents the convolution operation, C i [n] is the wavelet coefficient. X[n] is the signal after noise reduction.

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

[0119]

[0120] Among them, 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 the position 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] Among them, ω0 is the frequency parameter that controls the frequency of the wavelet function, i is the imaginary unit, π is the circumference of a circle, and t is the time.

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

[0125] 4.1) Input the time-frequency image into the Swin Transformer unit of the SwinTGAM network model to extract the 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) Fusing the local features and global spatial features of the time-frequency image, adaptively averaging and pooling, and flattening the fused features into a one-dimensional vector form;

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

[0129] In step 4.1), the step of extracting local features of the time-frequency image includes:

[0130] 4.1.1) Use the Patch Partition layer to split the time-frequency image of dimension H×W×3 into N independent non-overlapping images of dimension The image block;

[0131] 4.1.2) Project the image block to any dimension C through Linear Embedding, so that the dimension of the image block is Convert to

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

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

[0134] 4.1.5) Set the dimension to The image block is input into the Swin Transformer block, which performs layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations in sequence, and outputs the processed image block through MLP;

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

[0136] 4.1.7) Set the dimension to The image block is input into the Swin Transformer block, which performs layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations in sequence, and outputs the processed image block through MLP;

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

[0138] 4.1.9) Set the dimension to The image block is input into the Swin Transformer block, and layer normalization, window multi-head self-attention mechanism calculation, normalization, window moving multi-head self-attention mechanism calculation operations are performed in sequence, and the local features of the time-frequency image are output through MLP.

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

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

[0141] Assume that the input feature map is F GAM1 , calculate the intermediate features:

[0142]

[0143] Among them, M c represents the channel attention operation; M S represents spatial attention operation; F GAM2 is the intermediate feature map; F GAM1is the input; F GAM3 is the global spatial feature of the time-frequency image.

[0144] Embodiment 2:

[0145] A method for diagnosing rotating machinery faults under strong noise background comprises the following steps:

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

[0147] 2) De-noise the vibration acceleration signal, generate time-frequency diagrams with fault type labels, and divide these time-frequency diagrams into a training set and a test set for rotating machinery faults;

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

[0149] 4) Use the rotating machinery fault training set to train the SwinTGAM network model;

[0150] 5) Use the rotating machinery fault test set to test the trained SwinTGAM network model. If the test is qualified, proceed to step 6), otherwise, return to step 1);

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

[0152] Embodiment 3:

[0153] A method for diagnosing rotating machinery faults under a strong noise background, the technical content of which is the same as that of Example 2, and further, 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] Embodiment 4:

[0155] A method for diagnosing a rotating machinery fault under a strong noise background, the technical content of which is the same as any one of Embodiments 2-3, further, in step 2), the step of performing noise reduction processing on the vibration acceleration signal comprises:

[0156] 2.1) The vibration acceleration signal is decomposed using the 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 denoised signal to generate time-frequency diagrams under different fault type labels.

[0159] Embodiment 5:

[0160] A method for diagnosing rotating machinery faults under strong noise background, the technical content of which is the same as any one of Embodiments 2-4, further, in step 2.1), the step of decomposing the vibration acceleration signal comprises:

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

[0162]

[0163] Where: is the first signal constructed; x is the vibration acceleration signal; σ1 is the expected signal-to-noise ratio of the first decomposition signal, ω (i) is the i-th added Gaussian white noise; E1(·) is the first IMF obtained by EMD decomposition;

[0164] 2.1.2) Calculate the first residual component and the first modal component IMF1, that is:

[0165]

[0166] IMF1=x-r1 (3)

[0167] Where: r1 is the first residual component; <·> means 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, that is:

[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 so, the decomposition is completed and all modes and residual components are output. Otherwise, go to step 2.1.5);

[0172] 2.1.5) Calculate the kth residual component r k and the kth modal component IMF k , until the kth residual component is a monotonic function, output all modes and residual components; k ≥ 3

[0173] The kth residual component rk and the kth modal component IMF k As shown below:

[0174]

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

[0176] Embodiment 6:

[0177] A method for diagnosing rotating machinery faults under strong noise background, the technical content of which is the same as any one of Embodiments 2-5, further, 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 comprises:

[0178] 2.2.1) Select the wavelet basis function and the number of decomposition levels to perform multi-scale wavelet decomposition on the 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 as follows:

[0181]

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

[0183] 2.2.3) Use inverse wavelet transform to reconstruct the processed coefficients into the denoised signal, and get:

[0184]

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

[0186] Embodiment 7:

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

[0188]

[0189] Among them, 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 the position in the frequency domain;

[0190] Wavelet basis functions As shown below:

[0191]

[0192] Among them, ω0 is the frequency parameter that controls the frequency of the wavelet function, i is the imaginary unit, and π is the circumference of a circle.

[0193] Embodiment 8:

[0194] A method for diagnosing rotating machinery faults under strong noise background, the technical content of which is the same as any one of Embodiments 2-7, further, in step 4), the step of training the SwinTGAM network model using the rotating machinery fault training set comprises:

[0195] 4.1) Input the time-frequency image into the Swin Transformer unit of the SwinTGAM network model to extract the 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) Fusing the local features and global spatial features of the time-frequency image, adaptively averaging and pooling, and flattening the fused features into a one-dimensional vector form;

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

[0199] Embodiment 9:

[0200] A method for diagnosing rotating machinery faults under strong noise background, the technical content of which is the same as any one of Embodiments 2-8, further, in step 4.1), the step of extracting local features of the time-frequency image comprises:

[0201] 4.1.1) Use the Patch Partition layer to split the time-frequency image of dimension H×W×3 into N independent non-overlapping images of dimension The image block;

[0202] 4.1.2) Project the image block to any dimension C through Linear Embedding, so that the dimension of the image block is Convert to

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

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

[0205] 4.1.5) Set the dimension to The image block is input into the Swin Transformer block, which performs layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations in sequence, and outputs the processed image block through MLP;

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

[0207] 4.1.7) Set the dimension to The image block is input into the Swin Transformer block, which performs layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations in sequence, and outputs the processed image block through MLP;

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

[0209] 4.1.9) Set the dimension to The image block is input into the Swin Transformer block, and layer normalization, window multi-head self-attention mechanism calculation, normalization, window moving multi-head self-attention mechanism calculation operations are performed in sequence, and the local features of the time-frequency image are output through MLP.

[0210] Embodiment 10:

[0211] A method for diagnosing rotating machinery faults under a strong noise background, the technical content of which is the same as any one of Examples 2-9, and further, the convolutional pooling network includes 3 convolutional layers and 3 pooling layers, and the convolutional layers and the pooling layers obtain channel attention features and spatial attention features through a channel attention module and a spatial attention module respectively.

[0212] Embodiment 11:

[0213] A method for diagnosing rotating machinery faults under strong noise background, the technical content 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 that the input feature map is F GAM1 , calculate the intermediate features:

[0215]

[0216] Among them, M c represents the channel attention operation; M S represents spatial attention operation; F GAM2 is the intermediate feature map; f GAM1 is the input; F GAM3 is the global spatial feature of the time-frequency image.

[0217] Embodiment 12:

[0218] A method for fault diagnosis of rotating machinery under strong noise background, the steps are as follows:

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

[0220] S2, signal processing: noise reduction processing is performed on the collected vibration acceleration signal, and a time-frequency diagram is generated, and the time-frequency diagram is divided into a training set and a test set according to the data label;

[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: with sampling frequency f s The vibration acceleration data of the rotating mechanical equipment to be diagnosed is collected, the faults of the rotating mechanical equipment are diagnosed using the trained SwinTGAM network model, and the diagnosis results are output.

[0223] The collected vibration acceleration signal is subjected to noise reduction processing and a time-frequency diagram is generated. The specific steps include:

[0224] S21, using an improved fully adaptive noise ensemble empirical mode decomposition (ICEEMDAN) algorithm to obtain IMFs components;

[0225] S22, calculating the sample entropy of each IMFs component, using the wavelet denoising algorithm with an improved threshold function to denoise the IMFs components whose sample entropy is greater than 0.1, and then reconstructing the signal;

[0226] S23, transforming the noise-reduced signal through continuous wavelet transform (CWT) to generate a time-frequency diagram under each label.

[0227] The step of using the ICEEMDAN algorithm to process the vibration signal to obtain the IMFs component in S21 includes:

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

[0229]

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

[0231] Compute the first residual component:

[0232]

[0233] Where: r1 is the first residual component; <·> means taking the average value.

[0234] Calculate the first modal component IMF1:

[0235] IMF1=x-r1

[0236] Add Gaussian white noise to the first residual component r1, and calculate the second group of residual components r2 and the second group of modal components IMF2:

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

[0238] IMF2=r1-r2

[0239] By analogy, find the kth (k≥2) modal component and the kth (k≥2) residual component:

[0240]

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

[0242] Continue iterating r k Until it becomes a monotonic function, the decomposition is completed and all modes and residual components are generated.

[0243] The step of using the wavelet denoising algorithm with an improved threshold function to denoise the IMFs component whose sample entropy is greater than 0.1 in S22 includes:

[0244] Select appropriate wavelet basis functions and decomposition layers to perform multi-scale wavelet decomposition on the IMFs components to obtain a series of high-frequency wavelet coefficients of each scale; these high-frequency wavelet coefficients are processed using appropriate thresholds and threshold functions to remove noise. Among them, the threshold function selects the improved threshold wavelet function. The expression of the improved threshold function is:

[0245]

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

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

[0248]

[0249] where h i [n] is the wavelet function, * represents the convolution operation, C i [n] is the wavelet coefficient.

[0250] The specific steps of converting the noise-reduced signal through CWT to generate the time-frequency diagram under each label are as follows:

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

[0252]

[0253] Among them, 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 the position in the frequency domain; It is called wavelet basis function, and its expression is as follows:

[0254]

[0255] The characteristics of the bearing vibration signal are analyzed by using Morlet wavelet as the basis function of continuous wavelet transform. Specifically, the expression of Morlet wavelet is usually:

[0256]

[0257] Among them, ω0 is the frequency parameter that controls the frequency of the wavelet function, i is the imaginary unit, and π is the circumference of a circle.

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

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

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

[0261] S33, fusing the time-frequency graph features obtained in S31 and S32, performing adaptive average pooling, and flattening them into a one-dimensional vector form;

[0262] S34. The flattened fusion features are passed through the fully connected layer and the Softmax classifier in turn, and the result label is output.

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

[0264] The time-frequency image H×W×3 is divided into N independent image blocks that do not overlap each other through the Patch Partition layer, where H is the image height and W is the image width.<H×W×3> Convert to This vector is then projected to an arbitrary dimension C through Linear Embedding, so that the image is transformed from the dimension Convert to Then it is input into the Swin Transformer block: each time, the layer normalization process is first performed, and then the window multi-head self-attention mechanism (W-MSA) is calculated, and then normalization is performed again. After passing through a feedforward network, the window moving multi-head self-attention mechanism (SW-MSA) is calculated to increase the information interaction between windows. The result is output through MLP, and Stage 1 is completed. The algorithm is divided into 4 stages. The subsequent stage contains two parts, namely the Patch Merging layer and the Swin Transformer block. As the network goes deeper, in the subsequent stage, the patch feature map input to the Patch Merging layer is divided into 2×2, and the dimensions obtained are After being processed by the SwinTransformer block, the local features of the time-frequency image are obtained.

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

[0266] Assume that the input feature map is F GAM1 , calculate the intermediate features:

[0267]

[0268] Among them, M c Represents the channel attention operation. This operation calculates the channel attention weight through a two-layer multi-layer perceptron (MLP) structure and compares it with the input feature F GAM1 Multiply element-wise to generate the intermediate feature F GAM2 The channel attention module generates channel attention features by performing encoder-decoder structure processing on the input feature map.

[0269] Calculate output features:

[0270]

[0271] Among them, M S represents the spatial attention operation. This operation fuses the spatial information through two convolutional layers and performs GAM2 Processed to generate spatial attention features F GAM3 The spatial attention module first integrates and compresses the feature map through 3×3 convolution, then projects and reduces the dimension of the intermediate state feature map, and finally generates the spatial attention map using 3×3 expanded convolution.

[0272] The S33 performs adaptive average pooling after fusing the features obtained by S31 and S32. The main steps are to calculate the size of each pooling window and the average value of each window area in the feature map, and finally adaptively pool the input feature map to the target output size.

[0273] Embodiment 13:

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

[0275] S1. Establish a data set: with sampling frequency f sThe vibration acceleration signals of rotating mechanical equipment under various working conditions are collected, and data labels are set according to the fault type to establish a sample data set. Please refer to Table 1. This embodiment selects the rolling bearing data set of Case Western Reserve University in the United States, and specifically selects the acceleration data of the drive end bearing 6205-2RS JEM SKF. Each sample contains 2048 sampling points, and a total of 10 labels are set, each label contains 50 samples, and a total of 500 samples.

[0276] Table 1

[0277]

[0278]

[0279] S2, Signal Processing: See Figure 2 , the collected vibration acceleration signal is processed by ICEEMDAN algorithm to obtain IMFs components; the sample entropy of each IMFs component is calculated, and the wavelet denoising algorithm with improved threshold function is used to denoise the IMFs components with sample entropy greater than 0.1 and reconstruct the signal; finally, CWT is used to generate the time-frequency diagram. The time-frequency diagram is randomly divided into training set and test set according to the data label, of which the training set accounts for 70% and the test set accounts for 30%.

[0280] S3, Model construction: see Figure 3 , construct the SwinTGAM network model. In the Swin Transformer branch, Patch Partition is implemented through a two-dimensional convolution layer. After Patch Partition processing, the time-frequency graph is divided into multiple small blocks of size 4×4; the number of stacked Swin Transformer blocks in Stage1, Stage2, Stage3, and Stage4 are 2, 2, 6, and 2 respectively, the number of heads of 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. The convolution pooling network branch based on GAM-Attention includes 3 convolution layers with a convolution kernel of 3×3, a step size of 1, the number of output channels of the first convolution layer is 16, the number of output channels of the second convolution layer is 32, and the number of output channels of the third convolution layer is 64. The fused features are passed through the fully connected layer and the Softmax classifier in turn after the flattened fusion features to obtain the bearing fault classification results. When training the model, the learning rate of the sample is 0.01, the number of iterations is set to 100, and the number of samples used in each iteration is 10.

[0281] The activation function of the model uses GELU.

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

[0283]

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

[0285] To verify the feature extraction capability of the model, this example introduces t-distributed stochastic neighbor embedding (t-SNE) to visualize the features of the data. Figure 5 , 10 different colors represent the fault labels 0-9 in the dataset.

Claims

1. A method for fault diagnosis of rotating machinery under strong noise background, characterized in that: The following steps are involved: 1) Collect vibration acceleration signals of rotating machinery under different working conditions and set fault type labels; 2) De-noise the vibration acceleration signal, generate time-frequency diagrams with fault type labels, and divide these time-frequency diagrams into a training set and a test set for rotating machinery faults; 3) Construct a SwinTGAM network model based on the fusion attention mechanism; 4) Use the rotating machinery fault training set to train the SwinTGAM network model; 5) Use the rotating machinery fault test set to test the trained SwinTGAM network model. If the test is qualified, proceed to step 6), otherwise, return to step 1); 6) Collect the vibration acceleration data of the rotating machinery to be diagnosed and input it into the SwinTGAM network model that has passed the test to obtain the rotating machinery fault diagnosis results.

2. A rotating machinery fault diagnosis method suitable for strong noise background according to claim 1, characterized in that: 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. A rotating machinery fault diagnosis method suitable for strong noise background according to claim 1, characterized in that: In step 2), the step of performing noise reduction processing on the vibration acceleration signal includes: 2.1) The vibration acceleration signal is decomposed using the 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 continuous wavelet transform method is used to transform the denoised signal to generate time-frequency diagrams under different fault type labels.

4. A rotating machinery fault diagnosis method suitable for strong noise background according to claim 3, characterized in that: In step 2.1), the step of decomposing the vibration acceleration signal includes: 2.1.1) Add Gaussian white noise ω to the vibration acceleration signal (i) ,get: Where: is the first signal constructed; x is the vibration acceleration signal; σ1 is the expected signal-to-noise ratio of the first decomposition signal, ω (i) is the i-th Gaussian white noise added; E1(·) is the first IMF obtained by EMD decomposition; N is the number of Gaussian white noises; 2.1.2) Calculate the first residual component and the first modal component IMF1, that is: IMF1=x-r1 (3) Where: r1 is the first residual component; <·> means 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, that is: r2=<(r1+σ2E2(ω (i) ))> (4) IMF2=r1-r2 (5) Where σ2 is the expected signal-to-noise ratio of the second decomposition signal, and E2(·) is the IMF obtained by EMD decomposition; 2.1.4) Determine whether the second residual component r2 is a monotonic function. If so, the decomposition is completed and all modes and residual components are output. Otherwise, go to step 2.1.5); 2.1.5) Calculate the kth residual component r k and the kth modal component IMF k , until the kth residual component is a monotonic function, output all modes and residual components; k ≥ 3 The kth residual component r k and the kth modal component IMF k As shown below: IMF k =r k-1 -r k (7) In the formula, E k (·) is the IMF obtained by EMD decomposition; r k-1 is the k-1th residual component.

5. The method for diagnosing rotating machinery faults under strong noise background according to claim 3, characterized in that: In step 2.2), the steps of using the wavelet denoising algorithm with an improved threshold function to denoise and reconstruct the IMFs components whose sample entropy is greater than 0.1 include: 2.2.1) Select the wavelet basis function and the number of decomposition levels to perform multi-scale wavelet decomposition on the 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; The threshold function As shown below: In the formula, ω j,k is the wavelet coefficient before quantization; λ is the threshold, sgn() sign function, parameter p∈(0,λ); is the wavelet coefficient after processing; 2.2.3) Use inverse wavelet transform to reconstruct the processed coefficients into the denoised signal, and get: Among them, h i [n] is the wavelet function, * represents the convolution operation, C i [n] is the wavelet coefficient; X[n] is the signal after denoising.

6. A rotating machinery fault diagnosis method suitable for strong noise background according to claim 3, characterized in that: In step 2.3), the continuous wavelet transform is defined as: Among them, 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 the position in the frequency domain; x(t), X ∞ (u,v) represent the parameters before and after the transformation respectively; Wavelet basis functions As shown below: Among them, ω0 is the frequency parameter that controls the frequency of the wavelet function, i is the imaginary unit, π is the circumference of a circle, and t is the time.

7. The method for diagnosing rotating machinery faults under strong noise background according to claim 1, characterized in that: In step 4), the steps of training the SwinTGAM network model using the rotating machinery fault training set include: 4.1) Input the time-frequency image into the Swin Transformer unit of the SwinTGAM network model to extract the 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) Fusing the local features and global spatial features of the time-frequency image, adaptively averaging and pooling, and flattening the fused features into a one-dimensional vector form; 4.3) The flattened fusion features are input into the fully connected layer and the Softmax classifier in turn to obtain the fault type label.

8. A rotating machinery fault diagnosis method suitable for strong noise background according to claim 7, characterized in that: In step 4.1), the step of extracting local features of the time-frequency image includes: 4.1.1) Use the Patch Partition layer to split the time-frequency image of dimension H×W×3 into N independent non-overlapping images of dimension The image block; 4.1.2) Project the image block to any dimension C through Linear Embedding, so that the dimension of the image block is Convert to 4.1.3) Input the transformed image block into the Swin Transformer block, perform layer normalization, window multi-head self-attention mechanism calculation, normalization, window moving multi-head self-attention mechanism calculation operations in sequence, and output the processed image block through MLP; 4.1.4) Input the image block processed in step 4.1.3) into the Patch Merging layer to obtain a dimension of The image block; 4.1.5) Set the dimension to The image block is input into the Swin Transformer block, which performs layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations in sequence, and outputs the processed image block through MLP; 4.1.6) Input the image block processed in step 4.1.5) into the Patch Merging layer to obtain a dimension of The image block; 4.1.7) Set the dimension to The image block is input into the Swin Transformer block, which performs layer normalization, window multi-head self-attention mechanism calculation, normalization, and window moving multi-head self-attention mechanism calculation operations in sequence, and outputs the processed image block through MLP; 4.1.8) Input the image block processed in step 4.1.7) into the Patch Merging layer to obtain a dimension of The image block; 4.1.9) Set the dimension to The image block is input into the Swin Transformer block, and layer normalization, window multi-head self-attention mechanism calculation, normalization, window moving multi-head self-attention mechanism calculation operations are performed in sequence, and the local features of the time-frequency image are output through MLP.

9. A rotating machinery fault diagnosis method suitable for strong noise background according to claim 7, characterized in that: The convolutional pooling network includes 3 convolutional layers and 3 pooling layers. The convolutional layers and the pooling layers obtain channel attention features and spatial attention features through the channel attention module and the spatial attention module respectively.

10. The method for diagnosing rotating machinery faults under strong noise background according to claim 1, characterized in that: The global spatial features of the time-frequency image extracted in 4.1) are as follows: Assume that the input feature map is F GAM1 , calculate the intermediate features: Among them, M c represents the channel attention operation; M S represents spatial attention operation; F GAM2 is the intermediate feature map; F GAM1 is the input; F GAM3 is the global spatial feature of the time-frequency image.

Citation Information

Patent Citations

  • Fault diagnosis method for rolling bearing

    CN115060494A

  • Noise robust bearing fault diagnosis method based on interpretable multilayer wavelet driving

    CN116256174A

  • Rotary machinery fault diagnosis method based on improved deep residual shrinkage network

    CN117313003A

  • Self-adaptive deep migration fault diagnosis method, system and device and medium

    CN118094218A

  • Rotary machinery fault diagnosis method and system based on improved EEMD and generative adversarial network

    CN118395364A

Cited By

  • Self-adaptive multi-scale earthquake high-resolution processing method fusing time-frequency characteristics

    CN121276597A

  • Fault diagnosis method and system for rotating machinery

    CN121459024A

  • Planetary gearbox small sample fault diagnosis method based on MDGSAM and Swin Transformer

    CN122336443A

  • A Small Sample Fault Diagnosis Method for Planetary Gearboxes Based on MDGSAM and Swing Transformer

    CN122336443B