A fault adaptive diagnosis method integrating deep convolution and self-attention network

By constructing a multi-scale time-frequency feature map and global statistical feature matrix, combining lightweight networks and self-attention mechanisms, deep feature extraction is optimized, and the problem of global time-frequency feature and domain-invariant feature extraction in rotating mechanical equipment fault diagnosis is solved. Improved diagnostic accuracy and migration capabilities.

CN117235490BActive Publication Date: 2024-12-27CHINA UNIV OF MINING & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310101522.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-10
Publication Date
2024-12-27
Estimated Expiration
2043-02-10

AI Technical Summary

Technical Problem

In the fault diagnosis of rotating mechanical equipment, it is difficult to effectively extract the global time-frequency characteristics and domain-invariant characteristics of vibration signals in the prior art, resulting in insufficient diagnostic accuracy and migration capabilities.

Method used

The wavelet packet transformation is used to build a multi-scale time-frequency feature map and global statistical feature matrix, and combine lightweight networks and self-attention mechanisms to integrate deep convolution and self-attention networks, and optimize multi-core maximum average difference and domain adversarial neural network Deep feature extraction to improve cross-domain diagnostic capabilities.

Benefits of technology

Effectively extract the local and global time-frequency characteristics of rotating mechanical equipment, enhance the accuracy of the diagnostic model and the ability to migrate variable working conditions, and improve the anti-noise ability and scene adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117235490B_ABST
    Figure CN117235490B_ABST
Patent Text Reader

Abstract

The invention discloses a fault adaptive diagnosis method integrating deep convolution and self-attention network, which relates to the field of fault diagnosis. Firstly, a multi-scale time-frequency feature map and a global statistical feature matrix of a vibration signal are constructed by using wavelet packet transform. Then, a deep feature extraction network combining a residual network ResNet and a SAM network is designed to realize the fusion extraction of local and global time-frequency features. Finally, a joint loss function is constructed by combining a multi-core maximum mean difference MK‑MMD and a domain adversarial neural network DANN to optimize the deep feature extraction network, thereby improving the cross-domain invariance and fault state discrimination ability of the deep feature. The optimization method proposed in the invention gives full play to the advantages of high-dimensional spatial distribution difference evaluation and gradient inversion adversarial strategy, proves its effectiveness through the variable working condition transfer fault diagnosis task, and shows superior performance compared with other intelligent fault diagnosis methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of fault diagnosis, and in particular to a fault adaptive diagnosis method integrating deep convolution and self-attention network. Background Art

[0002] Rotating machinery plays an important role in various industries, such as industrial manufacturing, aerospace, and transportation. Rolling bearings are also key components of rotating machinery. They run at high speeds in complex working environments for a long time, and damage and failure are inevitable, leading to accidents and reduced efficiency. Therefore, fault diagnosis of rolling bearings is of great significance to ensure the safe operation of rotating machinery. Traditional bearing fault diagnosis methods are mainly based on time-frequency analysis and machine learning of vibration signals. However, traditional machine learning methods often need to select appropriate features based on the experience and knowledge of experts, and the selection of features directly affects the accuracy of bearing fault diagnosis. In addition, the above methods have a light structure and it is difficult to learn effective feature representations and nonlinear mapping relationships in complex systems.

[0003] Compared with traditional machine learning, deep learning has gained great attention in the field of fault diagnosis in recent years due to its powerful automatic deep feature extraction capabilities and end-to-end training mode integrated with classifiers. At the same time, considering the nonlinear and non-stationary characteristics of vibration signals, some scholars first processed the vibration signals in time and frequency, and then used deep learning methods to extract features from the time and frequency signals. Compared with the convolutional network's extraction of local signal features, the self-attention mechanism has a strong global feature extraction capability, and combined with deep learning, it can more effectively extract the fault features of vibration signals.

[0004] Fault diagnosis methods using deep learning usually require a large amount of labeled training data and assume that the training and test datasets have similar distributions. However, due to the ever-changing working conditions of the equipment (such as mechanical load and speed), it is difficult to ensure high distribution similarity of the sample datasets. Domain distribution adaptation methods solve the problem of variable working condition migration by finding a distribution space similar to the source domain and the target domain, and have become an important tool in the field of fault diagnosis. However, there are still the following issues that need further study:

[0005] (1) The time-frequency information of vibration signals must be organized more reasonably to improve the fault feature extraction capability of deep learning networks.

[0006] (2) Commonly used deep convolutional networks perform well in extracting local features of signals, but ignore the influence of global time-frequency features. Therefore, the processing of global time-frequency features needs further research.

[0007] (3) Domain-invariant features must be extracted more effectively to improve the domain adaptability of deep learning networks in diagnostic models. Summary of the invention

[0008] The technical problem to be solved by the present invention is to meet the demand for fault diagnosis of rotating machinery and equipment in actual industrial production, ensure the safe and reliable operation of rotating machinery, and reduce the risk of safety accidents caused by its failure. The present invention proposes a rolling bearing fault adaptive diagnosis method that integrates deep convolution and self-attention network to meet the high-precision fault classification requirements of the rotating machinery and equipment fault diagnosis model.

[0009] The present invention adopts the following technical solutions to solve the above technical problems:

[0010] A fault adaptive diagnosis method integrating deep convolution and self-attention network specifically comprises the following steps;

