Rolling bearing fault diagnosis method and device based on continuous wavelet transform and depth migration convolutional neural network, and electronic equipment

By converting one-dimensional vibration data into two-dimensional time-frequency maps and constructing a deep transfer convolutional neural network (VGG16) model, the problem of relying on a large amount of labeled data for rolling bearing fault diagnosis in existing technologies is solved, and efficient fault diagnosis results are achieved.

CN118964887AInactive Publication Date: 2024-11-15NANJING UNIV OF AERONAUTICS & ASTRONAUTICS

Patent Information

Application Number
CN202411012657.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-11-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing deep learning-based methods for diagnosing rolling bearing faults rely on large amounts of tag data and have low diagnostic accuracy and efficiency, failing to make efficient use of the limited tag data available in industrial settings.

Method used

Continuous wavelet transform is used to convert one-dimensional vibration data into two-dimensional time-frequency maps, and a deep transfer convolutional neural network VGG16 model is constructed. Through pre-training and parameter fine-tuning, the fault diagnosis model is optimized, and the transfer learning method is used to reduce the consumption of computing resources.

Benefits of technology

It improves the accuracy of fault diagnosis, reduces model training time and computational resource requirements, and enhances the efficiency and accuracy of fault diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118964887A_ABST
    Figure CN118964887A_ABST
Patent Text Reader

Abstract

The invention discloses a rolling bearing fault diagnosis method and device based on continuous wavelet transform and a depth migration convolutional neural network, and electronic equipment, and the method comprises the steps: carrying out the normalization processing of collected original one-dimensional vibration data, making a fault tag for the normalized data, and dividing the tag data into a training set and a test set; performing continuous wavelet transform on each data sample of the training set and the test set to generate a corresponding time-frequency diagram, and making a rolling bearing fault diagnosis data set in a time-frequency diagram form; the method comprises the following steps: building a deep convolutional neural network VGG16 model, and carrying out training by using a public data set ImageNet alignment to obtain a VGG16 pre-training model; and performing parameter fine tuning and optimization on the VGG16 pre-training model based on the rolling bearing fault diagnosis data set in the time-frequency diagram form to obtain a migrated fault diagnosis model for realizing fault diagnosis of the rolling bearing. The method is high in fault diagnosis accuracy and low in time consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of rolling bearing fault diagnosis, and relates to a rolling bearing fault diagnosis method, device and electronic equipment based on continuous wavelet transform (CWT) and deep migration convolutional neural network. Background Art

[0002] As one of the core components of rotating mechanical equipment, rolling bearings are widely used in mechanical equipment in the fields of aerospace, petrochemicals, transportation, etc. Rolling bearings usually run for a long time in harsh environments such as high speed, high load, and large temperature difference, and their failure frequency is far higher than that of other components. Once a rolling bearing fails, it will seriously affect the normal operation of the equipment, causing economic losses at the least and catastrophic accidents at the worst. Therefore, it is of great significance to diagnose rolling bearing faults, detect faults in advance, and formulate corresponding maintenance and repair strategies to improve the safety and reliability of mechanical equipment operation.

[0003] Early researchers completed fault diagnosis by exploring the relationship between the equipment's fault mechanism and fault symptoms. However, as the mechanical system becomes more complex and the application environment becomes more variable, it becomes very difficult to accurately analyze the equipment's fault mechanism, describe the mechanical equipment's operation process, and establish a physical model. With the continuous improvement of modern mechanical equipment data samples, data-driven fault diagnosis methods have gradually become the main means of fault diagnosis. In this field, many signal processing methods and shallow machine learning methods have been successfully applied, but these methods require high professional knowledge and experience of technicians and cannot cope with the current industrial environment of data explosion. With the rapid development of artificial intelligence technology, especially the great breakthroughs made by deep learning models in the field of image and speech recognition, data-driven fault diagnosis methods have gradually developed in the direction of deep learning. The fault diagnosis method based on deep learning adopts an end-to-end mode, directly inputs the original data into the deep learning model, and uses the deep learning model to automatically complete the series of processes of fault feature extraction, mapping, and classification, avoiding the fault feature processing and fitting work, and directly obtaining the final diagnosis results, making up for the shortcomings of traditional methods. Commonly used deep learning models include Convolution Neural Network (CNN), Recurrent Neural Network (RNN), Autoencoder (AE), Deep Belief Network (DBN), etc., which have shown powerful feature learning capabilities and have been widely used in the field of fault diagnosis.

[0004] However, the training of deep learning models relies on a large amount of labeled data and requires a huge amount of time and computing resources. In actual industrial scenarios, mechanical equipment runs in normal conditions for a long time, and it is very difficult to collect a large amount of fault label data. In addition, from an economic point of view, we hope that the fault diagnosis device consumes as little time and computing resources as possible. In response to the above problems, the present invention considers using transfer learning methods to optimize deep learning models. For deep learning models, shallow networks are responsible for learning common features, and deep networks are responsible for learning special features that are highly relevant to tasks. As the number of network layers increases, a form of learning from common features to special features is formed. The transfer learning method migrates the general model trained on big data to a specific task, and fine-tunes the parameters of the high-level network, so that the model saves time and computing resources while meeting the requirements of specific tasks. Summary of the invention

[0005] The present invention aims at the problem that the existing rolling bearing fault diagnosis method based on deep learning relies on a large amount of label data and has low diagnostic accuracy and efficiency, and provides a rolling bearing fault diagnosis method, device and electronic device based on continuous wavelet transform and deep migration convolutional neural network. The present invention normalizes the original one-dimensional vibration data of the rolling bearing, then converts it into a two-dimensional time-frequency graph and produces a fault diagnosis data set, then constructs a deep convolutional neural network VGG16 model and pre-trains it, and finally adjusts and improves the pre-trained model to obtain a migrated fault diagnosis model, and inputs the time-frequency graph fault diagnosis data into the model to obtain a fault diagnosis result.

