A gearbox fault diagnosis method based on MSDC-Swin-T
Through the multi-scale feature extraction and global dependency modeling of the MSDC-Swin-T model, the accuracy problem in small samples and noisy environments in gearbox fault diagnosis is solved, and efficient fault identification and diagnosis are achieved.
Patent Information
- Application Number
- CN202311526466.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-16
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2043-11-16
AI Technical Summary
Existing intelligent fault diagnosis methods are difficult to meet the requirements of real-time monitoring and large-scale data processing when processing multi-modal signals of gearboxes, and are affected by noise interference and changes in working conditions, resulting in a decrease in diagnostic accuracy, especially under small sample data conditions. Poor performance.
Using a method based on MSDC-Swin-T, combined with the multi-scale convolution token embedding module, Swin-Transformer module and softmax classifier, multi-scale local features are extracted through dilated convolution and coordinate reconstruction attention mechanism, and self-attention is used The mechanism performs global dependency modeling, reduces the amount of calculation, and improves fault diagnosis accuracy.
It improves the accuracy and robustness of gearbox fault diagnosis, can effectively identify faults in small samples and noisy environments, and significantly improves the performance of the diagnostic model, especially the ability to identify mixed faults and different working conditions.
Smart Images

Figure CN117516925B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of rotating machinery fault diagnosis, and more specifically, to a gearbox fault diagnosis method based on MSDC-Swin-T. Background Art
[0002] With the rapid development of the Internet of Things, mechanical transmission systems, as the core components of various mechanical equipment, have begun to develop in the direction of intelligence and automation. Gearboxes, as key transmission components of transmission systems, often breed various faults due to high-intensity and long-term work. This leads to unnecessary daily maintenance, property losses, and even serious safety accidents. Therefore, conducting intelligent fault diagnosis research on gearboxes to ensure their stable operation is crucial to ensuring production efficiency and equipment reliability.
[0003] Traditional gearbox fault diagnosis methods usually rely on prior experience and signal processing-based techniques. However, these methods require professional knowledge and have limited processing effects on complex fault modes and multimodal signals. Therefore, these methods often fail to meet the requirements of real-time monitoring and large-scale data processing. In recent years, deep learning can not only process massive data efficiently, but also automatically learn useful fault features. Therefore, intelligent fault diagnosis methods based on deep learning have been favored by many scholars. For example: Zhao et al. proposed a fault diagnosis method based on wavelet packet distortion and ConvNets, which increases fault samples by wavelet packet distortion, aiming to solve the problem of imbalance between healthy and faulty classes. Ma et al. developed a meta-learning framework based on multi-scale dilated convolution and relational modules, which showed better fault diagnosis performance and provided ideas for cross-domain diagnosis. However, since the above studies use CNN for feature extraction, when the vibration signal is disturbed by noise, its periodic features will be submerged. The local nature of the convolution kernel lacks the ability to model global dependencies, which further leads to the lack of fault information. Although recurrent neural networks (RNNs) and their variants can extract global features, they suffer from gradient explosion and increased training time costs due to the increase in the number of parameters.
[0004] In recent years, Vaswani et al. proposed a Transformer model with an attention mechanism. Since the model uses the autocorrelation calculation of self-attention, it can effectively capture the long-range dependency of global context information. Therefore, the Transformer model has been extended to the research field of fault diagnosis. For example: Ding et al. proposed a new time-frequency transformer to realize bearing fault diagnosis. Wu et al. used the transformer as a classifier, which not only achieved fault detection, but also effectively identified fault conditions of different severity levels. The success of the transformer depends largely on the number and quality of labeled samples. If the number of labeled samples is small and there is heterogeneity between the data, the fault diagnosis performance of the transformer-based method will be degraded. In fact, it is difficult and expensive to collect enough fault data in practical application scenarios. Since CNN can learn features of different scales from low to high, and help the neural network to fully consider spatial adjacent information. Therefore, in small-scale samples, CNN is still better than Transformer. For example: Yang et al. proposed a small-sample fault diagnosis method based on a metric prototype network with a multi-scale mask mechanism, which uses dilated convolution and effective optical channel attention multi-scale feature embedding and proves its superiority. Liu et al. designed a variational information-constrained generative adversarial network, which showed superior performance in the field of mechanical fault diagnosis.
[0005] In summary, CNN can effectively mine local features of different scales in the input signal, but lacks the ability to model global dependencies. Transformer can model global context information through autocorrelation calculation, but its excellent performance is attributed to the use of large-scale data. In addition, mechanical equipment is not only affected by environmental noise, but also the working conditions are constantly changing, which poses a serious challenge to the existing intelligent diagnosis models. In addition, it is difficult to collect and label fault data in actual engineering scenarios, which further damages the accuracy and reliability of the diagnosis model.
[0006] Therefore, how to reduce the amount of calculation and improve the accuracy of gearbox fault diagnosis on the basis of realizing multi-scale local feature mining is an urgent problem that technical personnel in this field need to solve. Summary of the invention
[0007] In view of the above problems, the present invention provides a gearbox fault diagnosis method based on MSDC-Swin-T to at least solve some of the technical problems mentioned in the above background technology.
[0008] In order to achieve the above object, the present invention adopts the following technical solution:
[0009] A gearbox fault diagnosis method based on MSDC-Swin-T comprises the following steps:
[0010] S1, obtaining a one-dimensional vibration signal of the gearbox;
[0011] S2, preprocessing the one-dimensional vibration signal;
[0012] S3, input the preprocessed one-dimensional vibration signal into the trained MSDC-Swin-T diagnosis model for fault diagnosis, and output the gearbox fault diagnosis result;
[0013] The MSDC-Swin-T diagnostic model includes a multi-scale convolutional token embedding module, a Swin-Transformer module and a softmax classifier.
[0014] Furthermore, the step S2 specifically includes:
[0015] S21, performing normalization processing on the one-dimensional vibration signal;
[0016] S22, converting the normalized one-dimensional vibration signal into a two-dimensional grayscale image.
[0017] Furthermore, S22 specifically includes: using a sliding window of a preset size to perform equal-length interception on the normalized one-dimensional vibration signal; dividing the intercepted data segment into n equal parts, each containing n data points; and reconstructing the n data segments to obtain a two-dimensional grayscale image.
[0018] Furthermore, the step S3 specifically includes:
[0019] S31, using a multi-scale convolutional token embedding module to process the preprocessed one-dimensional vibration signal to obtain a feature map;
[0020] S32, processing the feature map through the Swin-Transformer module to obtain output features;
[0021] S33, using a softmax classifier to perform fault feature mapping processing on the output features to obtain a gearbox fault diagnosis result.
[0022] Furthermore, the step S31 specifically includes:
[0023] S311, extracting features from the preprocessed one-dimensional vibration signal using dilated convolution to obtain multiple low-order local features;
[0024] S312, normalizing and performing activation function ReLU processing on each of the low-order local features;
[0025] S313, using the coordinate reconstruction attention mechanism to learn the intrinsic correlation of each low-order local feature, and obtain the coordinate reconstruction attention mechanism output feature;
[0026] S314, fusing the output features of the coordinate reconstruction attention mechanism;
[0027] S315. Reconstruct the output features of the attention mechanism based on the fused coordinates to obtain a feature map.
[0028] Furthermore, the step S313 specifically includes:
[0029] Use global maximum pooling to compress the dimensions of low-order local features and obtain the output features of the cth channel;
[0030] Connect the output feature of the c-th channel with the input feature of the c-th channel and perform convolution fusion processing to obtain fusion features;
[0031] Adaptive sigmoid activation function is used to optimize the weight of fusion features;
[0032] The weight-optimized fusion features are linearly transformed through convolution operation and sigmoid activation function to obtain linear transformation features;
[0033] The linear transformation feature is residually connected with the input feature of the cth channel to obtain the output feature of the coordinate reconstruction attention mechanism.
[0034] Furthermore, the step S32 specifically includes:
[0035] S321, slicing the feature map to obtain multiple sub-feature maps;
[0036] S322, inputting the multiple sub-feature maps into the multi-head self-attention module of the Swin-Transformer module in parallel, and obtaining multiple groups of output feature maps through multiple linear layers and scaled dot product operations;
[0037] S323: Fusing the multiple groups of output feature maps to obtain output features.
[0038] Furthermore, the input of the multi-head self-attention module is multiple query matrices, key matrices and value matrices; the query matrix, key matrix and value matrix are all fixed single values.
[0039] Furthermore, during the training process of the MSDC-Swin-T diagnostic model, the Radam optimizer is used to optimize the weight parameters, specifically including:
[0040] Initialize the initial values of the first-order moment estimate and the second-order moment estimate of the Radam optimizer;
[0041] Input the training sample set into the MSDC-Swin-T diagnostic model to train and learn the diagnostic model parameters; during the training and learning process of the diagnostic model parameters, adjust the learning rate of each diagnostic model parameter through the Radam optimizer; obtain the updated first-order moment estimate and the updated second-order moment estimate;
[0042] According to the updated first-order moment estimate and the updated second-order moment estimate, the updated weights of the Radam optimizer are obtained.
[0043] Furthermore, in the process of optimizing weight parameters using the Radam optimizer, it is necessary to determine whether the MSDC-Swin-T diagnostic model has converged; specifically, the following steps are required:
[0044] If the diagnostic accuracy of the MSDC-Swin-T diagnostic model reaches a stable level as the number of training iterations of the MSDC-Swin-T diagnostic model increases, it is determined that the MSDC-Swin-T diagnostic model has converged; at this time, the training of the MSDC-Swin-T diagnostic model is terminated and the optimal diagnostic model parameters are saved.
[0045] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a gearbox fault diagnosis method based on MSDC-Swin-T, which has the following beneficial effects.
[0046] The present invention improves the fault diagnosis accuracy of the gearbox through the MSDC-Swin-T diagnosis model.
[0047] The present invention performs feature information extraction and channel adaptive learning at different scales through a multi-scale convolutional token embedding module, so that the proposed method can fully mine effective feature information.
[0048] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.
[0049] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0051] Figure 1 A schematic flow chart of a gearbox fault diagnosis method based on MSDC-Swin-T provided in an embodiment of the present invention.
[0052] Figure 2 A schematic diagram of reconstructing a two-dimensional grayscale image provided by an embodiment of the present invention.
[0053] Figure 3 A schematic diagram of the structure of a multi-scale convolutional token embedding module provided in an embodiment of the present invention.
[0054] Figure 4 A schematic diagram of the receptive field at different expansion rates provided by an embodiment of the present invention.
[0055] Figure 5 Schematic diagram of the coordinate reconstruction attention mechanism provided in an embodiment of the present invention.
[0056] Figure 6 A schematic diagram of the MSDC-Swin-T diagnostic model training process provided by an embodiment of the present invention.
[0057] Figure 7 A schematic diagram of visualization of key layer output features based on t-SNE provided in an embodiment of the present invention.
[0058] Figure 8 A schematic diagram of confusion matrix classification results of different methods provided in embodiments of the present invention.
[0059] Fig. 9 A schematic diagram of the convergence performance of the gearbox fault diagnosis method based on MSDC-Swin-T provided in an embodiment of the present invention.
[0060] Fig.10 A schematic diagram showing the visualization of the recognition results of six methods under SNR=0dB in Example 1 provided in the embodiment of the present invention.
[0061] Fig.11 A schematic diagram of fault diagnosis results under different test samples provided by an embodiment of the present invention.
[0062] Fig.12 A schematic diagram of the diagnosis results of the gearbox fault diagnosis method based on MSDC-Swin-T under different working conditions provided in an embodiment of the present invention.
[0063] Fig.13 A schematic diagram of visualization of mixed fault identification results under different working conditions provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0064] 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.
[0065] See also Figure 1 As shown, the embodiment of the present invention discloses a gearbox fault diagnosis method based on MSDC-Swin-T, comprising the following steps:
[0066] S1, obtaining a one-dimensional vibration signal of the gearbox;
[0067] S2, preprocessing the one-dimensional vibration signal;
[0068] S3, input the preprocessed one-dimensional vibration signal into the trained MSDC-Swin-T diagnosis model for fault diagnosis, and output the gearbox fault diagnosis result;
[0069] The MSDC-Swin-T diagnostic model includes a multi-scale convolutional token embedding module, a Swin-Transformer module, and a softmax classifier.
[0070] This method can solve the problems of difficulty in collecting labeled fault data in actual engineering scenarios, noise interference, and degradation of diagnostic model performance under changing working conditions.
[0071] The following is a detailed description of each of the above steps.
[0072] In the above steps S1 and S2, the one-dimensional vibration signal of the gearbox is collected to construct a diagnostic model input data set; then the collected one-dimensional vibration signal is normalized, which is specifically expressed as:
[0073]
[0074] Where, X represents the one-dimensional vibration signal after normalization; X max represents the maximum value of the one-dimensional vibration signal in the diagnostic model input data set; X min It shows the minimum value of the one-dimensional vibration signal in the input data set of the diagnostic model;
[0075] Finally, the normalized one-dimensional vibration signal is converted into a two-dimensional grayscale image; specifically, a sliding window of a preset size is used to perform equal-length interception on the normalized one-dimensional vibration signal; the intercepted data segment is divided into n equal parts, each containing n data points; the n data segments are reconstructed to obtain a two-dimensional grayscale image; for example Figure 2 As shown, in Figure 2In the paper, a sliding window with a size of 784 is first used to perform equal-length truncation of the normalized one-dimensional vibration signal. Then the truncation data is divided into 28 equal parts, each containing 28 data points. Finally, the data segment containing 28 data points is reconstructed to obtain a two-dimensional grayscale image [28, 28].
[0076] In the above step S3, it specifically includes:
[0077] S31, using a multi-scale convolutional token embedding module to process the preprocessed one-dimensional vibration signal to obtain a feature map;
[0078] S32, processing the feature map through the Swin-Transformer module to obtain output features;
[0079] S33. Use the softmax classifier to perform fault feature mapping processing on the output features to obtain the gearbox fault diagnosis result.
[0080] In the above step S31, the multi-scale convolutional token embedding module is constructed by dilated convolution and coordinate reconstruction attention mechanism, which can be found in detail. Figure 3 As shown. The input feature map of the multi-scale convolutional token embedding module is represented as:
[0081] C in ×L in ×W in =1×28×28
[0082] Where: C in Indicates the number of channels of the input feature map; L in Represents the length of the input feature map; W in Indicates the width of the input feature map;
[0083] Then, dilated convolution is used to extract low-order local features of the preprocessed one-dimensional vibration signal. In the embodiment of the present invention, dilated convolutions with dilation rates of 1, 2, and 5 are used to extract low-order local features, where the size of the dilated convolution is 3 and the number of channels is 96. Since the dilation rate of the dilated convolution affects the receptive field of the convolution operation, multi-scale feature extraction can be performed using dilated convolutions of different sizes. The dilation rate affects the receptive field of the convolution operation. Figure 4 As shown;
[0084] After obtaining the low-order local features, in order to optimize the fault features and improve the parameters of the MSDC-Swin-T diagnostic model, the normalization and activation function ReLU operation can be used; then, in order to further adapt the diagnostic model to small sample fault diagnosis, the embodiment of the present invention uses the coordinate reconstruction attention mechanism to learn the intrinsic correlation of each low-order local feature and enhance the ability to capture pulse information; finally, the output features of the coordinate reconstruction attention mechanism are fused, which is expressed as:
[0085] C ou =C1+C2+C3
[0086] Where: C ou represents the number of channels of the output feature map of the coordinate reconstruction attention mechanism after fusion processing; C1 represents the number of channels of the first branch; C2 represents the number of channels of the second branch; C3 represents the number of channels of the third branch; at this time, the feature map output by the multi-scale convolutional token embedding module is expressed as:
[0087] C ou ×L ou ×W ou =288×28×28
[0088] Where: L ou W represents the length of the output feature map of the attention mechanism after the fusion process; ou Represents the width of the output feature map of the coordinate reconstruction attention mechanism after fusion processing; this feature map is the input of the Swin-Transformer module;
[0089] Next, we will explain the attention mechanism for the above coordinate reconstruction:
[0090] Since the vibration signals of rotating machinery are often non-stationary and the fault characteristics exist in the form of periodic pulses, in order to make the diagnostic model more adaptable to the small sample environment, the present invention designs a coordinate reconstruction attention mechanism, specifically Figure 5 As shown:
[0091] Specifically, since global maximum pooling (GMP) can capture the key impulse information in the input features, global maximum pooling is first used to compress the dimensions of low-order local features. The process is expressed as:
[0092]
[0093] in, represents the output feature of the cth channel; j represents the element of the channel output feature; d represents the last element of the channel output feature; Max{·} represents the maximum pooling operation; X c Represented as the input feature of the cth channel, x c(1,j) represents the input feature of the cth channel;
[0094] In order to capture the spatial location information, With X c Connect and perform convolution fusion processing to obtain fusion features; the process can be expressed as:
[0095]
[0096] in, represents fusion features; Cat(·) represents fusion operation, f conv (·) is the convolution operation;
[0097] In order to make the coordinate reconstruction attention mechanism more suitable for small sample conditions and increase its ability to capture key pulse information, an adaptive sigmoid activation function is also designed in the embodiment of the present invention; specifically, firstly, a 1×1 convolution layer is used to perform a linear transformation on the above fused features for normalizing the convolution output; then two learnable weight matrices P1 and P2 are defined, and dot multiplication operations are performed with the fused features after the linear transformation; based on this, the learnable weight matrix will be optimized during the model training process to help the model be more suitable for small sample tasks; finally, the sigmoid activation function is used to limit the eigenvalue between 0 and 1, and the adaptive sigmoid activation function optimizes the weight of the fused feature information, and the process is as follows:
[0098]
[0099] Among them, δ Adp (·) represents the adaptive Sigmoid activation function; F represents the fusion feature after weight optimization;
[0100] In order to further increase the expressive power of F, the embodiment of the present invention uses convolution operation and Sigmoid activation function to perform linear transformation, and the process can be expressed as follows:
[0101]
[0102] in, Represents linear transformation characteristics;
[0103] Finally, With X c Residual connections are made so that the output of the coordinate reconstruction attention mechanism has both the characteristics of key pulse information and the original signal characteristics, realizing the intrinsic correlation of learning low-order local features. The process can be expressed as:
[0104]
[0105] Among them, Y represents the coordinate reconstruction attention mechanism output feature; represents a residual connection.
[0106] In the above step S32, the Swin-Transformer module is used to perform global dependency modeling to help the model extract key pulse features; specifically, the feature map output by the multi-scale convolutional token embedding module is used as the input of the Swin-Transformer module, and the feature map is sliced and divided to obtain multiple sub-feature maps; for example, the feature map of size 28×28 is divided into two groups of 14×14 sub-feature maps according to the ratio of 2×2; the obtained sub-feature maps are then input into the multi-head self-attention module of the Swin-Transformer in parallel, and after multiple linear layers and scaled dot product operations, the corresponding multiple groups of output feature maps are obtained, and finally the obtained output feature maps are fused to obtain the output features of the Swin-Transformer; wherein the multi-head self-attention module inputs multiple query matrices, key matrices and value matrices, and the query matrix, key matrix and value matrix are all fixed single values.
[0107] In the above step S33, the Softmax classifier is used to perform fault feature mapping to obtain the gearbox fault diagnosis result; specifically, the set of training sample set input in the MSDC-Swin-T diagnosis model is X = {x1...x i ...x T}, where the category of the sample set elements is Z = {z1...z i ...z K}A class in the collection, the corresponding label is So the sample x in the training sample set is i The probability of being judged as one of the categories in the category Z set is:
[0108]
[0109] Among them, y i Represented as the input element x of the training sample set i Determined as sample set element z i probability; Represented as category z i With the whole x i Correlation between classification categories; Expressed as The output probability is normalized.
[0110] In the embodiment of the present invention, the training process flow chart of the MSDC-Swin-T diagnostic model can be found in Figure 6As shown, firstly, the historical fault data of the one-dimensional vibration signal of the gearbox at each angle is obtained to construct a data set; then, the data set is preprocessed, and the preprocessed data set is divided into a training sample set and a test sample set, which can be specifically divided according to the ratio of 3:1 of the total number of samples; the MSDC-Swin-T diagnostic model is trained by the training sample set;
[0111] During the training process, the Radam optimizer is used to optimize the weight parameters, which includes: initializing the initial values of the first-order moment estimate and the second-order moment estimate of the Radam optimizer; expressed as:
[0112]
[0113] Among them, m0 represents the initial value of the first-order moment estimate; v0 represents the initial value of the second-order moment estimate;
[0114] Then, the training sample set is input into the MSDC-Swin-T diagnostic model to train and learn the diagnostic model parameters. During the training and learning process of the diagnostic model parameters, the learning rate of each diagnostic model parameter is adjusted by the Radam optimizer. The updated first-order moment estimate and the updated second-order moment estimate are obtained. The updated first-order moment estimate is expressed as:
[0115]
[0116] The updated second-order moment estimate is expressed as:
[0117]
[0118] Wherein, β1 represents the exponential decay rate of the first-order moment estimate; β2 represents the exponential decay rate of the second-order moment estimate; in the embodiment of the present invention, β1=0.9, β2=0.999; γ represents an adjustable hyperparameter.
[0119] Then, according to the updated first-order moment estimate and the updated second-order moment estimate, the updated weights of the Radam optimizer are obtained; expressed as:
[0120]
[0121] Where α=0.0001 represents the learning rate; ε represents the bias.
[0122] In the process of weight parameter optimization using the Radam optimizer, it is necessary to determine whether the MSDC-Swin-T diagnostic model has converged; specifically, if the diagnostic accuracy of the MSDC-Swin-T diagnostic model reaches a stable level as the number of training iterations of the MSDC-Swin-T diagnostic model increases, it is determined that the MSDC-Swin-T diagnostic model has converged; at this time, the training of the MSDC-Swin-T diagnostic model is terminated, and the optimal diagnostic model parameters are saved;
[0123] After the training is completed, the test sample set is input into the trained MSDC-Swin-T diagnosis model to obtain the final fault diagnosis result.
[0124] In order to verify the effectiveness of the method provided by the embodiment of the present invention under small sample conditions, two specific examples are used to demonstrate the effectiveness. In these two specific examples, fault diagnosis under small sample conditions and noise environments and fault diagnosis under small sample conditions and variable working conditions are performed. The experimental framework is tensorflow-python.
[0125] Embodiment 1:
[0126] 1.1. Dataset Description:
[0127] The test bench consists of a motor, a planetary gearbox, a reduction gearbox, a brake, and a brake controller. The vibration signals are collected from sensors installed in the X, Y, and Z directions, and the speed system load is set to two working conditions: 20Hz-0V and 30Hz-2V. The dataset contains bearing data and gearbox data, each of which has five types of faults. In order to verify the classification performance of the proposed method for mixed faults, the bearing data and gearbox data are combined, in which there are 10 types of faults, and the fault labels are shown in Table 1. First, the time window is used to repeatedly intercept samples, where the moving time window step is 784, 100 samples for each type of fault, and the total number of samples is 1000. The ratio of the number of training samples, the number of test samples, and the number of validation samples is 7:2:1.
[0128] Table 1 Description of bearing and gearbox fault types
[0129]
[0130] 1.2 Other comparison methods
[0131] Four advanced methods and a Swin-Transformer (Swin-T) benchmark model are used to evaluate the superiority of the method provided by the embodiment of the present invention. The four advanced methods are: Effective Attention Prototype Network (EAPN), Residual Wide Kernel Deep Convolutional Autoencoder (RWKDCAE), Generalized Model Agnostic Meta-Learning (GMAML), Multi-branch Multi-scale Dynamic Convolutional Network (MBSDCN). In order to make an unbiased comparison, the comparison method has the same number of network layers as the method proposed in the present invention; among them, EAPN is composed of effective lightweight channel attention and dilated convolution; RWKDCAE is composed of wide kernel convolutional layer, residual learning and convolutional autoencoder; GMAML is composed of multi-core effective channel attention and meta-learning strategy; MBSDCN is composed of multi-scale convolution and channel reconstruction attention.
[0132] 1.3 Visual Analysis
[0133] In order to intuitively observe the feature extraction ability of the proposed method, the t-SNE method is used to visualize the features extracted from each key layer, as shown in Figure 7 As shown. Figure 7 It can be seen that in the original input layer, most of the features are mixed together, and only a small part of the features are distributed at the edge. Then, after the multi-scale convolutional layer feature extraction, the mixed features begin to move to the edge. Then, as the network goes deeper, the clustering effect of similar faults becomes more obvious. In particular, the Swin-Transformer layer shows a stronger clustering effect than the previous layer, which indicates that the multi-head attention in this layer can pay more attention to subtle features and improve the fault diagnosis accuracy of the method proposed in the present invention. Finally, in the output layer, similar faults are completely aggregated, and there is no overlap between different types of faults, which shows that the method proposed in the present invention has a strong feature extraction capability.
[0134] 1.4 Test performance under mixed faults
[0135] In order to analyze the fault diagnosis performance of the proposed method under mixed faults, the classification results of Swin-T, EAPN, RWKDCAE, GMAML, MBSDCN and the proposed method are obtained using the confusion matrix. Figure 8 As shown in the figure. The horizontal and vertical coordinates in the figure represent 10 predicted labels and 10 true labels respectively. The diagonal line represents the number of correctly classified 20 test samples. Figure 8It can be seen that the method proposed in the present invention has a high recognition rate for Ball, Inner, Health_1, Chipped, Surface and Health_2. For Outer, the fault recognition rate is slightly lower than that of EAPN and MBSDCN. However, from the perspective of the total fault recognition rate, the test accuracy of the method proposed in the present invention is the highest, which is 98.1%. The test accuracy rates of the other five methods are 78.67% (Transformer), 86.49% (EAPN), 88.99% (RWKDCAE), 91.52% (GMAML) and 94.61% (MBSDCN), respectively. In addition, from Figure 8 It can be seen that the five comparison methods all misclassified the chipped samples. This is because the faults of the bearing and the gearbox are similar, resulting in poor recognition accuracy. However, the method proposed in this invention can not only correctly identify the chipped fault type, but also has the lowest misclassification rate for other faults. This shows that the proposed method has obvious advantages in mixed faults and can effectively diagnose mixed faults.
[0136] In the experiment of Example 1, the number of samples in each mini-batch is set to 64. The iteration epoch is 100. Fig. 9 is the diagnostic accuracy and loss of the proposed method. Fig. 9 It can be seen that the method proposed in the present invention converges within the 60th period.
[0137] 1.5 Test performance under additional noise
[0138] In actual engineering environments, the collected vibration signals are usually affected by noise, making the characteristic information of the vibration signals more complex. Therefore, fault diagnosis under small sample conditions and noisy environments is a huge challenge. In an embodiment of the present invention, Gaussian white noise under different signal-to-noise ratios is added to the original vibration signal to better simulate the real noise environment. The definition process of SNR is:
[0139] SNR = 10log 10 (P singal / P noise )
[0140] Among them, P singal and P noise are the powers of the original signal and the noise signal respectively.
[0141] Table 2 shows the diagnostic results of the six methods in a noisy environment. By analyzing the results, it can be found that as the signal-to-noise ratio continues to decrease, the diagnostic accuracy of each method decreases accordingly. When the signal-to-noise ratio is 4 and 8dB, the diagnostic accuracy of MSDC-Swin-T is 94.38% and 96.5%, respectively, which is higher than other comparison methods, indicating that normal noise has limited impact on the proposed method. In contrast, the comparison methods are greatly affected by noise interference, especially the Swin-T method, which has a diagnostic accuracy of only 74.54% when SNR=8dB. When the signal-to-noise ratio is -4dB, the diagnostic accuracy of Swin-T is only 55.92%, while the diagnostic accuracy of the proposed method is 83.74%. This is because the multi-scale convolutional token embedding module extracts feature information of different scales and performs channel adaptive learning, so that the proposed method can fully mine effective feature information. In addition, compared with MBSDCN, the proposed method is also 2.60% higher than it, which shows that the proposed method has obvious performance advantages in a strong noise environment.
[0142] Table 2 Accuracy of six methods in noisy environment
[0143]
[0144] In order to further observe the feature extraction performance of MSDC-Swin-T under small sample conditions and noisy environments, the embodiment of the present invention uses t-SNE to convert the output feature vector into two dimensions. The feature visualization results are shown in Figure 2. Fig.10 shown. Fig.10 (a) and Fig.10 As shown in (b), after feature extraction by Swin-T and EAPN, the features of the original signal are mixed together in the low-dimensional space and their fault types cannot be distinguished. Fig.10 (c) Fig.10 (d) and Fig.10 As shown in (e), although different types of faults have clear classification boundaries, there are still quite a lot of overlapping fault samples. Fig.10 As shown in (f), MSDC-Swin-T achieves the best clustering effect and can better identify different types of fault samples.
[0145] Fig.10 Visualization of recognition results of six methods under SNR = 0dB in Example 1. (a) Swin-T. (b) EAPN. (c) RWKDCAE. (d) GMAML. (e) MBSDCN. (f) MSDC-Swin-T.
[0146] 1.6 Performance comparison of the proposed method under different sample numbers:
[0147] In this experiment, the small sample conditions include 250, 500, 1000 and 2000 total samples. The data contains 10 types of faults and is divided into training set, test set and validation set according to 7:2:1. The test results of different methods are shown in Table 3 and Fig.11 shown. Fig.11 It shows that the proposed method of the present invention has achieved a leading position under the conditions of four sample sizes. When the number of test set samples is 50, the diagnostic accuracy of MSDC-Swin-T is 25.93%, 20.37%, 17.57%, 9.26% and 3.71% higher than that of Swin-T, EAPN, RWKDCAE, GMAML and MBSDCN respectively. When the number of test set samples is 100, the diagnostic accuracy of the proposed method reaches 96.47%, and the diagnostic accuracy of the comparison method can only reach about 96% when the number of test set samples is 400. This shows that when the number of samples is small, MSDC-Swin-T has stronger diagnostic performance than other methods.
[0148] Table 3 Diagnostic accuracy under different sample numbers
[0149]
[0150] Embodiment 2:
[0151] 2.1. This embodiment uses a roller gear fault simulation test platform. The platform mainly includes a three-phase AC asynchronous motor, a load adding device, bearings of different fault types, a gear box, a sensor and a frequency conversion controller. Among them, the sensor is a shear acceleration sensor, model 333B30, and the sensitivity is 102.7mV / g. The object to be tested in this embodiment is a bevel gear, and the frequency of sample collection is 2.56KHz. By adjusting the frequency conversion controller and the loading device, data of 4 different working conditions of 0HP, 1HP, 2HP and 3HP at 20Hz, 30Hz and 40Hz are obtained respectively. Among them, the fault states of the bevel gear are full tooth break fault, small end broken half tooth fault, large end broken half tooth fault, uniform wear fault and normal state. The detailed division of the data set is shown in Table 4.
[0152] Table 4 Description of bearing and gearbox fault types
[0153]
[0154] 2.2. Performance comparison under different working conditions:
[0155] Based on the optimal network structure and hyperparameter settings selected in Example 1, the MSDC-Swin-T model is trained under four different working conditions in Example 2. There are 100 samples of each type of fault and a total of 500 samples. The confusion matrix of the diagnosis result is as follows: Fig.12 As shown. Fig.12It can be seen that the proposed method has a high recognition rate for labels 0, 1 and 4. For labels 2 and 3, there is a disadvantage of high misclassification rate; this is because the fault characteristics of labels 2 and 3 are relatively similar, resulting in unsatisfactory results in the recognition process. However, from the perspective of overall fault identification, the proposed method has a high diagnostic accuracy rate under four working conditions, which are 92.66%, 96.59%, 95.62% and 95.07% respectively.
[0156] 2.3 Comparison of mixed fault performance under different working conditions:
[0157] According to the performance comparison under different working conditions, when comparing the performance of mixed faults under different working conditions, four fault types with the lowest diagnostic accuracy under different working conditions, namely label 2 and label 3, are selected to construct a new data set. This data set is used to verify the performance of mixed fault diagnosis under different working conditions, with 100 samples of each type of fault and a total of 800 samples. In order to intuitively understand the quality of feature extraction, the t-SNE method is used for dimensionality reduction and feature visualization. The results are shown in Figure 2. Fig.13 As shown. Fig.13 (f) It can be seen that the proposed method has a more discriminative clustering effect on the eight fault types, and different fault types are independently separated with larger inter-class distances. In Swin-T, EAPN, and RWKDCAE, most fault types are mixed together, and the fault identification performance is poor. Although some fault types have obvious clustering boundaries, a few fault types are mixed together in GMAML and MBSDCN. In addition, the distances between different fault types are close, resulting in a higher risk of misjudgment.
[0158] Fig.13 Visualization of hybrid fault identification results under different working conditions. (a) Swin-T. (b) EAPN. (c) RWKDCAE. (d) GMAML. (e) MBSDCN. (f) MSDC-Swin-T.
[0159] 2.4. Performance comparison under different sample numbers:
[0160] The diagnosis results under different sample numbers are shown in Table 5. It can be seen from Table 5 that under the four small sample conditions, the diagnostic accuracy of the proposed method MSDC-Swin-T is higher than that of other methods. When the number of test samples is reduced from 375 to 75, the diagnostic accuracy of MSDC-Swin-T is still above 90%, which shows that the proposed method can accurately diagnose the fault type under more stringent small sample conditions. In addition, under 150 test samples, the accuracy of Swin-T, EAPN, RWKDCAE, GMAML and MBSDCN is 68.67%, 77.33%, 86.87%, 88.33% and 91.42%, and the diagnostic accuracy of MSDC-Swin-T is 94.67%. This shows that the multi-scale convolutional token embedding module designed by the present invention can effectively mine feature information and improve fault diagnosis capabilities.
[0161] Table 5 Diagnostic accuracy under different sample numbers
[0162]
[0163] In summary, the present invention provides a gearbox fault diagnosis method based on MSDC-Swin-T for small sample fault diagnosis of gearboxes. This method solves the problem of insufficient fault samples in actual engineering and the degradation of diagnostic model performance caused by environmental noise and working condition changes. Specifically, low-order local features are first extracted through a multi-scale convolutional token embedding module. Then, the feature map is decomposed into a series of tokens through segmentation technology, and global dependency modeling is performed using self-attention in Swin-Transformer. Finally, two gearbox datasets are used to verify the proposed method. The results show that the proposed method achieves better fault identification accuracy than existing advanced methods.
[0164] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0165] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A gearbox fault diagnosis method based on MSDC-Swin-T, characterized in that: The steps include: S1, obtaining a one-dimensional vibration signal of the gearbox; S2, preprocessing the one-dimensional vibration signal; S3, input the preprocessed one-dimensional vibration signal into the trained MSDC-Swin-T diagnostic model for fault diagnosis, and output the gearbox fault diagnosis result; The MSDC-Swin-T diagnostic model includes a multi-scale convolutional token embedding module, a Swin-Transformer module and a softmax classifier; The step S3 specifically includes: S31, using a multi-scale convolutional token embedding module to process the preprocessed one-dimensional vibration signal to obtain a feature map; S32, processing the feature map through the Swin-Transformer module to obtain output features; S33, using a softmax classifier to perform fault feature mapping processing on the output features to obtain a gearbox fault diagnosis result; The step S31 specifically includes: S311, using dilated convolution to extract features from the preprocessed one-dimensional vibration signal to obtain multiple low-order local features; using dilated convolutions with dilation rates of 1, 2, and 5 to extract low-order local features, respectively, where the size of the dilated convolution is 3 and the number of channels is 96; S312, normalizing and performing activation function ReLU processing on each of the low-order local features; S313, using the coordinate reconstruction attention mechanism to learn the intrinsic correlation of each low-order local feature, and obtain the coordinate reconstruction attention mechanism output feature; S314, fusing the output features of the coordinate reconstruction attention mechanism; S315, reconstructing the output features of the attention mechanism based on the fused coordinates to obtain a feature map; The step S313 specifically includes: Use global maximum pooling to compress the dimensions of low-order local features and obtain the output features of the cth channel; Connect the output feature of the c-th channel with the input feature of the c-th channel and perform convolution fusion processing to obtain fusion features; Adaptive sigmoid activation function is used to optimize the weight of fusion features; The weight-optimized fusion features are linearly transformed through convolution operation and sigmoid activation function to obtain linear transformation features; Perform a residual connection between the linear transformation feature and the input feature of the cth channel to obtain the output feature of the coordinate reconstruction attention mechanism; The adaptive sigmoid activation function is used to optimize the weight of the fusion feature, including: firstly, a 1×1 convolution layer is used to linearly transform the fusion feature to normalize the convolution output; and then two learnable weight matrices are used to perform a dot multiplication operation with the fusion feature after the linear transformation.
2. The gearbox fault diagnosis method based on MSDC-Swin-T according to claim 1 is characterized in that: The step S2 specifically includes: S21, performing normalization processing on the one-dimensional vibration signal; S22, converting the normalized one-dimensional vibration signal into a two-dimensional grayscale image.
3. The gearbox fault diagnosis method based on MSDC-Swin-T according to claim 2 is characterized in that: The S22 specifically includes: using a sliding window of a preset size to perform equal-length interception on the normalized one-dimensional vibration signal; dividing the intercepted data segment into n equal parts, each containing n data points; and reconstructing the n data segments to obtain a two-dimensional grayscale image.
4. The gearbox fault diagnosis method based on MSDC-Swin-T according to claim 1 is characterized in that: The step S32 specifically includes: S321, slicing the feature map to obtain multiple sub-feature maps; S322, inputting the multiple sub-feature maps into the multi-head self-attention module of the Swin-Transformer module in parallel, and obtaining multiple groups of output feature maps through multiple linear layers and scaled dot product operations; S323: Fusing the multiple groups of output feature maps to obtain output features.
5. The gearbox fault diagnosis method based on MSDC-Swin-T according to claim 4 is characterized in that: The input of the multi-head self-attention module is multiple query matrices, key matrices and value matrices; the query matrix, key matrix and value matrix are all fixed single values.
6. The gearbox fault diagnosis method based on MSDC-Swin-T according to claim 1, further comprising: During the training process of the MSDC-Swin-T diagnostic model, the Radam optimizer is used to optimize the weight parameters, specifically including: Initialize the initial values of the first-order moment estimate and the second-order moment estimate of the Radam optimizer; Input the training sample set into the MSDC-Swin-T diagnostic model to train and learn the diagnostic model parameters; during the training and learning process of the diagnostic model parameters, adjust the learning rate of each diagnostic model parameter through the Radam optimizer; obtain the updated first-order moment estimate and the updated second-order moment estimate; According to the updated first-order moment estimate and the updated second-order moment estimate, the updated weights of the Radam optimizer are obtained.
7. The gearbox fault diagnosis method based on MSDC-Swin-T according to claim 6, further comprising: In the process of weight parameter optimization using the Radam optimizer, it is necessary to determine whether the MSDC-Swin-T diagnostic model has converged; specifically, it includes: If the diagnostic accuracy of the MSDC-Swin-T diagnostic model reaches a stable level as the number of training iterations of the MSDC-Swin-T diagnostic model increases, it is determined that the MSDC-Swin-T diagnostic model has converged; at this time, the training of the MSDC-Swin-T diagnostic model is terminated and the optimal diagnostic model parameters are saved.
