A small sample rolling bearing fault diagnosis method based on convolutional transformer generative adversarial network

By designing a Convolutional Transformer Generative Adversarial Network (CoT-GAN), the problem of data scarcity in rolling bearing fault diagnosis was solved. High-quality signal samples were generated through global and local feature extraction, thereby improving diagnostic accuracy.

CN115859142BActive Publication Date: 2025-11-28BEIJING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211233344.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-10
Publication Date
2025-11-28
Estimated Expiration
2042-10-10

AI Technical Summary

Technical Problem

Existing technologies suffer from reduced diagnostic accuracy due to data scarcity in rolling bearing fault diagnosis. Traditional GAN ​​models lack global feature extraction capabilities and do not consider signal location information when processing bearing signals, resulting in poor quality of generated samples.

Method used

A Convolutional Transformer Generative Adversarial Network (CoT-GAN) is used, combining transformer and convolutional structures, to extract global and local features of vibration signals through a position encoding enhancement model, generating high-quality signal samples.

Benefits of technology

It effectively improves fault diagnosis performance under small sample conditions, and the generated signal samples can effectively expand the training dataset and improve diagnostic accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115859142B_ABST
    Figure CN115859142B_ABST
Patent Text Reader

Abstract

The application discloses a small sample rolling bearing fault diagnosis method based on convolution transformer generative adversarial network, relates to the field of rotating equipment fault diagnosis such as rolling bearings, and overcomes the problem that it is difficult to realize accurate fault diagnosis under the condition of insufficient running data. First, signal data under actual operation conditions of the rolling bearing are acquired, and data standardization processing is performed on the signal data. Second, a generator and a discriminator with a convolution and transformer cross structure are constructed, and transformer layers are used to effectively extract global time domain features of the time sequence signal. On this basis, convolution layers are used to further extract local time domain features of the time sequence signal. Meanwhile, position coding is embedded into the time sequence signal, so that the model can sufficiently learn position information features of the signal, and finally, high-quality time sequence signal samples are generated to expand original training samples, so that the fault diagnosis precision under the small sample condition is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of fault diagnosis of rotating equipment such as rolling bearings, and more particularly to a small sample rolling bearing fault diagnosis method based on a convolution transformer generative adversarial network. BACKGROUND

[0002] In recent years, deep neural networks have been successfully applied to rolling bearing fault diagnosis due to their powerful feature extraction capabilities. Their main premise is that there is a large amount of effective data for training the fault diagnosis model. However, in actual engineering scenarios, due to the safety of rolling bearing equipment operation and the complex and variable working conditions, the data acquisition system can only record very little running data, which greatly affects the fault diagnosis effect. Therefore, it is very crucial and necessary to design an effective fault diagnosis method under the condition of scarce running data.

[0003] At present, researchers have proposed various methods to deal with the limited data problem in fault diagnosis. Data sampling is a method to deal with limited data. By under-sampling a large number of sample classes and over-sampling a small number of sample classes, the data of each class is balanced, which is a common method to deal with various sample imbalance. Although the data sampling method has achieved good results in the case of limited data and sample imbalance. However, the data sampling method can only use existing data information and cannot effectively map the original data distribution, resulting in the inability to effectively expand the data to meet the demand of intelligent fault diagnosis method for massive data. Transfer learning solves the cross-domain problem by transferring the knowledge obtained from the source domain to the target domain. The method based on transfer learning usually uses model pre-training and fine-tuning to solve the fault diagnosis problem under limited data. However, the biggest limitation of this method is that it does not fundamentally solve the problem of data deficiency, in addition, the pre-training of the original model still requires a large number of samples.

