Rolling bearing fault diagnosis method based on Swinin-TCN integrated model
By combining FFT and VMD to extract the time-frequency domain characteristics of rolling bearing signals and using the improved Swin-TCN integrated model for fault diagnosis, the problems of insufficient data preprocessing and weak model perception capabilities in the prior art are solved, achieving more efficient and Accurate fault diagnosis.
Patent Information
- Application Number
- CN202411581919.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-02-21
AI Technical Summary
The existing technology has insufficient data preprocessing in rolling bearing fault diagnosis, which leads to insufficient extraction of spatial and temporal features of faults, and the traditional machine learning model has weak perception of key information, resulting in low accuracy of diagnostic results.
The time-frequency domain characteristics of the signal are extracted in the data preprocessing phase by combining fast Fourier transform (FFT) and variational modal decomposition (VMD) and trained as input into the network. Using the improved Swin-TCN integration model, the features related to the fault classification task are further extracted based on the time-frequency domain characteristics.
Multi-scale feature extraction of rolling bearing fault signals is realized, the accuracy and efficiency of fault diagnosis is improved, and fault classification capabilities are stronger than traditional models.
Smart Images

Figure CN119494033A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of bearing fault diagnosis, and in particular to a rolling bearing fault diagnosis method based on a Swin-TCN integrated model. Background Art
[0002] As a rotating component, rolling bearings are an important part of many large-scale mechanical equipment. Because they are in a state of long-term stress operation, they are prone to failures caused by wear and thermal fatigue, which in turn affects the operation of the entire mechanical equipment and even causes serious accidents and equipment damage. Therefore, in order to ensure the stable operation of rolling bearings, how to quickly and efficiently diagnose rolling bearing faults is extremely important.
[0003] During the operation of rolling bearings, specific vibration modes will be generated due to damage, wear, cracks and other faults of the inner and outer rings and rolling elements. These vibration modes will be reflected in the one-dimensional vibration signal of the bearing. By analyzing the information contained in the one-dimensional vibration signal, the health status of the bearing can be inferred.
[0004] With the development of big data and machine learning technology, data-driven fault diagnosis methods have gradually become a hot topic of research. These methods include support vector machines (SVMs), convolutional neural networks (CNNs), etc. However, these fault diagnosis methods have limitations. First, after data preprocessing, the model only uses time domain data or frequency domain data as the input of the model, resulting in insufficient extraction of the temporal and spatial features of the fault. Second, these traditional machine learning models have weak perception capabilities for key information, resulting in low accuracy of the final fault diagnosis results. Summary of the invention
[0005] 1. Problems to be solved by the present invention
[0006] There are some problems in the rolling bearing fault diagnosis process in the prior art. First, after data preprocessing, the model only uses time domain data or frequency domain data as the input of the model, resulting in insufficient extraction of the model's spatiotemporal features of the fault. Second, these traditional machine learning models have weak perception capabilities for key information, resulting in low accuracy of the final fault diagnosis results. Based on these problems, the present invention proposes that, in the data preprocessing stage, by combining fast Fourier transform (FFT) and variational mode decomposition (VMD), the time-frequency domain feature extraction of the signal is realized, thereby mining the multi-scale features in the fault signal. This method can analyze the signal more comprehensively, which is helpful for signal processing tasks in application scenarios such as fault detection and diagnosis. We stack and fuse the multi-scale features extracted by FFT and VMD, and send them to the network as the input of the model for training. Second, the improved Swin-TCN integrated model is used to further extract and abstract features closely related to the fault classification task based on the time-frequency domain features, so as to improve the accuracy of the model diagnosis results.
[0007] 2. Technical solution
[0008] In order to achieve the above object, the technical solution provided by the present invention is:
[0009] The present invention provides a rolling bearing fault diagnosis method based on the Swin-TCN integrated model, the steps of which are:
[0010] S1: Collect one-dimensional vibration signals of rolling bearings in normal state and various fault states, and pre-process the collected original vibration signals;
[0011] S2: Combine FFT and VMD to extract the time-frequency domain features of the signal;
[0012] S3: Build and train the network model, output the model diagnosis results, and analyze the diagnosis results.
[0013] Step S1 includes:
[0014] The collected one-dimensional vibration signals are preprocessed and organized into a data set, which is then divided into a training set, a validation set, and a test set.
[0015] Step S2 includes:
[0016] The whole process performs the following processing on the one-dimensional vibration signal data in the training set, validation set and test set respectively;
[0017] S21: performing FFT processing on the one-dimensional vibration signal data, converting the signal from the time domain to the frequency domain, and obtaining the spectrum information of the signal;
[0018] S22: Apply VMD to the one-dimensional vibration signal data and decompose it into a series of modal functions. These modal functions represent the time-frequency characteristics of the signal at different scales;
[0019] S23: Combine FFT and VMD, stack and fuse the multi-scale features extracted by FFT and VMD to form a two-dimensional feature matrix, and convert the two-dimensional feature matrix of each sample into a feature tensor after processing. The three-dimensional feature tensor formed after conversion can also be regarded as a set composed of the two-dimensional matrices of each sample.
[0020] By performing VMD (variational mode decomposition) and FFT (fast Fourier transform) processing on each sample in the training set, validation set, and test set, the time-frequency domain features of the signal data are extracted, and new training sets, validation sets, and test sets are generated for subsequent model training.
[0021] Step S3 includes:
[0022] S31: Build the Swin-TCN integrated model and initialize the model. The Swin-TCN integrated model includes the SE-TCN branch network and the Swin Transformer branch network;
[0023] The window attention mechanism of the Swin Transformer branch network can extract local features of fault signals. The Swin Transformer branch network includes a Patch Partition module and 4 stages. Stage 1 is composed of a Linear Embedding module and 2 Swin Transformer Block modules connected in series; Stage 2 is composed of a Patch Merging module and 2 Swin Transformer Block modules connected in series; Stage 3 is composed of a PatchMerging module and 6 Swin Transformer Block modules connected in series; Stage 4 is composed of a PatchMerging module and 2 Swin Transformer Block modules connected in series.
[0024] The temporal convolutional network (TCN) optimized based on the channel attention mechanism (SENet) can extract the global time domain features of the signal. The SE-TCN branch network consists of three residual blocks, each of which consists of two convolutional layer groups and a residual connection.
[0025] The features extracted by the SE-TCN branch network and the Swin Transformer branch network are fused after being processed by the Adaptive Average Pooling layer, and then the fused features are input into the FC (Fully Connected Layer) and SM (Softmax Layer) layers to obtain the fault diagnosis and recognition results of the model.
[0026] S32: After the model is built, the initial network model is trained using the training set and verified using the validation set to prevent overfitting. The model's hyperparameters are set to the hyperparameters used when the model performs best during the training process, thereby obtaining a rolling bearing fault diagnosis model with excellent performance. Finally, the diagnostic performance of the model is evaluated using the test set.
[0027] S33: Evaluate the diagnostic results of the Swin-TCN integrated model on the test set and compare them with the fault diagnosis effects of other models. The evaluation indicators include accuracy, precision, recall and F1.
[0028] The advantages and beneficial effects of the present invention are as follows:
[0029] (1) The present invention processes one-dimensional vibration signal data by combining the two methods of fast Fourier transform (FFT) and variational mode decomposition (VMD), thereby realizing the time-frequency domain feature extraction of the signal. This method can analyze the signal more comprehensively, which is beneficial to subsequent fault diagnosis.
[0030] (2) The Swin-TCN integrated model proposed in the present invention fully utilizes the global time domain feature capability of the SE-TCN branch network and the local feature extraction capability of the Swin Transformer branch network, realizes the comprehensive extraction of fault features, and has stronger fault classification capability than the traditional model. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 Swin-TCN integrated model structure diagram
[0032] Figure 2 Swin Transformer Blocks structure diagram;
[0033] Figure 3 Conv Group Structure DETAILED DESCRIPTION
[0034] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:
[0035] The present invention provides a rolling bearing fault diagnosis method based on the Swin-TCN integrated model, the steps of which are:
[0036] S1: Collect one-dimensional vibration signals of rolling bearings in normal state and various fault states, and pre-process the collected original vibration signals;
[0037] S2: Combine FFT and VMD to extract the time-frequency domain features of the signal;
[0038] S3: Build and train the network model, output the model diagnosis results, and analyze the diagnosis results.
[0039] Step S1 includes:
[0040] An acceleration sensor is used to collect one-dimensional vibration signals of rolling bearings under different fault types, with an acquisition frequency of 5120Hz. Among the collected data, 1048560 vibration signal data of five types, including normal state, inner ring fault, outer ring fault, rolling element fault and combined fault (inner ring fault and outer ring fault exist at the same time) are selected (sampling time is 204.8s). The data will be divided into multiple samples, each sample contains 1024 time steps of data, and the overlap rate when dividing the samples is set to 0.5.
[0041] The number of samples after segmentation is calculated by formula (1). In formula (1), N is the number of data (1048560), time_steps is the time step (1024), and stride is the step size (512, because the overlap rate is 0.5). For 1,048,560 data, 2046 samples can be generated in this way. Since there are 5 categories, 10230 samples are finally generated.
[0042] samples=(N-time_steps) / / stride+1 (1)
[0043] The generated samples are divided into training set, validation set and test set in the ratio of 7:2:1.
[0044] Step S2 includes:
[0045] The whole process performs the following processing on the one-dimensional vibration signal data in the training set, validation set and test set respectively;
[0046] S21: performing FFT processing on the one-dimensional vibration signal data, converting the signal from the time domain to the frequency domain, and obtaining the spectrum information of the signal;
[0047] S22: Apply VMD to the one-dimensional vibration signal data and decompose it into a series of modal functions. These modal functions represent the time-frequency characteristics of the signal at different scales;
[0048] S23: Combine FFT and VMD, stack and fuse the multi-scale features extracted by FFT and VMD to form a two-dimensional feature matrix, and convert the two-dimensional feature matrix of each sample into a feature tensor after processing. The three-dimensional feature tensor formed after conversion can also be regarded as a set composed of the two-dimensional matrices of each sample.
[0049] By performing VMD (variational mode decomposition) and FFT (fast Fourier transform) processing on each sample in the training set, validation set, and test set, the time-frequency domain features of the signal data are extracted, and new training sets, validation sets, and test sets are generated for subsequent model training.
[0050] Step S3 includes:
[0051] S31: Build the Swin-TCN integrated model and initialize the model. The Swin-TCN integrated model includes the SE-TCN branch network and the Swin Transformer branch network;
[0052] The window attention mechanism of the Swin Transformer branch network can extract local features of fault signals.
[0053] As attached Figure 1 As shown in the right part: the Swin Transformer branch network includes a Patch Partition module and 4 Stages. Stage 1 is composed of a Linear Embedding module and 2 Swin Transformer Block modules in series; Stage 2 is composed of a Patch Merging module and 2 Swin Transformer Block modules in series; Stage 3 is composed of a Patch Merging module and 6 Swin Transformer Block modules in series; Stage 4 is composed of a Patch Merging module and 2 Swin Transformer Block modules in series.
[0054] Combined with Figure 1The entire process of the Swin Transformer branch network is further explained: the input feature tensor first passes through the Patch Partition module, which divides the input feature tensor into fixed-size blocks (patches). These patches are the units for subsequent window attention mechanism operations. Stage 1 consists of a Linear Embeding module and two Swin Transformer Block modules, which are mainly used to initialize features and extract basic local features. The Linear Embedding module in Stage 1 is usually used to map the original features of each patch to a high-dimensional space to facilitate effective information interaction in subsequent Swin Transformer Blocks. Stage 2 consists of a Patch Merging module and two Swin Transformer Block modules. Stage 2 introduces the Patch Merging module, which reduces the spatial dimension of the feature by merging adjacent patches while increasing the channel dimension. This helps the network capture features at different scales. Stage 2 continues to extract local features based on Stage 1. The subsequent Stage 3 and Stage 4 continue to use the Patch Merging module and more Swin Transformer Block modules to further merge patches and extract features at a deeper level while maintaining the integrity of the information. Through the above operations, the Swin Transformer branch network realizes the extraction of local features of the input data.
[0055] Attached Figure 2Two Swin Transformer Block modules connected in series are shown. The Swin Transformer Block module is the core of the Swin Transformer branch network, which contains the window attention mechanism and residual connection. As can be seen from the figure: In Block1, we first use the LN module to normalize the input feature tensor to ensure that the feature vector of each sample is at the same scale. Next, we use the W-MSA module to divide the feature matrix into non-overlapping windows and perform multi-head self-attention operations independently in each window to capture local temporal dependencies and patterns in the time series. Then, the output of W-MSA is added to the original input feature tensor through the residual connection, which retains the input information while preventing the gradient from disappearing, so that the model can converge quickly. The feature tensor after the residual connection is normalized by the LN module and then the MLP module is used to perform nonlinear transformation on the feature tensor to enhance the model's ability to express the characteristics of time series data. Finally, the output of the MLP module is added to the output after the first residual connection to achieve a secondary residual connection. The feature tensor is processed and input into Block2. The process of Block2 is basically the same as Block1, but Block2 replaces the W-MSA module in Block1 with the SW-MSA module. The SW-MSA module increases the coverage of the model by shifting the window. This allows the attention operation to cover areas that were not covered before. This series of operations constitutes a complete processing flow between every two Swin TransformerBlock modules.
[0056] The temporal convolutional network (TCN) optimized based on the channel attention mechanism (SENet) can extract the global time domain features of the signal. Figure 1 As shown in the left part: The SE-TCN branch network consists of three residual blocks, each of which consists of two convolutional layer groups (Conv Group) and a residual connection.
[0057] As attached Figure 3 As shown in the figure, the convolution layer group in the SE-TCN branch network consists of a dilated convolution layer (Dilated CausalConv), a chomp layer (Chomp), an activation function (ReLU), a channel attention module (SEBlock) and a Dropout layer. The dilated convolution layer is a special convolution layer that expands the receptive field of the convolution kernel by introducing a dilation rate, so that the network can capture dependencies at a longer distance without increasing the number of parameters. The mathematical expression of the dilated convolution is formula (2)
[0058]
[0059] Where y[t] is the output of the convolution operation, w[k] is the weight of the convolution kernel, x[td·k] is the element of the input sequence, and d is the dilation rate. The cropping layer ensures that the output length after the convolution operation is consistent with the input length. The ReLU activation function introduces nonlinearity and increases the representation ability of the network. The channel attention mechanism adjusts the response of the channel through the learned weights, enhancing useful features and suppressing unimportant features. The Dropout layer is used to randomly discard the activation information of a part of the neurons during training to reduce overfitting.
[0060] In the SE-TCN branch network, the residual connection is responsible for adding the input data and the output data after processing by a series of convolutional layer groups. In this way, without adding additional parameters, the residual connection directly passes the input data to the output, which helps to keep more original information during the training process. The Conv1d layer is used as a downsampling layer in the residual connection to adjust the dimension of the input data to match the dimension of the output data, so as to facilitate the addition of the input data and the processed output data.
[0061] By combining the convolutional layer group and the residual connection, the entire process inside the residual block is explained: the input x passes through two convolutional layer groups to obtain the output y, and y is added to the input x processed by the Conv1d layer to obtain the output of the residual block. The process is shown in formula (3)
[0062] Output=x+Conv1D(x) (3)
[0063] The features extracted by the SE-TCN branch network and the Swin Transformer branch network are fused after being processed by the Adaptive Average Pooling layer, and the fused features are input into the FC layer (Fully Connected Layer) and the SM layer (Softmax Layer) to obtain the fault diagnosis and recognition results of the model.
[0064] S32: After the model is built, the initial network model is trained using the training set and verified using the validation set to prevent overfitting. The model's hyperparameters are set to the hyperparameters used for the best performance during training, and then the test set is input into the model using the hyperparameters to evaluate the model's diagnostic performance using the test set.
[0065] S33: Compare the fault diagnosis effects of the Swin-TCN integrated model with other models. The results are shown in Table 1:
[0066] Table 1: Diagnostic performance of different models
[0067]
[0068] From the data in the table, it can be seen that the model proposed in the present invention is higher than other models in four evaluation indicators. This fully proves that the model has stronger feature extraction ability than some traditional models and can achieve higher accuracy fault identification.
[0069] The Swin-TCN integrated model combines the TCN network embedded with the channel attention module with the Swin Transformer network. It makes full use of the ability of the window attention mechanism in the SWin Transformer network to extract local features of fault signals and the ability of the SE-TCN branch network to extract global time domain features. The local features and global time domain features extracted by the two branches are fused through a parallel model, thereby improving the feature representation ability and achieving good results in fault diagnosis.
[0070] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A rolling bearing fault diagnosis method based on Swin-TCN integrated model, characterized in that: The method comprises the following steps: S1: Collect one-dimensional vibration signals of rolling bearings in normal state and various fault states, and pre-process the collected original vibration signals; S2: Combine fast Fourier transform (FFT) and variational mode decomposition (VMD) to extract signal features in time and frequency domains; S3: Build and train the Swin-TCN integrated model, output the model diagnosis results, and analyze the diagnosis results.
2. The method according to claim 1, characterized in that: Step S1 includes: S11: using an acceleration sensor to collect one-dimensional vibration signals of rolling bearings under different fault types, with a collection frequency of 5120 Hz; S12: Segment the collected data into multiple samples, each sample contains data of 1024 time steps, and the overlap rate when segmenting the samples is set to 0.5; S13: Divide the generated samples into training set, validation set and test set in a ratio of 7:2:
1.
3. The method according to claim 1, characterized in that Step S2 includes: S21: Perform FFT processing on the one-dimensional vibration signal data, convert the signal from the time domain to the frequency domain, and obtain the spectrum information of the signal; S22: Apply VMD to the one-dimensional vibration signal data to decompose it into a series of modal functions, which represent the time-frequency characteristics of the signal at different scales; S23: The multi-scale features extracted by FFT and VMD are stacked and fused to form a two-dimensional feature matrix, and the two-dimensional feature matrix of each sample is converted into a feature tensor.
4. The method according to claim 1, characterized in that: Step S3 includes: S31: Build a Swin-TCN integrated model, which includes a SE-TCN branch network and a Swin Transformer branch network; S32: Use the training set to train the initial network model, and verify it through the validation set to prevent overfitting; S33: Use the test set to evaluate the diagnostic performance of the model.
5. The Swin-TCN integrated model according to claim 4, characterized in that: The model includes: The SE-TCN branch network consists of three residual blocks, each of which consists of two convolutional layer groups and a residual connection; Swin Transformer branch network, including Patch Partition module and 4 Stages, each Stage consists of multiple Swin Transformer Block modules; The features extracted by the SE-TCN branch network and the Swin Transformer branch network are fused after being processed by the Adaptive Average Pooling layer; The fused features are input into the FC layer (Fully Connected Layer) and the SM layer (Softmax Layer) to obtain the fault diagnosis and recognition results.
Citation Information
Cited By
Fan gearbox fault diagnosis method, device and system and storage medium
CN120123738A
Mining motor fault detection model training method and mining motor fault detection method
CN120632706A