[0011] Step 1, using wavelet packet transform (WPT) to perform time-frequency analysis on the rolling bearing vibration signal, and establishing a multi-scale time-frequency feature map (MTFFM) and a global statistical feature matrix (GSFM) based on WPT;

[0012] Step 2, a deep feature extraction network LRSAN that integrates the lightweight network LRN and the self-attention SAM is used to realize the fusion extraction of local and global time-frequency features;

[0013] In step 3, a joint loss function is constructed through multi-core maximum mean difference MK-MMD and domain adversarial neural network DANN to optimize the deep feature extraction network, which is used to reduce the difference in the domain distribution of deep features under different working conditions and improve the cross-domain diagnostic ability of the deep transfer learning model LRSADTLM.

[0014] As a further preferred solution of the fault adaptive diagnosis method integrating deep convolution and self-attention network of the present invention, in step 1, the time-frequency analysis and processing of the vibration signal are specifically as follows:

[0015] WPT is used to perform time-frequency analysis on vibration signals, and a multi-scale time-frequency feature map MTFFM is constructed to improve the local fault feature extraction capability of LRN. The time-frequency statistical features of vibration signals are used to construct a feature matrix GSFM to extract the global time-frequency features of vibration signals.

[0016] Multi-scale time-frequency feature map MTFFM;

[0017] The vibration signal samples are decomposed by four-layer WPT to obtain 16 leaflet nodes of wavelet packets; each wavelet packet node has 256 wavelet packet coefficients; the wavelet packet coefficients of each leaflet node are constructed into a 16×16 coefficient matrix; the 16 coefficient matrices are reordered by Z-shaped stitching to obtain a 64×64 multi-scale time-frequency feature map MTFFM;

[0018] Global statistical feature matrix GSFM:

[0019] Perform WPT reconstruction on 16 wavelet envelope leaf nodes to obtain 16 reconstructed branch signals; calculate the envelope spectra of the 16 branch signals at the same time; calculate the seven statistical features of each branch signal and its envelope spectrum, and set them as the global statistical features of the vibration signal;

[0020] Specifically, a feature of the 16 branch signals, such as amplitude, is packaged into a 16-dimensional vector, and the statistical feature matrix A∈R is obtained. 7*16 ; Get the statistical characteristic matrix B∈R of 16 envelope spectra 7*16 ; Connect matrices A and B in series to obtain GSFM∈R 14*16 , as the input of the SAM network.

[0021] As a further preferred solution of the fault adaptive diagnosis method integrating deep convolution and self-attention network of the present invention, in step 2, the deep fusion feature extraction network LRSAN is as follows:

[0022] The local feature extraction capability of CNN makes it difficult to grasp the intrinsic relationship between the overall trend and local representation of multi-scale time-frequency signals of vibration signals;

[0023] The feature extraction network consists of two modules, LRN and SAM, which integrate the local time-frequency features based on LRN and the global statistical features based on SAM respectively;

[0024] 1) Lightweight ResNet LRN

[0025] The excitation response of defects in rotating machinery is often expressed in different time frequency segments in the vibration signal; the state characteristics of rolling bearings are also scattered in MTFFM, and the image size of MTFFM is very small; in the LRN network, a convolution kernel of size 3×3 is used, the convolution step is set to 1, the padding value is set to 1 or 0, only three residual structures are used, and the pooling operation of the middle layer is cancelled;

[0026] 2) Self-attention mechanism SAM network:

[0027] Set the input sequence X of the SAM network a =[x 1 ,x 2 ,...,x N ]∈R L*di , where L is the length of the sequence and di is the size of the elements in the sequence;

[0028] Input sequence X a Through a trainable linear projection W P ∈R di*dmEmbedded as a sequence Then in sequence X p Add a randomly initialized x0 to the head of the pos ∈R (L+1)*dm In the above example, the input embedding sequence is

[0029] The SAM network has four layers, each of which consists of a multi-head self-attention MSA module, a feed-forward layer, and a residual normalization layer;

[0030] Given an input embedding X∈R (L+1)*dm , the output sequence O∈R of the MSA layer (L+1)*dm Represents a feature sequence weighted by the attention matrix; the calculation formula of the self-attention mechanism is as follows:

[0031] O=MSA(X)=Concat(head1,...,head h )W O

[0032]

[0033] Q i =X·W i Q ,K i =X·W i K ,V i =X·W i V (1)

[0034] Among them, head i represents the i-th attention head, W i Q ∈R dm*dm , W i K ∈R dm*dm and W i V ∈R dm*dm represents the linear projection of the i-th attention head on the input embedding X to obtain different queries, keys, and values, respectively, W O ∈R h·dm*dm Refers to the linear transformation of multiple heads;

[0035] According to the input GSFM∈R 14*16 The size of the input embedding layer, position encoding and MSA network structure parameters are set in Table 3, and the feed-forward layer with two fully connected layers is set to FC1∈R 256*128 and FC2∈R 128*256 ; Through the SAM network, the global time-frequency characteristics of the vibration signal are extracted.

[0036] As a further preferred solution of the fault adaptive diagnosis method integrating deep convolution and self-attention network of the present invention, in step 3, the model optimization strategy based on MK-MMD and DANN is as follows:

[0037] The deep transfer learning model LRSADTLM consists of a deep feature extractor G LRSAN , a state classification network G y and a domain discrimination network G d In order to optimize the model, three loss functions are constructed, namely the classification loss L of the source domain y and the MK-MMD distribution difference loss L between the source domain and the target domain MK-MMD and the discrimination loss L d ; By minimizing the joint loss function, the network parameters are updated to improve the performance of the migration diagnosis task.

[0038] As a further preferred solution of the fault adaptive diagnosis method integrating deep convolution and self-attention network of the present invention, the classification loss L of the source domain y and the MK-MMD distribution difference loss L between the source domain and the target domain MK-MMD and the discrimination loss L d , as follows:

[0039] L MK-MMD :Under different working conditions, the similarity of data distribution is poor, resulting in a decrease in the accuracy of the model; in order to narrow the distribution difference and enhance the feature extractor's ability to extract domain variable features, MK-MMD is selected as the distance metric between the source domain and the target domain to evaluate the distribution shift, and the MK-MMD loss function is constructed; L MK-MMD The smaller the value, the more similar the distributions of the two samples are; s ={f i s} i=1,..n and F t ={f i t} i=1,..n Respectively represent the deep features of the source domain data and the target domain data after the deep feature extractor; L MK-MMD Represents the loss of MK-MMD between and:

[0040]

[0041] Where E is the mathematical expectation, represents the mapping of the reproducing Hilbert space, Hk represents the reproducing kernel Hilbert space with characteristic kernel k;

[0042] L d: In adversarial training, the domain discriminator G d Used to identify whether the sample data belongs to the source domain or the target domain, the loss function L d Contains two back propagations, used to update G LRSAN and G d The gradient reverse layer GRL makes the two networks form an adversarial relationship and optimizes through back propagation to achieve Nash equilibrium. d The loss function is as follows:

[0043]

[0044] L y :The rolling bearing status classifier consists of a fully connected layer and a softmax activation function, which outputs the category prediction of the source domain data; the cross entropy is used to calculate the fault classification loss L y , which measures the difference between the predicted label and the true label of the source domain, written as:

[0045]

[0046] Where n represents the number of categories, M represents the number of samples, F represents the sign function 0 or 1, and p ic represents the predicted probability that sample i belongs to category c;

[0047] Training strategy

[0048] Combining the optimization objective functions (2), (3) and (4), the joint optimization objective of LRSADTLM can be expressed as formula (5):

[0049]

[0050] Among them, the hyperparameters λ and μ are weight coefficients used to adjust the relationship between the losses;

[0051] The parameters of LRSADTLM are optimized using back-propagation and stochastic gradient descent methods by minimizing the joint loss function.

[0052] θ f ,θ y and θ d Respectively represent G LRSAN , G y and G d Parameters in θ f ,θ y and θ d Update according to formula (6);

[0053]

[0054]

[0055]

[0056] Among them, α represents the learning rate.

[0057] Compared with the prior art, the present invention adopts the above technical solution and has the following technical effects:

[0058] 1. Aiming at the problem that the deep learning method of existing rotating mechanical equipment easily ignores the global information of vibration signals, the present invention designs a global statistical feature matrix and a multi-scale wavelet packet time-frequency feature map to more reasonably organize the time-frequency information of the fault state of rotating mechanical equipment;

[0059] 2. In view of the fact that traditional deep learning models cannot fully extract effective features of vibration signals, the present invention designs and integrates LRN and SAM networks, constructs a deep fusion feature extraction network LRSAN, effectively extracts local and global information of signals, and enhances feature expression capabilities;

[0060] 3. Aiming at the problem of insufficient model diagnosis ability in variable working conditions, the present invention combines MK-MMD and DANN to evaluate the distribution difference between the deep features of source domain and target domain data, combines the source domain classification loss, completes the optimization of the deep feature extraction network, and improves the fault diagnosis accuracy of the variable working condition model;

[0061] 4. The rolling bearing fault adaptive diagnosis method of the present invention, which integrates deep convolution and self-attention network, has good variable working condition migration diagnosis capability, including state recognition accuracy, scene adaptability and noise resistance. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 It is a schematic diagram of the construction of MTFFM and GSFM of the present invention;

[0063] Figure 2 It is a flow chart of the deep fusion feature extraction network LRSAN of the present invention;

[0064] Figure 3 It is a schematic diagram of the LRSADTLM network structure of the present invention;

[0065] Figure 4 It is a schematic diagram of the convergence curve of the classification accuracy and loss of the present invention;

[0066] Figure 5 It is the t-SNE diagram and confusion matrix diagram obtained by the M3-M6 model transfer learning task P3->P2 of the present invention. DETAILED DESCRIPTION

[0067] 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.

[0068] The present invention implements a rolling bearing fault adaptive diagnosis method integrating deep convolution and self-attention network with the following technical scheme, which is as follows:

[0069] Step 1. Time-frequency analysis and processing of vibration signals

[0070] The present invention uses WPT to perform time-frequency analysis on vibration signals, constructs a multi-scale time-frequency feature map MTFFM, and improves the local fault feature extraction capability of LRN. At the same time, the time-frequency statistical characteristics of the vibration signal are used to construct the feature matrix GSFM, which is used to extract the global time-frequency characteristics of the vibration signal. Here, we take 4096 vibration signal samples as an example to introduce the time-frequency analysis process of the vibration signal by WPT. Figure 1 shown.