[0006] To solve the above problems, the present invention adopts the following technical solutions.

[0007] A rolling bearing fault diagnosis method based on continuous wavelet transform and deep migration convolutional neural network of the present invention comprises the following steps:

[0008] Step 1, data processing: collect the original vibration data of various faults of rolling bearings under known working conditions and normalize them; perform overlapping sampling on the normalized data to obtain data samples of fixed length, create labels for each sample based on the fault type, and divide the labeled samples into training sample sets and test sample sets;

[0009] Step 2, data set preparation: Perform continuous wavelet transform on the training samples and test samples obtained in step 1 to obtain the time-frequency diagram of each sample; convert the time-frequency diagram of each sample into a three-channel RGB format to adapt to the training of the deep convolutional neural network constructed subsequently, and form a rolling bearing fault diagnosis data set in the form of a time-frequency diagram, which includes a training set and a test set;

[0010] Step 3: Model pre-training: Build a deep convolutional neural network VGG16 model based on Python and PyTorch deep learning framework, use the public dataset ImageNet to train the constructed VGG16 model, obtain the trained VGG16 pre-trained model, and save the parameters of the VGG16 pre-trained model;

[0011] Step 4, pre-trained model migration: Freeze the parameters of the convolutional layer and pooling layer of the VGG16 pre-trained model obtained in step 3, fine-tune the parameters of the classifier part in the VGG16 pre-trained model to match the rolling bearing fault diagnosis dataset in the form of time-frequency graph produced in step 2, and improve the activation function and optimization algorithm of the VGG16 pre-trained model to obtain the final fault diagnosis model, and input the rolling bearing fault diagnosis data in the form of time-frequency graph to obtain the fault diagnosis results.

[0012] Specifically, the data processing stage of step 1 includes:

[0013] Step 1.1: Perform maximum and minimum normalization processing on the original vibration signal of the rolling bearing collected in step 1. The conversion function is:

[0014]

[0015] In the formula, x is the original one-dimensional vibration signal, x norm is the normalized one-dimensional vibration signal, x min is the minimum value of the one-dimensional vibration signal, x max is the maximum value of the one-dimensional vibration signal;

[0016] Step 1.2, perform overlapping sampling on the normalized one-dimensional vibration data obtained in step 1.1 to increase the number of training samples, set the sample length to 512, and the overlap rate to 0.5 to sample and obtain each data sample; then, make a sample label based on the state of the rolling bearing to which each data sample belongs, and the rolling bearing data used contains three fault states and one normal state, where each fault state is further divided into three fault degrees, including ten states; therefore, make the sample label Label = [0,1,2,...,9], where 0 represents the normal state, and 1 to 9 represent the three fault degrees under the three fault states of the rolling bearing respectively; finally, randomly shuffle the obtained label samples and divide them into a training sample set and a test sample set in a ratio of 7:3.

[0017] Specifically, the data set preparation stage of step 2 includes:

[0018] Step 2.1: Perform continuous wavelet transform on each sample in the training sample set and the test sample set obtained in step 1. The formula of continuous wavelet transform is as follows:

[0019]

[0020] Where W f (a, τ) is the output result of wavelet transform, which is two-dimensional data; f(t) is the input signal, is the wavelet basis function The complex conjugate function of , a is the scale factor, and τ is the translation factor; the complex Morlet wavelet cmor suitable for processing vibration signals is selected as the wavelet basis function, the scale length is set to 128, the center frequency is set to 100, and the bandwidth is set to 1, and each data sample is subjected to continuous wavelet transform; the result obtained after continuous wavelet transform contains amplitude information amp and frequency information f, and the time axis t is generated according to the set sampling frequency and sample length, and the time-frequency diagram corresponding to each sample is drawn based on amp, f and t;

[0021] Step 2.2: Save the time-frequency graph obtained in step 2.1 in PNG format. The image in this format is 4-channel RGBA. Convert each time-frequency graph into a 224×224×3 RGB format image to meet the training requirements of the deep convolutional neural network VGG16 model constructed subsequently, where 224×224 represents the pixel size of the time-frequency graph, and 3 represents the number of channels of the time-frequency graph. Then, a rolling bearing fault diagnosis dataset in the form of a time-frequency graph is formed based on the RGB format image, which includes a training set and a test set.

[0022] Specifically, the model pre-training process in step 3 includes:

[0023] A deep convolutional neural network VGG16 model is built based on Python and PyTorch platforms, including convolutional layers, pooling layers and fully connected layers. The specific network structure includes 13 convolutional layers, 5 pooling layers and 3 fully connected layers. The pooling layers all use the maximum pooling method. The first two fully connected layers are followed by a Dropout layer to prevent overfitting. The last fully connected layer uses the Softmax function activation to output the probability of each category.

[0024] The convolution layer performs convolution operations on the input feature map to extract the input features. The superposition of multiple convolution layers can extract higher-level feature representations. The operation formula of the convolution layer is as follows:

[0025] Y(i,j)=(I*K)(i,j)=∑ m ∑ n I(im,jn)×K(m,n) (3)

[0026] Where Y(i,j) is the value of the convolution layer output feature map at position (i,j), I is the convolution layer input feature map, K is the convolution kernel, * represents the convolution operation, I(im,jn) is the value of the convolution layer input feature map at position (im,jn), K(m,n) is the weight of the convolution kernel at position (m,n), m and n represent the index of the convolution kernel sliding on the convolution layer input feature map; the number of channels of input data in the VGG16 model is 3, and the number of output channels of the 13 convolution layers is 64, 64, 128, 128, 256, 256, 256, 512, 512, 512, 512, 512, 512, 512, respectively. The convolution kernel size of each convolution layer is 3×3, and the step size is 1;

