A Bearing Fault Diagnosis Method Based on Improved WGAN Network

By improving the WGAN network, combined with R-FCN network and Hyperopt optimization, the problem of mode collapse and gradient disappearance in the WGAN network in bearing fault diagnosis is solved, and efficient and accurate bearing fault diagnosis is achieved, and production efficiency and safety are improved.

CN116223038BActive Publication Date: 2025-07-25SICHUAN CHAOYIHONG TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310026862.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-09
Publication Date
2025-07-25
Estimated Expiration
2043-01-09

AI Technical Summary

Technical Problem

The existing WGAN network has problems such as mode collapse, gradient disappearance and convergence in bearing fault diagnosis, which leads to the inability to accurately judge the bearing operating status. The traditional fault diagnosis model takes a long time and has low diagnostic accuracy.

Method used

Using an improved WGAN network, by building a discriminator for generators and R-FCN networks, combining Hyperopt optimization hyperparameters and semi-supervised learning, optimizing the training process of generators and discriminators, and using acceleration sensors to collect bearing vibration signals for fault diagnosis.

Benefits of technology

It improves the accuracy and efficiency of bearing fault diagnosis, reduces training time, enhances the robustness and diagnostic accuracy of the model, and solves the problems of time-consuming and low diagnostic accuracy of traditional models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116223038B_ABST
    Figure CN116223038B_ABST
Patent Text Reader

Abstract

The present invention discloses a bearing fault diagnosis method based on an improved WGAN network, including the selection and installation of acceleration sensors, collecting vibration signals during the operation of sample bearings and processing the sample signals, constructing an improved WGAN diagnosis model, building a generator model and generating false signals, adopting an R-FCN network model to obtain the improved WGAN diagnosis model, optimizing the hyperparameters of the improved WGAN diagnosis model by Hyperopt, using semi-supervised learning to guide the training of the generator and discriminator in the improved WGAN diagnosis model, and realizing bearing fault diagnosis with the optimized improved WGAN diagnosis model. The full-life cycle vibration signals during the operation of the bearing to be measured are collected, processed, and then input into the improved WGAN diagnosis model to obtain the diagnosis accuracy and fault type of the bearing. The present invention solves the problems of long time consumption and low diagnosis accuracy of traditional fault diagnosis models, and improves the actual production efficiency and safety.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a bearing fault diagnosis method, and particularly to a bearing fault diagnosis method based on an improved WGAN network. Background Art

[0002] With the development of rotating machinery in automation, bearings play a crucial role. Currently, bearings are widely used in intelligent manufacturing fields such as aerospace and navigation. However, most bearings are in a relatively harsh working environment, and vibrations and impacts are likely to cause bearing damage, affecting the normal operation of equipment. To avoid serious impacts caused by bearing failures, it is urgent to judge the damage degree of bearings during use for fault diagnosis, which is beneficial for operators to detect bearing faults.

[0003] To solve the problems of mode collapse, gradient disappearance, and inability to identify convergence in the original GAN, this patent proposes an improved Wasserstein distance generative adversarial network (WGAN). The network mainly consists of a generator and a discriminator. However, the discriminator is no longer a traditional model but is replaced by an R-FCN network. By continuously iteratively training the generator and the discriminator, the two are made to play against each other, so that the trained discriminator cannot determine whether the data generated by the generator is true or false. At this time, the obtained diagnostic model is the optimal model.

[0004] Currently, WGAN is mainly used in fields such as data enhancement, image processing, speech recognition, and fault diagnosis. CN114037001, a mechanical pump small-sample fault diagnosis method based on WGAN and metric learning, expands data by class, and combines a metric network with the residual idea and spatial adaptive structure to achieve feature mapping for fault classification; CN114781447 proposes a gearbox diagnosis method based on a generative adversarial network and a three-dimensional convolutional neural network. This method combines the improved generative adversarial network WGAN with the three-dimensional convolutional neural network, namely WGAN-3DCNN, to extract features from the augmented dataset and identify fault types; CN113536697 A proposes a bearing remaining life prediction method based on an improved residual network and WGAN. Under variable working conditions and strong noise interference, this method collects the original vibration signals of the bearing under different working conditions, realizes the common feature space of sequences in the target domain and the source domain, and then uses a fully connected neural network to predict the bearing life; CN 110428004 B proposes a mechanical component fault diagnosis method based on deep learning under data imbalance. This method expands the sample data into the original fault sample data to achieve data balance, and then uses a convolutional neural network for feature extraction and fault classification to realize the fault diagnosis of mechanical components. Most of the above methods expand the data volume required by the WGAN network through data augmentation methods, and to varying degrees, realize the role of the WGAN network in fault diagnosis. However, they do not optimize from the perspectives of the generator and discriminator's own models and hyperparameter selection, loss functions, and unsupervised learning, resulting in the inability to obtain superior generator and discriminator models, the inability of WGAN to extract deep data information, and thus the inability to accurately judge the bearing operating state.

[0005] Therefore, it is urgent to solve the above problems. Summary of the Invention

[0006] Object of the Invention: The object of the present invention is to provide a bearing fault diagnosis method based on an improved WGAN network. This method optimizes the WGAN model and hyperparameters, strengthens the data utilization rate, and improves the model accuracy and diagnosis precision.

[0007] Technical Solution: To achieve the above object, the present invention discloses a bearing fault diagnosis method based on an improved WGAN network, including the following steps:

[0008] (1) Selection and installation of acceleration sensors,

[0009] (2) Collect vibration signals during the operation of the sample bearing and process the sample signals,

[0010] (3) Construct an improved WGAN diagnosis model, and use this model to achieve bearing fault diagnosis and fault classification. The specific steps are as follows:

[0011] (3.1) Build a generator model and generate false signals.

[0012] (3.2) Replace the original discriminator model with an R-FCN network model to obtain an improved WGAN diagnostic model.

[0013] (3.3) Use Hyperopt to optimize the hyperparameters of the improved WGAN diagnostic model.

[0014] (3.4) Use semi-supervised learning to guide the training of the generator and discriminator in the improved WGAN diagnostic model.

[0015] (3.5) The optimized improved WGAN diagnostic model realizes bearing fault diagnosis.

[0016] (4) Collect the vibration signals of the whole life cycle of the bearing to be tested and process the vibration signals, and input the processed vibration signals in the form of time-frequency diagrams into the improved WGAN diagnostic model to obtain the diagnostic accuracy and fault type of the bearing to be tested.

[0017] Among them, in step (1), the acceleration sensor is installed at the driving end of the gearbox, and the acceleration sensor is installed at the 9 o'clock and 12 o'clock directions on the surface of the driving end of the gearbox, and the installation positions of the acceleration sensors are relatively vertical.

[0018] Preferably, the specific steps of step (2) are:

[0019] (2.1) Set the sampling parameters, including the sampling frequency f = f′, the sampling duration t = t′, and the sampling interval Δt = Δt′, sample the acceleration signal received by the bearing, and collect the sample data during the operation of the bearing.

[0020] Among them, the sample data is obtained by artificial fault injection, mainly including normal bearings and faulty bearings. The faulty bearings include 6 different types of faulty bearings; the 7 bearing allocation situations are: sample bearing 1 is a normal bearing with a damage diameter of R0 and an amplitude of A0; sample bearing 2 is a faulty bearing with an outer ring damage diameter of R1 and an amplitude of A1; sample bearing 3 is a faulty bearing with an inner ring damage diameter of R1 and an amplitude of A1; sample bearing 4 is a faulty bearing with a ball body damage diameter of R1 and an amplitude of A1; sample bearing 5 is a faulty bearing with an outer ring damage diameter of R2 and an amplitude of A2; sample bearing 6 is a faulty bearing with an inner ring damage diameter of R2 and an amplitude of A2; sample bearing 7 is a faulty bearing with a ball body damage diameter of R2 and an amplitude of A2; the 7 different data also divide the bearings into different fault degrees. Among them, R0 is normal data, R0-R1 is slightly faulty data, R1-R2 is moderately faulty data, and above R2 is severely faulty data.

[0021] (2.2) Output and save the sampling results in step (2.1) in numerical form. When the bearing is running at high speed, the acceleration sensor at the driving end will collect the acceleration vibration signal. The collected acceleration vibration signal is converted by an analog-to-digital converter, and the converted acceleration vibration signal is amplified according to the bridge circuit to output the vibration signal value. Finally, the numerical value output by each sampling is saved in CSV format. Sampling is performed on the sampling points in two different directions respectively. The acceleration vibration signal in the 9 o'clock direction is placed in the first column of the CSV file, and the acceleration vibration signal in the 12 o'clock direction is placed in the second column of the CSV file, and saved as 1.CSV, and so on to complete the data saving;

[0022] (2.3) Perform segmentation processing on the data in step (2.2). If there are N data in a CSV file, take the first N / 1000 data as a group, and so on, traverse the CSV file one by one, and a total of N i groups of data are obtained;

[0023] (2.4) Perform continuous wavelet transform processing on the N i groups of data obtained in step (2.3) to obtain N i visual time-frequency diagrams that can be used as data sets. The time-frequency diagrams are in RGB format and the pixels are m*n;

[0024] (2.5) Use one-hot encoding to label the data set in step (2.4) as 80% and 20% for the training set and the test set respectively. Use 0 and 1 to represent the fault states of the running data, that is, use N-bit register states to encode N states. Set 1000 as the normal state, 0100 as the minor fault state, 0010 as the moderate fault state, and 0001 as the severe fault state; and use inverse one-hot encoding to represent the output type, where the output value of 0 represents the normal state, the output value of 1 represents the minor fault state, the output value of 2 represents the moderate fault state, and the output value of 3 represents the severe fault state.

[0025] Furthermore, the specific steps for building the generator network model in step (3.1) are as follows:

[0026] (3.1.1) Use a two-dimensional convolutional layer as the network input. The input end is random noise data. After batch normalization processing to achieve data normalization, then use the LeakyRule activation function to activate a large number of neurons, and rely on the calculations between neurons to extract deep features. Finally, use the tanh activation function as the network output;

[0027] (3.1.2) Input the random noise with one-hot encoded labels set into the generator, and the generator generates false signals through the training of its own network structure;

[0028] (3.1.3) Process the false signals generated by random noise using the improved CWT to generate the required time-frequency diagram.

[0029] Furthermore, in step (3.2), the R-FCN network model is built as the discriminator model of the improved WGAN network. Use the discriminator model to judge the pictures generated by the generator in step (3.1), and output the loss functions of the generator and the discriminator and the diagnostic accuracy of the improved WGAN model. The specific steps are as follows:

[0030] (3.2.1) Use O two-dimensional convolutional layers Conv2D, P Batch Normalizaztion layers, Q LeakyRule activation functions and the ResNet101 network to form the input network of the discriminator. Obtain the initial feature map through 1 Conv2D, and then perform Conv2D operations on it to finally obtain a new feature map that removes redundant image features;

