Small sample fault diagnosis identification method and system based on CWDC-GAN
By using the improved CWDC-GAN model, the Wasserstein distance optimization loss function and two-dimensional wavelet time-frequency distribution map are utilized to solve the problem of insufficient data in small sample fault diagnosis, achieving efficient and accurate fault identification, which is suitable for fault diagnosis of mechanical equipment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NORTHWESTERN POLYTECHNICAL UNIV
- Filing Date
- 2024-03-18
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies face challenges in diagnosing mechanical equipment faults under small sample conditions, including difficulties in data acquisition, model overfitting, difficulty in accurately identifying novel or rare faults, high resource consumption in training generative adversarial networks, and insufficient utilization of the frequency domain features of vibration signals.
An improved deep convolutional generative adversarial network (CWDC-GAN) is adopted, combined with a Wasserstein generative adversarial network (WGAN), and the loss function is optimized by Wasserstein distance to construct a generative adversarial network model (WDCGAN). The model is trained using a two-dimensional wavelet time-frequency distribution map to generate high-quality samples and expand the dataset. Finally, it is combined with a convolutional neural network for fault diagnosis.
It effectively improves the accuracy and robustness of fault diagnosis for small samples, saves computing resources, simplifies the modeling process, and enables accurate fault identification in mechanical equipment.
Smart Images