[0027] The five pooling layers in the VGG16 model all use the maximum pooling method, which selects the maximum value from a local area of ​​the input feature map as the output, which is used to reduce the spatial dimension of the feature map, reduce the number of parameters and computational complexity; the calculation formula of the maximum pooling method is as follows:

[0028] P max (i,j)=max m,n Y(im,jn) (4)

[0029] Where P max (i, j) is the value of the maximum pooling layer output feature map at position (i, j), Y(im, jn) is the value of the maximum pooling layer input feature map at position (im, jn), m and n represent the index of the pooling window sliding on the maximum pooling layer input feature map; the 5 maximum pooling layers in the VGG16 model are connected after the 2nd, 4th, 7th, 10th, and 13th convolutional layers respectively, and the size of the pooling window is 2×2 with a step size of 2;

[0030] The fully connected layer is a multilayer perceptron in which all neurons between layers are connected. It is located at the end of the model and is used to integrate the features extracted by the convolutional layer and the pooling layer and output the final prediction result. The specific calculation formula of the fully connected layer is as follows:

[0031] y=f(Wx+b) (5)

[0032] In the formula, y is the output vector of the fully connected layer, x is the input vector of the fully connected layer, W is the weight matrix with a dimension of K×N, where K is the number of neurons in the fully connected layer, N is the dimension of the input vector, and b represents the bias vector with a dimension of K×1; the VGG16 model contains three fully connected layers, and the last fully connected layer is used as the output layer to activate the output probability of each category using the Softmax function; the number of input neurons in the first fully connected layer is the flattened output features of the convolutional layer and the pooling layer, and the number of input neurons in the subsequent fully connected layer is the number of output neurons in the previous fully connected layer. The number of output neurons in the three fully connected layers is 4096, 4096, and 1000 respectively;

[0033] After building the VGG16 model, use the public dataset ImageNet to train the model to obtain the VGG16 pre-trained model, save the parameters of the VGG16 pre-trained model, and prepare for subsequent model migration.

[0034] Specifically, the process of migrating the pre-trained model in step 4 includes:

[0035] For the VGG16 pre-trained model obtained in step 3, freeze the parameters of the convolutional layer and pooling layer used for feature extraction, and adjust the fully connected layer used for classification; first, remove all three fully connected layers in the original structure of VGG16, and then design a new global average pooling layer to replace the original fully connected layer. Compared with the fully connected layer, the global average pooling layer can effectively reduce the model parameters to reduce the complexity of the model. The classification output layer is changed from the original 1000 to 10, which meets the requirements of 10 classifications of the rolling bearing fault diagnosis data set in the form of a time-frequency diagram produced in step 2; then, further improve the activation function and optimization algorithm of the VGG16 pre-trained model; the multi-layer convolutional layers in the VGG16 pre-trained model all use the ReLU activation function, and its function expression is as follows:

[0036] f(x)=max(0,x) (6)

[0037] Where x is the input value and f(x) is the output value. When the input x is less than 0, the function value and gradient of the ReLU function are both 0, which leads to neuron death, and then to problems such as information loss and training instability. Here, the Leaky ReLU activation function is used to replace the original ReLU activation function to avoid the problem of neuron death. The formula is as follows:

[0038]

[0039] In the formula, x is the input value, f(x) is the output value; a is the set parameter, which is set to 0.01; the VGG16 pre-trained model uses the SGD optimization algorithm for parameter optimization, which is replaced by the Adam optimization algorithm to improve the convergence speed of the model; after the above steps, the final fault diagnosis model is obtained, and the fault diagnosis data in the form of rolling bearing time-frequency diagram is used as input to obtain the fault diagnosis results, thereby realizing the fault diagnosis of rolling bearings.

[0040] A rolling bearing fault diagnosis device based on continuous wavelet transform and deep migration convolutional neural network of the present invention comprises:

[0041] The data processing module is used to collect the original vibration data of various types of rolling bearing faults under known working conditions and normalize them; overlap sampling is performed on the normalized data to obtain data samples of fixed length, labels are created for each sample based on the fault type, and the labeled samples are divided into a training sample set and a test sample set;

[0042] The data set preparation module is used to perform continuous wavelet transform on the training samples and test samples obtained in step 1 to obtain the time-frequency diagram of each sample; the time-frequency diagram of each sample is converted into a three-channel RGB format to adapt to the training of the deep convolutional neural network constructed subsequently, and a rolling bearing fault diagnosis data set in the form of a time-frequency diagram is formed, which includes a training set and a test set;

[0043] The model pre-training module is used to build a deep convolutional neural network VGG16 model based on Python and PyTorch deep learning framework, use the public dataset ImageNet to train the constructed VGG16 model, obtain the trained VGG16 pre-trained model, and save the parameters of the VGG16 pre-trained model;

[0044] The pre-trained model migration module is used to freeze the parameters of the convolutional layer and pooling layer of the VGG16 pre-trained model obtained in step 3, fine-tune the parameters of the classifier part in the VGG16 pre-trained model to match the rolling bearing fault diagnosis dataset in the form of a time-frequency graph produced in step 2, and improve the activation function and optimization algorithm of the VGG16 pre-trained model to obtain the final fault diagnosis model, and input the rolling bearing fault diagnosis data in the form of a time-frequency graph to obtain the fault diagnosis result.

[0045] An electronic device of the present invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the rolling bearing fault diagnosis method based on continuous wavelet transform and deep migration convolutional neural network as described above is implemented.

[0046] A non-transitory computer-readable storage medium of the present invention stores a computer program thereon, and when the computer program is executed by a processor, the rolling bearing fault diagnosis method based on continuous wavelet transform and deep migration convolutional neural network as described above is implemented.

[0047] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0048] 1. The present invention converts a one-dimensional vibration signal into a two-dimensional time-frequency diagram as the input of the fault diagnosis model. Compared with the one-dimensional vibration signal, the two-dimensional time-frequency diagram can simultaneously display the time domain characteristics and frequency domain characteristics of the signal and intuitively display the key features in the signal. The two-dimensional time-frequency diagram effectively enhances the feature representation, provides richer information for the fault diagnosis model, and helps to improve the accuracy of fault diagnosis.