[0031] (3.2.2) Obtain the edge boxes of the corresponding regions of interest in the new feature map through the Region Proposal Network (RPN), and use each RoI edge box to obtain the features in the new feature map in step (3.2.1) respectively; then determine the coordinate information of the position-sensitive region through r, s, t, u of each RoI edge box region, where r, s, t, u are the coordinate positions of the edge box. According to this method, each sub-region is obtained, and finally each RoI realizes the classification and regression of the features;

[0032] Among them, the RPN network is the RPN layer in Faster R-CNN, which is mainly used to extract edge boxes in the Faster-RCNN network; since it is time-consuming and laborious to extract edge boxes in the R-FCN network, after introducing the convolutional neural network, the two-dimensional convolutional layer is used to select the position of the edge box in the form of feature extraction, thereby reducing the calculation time. In this invention, the RPN network can extract the edge boxes in the R-FCN network relatively quickly;

[0033] (3.2.3) Use pooling operations on each sub-region to find the appropriate response value. Set the minimum response value as S and the maximum response value as T according to the size of the RoI edge box. If the response value is between [S, T], it means that this feature is the required feature; otherwise, remove this feature and continue to find the appropriate feature until all features are found; until the features in the whole picture are obtained;

[0034] (3.2.4) Map the features obtained for each RoI in step (3.2.3) to a new feature map according to the size of the obtained bounding box to obtain the position-sensitive region, that is, obtain the feature region with response values between [S, T] through a pooling operation, where the score mapping size, that is, the size of the bounding box obtained by the position-sensitive region, is K*K*(C + 1) and 4*K*K dimensions. Then, use convolutional pooling operations to extract features from the position-sensitive region on the new feature map, and output the extraction results through a fully connected layer;

[0035] (3.2.5) Input the real training set with labels in step (2.5) into the built discriminator model for training, and then input the pictures generated by the generator in step (3.1) into R-FCN for training. Use the discriminator loss function and the generator loss function to make judgments. If the discriminator's discrimination result is true, and at the same time the generator loss function and the discriminator loss function decrease, when the two finally tend to fit and approach, it reaches the Nash equilibrium, indicating that the diagnostic model meets the requirements, then the training ends; then use the softmax function to classify to obtain the fault types with one-hot encoded labels, and output the loss function curves of the generator and discriminator models and the diagnostic accuracy curve of the improved WGAN network model changing with the number of iterations; if the discriminator's judgment result is false, then perform step (3.2.6);

[0036] (3.2.6) When the training result is false, it means that the pictures generated by the generator have poor effects, the discriminator cannot correctly judge the authenticity of the pictures, and the generator model does not reach the expected effect. Then, use the method of controlling variables to control the discriminator model and its hyperparameters to optimize the generator model. Fix the model parameters of the discriminator and continuously iterate to optimize the model parameters of the generator. When the discriminator's judgment result is true, the generator model reaches the optimal. At this time, the optimization effects of the discriminator and the generator models are the best. The best effect is when the generator and discriminator loss functions decrease, and the two finally tend to fit and approach, then stop iterating to obtain the improved WGAN diagnostic model; where when obtaining the improved WGAN diagnostic model, the number of iterations is epochs, the learning rate is Lr, and the batch size is Batch_size;

[0037] The method of controlling variables here is to keep the discriminator model and parameters unchanged and optimize the generator;

[0038] (3.2.7) Use the test set to test the improved WGAN diagnostic model obtained in step (3.2.5); if the discriminator can judge the authenticity of the pictures generated by the generator, and the discriminator loss function and the generator loss function slowly decrease to fit, and there is no steep jump-like fluctuation, that is, there is no gradient disappearance or collapse phenomenon, then stop iterating, output the generator and discriminator loss functions and the model training accuracy, and obtain the improved WGAN diagnostic model.

[0039] Preferably, in step (3.2), to further improve the diagnostic speed of the improved WGAN diagnostic model, the number of layers of the Resnet101 network in the R-FCN network is optimized. Five levels, namely R1, R2, R3, R4, and R5, are selected. R5 has 101 layers. Each RoI region is divided from d×d into s×s grids. The number of iterations is set to epochs - 1, the learning rate is Lr - 1, and the batch size is Batch_size - 1. Training is carried out on this basis, and the training results are reflected by the training accuracy. The optimal number of layers obtained from the five levels is R1. Compared with 101 layers, the Resnet network reduces the number of network layers and improves the training speed. On the basis of step (3.2), a diagnostic model with redundant network layers removed is obtained.

[0040] Furthermore, in step (3.3), since there are still many network structures and numerous hyperparameters in the improved WGAN network model, which will affect the generation ability of the generator and the discrimination ability of the discriminator, in order to achieve the feature extraction of deep-level signals and improve the diagnostic accuracy, the discriminator model is optimized by automatic parameter tuning to achieve the purpose of optimizing the improved WGAN model. The specific steps are as follows:

[0041] (3.3.1) Initialize the network hyperparameters, and obtain the initial parameter set F composed of parameters such as the size of the convolution kernel to be optimized, the number of hidden neurons, and the pooling factor. n , select the first group of parameters and input them into the improved WGAN model for training;