[0004] With the gradual development of generative models, solving the problem of sample scarcity through data generation has attracted widespread attention. Among them, the generative adversarial network (GAN) is the mainstream generative model in the field of artificial intelligence. GAN can generate data similar to the original data distribution and is initially applied to the field of image processing. With its powerful data generation ability, GAN has been successfully applied to the field of rolling bearing fault diagnosis. Yang et al. developed a fusion diagnosis model CGAN-2D-CNN. The vibration signal is converted into a two-dimensional gray image, and CGAN and 2D-CNN are used to expand and classify image data for small sample bearing fault diagnosis. Liang et al. extracted time-frequency image features from one-dimensional original time-domain signals through wavelet transform, and used GAN to generate a large number of time-frequency image samples. However, the conversion of one-dimensional time series signals into two-dimensional images cannot well represent the vibration information carried by the vibration signal, resulting in poor quality of the generated samples, thereby affecting the final fault diagnosis effect. With the gradual development of GAN in the field of time series signal generation, the method of directly expanding rolling bearing vibration signals using GAN has also made rapid progress. Guo et al. proposed a fault diagnosis framework called multi-label 1D generative adversarial network (ML1D-GAN) that can be used to directly generate one-dimensional vibration signal data. Sonal Dixit et al. proposed a new one-dimensional conditional auxiliary classifier generative adversarial network fault diagnosis model to better directly generate bearing signal samples. Zhang et al. developed a multi-module gradient penalty generative adversarial network (MGPGAN) small sample intelligent fault diagnosis method to generate mechanical fault signals with high similarity.

[0005] However, the above schemes all have certain problems. 1) The GAN with fully connected layers as the basic structure has insufficient feature extraction capability, and when processing bearing signals, which are long sequence signals, it will lead to excessive model parameter quantity. 2) The GAN with one-dimensional convolution as the basic structure has strong local feature extraction capability, but it severely lacks global feature extraction capability and cannot effectively model long sequence signals. 3) Finally, the GAN at the present stage does not consider the relative or absolute position information of the entire original vibration signal sequence when generating bearing signal samples, thereby affecting the quality of signal generation. SUMMARY

[0006] Aiming at the problem that the operation data of rolling bearings is scarce, resulting in reduced diagnostic accuracy, the purpose of the application is a small sample rolling bearing fault diagnosis method based on a convolutional transformer generative adversarial network (CoT-GAN). In order to make the model better extract global and local features of the vibration signal, a generator and a discriminator with a transformer and convolutional cross structure are designed. The transformer is good at processing long sequence signals and has strong global feature extraction capability, which can effectively model the global vibration signal. In addition, adding position encoding to the vibration signal sequence can make the model effectively learn the relative and absolute position information of the signal, thereby retaining its inherent vibration information features. On this basis, the use of convolutional layers further enhances the model's ability to learn local features of the signal. The application starts from the characteristics of the vibration signal, fully considers the time sequence characteristics of the vibration signal while combining the respective advantages of the transformer and convolution, models the bearing vibration signal from the local and global, and fully utilizes the position information carried by the vibration signal. Finally, sufficient vibration signal samples are generated and the fault diagnosis performance is effectively improved.

[0007] To achieve the above purpose, the technical scheme of the application is adopted as follows:

[0008] A small sample rolling bearing fault diagnosis method based on a convolutional transformer generative adversarial network, characterized by the following steps:

[0009] (1) First, acquire the historical operation data of the rolling bearing and perform data standardization processing, then divide the data standardized signal samples into training samples and test samples.

[0010] (2) Construct a convolutional and transformer cross structure generative adversarial network (CoT-GAN), use the generator to generate generated signals similar to the real signal distribution from random noise, use the discriminator to distinguish between real and fake signals and classify them, the generator and the discriminator learn alternately in a zero-sum game to improve the model performance until the Nash equilibrium state, and finally generate signal samples; the generated signal samples are expanded to the original training samples as an enhanced data set to train the fault classifier;

[0011] (3) Use the fault classifier trained in step (2) to classify the test samples and complete the final fault diagnosis task.

[0012] A small sample rolling bearing fault diagnosis method based on a convolutional transformer generative adversarial network, characterized by the following steps:

[0013] 1) Obtain historical data of rolling bearings under actual operating conditions Where n represents the number of samples, m represents the sample dimension, and also represents the total number of samples collected. Calculate the mean x and standard deviation σ of the historical data X, and normalize the data X to obtain

[0014]

[0015] Where i = 1, 2,..., n;

[0016] 2) Divide the normalized data into a training sample set and a test sample set Where the sum of p and q is n;

[0017] A small sample rolling bearing fault diagnosis method based on convolutional transformer generative adversarial network, characterized by using a convolutional transformer cross structure generative adversarial network to generate signals, and the specific process of step (2) is as follows:

[0018] 1) Set random noise z and embed the corresponding fault category label c into the random noise to obtain random noise Z containing the fault category label, specifically,