[0049] 2. The present invention uses the deep convolutional neural network VGG16 model to automatically extract fault features from two-dimensional time-frequency diagrams, overcoming the deficiency that traditional fault diagnosis methods need to rely on expert experience and knowledge to effectively extract fault features. The automatically extracted fault features are more conducive to fault classification, effectively improving the accuracy of the fault diagnosis model.

[0050] 3. The present invention introduces a transfer learning method and overcomes the deficiency that the traditional deep learning-based fault diagnosis method needs to rely on a large number of samples to train the model by fine-tuning the parameters of the VGG16 pre-trained model. It also greatly reduces the model running time and saves a lot of time and computing resources.

[0051] 4. The present invention improves the activation function and optimization algorithm of the VGG16 pre-training model, effectively avoiding the problem of information loss caused by neuron death and greatly improving the convergence speed of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 The present invention is a flow chart of a rolling bearing fault diagnosis method based on continuous wavelet transform and deep migration convolutional neural network.

[0053] Figure 2 It is a time domain waveform diagram of a bearing after normalization processing under different states in an embodiment of the present invention.

[0054] Figure 3 It is a time-frequency diagram generated after continuous wavelet transform of a bearing in different states in one embodiment of the present invention.

[0055] Figure 4 This is a structural diagram of a deep convolutional neural network VGG16 model according to an embodiment of the present invention and a structural diagram after parameter fine-tuning.

[0056] Figure 5 A diagram of a data acquisition device according to an embodiment of the present invention.

[0057] FIG6 is a diagram showing the fault diagnosis results of a bearing in an original model and a migration model according to an embodiment of the present invention. The legend loss represents the change of the model training loss, and the legend acc represents the change of the fault diagnosis accuracy. Figure 6a This is a graph showing the results of training the original model 50 times. Figure 6b A graph showing the results of training the migration model 10 times. DETAILED DESCRIPTION

[0058] The present invention discloses a rolling bearing fault diagnosis method, device and electronic device based on continuous wavelet transform and deep migration convolutional neural network. The method first normalizes the collected original one-dimensional vibration data, creates fault labels for the normalized data, and divides the label data into a training set and a test set; then, continuous wavelet transform is performed on each data sample of the training set and the test set to generate corresponding time-frequency graphs, and a rolling bearing fault diagnosis data set in the form of a time-frequency graph is created; then, a deep convolutional neural network VGG16 model is built, and trained using the public data set ImageNet alignment to obtain a VGG16 pre-trained model; finally, the VGG16 pre-trained model is fine-tuned and optimized based on the rolling bearing fault diagnosis data set in the form of a time-frequency graph to obtain a migrated fault diagnosis model for realizing rolling bearing fault diagnosis.

[0059] The present invention will be further described in detail below in conjunction with the accompanying drawings.

[0060] like Figure 1 As shown, a rolling bearing fault diagnosis method based on continuous wavelet transform and deep migration convolutional neural network of the present invention comprises the following steps:

[0061] Step 1, data processing: collect the original vibration data of various types of rolling bearing faults under known working conditions and normalize them; perform overlapping sampling on the normalized data to obtain data samples of fixed length, create labels for each sample based on the fault type, and divide the labeled samples into training sample sets and test sample sets.

[0062] Step 2, data set preparation: Perform continuous wavelet transform on the training samples and test samples obtained in step 1 to obtain the time-frequency diagram of each sample; convert the time-frequency diagram of each sample into a three-channel RGB format to adapt to the training of the deep convolutional neural network constructed subsequently, and form a rolling bearing fault diagnosis data set in the form of a time-frequency diagram, which includes a training set and a test set.

[0063] Step 3: Model pre-training: Build a deep convolutional neural network VGG16 model based on Python and PyTorch deep learning framework, use the public dataset ImageNet to train the constructed VGG16 model, obtain the trained VGG16 pre-trained model, and save the parameters of the VGG16 pre-trained model.

[0064] Step 4, pre-trained model migration: Freeze the parameters of the convolutional layer and pooling layer of the VGG16 pre-trained model obtained in step 3, fine-tune the parameters of the classifier part in the VGG16 pre-trained model to match the rolling bearing fault diagnosis dataset in the form of time-frequency graph produced in step 2, and improve the activation function and optimization algorithm of the VGG16 pre-trained model to obtain the final fault diagnosis model, and input the rolling bearing fault diagnosis data in the form of time-frequency graph to obtain the fault diagnosis result.

[0065] Specifically, the data processing stage of step 1 includes the following steps:

[0066] Step 1.1: Perform maximum and minimum normalization processing on the original vibration signal of the rolling bearing collected in step 1. The conversion function is:

[0067]

[0068] In the formula, x is the original one-dimensional vibration signal, x norm is the normalized one-dimensional vibration signal, x min is the minimum value of the one-dimensional vibration signal, x max is the maximum value of the one-dimensional vibration signal. After the above normalization processing, the data will fall within the interval of [0,1], which makes the data closer in value, which helps the fault diagnosis model to find the optimal solution faster when optimizing parameters, and improves the training speed and convergence speed of the model. The normalized vibration data samples of the rolling bearing under normal, inner ring fault, outer ring fault and rolling element fault conditions are selected to draw the time domain waveform diagram. The results are shown in Figure 2 As shown in the figure, we can see that all the data fall in the interval [0,1], and there are obvious differences in the data waveforms of bearings in different health conditions.