[0042] Among them, the initialized parameter set F n is: F n = [F1, F2,..., F i ;

[0043] (3.3.2) Establish an objective function. The objective function is the basis for evaluating the prior model, used to calculate the posterior probability of updating the optimization function, and obtain the optimal hyperparameter combination; the cross-entropy loss function is used as the objective function, and the formula is as follows:

[0044]

[0045] In the formula, B is the number of samples, C is the number of categories, τ bc is whether the b-th sample belongs to the c-th category, ω bc is the output result of classification, is the regularization coefficient, ρ j is the parameter to be learned in the network layer, and j is the feature map;

[0046] (3.3.3) Calculate the initial parameter F in step (3.3.1) n using the objective function in step (3.3.2) to obtain the corresponding function evaluation value Un ; where U n = [U1, U2, …, U i , and dataset A = [(F1, U1), …, (F n and U n )] is constructed by F i and U i ;

[0047] (3.3.4) Use the first set of data in dataset A from step (3.3.3) to determine whether the model meets the requirements on the validation set; specifically, it can be judged according to the hyperparameter combination expression of the model. If the discriminator loss function iteration tends to fit, this set of hyperparameters meets the requirements; otherwise, go to step (3.3.5). The formula is as follows:

[0048] I * = arg min i∈I H(i) (2)

[0049] In the formula, H(i) is the objective function to be minimized; I * is a set of obtained optimal hyperparameters;

[0050] When the minimum objective function H(i) ≤ £, the hyperparameter selection requirement is met;

[0051] (3.3.5) Establish a Gaussian regression model using dataset A, and continuously iterate and calculate to update the loss function through the Gaussian regression model to correct the probability model;

[0052] To obtain the optimal hyperparameters in the Gaussian distribution, the maximum likelihood estimation method can be used, and its expression is as follows:

[0053]

[0054] In the formula, K is the covariance matrix; f is the posterior probability of the first n samples; θ is the selected hyperparameter, θ = log 10 (η j , δ1,..., δ u , λ);

[0055] (3.3.6) Use the acquisition function G UCB (F) to obtain the next set of hyperparameters in the parameter set F n , and input it into step (3.3.3) to calculate the new evaluation value U n ;

[0056] Among them, the acquisition function in step (3.3.6) is constructed from the posterior distribution of the current dataset, and the next set of hyperparameters is selected by maximizing the acquisition function. The acquisition function formula is as follows:

[0057] G UCB(x, A) = μ(x) + βδ(x) (4)

[0058] Where x is the training set, μ(x) and δ(x) are the mean function and covariance function of the joint posterior distribution of the objective function respectively; β is a tuning parameter that can be used to adjust the selection of sampling points;

[0059] (3.3.7) Determine whether the model accuracy requirement is met. If it is met, determine the hyperparameters F n and U n ; otherwise, continue to execute steps (3.3.2) to (3.3.6) until the requirement is met and stop the iteration;

[0060] Obtain the optimal network hyperparameters of the improved WGAN model, and then achieve the purpose of optimizing and improving the WGAN diagnostic model by Hyperopt. Then, use step (3.2.6) to achieve the dual optimization of the generator and discriminator, and obtain the optimized improved WGAN diagnostic model.

[0061] Furthermore, in step (3.4), to solve the problem that most WGAN network unsupervised learning models not only require a large amount of sample data but also have difficulties in sample annotation; by changing the loss functions of the discriminator and generator, semi-supervised learning is achieved. The purpose is to make the WGAN network learner not rely on external interactions and automatically use unlabeled samples to improve the learning performance. The specific steps are as follows:

[0062] (3.4.1) Construct the loss function of the discriminator in semi-supervised learning,

[0063] First, construct the supervised learning loss function of the WGAN network, and the formula is as follows:

[0064]

[0065] Where E is the mathematical expectation, u, v ∼ P data(u,v) is the probability distribution of the real data u and v, P fake (v|u) is the probability that the discriminator judges as false;

[0066] Secondly, construct the unsupervised learning loss function of the WGAN network, and the formula is as follows:

[0067]

[0068] Where D(u) is the evaluation of the discriminator on the real data u, G(z) is the generated data, Z is the random noise, u ∼ P data(u) is the real data, D(G(z) is the evaluation of the discriminator on the generated data G(z), and u ∼ noise is the false data;

[0069] Finally, construct the discriminator (L of the improved WGAN network modelD ) The loss function is as follows:

[0070]

[0071] Furthermore, to improve the accuracy of the discriminator loss function, the weights c of the supervised learning and semi-supervised learning loss functions are normalized and multiplied by the weight scale factor α. Then, the updated loss function expression is as follows:

[0072]

[0073] (3.4.2) Construction of the loss function of the generator (L G ) in the semi-supervised learning of the improved WGAN network, the formula is as follows:

[0074]

[0075] (3.4.3) Based on the optimized network model in step (3.3), train the generated pictures with one-hot encoded labels generated in step (3.1) and the real pictures using the sample label rates instead of the overall training sample labels. The sample label rates are four types: θ1, θ2, θ3, θ4. Among them, θ1, θ2, θ3 are not 0, and θ4 = 1 represents supervised learning;

[0076] (3.4.4) Judge the training results in step (3.4.3). The corresponding accuracies £1, £2, £3, £4 are obtained through training with different sample label rates; when θ2 is £′, the corresponding £2 is the highest. At this time, the semi-supervised learning is more efficient than the supervised learning and unsupervised learning. Then, use the softmax function to classify the fault types with one-hot encoded labels, and output the loss function curve and the network model accuracy (loss) curve changing with the number of iterations to complete the training.

[0077] Preferably, the specific improved overall diagnosis process of WGAN in step (3.5) is as follows:

[0078] (3.5.1) Input the random noise (Z) and the sample label rates with one-hot encoding in step (3.4) into the generator model optimized in step (3.3), and generate false signals through the training of the generator's own network structure;

[0079] Among them, the random noise Z needs to meet the RGB format and the number of pixels is the same as the size of the time-frequency diagram;

[0080] (3.5.2) Use the above improved CWT to perform continuous wavelet transform on the signal to obtain a standard time-frequency diagram, making it more capable of 'deceiving' the discriminator;

[0081] (3.5.3) Input the time-frequency diagram obtained in step (3.5.2) into the optimized R-FCN discriminator network model in step (3.3). At the same time, input the training set into the discriminator. After iterative training by the discriminator, determine whether the time-frequency diagram input in step (3.5.2) is true. If it is true, the loss functions of the discriminator and the generator reach the fitting effect, and output the loss function curves of the generator and the discriminator changing with the number of iterations, the diagnostic accuracy curve of the improved WGAN network model, and the fault types of the one-hot encoded labels. Otherwise, fix the discriminator parameters and continuously iterate and update the generator parameters until the discriminator cannot determine whether the data generated by the generator is true or false. Finally, obtain the improved WGAN network model, and then input the test set into the improved WGAN network model for verification;

[0082] (3.5.4) Obtain the optimal hyperparameter combination of the diagnostic model through the Hyperopt optimization method, and then optimize the improved WGAN model;

[0083] (3.5.5) To verify whether semi-supervised learning can achieve fault diagnosis in the optimized improved WGAN network model, use different sample label rates to replace the overall sample labels and input them into the improved WGAN network model for training, and output the diagnostic accuracies of different sample label rates.

[0084] Furthermore, the specific steps of step (4) are as follows:

[0085] (4.1) Obtain the operation data of the bearing throughout its life cycle and save the data in CSV format;

[0086] (4.2) Obtain the time-amplitude relationship diagram from the CSV-format data in step (4.1) through spectral signal analysis, and divide the data according to the amplitude. If the amplitude is between 0 and A0, it is in normal condition; if the amplitude is between A0 and A1, it is a minor fault; if the amplitude is between A1 and A2, it is a moderate fault; if the amplitude is greater than A2, it is a severe fault. Then save the data sets divided into different fault degrees in Excel;

[0087] (4.3) Divide the data set in the Excel in step (4.2) into a training set and a test set according to 80% and 20%, and label the data set using the label processing method in step (2.5);

[0088] (4.4) Input the processed data in step (4.3) into the improved WGAN network model optimized by Hyperopt for training, and output the loss function curves of the generator and the discriminator changing with the number of iterations, the diagnostic accuracy curve of the improved WGAN network model, and the fault types of the one-hot encoded labels.

[0089] Beneficial effects: Compared with the prior art, the present invention has the following remarkable advantages:

[0090] (1) The present invention realizes bearing fault diagnosis by improving the WGAN network model, solves the problems of long time consumption and low diagnosis accuracy of traditional fault diagnosis models, and improves the actual production efficiency and safety;

[0091] (2) The present invention uses R-FCN to replace the original discriminator model, realizes deeper feature extraction of real data and false data through the Resnet101 network and the fully convolutional layer, and then obtains the score mapping on each RoI framework by using the average pooling operation. This method effectively reduces the number of network layers and the feature extraction time;

[0092] (3) The present invention adopts Hyperopt to optimize hyperparameters such as the convolution kernel size and the number of neurons, enables the discriminator and the generator to have the best hyperparameter combination, and obtains the optimal number of network layers of Resnet101 through iterative training. This not only greatly reduces the optimization time of the generator and the discriminator in the traditional training process, but also makes the accuracy of the overall network model reach the optimal;

[0093] (4) The present invention uses semi-supervised learning to replace supervised learning and unsupervised learning for network training, and uses the label rate to act on one-hot encoding. This not only solves the problem of time consumption for a large amount of data labels, but also realizes the application of WGAN network semi-supervised learning in bearing fault diagnosis, improves the diagnosis accuracy of the model, and ensures the efficiency and robustness of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0094] Figure 1 is a schematic diagram of the installation of the acceleration sensor in the present invention;

[0095] Figure 2 is a detailed diagram of the installation of the acceleration sensor in the present invention;

[0096] Figure 3 is a schematic diagram of the fault diagnosis model of the present invention;

[0097] Figure 4 is a schematic diagram of the fault diagnosis process of the present invention;

[0098] Figure 5 is a flow chart of the Hyperopt optimization discriminator of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0099] The technical solution of the present invention will be further described below with reference to the drawings.

[0100] As Figure 3 、 Figure 4 and Figure 5 shown, a bearing fault diagnosis method based on an improved WGAN network of the present invention includes the following steps:

[0101] (1) Selection and installation of the acceleration sensor; The acceleration sensor is installed at the driving end of the gearbox, aiming to better obtain the bearing vibration signal according to the transmission of the gearbox and improve the signal acquisition quality; The acceleration sensor is installed at the 9 o'clock and 12 o'clock directions on the surface of the driving end of the gearbox, and the installation positions of the acceleration sensors are relatively perpendicular. Since the rotation speed of the centrifugal pump is fixed, the rotation speed of the bearing passing through the gearbox will not interfere with the signal acquisition. The specific installation positions are as Figure 1 and Figure 2 shown; Among them, installing at the 9 o'clock and 12 o'clock directions is mainly to collect the vibration signals in the vertical and horizontal directions of the driving end. This method not only makes the bearing signal acquisition more comprehensive but also avoids redundant vibration signals;

[0102] (2) Collect the vibration signals during the operation of the sample bearing and process the sample signals;

[0103] The specific steps are as follows:

[0104] (2.1) Set the sampling parameters. The sampling parameters include the sampling frequency f = f′, the sampling duration t = t′, and the sampling interval Δt = Δt′. Sample the acceleration signal received by the bearing to collect the sample data during the operation of the bearing;

[0105] Among them, the sample data is obtained by artificial fault injection and mainly includes normal bearings and faulty bearings. The faulty bearings include 6 different types of faulty bearings; The distribution of 7 bearings is as follows: Sample bearing 1 is a normal bearing with a damage diameter of R0 and an amplitude of A0; Sample bearing 2 is a faulty bearing with an outer ring damage diameter of R1 and an amplitude of A1; Sample bearing 3 is a faulty bearing with an inner ring damage diameter of R1 and an amplitude of A1; Sample bearing 4 is a faulty bearing with a ball damage diameter of R1 and an amplitude of A1; Sample bearing 5 is a faulty bearing with an outer ring damage diameter of R2 and an amplitude of A2; Sample bearing 6 is a faulty bearing with an inner ring damage diameter of R2 and an amplitude of A2; Sample bearing 7 is a faulty bearing with a ball damage diameter of R2 and an amplitude of A2; The 7 different data also divide the bearings into different fault degrees. Among them, R0 is normal data, R0 - R1 is mild fault data, R1 - R2 is moderate fault data, and above R2 is severe fault data;

[0106] (2.2) Output and save the sampling results in step (2.1) in numerical form. When the bearing is running at high speed, the acceleration sensor at the driving end will collect acceleration vibration signals. The collected acceleration vibration signals are converted by an analog-to-digital converter, and the converted acceleration vibration signals are amplified and output as vibration signal values according to a bridge circuit. Finally, the values output by each sampling are saved in CSV format. Sampling is performed on the sampling points in two different directions respectively. The acceleration vibration signals in the 9 o'clock direction are placed in the first column of the CSV file, and the acceleration vibration signals in the 12 o'clock direction are placed in the second column of the CSV file, and saved as 1.CSV, and so on to complete the data saving;

[0107] (2.3) Perform segmentation processing on the data in step (2.2). If there are N data in a CSV file, take the first N / 1000 data as a group, and so on, traverse the CSV file one by one, and a total of N i groups of data are obtained;

[0108] (2.4) Perform continuous wavelet transform processing (Continue Wavelet Transform, CWT) on the N i groups of data obtained in step (2.3) to obtain N i visual time-frequency diagrams that can be used as datasets. The time-frequency diagrams are in RGB format and the pixels are m*n;

[0109] (2.5) Use one-hot encoding to label the datasets in step (2.4) as 80% and 20% for the training set and the test set respectively. Use 0 and 1 to represent the fault states of the operating data, that is, use N-bit register states to encode N states. Set 1000 as the normal state, 0100 as the minor fault state, 0010 as the moderate fault state, and 0001 as the severe fault state; and use inverse one-hot encoding to represent the output type, where the output value of 0 represents the normal state, the output value of 1 represents the minor fault state, the output value of 2 represents the moderate fault state, and the output value of 3 represents the severe fault state;

[0110] (3) Build an improved WGAN diagnostic model and use this model to realize bearing fault diagnosis and fault classification;

[0111] The specific steps are as follows:

[0112] (3.1) Build a generator model and generate false signals;

[0113] The specific steps to build the generator network model are as follows:

[0114] (3.1.1) Use a two-dimensional convolutional layer as the network input. The input end is random noise data. After batch normalization processing to achieve data normalization, then use the LeakyRule activation function to activate a large number of neurons, and rely on the calculations between neurons to extract deep features. Finally, use the tanh activation function as the network output;

[0115] (3.1.2) Input the randomly generated noise (Z) with one-hot encoded labels into the generator. Through the training of the generator's own network structure, the generator generates a false signal;

[0116] (3.1.3) Use the improved CWT to process the false signal generated by the random noise to generate the required time-frequency diagram;

[0117] (3.2) Use the R-FCN network model to replace the original discriminator model to obtain an improved WGAN diagnostic model;

[0118] Build the R-FCN network model as the discriminator model of the improved WGAN network. Use the discriminator model to judge the pictures generated by the generator in step (3.1), and output the loss functions of the generator and the discriminator and the diagnostic accuracy of the improved WGAN model. The specific steps are as follows:

[0119] (3.2.1) Use O two-dimensional convolutional layers (Conv2D), P Batch Normalizaztion layers, Q LeakyRule activation functions and the ResNet101 network to form the input end network of the discriminator. Obtain the initial feature map through 1 Conv2D, and then perform Conv2D operations on it to finally obtain a new feature map that removes redundant image features;

[0120] (3.2.2) Obtain the bounding boxes of the regions of interest (RoI) corresponding to the new feature map through the Region Proposal Network (RPN), and use each RoI bounding box to obtain the features in the new feature map in step (3.2.1) respectively; then determine the coordinate information of the position-sensitive region through r, s, t, u of each RoI bounding box region (r, s, t, u are the coordinate positions of the bounding box). According to this method, each sub-region is obtained, and finally the classification and regression of the features are realized by each RoI;

[0121] Among them, the RPN network is the RPN layer in Faster R-CNN, which is mainly used for the Faster-RCNN network to extract bounding boxes. Since it is time-consuming and laborious to extract the bounding boxes in the R-FCN network, after introducing the convolutional neural network, the two-dimensional convolutional layer is used to select the positions of the bounding boxes in the form of feature extraction, thereby reducing the calculation time. In this invention, the RPN network can extract the bounding boxes in the R-FCN network relatively quickly.

[0122] (3.2.3) Use the pooling operation on each sub-region to find the appropriate response value. Set the minimum response value as S and the maximum response value as T according to the size of the RoI bounding box. If the response value is between [S, T], it means that the feature is the required feature; otherwise, remove the feature and continue to find the appropriate feature until all features are found; until the features in the entire image are obtained.

[0123] (3.2.4) Map the features obtained for each RoI in step (3.2.3) to a new feature map according to the size of the obtained bounding box to obtain the position-sensitive region (that is, the feature region where the response value obtained through the pooling operation is between [S, T]). Among them, the score map size (that is, the size of the bounding box obtained by the position-sensitive region) is K*K*(C + 1) and 4*K*K dimensions. Then, use the convolutional pooling operation to extract features from the position-sensitive region on the new feature map, and output the extraction result through the fully connected layer.

[0124] (3.2.5) Input the labeled real training set in step (2.5) into the built discriminator model for training, and then input the image generated by the generator in step (3.1) into the R-FCN for training. Use the discriminator loss function and the generator loss function to make judgments. If the discriminator's discrimination result is true, and at the same time the generator loss function and the discriminator loss function decrease, when the two finally tend to fit and are close, it reaches the Nash equilibrium, indicating that the diagnostic model meets the requirements, and the training ends; then use the softmax function to classify to obtain the fault types with one-hot encoded labels, and output the loss function curves of the generator and discriminator models and the diagnostic accuracy curve of the improved WGAN network model changing with the number of iterations; if the discriminator's judgment result is false, then perform step (3.2.6).

[0125] (3.2.6) When the training result is false, it means that the generator's generated images have poor quality, the discriminator cannot correctly judge the authenticity of the images, and the generator model fails to achieve the expected effect. In this case, the control variable method is used to control the discriminator model and its hyperparameters to optimize the generator model. Fix the model parameters of the discriminator and continuously iterate to optimize the model parameters of the generator. When the discriminator's judgment result is true, the generator model reaches the optimal state. At this time, the optimization effects of the discriminator and the generator models are the best. The best effect is when the loss functions of the generator and the discriminator decrease and finally tend to fit and approach each other, then stop the iteration to obtain the improved WGAN diagnostic model. Among them, when obtaining the improved WGAN diagnostic model, the number of iterations is epochs, the learning rate is Lr, and the batch size is Batch_size.

[0126] The control variable method here is to keep the discriminator model and its parameters unchanged and optimize the generator.

[0127] (3.2.7) Use the test set to test the improved WGAN diagnostic model obtained in step (3.2.5). If the discriminator can judge the authenticity of the images generated by the generator, and the loss functions of the discriminator and the generator slowly decrease to fit without steep jump fluctuations, that is, there is no gradient disappearance or collapse phenomenon, then stop the iteration, output the loss functions of the generator and the discriminator and the training accuracy of the model, and obtain the improved WGAN diagnostic model.

[0128] To further improve the diagnostic speed of the improved WGAN diagnostic model in step (3.2), optimize the number of layers of the Resnet101 network in the R-FCN network. Select five levels R1, R2, R3, R4, and R5 (R5 has 101 layers) respectively. Divide each RoI region from d×d into s×s grids. Set the number of iterations to epochs - 1, the learning rate to Lr - 1, and the batch size to Batch_size - 1. Based on this, conduct training. The training result is reflected by the training accuracy. The optimal number of layers obtained from the five levels is R1. Compared with 101 layers, the Resnet network reduces the number of network layers, improves the training speed, and obtains a diagnostic model with redundant network layers removed based on step (3.2).

[0129] (3.3) Hyperopt optimizes the hyperparameters of the improved WGAN diagnostic model. Since there are still many network structures and numerous hyperparameters in the improved WGAN network model, which will affect the generation ability of the generator and the discrimination ability of the discriminator. To achieve the feature extraction of deep-level signals and improve the diagnostic accuracy, use automatic hyperparameter tuning (Hyperopt) to optimize the discriminator model to achieve the purpose of optimizing the improved WGAN model. The specific steps are as follows:

[0130] (3.3.1) Initialize the network hyperparameters, and obtain the initial parameter set F consisting of parameters such as the size of the convolutional kernel to be optimized, the number of hidden neurons, and the pooling factor. n Select the first set of parameters and input them into the improved WGAN model for training.

[0131] Among them, the initialized parameter set F n is: F n = [F1, F2,..., F i ];

[0132] (3.3.2) Establish the objective function. The objective function serves as the basis for evaluating the prior model, is used to calculate the posterior probability of updating the optimization function, and obtain the optimal hyperparameter combination; The cross-entropy loss function is used as the objective function, and the formula is as follows:

[0133]

[0134] In the formula, B is the number of samples, C is the number of categories, τ bc indicates whether the b-th sample belongs to the c-th category, ω bc is the output result of the classification, is the regularization coefficient, ρ j is the parameter to be learned in the network layer, and j is the feature map;

[0135] (3.3.3) Calculate the initial parameter F in step (3.3.1) n using the objective function in step (3.3.2) to obtain the corresponding function evaluation value U n ; Among them, U n = [U1, U2,..., U i ], and construct the data set A = [(F1, U1),..., (F n and U n )] from F i and U i ;

[0136] (3.3.4) Use the first set of data in the data set A in step (3.3.3) on the validation set to determine whether the model meets the requirements; Specifically, it can be judged according to the hyperparameter combination expression of the model. If the discriminator loss function iteration tends to fit, then this set of hyperparameters meets the requirements; Otherwise, go to step (3.3.5), and the formula is as follows:

[0137] I * = arg min i∈I H(i) (2)

[0138] In the formula, H(i) is the minimized objective function; I * is a set of optimal hyperparameters obtained;

[0139] When the set minimum objective function H(i) ≤ £, the requirements for hyperparameter selection are met;

[0140] (3.3.5) Establish a Gaussian regression model using dataset A, and continuously update the loss function through iterative calculations of the Gaussian regression model to correct the probability model;

[0141] To obtain the optimal hyperparameters in the Gaussian distribution, the maximum likelihood estimation method can be used, and its expression is as follows:

[0142]

[0143] In the formula, K is the covariance matrix; f is the posterior probability of the first n samples; θ is the selected hyperparameter, θ = log 10 (η i , δ1,..., δ u , λ);

[0144] (3.3.6) Use the acquisition function G UCB (F) to obtain the next set of hyperparameters in the parameter set F n and input it into step (3.3.3) to calculate the new evaluation value U n ;

[0145] Among them, the acquisition function in step (3.3.6) is constructed from the posterior distribution of the current dataset, and the next set of hyperparameters is selected by maximizing the acquisition function. The acquisition function formula is as follows:

[0146] G UCB (x, A) = μ(x) + βδ(x) (4)

[0147] In the formula, x is the training set, μ(x) and δ(x) are the mean function and covariance function of the joint posterior distribution of the objective function respectively; β is a tuning parameter that can be used to adjust the selection of sampling points;

[0148] (3.3.7) Determine whether the model accuracy requirements are met. If so, determine the hyperparameters F n and U n ; otherwise, continue to execute steps (3.3.2) to (3.3.6) until the requirements are met and the iteration stops;

[0149] Obtain the optimal network hyperparameters of the improved WGAN model, thereby achieving the purpose of optimizing and improving the WGAN diagnostic model using Hyperopt. Then, use step (3.2.6) to achieve dual optimization of the generator and discriminator, and obtain the optimized improved WGAN diagnostic model;

[0150] (3.4) Improve the training of the generator and discriminator in the WGAN diagnostic model by means of semi-supervised learning. To address the problem that most unsupervised learning models of the WGAN network not only require a large amount of sample data but also have difficulties in sample annotation, semi-supervised learning is achieved by changing the loss functions of the discriminator and the generator. The aim is to enable the WGAN network learner to improve its learning performance without relying on external interactions and automatically using unlabeled samples. The specific steps are as follows:

[0151] (3.4.1) Construct the loss function of the discriminator in semi-supervised learning.

[0152] First, construct the supervised learning loss function of the WGAN network, and the formula is as follows:

[0153]

[0154] In the formula, E is the mathematical expectation, u, v ∼ P data(u,v) is the probability distribution of the real data u and v, and P fake (v|u) is the probability that the discriminator judges as false;

[0155] Secondly, construct the unsupervised learning loss function of the WGAN network, and the formula is as follows:

[0156]

[0157] In the formula, D(u) is the evaluation of the discriminator on the real data u, G(z) is the generated data, Z is the random noise, u ∼ P data(u) is the real data, D(G(z)) is the evaluation of the discriminator on the generated data G(z), and u ∼ noise is the false data;

[0158] Finally, construct the loss function of the discriminator (L D ) of the improved WGAN network model, and the formula is as follows:

[0159]

[0160] Furthermore, to improve the accuracy of the discriminator loss function, normalize the weights c of the supervised learning and semi-supervised learning loss functions and multiply them by the weight scale factor α. Then the updated loss function expression is as follows:

[0161]

[0162] (3.4.2) Construction of the loss function of the generator (L G ) in the semi-supervised learning of the improved WGAN network, and the formula is as follows:

[0163]

[0164] (3.4.3) Based on the optimized network model in step (3.3), train the generated pictures with one-hot encoded labels generated in step (3.1) and the real pictures using the sample label rates instead of the overall training sample labels. The sample label rates are of four types: θ1, θ2, θ3, and θ4. Among them, θ1, θ2, and θ3 are not zero, and θ4 = 1 represents supervised learning;

[0165] (3.4.4) Judge the training results in step (3.4.3). By training with different sample label rates, the corresponding accuracies £1, £2, £3, and £4 are obtained respectively; when θ2 is £′, £2 is the highest correspondingly. At this time, semi-supervised learning is more efficient than supervised learning and unsupervised learning. Then use the softmax function to classify the fault types with one-hot encoded labels, and output the loss function curve and the network model accuracy (loss) curve that change with the number of iterations to complete the training;

[0166] (3.5) The optimized and improved WGAN diagnostic model is used to realize bearing fault diagnosis. The specific overall diagnostic process of the improved WGAN is as follows:

[0167] (3.5.1) Input the random noise (Z) and the sample label rates with one-hot encoding in step (3.4) into the generator model optimized in step (3.3), and generate false signals through the training of the generator's own network structure;

[0168] Among them, the random noise Z needs to meet the RGB format and the number of pixels is the same as the size of the time-frequency diagram;

[0169] (3.5.2) Use the above improved CWT to perform continuous wavelet transform on the signal to obtain a standard time-frequency diagram, making it more capable of 'deceiving' the discriminator;

[0170] (3.5.3) Input the time-frequency diagram obtained in step (3.5.2) into the R-FCN discriminator network model optimized in step (3.3), and at the same time input the training set into the discriminator. After the discriminator's iterative training, judge whether the time-frequency diagram input in step (3.5.2) is real. If it is real, the loss functions of the discriminator and the generator reach the fitting effect, and output the loss function curves of the generator and the discriminator that change with the number of iterations, the diagnostic accuracy curve of the improved WGAN network model, and the fault types with one-hot encoded labels; otherwise, fix the discriminator parameters and continuously iterate and update the generator parameters until the data generated by the generator cannot be judged as real or fake by the discriminator. Finally, obtain the improved WGAN network model, and then input the test set into the improved WGAN network model for verification;

[0171] (3.5.4) Obtain the optimal hyperparameter combination of the diagnostic model through the Hyperopt optimization method, and then optimize the improved WGAN model;

[0172] (3.5.5) To verify whether semi-supervised learning can achieve fault diagnosis in the optimized improved WGAN network model, different sample label rates are used to replace the overall sample labels and input into the improved WGAN network model for training, and the diagnostic accuracies of different sample label rates are output;

[0173] (4) Collect the vibration signals of the bearing under test during its entire life cycle and process the vibration signals. Input the processed vibration signals into the improved WGAN diagnostic model in the form of a time-frequency diagram to obtain the diagnostic accuracy and fault type of the bearing under test;

[0174] Regarding how to use the improved WGAN network model to obtain the fault type and fault accuracy for the vibration signals of the bearing during its entire life cycle in actual production, the specific steps are as follows:

[0175] (4.1) Obtain the operation data of the bearing during its entire life cycle and save the data in CSV format;

[0176] (4.2) Obtain the time-amplitude relationship diagram of the data in CSV format in step (4.1) through spectral signal analysis, and divide the data according to the amplitude. If the amplitude is between 0 and A0, it is in a normal condition; if the amplitude is between A0 and A1, it is a minor fault; if the amplitude is between A1 and A2, it is a moderate fault; if the amplitude is greater than A2, it is a severe fault. Then save the data sets divided into different fault degrees in Excel;

[0177] (4.3) Divide the data set in Excel in step (4.2) into a training set and a test set according to 80% and 20%, and perform label processing on the data set using the label processing method in step (2.5);

[0178] (4.4) Input the data processed in step (4.3) into the improved WGAN network model optimized by Hyperopt for training, and output the loss function curves of the generator and discriminator changing with the number of iterations, the diagnostic accuracy curve of the improved WGAN network model, and the fault types of the one-hot encoded labels.

[0179] Example 1

[0180] Example 1 A bearing fault diagnosis method based on an improved WGAN network, including the following steps:

[0181] (1) Selection and installation of the acceleration sensor; The acceleration sensor is installed at the driving end of the gearbox, aiming to better obtain the bearing vibration signal based on the transmission of the gearbox and improve the signal acquisition quality; The acceleration sensor is installed at the 9 o'clock and 12 o'clock directions on the surface of the driving end of the gearbox, and the installation positions of the acceleration sensors are relatively perpendicular. Since the rotational speed of the centrifugal pump is fixed, the rotational speed of the bearing passing through the gearbox will not interfere with the signal acquisition. The specific installation positions are as Figure 1 shown; Among them, installing at the 9 o'clock and 12 o'clock directions is mainly to collect the vibration signals in the vertical and horizontal directions of the driving end. This method not only makes the bearing signal acquisition more comprehensive but also avoids redundant vibration signals;

[0182] (2) Collect the vibration signals during the operation of the sample bearing and process the sample signals;

[0183] The specific steps are as follows:

[0184] (2.1) Set the sampling parameters. The sampling parameters include the sampling frequency f = 12 kHz, the sampling duration t = 5 s, and the sampling interval Δt = 5 ms. Sample the acceleration signal received by the bearing to collect the sample data during the operation of the bearing;

[0185] Among them, the sample data is obtained by artificial fault injection, mainly including normal bearings and faulty bearings. The faulty bearings include 6 different types of faulty bearings; The distribution of 7 bearings is as follows: Sample bearing 1 is a normal bearing with a damage diameter of R0 and an amplitude of A0; Sample bearing 2 is a faulty bearing with an outer ring damage diameter of R1 and an amplitude of A1; Sample bearing 3 is a faulty bearing with an inner ring damage diameter of R1 and an amplitude of A1; Sample bearing 4 is a faulty bearing with a ball body damage diameter of R1 and an amplitude of A1; Sample bearing 5 is a faulty bearing with an outer ring damage diameter of R2 and an amplitude of A2; Sample bearing 6 is a faulty bearing with an inner ring damage diameter of R2 and an amplitude of A2; Sample bearing 7 is a faulty bearing with a ball body damage diameter of R2 and an amplitude of A2; The 7 different data also divide the bearings into different fault degrees. Among them, R0 is normal data, R0 - R1 is slightly faulty data, R1 - R2 is moderately faulty data, and above R2 is severely faulty data;

[0186] (2.2) Output and save the sampling results in step (2.1) in numerical form. When the bearing is running at high speed, the acceleration sensor at the driving end will collect the acceleration vibration signal. The collected acceleration vibration signal is converted by an analog-to-digital converter, and the converted acceleration vibration signal is amplified and output as a vibration signal value according to a bridge circuit. Finally, the values output by each sampling are saved in CSV format. Sampling is performed on the sampling points in two different directions respectively. The acceleration vibration signal in the 9 o'clock direction is placed in the first column of the CSV file, and the acceleration vibration signal in the 12 o'clock direction is placed in the second column of the CSV file, and saved as 1.CSV, and so on to complete the data saving;

[0187] (2.3) Perform segmentation processing on the data in step (2.2). If there are 120,000 data in a CSV file, take the first 120 data as a group, and so on, and traverse the CSV file one by one;

[0188] (2.4) Perform continuous wavelet transform processing (Continue Wavelet Transform, CWT) on the data obtained in step (2.3), and save W time-frequency diagrams. The time-frequency diagrams are in RGB format and the pixels are 500*500;

[0189] (2.5) Use one-hot encoding to perform label processing on the data set in step (2.4) according to 80% and 20% for the training set and the test set respectively. Use 0 and 1 to represent the fault states of the running data, that is, use an N-bit register state to encode N states. Set 1000 as the normal state, 0100 as the minor fault state, 0010 as the moderate fault state, and 0001 as the severe fault state; and use inverse one-hot encoding to represent the output type, where the output value of 0 represents the normal state, the output value of 1 represents the minor fault state, the output value of 2 represents the moderate fault state, and the output value of 3 represents the severe fault state;

[0190] (3) Build an improved WGAN diagnostic model and use this model to realize bearing fault diagnosis and fault classification;

[0191] The specific steps are as follows:

[0192] (3.1) Build a generator model and generate false signals;

[0193] Before performing step (3.1), set the random noise without labels as the input of the generator. The dimension size of the random noise is the same as the dimension of the time-frequency diagram obtained in step (2.3); in the present invention, the dimension of the random noise is set to A, and A = m*n. The purpose is to avoid inconsistent image sizes caused by inconsistent dimensions, resulting in the discriminator being unable to fully play its discrimination role.

[0194] The specific steps for building the generator network model are as follows:

[0195] (3.1.1) The two-dimensional convolutional layer is used as the network input, which can enhance feature extraction and calculation speed compared with the one-dimensional convolutional layer; the input end is random noise data, which is normalized through batch normalization, and then the LeakyRule activation function is used to activate a large number of neurons, and deep features are extracted by relying on the calculations between neurons. Finally, the tanh activation function is used as the network output; the present invention alternately uses the Conv2D, Batch Normalizaztion layer and LeakyRule activation function to enable the generator to generate higher-quality fake data; in addition, both the LeakyRule activation function and the tanh activation function can replace the Dropout layer to a certain extent to prevent overfitting and reduce training time;

[0196] The main reason for using the LeakyRule activation function is to reduce the possibility of sparse gradients in the generator. Its formula is as follows:

[0197]

[0198] In the formula, y i is the value of the activation function, x i is the linear component, and a i is a fixed parameter in the interval (1, +∞) (take 0.01).

[0199] The tanh activation function is used because its maximum gradient is 1, which can ensure that the gradient transmission is not reduced and accelerate the convergence of the loss function, effectively alleviating the vanishing gradient. The formula is as follows:

[0200]

[0201] In the formula, z takes a constant, and the output value of tanh(z) is between [-1, 1];

[0202] (3.1.2) The randomly generated noise (Z) with one-hot encoded labels is input into the generator, and the generator generates a false signal through the training of its own network structure;

[0203] (3.1.3) The improved CWT is used to process the false signal generated by the random noise to generate the required time-frequency diagram;

[0204] Before performing step (3.2), the present invention uses the improved CWT to process the data generated by the random noise to generate the required sample data. The improved CWT expression is:

[0205]

[0206] where \(g\) is the scale factor and \(h\) is the time translation factor, is the Morlet wavelet basis function, \(\theta(q)\) is the wavelet transform received signal, and \(p\) and \(q\) are constants. Among them, the improved CWT mainly uses Morlet to replace the original wavelet function;

[0207] (3.2) Use the R-FCN network model to replace the original discriminator model to obtain the improved WGAN diagnostic model;

[0208] Build the R-FCN network model as the discriminator model of the improved WGAN network. The R-FCN network has a deeper shared convolutional network layer, which can extract the features of the fake pictures generated by the generator in step (3.1), obtain the class information and location information required in the time-frequency diagram, reduce the extraction time, improve the training accuracy, effectively train the discriminator, strengthen the discrimination effect, and output the loss functions of the generator and discriminator and the diagnostic accuracy of the improved WGAN model; use the discriminator model to judge the pictures generated by the generator in step (3.1), and output the loss functions of the generator and discriminator and the diagnostic accuracy of the improved WGAN model. The specific steps are as follows:

[0209] (3.2.1) Use 4 two-dimensional convolutional layers (Conv2D), 3 Batch Normalizaztion layers, 3 LeakyRule activation functions and the ResNet101 network to form the input network of the discriminator. Obtain the initial feature map through 1 Conv2D, and then perform Conv2D operations on it to finally obtain a new feature map with redundant image features removed;

[0210] (3.2.2) Obtain the bounding boxes of the regions of interest (RoI) corresponding to the new feature map through the Region Proposal Network (RPN), and use each RoI bounding box to obtain the features in the new feature map in step (3.2.1) respectively; then determine the coordinate information of the position-sensitive region through \(r\), \(s\), \(t\), \(u\) of each RoI bounding box region (\(r\), \(s\), \(t\), \(u\) are the coordinate positions of the bounding box), and obtain each sub-region according to this method. Finally, each RoI realizes the classification and regression of features;

[0211] Among them, the RPN network is the RPN layer in Faster R-CNN, which is mainly used for the Faster-RCNN network to extract bounding boxes; since it is time-consuming and laborious to extract the bounding boxes in the R-FCN network, therefore, after introducing the convolutional neural network, the two-dimensional convolutional layer adopted selects the position of the bounding box in the form of feature extraction, thus reducing the calculation time. In this invention, the RPN network can extract the bounding boxes in the R~FCN network relatively quickly;

[0212] (3.2.3) Use the pooling operation to find appropriate response values on each sub-region. Set the minimum response value as S and the maximum response value as T according to the size of the RoI bounding box. If the response value is between [S, T], it means that this feature is the required feature; otherwise, remove this feature and continue to find appropriate features until all features are found; until the features in the entire image are obtained;

[0213] (3.2.4) Map the features obtained from each RoI in step (3.2.3) to a new feature map according to the size of the obtained bounding box to obtain the position-sensitive region (i.e., the feature region where the response value obtained by the pooling operation is between [S, T]). Among them, the score mapping size (i.e., the size of the bounding box obtained by the position-sensitive region) is K*K*(C + 1) and 4*K*K dimensions, where C represents the number of image category types, (C + 1) is the total number of categories, K is the number of image channels, and C = 4, K = 3. Then, use the convolutional pooling operation to extract features from the position-sensitive region on the new feature map, and output the extraction result through the fully connected layer;

[0214] (3.2.5) Input the real training set with labels in step (2.5) into the built discriminator model for training, and then input the images generated by the generator in step (3.1) into R-FCN for training. Use the discriminator loss function and the generator loss function for judgment. If the discriminator's discrimination result is true, and at the same time the generator loss function and the discriminator loss function decrease, when the two finally tend to fit and are close, it reaches the Nash equilibrium, indicating that the diagnostic model meets the requirements, and the training ends; then use the softmax function to classify to obtain the fault types with one-hot encoded labels, and output the loss function curves of the generator and discriminator models and the diagnostic accuracy curve of the improved WGAN network model that change with the number of iterations; if the discriminator's judgment result is false, then perform step (3.2.6);

[0215] (3.2.6) When the training result is false, it means that the images generated by the generator are not good, the discriminator cannot correctly judge the authenticity of the images, and the generator model does not reach the expected effect. Then, use the control variable method to control the discriminator model and its hyperparameters to optimize the generator model. Fix the model parameters of the discriminator and continuously iterate to optimize the model parameters of the generator. When the discriminator's judgment result is true, the generator model reaches the optimal state. At this time, the optimization effects of the discriminator and the generator models are the best. The best effect is when the generator and discriminator loss functions decrease, and the two finally tend to fit and are close, then stop the iteration to obtain the improved WGAN diagnostic model; among them, when obtaining the improved WGAN diagnostic model, the number of iterations is epochs = 360, the learning rate is Lr = 0.0001, and the batch size is Batch_size = 32;

[0216] The control variable method here is to optimize the generator while keeping the discriminator model and parameters unchanged;

[0217] (3.2.7) Use the test set to test the improved WGAN diagnostic model obtained in step (3.2.5); if the discriminator can judge the authenticity of the pictures generated by the generator, and the loss functions of the discriminator and the generator slowly decrease to fit, without showing steep jump fluctuations, that is, there is no gradient disappearance or collapse phenomenon, then stop the iteration, output the loss functions of the generator and the discriminator and the model training accuracy, and obtain the improved WGAN diagnostic model;

[0218] Among them, the convolution pooling operation formula is:

[0219]

[0220] In the formula, r c (i, j) is the combined response of the (i, j) -th bin of the c -th category, I i,j,c is a score - sensitive feature region in K*K*(C + 1), (m0, n0) is the upper - left corner coordinate of the RoI, l is the pixel value, and Φ is all learnable parameters of the network.

[0221] The calculation formula of the above - mentioned loss function in the present invention is:

[0222]

[0223] In the formula, one * is the one - hot - encoded real - data label, L reg is the bounding - box regression loss, q * is the real framework of the image, L(s, t r,s,t,u ) is the final loss value, [c*>0] is the true - false index, which is equal to 1 if the parameter is true, otherwise 0, and λ is the balancing weight, is the cross - entropy loss function;

[0224] To further improve the diagnostic speed of the improved WGAN diagnostic model in step (3.2), optimize the number of layers of the Resnet101 network in the R - FCN network. Select five levels of R1 = 25, R2 = 35, R3 = 55, R4 = 85, and R5 = 101 respectively. Change the number of grids divided in the RoI region from 7×7 to 3×3. Set the number of iterations epochs - 1 = 20, the learning rate Lr - 1 = 0.0001, and the batch size Batch_size - 1 = 32; On this basis, conduct training, and the training results are reflected by the training accuracy. By comparing the accuracies of five different numbers of layers, it is known that when the number of layers is 25, the accuracy is higher and the training time is shorter. Therefore, compared with the 101 - layer Resnet network, the present invention selects a 25 - layer network, reducing the number of network layers and improving the training speed;

[0225] (3.3) Hyperparameter optimization of the improved WGAN diagnostic model using Hyperopt; Since there are still many network structures and numerous hyperparameters in the improved WGAN network model, which can affect the generation ability of the generator and the discrimination ability of the discriminator, in order to achieve feature extraction of deep-level signals and improve the diagnostic accuracy, the discriminator model is optimized using automatic hyperparameter tuning (Hyperopt) to achieve the purpose of optimizing and improving the WGAN model. The specific steps are as follows:

[0226] (3.3.1) Initialize the network hyperparameters, and obtain the initial parameter set F consisting of parameters such as the size of the convolutional kernel, the number of hidden neurons, and the pooling factor to be optimized n , and select the first group of parameters and input them into the improved WGAN model for training;

[0227] Among them, the initial parameter set F n is: F n = [F1, F2,..., F i ;

[0228] (3.3.2) Establish an objective function. The objective function is the basis for evaluating the prior model and is used to calculate the posterior probability of updating the optimization function to obtain the optimal hyperparameter combination; The cross-entropy loss function is used as the objective function, and the formula is as follows:

[0229]

[0230] In the formula, B is the number of samples, C is the number of classes, τ bc is whether the b-th sample belongs to the c-th class, ω bc is the output result of the classification, is the regularization coefficient, ρ j is the parameter to be learned in the network layer, and j is the feature map;

[0231] (3.3.3) Calculate the initial parameter F in step (3.3.1) n using the objective function in step (3.3.2) to obtain the corresponding function evaluation value U n ; Among them, U n = [U1, U2,..., U i , and a dataset A = [(F1, U1),..., (F n , U n )] is constructed from F i and U i ;

[0232] (3.3.4) Use the first set of data in dataset A from step (3.3.3) to determine whether the model meets the requirements on the validation set; specifically, it can be judged according to the hyperparameter combination expression of the model. If the discriminator loss function iteration tends to fit, this set of hyperparameters meets the requirements; otherwise, proceed to step (3.3.5), and the formula is as follows:

[0233] I * = arg min i∈I H(i) (2)

[0234] In the formula, H(i) is the objective function to be minimized; I * is a set of optimal hyperparameters obtained;

[0235] When the minimum objective function H(i) ≤ £ is set, the hyperparameter selection requirements are met;

[0236] (3.3.5) Establish a Gaussian regression model using dataset A, and continuously iterate and calculate to update the loss function through the Gaussian regression model to correct the probability model;

[0237] To obtain the optimal hyperparameters in the Gaussian distribution, the maximum likelihood estimation method can be used, and its expression is as follows:

[0238]

[0239] In the formula, K is the covariance matrix; f is the posterior probability of the first n samples; θ is the selected hyperparameter, θ = 10g 10 (η j , δ1,..., δ u , λ);

[0240] (3.3.6) Use the acquisition function G UCB (F) to obtain the next set of hyperparameters in the parameter set F n and input it into step (3.3.3) to calculate the new evaluation value U n ;

[0241] Among them, the acquisition function in step (3.3.6) is constructed from the posterior distribution of the current dataset, and the next set of hyperparameters is selected by maximizing the acquisition function. The acquisition function formula is as follows:

[0242] G UCB (x, A) = μ(x) + βδ(x) (4)

[0243] In the formula, x is the training set, μ(x) and δ(x) are the mean function and covariance function of the joint posterior distribution of the objective function respectively; β is a tuning parameter that can be used to adjust the selection of sampling points;

[0244] (3.3.7) Determine whether the model accuracy requirement is met. If it is met, determine the hyperparameters F n and U n ; otherwise, continue to execute steps (3.3.2) to (3.3.6) until the requirement is met and the iteration stops;

[0245] Obtain the optimal network hyperparameters of the improved WGAN model, thereby achieving the purpose of optimizing and improving the WGAN diagnostic model using Hyperopt. Then, use step (3.2.6) to achieve dual optimization of the generator and discriminator, and obtain the optimized improved WGAN diagnostic model;

[0246] (3.4) Use semi-supervised learning to guide the training of the generator and discriminator in the improved WGAN diagnostic model. To address the problem that most WGAN network unsupervised learning models not only require a large amount of sample data but also have difficulties in sample annotation; by changing the loss functions of the discriminator and generator, semi-supervised learning is achieved. The purpose is to enable the WGAN network learner to automatically utilize unlabeled samples to improve learning performance without relying on external interactions. The specific steps are as follows:

[0247] (3.4.1) Construct the loss function of the discriminator in semi-supervised learning,

[0248] First, construct the supervised learning loss function of the WGAN network, and the formula is as follows:

[0249]

[0250] In the formula, E is the mathematical expectation, u, v ∼ P data(u,v) is the probability distribution of the real data u and v, P fake (v|u) is the probability that the discriminator judges as false;

[0251] Second, construct the unsupervised learning loss function of the WGAN network, and the formula is as follows:

[0252]

[0253] In the formula, D(u) is the evaluation of the discriminator on the real data u, G(z) is the generated data, Z is the random noise, u ∼ P aata(u) is the real data, D(G(z)) is the evaluation of the discriminator on the generated data G(z), and u ∼ noise is the false data;

[0254] Finally, construct the loss function of the discriminator (L D ) of the improved WGAN network model, and the formula is as follows:

[0255]

[0256] Furthermore, to improve the accuracy of the discriminator loss function, the weights c of the supervised learning and semi-supervised learning loss functions are normalized and multiplied by the weight scale factor α. The updated loss function expression is as follows:

[0257]

[0258] (3.4.2) Construction of the loss function of the generator (L G ) in the semi-supervised learning of the improved WGAN network, the formula is as follows:

[0259]

[0260] (3.4.3) Based on the optimized network model in step (3.3), train the generated pictures with one-hot encoded labels generated in step (3.1) and the real pictures using the sample label rates instead of the overall training sample labels. There are four types of sample label rates, namely θ1, θ2, θ3, and θ4. Among them, θ1 = 0.1, θ2 = 0.5, θ3 = 0.7, and θ4 = 1 represents supervised learning;

[0261] (3.4.4) Judge the training results in step (3.4.3), and obtain the corresponding accuracies £1, £2, £3, and £4 through training with different sample label rates; when θ2 is 0.5, the corresponding £2 is the highest. At this time, the semi-supervised learning is more efficient than the supervised learning and unsupervised learning. Then, use the so ftmax function to classify the fault types with one-hot encoded labels, and output the loss function curve and the network model accuracy (loss) curve varying with the number of iterations to complete the training;

[0262] (3.5) The optimized improved WGAN diagnostic model realizes bearing fault diagnosis. The specific overall diagnostic process of the improved WGAN is as follows:

[0263] (3.5.1) Input the random noise (Z) and the sample label rates with one-hot encoding in step (3.4) into the generator model optimized in step (3.3), and generate false signals through the training of the generator's own network structure;

[0264] Among them, the random noise Z needs to meet the RGB format and the number of pixels is the same as the size of the time-frequency diagram;

[0265] (3.5.2) Use the above improved CWT to perform continuous wavelet transform on the signal to obtain a standard time-frequency diagram, making it more capable of 'deceiving' the discriminator;

[0266] (3.5.3) Input the time-frequency diagram obtained in step (3.5.2) into the optimized R-FCN discriminator network model in step (3.3). At the same time, input the training set into the discriminator. After iterative training by the discriminator, determine whether the time-frequency diagram input in step (3.5.2) is true. If it is true, the loss functions of the discriminator and the generator reach the fitting effect, and output the loss function curves of the generator and the discriminator changing with the number of iterations, the diagnostic accuracy curve of the improved WGAN network model, and the fault types of the one-hot encoded labels; otherwise, fix the discriminator parameters and continuously iterate and update the generator parameters until the discriminator cannot determine whether the data generated by the generator is true or false. Finally, obtain the improved WGAN network model, and then input the test set into the improved WGAN network model for verification;

[0267] (3.5.4) Obtain the optimal hyperparameter combination of the diagnostic model through the Hyperopt optimization method, and then optimize the improved WGAN model;

[0268] (3.5.5) To verify whether semi-supervised learning can achieve fault diagnosis in the optimized improved WGAN network model, use different sample labeling rates to replace the overall sample labels and input them into the improved WGAN network model for training, and output the diagnostic accuracies of different sample labeling rates;

[0269] (4) Collect the vibration signals of the whole life cycle of the bearing under test and process the vibration signals. Input the processed vibration signals into the improved WGAN diagnostic model in the form of a time-frequency diagram to obtain the diagnostic accuracy and fault types of the bearing under test;

[0270] For the vibration signals of the whole life cycle of the bearing in actual production, how to use the improved WGAN network model to obtain the fault types and fault accuracies, the specific steps are as follows:

[0271] (4.1) Obtain the operation data of the whole life cycle of the bearing and save the data in CSV format;

[0272] (4.2) Obtain the time-amplitude relationship diagram of the data in step (4.1) in CSV format through spectral signal analysis, and divide the data according to the amplitude. If the amplitude is between 0 and A0, it is in normal condition; if the amplitude is between A0 and A1, it is a minor fault; if the amplitude is between A1 and A2, it is a moderate fault; if the amplitude is greater than A2, it is a severe fault. Then save the data sets divided into different fault degrees in Excel;

[0273] (4.3) Divide the data sets in step (4.2) Excel into a training set and a test set according to 80% and 20%, and label the data sets using the label processing method in step (2.5);

[0274] (4.4) Input the data processed in step (4.3) into the improved WGAN network model optimized by Hyperopt for training, and output the loss function curves of the generator and discriminator varying with the number of iterations, the diagnostic accuracy curve of the improved WGAN network model, and the fault types of the one-hot encoded labels.

Claims

1. A bearing fault diagnosis method based on an improved WGAN network, characterized in that It includes the following steps: (1) Selection and installation of acceleration sensors, (2) Collect vibration signals during the operation of the sample bearing and process the sample signals, (3) Construct an improved WGAN diagnostic model and use this model to achieve bearing fault diagnosis and fault classification. The specific steps are as follows: (3.1) Build a generator model and generate false signals, (3.2) Use the R-FCN network model to replace the original discriminator model to obtain the improved WGAN diagnostic model, (3.3) Hyperopt optimizes the hyperparameters of the improved WGAN diagnostic model, (3.4) Use semi-supervised learning to guide the training of the generator and discriminator in the improved WGAN diagnostic model, (3.5) The optimized improved WGAN diagnostic model realizes bearing fault diagnosis, (4) Collect the vibration signals of the whole life cycle of the bearing to be measured during operation and process the vibration signals. Input the processed vibration signals in the form of time-frequency diagrams into the improved WGAN diagnostic model to obtain the diagnostic accuracy and fault type of the bearing to be measured.

2. The bearing fault diagnosis method based on the improved WGAN network according to claim 1, characterized in that: In the step (1), the acceleration sensor is installed at the driving end of the gearbox, and the acceleration sensor is installed at the 9 o'clock and 12 o'clock directions on the surface of the driving end of the gearbox, and the installation positions of the acceleration sensors are relatively perpendicular.

3. The bearing fault diagnosis method based on the improved WGAN network according to claim 2, wherein: The specific steps of the step (2) are as follows: (2.1) Set the sampling parameters, where the sampling parameters include the sampling frequency , the sampling duration t = t' and the sampling interval , sample the acceleration signal received by the bearing, and collect the sample data during the operation of the bearing; Among them, the sample data is obtained by artificial fault injection, mainly including normal bearings and faulty bearings. The faulty bearings include bearings with 6 different types of faults; the 7 bearing allocation situations are as follows: Sample bearing 1 is a normal bearing with a damage diameter of , and the amplitude is ; Sample bearing 2 is a faulty bearing with an outer ring damage diameter of , and the amplitude is ; Sample bearing 3 is a faulty bearing with an inner ring damage diameter of , and the amplitude is ; Sample bearing 4 is a faulty bearing with a ball body damage diameter of , and the amplitude is ; Sample bearing 5 is a faulty bearing with an outer ring damage diameter of , and the amplitude is ; Sample bearing 6 is a faulty bearing with an inner ring damage diameter of , and the amplitude is ; Sample bearing 7 is a faulty bearing with a ball body damage diameter of , and the amplitude is ; The 7 different data also divide the bearings into different fault degrees. Among them, is normal data, is slightly faulty data, is moderately faulty data, and above is severely faulty data; (2.2) Output and save the sampling results in step (2.1) in numerical form. When the bearing is running at high speed, the acceleration sensor at the driving end will collect acceleration vibration signals. The collected acceleration vibration signals are converted by an analog-to-digital converter, and the converted acceleration vibration signals are amplified according to a bridge circuit to output the vibration signal value; finally, the numerical values output by each sampling are saved in CSV format. Sampling is performed on the sampling points in two different directions respectively. The acceleration vibration signals in the 9 o'clock direction are placed in the first column of the CSV file, and the acceleration vibration signals in the 12 o'clock direction are placed in the second column of the CSV file, and saved as 1.CSV, and so on, to complete data saving; In step (2.3), the data in step (2.2) is segmented. If there are N data in a CSV file, the first N / 1000 data are taken as a group, and so on. The CSV file is traversed one by one, and a total of groups of data are obtained; (2.4) Perform continuous wavelet transform processing on the group of data obtained in step (2.3) to obtain corresponding visual time-frequency diagrams that can be used as a data set. The time-frequency diagrams are in RGB format and have a pixel size of m*n; (2.5) Use one-hot encoding to perform label processing on the data set in step (2.4) according to 80% and 20% for the training set and the test set respectively. Use 0 and 1 to represent the fault states of the operation data, that is, use an N-bit register state to encode N states. Set 1000 as the normal state, 0100 as the mild fault state, 0010 as the moderate fault state, and 0001 as the severe fault state; and use inverse one-hot encoding to represent the output type, where the output value of 0 represents the normal state, the output value of 1 represents the mild fault state, the output value of 2 represents the moderate fault state, and the output value of 3 represents the severe fault state.

4. The bearing fault diagnosis method based on the improved WGAN network according to claim 3, wherein: The specific steps of building the generator network model in the step (3.1) are as follows: (3.1.1) Use a two-dimensional convolutional layer as the network input. The input end is random noise data. After batch normalization processing to achieve data normalization, then use the LeakyRule activation function to activate a large number of neurons, and rely on the calculation between neurons to extract deep features. Finally, use the tanh activation function as the network output; (3.1.2) Input the randomly generated noise with one-hot encoded labels into the generator, and generate a fake signal through the training of the generator's own network structure. (3.1.3) Process the fake signal generated from the random noise using the improved CWT to generate the required time-frequency diagram.

5. The bearing fault diagnosis method based on the improved WGAN network according to claim 4, characterized in that: In step (3.2), the R-FCN network model is built as the discriminator model of the improved WGAN network. Use the discriminator model to judge the pictures generated by the generator in step (3.1), and output the loss functions of the generator and the discriminator as well as the diagnostic accuracy of the improved WGAN model. The specific steps are as follows: (3.2.1) Use O two-dimensional convolutional layers Conv2D, P Batch Normalizaztion layers, Q LeakyRule activation functions and the ResNet101 network to form the input network of the discriminator. Obtain the initial feature map through 1 Conv2D, and then perform Conv2D operations on it to finally obtain a new feature map that removes redundant image features. (3.2.2) Use the Region Proposal Network (RPN) to obtain the bounding boxes of the regions of interest corresponding to the new feature map, and use each RoI bounding box to obtain the features in the new feature map in step (3.2.1) respectively. Then, determine the coordinate information of the position-sensitive regions through r, s, t, u of each RoI bounding box region. r, s, t, u are the coordinate positions of the bounding box. Each sub-region is obtained according to this method, and finally, each RoI realizes the classification and regression of the features. Among them, the RPN network is the RPN layer in Faster R-CNN, which is mainly used to extract bounding boxes in the Faster-RCNN network. Since it is time-consuming and laborious to extract the bounding boxes in the R-FCN network, after introducing the convolutional neural network, the two-dimensional convolutional layer is used to select the positions of the bounding boxes in the form of feature extraction, thus reducing the calculation time. In this invention, the RPN network can extract the bounding boxes in the R-FCN network relatively quickly. (3.2.3) Use the pooling operation on each sub-region to find the appropriate response value. Set the minimum response value as S and the maximum response value as T according to the size of the RoI bounding box. If the response value is between [S, T], it means that this feature is the required feature; otherwise, remove this feature and continue to find the appropriate feature until all features are found; until the features in the whole picture are obtained. (3.2.4) Map the features obtained from each RoI in step (3.2.3) to the new feature map according to the size of the obtained bounding box to obtain the position-sensitive region, that is, the feature region with the response value between [S, T] obtained through the pooling operation. Among them, the score mapping size, that is, the size of the bounding box obtained by the position-sensitive region, is K*K*(C + 1) and 4*K*K dimensions. Then, use the convolutional pooling operation to extract the features of the position-sensitive region on the new feature map, and output the extraction result through the fully connected layer. (3.2.5) Input the labeled real training set in step (2.5) into the established discriminator model for training, and then input the images generated by the generator in step (3.1) into R-FCN for training. Use the discriminator loss function and the generator loss function for judgment. If the discriminator's discrimination result is true, and at the same time the generator loss function and the discriminator loss function decrease, when the two finally tend to fit and approach, the Nash equilibrium is reached, indicating that the diagnostic model meets the requirements, then the training ends; then use the softmax function to classify to obtain the fault types with one-hot encoded labels, and output the loss function curves of the generator and discriminator models and the diagnostic accuracy curve of the improved WGAN network model changing with the number of iterations; if the discriminator's judgment result is false, then go to step (3.2.6); (3.2.6) When the training result is false, it means that the images generated by the generator are not good, the discriminator cannot correctly judge the authenticity of the images, and the generator model does not achieve the expected effect. Then use the control variable method to control the discriminator model and its hyperparameters to optimize the generator model. Fix the model parameters of the discriminator and continuously iterate to optimize the model parameters of the generator. When the discriminator's judgment result is true, the generator model reaches the optimal. At this time, the optimization effects of the discriminator and the generator models are the best. The best effect is when the generator and discriminator loss functions decrease, and the two finally tend to fit and approach, then stop iterating, so as to obtain the improved WGAN diagnostic model; among them, when obtaining the improved WGAN diagnostic model, the number of iterations is epochs, the learning rate is Lr, and the batch size is Batch_size; The control variable method here is to keep the discriminator model and parameters unchanged and optimize the generator; (3.2.7) Use the test set to test the improved WGAN diagnostic model obtained in step (3.2.5); if the discriminator can judge the authenticity of the images generated by the generator, and the discriminator loss function and the generator loss function slowly decrease to fit, without steep jump fluctuations, that is, there is no gradient disappearance or collapse phenomenon, then stop iterating, output the generator and discriminator loss functions and the model training accuracy, and obtain the improved WGAN diagnostic model.

6. The bearing fault diagnosis method based on the improved WGAN network according to claim 5, characterized in that: In step (3.2), to further improve the diagnostic speed of the improved WGAN diagnostic model, the number of layers of the Resnet101 network in the R-FCN network is optimized. Five levels are respectively selected and with 101 layers. Each RoI region is divided from into divided into grids. The number of iterations is set to epochs - 1, the learning rate is Lr - 1, and the batch size is Batch_size - 1. Training is carried out on this basis, and the training results are reflected by the training accuracy. The optimal number of layers is obtained from the five levels as . Compared with 101 layers, the Resnet network reduces the number of network layers, improves the training speed, and obtains a diagnostic model with redundant network layers removed on the basis of step (3.2).

7. A bearing fault diagnosis method based on an improved WGAN network according to claim 6, characterized in that: In step (3.3), since the improved WGAN network model still has many network structures and numerous hyperparameters, which will affect the generation ability of the generator and the discrimination ability of the discriminator. To achieve the feature extraction of deep-level signals and improve the diagnostic accuracy, use automatic parameter tuning to optimize the discriminator model to achieve the purpose of optimizing the improved WGAN model. The specific steps are as follows: (3.3.1) Initialize the network hyperparameters, and obtain the initial parameter set consisting of the convolutional kernel size, the number of hidden neurons, and the pooling factor parameter to be optimized. Select the first set of parameters and input them into the improved WGAN model for training. Among them, the initialization parameter set is as follows: ; (3.3.2) Establish an objective function. The objective function is the basis for evaluating the prior model and is used to calculate the posterior probability of updating the optimization function to obtain the optimal hyperparameter combination; use the cross-entropy loss function as the objective function, and the formula is as follows: (1) where B is the number of samples, C is the number of categories, indicates whether the b-th sample belongs to the c-th category, is the output result of classification, is the regularization coefficient, are the parameters to be learned in the network layer, and j is the feature map; (3.3.3) Use the initial parameters in step (3.3.1) to perform calculations using the objective function in step (3.3.2) to obtain the corresponding function evaluation value ; where , from and construct the data set ; (3.3.4) Use the first set of data in the dataset A in step (3.3.3) to determine whether the model meets the requirements on the validation set; specifically, it can be judged according to the hyperparameter combination expression of the model. If the discriminator loss function iteration tends to fit, this set of hyperparameters meets the requirements; otherwise, go to step (3.3.5), and the formula is as follows: (2) In the formula, is the minimized objective function; is a set of obtained optimal hyperparameters; Set the minimum objective function When it meets the requirements for selecting hyperparameters; (3.3.5) Establish a Gaussian regression model using dataset A, and continuously iterate and calculate to update the loss function through the Gaussian regression model to correct the probability model. To obtain the optimal hyperparameters in the Gaussian distribution, the maximum likelihood estimation method can be used, and its expression is as follows: (3) where K is the covariance matrix; f is the posterior probability of the first n samples; is the selected hyperparameter, ; (3.3.6) Use the acquisition function Obtain the parameter set The next set of hyperparameters in the middle, input it into step (3.3.3) to calculate a new evaluation value ; Among them, the acquisition function in step (3.3.6) is constructed from the posterior distribution of the current dataset, and the next set of hyperparameters is selected by maximizing the acquisition function. The acquisition function formula is as follows: (4) In the formula, is the training set, , are the mean function and covariance function of the joint posterior distribution of the objective function respectively; is a tuning parameter that can be used to adjust the selection of sampling points; (3.3.7) Determine whether the model accuracy requirement is met. If it is met, determine the hyperparameters and ; otherwise, continue to execute steps (3.3.2) to (3.3.6) until the requirement is met and stop the iteration; Obtain the optimal network hyperparameters of the improved WGAN model, and then achieve the purpose of optimizing the improved WGAN diagnostic model by Hyperopt. Then use step (3.2.6) to realize the dual optimization of the generator and the discriminator, and obtain the optimized improved WGAN diagnostic model.

8. A bearing fault diagnosis method based on an improved WGAN network according to claim 7, characterized in that: In step (3.4), to solve the problem that most WGAN network unsupervised learning models not only require a large amount of sample data but also have difficulties in sample annotation; by changing the discriminator and generator loss functions, semi-supervised learning is realized. The purpose is to make the WGAN network learner not rely on external interactions and automatically use unlabeled samples to improve the learning performance. The specific steps are as follows: (3.4.1) Construct the loss function of the discriminator in semi-supervised learning. First, construct the supervised learning loss function of the WGAN network, and the formula is as follows: (5) where E is the mathematical expectation, real data and probability distribution of, is the probability that the discriminator judges to be false; Second, construct the unsupervised learning loss function of the WGAN network, and the formula is as follows: (6) Wherein, is the discriminator's evaluation of the real data , is the generated data, is the random noise, is the real data, is the discriminator's evaluation of the generated data , is the fake data; Finally, construct the discriminator of the improved WGAN network model The loss function is as follows: (7) Further, to improve the accuracy of the discriminator loss function, the weights of the supervised learning and semi-supervised learning loss functions are normalized and multiplied by a weight scale factor , and the updated loss function expression is as follows: (8) (3.4.2) Improvement of the generator in the semi-supervised learning of the improved WGAN network. The construction of the loss function is as follows: (9) Based on the optimized network model in step (3.3), train the generated images with one-hot encoded labels generated in step (3.1) and the real images using the sample label rate instead of the overall training sample labels. The sample label rate is There are four types, among which is not zero, indicating supervised learning; (3.4.4) Judge the training results in step (3.4.3), and obtain the corresponding accuracy rates by training with different sample labeling rates. ; When is , the corresponding is the highest. At this time, semi-supervised learning is more efficient than supervised learning and unsupervised learning. Then, use the softmax function to classify the fault types with one-hot encoded labels, and output the loss function curve and the network model accuracy loss curve that change with the number of iterations to complete the training.

9. A bearing fault diagnosis method based on an improved WGAN network according to claim 8, characterized in that: The specific improved overall WGAN diagnostic process in step (3.5) is as follows: (3.5.1) Input the random noise and the sample label rate with one-hot encoding in step (3.4) into the optimized generator model in step (3.3), and generate a false signal through the training of the generator's own network structure; Among them, the random noise needs to satisfy the format and the number of pixels is the same as the size of the time-frequency diagram; (3.5.2) Use the above improved CWT to perform continuous wavelet transform on the signal to obtain a standard time-frequency diagram, making it more capable of 'deceiving' the discriminator. (3.5.3) Input the time-frequency diagram obtained in step (3.5.2) into the optimized R-FCN discriminator network model in step (3.3), and at the same time input the training set into the discriminator. After the discriminator iteratively trains, judge whether the time-frequency diagram input in step (3.5.2) is true. If it is true, the discriminator and generator loss functions reach the fitting effect, and output the loss function curves of the generator and discriminator changing with the number of iterations, the diagnostic accuracy curve of the improved WGAN network model, and the fault types of the one-hot encoded labels; otherwise, fix the discriminator parameters and continuously iterate and update the generator parameters until the discriminator cannot judge whether the data generated by the generator is true or false. Finally, obtain the improved WGAN network model, and then input the test set into the improved WGAN network model for verification. (3.5.4) Obtain the optimal hyperparameter combination of the diagnostic model through the Hyperopt optimization method, and then optimize the improved WGAN model. (3.5.5)To verify whether semi-supervised learning can achieve fault diagnosis in the optimized improved WGAN network model, different sample labeling rates are used to replace the overall sample labels and input into the improved WGAN network model for training, and the diagnostic accuracies of different sample labeling rates are output.

10. A bearing fault diagnosis method based on an improved WGAN network according to claim 9, characterized in that: The specific steps of step (4) are as follows: (4.1) Obtain the operation data of the bearing throughout its life cycle and save the data in CSV format; (4.2)Obtain the time - amplitude relationship diagram from the data in CSV format in step (4.1) through spectral signal analysis, and divide the data according to the amplitude. If the amplitude is within it is in a normal condition; if the amplitude is within it is a minor fault; if the amplitude is within it is a moderate fault; if the amplitude is greater than it is a severe fault; then save the data sets divided into different fault levels in Excel; (4.3) Divide the dataset in the Excel of step (4.2) into a training set and a test set according to 80% and 20%, and label the dataset using the label processing method in step (2.5); (4.4) Input the data processed in step (4.3) into the improved WGAN network model optimized by Hyperopt for training, and output the loss function curves of the generator and discriminator varying with the number of iterations, the diagnostic accuracy curve of the improved WGAN network model, and the fault types of the one-hot encoded labels.

Citation Information

Patent Citations

  • Deep Learning-Based Fault Diagnosis Method for Mechanical Components under Data Imbalance

    CN110428004B

  • Bearing residual life prediction method based on improved residual network and WGAN

    CN113536697A

  • Bearing fault diagnosis method based on semi-supervised generative adversarial network

    CN110617966A

  • Method for generating image inpainting model, and device, medium and program product

    WO2022227765A1