[0019] First, obtain random noise Where k represents the number of random noises, and l represents the dimension of the random noise;

[0020] Secondly, embed the corresponding fault category label into the random noise z = [z1, z2,..., z k ] to obtain random noise Z containing the fault category label, where i ∈ {1, 2, 3, 4};

[0021] 2) In order to facilitate the subsequent generator to generate signals for the discriminator to process and the transformer module to process the input vector, deform and convert the input random noise Z into a fixed size patch, specifically,

[0022] First, change the dimension of the input random noise to a fixed value L to facilitate the subsequent discriminator to process the generated signal;

[0023] Secondly, convert the random noise Z = [Z1, Z2,..., Z k ] into multiple fixed size patches by one-dimensional convolution embedding, specifically,

[0024] Divide the random noise into N patches with dimension M where M represents the size of the patch, N=L / M represents the number of patches, j e {1, 2,..., k};

[0025] In order to reduce the parameter calculation amount, the weight sharing and the good local feature extraction effect of the convolutional neural network are used, and a one-dimensional convolution is used to form an embedding module. The convolution kernel size of the one-dimensional convolution is set to Mxl, and the step size is M, so that the one-dimensional convolution kernel processes the random noise in an overlapping manner, and finally N patches with dimension M are obtained. Specifically,

[0026] Using the learned embedding matrix It is projected into a vector with model dimension D model by convolution. Wherein, the formula of one-dimensional convolution operation is as follows:

[0027]

[0028] Where, v i and u j correspond to the input of the ith channel and the output of the jth channel respectively. K is the convolution kernel, b is the bias, and * is the convolution operation. M j is the channel set used to calculate the output function of the jth channel;

[0029] Then, the fixed-size patch is embedded with a position label, so that the generated signal can have more similar position information with the real signal, thereby improving the quality of the generated sample. Specifically,

[0030] The position information matrix with dimension D model is encoded and attached to the patch, and the patch with position information obtained is:

[0031]

[0032] Finally, the patch sequence T Z ′=[T Z,1 ,T Z,1 ,...,T Z,k ] carrying position information is sent to the transformer module and sequentially passes through the generator with convolution and transformer cross structure to generate signal samples where l represents the number of generated samples, and specifically,

[0033] The patch carrying position information is sent to the transformer module to extract the global features of the input, and specifically,

[0034] The transformer module can dynamically capture the feature information of the input vector by virtue of its internal multi-head attention mechanism, thereby greatly increasing the generator's grasp of global feature information. The function of self-attention is to update each component of the sequence by aggregating global context information from the complete input sequence. The formula of self-attention can be expressed as:

[0035]

[0036] where d k represents the dimension of the signal converted into a specific key-value vector, Q, K and V represent the matrices corresponding to the query vector, key vector and value vector respectively.

[0037] Multi-head attention is a mechanism that includes multiple self-attention modules, which can encapsulate multiple complex relationships between different elements in the sequence. Assuming that there are h self-attention modules, multi-head attention converts the given input vector into three different vectors. Each group has h vectors with a dimension of D / h. Then, the vectors from different inputs are packed into different matrices: and Therefore, the formula of the multi-head attention mechanism can be expressed as:

[0038]

[0039] where Q', K' and V' are the concatenations of and is a linear projection matrix;

[0040] The transformer module applies layer normalization before the multi-head attention operation. Then, the residual connection is used to enhance the information flow to achieve higher performance. Specifically, it can be expressed as:

[0041] x' = x + Multihead(LN(x)) (6)

[0042] where x is the input vector of the transformer module;

[0043] After the above steps, the final output of the transformer module is output by the multi-layer perceptron, which is specifically:

[0044]

[0045] After processing by the transformer module, the output is sent to the deconvolution layer to effectively obtain its local features. After the deconvolution layer output feature vector ​And again input by transformer and deconvolution layer cross structure module. The generator contains a total of 4 transformer and deconvolution cross structure modules, when the input vector passes through the last deconvolution layer, the generated sample with the same dimension as the real signal is generated.

[0046] The signal generated by the generator With the real signal Mixed into the discriminator, specifically,