[0069] Step 1.2, overlap sampling is performed on the normalized one-dimensional vibration data obtained in step 1.1 to increase the number of training samples. The present invention sets the sample length to 512 and the overlap rate to 0.5 to sample and obtain each data sample. Then, a sample label is made based on the state of the rolling bearing to which each data sample belongs. The data of the rolling bearing used in the present invention includes three fault states and one normal state, wherein each fault state is further divided into three fault degrees, for a total of ten states. Therefore, the sample label is made as Label = [0,1,2,...,9], where 0 represents the normal state, and 1 to 9 represent the three fault degrees under the three fault states of the rolling bearing, respectively. Finally, the obtained label samples are randomly shuffled and divided into a training sample set and a test sample set in a ratio of 7:3.

[0070] Specifically, the data set preparation stage of step 2 includes the following steps:

[0071] Step 2.1: Perform continuous wavelet transform on each sample in the training sample set and the test sample set obtained in step 1. The formula of continuous wavelet transform is as follows:

[0072]

[0073] Where W f (a,τ) is the output result of wavelet transform, which is two-dimensional data, f(t) is the input signal, is the wavelet basis function The complex conjugate function of , a is the scale factor, τ is the translation factor. The present invention selects the complex Morlet wavelet cmor suitable for processing vibration signals as the wavelet basis function. After experiments and observations, the scale length is set to 128, the center frequency is 100, and the bandwidth is 1, and a continuous wavelet transform is performed on each data sample. The result obtained after the continuous wavelet transform contains amplitude information amp and frequency information f. The time axis t is generated according to the set sampling frequency and sample length, and the time-frequency diagram corresponding to each sample is drawn based on amp, f and t. The time-frequency diagrams of the rolling bearing under normal conditions, inner ring fault, outer ring fault and rolling element fault are selected, such as Figure 3 As shown in the figure, the horizontal axis represents time, the vertical axis represents frequency, and the heat map represents amplitude. It can be clearly seen from the figure that the time-frequency diagram of each state is very different. Different from the one-dimensional vibration signal, the two-dimensional time-frequency diagram contains more information. The difference between the time-frequency diagrams of different states is more obvious and easier to be distinguished by the diagnostic model, which helps to improve the accuracy of fault diagnosis.

[0074] Step 2.2: The time-frequency graph obtained in step 2.1 is saved in PNG format, which is a 4-channel RGBA image. Each time-frequency graph is converted into a 224×224×3 RGB format image to meet the training requirements of the deep convolutional neural network VGG16 model constructed later, where 224×224 represents the pixel size of the time-frequency graph and 3 represents the number of channels of the time-frequency graph. Then, a rolling bearing fault diagnosis dataset in the form of a time-frequency graph is formed based on the RGB format image, which includes a training set and a test set.

[0075] Specifically, the process of model pre-training in step 3 is as follows:

[0076] A deep convolutional neural network VGG16 model is built based on Python and PyTorch platforms. The network model includes convolutional layers, pooling layers, and fully connected layers. The specific network structure diagram is as follows: Figure 4 As shown in the figure, we can see that the original network structure contains 13 convolutional layers, 5 pooling layers and 3 fully connected layers. The pooling layers all use the maximum pooling method. The first two fully connected layers are connected to a Dropout layer to prevent overfitting. The last fully connected layer uses the Softmax function activation to output the probability of each category.

[0077] The convolution layer performs convolution operations on the input feature map to extract the input features. The superposition of multiple convolution layers can extract higher-level feature representations. The operation formula of the convolution layer is as follows:

[0078] Y(i,j)=(I*K)(i,j)=∑ m ∑ n I(im,jn)×K(m,n) (3)

[0079] Where Y(i,j) is the value of the convolutional layer output feature map at position (i,j), I is the convolutional layer input feature map, K is the convolution kernel, * represents the convolution operation, I(im,jn) is the value of the convolutional layer input feature map at position (im,jn), K(m,n) is the weight of the convolution kernel at position (m,n), and m and n represent the index of the convolution kernel sliding on the convolutional layer input feature map. The number of channels of the input data in the VGG16 model is 3, and the number of output channels of the 13 convolutional layers is 64, 64, 128, 128, 256, 256, 256, 512, 512, 512, 512, 512, 512, 512, and the convolution kernel size of each convolutional layer is 3×3, and the stride is 1.

[0080] The five pooling layers in the VGG16 model all use the maximum pooling method, which selects the maximum value from a local area of ​​the input feature map as the output, which is used to reduce the spatial dimension of the feature map, reduce the number of parameters and computational complexity. The calculation formula of the maximum pooling method is as follows:

[0081] P max (i,j)=max m,n Y(im,jn) (4)

[0082] Where P max (i, j) is the value of the maximum pooling layer output feature map at position (i, j), Y(im, jn) is the value of the maximum pooling layer input feature map at position (im, jn), and m and n represent the index of the pooling window sliding on the maximum pooling layer input feature map. The 5 maximum pooling layers in the VGG16 model are connected after the 2nd, 4th, 7th, 10th, and 13th convolutional layers respectively, and the size of the pooling window is 2×2 with a stride of 2.

[0083] The fully connected layer is a multilayer perceptron in which all neurons between layers are connected. It is located at the end of the model and is used to integrate the features extracted by the convolutional layer and the pooling layer and output the final prediction result. The calculation formula of the fully connected layer is as follows:

[0084] y=f(Wx+b) (5)

[0085] In the formula, y is the output vector of the fully connected layer, x is the input vector of the fully connected layer, W is the weight matrix with a dimension of K×N, where K is the number of neurons in the fully connected layer, N is the dimension of the input vector, and b represents the bias vector with a dimension of K×1. The VGG16 model contains three fully connected layers. The last fully connected layer is used as the output layer and uses the Softmax function to activate and output the probability of each category. The number of input neurons in the first fully connected layer is the flattened output features of the convolutional layer and the pooling layer. The number of input neurons in the subsequent fully connected layers is the number of output neurons in the previous fully connected layer. The number of output neurons in the three fully connected layers is 4096, 4096, and 1000, respectively.

