Motor bearing small sample fault diagnosis method based on Markov transfer field and Swin transfer former
Through the combination of Markov transfer field and Swin transformer, the problems of lack of data and complex signal processing in motor bearing fault diagnosis are solved, more accurate fault diagnosis is achieved, and the identification effect of the model is improved.
Patent Information
- Application Number
- CN202410804232.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-11-22
AI Technical Summary
Existing deep learning algorithms have difficulty in feature extraction, overfitting or underfitting in motor bearing fault diagnosis, especially in terms of data scarcity and complex signal processing, which affects the identification effect of the model.
The method based on Markov transfer field and Swin transformer is adopted to enhance the fault data through compression perception and orthogonal matching tracking methods, convert the one-dimensional time domain signal into a two-dimensional image, and use the Swin transformer model for fault diagnosis.
It effectively solves the problems of lack of fault data, complex signal processing and professional knowledge reliance on feature extraction, and improves the accuracy and reliability of fault diagnosis.
Smart Images

Figure CN119004199A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of motor fault diagnosis, and in particular relates to a motor bearing small sample fault diagnosis method based on Markov transfer field and Swintransformer. Background Art
[0002] As the core component of the motor for rotating motion, the bearing is an important component to ensure the efficient and stable operation of the motor equipment. As the "hub" connecting the rotating parts and the fixed parts of the motor, during the operation of the motor, the inner and outer rings of the bearing will be subjected to multiple alternating radial and axial loads. If they are in such a complex and harsh working environment for a long time, the inner and outer rings of the bearing are prone to cracking, wear and other faults. If the fault is not discovered in a timely and effective manner, it may affect the normal operation of other components in the motor system, and then trigger a series of chain reactions, which may lead to catastrophic consequences such as economic losses or casualties in severe cases. Therefore, timely and effective fault diagnosis and health status monitoring of motor bearings are of great significance to ensure the safety and reliability of the motor system.
[0003] Data-driven fault diagnosis algorithms based on deep learning are widely used in motor fault diagnosis. As one of the most representative deep learning algorithms, convolutional neural networks can reduce the dimensionality of massive data through convolution operations, effectively extract potential hidden information in the data, and complete fault identification and classification tasks. However, such algorithms have certain limitations: (1) The feature loss problem is prone to occur in the one-dimensional time domain signal feature extraction process, resulting in poor model performance; (2) The convolution operation of the convolutional neural network is limited by the size of the receptive field, and it is difficult to capture the global information features of the input data, which seriously affects the recognition effect of such models; (3) In actual engineering applications, motor bearings are in normal state most of the time, which makes it difficult to collect fault data and has fewer effective fault samples, which may cause problems such as overfitting or underfitting of deep learning models.
[0004] In view of these problems in traditional methods, the present invention proposes a small sample fault diagnosis method for motor bearings based on Markov transfer field and Swintransformer. Summary of the invention
[0005] In order to overcome the shortcomings of the prior art, the present invention provides a motor bearing small sample fault diagnosis method based on Markov transfer field and Swin transformer. First, the method expands the limited motor bearing fault data according to the compressed sensing and orthogonal matching pursuit method to realize the enhancement operation of the original fault data sample; secondly, the one-dimensional time domain information is converted into a two-dimensional visual image through the Markov transfer field, avoiding the complex signal processing process. Finally, the two-dimensional image is input into the Swin transformer neural network to realize the motor bearing fault diagnosis.
[0006] The technical solution adopted by the present invention is a small sample fault diagnosis method for motor bearings based on Markov transfer field and Swin transformer. The specific contents are as follows:
[0007] Step 1: Enhancement and expansion of limited fault data. According to the theory of compressed sensing, if the motor bearing vibration signal S has sparse characteristics in a certain transformation domain Ψ, then
[0008] S=Ψθwhere Ψ∈R N×N is a sparse basis, θ∈R N×1 is a sparse coefficient, which includes K non-zero elements (K-sparse).
[0009] When there exists a measurement matrix Φ∈R that is uncorrelated with Ψ M×N (M<<N),the original vibration signal S can be linearly projected into a low-dimensional observation vector z∈R M×1 , thereby realizing the compressed sampling of the signal, that is, z = ΦS
[0010] From the above formula, we can get
[0011] z=ΦΨθ=Aθ
[0012] Where A∈R M×N is the sensor matrix.
[0013] According to the theory of compressed sensing, in order to ensure that the target signal S can be accurately reconstructed, the sensor matrix A needs to satisfy the constrained isometry property, that is, if for any K-sparse vector θ there exists a constant δ K ∈(0,1) such that
[0014]
[0015] The sensing matrix A is said to satisfy the K-order constrained isometric property. So far, the compressed sampling part of the signal is completed.
[0016] Signal reconstruction is an important part of compressed sensing theory, that is, reconstructing a signal S with dimension N×1 through an observation vector z with dimension M×1. According to the above discussion, the signal reconstruction problem corresponding to the above formula can be solved in l 0Solve under the minimum norm framework, that is,
[0017] θ * =arg min||θ|| 0 stz=Aθ
[0018] However, since M<<N, solving the above equation is an underdetermined problem and is not easy to solve. In order to solve this problem, the orthogonal matching pursuit algorithm is used to achieve an approximate solution to the above equation. Orthogonal matching pursuit is a nonlinear adaptive algorithm. The core idea of the algorithm is to select the column vector in the sensor matrix A in a greedy iterative manner so that the column vector a selected in each iteration is j (j=1, 2, ..., n) is most relevant to the current residual r, and then the relevant part is subtracted from the compressed observation vector z and iterated repeatedly until the number of iterations g equals the sparsity K. The orthogonal matching pursuit algorithm estimates the sparse coefficient θ of the signal under the sparse dictionary Ψ and obtains the estimated sparse coefficient θ * After that, the original high-dimensional signal can be restored and reconstructed by the following formula.
[0019] S * =Ψθ *
[0020] In the formula, S * To recover the reconstructed signal, θ * is the estimated sparse coefficient.
[0021] Step 2): Convert the original vibration signal of the motor bearing and the restored and reconstructed signal in step 1) into a two-dimensional image of the Markov transfer field. Assume that the original and reconstructed vibration signals of the motor bearing are X = [x 1 x 2 …x n ] T (x n is the nth element in X), its value can be divided into H discrete quantile units, through the quantile q j (q j ∈[1H]) marks the discrete quantile unit, and according to the division of each unit, each time series value x n Mapped to the corresponding quantile unit q j According to the first-order Markov chain principle, the transition probability between quantiles is calculated, and a Markov matrix W with a dimension of H×H is constructed, that is,
[0022]
[0023] w ij =p(x t ∈q i |x t-1 ∈q j )
[0024] In the formula, w ij is located at the quantile q i All vibration data points in the region are transferred to quantile q at the next moment j The probability in the region, p(·) represents the probability calculation. However, the matrix W ignores the dependence between the distribution of data points in the time series X and the time step, resulting in the loss of most of the information in the original time series. To solve this problem, the matrix W is expanded to the Markov transform domain to obtain the matrix M, which is
[0025]
[0026] In the formula, m ij For x i The quantile area q i to x j The quantile area q j The transition probability. ij||i-j|=a Represents the probability of transition between sampling points with a time interval of a. If a = 0, the elements on the main diagonal of the matrix M represent the probability of each quantile transitioning to itself. By mapping the value range of each element in the matrix M from [0, 1] to [0, 255], so that it corresponds to the pixel value in the image, a two-dimensional image is obtained.
[0027] Step 3): Input the Markov transfer field two-dimensional image generated in step 2) into the Swin transformer neural network model to realize the classification and identification of different bearing fault states of the motor.
[0028] The specific steps of the Swin transformer neural network model are:
[0029] 1. Use the image block segmentation layer to segment the Markov transfer field two-dimensional image with input dimensions of H×W×C (height×width×channel), that is, each 4×4 adjacent pixel value is a block, and each block contains 16 pixels. Then flatten it in the channel dimension. Since the Markov transfer field image is a color image, each pixel value contains three values of R, G and B (red, green and blue), so the flattened value becomes 16×3=48. After processing by the image block segmentation module, the Markov transfer field image dimension becomes H / 4×W / 4×48.
[0030] 2. Construct image feature maps of different dimensions through four stages. Among them, stage 1 first uses a linear embedding layer to linearly transform the image of dimension H / 4×W / 4×48 to an arbitrary dimension C (C=96 in the model structure of the present invention). In stage 2, the image is downsampled by 2 times through the image merging layer, and then input to the Swin-T module, and the output image dimension becomes H / 8×W / 8×2C. Similarly, after the image passes through the subsequent stage 3 and stage 4 processes, the output image dimensions become H / 16×W / 16×4C and H / 32×W / 32×8C respectively.
[0031] 3. Finally, after layer normalization and global average pooling of the feature outputs from the four stages, the distributed features are mapped to the sample label space through the fully connected layer to obtain the final classification and recognition results.
[0032] Compared with the existing technical solutions, the technical solutions of the present invention have the following beneficial effects:
[0033] Aiming at the problems of lack of fault data, complex signal processing and high reliance on professional knowledge in traditional bearing fault diagnosis methods, this paper proposes a small sample fault diagnosis method for motor bearings based on Markov transfer field and Swin transformer, and obtains the following conclusions:
[0034] (1) The problem of lack of fault data is effectively solved by generating new data samples through the compressed sensing method and taking advantage of the randomness and diversity of the Gaussian random matrix;
[0035] (2) The Markov transfer field algorithm can fully extract the hidden features in the one-dimensional bearing vibration data, and the visualized two-dimensional image can effectively characterize the characteristic information of different fault categories;
[0036] (3) The Swin transformer model can effectively identify bearing fault categories corresponding to different Markov transfer field images. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 is a schematic diagram of the compressed sensing principle of the present invention;
[0038] Figure 2 It is a flow chart of two-dimensional image conversion based on Markov transition field of the present invention;
[0039] Figure 3 It is a hierarchical structure diagram of the Swin transformer of the present invention;
[0040] Figure 4 It is the overall structure diagram of the Swin transformer of the present invention;
[0041] Figure 5 It is the Swin-T module diagram of the present invention;
[0042] Figure 6 It is a schematic diagram of the window multi-head self-attention and shift window multi-head self-attention principles of the present invention;
[0043] Figure 7 is the overall fault diagnosis block diagram of the present invention; DETAILED DESCRIPTION
[0044] The following is a detailed description of a motor bearing small sample fault diagnosis method based on Markov transfer field and Swintransformer of the present invention in conjunction with the embodiments and drawings.
[0045] The method of the present invention comprises the steps of:
[0046] Step 1: Enhancement and expansion of limited fault data. According to the theory of compressed sensing, if the motor bearing vibration signal S has sparse characteristics in a certain transformation domain Ψ, then
[0047] S=Ψθ (1)
[0048] Where Ψ∈R N×N is a sparse basis, θ∈R N×1 is a sparse coefficient, which includes K non-zero elements (K-sparse).
[0049] When there exists a measurement matrix Φ∈R that is uncorrelated with Ψ M×N (M<<N),the original vibration signal S can be linearly projected into a low-dimensional observation vector z∈R M×1 , thereby realizing the compressed sampling of the signal, that is,
[0050] z=ΦS (2)
[0051] Substituting formula (1) into formula (2), we can get
[0052] z=ФΨθ=Aθ (3)
[0053] Where A∈R M×N is the sensor matrix.
[0054] According to the theory of compressed sensing, in order to ensure that the target signal S can be accurately reconstructed, the sensor matrix A needs to satisfy the constrained isometry property, that is, if for any K-sparse vector θ there exists a constant δ K ∈(0,1) such that
[0055]
[0056] Then the sensing matrix A is said to satisfy the K-order constrained isometric property. So far, the compressed sampling part of the signal is completed. The principle of compressed sensing is as follows Figure 1 Shown
[0057] Signal reconstruction is an important part of compressed sensing theory, that is, reconstructing a signal S with dimension N×1 through an observation vector z with dimension M×1. According to the above discussion, the signal reconstruction problem corresponding to equation (3) can be solved in l 0 Solve under the minimum norm framework, that is,
[0058] θ * =arg min||θ|| 0 stz=Aθ (5)
[0059] However, since M<<N, solving equation (3) is an underdetermined problem and is not easy to solve. In order to solve this problem, the orthogonal matching pursuit algorithm is used to achieve an approximate solution to the above equation. Orthogonal matching pursuit is a nonlinear adaptive algorithm. The core idea of the algorithm is to select the column vector in the sensor matrix A in a greedy iterative manner so that the column vector a selected in each iteration is j (j=1, 2, ..., n) is most relevant to the current residual r, and then the relevant part is subtracted from the compressed observation vector z and iterated repeatedly until the number of iterations g equals the sparsity K. The orthogonal matching pursuit algorithm estimates the sparse coefficient θ of the signal under the sparse dictionary Ψ and obtains the estimated sparse coefficient θ * After that, the original high-dimensional signal can be restored and reconstructed by the following formula.
[0060] S * =Ψθ * (6)
[0061] In the formula, S * To recover the reconstructed signal, θ * is the estimated sparse coefficient.
[0062] Each time compressed sampling is performed, the constructed Gaussian random matrix has strong randomness and diversity, so the obtained low-dimensional observation vector z is also different, which can enhance and expand the bearing vibration data.
[0063] Step 2): Convert the original vibration signal of the motor bearing and the restored and reconstructed signal in step 1) into a two-dimensional image of the Markov transfer field. Assume that the original and reconstructed vibration signals of the motor bearing are X = [x 1 x 2 …x n ] T (x n is the nth element in X), its value can be divided into H discrete quantile units, through the quantile q j (q j ∈[1H]) marks the discrete quantile unit, and according to the division of each unit, each time series value x nMapped to the corresponding quantile unit q j According to the first-order Markov chain principle, the transition probability between quantiles is calculated, and a Markov matrix W with a dimension of H×H is constructed, that is,
[0064]
[0065] w ij =p(x t ∈q i |x t-1 ∈q j ) (8)
[0066] In the formula, w ij is located at the quantile q i All vibration data points in the region are transferred to quantile q at the next moment j The probability in the region, p(·) represents the probability calculation. However, the matrix W ignores the dependence between the distribution of data points in the time series X and the time step, resulting in the loss of most of the information in the original time series. To solve this problem, the matrix W is expanded to the Markov transform domain to obtain the matrix M, that is,
[0067]
[0068] In the formula, m ij For x i The quantile area q i to x j The quantile area q j The transition probability. ij||i-j|=a represents the probability of transition between sampling points with a time interval of a. If a = 0, the elements on the main diagonal of the matrix M represent the probability of each quantile transitioning to itself. By mapping the value range of each element in the matrix M from [0, 1] to [0, 255], so that it corresponds to the pixel value in the image, a two-dimensional image is obtained. Taking the vibration signal as an example, the Markov transition field two-dimensional image conversion process is as follows Figure 2 shown.
[0069] Step 3): Input the Markov transfer field 2D image generated in step 2) into the Swin transformer neural network model to classify and identify the fault states of different motor bearings. Figure 3 The hierarchical structure shown in the figure downsamples the image by 4 times, 8 times, and 16 times in the image feature map, respectively. This structure is well adapted to tasks such as classification, target detection, and instance segmentation.
[0070] The architecture of the Swin transformer network is as follows Figure 4 As shown, the execution process is as follows:
[0071] 1. Use the image block segmentation layer to segment the Markov transfer field two-dimensional image with input dimensions of H×W×C (height×width×channel), that is, each 4×4 adjacent pixel value is a block, and each block contains 16 pixels. Then flatten it in the channel dimension. Since the Markov transfer field image is a color image, each pixel value contains three values of R, G and B (red, green and blue), so the flattened value becomes 16×3=48. After processing by the image block segmentation module, the Markov transfer field image dimension becomes H / 4×W / 4×48.
[0072] 2. Construct image feature maps of different dimensions through four stages. Among them, stage 1 first uses a linear embedding layer to linearly transform the image of dimension H / 4×W / 4×48 to an arbitrary dimension C (C=96 in the model structure of the present invention). In stage 2, the image is downsampled by 2 times through the image merging layer, and then input to the Swin-T module, and the output image dimension becomes H / 8×W / 8×2C. Similarly, after the image passes through the subsequent stage 3 and stage 4 processes, the output image dimensions become H / 16×W / 16×4C and H / 32×W / 32×8C respectively.
[0073] The Swin-T module consists of two different structures: Figure 5 The difference between the two structures is that one uses a window multi-head self-attention module and the other uses a shifted window multi-head self-attention module. Figure 6 The calculation process of window multi-head self-attention and shifted window multi-head self-attention is shown. Assume that the window multi-head self-attention module of the Lth layer divides the feature map into multiple windows of size P×P, and then performs self-attention calculation on the pixel values inside each window. At this time, information transfer between windows cannot be achieved. In the subsequent shifted window multi-head self-attention module of the L+1 layer, the window position is offset (the window is offset from the upper left corner to the bottom and right by P / 2 pixels respectively). At this time, the offset window can achieve information transfer. For example, the window with a dimension size of 2×4 in the first row and second column of layer L+1 can realize information interaction between the two windows in the first row of layer L. Since window multi-head self-attention and shifted window multi-head self-attention are used in pairs, the number of Swin-T modules stacked is an even number of times.
[0074] The Swin-T module is expressed in mathematical form, namely
[0075]
[0076]
[0077]
[0078]
[0079] Where MLP is a multi-layer perceptron, W-WSA and SW-MSA are window multi-head self-attention and shift window multi-head self-attention, respectively. l and are the output features of the l-th layer MLP and the output features of W-MSA respectively; v l+1 and They are the output features of the l+1th layer MLP and the output features of SW-MSA, LN is the layer normalization, which can be expressed as
[0080]
[0081] In the formula, y is the normalized output of the layer, α and β are the learnable weight parameters and bias parameters respectively, and a l is the activation value of the neurons in the lth layer, μ l and σ l are the mean and variance respectively, which can be expressed as
[0082]
[0083]
[0084] Where R is the number of neurons in the hidden layer l of the neural network, is the activation value of the i-th neuron in the l-th layer.
[0085] The attention calculation process of W-MSA and SW-MSA in equations (10) and (12) can be expressed as follows:
[0086]
[0087] In the formula, Attention(·) is the attention value calculation, Q, K and V are the query matrix, the key matrix to be queried and the value matrix to be queried respectively, B represents the learnable relative position encoding matrix, and D k As a matrix composed of dimensional values for each key, the Softmax function can be expressed as
[0088]
[0089] In the formula, J is the number of categories, I i The i-th parameter input to the Softmax function.
[0090] 3. Finally, after layer normalization and global average pooling of the feature outputs from the four stages, the distributed features are mapped to the sample label space through the fully connected layer to obtain the final classification and recognition results.
[0091] In summary, the overall fault diagnosis block diagram of the present invention is as follows: Figure 7 As shown in the figure. Firstly, by introducing compressed sensing theory and orthogonal matching pursuit algorithm, the motor bearing vibration signal data is enhanced and expanded; secondly, using Markov transfer field algorithm as a medium, the one-dimensional time series is converted into a two-dimensional image to visualize the fault characteristics; finally, the Markov transfer field images of different bearing fault types are input into the Swin transformer model to classify and identify different bearing fault states.
[0092] From the above description, it can be seen that the present invention proposes a small sample fault diagnosis method for motor bearings based on Markov transfer field and Swin trasformer, which effectively solves the problems of lack of fault data, complex signal processing process and high reliance on professional knowledge in the fault feature extraction process.
[0093] The above description of the functions and working processes of the present invention in combination with the drawings in the specification is only one of the preferred implementation cases, but the present invention is not limited to the above-mentioned specific functions and working processes. The above-mentioned specific implementation methods are only illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which are all within the protection scope of the present invention.
Claims
1. A small sample fault diagnosis method for motor bearings based on Markov transfer field and Swin transformer, characterized in that: The following steps are involved: 1) According to the compressed sensing theory and orthogonal matching pursuit algorithm, the limited bearing fault data is enhanced and expanded. The enhanced and expanded data can retain the main features of the original vibration data to the greatest extent. 2) Using the Markov transfer field method, the original bearing vibration data and the enhanced and expanded data in step 1) are converted into two-dimensional images to visualize the fault characteristics and avoid complex signal processing. A two-dimensional image dataset is constructed. 3) According to the two-dimensional image dataset constructed in step 2), it is divided into training samples and test samples, and the classification and identification of different bearing fault types are realized with the help of the Swin transformer neural network model.
Citation Information
Cited By
Equipment fault diagnosis method and device based on sparse dictionary combined with large language model
CN119862965A