[0071] 1) Multi-scale time-frequency feature map (MTFFM)

[0072] WPT is a time-frequency analysis method that can effectively analyze and process nonlinear and non-stationary vibration signals. The present invention decomposes the vibration signal samples through four-layer WPT to obtain 16 leaflet nodes of wavelet packets. Each wavelet packet node has 256 wavelet packet coefficients. Then the wavelet packet coefficients of each leaflet node are constructed as a 16×16 coefficient matrix. Finally, the 16 coefficient matrices are reordered by Z-shaped stitching to obtain a 64×64 multi-scale time-frequency feature map MTFFM.

[0073] 2) Global Statistical Feature Matrix (GSFM)

[0074] The above 16 wavelet envelope leaf nodes are reconstructed by WPT to obtain 16 reconstructed branch signals. The envelope spectra of the 16 branch signals are calculated at the same time. Then, the seven statistical features and their envelope spectra of each branch signal are calculated. The calculation formulas of the seven statistical features are shown in Table 1. Table 1 Seven statistical features of vibration signal samples (x represents a sequence of length n) are set as global statistical features of vibration signals. Specifically, a certain feature (such as amplitude) of the 16 branch signals is packaged into a 16-dimensional vector, and the statistical feature matrix A∈R is obtained. 7*16 Similarly, we get the statistical characteristic matrix B∈R of the 16 envelope spectra 7*16 Finally, concatenate matrices A and B to obtain GSFM∈R 14*16, as the input of the SAM network.

[0075] Table 1

[0076]

[0077] Step 2. Deep Fusion Feature Extraction Network LRSAN

[0078] The local feature extraction capability of CNN makes it difficult to grasp the intrinsic relationship between the overall trend and local representation of the multi-scale time-frequency signal of the vibration signal. Therefore, based on the self-attention mechanism, the present invention designs a unique deep fusion feature extraction network, called LRSAN. Figure 2 As shown in Figure 1, the feature extraction network consists of two modules, LRN and SAM, which integrate the local time-frequency features based on LRN and the global statistical features based on SAM respectively. The design details of each module are as follows.

[0079] 1) Lightweight ResNet (LRN)

[0080] The excitation response of the defects of rotating machinery is often expressed in different time frequency segments in the vibration signal. Therefore, the state characteristics of the rolling bearing will also be scattered in the MTFFM. Figure 1 It can be seen that the image size of MTFFM is very small. Based on this, unlike the conventional deep convolutional residual network, the present invention designs a lightweight Resnet Block (LRN) to prevent the network from being too complex and causing a decrease in the generalization ability of the model. In the LRN network, a convolution kernel of size 3×3 is used, the convolution step is set to 1, the padding value is set to 1 or 0, only three residual structures are used, and the pooling operation of the middle layer is cancelled. The specific model structure parameters are shown in Table 2.

[0081] Table 2

[0082]

[0083]

[0084] 2) Self-Attention Mechanism (SAM) Network

[0085] We set the input sequence X of the SAM network a =[x 1 ,x 2 ,...,x N ]∈R L*di , where L is the length of the sequence and di is the size of the elements in the sequence. a Through a trainable linear projection W P ∈R di*dm Embedded as a sequence Then in sequence Xp Add a randomly initialized x0 to the head of the pos ∈R (L+1)*dm Finally, the input embedding sequence

[0086] The SAM network has four layers. Each layer consists of a "multi-head" self-attention (MSA) module, a feed-forward layer, and a residual normalization layer. Given an input embedding X∈R (L+1)*dm , the output sequence O∈R of the MSA layer (L+1)*dm Represents a feature sequence weighted by the attention matrix. The calculation formula of the self-attention mechanism is as follows:

[0087] O=MSA(X)=Concat(head1,...,head h )W O

[0088]

[0089] Q i =X·W i Q ,K i =X·W i K ,V i =X·W i V (1)

[0090] Among them, head i W represents the i-th attention head. i Q ∈R dm*dm , W i K ∈R dm*dm and W i V ∈R dm*dm W represents the linear projection of the i-th attention head on the input embedding X to obtain different queries, keys, and values ​​respectively. O ∈R h·dm*dm Refers to the linear transformation of multiple heads.

[0091] According to the input GSFM∈R 14*16 The size of the input embedding layer, position encoding and MSA network structure parameters are set in Table 3, and the feed-forward layer with two fully connected layers is set to FC1∈R 256*128 and FC2∈R 128*256 . After the SAM network, the global time-frequency characteristics of the vibration signal are extracted.

[0092] Table 3

[0093]

[0094]

[0095] Step 3. Model optimization strategy based on MK-MMD and DANN

[0096] like Figure 3 As shown in the figure, LRSADTLM consists of a deep feature extractor G LRSAN , a state classification network G y and a domain discrimination network G d In order to optimize the model, three loss functions are constructed, namely the classification loss L of the source domain y and the MK-MMD distribution difference loss L between the source domain and the target domain MK-MMD and the discrimination loss L d By minimizing the joint loss function, the network parameters are updated to improve the performance of the migration diagnosis task.

[0097] 1) Optimization goals

