Novel Shift-Deformable Transform rolling bearing fault diagnosis method and system
By introducing a multi-attention fusion Shift-Deformable Transformer network model in rolling bearing fault diagnosis, the problem of low detection accuracy in the existing technology is solved, and the accurate diagnosis of composite faults is achieved, which improves the accuracy rate and reduces the amount of parameters. A diagnostic plan for rapid convergence.
Patent Information
- Application Number
- CN202411106970.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-11-22
Smart Images

Figure CN119000087A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of mechanical bearing fault diagnosis, and in particular relates to a novel Shift-DeformableTransformer rolling bearing fault diagnosis method and system. Background Art
[0002] Mechanical fault diagnosis technology is a technology that can understand and master the state of the machine during operation, detect faults and their causes at an early stage, and predict the development trend of faults. Since the operating environment of rolling bearings is generally closed, complex and changeable, rolling bearings are very fragile, and their health status affects the performance, stability and life cycle of the entire rotating machinery. Health detection and accurate diagnosis of rolling bearings can minimize maintenance costs and avoid major safety accidents. Therefore, rolling bearing fault diagnosis is an important research direction in the field of industrial equipment maintenance.
[0003] At present, signal processing algorithms include traditional signal processing methods and deep learning signal processing methods. Traditional signal processing methods have the problems of low detection accuracy and difficult signal extraction. Deep learning is popular because it can automatically learn deep features, does not need to design complex feature extraction methods, and greatly improves diagnostic performance. Summary of the invention
[0004] In view of the practical application limitations and low precision of the prior art, the present invention proposes a new Shift-Deformable Transformer rolling bearing fault diagnosis method and system. Taking into account the extensiveness of the attention receptive field of VisionTransformer and Swin transformer, a multi-attention fusion Shift-Deformable Transformer (S-DT) network model is proposed to achieve accurate diagnosis of complex faults.
[0005] To achieve the above object, the present invention provides the following solutions:
[0006] A novel Shift-Deformable Transformer rolling bearing fault diagnosis method includes the following steps:
[0007] The vibration signal of the rolling bearing is transformed into a time-frequency diagram through continuous wavelet transform (CWT);
[0008] Construct a dilated convolution residual efficient feature extraction block and cross-space learning efficient attention to enhance low-level local features;
[0009] The conversion window attention and deformable attention are fused into SD Attention to learn global features;
[0010] Based on the enhanced low-level local features and global features, a multi-attention fusion Shift-DeformableTransformer network model is constructed;
[0011] The time-frequency diagram representation is input into the multi-attention fusion Shift-Deformable Transformer network model, and the rolling bearing fault diagnosis result is obtained through the classifier.
[0012] Preferably, the method of converting the vibration signal of the rolling bearing into a time-frequency diagram representation by continuous wavelet transform CWT includes:
[0013] The one-dimensional time series signal of rolling bearing is represented as a two-dimensional color wavelet frequency graph.
[0014] Preferably, the multi-attention fusion Shift-Deformable Transformer network model includes two parts: EFEBlock and SWDA-Transformer.
[0015] Preferably, the EFE Block includes: depthwise separable convolution + maximum pooling layer + dilated residual block and EMSA.
[0016] Preferably, SWDA-Transformer contains a total of 4 stages. Except for the first stage, each stage will first reduce the resolution of the input feature map through the Patch Merging layer and perform downsampling operations. The specific structure of EncoderBlock in the Stage is that in the Encoder Block in Stage3 and Stage4, the front attention is Shifting WindowMulti head Self Attention, namely SW-MSA, followed by deformable multi-head attention D-MSA; while Stage1 and Stage2 are still Window Multi head Self Attention, namely W-MSA and SW-MSA in Swin transformer, and these modules are used alternately in each Stage; among them, the deformable multi-head attention DA is integrated into the EncoderBlock Structure.
[0017] The present invention also provides a novel Shift-Deformable Transformer rolling bearing fault diagnosis system, comprising: a transformation module, an enhancement module, a learning module, a construction module and a diagnosis module;
[0018] The conversion module is used to convert the vibration signal of the rolling bearing into a time-frequency diagram representation through continuous wavelet transform CWT;
[0019] The enhancement module is used to construct a hole convolution residual efficient feature extraction block and a cross-space learning efficient attention to perform low-level local feature enhancement;
[0020] The learning module is used to fuse the conversion window attention and the deformable attention into SD Attention to learn the global features;
[0021] The building module is used to build a multi-attention fusion Shift-Deformable Transformer network model based on enhanced low-level local features and global features;
[0022] The diagnosis module is used to input the time-frequency diagram representation into the multi-attention fusion Shift-Deformable Transformer network model, and obtain the rolling bearing fault diagnosis result through the classifier.
[0023] Preferably, the process of converting the vibration signal of the rolling bearing into a time-frequency diagram representation by continuous wavelet transform CWT includes:
[0024] The one-dimensional time series signal of rolling bearing is represented as a two-dimensional color wavelet frequency graph.
[0025] Preferably, the multi-attention fusion Shift-Deformable Transformer network model includes two parts: EFEBlock and SWDA-Transformer.
[0026] Preferably, the EFE Block includes: depthwise separable convolution + maximum pooling layer + dilated residual block and EMSA.
[0027] Preferably, SWDA-Transformer contains a total of 4 stages. Except for the first stage, each stage will first reduce the resolution of the input feature map through the Patch Merging layer and perform downsampling operations. The specific structure of EncoderBlock in the Stage is that in the Encoder Block in Stage3 and Stage4, the front attention is Shifting WindowMulti head Self Attention, namely SW-MSA, followed by deformable multi-head attention D-MSA; while Stage1 and Stage2 are still Window Multi head Self Attention, namely W-MSA and SW-MSA in Swin transformer, and these modules are used alternately in each Stage; among them, the deformable multi-head attention DA is integrated into the EncoderBlock Structure.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] The present invention first converts the vibration signal into a time-frequency graph representation through continuous wavelet transform (CWT); secondly, it constructs a dilated convolution residual block and efficient attention for cross-space learning to enhance low-level local features; then it fuses the conversion window attention and deformable attention into SD Attention, whose receptive field is more focused to accurately learn global features, and finally realizes accurate diagnosis of complex faults through a classifier. Experiments were conducted on self-collected data sets and public data sets. The experimental results show that the proposed S-DT network performs well in all cases. With a slight reduction in the number of parameters, the verification accuracy is improved by more than 2%, and the training network converges quickly, providing an effective solution for the analysis and processing of motor vibration signals. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0031] Figure 1 A schematic flow chart of a novel Shift-Deformable Transformer rolling bearing fault diagnosis method according to an embodiment of the present invention;
[0032] Figure 2 It is a confusion matrix diagram of each model in the embodiment of the present invention under the ScD data set;
[0033] Figure 3 This is a TSNE visualization diagram of each model in the embodiment of the present invention under the ScD dataset. DETAILED DESCRIPTION
[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0035] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0036] Embodiment 1
[0037] like Figure 1 As shown, the present invention provides a novel Shift-Deformable Transformer rolling bearing fault diagnosis method, comprising the following steps:
[0038] The vibration signal of the rolling bearing is transformed into a time-frequency diagram through continuous wavelet transform (CWT);
[0039] Construct a dilated convolution residual efficient feature extraction block and cross-space learning efficient attention to enhance low-level local features;
[0040] The conversion window attention and deformable attention are fused into SD Attention to learn global features;
[0041] Based on the enhanced low-level local features and global features, a multi-attention fusion Shift-DeformableTransformer network model is constructed;
[0042] The time-frequency diagram representation is input into the multi-attention fusion Shift-Deformable Transformer network model, and the rolling bearing fault diagnosis result is obtained through the classifier.
[0043] In this embodiment, the multi-attention fusion Shift-Deformable Transformer network model includes two parts: an efficient feature extraction block (EFE Block) and a SWDA-Transformer.
[0044] Among them, EFE Block includes: depthwise separable convolution + maximum pooling layer + hole residual block and efficient multi-scale spatial attention module (EMSA).
[0045] Depthwise separable convolution is a fusion of channel-by-channel convolution and point-by-point convolution. It splits the feature map into individual channels, performs single-channel convolution on them separately, and then stacks them back together. In this calculation process, one convolution kernel is responsible for one channel, and one channel is convolved by only one convolution kernel, which significantly reduces the amount of calculation.
[0046] The function of the maximum pooling layer is to reduce dimensionality, reduce the number of parameters, remove redundant information, compress features, simplify network complexity, reduce calculation amount, reduce memory consumption, alleviate overfitting, etc.
[0047] The dilated residual block extends the receptive field of the convolution kernel by introducing dilated convolution, which means that the convolution kernel of the same size can obtain a wider range of input information. The residual block can avoid the problem of gradient vanishing. The dilated convolution increases the receptive field by inserting zero elements. This property makes the network more sparse without increasing the number of parameters. Therefore, it can use parameters more effectively, reduce the number of parameters that need to be trained, and reduce the risk of overfitting.
[0048] Among them, Deformable Attention (DA) with a deformable mechanism was born. Deformable attention is a spatial adaptive mechanism that uses a powerful and simple design to learn a set of global keys shared between visual patches. Integrate Deformable Multi-Head Attention (DA) into the Encoder Block Structure. SWDA-Transformer contains a total of 4 stages. Except for the first stage, each stage will first reduce the resolution of the input feature map through the Patch Merging layer and perform downsampling operations. The specific structure of the Encoder Block in the Stage is that in the EncoderBlock in Stage3 and Stage4, the front attention is Shifting Window Multi head Self Attention (SW-MSA), followed by Deformable Multi-Head Attention (D-MSA); while Stage1 and Stage2 are still Window Multihead Self Attention (W-MSA) and SW-MSA in the Swin transformer, and these modules are used alternately in each Stage.
[0049] Specifically, implementing deformable attention requires three steps: Learn deformable offset, Sampling deformed feature maps, and Calculate attention with relative position.
[0050] 1. Learning Deformable Offsets
[0051] For the input feature map After uniform sampling, grouping is performed to obtain a point grid On the other side, a 1x1 convolution is performed on the input to calculate the query. The query is used directly for multi-head attention and for calculating (offset) θ. offset , which is the core of the attention. The Offset network consists of a 5×5 DW convolution, a GeLU activation function, and a 1x1 convolution; θ offset Including the horizontal and vertical coordinates, the Offset network output size is H / g×W / g×2. In addition, to prevent θ offset Too large, set parameter s to limit it:
[0052] Δp=stanh(θ offset (q))
[0053] Where q represents the reference point; Δp represents the position offset of the sampling point of the attention head relative to the reference point.
[0054] 2. Sampling the deformed feature map
[0055] Add the reference point to the offset and move it to the corresponding position. Select 4 patches adjacent to the reference point and use the sampling function φ(x; (p x ,p y )) to perform bilinear interpolation operations to extract the sampling features of these patches:
[0056]
[0057] r(a,b)=max(0,1-|ab|)
[0058] Among them, (p x ,p y ) is the reference point coordinate; (g x ,g y )yes The position on the surface; (a, b) represents the coordinates of any point; r(p x ,p y) indicates that the reference point (p x ,p y ) is brought into the function r for calculation; r(g x ,g y ) means substituting the point (gx,gy) into the function r for calculation; r(a,b) means substituting the reference point (a,b) into the function r for calculation; a represents the coordinate on the x-axis, and b represents the coordinate on the y-axis.
[0059] 3. Calculating Attention with Relative Position
[0060] Since the 4 patches are displaced with the reference point, the change is non-integer, so these 4 patches are bilinearly interpolated based on the relative position in bedding to determine the exact deformation position to cover all reference points:
[0061]
[0062] in, corresponds to the position before and after embedding; k is the key vector; v is the value vector; d is the dimension of the key vector; represents the position before embedding, and R represents the position after embedding.
[0063] In the network model, the multi-layer perceptron (MLP) is used as a classifier, which consists of MLP full connection + GELU activation function + Dropout.
[0064] The fully connected layer completes the classification task by mapping high-dimensional features to the category space. The fully connected layer performs a linear transformation on the input vector, converts the output into a category probability distribution, and calculates the output through weights and biases. The formula is:
[0065] output = input * weights + bias
[0066] When the GELU input is close to 0, it is similar to a linear transformation, but when the input is large or small, it has nonlinear characteristics. This nonlinear characteristic can help the model better capture the complex relationship between inputs and improve the representation ability of the model.
[0067] The introduction of activation functions also helps solve the problem of vanishing gradients. In deep neural networks, without activation functions, the superposition of multiple linear transformations will still result in a linear transformation, which limits the expressive power of the model.
[0068] Dropout randomly discards a certain proportion of neurons in each training batch, so that each neuron will not be overly dependent on other neurons, making the model more robust and generalizable.
[0069] We collected nine types of fault data and one type of normal data through experiments. The diagnosis results include fault diagnosis classification by extracting ten types of sample features through classifiers.
[0070] Embodiment 2
[0071] The present invention also provides a novel Shift-Deformable Transformer rolling bearing fault diagnosis system, comprising: a transformation module, an enhancement module, a learning module, a construction module and a diagnosis module;
[0072] The conversion module is used to convert the vibration signal of the rolling bearing into a time-frequency diagram through continuous wavelet transform CWT;
[0073] The enhancement module is used to construct the hole convolution residual efficient feature extraction block and the efficient attention of cross-space learning to enhance the low-level local features;
[0074] The learning module is used to fuse the conversion window attention and deformable attention into SD Attention to learn global features;
[0075] The building module is used to construct a multi-attention fusion Shift-Deformable Transformer network model based on enhanced low-level local features and global features;
[0076] The diagnosis module is used to input the time-frequency diagram representation into the multi-attention fusion Shift-DeformableTransformer network model, and obtain the rolling bearing fault diagnosis result through the classifier.
[0077] In this embodiment, the process of converting the vibration signal of the rolling bearing into a time-frequency diagram representation by continuous wavelet transform CWT includes:
[0078] The one-dimensional time series signal of rolling bearing is represented as a two-dimensional color wavelet frequency graph.
[0079] In this embodiment, the multi-attention fusion Shift-Deformable Transformer network model includes two parts: EFE Block and SWDA-Transformer.
[0080] Specifically, EFE Block includes: depthwise separable convolution + maximum pooling layer + dilated residual block and EMSA.
[0081] Specifically, SWDA-Transformer contains a total of 4 stages. Except for the first stage, each stage will first reduce the resolution of the input feature map through the Patch Merging layer and perform downsampling operations. The specific structure of EncoderBlock in the Stage is that in the Encoder Block in Stage3 and Stage4, the front attention is Shifting WindowMulti head Self Attention, namely SW-MSA, followed by deformable multi-head attention D-MSA; while Stage1 and Stage2 are still Window Multi head Self Attention, namely W-MSA and SW-MSA in Swin transformer. These modules are used alternately in each Stage; among them, deformable multi-head attention DA is integrated into the EncoderBlock Structure.
[0082] Embodiment 3
[0083] In order to fully test the performance and versatility of this diagnostic method, this embodiment also uses four different data sets to conduct a large number of experiments, including the Case Western Reserve University (CWRU) bearing data set, the Paderborn University (PU) bearing data set, the Xi'an Jiaotong University gearbox (XJTU-SY) data set, and the self-collected data set (SCD). Figure 2 , 3 .
[0084] In order to fully verify and analyze the performance of the model of the present invention in the rolling bearing fault classification task, four data sets and five commonly used models were compared in ScD. The epoch of each model was set to 200 to ensure that each model had converged. The comparison results are shown in Table 1, where the accuracy curve under the ScD data set is shown in Table 1:
[0085] Table 1 Performance comparison of various network models under ScD dataset
[0086]
[0087] As shown in Table 1, the verification accuracy and F1 of the method of the present invention on ScD are the highest, reaching 94.3% and 94.27% respectively, and the computational complexity and parameter quantity are kept at a low level. Rolling bearing faults have complex timing characteristics. CNN-based methods such as AlexNet, Vgg and InceptionV3 cannot achieve a balance between computational accuracy and parameter quantity because it is difficult to effectively model long-term dependencies. As a Transformer-based model, ViT is slightly inferior to the above-mentioned CNN model in accuracy. This may be because it cannot fully extract key local features in vibration signals. In contrast, Swin Transformer enhances the ability to extract local features, so the accuracy is significantly improved. However, its parameter quantity is higher than that of the method of the present invention, and the computational complexity is similar, but the accuracy still differs by more than 2%.
[0088] The classification accuracy of the model of the present invention on three different data sets is shown in Table 2.
[0089] Table 2 Comparison of classification accuracy of our model on different data sets
[0090]
[0091] As shown in Table 2, on the above datasets, the accuracy and F1 score of the model are very high, but there are some differences between the datasets. On CWRU and XJTU-SY, the performance of this model is very good, and the generalization ability on these two datasets is very strong. On PU, although the accuracy and F1 score of the model are slightly lower than the other two, the values are still very high, indicating that the model has good generalization ability and can adapt to various types of noise and fault types in different datasets.
[0092] Experimental results show that the proposed S-DT network performs well in all cases. With a slight reduction in the number of parameters, the verification accuracy is improved by more than 2%, and the training network converges quickly, providing an effective solution for the analysis and processing of motor vibration signals.
[0093] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A novel Shift-Deformable Transformer rolling bearing fault diagnosis method, characterized in that: The following steps are involved: The vibration signal of the rolling bearing is transformed into a time-frequency diagram through continuous wavelet transform (CWT); Construct a dilated convolution residual efficient feature extraction block and cross-space learning efficient attention to enhance low-level local features; The conversion window attention and deformable attention are fused into SD Attention to learn global features; Based on the enhanced low-level local features and global features, a multi-attention fusion Shift-DeformableTransformer network model is constructed; The time-frequency diagram representation is input into the multi-attention fusion Shift-Deformable Transformer network model, and the rolling bearing fault diagnosis result is obtained through the classifier.
2. The novel Shift-Deformable Transformer rolling bearing fault diagnosis method according to claim 1 is characterized in that: The method of converting the vibration signal of rolling bearing into time-frequency diagram through continuous wavelet transform CWT includes: The one-dimensional time series signal of rolling bearing is represented as a two-dimensional color wavelet frequency graph.
3. The novel Shift-Deformable Transformer rolling bearing fault diagnosis method according to claim 1 is characterized in that: The multi-attention fusion Shift-Deformable Transformer network model consists of two parts: EFEBlock and SWDA-Transformer.
4. The novel Shift-Deformable Transformer rolling bearing fault diagnosis method according to claim 3 is characterized in that: EFE Block includes: depthwise separable convolution + maximum pooling layer + dilated residual block and EMSA.
5. The novel Shift-Deformable Transformer rolling bearing fault diagnosis method according to claim 3 is characterized in that: SWDA-Transformer contains a total of 4 stages. Except for the first stage, each stage will first reduce the resolution of the input feature map through the Patch Merging layer and perform downsampling operations. The specific structure of the EncoderBlock in the Stage is that in the Encoder Block in Stage3 and Stage4, the front attention is Shifting WindowMulti head Self Attention, namely SW-MSA, followed by deformable multi-head attention D-MSA; while Stage1 and Stage2 are still Window Multi head Self Attention, namely W-MSA and SW-MSA in Swin transformer. These modules are used alternately in each Stage; among them, the deformable multi-head attention DA is integrated into the EncoderBlock Structure.
6. A new type of Shift-Deformable Transformer rolling bearing fault diagnosis system, characterized in that: include: transformation module, enhancement module, learning module, construction module and diagnosis module; The conversion module is used to convert the vibration signal of the rolling bearing into a time-frequency diagram representation through continuous wavelet transform CWT; The enhancement module is used to construct a hole convolution residual efficient feature extraction block and a cross-space learning efficient attention to perform low-level local feature enhancement; The learning module is used to fuse the conversion window attention and the deformable attention into SD Attention to learn the global features; The building module is used to build a multi-attention fusion Shift-Deformable Transformer network model based on enhanced low-level local features and global features; The diagnosis module is used to input the time-frequency diagram representation into the multi-attention fusion Shift-DeformableTransformer network model, and obtain the rolling bearing fault diagnosis result through the classifier.
7. The novel Shift-Deformable Transformer rolling bearing fault diagnosis system according to claim 6 is characterized in that: The process of converting the vibration signal of the rolling bearing into a time-frequency diagram through continuous wavelet transform CWT includes: The one-dimensional time series signal of rolling bearing is represented as a two-dimensional color wavelet frequency graph.
8. The novel Shift-Deformable Transformer rolling bearing fault diagnosis system according to claim 6 is characterized in that: The multi-attention fusion Shift-Deformable Transformer network model consists of two parts: EFEBlock and SWDA-Transformer.
9. The novel Shift-Deformable Transformer rolling bearing fault diagnosis system according to claim 8 is characterized in that: EFE Block includes: depthwise separable convolution + maximum pooling layer + dilated residual block and EMSA.
10. The novel Shift-Deformable Transformer rolling bearing fault diagnosis system according to claim 8 is characterized in that: SWDA-Transformer contains a total of 4 stages. Except for the first stage, each stage will first reduce the resolution of the input feature map through the Patch Merging layer and perform downsampling operations. The specific structure of the EncoderBlock in the Stage is that in the Encoder Block in Stage3 and Stage4, the front attention is Shifting WindowMulti head Self Attention, namely SW-MSA, followed by deformable multi-head attention D-MSA; while Stage1 and Stage2 are still Window Multi head Self Attention, namely W-MSA and SW-MSA in Swin transformer. These modules are used alternately in each Stage; among them, the deformable multi-head attention DA is integrated into the EncoderBlock Structure.