[0047] Firstly, the generated signal and the real signal input to the discriminator are converted into a plurality of fixed size patches by one-dimensional convolution embedding, and the specific operation is similar to A22). The input signal of the discriminator is processed in a non-overlapping manner by using a one-dimensional convolutional neural network to obtain a plurality of fixed size patches.

[0048] Secondly, each patch is labeled with a corresponding position label, so that the discriminator can pay more attention to the relative position and absolute value information of the signal when learning the signal features, thereby facilitating the generator to generate signals.

[0049] Then, the patch carrying the position information is sent to the subsequent transformer module and sequentially passes through the convolution and transformer cross structure discriminator, specifically,

[0050] The vector passing through the transformer module will pass through a convolution layer to extract the local features of the input vector. The output vector will continue to be sent to a transformer module to obtain global features. The processing process of the input vector in the network is similar to that of the generator, and the discriminator contains a total of 4 convolution and transformer modules in cross structure.

[0051] Finally, the feature vector output by the last convolution layer is deformed to obtain a plurality of 1x1024 vectors, and the vector is subjected to binary classification discrimination and multi-classification discrimination by using Sigmoid and Softmax activation functions, specifically,

[0052] The output vector with a dimension of 1x1024 is respectively subjected to a binary classification fully connected layer and a multi-classification fully connected layer to obtain an output vector with an output dimension of 1 and the number of fault categories. The two output vectors are respectively sent to Sigmoid and Softmax activation functions for true / false discrimination and category discrimination. The formula of the Sigmoid activation function is:

[0053]

[0054] Wherein, x represents the input vector input into the Sigmoid activation function.

[0055] The formula of the Softmax activation function is:

[0056]

[0057] where z represents the input vector, z k represents the kth input vector, z i represents the ith input vector, and K represents the number of classes of multi-classification.

[0058] 3) Finally, the generated signal samples are expanded to the original training samples as an enhanced dataset to train the fault classifier.

[0059] A small sample rolling bearing fault diagnosis method based on convolution transformer generative adversarial network, characterized in that in step (2), the specific calculation process is as follows:

[0060] 1) The generator and the discriminator are alternately trained in a zero-sum game manner until a Nash equilibrium is reached, and the objective function of the CoT-GAN is represented as follows:

[0061]

[0062]

[0063] where P data is the real data distribution, P g is the data distribution of the generated samples, D(s) represents the probability from the real data, represents the probability from the real data. represents the expectation of the real data distribution, represents the expectation of the noise synthesis generated data. P(Y real ) represents the conditional probability distribution on the class label. The optimization process of the generator and the discriminator is a binary maximum minimum problem, which can be formalized as the following equation:

[0064]

[0065] 2) The enhanced dataset is used to train the fault classifier, so that the fault classifier can have better generalization ability, and the objective function of the fault classifier is represented as follows:

[0066]

[0067] The CoT-GAN network structure is specifically: the CoT-GAN is composed of a generator and a discriminator of a convolution and transformer cross structure, can effectively model the global characteristics and local of the vibration signal, and fully considers the relative position and absolute position information contained in the signal, and generates sufficient signal data. The generator is composed of L deconvolution and transformer cross modules, the input of the generator is composed of random noise and existing fault category labels, the data points are converted into patch form through a one-dimensional convolution embedding, and the position information is embedded and input into the network layer of the L transformer and deconvolution cross structure, and the output is finally the generated signal with the same dimension as the real signal. The discriminator is composed of L convolution and transformer cross modules, the input of the discriminator is composed of generated signals and real signals, similar to the generator, the input signal is converted into multiple patches through one-dimensional convolution and embedded with position information, and input into the network layer of the L transformer and convolution cross structure, and the output layer of the discriminator is finally the probability of binary classification and multi-classification.

[0068] The output of the generator and the discriminator transformer module and is represented as follows, l = 1, 2, …, L,

[0069]

[0070]

[0071] wherein, represents the output vector of the (l-1)th transformer module in the generator, represents the output vector of the lth transformer module in the generator. G,l (·) represents the corresponding lth group of transformer modules and deconvolution operation in the generator, when l = 1, that is, a fixed patch after position coding information, when l = L, that is, the output vector of the generator. represents the output vector of the (l-1)th transformer module in the discriminator, represents the output vector of the lth transformer module in the discriminator. D,l (·) represents the corresponding lth group of transformer modules and convolution operation in the discriminator, when l = 1, that is, a fixed patch after position coding information, when l = L, that is, the output vector of the discriminator. More specifically, the generator composed of L cross transformer modules and deconvolution can be represented as:

[0072]

[0073]

[0074] Advantages

[0075] The application designs a generative adversarial network with transformer and convolution cross structure, which makes full use of the advantages of transformer and convolution, respectively uses transformer layer and convolution layer to extract global and local features of time series signal, so that the model can fully capture the time domain characteristics of vibration. Secondly, the position coding is embedded in the vibration signal, so that the model can fully learn the relative and absolute position information of the signal, thereby enhancing the inherent time sequence characteristics of the generated signal, and finally generating sufficient signal data to effectively improve the fault diagnosis performance under small sample condition. The application fully considers the characteristics of time series signal and models from global and local when generating samples, has the characteristics of strong feature expression ability, strong pertinence and high diagnosis accuracy, and has very important significance for rolling bearing fault diagnosis. BRIEF DESCRIPTION OF DRAWINGS

[0076] Figure 1 Fig. 1 shows the flowchart of the CoT-GAN method of the application;

[0077] Figure 2 Fig. 2 shows the schematic diagram of the generator;

[0078] Figure 3 Fig. 3 shows the schematic diagram of the discriminator;

[0079] Figure 4 Fig. 4 shows the schematic diagram of the CWRU bearing test rig;

[0080] Figure 5 Fig. 5 shows the generation results of the CWRU bearing data set by the application;

[0081] Figure 6 Fig. 6 shows the influence of the number of training samples on the diagnosis effect of the model;

[0082] Figure 7 Fig. 7 shows the diagnosis effect of the model when there is 1 training sample;

[0083] Figure 8 Fig. 8 shows the diagnosis effect of the model when there are 2 training samples;

[0084] Figure 9 Fig. 9 shows the diagnosis effect of the model when there are 4 training samples;

[0085] Figure 10 Fig. 10 shows the diagnosis effect of the model when there are 8 training samples;

[0086] Figure 11 Fig. 11 shows the diagnosis effect of the model when there are 16 training samples;

[0087] Figure 12The diagnostic effect of the model when 32 training samples are shown; DETAILED DESCRIPTION

[0088] The present application aims at the drawbacks of the prior art and provides a small sample rolling bearing fault diagnosis method based on a convolutional transformer generative adversarial network, which can effectively generate time series signal samples to expand the original training sample set, thereby improving the rolling bearing fault diagnosis precision under the condition of small samples.

[0089] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.

[0090] Referring to Figure 1 , the present application provides a small sample rolling bearing fault diagnosis method based on a convolutional transformer generative adversarial network (CoT-GAN), which overcomes the problem that it is difficult to achieve accurate fault diagnosis under the condition of scarce running data. First, the signal data under the actual running condition of the rolling bearing is obtained and data standardization processing is performed thereon. Second, a generator and a discriminator of a convolutional and transformer cross structure are constructed, as shown in Figure 2 and Figure 3 . The generator and the discriminator of the convolutional and transformer cross structure can effectively extract the local and global time domain features of the time series signal. At the same time, the position encoding is embedded in the time series signal, so that the model fully learns the position information features possessed by the signal, and finally generates sufficient time series signal samples to maintain the fault diagnosis precision under the condition of small samples.

[0091] The Case Western Reserve University (CWRU) public bearing data set is widely used to verify the performance of fault diagnosis. Figure 4A CWRU bearing test rig is shown, which consists of two motors, torque sensors, dynamometers, and other control devices. Single point faults on the inner race, outer race, and ball elements of the bearing are created by using electrical discharge machining with damage diameters of 0.007, 0.014, and 0.021 inches, respectively. Accelerometers collect vibration signals at different loads from 0 to 3 horsepower. A 16-channel DAT recorder is used to collect vibration signals at sampling frequencies of 12 kHz and 48 kHz. In this experiment, the vibration data collected from the drive end bearing with a fault severity of 0.021 inches, a load of 0 hp, and a sampling frequency of 12 kHz are used for analysis. Four different bearing health conditions are selected for classification, which are healthy, outer race fault, inner race fault, and ball fault. Each class contains 100 samples, and each sample contains 1024 data points. The training data for this experiment is randomly sampled from 1 to 32 samples for each class, and the rest are test data.