[0098] L MK-MMD : Under different working conditions, the similarity of data distribution is poor, resulting in a decrease in the accuracy of the model. In order to narrow the distribution difference and enhance the feature extractor's ability to extract domain variable features, MK-MMD is selected as the distance metric between the source domain and the target domain to evaluate the distribution shift, and the MK-MMD loss function is constructed. MK-MMD The smaller the value, the more similar the distributions of the two samples are. s ={f i s} i=1,..n and F t ={f i t} i=1,..n They represent the deep features of the source domain data and the target domain data after the deep feature extractor. MK-MMD Represents the loss of MK-MMD between and:

[0099]

[0100] Where E is the mathematical expectation, represents the mapping of the reproducing Hilbert space, and Hk represents the reproducing kernel Hilbert space with characteristic kernel k.

[0101] L d : In adversarial training, the domain discriminator G d Used to identify whether the sample data belongs to the source domain or the target domain, the loss function L d Contains two back propagations, used to update G LRSAN and Gd The gradient reverse layer (GRL) makes the two networks form an adversarial relationship and optimizes them through back propagation to achieve Nash equilibrium. d The loss function is as follows:

[0102]

[0103] L y : The rolling bearing status classifier consists of a fully connected layer and a softmax activation function, which outputs the class prediction of the source domain data. The cross entropy is used to calculate the fault classification loss L y , which measures the difference between the predicted label and the true label of the source domain, written as:

[0104]

[0105] Where n is the number of categories, M is the number of samples, F is the sign function (0 or 1), and p ic represents the predicted probability that sample i belongs to category c.

[0106] 2) Training strategy

[0107] Combining the optimization objective functions (2), (3) and (4), the joint optimization objective of the LRSADTLM designed by the present invention can be expressed by formula (5).

[0108]

[0109] Among them, the hyperparameters λ and μ are weight coefficients used to adjust the relationship between the losses. By minimizing the joint loss function, the parameters of LRSADTLM are optimized using back propagation and stochastic gradient descent methods. Here, θ f ,θ y and θ d Respectively represent G LRSAN , G y and G d Then, the parameter θ f ,θ y and θ d It can be updated according to formula (6).

[0110]

[0111]

[0112]

[0113] Where α represents the learning rate.

[0114] The specific embodiments are as follows:

[0115] Step 1: Collect bearing vibration signals of various states under different powers of four types, N15_M01_F10, N15_M07_F04 and N15_M07_F10, and divide them into source domain data and target domain data. The source domain data contains both bearing sample data and corresponding sample labels, and the target domain data only contains bearing sample data, but does not contain labels corresponding to bearing samples. The data set contains three bearing states: inner ring (IR) damage, outer ring (OR) damage and health.

[0116] Step 2, performing wavelet packet decomposition on the sample signals of the training set and the test set to obtain the wavelet packet coefficients of the four-layer wavelet packet decomposition of each sample signal. The present invention uses the coefficients of a single wavelet packet leaf node to construct a coefficient matrix; using the vibration signal samples of 4096 sampling points to construct a time-frequency feature map for the four-layer wavelet packet, firstly, the vibration signal samples can be decomposed through 4 layers of wavelet packets to obtain 16 wavelet packet leaf nodes, each wavelet packet leaf node has 256 wavelet packet coefficients; secondly, the wavelet packet coefficients of each leaf node are constructed into a 16*16 coefficient matrix; finally, the coefficient matrices of the 16 wavelet packet leaf nodes are spliced ​​in a Z shape according to the numbers, and the MTFFM of the vibration signal sample can be obtained.

[0117] Step 3, perform WPT reconstruction on the 16 wavelet envelope leaf nodes in step 2 to obtain 16 reconstructed branch signals. At the same time, calculate the envelope spectrum of the 16 branch signals. Then, calculate the seven statistical features and their envelope spectrum of each branch signal. The calculation formulas of the seven statistical features are shown in Table 1, which are set as the global statistical features of the vibration signal. Specifically, a certain feature (such as amplitude) of the 16 branch signals is packaged into a 16-dimensional vector, and the statistical feature matrix A∈R is obtained. 7*16 Similarly, we get the statistical characteristic matrix B∈R of the 16 envelope spectra 7*16 Finally, concatenate matrices A and B to obtain GSFM∈R 14 *16 .

[0118] Step 4: In order to better extract the deep features of MTFFM and GSFM in the source and target domains, a lightweight convolutional residual network LRN and a self-attention SAM network are designed to extract the local features and global features of MTFFM and GSFM respectively. The deep features extracted by the two sub-networks are spliced ​​into a combined deep adjustment. The deep features of the source domain samples are sent to the fully connected layer to combine the softmax classifier and the source domain label information, and the cross entropy loss L is calculated. y .

[0119] Step 5: In order to improve the similarity of the probability distribution of the deep features of the source domain data and the target domain data, the MK-MMD and DANN domain adaptation methods are combined to reduce the difference in the adjustment distribution between different domains and optimize the model to extract more effective domain-invariant features. The MK-MMD distance of the deep features of the source domain and the target domain samples is calculated to obtain the MK-MMD loss L of the deep feature space of the source domain and the target domain. MK-MMD , calculate the classification loss of the discriminator, that is, the discriminant loss L d .