[0086] After building the VGG16 model, use the public dataset ImageNet to train the model to obtain the VGG16 pre-trained model, save the parameters of the VGG16 pre-trained model, and prepare for subsequent model migration.

[0087] Specifically, the process of migrating the pre-trained model in step 4 is as follows:

[0088] For the VGG16 pre-trained model obtained in step 3, freeze the parameters of the convolutional layer and pooling layer used for feature extraction, and adjust the fully connected layer used for classification. The adjusted structure is as follows: Figure 4The structure after fine-tuning is shown in the figure. First, all three fully connected layers in the original structure of VGG16 are removed, and then a new global average pooling layer is designed to replace the original fully connected layer. Compared with the fully connected layer, the global average pooling layer can effectively reduce the parameters of the model to reduce the complexity of the model. The classification output layer is changed from the original 1000 to 10, which meets the requirement of 10 classifications of the time-frequency graph rolling bearing fault diagnosis dataset produced in step 2. After that, the VGG16 pre-trained model is further improved. The multi-layer convolutional layers in the VGG16 pre-trained model all use the ReLU activation function, and its function expression is as follows:

[0089] f(x)=max(0,x) (6)

[0090] Where x is the input value and f(x) is the output value. When the input x is less than 0, the function value and gradient of the ReLU function are both 0, which leads to neuron death, and then causes problems such as information loss and training instability. Therefore, the present invention uses the Leaky ReLU activation function to replace the original ReLU activation function to avoid the problem of neuron death. The formula is as follows:

[0091]

[0092] Wherein, x is the input value, f(x) is the output value, and a is the set parameter, which is set to 0.01 in the present invention. In addition, the VGG16 pre-trained model uses the SGD optimization algorithm for parameter optimization, and the present invention replaces it with the Adam optimization algorithm to improve the convergence speed of the fault diagnosis model. After the above steps, the final fault diagnosis model is obtained, and the fault diagnosis data in the form of the rolling bearing time-frequency diagram is used as input to obtain the fault diagnosis result, and realize the fault diagnosis of the rolling bearing.

[0093] The present invention selects the bearing failure experimental data disclosed by Case Western Reserve University in the United States for specific example testing. The data set is based on the SKF6205 bearing for testing, and uses an acceleration sensor to collect data from the motor drive end when the bearing is running in four states: normal, inner ring fault, rolling element fault, and outer ring fault, with a sampling frequency of 12kHz. Each bearing state in the data set has four operating conditions: operating condition 1 (0HP and 1797rpm), operating condition 2 (1HP and 1772rpm), operating condition 3 (2HP and 1750rpm), and operating condition 4 (3HP and 1730rpm), and each fault type has three different severity levels: 0.007 inches, 0.014 inches, and 0.021 inches.

[0094] The specific implementation case of the present invention performs diagnostic analysis on data of 10 different states of rolling bearings under the same working condition (1 normal state and 9 fault states), and uses a VGG16 model that has not been pre-trained and a VGG16 model that has been pre-trained and fine-tuned and improved to perform fault diagnosis tests. It should be pointed out that the last classification output layer in the original VGG16 model is 1000 types of output. In order to adapt to the fault diagnosis task, the number of output neurons in the last fully connected layer is set to 10 during the experiment. Taking the fault diagnosis task of working condition 1 as an example, the specific training parameters of the two models are set as follows: the training batch size is 32, the learning rate is 1e-5, the original model uses the SGD optimization algorithm, the migrated model uses the Adam optimization algorithm, and the cross entropy loss function is used to calculate the training loss. In addition, in order to avoid the contingency of the experiment, the experiment of each model is carried out 5 times, and the experimental results are averaged. The results of the experiment are shown in the following table. The data in Table 1 represent the fault diagnosis accuracy of the test set when the original model is trained to 10, 20, 30, 40 and 50 batches; the data in Table 2 represent the fault diagnosis accuracy of the test set when the migration model is trained to 2, 4, 6, 8 and 10 batches. The changes in the loss value and accuracy acc of the test set during the experiment are shown in Figure 6, where Figure 6a This shows the result of training the original model 50 times. Figure 6b The figure shows the result of 10 trainings of the migration model.

[0095] Table 1: Fault diagnosis accuracy of the original model

[0096] Training batches 10 20 30 40 50 Accuracy % 82.15 88.17 93.76 97.84 98.60

[0097] Table 2: Migration model fault diagnosis accuracy

[0098] Training batches 2 4 6 8 10 Accuracy % 96.67 99.03 99.14 99.35 99.46

[0099] It can be seen from the experimental results in the table that the fault diagnosis accuracy of the migration model proposed in the present invention is improved to a certain extent compared with the original model, reaching 99.46%, achieving excellent diagnostic effect. Figure 6b The loss of the transfer model is compared to Figure 6aThe smaller loss of the original model also verifies this point. On the one hand, both the original model and the migration model achieved a diagnostic accuracy of more than 95%, which shows that the use of the deep convolutional neural network VGG16 as a fault diagnosis model and the use of two-dimensional time-frequency graphs instead of one-dimensional vibration data as input in the present invention can effectively improve the accuracy of fault diagnosis. On the other hand, the improvement in the diagnostic accuracy of the migration model compared to the original model shows the effectiveness of the migration and improvement of the pre-trained model. In addition, comparing the diagnostic results of the original model and the migration model, the migration model achieved a diagnostic accuracy of more than 99% in the fourth batch, which greatly reduced the time for fault diagnosis compared to the original model. This shows that the improved model constructed based on transfer learning in the present invention does not rely on a large amount of labeled data, and the training efficiency has been greatly improved, which effectively reduces the time required for diagnostic model training, and has fewer parameters, which saves a lot of time and computing resources overall.

Claims