[0092] In terms of hyperparameter settings, CoT-GAN uses the Adam optimizer for model optimization. In order to make the model training more stable, the label smoothing strategy is adopted, the real label is set to 0.9, the false label is set to 0.1, the Batch_size of the training model is set to 4, the learning rate of the discriminator lr is set to 0.0003, the learning rate of the generator lr is set to 0.0005, and the total iteration of the model is 1000 times.

[0093] Based on the above description, according to the summary, the specific process is implemented as follows:

[0094] 1) Standardize the experimental data X = [x1, x2, …, x 100 ] ∈ R 1×1024 , calculate the mean and standard deviation of X, and standardize X using formula (1)

[0095] 2) Divide the standardized data into training samples and test samples

[0096] 3) Set random noise with standard normal distribution (mean 0, variance 1), embed the corresponding fault category label into the random noise z = [z1, z2, … z k ], and obtain random noise Z containing fault category labels, where i ∈ {1, 2, 3, 4};

[0097] 4) According to formula (2), the random noise Z containing fault categories is input into the one-dimensional convolutional embedding module, and its data points are transformed into fixed patches Z. p =[Z1,Z2,...,Z K In the form of ];

[0098] 5) According to formula (3), add location information to the patch to obtain patch T carrying location information. Z =[T Z,1 ,T Z,2 ,...,T Z,k ], and feed it into the network layer of the transformer and convolution cross structure;

[0099] 6) Based on formulas (5), (6) and (7), the output vector of the transformer is obtained. It is fed into the convolutional layer after the transformer to obtain the output vector of the transformer and convolutional cross module. The above operations can be represented by formula (10);

[0100] 7) According to formula (12), obtain the final generator output vector. That is, to generate signal samples

[0101] 8) Generate signal and training samples The inputs are fed into the discriminator to train it;

[0102] 9) Similar to 4), both the generated signal and the real signal are transformed into fixed-size patches through one-dimensional convolution embedding;

[0103] 10) Similar to 5), position information encoding is added to each fixed-size patch, and this information is then input into the network layer with the transformer and convolutional cross structure.

[0104] 11) Obtain the output vector of the last transformer and convolution cross module of the discriminator according to formula (15) and formula (17), and change its shape;

[0105] 12) The final output vector is fed into the binary classification fully connected layer and the multi-class fully connected layer respectively, and the output vector after the fully connected layer is processed according to the activation functions of formulas (8) and (9) to finally obtain the probability of distinguishing the real data and the class.

[0106] 13) The generator and discriminator are trained alternately until a Nash equilibrium is reached and signal samples are generated. like Figure 5 The resulting graph of the generated signal is shown. Figure 5 The upper part is the original signal, and the lower part is the generated signal;

[0107] 14) Add the generated signals to the original training samples to obtain an enhanced data set where H represents the total number of samples;

[0108] 15) Train the fault classifier using the enhanced data set and utilize the test data set to perform fault diagnosis. The diagnostic effects of the enhanced data set and the original data set are shown in Table 1. In Table 1, 4 in the first column means that there are four categories in total, and the numbers multiplied behind represent the amount of training samples contained in each category. As can be seen from Table 1, the final diagnostic effect obtained by training the fault classifier using the enhanced data is much better than that obtained by using only the original small sample data set, and as the number of training CoT-GAN samples and generated samples gradually increases, the obtained fault diagnosis effect is better and better. Figure 6 The influence of the number of training samples on the diagnostic effect of the model is shown. In each category, the number of generated samples is 10. From Figure 6 it can be seen that as the number of training samples increases, CoT-GAN can effectively generate synthetic samples to train the classifier, thereby effectively improving the fault precision under small samples. In order to further show the classification precision of each fault category under different training samples, the confusion matrix is used to show the classification effect of different categories. As Figures 7-12 shown, as the number of training samples increases, the classification effect of each category is also significantly improved.

[0109] Finally, it can be concluded that the present application can effectively diagnose faults under small sample conditions, and therefore has great beneficial effects for small sample rolling bearing fault diagnosis.

[0110] Table 1 Comparison of diagnostic precision (%) of enhanced data set and original data set

[0111]

Claims