[0120] Step 6: Use the source domain sample classification loss L y Back-propagation optimization of the state classification network G y And the deep feature extraction network G LRSAN , using L MK-MMD Back-propagation optimization of deep feature extractor G LRSAN , using L d Back-propagation optimization of domain discrimination network G d And the deep feature extraction network G LRSAN ; Iterate steps 4)-5) until L LRSAN When the number of loss iterations reaches the target requirement and the model parameters that minimize the loss are achieved, the trained LRSAN network is used to extract the deep features of the time-frequency graph of the target domain samples and obtain the category labels of the samples.

[0121] 1 Experimental data introduction

[0122] The experimental data are taken from the bearing datasets of Paderborn University (PU). These datasets contain three bearing states, inner ring (IR) damaged, outer ring (OR) damaged, and healthy, and each fault category contains bearings with multiple damage generation methods. As shown in Table 4, the bearing experiments are carried out under three working conditions, N15_M01_F10, N15_M07_F04, and N15_M07_F10, denoted as P1, P2, and P3, respectively, with 3120 vibration signal samples under each working condition. The bearing codes and fault types used in this experiment are shown in Table 5. Finally, six transfer tasks (P1->P2, P1->P3, P2->P1, P2->P3, P3->P1, P3->P2) are set in the experiment, where P1->P2 means that P1 (source domain dataset) is transferred to P2 (target domain dataset).

[0123] Table 4

[0124]

[0125] Table 5

[0126]

[0127] 2 Experimental steps

[0128] In order to verify the migration diagnosis effect of the bearing fault adaptive diagnosis method integrating deep convolution and self-attention network proposed in this invention between different working conditions, we set up five groups of experiments to verify the effectiveness of the proposed method. At the same time, we set up different comparison methods to verify the superiority of the proposed method, as shown in Table 6. These methods are divided into two parts. In the first part, the ablation models M0-M5 are designed as the comparison method of LRSADTLM (denoted as M6). M0 uses 7-layer CNNs with MK-MMD and DANN. M1-M3 use different ResNet backbone networks as deep feature extraction networks, namely ResNet34, ResNet18 and LRN, and their migration methods are the same as M6. The deep feature extraction networks of M4 and M5 are the same as M6, using MK-MMD or DANN as the transfer method respectively. In the second part, we compare the method proposed in this invention with other state-of-the-art transfer learning methods. These methods include transfer component analysis (TC A), joint distribution adaptation (JDA), correlation permutation of deep domain adaptation networks (D-CORAL), maximum mean discrepancy of deep domain adaptation networks (D-MMD), and adversarial discriminative domain adaptation (ADDA). In the experimental case, we use Matlab's wavelet packet tool to process the vibration signal. The mother wavelet function is Daubechies wavelet ('db5' in Matlab), and the decomposition level is set to 4. During the training process, the batch size of the dataset is set to 200, the number of iterations is set to 2000, and the learning rate is set to 0.001.

[0129] Table 6

[0130]

[0131]

[0132] In the first group of experiments, the classification accuracy and experimental results of the LRSADTLM model and the ablation method are shown in Table 7. First, it can be seen that the LRSADTLM (M6) proposed in the present invention has the highest average accuracy of 95.28%. In contrast, the highest average accuracy of other ablation model comparison methods (M0-M5) is 92.36%, which is about 4% lower than M6. Comparing the results of M0, M1, M2 and M3, it can be found that the LRN designed by the present invention is better than the classic CNN, ResNet18 and ResNet34 networks. This shows that the increase in the number of ResNet network layers leads to the overfitting problem of low-resolution MTFFM, resulting in a decrease in accuracy, which also illustrates the effectiveness of the LRN network structure designed by the present invention. In the transfer tasks of P1->P2, P1->P3, P3->P1, and P3->P2, the classification accuracy of M4 is higher than that of M5, while in the transfer tasks of P2->P1 and P2->P3, the opposite occurs. At the same time, in various transfer modes, the experimental results of M6 are better than M4 and M5, indicating that the fusion of the two strategies can improve the accuracy of transfer diagnosis. Compared with M3, we added the SAM network and global time-frequency features in M6, which can effectively improve the classification accuracy under different transfer tasks.

[0133] Table 7

[0134]

[0135]

[0136] The second set of experiments, Figure 4 The accuracy convergence curves of the first 500 epochs of the four methods M3-M6 under the P1->P2, P2->P1, P2->P3, and P3->P2 transfer tasks are shown. The accuracy convergence curve of M5 is more unstable, which corresponds to the Nash equilibrium procedure of DANN. The M6 ​​method, which incorporates the MK-MMD strategy, can effectively suppress this volatility. M6 is better than M4 (only using MK-MMD) in terms of accuracy and stability. Although the convergence speed and stability of M3 are comparable to those of M6, its diagnostic accuracy is lower. In summary, the M6 ​​method achieved the best convergence results.

[0137] At the same time, Figures (e)-(h) show the loss convergence curves of M3-M6 under the transfer tasks P1->P2 and P2->P1. The loss curves of MK-MMD and DANN are shown in Figures (e)-(f) and (g)-(h), respectively. When the curve reaches stability, the loss value of M6 is the smallest, and its diagnostic performance is better. Comparing M3 and M6, it is found that M6 reaches the Nash equilibrium faster, which shows that due to the fusion of global and local features and the enhancement of the representativeness of the fault, the proposed LRSAN feature extraction network is more effective in extracting domain-invariant features. Compared with M4 and M5, it is found that the proposed M6 method accelerates the loss convergence by combining MK-MMD and DANN domain adaptation methods, and can effectively suppress the fluctuations caused by DANN.