Figure CN118296426B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fault identification technology, specifically to a small-sample fault diagnosis and identification method and system based on CWDC-GAN. Background Technology
[0002] With the development of deep learning, more and more scholars have become interested in intelligent fault diagnosis methods based on deep learning. It provides a data-driven, end-to-end adaptive method for fault identification, exhibiting strong anti-interference capabilities and offering powerful support for fault diagnosis of complex and ever-changing rotating machinery. While deep learning-based intelligent fault diagnosis methods demonstrate strong advantages such as high accuracy, high efficiency, and high robustness, some shortcomings exist in practical engineering applications. These methods heavily rely on large amounts of high-quality labeled data, and issues such as low probability of fault occurrence in some equipment, high data acquisition costs, and difficulty in data storage can lead to difficulties in data acquisition, i.e., the small sample problem. When the available sample data is limited, the model is prone to overfitting, thus affecting the accuracy of fault diagnosis. Therefore, the small sample problem is one of the key challenges currently faced by intelligent fault diagnosis methods.
[0003] The small sample size problem is caused by unavoidable issues such as the inherent characteristics of mechanical equipment, the working environment, and the acquisition equipment, which has hindered the development of the field of intelligent fault diagnosis. In recent years, some scholars have proposed solutions to address the small sample size problem in other fields, especially computer vision, such as data augmentation, transfer learning, and meta-learning methods. However, mature solutions in the field of fault diagnosis are still relatively few. Mechanical equipment is usually in a healthy operating state during operation, and some faults require shutdown for repair or scrapping once they occur. Therefore, the number of fault samples that can be collected is extremely small, and in extreme cases, there may only be one sample. In addition, data-driven intelligent fault diagnosis methods mainly rely on historical data for the generalization and identification of fault patterns. However, if the historical data does not fully cover all possible fault patterns, the classification performance of the model will be limited. For new types of faults or rare, sporadic faults, these methods may not provide accurate diagnostic results. This small sample size problem, with only a very small number of samples, poses a huge challenge to intelligent fault diagnosis.
[0004] Existing technologies disclose equipment fault diagnosis methods based on generative adversarial networks (GANs). These methods first standardize the data; then, they construct a generator and discriminator with a convolutional and transformer-based cross-structure, effectively extracting global temporal features of the time-series signal using the transformer layer; further, convolutional layers are used to extract local temporal features. Simultaneously, position encoding is embedded into the time-series signal, allowing the model to fully learn the positional information features of the signal, ultimately generating high-quality time-series signal samples to expand the original training samples, thereby improving fault diagnosis accuracy under small sample conditions. However, the shortcomings of the small-sample rolling bearing fault diagnosis method based on convolutional transformer GANs are: it does not fully utilize the frequency domain features of the vibration signal; GANs are prone to mode collapse, vanishing gradients, or exploding gradients; and training GANs requires significant time and computational resources. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention primarily targets the low modeling efficiency and inability to effectively diagnose small-sample faults in existing technologies. This invention provides a small-sample fault diagnosis and recognition method and system based on an improved Deep Convolutional Generative Adversarial Network (CWDC-GAN). This method, building upon generative adversarial networks, combines the advantages of Wasserstein Generative Adversarial Networks (WGAN, Wasserstein GAN) and improves the loss function of Deep Convolutional Generative Adversarial Networks (DCGAN), proposing a novel generative adversarial network model (WDCGAN). To more effectively train DCGAN and generate higher-quality samples, Wasserstein distance is used as the loss function during training to measure the difference between the generated samples and the real sample distribution. The Wasserstein distance does not degenerate to a constant under optimal discriminator conditions, meaning the generator's gradient does not vanish, thus enabling the generation of higher-quality samples. Fault diagnosis using WDCGAN not only leverages its powerful generation and feature extraction capabilities to generate realistic images but also significantly improves training efficiency.
[0006] The first objective of this invention is to provide a small-sample fault diagnosis and identification method based on CWDC-GAN, comprising:
[0007] Obtain a small sample dataset of rolling bearing faults, where each data point in the dataset is a one-dimensional data point;
[0008] One-dimensional data is transformed into a two-dimensional wavelet time-frequency distribution map using continuous wavelet transform.
[0009] An improved generative adversarial network is constructed, comprising a generator and a discriminator; wherein the loss functions of the generator and the discriminator are both set based on the Wasserstein distance, and the parameters are adjusted using the Adam algorithm based on the gradient calculated from the loss function;
[0010] The improved generative adversarial network is trained based on the two-dimensional wavelet time-frequency distribution map. The generator and discriminator are trained adversarially until convergence, which yields the trained generator.
[0011] New samples are generated using the trained generator, the original samples and the new samples are merged to expand the dataset, and finally the expanded dataset is used to train the classification model.
[0012] The small sample data to be diagnosed is used to diagnose the fault based on the trained classification model.
[0013] Preferably, the classification model is a convolutional neural network, wherein each convolutional layer in the convolutional neural network is followed by a batch normalization layer and a max pooling layer with a stride of 2.
[0014] Preferably, the generator is an improved generator network that uses spatial vectors as random parameters and performs deconvolution operations through two-dimensional convolutional transpose layers to map them into the data space of the generated image. After each convolutional transpose layer, a batch normalization layer and a ReLU activation function are introduced.
[0015] Preferably, the discriminator is an improved discriminator network that uses two-dimensional convolutional layers and introduces LeakyReLU as an activation function after the convolutional layers.
[0016] Preferred, improved generative adversarial networks include the following during training:
[0017] The two-dimensional wavelet time-frequency distribution map is used as the real image input to the discriminator. A random noise vector based on Gaussian distribution is input to the generator to generate corresponding fake images. The fake images and real images are input to the discriminator respectively. The loss of the discriminator is calculated, and the loss of the generator is calculated based on the fake images generated by the generator. The weight parameters of the discriminator and the generator are updated through the backpropagation algorithm until convergence, which yields the trained generator.
[0018] Preferably, it also includes evaluating the trained classification model using an evaluation metric derived from the confusion matrix to assess the performance of the trained classification model.
[0019] Preferably, the evaluation metrics include accuracy, precision, recall, and F1 score.
[0020] Preferably, generating new samples using the trained generator involves inputting a random noise vector based on a Gaussian distribution into the trained generator to generate new samples.
[0021] The second objective of this invention is to provide a small-sample fault diagnosis and identification system based on CWDC-GAN, comprising:
[0022] The data acquisition module is used to acquire a small sample dataset of rolling bearing faults, where each data point in the dataset is a one-dimensional data point.
[0023] One-dimensional data is transformed into a two-dimensional wavelet time-frequency distribution map using continuous wavelet transform.
[0024] A sample generation module is used to construct an improved generative adversarial network, which includes a generator and a discriminator. The loss functions of the generator and the discriminator are both set based on the Wasserstein distance, and the parameters are adjusted using the Adam algorithm based on the gradient calculated from the loss function.
[0025] The improved generative adversarial network is trained based on the two-dimensional wavelet time-frequency distribution map. The generator and discriminator are trained adversarially until convergence, which yields the trained generator.
[0026] The fault diagnosis module is used to generate new samples using the trained generator, merge the original samples and the new samples to expand the dataset, and finally train the classification model with the expanded dataset.
[0027] The small sample data to be diagnosed is used to diagnose the fault based on the trained classification model.
[0028] The present invention has at least the following beneficial effects:
[0029] This invention provides a small-sample fault diagnosis and identification method and system based on CWDC-GAN, mainly based on continuous wavelet transform, WGAN, and DCGAN to construct the CWDC-GAN model. This method transforms the one-dimensional vibration signal of a rolling bearing into a two-dimensional wavelet time-frequency distribution map through continuous wavelet transform, maximizing the utilization of the non-stationary and nonlinear information carried by the vibration signal.
[0030] This invention presents a small-sample fault diagnosis and identification method based on CWDC-GAN. Building upon generative adversarial networks, it combines the advantages of WGAN (Wasserstein GAN) by using Wasserstein distance to improve the loss function of DCGAN. The Wasserstein distance does not degenerate into a constant under the optimal discriminator condition, which means that the generator's gradient will not vanish. This avoids the problems of mode collapse, gradient vanishing, or gradient explosion that easily occur in the model, thereby saving a lot of time and computational resources.
[0031] This invention presents a small-sample fault diagnosis and identification method based on CWDC-GAN, which effectively augments small-sample rolling bearing vibration data. Experiments and evaluations were conducted on different augmentation levels. Experiments were then performed under three different operating conditions, followed by evaluation and analysis. The final results demonstrate that the CWDC-GAN-based small-sample rolling bearing fault diagnosis and identification method exhibits a simple and efficient modeling process, good performance and robustness, and can achieve accurate fault identification when solving small-sample fault diagnosis problems. This invention is of significant importance for fault diagnosis and identification of real-world mechanical equipment. Attached Figure Description
[0032] Figure 1 This is a flowchart of a small-sample fault diagnosis and identification method based on CWDC-GAN.
[0033] Figure 2 This is a basic network structure diagram of WDCGAN.
[0034] Figure 3 This is a diagram of the WDCGAN generator network structure.
[0035] Figure 4 This is a diagram of the WDCGAN discriminator network structure.
[0036] Figure 5 This is a time-frequency graph of 10 health status data under CWRU data condition A.
[0037] Figure 6 The error diagnosis accuracy curves (a) and line graphs (b) are shown for seven different sample sizes.
[0038] Figure 7 This is a comparison chart of some original samples and newly generated samples.
[0039] Figure 8 The graph shows the accuracy curves for four levels of data augmentation.
[0040] Figure 9 The confusion matrix diagram shows the four levels of data augmentation. Detailed Implementation
[0041] In order to illustrate the technical means and effects adopted by the present invention to achieve the intended purpose, the following detailed description is provided in conjunction with the embodiments.
[0042] This invention provides a small-sample fault diagnosis and recognition method based on an improved deep convolutional generative adversarial network (CWDC-GAN). This method, building upon generative adversarial networks and combining the advantages of WGAN (Wasserstein GAN), improves the loss function of DCGAN, proposing a novel generative adversarial network model based on improved Wasserstein distance (WDCGAN). To train DCGAN more effectively and generate higher-quality samples, Wasserstein distance is used as the loss function during training to measure the difference between the generated and real sample distributions. The Wasserstein distance does not degenerate to a constant under optimal discriminator conditions, meaning the generator's gradient does not vanish, thus enabling the generation of higher-quality samples. Using WDCGAN for fault diagnosis not only leverages its powerful generation and feature extraction capabilities to generate realistic images but also significantly improves training efficiency.
[0043] See Figure 1 As shown, a small-sample fault diagnosis and identification method based on CWDC-GAN includes:
[0044] S1. Obtain a small sample dataset of rolling bearing faults, where each data point in the dataset is a one-dimensional data point.
[0045] This step specifically involves constructing a small sample fault dataset for rolling bearings and preprocessing the original vibration data, as detailed below:
[0046] An experimental platform was built to collect and organize the necessary raw vibration data. Based on actual conditions, a small-sample fault dataset for rolling bearings was constructed. Next, the vibration data underwent preprocessing, including missing value handling, data standardization, and sliding window sampling, ultimately constructing a small-sample fault dataset for model training. Normal and faulty samples were labeled, and the dataset was divided into training and test sets to evaluate the performance of the trained model.
[0047] S2. Convert the one-dimensional data into a two-dimensional wavelet time-frequency distribution map using continuous wavelet transform;
[0048] In this step, a wavelet time-frequency distribution map is constructed. Specifically, the continuous wavelet transform (CWT) is used to convert the original one-dimensional vibration signal into a two-dimensional wavelet time-frequency distribution map, which serves as the input data for subsequent deep learning models. This maximizes the utilization of the non-stationary and nonlinear information carried by the vibration signal. The CWT is implemented by calculating the input signal f(t) and a set of multi-scale, multi-translation wavelet basis functions. This is accomplished by the inner product between them. This operation produces wavelet coefficients C at different scales and displacements. a,b These coefficients, by simultaneously analyzing the time and frequency domain characteristics of the signal, can capture the characteristics of the signal in different time intervals and frequency ranges. Their mathematical expression is shown in equation (1).
[0049]
[0050] In the formula, t represents the time or the sampling point of the signal, that is, the position of the signal on the time axis; f(t) represents the signal function to be converted; The mother wavelet is a continuous function in both the time and frequency domains; * denotes conjugate; a and b represent the scaling factor and translation factor, respectively. This represents a continuous wavelet basis function.
[0051] The present invention selects Morlet wavelet as the basis function because Morlet wavelet has good localization characteristics in both time and frequency domains, and can effectively capture instantaneous changes and frequency changes of signals. Its basic function is shown in equation (2).
[0052]
[0053] In the formula, i is the imaginary unit, ω0 represents the center frequency, and e represents the base of the natural logarithm.
[0054] S3. Construct an improved generative adversarial network, which includes a generator and a discriminator; wherein the loss functions of the generator and the discriminator are both set based on the Wasserstein distance, and the parameters are adjusted using the Adam algorithm based on the gradient calculated by the loss function;
[0055] The improved generative adversarial network is trained based on the two-dimensional wavelet time-frequency distribution map. The generator and discriminator are trained adversarially until convergence, which yields the trained generator.
[0056] The generator is an improved generator network that uses spatial vectors as random parameters and performs deconvolution operations through two-dimensional convolutional transpose layers to map them into the data space of the generated image. After each convolutional transpose layer, a batch normalization layer and a ReLU activation function are introduced.
[0057] The discriminator is an improved discriminator network that uses two-dimensional convolutional layers and introduces LeakyReLU as an activation function after the convolutional layers.
[0058] The improved generative adversarial network includes the following features during training:
[0059] The two-dimensional wavelet time-frequency distribution map is used as the real image input to the discriminator. A random noise vector based on Gaussian distribution is input to the generator to generate corresponding fake images. The fake images and real images are input to the discriminator respectively. The loss of the discriminator is calculated, and the loss of the generator is calculated based on the fake images generated by the generator. The weight parameters of the discriminator and the generator are updated through the backpropagation algorithm until convergence, which yields the trained generator.
[0060] In one embodiment, constructing the improved generative adversarial network WDCGAN includes:
[0061] WDCGAN consists of a generator and a discriminator, and its basic network structure is as follows: Figure 2 As shown in the diagram, this model gradually improves the realism of the generated images through adversarial training between the generator and discriminator networks, and enables the discriminator to more accurately distinguish between real and fake images. Ultimately, it generates high-quality, indistinguishable images for bearing fault diagnosis under small sample conditions. The specific operation is as follows:
[0062] 1) Create an improved generator network: Utilize a spatial vector z as a random parameter and perform deconvolution operations through a 2D convolutional transpose layer to map it into the data space of the generated image. To enhance network stability, a batch normalization layer and a ReLU activation function are introduced after each convolutional transpose layer. Figure 3 The generator network structure is shown, where each convolutional kernel is 4*4 in size. A 100-dimensional random vector z is mapped to a 4*4*1024 vector through a fully connected layer. After four deconvolution operations, 64*64*3 image data is obtained.
[0063] 2) Create an improved discriminator network: Use ordinary two-dimensional convolutional layers and introduce LeakyReLU as the activation function after the convolutional layers to solve problems such as vanishing gradients and exploding gradients. Figure 4 The discriminator network structure is shown, where each convolutional kernel is 4*4 in size. After four convolution operations, the final one-dimensional data is input into a fully connected layer to output the discrimination probability of image authenticity.
[0064] 3) The Adam algorithm is used to adjust parameters based on the gradient calculated from the loss function, guiding the model towards minimizing the loss function. In WDCGAN, the loss functions of both the generator and discriminator are based on the Wasserstein distance to measure the distance between two distributions. The Wasserstein distance does not degenerate to a constant in the case of the optimal discriminator, which means that the generator's gradient does not vanish, thus enabling the generation of higher-quality samples.
[0065] Wasserstein distance is a measure of the difference between two probability distributions. It is a distance metric based on optimal transport theory and is the essence of WGAN. Its definition formula is shown in equation (3).
[0066]
[0067] In the formula, P and Q are two probability distributions, and ∏(P,Q) is the joint distribution space of P and Q. P It is a norm, where γ represents the joint probability distribution from one probability distribution to another.
[0068] In WDCGAN, the output D(x) of the discriminator is defined as the product of x and the true data distribution p. data The Wasserstein distance between them can be obtained as follows:
[0069]
[0070] in, It comes from the actual distribution p data The data is processed through the entropy of the discriminator.
[0071] Similarly, the discriminator's output D(G(z)) is defined as the product of G(z) and the true data distribution p. data The Wasserstein distance between them can be obtained as follows:
[0072]
[0073] in, It is from random Gaussian noise input p z The data for (z) is obtained through the entropy of the generator.
[0074] The improved discriminator loss function can be written as:
[0075]
[0076] The improved generator loss function can be written as:
[0077]
[0078] 4) In each training iteration, a batch of samples is first randomly selected from the real image dataset as the real image input to the discriminator. Then, the generator receives a batch of random noise vectors and generates corresponding fake images. The real and fake images are fed into the discriminator respectively, and the discriminator's loss is calculated. Then, the generator's loss is calculated based on the images generated by the generator. Finally, the weight parameters of the discriminator and generator are updated using the backpropagation algorithm.
[0079] 5) Repeat step 4) during the training process until the preset number of training iterations is reached or the model converges, that is, the fake images generated by the generator reach the expected quality.
[0080] S4. Use the trained generator to generate new samples, merge the original samples and the new samples to expand the dataset, and finally use the expanded dataset to train the classification model.
[0081] The small sample data to be diagnosed is used to diagnose the fault based on the trained classification model.
[0082] The classification model is a convolutional neural network, wherein each convolutional layer in the convolutional neural network is followed by a batch normalization layer and a max pooling layer with a stride of 2.
[0083] It also includes evaluating the trained classification model, which uses an evaluation metric derived from the confusion matrix to assess the performance of the trained classification model.
[0084] The evaluation metrics include accuracy, precision, recall, and F1 score.
[0085] The process of generating new samples using a trained generator involves inputting a random noise vector based on a Gaussian distribution into the trained generator to generate new samples.
[0086] To further illustrate the small-sample fault diagnosis and identification method based on CWDC-GAN provided by the present invention, the following embodiments are described in conjunction with the accompanying drawings.
[0087] This embodiment is a small-sample fault diagnosis and identification method based on CWDC-GAN.
[0088] See Figures 1-9 As shown, this embodiment uses a small-sample fault diagnosis and identification method based on CWDC-GAN, applied to the Case Western Reserve University rolling bearing public dataset for fault diagnosis. The specific steps are as follows:
[0089] Step 1. Construct a small sample fault dataset of rolling bearings and preprocess the raw vibration data.
[0090] In this experimental example, open experimental data from the Bearing Data Center at Case Western Reserve University in the United States was used as the research object. This data is widely used in the field of mechanical fault diagnosis. Bearing damage is single-point damage formed by electrical discharge machining, including three types: inner ring fault, outer ring fault, and rolling element fault. Each type of fault is further divided into three degrees of damage with diameters of 0.007 inches, 0.014 inches, and 0.021 inches. The machined faulty bearing was reinstalled in the test motor, and vibration acceleration signal data were recorded at four different motor speeds: 1797 r / min, 1772 r / min, 1750 r / min, and 1730 r / min. Therefore, there are 10 types of health status data under each operating condition, as detailed in Table 1.
[0091] Table 1. Details of CWRU bearing health status data.
[0092]
[0093] It should be noted that bearing damage is single-point damage caused by electrical discharge machining, including three types: inner ring failure, outer ring failure, and rolling element failure. Each type of failure is further divided into three degrees of damage with diameters of 0.007 inches, 0.014 inches, and 0.021 inches.
[0094] The experiment used data collected from the drive-end bearing at 12kHz in the Western Reserve University bearing dataset. To conduct comparative analysis and verify the generalization and robustness of the method, data from three operating conditions (A, B, and C) were selected for the experiment, with each condition containing 10 health status data. Then, a sliding window sampling method was used to sample the 10 health status data, resulting in 120 samples for each data type and a sample length of 1024.
[0095] Step 2. Use Continuous Wavelet Transform (CWT) to convert the original one-dimensional vibration signal into a two-dimensional wavelet time-frequency distribution map as input data for the subsequent deep learning model. To better observe the data, the wavelet time-frequency distribution map of 10 classes of samples containing 1024 data points under CWRU data condition A is shown below. Figure 5 As shown.
[0096] Step 3. Construct the improved Generative Adversarial Network (WDCGAN). First, create an improved generator and discriminator network, where the loss functions of both the generator and discriminator are based on Wasserstein distance to measure the distance between two distributions. Then, use the Adam algorithm to adjust the parameters based on the gradient calculated from the loss function, guiding the model towards minimizing the loss function. In each training iteration, a batch of samples is randomly selected from the real image dataset as the real image input to the discriminator. Then, the generator receives a batch of random noise vectors based on a Gaussian distribution. These vectors can be understood as the latent features of the image. The generator learns to map these latent features to the real image, thereby generating corresponding fake images. The real and fake images are fed into the discriminator respectively, and the discriminator's loss is calculated. Then, the generator's loss is calculated based on the image generated by the generator. Finally, the weight parameters of the discriminator and generator are updated using the backpropagation algorithm until the preset number of training iterations is reached or the model converges, meaning the fake images generated by the generator reach the expected quality.
[0097] Step 4. Use the trained generator to generate new samples, and merge the original samples and new samples to expand the dataset. Finally, input the expanded dataset into the classification model for fault diagnosis. The experiment uses a simple convolutional neural network as the classifier, and its specific parameters are shown in Table 2. Each convolutional layer is followed by a batch normalization layer and a max pooling layer with a stride of 2.
[0098] Table 2. Details of Convolutional Neural Network Parameters
[0099]
[0100]
[0101] In this embodiment, the performance of fault diagnosis is evaluated and analyzed. To more accurately assess the impact of the proposed data augmentation method CWDC-GAN on the fault diagnosis performance after expanding the dataset, it is necessary to focus on the classifier's missed and misclassification phenomena on fault samples. Although the probability of some faults occurring in equipment is very low, once a fault occurs, missed and misclassifications may lead to serious economic losses or even casualties. Therefore, relying solely on classification accuracy to evaluate the effectiveness of the fault diagnosis model is not comprehensive enough. In this study, an evaluation metric derived from the confusion matrix is used to more comprehensively evaluate the model's performance.
[0102] A confusion matrix is a structured table used to evaluate the performance of a classification model. It details the discrepancy between the model's predictions and the actual labels. The table uses rows to represent the actual classes and columns to represent the classes predicted by the model. Each cell indicates the match between the actual and predicted classes. The confusion matrix provides a visual analysis of the model's classification performance across different categories, as shown in Table 3 below.
[0103] Table 3. Schematic diagram of the confusion matrix
[0104]
[0105] Wherein: TP (True Positive) represents the true class, meaning the sample's true class is positive, and the model identifies it as a positive example. FN (False Negative) represents a false negative, meaning the sample's true class is positive, but the model identifies it as negative. FP (False Positive) represents a false positive, meaning the sample's true class is negative, but the model identifies it as positive. TN (True Negative) represents a true negative, meaning the sample's true class is negative, and the model identifies it as negative. From this, the following four evaluation metrics are derived.
[0106] Metric 1: Accuracy
[0107] Accuracy is one of the most commonly used evaluation metrics in machine learning. It measures the ratio between the number of samples correctly classified by the model on the test set and the total number of samples. A higher accuracy means that the model correctly classifies a higher proportion of samples. Its mathematical expression is shown in Equation (8).
[0108]
[0109] While accuracy is a commonly used and easily understood metric, it also has limitations. In certain situations, accuracy may not be a good indicator of model performance. When the ratio of positive to negative samples in the dataset is severely imbalanced, accuracy may be exaggerated by models biased towards the majority class.
[0110] Metric 2: Precision
[0111] Precision is the ratio of the number of samples correctly classified as positive by the model on the test set to the total number of samples correctly classified as positive by the model. Its mathematical expression is shown in equation (9).
[0112]
[0113] Metric 3: Recall
[0114] Recall is a metric used to measure the proportion of samples that are correctly classified as positive out of all samples that should be correctly classified as positive. Its mathematical expression is shown in equation (10).
[0115]
[0116] Indicator 4: F1 score
[0117] The F1 score is the harmonic mean of precision and recall, used to evaluate the overall performance of a model. By calculating the F1 score, the advantages of both precision and recall can be taken into account. Its mathematical expression is shown in equation (11).
[0118]
[0119] First, an experiment was conducted using operating condition A as an example. For each health status category, 50, 40, 30, 20, 10, 5, and 1 samples were selected as the training set, and 14 samples were selected as the test set to analyze the impact of sample size on fault diagnosis performance. The fault diagnosis accuracy curves for each sample size are shown below. Figure 6 As shown in (a). To more clearly compare the differences in accuracy, a line graph is plotted as follows. Figure 6 (b)
[0120] Through observation Figure 6 (a) and (b) clearly show that the sample size has a significant impact on model performance. Comparing the performance of the same trained model with seven different sample sizes, it was found that the accuracy reached 100% when the sample size was 50. As the sample size decreased, the accuracy gradually decreased. When there was only one training sample, the accuracy was only 43.45%, which almost completely negated its diagnostic capability. This is because when the number of training samples is small, the model cannot fully learn the differences between samples, easily leading to overfitting and thus failing to accurately classify the samples.
[0121] In the following steps, the proposed method of this invention is used to augment the samples. First, adversarial training is performed using WDCGAN until the generator and discriminator converge. Then, the trained generator is used to generate new samples. Figure 7 The image shows some of the newly generated samples compared to the original samples. Observation reveals that the newly generated samples have lower resolution, but compared to the original samples, they still have a high degree of similarity and largely reflect the characteristics of the original samples.
[0122] To verify whether the quality of the generated samples could improve fault diagnosis performance, the dataset with 10 samples in each category was augmented. Three datasets were constructed, with 10, 20, and 30 samples augmented to each category, respectively. Next, fault diagnosis was performed using the data augmented datasets, and the accuracy curves for different levels of data augmentation are shown in the figure below. Figure 8 .
[0123] observe Figure 8 It was found that without using the method of this invention to expand the dataset, the fault diagnosis accuracy of a dataset with 10 samples was only 91.03%. However, after increasing the number of samples in each category by 10 using the method of this invention, the accuracy improved to 91.43%. When the number of expanded samples increased to 30, the accuracy reached 95.00%, an improvement of approximately 4.29% compared to the initial accuracy. Although it does not reach the diagnostic level under the corresponding real sample size, it still significantly improves the accuracy. This result verifies the effectiveness of the method of this invention in handling small sample problems. To more comprehensively observe the impact of generated samples on diagnostic performance, confusion matrices were plotted for these four cases, as shown below. Figure 9 As shown.
[0124] from Figure 9 It can be seen that without sample expansion, all categories labeled 0, 1, 2, 4, and 9 exhibited classification errors. After sample expansion, the accuracy of category identification for labels 2 and 9 gradually improved, while the improvement in classification performance for other labels was not significant, and the accuracy of category identification for label 0 did not improve. This may be due to issues such as unclear feature differentiation in the wavelet time-frequency distribution map obtained through continuous wavelet transform, mismatched data distribution, lack of sample diversity, and low fidelity.
[0125] It should be noted that, Figure 9 In (a), (b), (c), and (d), the x and y coordinates are: 0 = B007, 1 = B014, 2 = B021, 3 = IR007, 4 = IR014, 5 = IR021, 6 = Normal, 7 = OR007, 8 = OR014, and 9 = OR021.
[0126] Wherein, Normal indicates normal, IR indicates inner ring fault, OR indicates outer ring fault, and B indicates rolling element fault;
[0127] For example, IR007 indicates a failure or damage to the inner ring with a diameter of 0.007 inches; B007 indicates a failure or damage to the rolling element with a diameter of 0.007 inches; and OR007 indicates a failure or damage to the outer ring with a diameter of 0.007 inches.
[0128] To further verify the generalization ability of the method proposed in this chapter, the above experiments were repeated using data from conditions B and C, with the same dataset sample settings as before. Convolutional neural networks were used to classify datasets containing four different levels of data augmentation, and the results of the four evaluation metrics are shown in Table 4, where the highest values are highlighted in bold.
[0129] Table 4 Evaluation Indicators for Four Levels of Data Augmentation
[0130]
[0131]
[0132] According to the results in Table 4, under three different operating conditions, using the CWDC-GAN method described in this chapter to augment the dataset to varying degrees can significantly improve the four evaluation metrics of fault diagnosis: accuracy, precision, recall, and F1 score. When the dataset is augmented with 30 samples for each health status class, the accuracy improves by 4.29%, 5.01%, and 6.43% under the three operating conditions, respectively. This indicates that the method is effective in solving small-sample problems with a certain number of samples and has a certain generalization ability. Furthermore, note that the accuracy and recall values in the table are the same because, when the number of samples in each class in the test set is equal, the multi-class metric accuracy equals the macro-average recall.
[0133] This invention provides a small-sample fault diagnosis and identification system based on CWDC-GAN, comprising:
[0134] The data acquisition module is used to acquire a small sample dataset of rolling bearing faults, where each data point in the dataset is a one-dimensional data point.
[0135] One-dimensional data is transformed into a two-dimensional wavelet time-frequency distribution map using continuous wavelet transform.
[0136] A sample generation module is used to construct an improved generative adversarial network, which includes a generator and a discriminator. The loss functions of the generator and the discriminator are both set based on the Wasserstein distance, and the parameters are adjusted using the Adam algorithm based on the gradient calculated from the loss function.
[0137] The improved generative adversarial network is trained based on the two-dimensional wavelet time-frequency distribution map. The generator and discriminator are trained adversarially until convergence, which yields the trained generator.
[0138] The fault diagnosis module is used to generate new samples using the trained generator, merge the original samples and the new samples to expand the dataset, and finally train the classification model with the expanded dataset.
[0139] The small sample data to be diagnosed is used to diagnose the fault based on the trained classification model.
[0140] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A small-sample fault diagnosis and identification method based on CWDC-GAN, characterized in that, include: Obtain a small sample dataset of rolling bearing faults, where each data point in the dataset is a one-dimensional data point; One-dimensional data is transformed into a two-dimensional wavelet time-frequency distribution map using continuous wavelet transform. An improved generative adversarial network is constructed, comprising a generator and a discriminator; wherein the loss functions of the generator and the discriminator are both set based on the Wasserstein distance, and the parameters are adjusted using the Adam algorithm based on the gradient calculated from the loss function; The improved generative adversarial network is trained based on the two-dimensional wavelet time-frequency distribution map. The generator and discriminator are trained adversarially until convergence, which yields the trained generator. New samples are generated using the trained generator, the original samples and the new samples are merged to expand the dataset, and finally the expanded dataset is used to train the classification model. The small sample data to be diagnosed is used to diagnose the fault based on the trained classification model. The generator is an improved generator network that uses spatial vectors as random parameters and performs deconvolution operations through two-dimensional convolutional transpose layers to map them into the data space of the generated image. After each convolutional transpose layer, a batch normalization layer and a ReLU activation function are introduced. The discriminator is an improved discriminator network that uses two-dimensional convolutional layers and introduces LeakyReLU as an activation function after the convolutional layers.
2. The small-sample fault diagnosis and identification method based on CWDC-GAN according to claim 1, characterized in that, The classification model is a convolutional neural network, wherein each convolutional layer in the convolutional neural network is followed by a batch normalization layer and a max pooling layer with a stride of 2.
3. The small-sample fault diagnosis and identification method based on CWDC-GAN according to claim 1, characterized in that, The improved generative adversarial network includes the following features during training: The two-dimensional wavelet time-frequency distribution map is used as the real image input to the discriminator. A random noise vector based on Gaussian distribution is input to the generator to generate corresponding fake images. The fake images and real images are input to the discriminator respectively. The loss of the discriminator is calculated, and the loss of the generator is calculated based on the fake images generated by the generator. The weight parameters of the discriminator and the generator are updated through the backpropagation algorithm until convergence, which yields the trained generator.
4. The small-sample fault diagnosis and identification method based on CWDC-GAN according to claim 1, characterized in that, It also includes evaluating the trained classification model, which uses an evaluation metric derived from the confusion matrix to assess the performance of the trained classification model.
5. The small-sample fault diagnosis and identification method based on CWDC-GAN according to claim 4, characterized in that, The evaluation metrics include accuracy, precision, recall, and F1 score.
6. The small-sample fault diagnosis and identification method based on CWDC-GAN according to claim 1, characterized in that, The process of generating new samples using a trained generator involves inputting a random noise vector based on a Gaussian distribution into the trained generator to generate new samples.
7. A system for the small-sample fault diagnosis and identification method based on CWDC-GAN as described in claim 1, characterized in that, include: The data acquisition module is used to acquire a small sample dataset of rolling bearing faults, where each data point in the dataset is a one-dimensional data point. One-dimensional data is transformed into a two-dimensional wavelet time-frequency distribution map using continuous wavelet transform. A sample generation module is used to construct an improved generative adversarial network, which includes a generator and a discriminator. The loss functions of the generator and the discriminator are both set based on the Wasserstein distance, and the parameters are adjusted using the Adam algorithm based on the gradient calculated from the loss function. The improved generative adversarial network is trained based on the two-dimensional wavelet time-frequency distribution map. The generator and discriminator are trained adversarially until convergence, which yields the trained generator. The fault diagnosis module is used to generate new samples using the trained generator, merge the original samples and the new samples to expand the dataset, and finally train the classification model with the expanded dataset. The small sample data to be diagnosed is used to diagnose the fault based on the trained classification model.