1. A method for diagnosing small-sample rolling bearing faults based on convolutional transformer generative adversarial networks, characterized in that, Includes the following steps: (1) First, obtain the historical operating data of the rolling bearing and perform data standardization processing. Then, divide the signal samples after data standardization into training samples and test samples. (2) Construct a generative adversarial network with a cross structure of convolution and transformer. Use a generator to generate a generated signal that is similar to the distribution of the real signal from random noise. Use a discriminator to distinguish between the generated signal and the real signal and to make a classification. The generator and the discriminator learn alternately in a zero-sum game to improve the model performance until the Nash equilibrium is reached, and finally generate signal samples. The generated signal samples are expanded to the original training samples as an augmented dataset to train the fault classifier. The fault classifier trained in step (2) is used to identify and classify the faults in the test samples, thus completing the final fault diagnosis task. In step (2), a generative adversarial network with a convolutional and transformer cross structure is used to generate signal samples. The specific steps are as follows: 1) Set a random noise z with a standard normal distribution and a mean of 0 and a variance of 1, and embed the corresponding fault category label c into the random noise to obtain random noise Z = [z, c] containing fault category labels; 2) The input signal is transformed into multiple fixed-size patches using one-dimensional convolutional embedding, and position encoding information is embedded in each patch; 3) Construct a generative adversarial network with a cross-structure of convolution and transformer, and use transformer layers and convolutional layers to extract global and local features of the signal respectively; feed a random noise patch sequence carrying location information into a generator with a cross-structure of transformer and convolution to generate signal samples; perform patching operations on the generated signal and the real signal and embed location information, and then mix them and feed them into a discriminator with a cross-structure of transformer and convolution for learning, and use the sigmoid and softmax activation functions at the end of the discriminator to output binary and multi-class predicted labels, so as to compare with the real labels to perform true / false judgment and category judgment; 4) The generator and discriminator are trained alternately in a zero-sum game manner to reach a Nash equilibrium state, and finally generate signal samples; 5) The generated signal samples are augmented to the original training samples as an enhanced dataset to train the fault classifier.

2. The method for small-sample rolling bearing fault diagnosis based on convolutional transformer generative adversarial networks according to claim 1, characterized in that: The specific steps of (1) are as follows: 1) Obtain historical data under actual operating conditions of rolling bearings Where n represents the number of samples, m represents the sample dimension, and also represents the total number of samples collected; calculate the mean of the historical data X. The standardized data X is obtained by summing the standard deviation σ. Where i = 1, 2, ..., n; 2) Standardize the data Divided into training sample set and test sample set The sum of p and q is n.

3. The method for small-sample rolling bearing fault diagnosis based on convolutional transformer generative adversarial networks according to claim 1, characterized in that, In step (2), the specific calculation process is as follows: 1) The input signal is convolved using a one-dimensional convolution kernel with non-overlapping sliding, thereby dividing the input signal into multiple fixed-size patches, and embedding a positional encoding that can be learned during model training into each patch; the formulas for the one-dimensional convolution operation and the positional encoding operation are as follows: Among them, v i and u j These correspond to the input of the ith channel and the output of the jth channel, respectively; k is the convolution kernel, b is the bias, and * is the convolution operation; M j It is the channel set of the jth channel used for calculating the output function; Among them, U p Let E represent different patches, and E represent the learnable embedding matrix. pos T represents the learnable location information matrix. U This represents the final patch sequence that combines positional encoding. 2) The generator and discriminator are trained alternately in a zero-sum game manner until a Nash equilibrium is reached. The objective function of CoT-GAN is expressed as follows: Among them, P data It is the actual data distribution, P g This is the data distribution for generating the samples, where D(s) represents the probability of coming from the real data. Indicates the probability of data originating from noisy data; This represents the expectation of the actual data distribution. This represents the expectation of the noise synthesis data; P(Y=y|S real () represents the conditional probability distribution on the class label; the optimization process of the generator and discriminator is a binary maxima-minima problem, formalized as the following equation: 3) Use augmented datasets to train a fault classifier. The objective function of the fault classifier is expressed as follows: Where x represents the input sample of the fault classifier, y represents the data label output by the classifier, and P data and P g These represent the data distributions of the real samples and the generated samples, respectively; P(Y=y|x) also represents the conditional probability distribution on the class label.