[0138] In the third set of experiments, the domain adaptation ability of the deep features extracted by M3-M6 was analyzed using the t-SNE method and the confusion matrix under the transfer task P3->P2, as shown in Figure 5 As shown, 0, 1, and 2 represent the class labels of the bearing status. Among them, Figures (a) and (d) show that compared with M3, the deep features extracted by M6 have better class separability. After adding global time-frequency features to the vibration signal, the confusion between states is effectively reduced. Figures (b) and (c) show that the deep features of the M4 method have better inter-class distances, while the deep features extracted by M5 have more advantages in intra-class aggregation. On the contrary, the deep features extracted by M6 combine the advantages of M4 and M5 to obtain better inter-class separation features. Therefore, compared with M4 and M5, M6 achieved better classification results.

[0139] In the fourth group of experiments, the weight coefficient is used to adjust the relationship between MK-MMD and DANN in the optimization strategy. As shown in formula (5), μ and λ are the weights of MK-MMD and DANN, respectively. Table 8 lists the fault diagnosis results under different μ and λ. According to these results, when μ is greater than λ, the effect of weight on diagnosis accuracy is not obvious; when μ is less than λ, as the gap between the two coefficients increases, the diagnosis accuracy will also decrease. Combined with the convergence curve, we can find that increasing the weight of MK-MMD can reduce the distribution difference of deep features in the source domain and target domain as soon as possible, thereby reducing the fluctuation caused by DANN, thereby achieving better diagnosis accuracy. Therefore, we set μ = 1 and λ = 1 in this article.

[0140] Table 8

[0141]

[0142]

[0143] In the fifth set of experiments, in order to further verify the effectiveness of the proposed method, we conducted comparative experiments with the existing methods in Table 6. The results are shown in Table 9. Compared with other models, the M6 ​​model has the highest accuracy in each task, and the average accuracy is nearly 5% higher than the other five comparison methods. This shows that LRSADTLM has more advantages in solving the problem of working condition migration diagnosis.

[0144] Table 9

[0145]

[0146] Based on the above experimental results, the following conclusions can be drawn:

[0147] (1) In fault diagnosis, making full use of the time-frequency information of vibration signals is the key. The local time-frequency information structure MTFFM and the global time-frequency information structure GSFM of vibration signals are constructed using WPT, which can effectively express the fault status of rolling bearings.

[0148] (2) The uniquely designed LRN and SAM fusion deep network has significant fault state feature extraction capabilities based on global and local information.

[0149] (3) LRSADTLM can learn domain-invariant features more effectively under the proposed DA strategy of the combination of MK-MMD and DANN.

[0150] This paper proposes a rolling bearing fault adaptive diagnosis method that integrates deep convolution and self-attention network. The fault identification accuracy and generalization ability of the proposed LRSADTLM method are verified by comparing multiple experiments using the bearing dataset of Paderborn University (PU).

[0151] The above content is a further detailed description of the present invention in combination with specific implementation methods of actual cases. It cannot be determined that the specific implementation of the present invention is limited to these descriptions. Without departing from the concept of the present invention, technicians in the relevant fields may make some simple deductions or substitutions, which should be deemed to fall within the scope of protection of the present invention.

Claims