1. A rolling bearing fault diagnosis method based on continuous wavelet transform and deep migration convolutional neural network, characterized in that: The following steps are involved: Step 1, data processing: collect the original vibration data of various faults of rolling bearings under known working conditions and normalize them; perform overlapping sampling on the normalized data to obtain data samples of fixed length, create labels for each sample based on the fault type, and divide the labeled samples into training sample sets and test sample sets; Step 2, data set preparation: Perform continuous wavelet transform on the training samples and test samples obtained in step 1 to obtain the time-frequency diagram of each sample; convert the time-frequency diagram of each sample into a three-channel RGB format to adapt to the training of the deep convolutional neural network constructed subsequently, and form a rolling bearing fault diagnosis data set in the form of a time-frequency diagram, which includes a training set and a test set; Step 3: Model pre-training: Build a deep convolutional neural network VGG16 model based on Python and PyTorch deep learning framework, use the public dataset ImageNet to train the constructed VGG16 model, obtain the trained VGG16 pre-trained model, and save the parameters of the VGG16 pre-trained model; Step 4, pre-trained model migration: Freeze the parameters of the convolutional layer and pooling layer of the VGG16 pre-trained model obtained in step 3, fine-tune the parameters of the classifier part in the VGG16 pre-trained model to match the rolling bearing fault diagnosis dataset in the form of time-frequency graph produced in step 2, and improve the activation function and optimization algorithm of the VGG16 pre-trained model to obtain the final fault diagnosis model, and input the rolling bearing fault diagnosis data in the form of time-frequency graph to obtain the fault diagnosis results.

2. A rolling bearing fault diagnosis method based on continuous wavelet transform and deep migration convolutional neural network according to claim 1, characterized in that: The data processing stage of step 1 includes: Step 1.1: Perform maximum and minimum normalization processing on the original vibration signal of the rolling bearing collected in step 1. The conversion function is: In the formula, x is the original one-dimensional vibration signal, x norm is the normalized one-dimensional vibration signal, x min is the minimum value of the one-dimensional vibration signal, x max is the maximum value of the one-dimensional vibration signal; Step 1.2, perform overlapping sampling on the normalized one-dimensional vibration data obtained in step 1.1 to increase the number of training samples, set the sample length to 512, and the overlap rate to 0.5 to sample and obtain each data sample; then, make a sample label based on the state of the rolling bearing to which each data sample belongs, and the rolling bearing data used contains three fault states and one normal state, where each fault state is further divided into three fault degrees, including ten states; therefore, make the sample label Label = [0,1,2,...,9], where 0 represents the normal state, and 1 to 9 represent the three fault degrees under the three fault states of the rolling bearing respectively; finally, randomly shuffle the obtained label samples and divide them into a training sample set and a test sample set in a ratio of 7:

3.

3. The rolling bearing fault diagnosis method based on continuous wavelet transform and deep migration convolutional neural network according to claim 1 is characterized in that: The data set preparation stage of step 2 includes: Step 2.1: Perform continuous wavelet transform on each sample in the training sample set and the test sample set obtained in step 1. The formula of continuous wavelet transform is as follows: Where W f (a, τ) is the output result of wavelet transform, which is two-dimensional data; f(t) is the input signal, is the wavelet basis function The complex conjugate function of , a is the scale factor, and τ is the translation factor; the complex Morlet wavelet cmor suitable for processing vibration signals is selected as the wavelet basis function, the scale length is set to 128, the center frequency is set to 100, and the bandwidth is set to 1, and each data sample is subjected to continuous wavelet transform; the result obtained after continuous wavelet transform contains amplitude information amp and frequency information f, and the time axis t is generated according to the set sampling frequency and sample length, and the time-frequency diagram corresponding to each sample is drawn based on amp, f and t; Step 2.2: Save the time-frequency graph obtained in step 2.1 in PNG format. The image in this format is 4-channel RGBA. Convert each time-frequency graph into a 224×224×3 RGB format image to meet the training requirements of the deep convolutional neural network VGG16 model constructed subsequently, where 224×224 represents the pixel size of the time-frequency graph, and 3 represents the number of channels of the time-frequency graph. Then, a rolling bearing fault diagnosis dataset in the form of a time-frequency graph is formed based on the RGB format image, which includes a training set and a test set.

4. The rolling bearing fault diagnosis method based on continuous wavelet transform and deep migration convolutional neural network according to claim 1 is characterized in that: The process of model pre-training in step 3 includes: A deep convolutional neural network VGG16 model is built based on Python and PyTorch platforms, including convolutional layers, pooling layers and fully connected layers. The specific network structure includes 13 convolutional layers, 5 pooling layers and 3 fully connected layers. The pooling layers all use the maximum pooling method. The first two fully connected layers are followed by a Dropout layer to prevent overfitting. The last fully connected layer uses the Softmax function activation to output the probability of each category. The convolution layer performs convolution operations on the input feature map to extract the input features. The superposition of multiple convolution layers can extract higher-level feature representations. The operation formula of the convolution layer is as follows: Y(i,j)=(I*K)(i,j)=∑ m ∑ n I(i-m,j-n)×K(m,n) (3) Where Y(i,j) is the value of the convolution layer output feature map at position (i,j), I is the convolution layer input feature map, K is the convolution kernel, * represents the convolution operation, I(im,jn) is the value of the convolution layer input feature map at position (im,jn), K(m,n) is the weight of the convolution kernel at position (m,n), m and n represent the index of the convolution kernel sliding on the convolution layer input feature map; the number of channels of input data in the VGG16 model is 3, and the number of output channels of the 13 convolution layers is 64, 64, 128, 128, 256, 256, 256, 512, 512, 512, 512, 512, 512, 512, respectively. The convolution kernel size of each convolution layer is 3×3, and the step size is 1; The five pooling layers in the VGG16 model all use the maximum pooling method, which selects the maximum value from a local area of ​​the input feature map as the output, which is used to reduce the spatial dimension of the feature map, reduce the number of parameters and computational complexity; the calculation formula of the maximum pooling method is as follows: P max (i,j)=max m,n Y(i-m,j-n) (4) Where P max (i, j) is the value of the maximum pooling layer output feature map at position (i, j), Y(im, jn) is the value of the maximum pooling layer input feature map at position (im, jn), m and n represent the index of the pooling window sliding on the maximum pooling layer input feature map; the 5 maximum pooling layers in the VGG16 model are connected after the 2nd, 4th, 7th, 10th, and 13th convolutional layers respectively, and the size of the pooling window is 2×2 with a step size of 2; The fully connected layer is a multilayer perceptron in which all neurons between layers are connected. It is located at the end of the model and is used to integrate the features extracted by the convolutional layer and the pooling layer and output the final prediction result. The specific calculation formula of the fully connected layer is as follows: y=f(Wx+b) (5) In the formula, y is the output vector of the fully connected layer, x is the input vector of the fully connected layer, W is the weight matrix with a dimension of K×N, where K is the number of neurons in the fully connected layer, N is the dimension of the input vector, and b represents the bias vector with a dimension of K×1; the VGG16 model contains three fully connected layers, and the last fully connected layer is used as the output layer to activate the output probability of each category using the Softmax function; the number of input neurons in the first fully connected layer is the flattened output features of the convolutional layer and the pooling layer, and the number of input neurons in the subsequent fully connected layer is the number of output neurons in the previous fully connected layer. The number of output neurons in the three fully connected layers is 4096, 4096, and 1000 respectively; After building the VGG16 model, use the public dataset ImageNet to train the model to obtain the VGG16 pre-trained model, save the parameters of the VGG16 pre-trained model, and prepare for subsequent model migration.