1. A fault adaptive diagnosis method integrating deep convolution and self-attention network, characterized by: The specific steps include: Step 1, using wavelet packet transform (WPT) to perform time-frequency analysis on the rolling bearing vibration signal, and establishing a multi-scale time-frequency feature map (MTFFM) and a global statistical feature matrix (GSFM) based on WPT; Step 2, a deep feature extraction network LRSAN that integrates the lightweight network LRN and the self-attention SAM is used to realize the fusion extraction of local and global time-frequency features; In step 2, the deep fusion feature extraction network LRSAN is as follows: The local feature extraction capability of CNN makes it difficult to grasp the intrinsic relationship between the overall trend and local representation of multi-scale time-frequency signals of vibration signals; The feature extraction network consists of two modules, LRN and SAM, which integrate the local time-frequency features based on LRN and the global statistical features based on SAM respectively; 1) Lightweight ResNet LRN The excitation response of defects in rotating machinery is often expressed in different time frequency segments in the vibration signal; the state characteristics of rolling bearings are also scattered in MTFFM, and the image size of MTFFM is very small; in the LRN network, a convolution kernel of size 3×3 is used, the convolution step is set to 1, the padding value is set to 1 or 0, only three residual structures are used, and the pooling operation of the middle layer is cancelled; 2) Self-attention mechanism SAM network: Set the input sequence X of the SAM network a =[x 1 ,x 2 ,...,x N ]∈R L*di , where L is the length of the sequence and di is the size of the elements in the sequence; Input sequence X a Through a trainable linear projection W P ∈R di*dm Embedded as a sequence Then in sequence X p Add a randomly initialized x0 to the head of the pos ∈R (L+1)*dm The input embedding sequence is The SAM network has four layers, each of which consists of a multi-head self-attention MSA module, a feed-forward layer, and a residual normalization layer; Given an input embedding X∈R (L+1)*dm , the output sequence of the MSA layer O∈R (L+1)*dm Represents a feature sequence weighted by the attention matrix; the calculation formula of the self-attention mechanism is as follows: O=MSA(X)=Concat(head1,...,head h )W O Q i =X·W i Q ,K i =X·W i K ,V i =X·W i V (1) Among them, head i represents the i-th attention head, W i Q ∈R dm*dm , W i K ∈R dm*dm and W i V ∈R dm*dm represents the linear projection of the i-th attention head on the input embedding X to obtain different queries, keys, and values, respectively, W O ∈R h·dm*dm Refers to the linear transformation of multiple heads; According to the input GSFM∈R 14*16 The size of the input embedding layer, position encoding and MSA network structure parameters are set, and the feed-forward layer with two fully connected layers is set to FC1∈R 256*128 and FC2∈R 128*256 ; Through the SAM network, the global time-frequency characteristics of the vibration signal are extracted; Step 3, a joint loss function is constructed through multi-core maximum mean difference MK-MMD and domain adversarial neural network DANN to optimize the deep feature extraction network, which is used to reduce the difference in the domain distribution of deep features under different working conditions and improve the cross-domain diagnosis ability of the deep transfer learning model LRSADTLM; In step 1, the time-frequency analysis and processing of vibration signals are as follows: WPT is used to perform time-frequency analysis on vibration signals, and a multi-scale time-frequency feature map MTFFM is constructed to improve the local fault feature extraction capability of LRN. The time-frequency statistical features of vibration signals are used to construct a feature matrix GSFM to extract the global time-frequency features of vibration signals. Multi-scale time-frequency feature map MTFFM; The vibration signal samples are decomposed by four-layer WPT to obtain 16 leaflet nodes of wavelet packets; each wavelet packet node has 256 wavelet packet coefficients; the wavelet packet coefficients of each leaflet node are constructed into a 16×16 coefficient matrix; the 16 coefficient matrices are reordered by Z-shaped stitching to obtain a 64×64 multi-scale time-frequency feature map MTFFM; Global statistical feature matrix GSFM: Perform WPT reconstruction on 16 wavelet envelope leaf nodes to obtain 16 reconstructed branch signals; calculate the envelope spectra of the 16 branch signals at the same time; calculate the seven statistical features of each branch signal and its envelope spectrum, and set them as the global statistical features of the vibration signal; Specifically, a feature of the 16 branch signals, such as amplitude, is packaged into a 16-dimensional vector, and the statistical feature matrix A∈R is obtained. 7*16 ; Get the statistical characteristic matrix B∈R of 16 envelope spectra 7*16 ; Connect matrices A and B in series to obtain GSFM∈R 14*16 , as the input of the SAM network.

2. The method for adaptive fault diagnosis by integrating deep convolution and self-attention network according to claim 1, characterized in that: In step 3, the model optimization strategy based on MK-MMD and DANN is as follows: The deep transfer learning model LRSADTLM consists of a deep feature extractor G LRSAN , a state classification network G y and a domain discrimination network G d In order to optimize the model, three loss functions are constructed, namely the classification loss L of the source domain y and the MK-MMD distribution difference loss L between the source domain and the target domain MK-MMD and the discrimination loss L d ; By minimizing the joint loss function, the network parameters are updated to improve the performance of the migration diagnosis task.

3. The method for adaptive fault diagnosis by integrating deep convolution and self-attention network according to claim 2, characterized in that: The optimization objectives are as follows: L MK-MMD :Under different working conditions, the similarity of data distribution is poor, resulting in a decrease in the accuracy of the model; in order to narrow the distribution difference and enhance the feature extractor's ability to extract domain variable features, MK-MMD is selected as the distance metric between the source domain and the target domain to evaluate the distribution shift, and the MK-MMD loss function is constructed; L MK-MMD The smaller the value, the more similar the distributions of the two samples are; s ={f i s } i=1,..n and F t ={f i t } i=1,..n Respectively represent the deep features of the source domain data and the target domain data after the deep feature extractor; L MK-MMD Represents the loss of MK-MMD between and: Where E is the mathematical expectation, represents the mapping of the reproducing Hilbert space, Hk represents the reproducing kernel Hilbert space with characteristic kernel k; L d : In adversarial training, the domain discriminator G d Used to identify whether the sample data belongs to the source domain or the target domain, the loss function L d Contains two back propagations, used to update G LRSAN and G d The gradient reverse layer GRL makes the two networks form an adversarial relationship and optimizes through back propagation to achieve Nash equilibrium. d The loss function is as follows: L y :The rolling bearing status classifier consists of a fully connected layer and a softmax activation function, which outputs the category prediction of the source domain data; the cross entropy is used to calculate the fault classification loss L y , which measures the difference between the predicted label and the true label of the source domain, written as: Among them, n represents the number of categories, M represents the number of samples, F represents the sign function 0 or 1, and p ic represents the predicted probability that sample i belongs to category c; Training strategy Combining formulas (2), (3) and (4), the joint optimization objective of LRSADTLM can be expressed as formula (5): Among them, the hyperparameters λ and μ is the weight coefficient, which is used to adjust the relationship between losses; The parameters of LRSADTLM are optimized using back-propagation and stochastic gradient descent methods by minimizing the joint loss function. θ f ,θ y and θ d Respectively represent G LRSAN , G y and G d Parameters in θ f ,θ y and θ d Update according to formula (6); Among them, α represents the learning rate.