5. The rolling bearing fault diagnosis method based on continuous wavelet transform and deep migration convolutional neural network according to claim 1 is characterized in that: The process of migrating the pre-trained model in step 4 includes: For the VGG16 pre-trained model obtained in step 3, freeze the parameters of the convolutional layer and pooling layer used for feature extraction, and adjust the fully connected layer used for classification; first, remove all three fully connected layers in the original structure of VGG16, and then design a new global average pooling layer to replace the original fully connected layer. Compared with the fully connected layer, the global average pooling layer can effectively reduce the model parameters to reduce the complexity of the model. The classification output layer is changed from the original 1000 to 10, which meets the requirements of 10 classifications of the rolling bearing fault diagnosis data set in the form of a time-frequency diagram produced in step 2; then, further improve the activation function and optimization algorithm of the VGG16 pre-trained model; the multi-layer convolutional layers in the VGG16 pre-trained model all use the ReLU activation function, and its function expression is as follows: f(x)=max(0,x) (6) Where x is the input value and f(x) is the output value. When the input x is less than 0, the function value and gradient of the ReLU function are both 0, which leads to neuron death, and then to problems such as information loss and training instability. Here, the Leaky ReLU activation function is used to replace the original ReLU activation function to avoid the problem of neuron death. The formula is as follows: In the formula, x is the input value, f(x) is the output value; a is the set parameter, which is set to 0.01; the VGG16 pre-trained model uses the SGD optimization algorithm for parameter optimization, which is replaced by the Adam optimization algorithm to improve the convergence speed of the model; after the above steps, the final fault diagnosis model is obtained, and the fault diagnosis data in the form of rolling bearing time-frequency diagram is used as input to obtain the fault diagnosis results, thereby realizing the fault diagnosis of rolling bearings.

6. A rolling bearing fault diagnosis device based on continuous wavelet transform and deep migration convolutional neural network, characterized in that: include: The data processing module is used to collect the original vibration data of various faults of rolling bearings under known working conditions and perform normalization processing on them; Overlap sampling is performed on the normalized data to obtain data samples of fixed length, labels are created for each sample based on the fault type, and the labeled samples are divided into a training sample set and a test sample set; The data set preparation module is used to perform continuous wavelet transform on the training samples and test samples obtained in step 1 to obtain the time-frequency diagram of each sample; the time-frequency diagram of each sample is converted into a three-channel RGB format to adapt to the training of the deep convolutional neural network constructed subsequently, and a rolling bearing fault diagnosis data set in the form of a time-frequency diagram is formed, which includes a training set and a test set; The model pre-training module is used to build a deep convolutional neural network VGG16 model based on Python and PyTorch deep learning framework, use the public dataset ImageNet to train the constructed VGG16 model, obtain the trained VGG16 pre-trained model, and save the parameters of the VGG16 pre-trained model; The pre-trained model migration module is used to freeze the parameters of the convolutional layer and pooling layer of the VGG16 pre-trained model obtained in step 3, fine-tune the parameters of the classifier part in the VGG16 pre-trained model to match the rolling bearing fault diagnosis dataset in the form of a time-frequency graph produced in step 2, and improve the activation function and optimization algorithm of the VGG16 pre-trained model to obtain the final fault diagnosis model, and input the rolling bearing fault diagnosis data in the form of a time-frequency graph to obtain the fault diagnosis result.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, it implements the rolling bearing fault diagnosis method based on continuous wavelet transform and deep migration convolutional neural network as described in any one of claims 1 to 5.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the rolling bearing fault diagnosis method based on continuous wavelet transform and deep migration convolutional neural network as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • CNN feature fusion-based small sample transfer learning fault diagnosis method and system, computer and storage medium

    CN116702076A

  • Communication network fault diagnosis method and system based on deep transfer learning

    CN117789000A

Cited By

  • Train rolling bearing state identification method and system

    CN120296701A

  • Vibration acoustics-based low-noise rolling bearing fault diagnosis method and system

    CN120578942A

  • Online fault diagnosis method for RV speed reducer

    CN121167285A

  • An online fault diagnosis method for RV reducer

    CN121167285B

  • Fault diagnosis sample generation method based on physical constraint adaptive migration network, application and equipment

    CN121327484A