Rotating machine fault diagnosis method based on multi-scale dynamic weight hybrid CNN (Convolutional Neural Network)
By adopting the multi-scale dynamic weight hybrid CNN method in rotary mechanical fault diagnosis, the multi-scale dynamic characteristics of the signal are extracted and integrated by combining one-dimensional and two-dimensional convolutional neural networks, the problem of low diagnostic accuracy in the existing technology is solved, and higher fault diagnosis accuracy and data adaptability are achieved.
Patent Information
- Application Number
- CN202411920512.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-22
AI Technical Summary
Existing mechanical fault diagnosis methods are difficult to adaptively acquire multi-scale dynamic characteristics of signals and dynamically adjust the weights of each scale, resulting in low diagnostic accuracy.
The rotating mechanical fault diagnosis method based on multi-scale dynamic weight hybrid CNN is adopted. The multi-scale dynamic weighted feature vector of the signal is extracted through a one-dimensional convolutional neural network and constructed into a two-dimensional matrix as the input of the two-dimensional convolutional neural network, and the feature weights of each scale are dynamically adaptively adjusted.
It effectively improves the accuracy of rotary machinery fault diagnosis, achieving better diagnostic performance and data adaptability.
Smart Images

Figure CN119862460A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent fault diagnosis of rotating machinery, and in particular to a rotating machinery fault diagnosis method based on a multi-scale dynamic weighted hybrid CNN. Background Art
[0002] Rotating machinery is an important part of modern industrial systems. Once a fault occurs, it will cause equipment shutdown, huge economic losses, and even threaten people's lives. Intelligent fault diagnosis of rotating machinery has always been a hot topic among scholars. Mechanical vibration signals can well reflect the health status of the machinery, and a large number of research results have been achieved by using mechanical vibration signals for fault diagnosis. In the era of big data, deep learning is widely used in the fields of natural image processing, speech recognition, and mechanical fault diagnosis due to its efficient learning of complex structures and large sample high-dimensional data. Especially in the field of mechanical fault diagnosis, CNN can effectively filter out a large amount of noise and redundant information contained in the vibration signal, effectively extract weak fault features, and improve diagnostic accuracy.
[0003] Early CNN (deep convolutional neural network) is a two-dimensional network. For vibration signals, the conversion methods based on time domain, frequency domain, and time-frequency domain are often used to convert one-dimensional signals into two-dimensional mapping. However, the single time domain and frequency domain conversion cannot describe the correlation between the time domain and frequency domain of the signal. Although time-frequency domain conversion methods such as short-time Fourier transform (STFT) and wavelet transform (WT) have achieved good diagnostic results, the diagnostic results are overly dependent on the pre-processing of the signal, and the manual selection of features cannot be separated from the expert's prior knowledge.
[0004] One-dimensional CNN does not need to use signal processing technology to directly extract features from vibration signals and achieve end-to-end fault diagnosis. However, for vibration signals, mechanical rotation and reciprocating frequency will complicate the signal and show multi-scale characteristics. The features extracted by a single-scale convolution kernel are prone to information loss. At the same time, when the signal features extracted by multiple-scale convolution kernels are fused, 1D-CNN does not have the advantage of 2D-CNN in directly fusing multi-scale adjacent features. In addition, when multiple-scale convolution kernels learn signal features, the weights of multiple-scale features are different, that is, different scale features contribute differently to fault diagnosis.
[0005] Among Chinese patents, there is an invention patent with application number CN201910932922.9 and name of a method for fault diagnosis of rotating machinery based on multi-attention convolutional neural network. First, the acceleration vibration signals of rotating machinery with no faults and different faults under different operating conditions are collected, and the fault state label is set according to the fault state corresponding to each acceleration vibration signal. Each acceleration vibration signal is standardized and used as a training sample to train the multi-attention convolutional neural network model. The multi-attention convolutional neural network model includes 6 convolutional layers, 5 joint attention modules, and a global average pooling layer and a Softmax layer. Then, the current acceleration vibration signal of the rotating machinery is collected and sent to the multi-attention convolutional neural network model for fault diagnosis. The above invention introduces an attention module in the convolutional neural network to enhance the network's learning of discriminative features and fault impact signal segments, suppress irrelevant noise, and improve fault diagnosis performance.
[0006] In addition, there is a Chinese patent application numbered CN202211100667.X, entitled A method for diagnosing faults in rotating machinery based on a one-dimensional attention mechanism and a convolutional neural network, which includes collecting the original waveform data during the operation of the rotating machinery to obtain the original vibration data; expanding the data set of the original data; and establishing a new one-dimensional convolutional neural network model including a one-dimensional channel and a time attention mechanism. In the network model of the above invention, single-channel data can be formed into a multi-channel feature map through a one-dimensional convolution, and then the weights of each channel are reasonably changed, so that the one-dimensional channel attention mechanism can adaptively improve the sensitivity of the network to different channels, thereby optimizing network performance; and the mixed use of the channel attention mechanism and the time attention mechanism can greatly improve the diagnostic accuracy and training speed.
[0007] The above two patents do not involve the adaptive acquisition of multi-scale dynamic features of signals, the dynamic adaptive adjustment of the weights of each scale feature, the deep learning structure design, and the model parameter optimization selection method, which results in low fault diagnosis accuracy. Summary of the invention
[0008] In view of the technical problem that the existing mechanical fault diagnosis methods cannot adaptively acquire the multi-scale dynamic features of signals and dynamically and adaptively adjust the weights of each scale feature, resulting in low diagnostic accuracy, the present invention proposes a rotating machinery fault diagnosis method based on a multi-scale dynamic weighted hybrid CNN, which makes full use of 1D-CNN and 2D-CNN to extract the dynamic multi-scale features of vibration signals, and dynamically and adaptively adjusts the weights of each scale feature, so that the faults of rotating machinery can be effectively diagnosed with high diagnostic accuracy.
[0009] In order to achieve the above object, the technical solution of the present invention is implemented as follows: a rotating machinery fault diagnosis method based on a multi-scale dynamic weighted hybrid CNN, the steps of which are as follows:
[0010] Step 1. Collect vibration signals of the diagnostic object in various states according to a preset sampling frequency;
[0011] Step 2. Standardize the collected vibration signals to construct a data set, and divide the data set into a training set, a validation set, and a test set according to a set ratio;
[0012] Step 3. Construct a one-dimensional convolutional neural network and a 2D CNN, set a 1D-2D conversion layer between the one-dimensional convolutional neural network and the 2D CNN, and build an MDW-MCNN model;
[0013] Step 4. Use the samples in the training set to train the MDW-MCNN model and save the optimal parameters as the fault diagnosis model; use the vibration signal of the validation set to verify the fault diagnosis model. If the diagnostic accuracy does not meet the requirements, return to step 2, otherwise the final fault diagnosis model is obtained;
[0014] Step 5. Input the vibration signal of the test set into the verified final fault diagnosis model to obtain the fault diagnosis result.
[0015] Preferably, the 1D-2D conversion layer superimposes n 1D multi-scale dynamic weighted feature vectors generated by the one-dimensional convolutional neural network to generate an n×n two-dimensional matrix, and uses the two-dimensional matrix as the input of the 2D CNN. The 2D CNN extracts the maximum value of adjacent local features and inputs a 1×M vector, where M represents the number of state types.
[0016] Preferably, the one-dimensional convolutional neural network comprises a multi-scale feature extraction module, a dynamic weighting module and a concatenate layer connected in sequence, the multi-scale feature extraction module is composed of 4 groups of parallel single-scale feature extraction units, each group of single-scale feature extraction units comprises a 1D convolution layer I, a 1D activation layer I, a 1D pooling layer I, a 1D convolution layer II, a 1D BN layer, a 1D activation layer II, and a 1D pooling layer II connected in sequence, the dynamic weighting module comprises a dynamic weighting layer, a dynamic weighting layer is connected after each group of 1D pooling layer II, and the dynamic weighting layer is connected to the concatenate layer.
[0017] Preferably, the single-scale feature extraction unit generates a single-scale feature vector, the dynamic weighting layer generates a custom parameter, i.e., a dynamic weight, and the dynamic weight is multiplied with each single-scale feature vector for dynamic weighting to obtain 4 groups of single-scale dynamic weighted feature vectors with a length of n and a number of m. The Concatenate layer connects the 4 groups of single-scale dynamic weighted feature vectors in parallel to obtain a 1D multi-scale dynamic weighted feature vector with a length of n and a number of 4m, i.e., a number of n.
[0018] Preferably, the convolution kernel sizes of the 1D convolution layers I-II of the four groups of single-scale feature extraction units are 3×1, 5×1, 7×1, and 9×1, respectively, to extract features of vibration signals at different scales, where m is the number of convolution kernels in each group, and During the network training process, the weight value of each dynamic weight is adaptively updated with the loss function, and the weight value is continuously adjusted, that is, the weights of convolution kernels of different scales and different convolution kernels of the same scale in feature extraction are adaptively adjusted.
[0019] Preferably, the 2D CNN includes a 2D convolution layer I, a 2D activation layer I, a 2D pooling layer I, a 2D convolution layer II, a 2D activation layer II, a 2D pooling layer II, a Flatten layer, a fully connected layer I and a fully connected layer II, which are connected in sequence.
[0020] Preferably, the 1D convolution layer I-II performs local convolution calculation on the input signal to extract high-dimensional signal features, and the 1D activation layer I-II uses the ReLU linear rectification function to screen effective features; the 1D pooling layer I-II reduces the data dimension while retaining the characteristics of the original data, outputs the local maximum value, and extracts prominent features; the 1D BN layer performs mean and variance normalization on the data through batch normalization;
[0021] The 2D convolution layers I-II perform direct feature fusion on the 1D multi-scale dynamic weighted feature vector. The 2D activation layers I-II use the ReLU linear rectification function to screen effective features. The 2D pooling layers I-II use maximum pooling to extract the maximum value of adjacent local features. The activation function of the fully connected layer I is ReLU, and the activation function of the fully connected layer II is softmax. The fully connected layers I-II perform dimensionality reduction.
[0022] Preferably, the method for training the MDW-MCNN model is: selecting cross entropy as the loss function, training the network in the MDW-MCNN model, using the gradient descent method for weight update, and using the error back propagation method to calculate the gradient of each layer according to the error chain propagation law, combined with the learning rate, so that the network can update parameters in time during the iteration process; when the model training termination conditions are met, stop training and save the trained model to obtain a fault diagnosis model.
[0023] Preferably, for an input signal x=(x1, x2, …, x N ), x1,x2,…,x N is an acceleration numerical sequence containing N data, which is output as a dynamic weighted feature vector after multi-scale feature extraction by the multi-scale feature extraction module and dynamic weighting by the dynamic weighting module:
[0024]
[0025] Among them, U represents a single-scale feature vector, represents the feature weighting operation, Y represents the output feature after feature weighting, X ij represents the result of the i-th convolution kernel and the j-th maximum pooling operation, W represents the dynamic weight matrix, and W i Represents the weight multiplied by the i-th convolution kernel; the value range of i is 1-m, the value range of j is 1-n, m is the number of convolution kernels, and j is the number of maximum pooling operations;
[0026] The dynamic weighted feature vector Y is output as a 4m×n or n×n multi-scale dynamic weighted two-dimensional matrix after the Concatenate layer and the 1D-2D conversion layer:
[0027]
[0028] Among them, Y ij 、M ij 、N ij , Q ij Corresponding to the single-scale dynamic weighted feature vector values extracted by 3×1, 5×1, 7×1, and 9×1 convolution kernels, Y ij is the eigenvalue of the i-th row and j-th column of the dynamic weighted eigenvector Y and Y ij =W i X ij , represents a 1D-2D superposition operation, and K represents the constructed two-dimensional matrix.
[0029] Preferably, the weight updating method is: using the gradient descent method, using the error back propagation method to calculate the gradient of each layer, combined with the learning rate, so that the network can update the parameters in time during the iteration process;
[0030] In the dynamic weighting part, the weight W i The gradient of is:
[0031]
[0032] Among them, L is the error loss function, Y i It is the i-th row feature output after weighting;
[0033] The weights are updated as:
[0034]
[0035] Among them, P represents the number of parameter updates, W i p is the weight of the i-th row at the p-th update, and η represents the learning rate;
[0036] In the 1D-2D connection part, i.e. the 1D-2D conversion layer, the error transmitted from the 2D convolution layer for:
[0037]
[0038] in, They are the single-scale dynamic weighted eigenvector values Y ij 、M ij 、N ij , Q ij The gradient of
[0039] The weights of the parameters θ corresponding to the two-dimensional matrix K are updated as follows: Where p represents the number of parameter updates, θ p Represents the parameter value of the two-dimensional matrix K at the pth iteration.
[0040] Compared with the prior art, the invention has the following beneficial effects: more specifically, for vibration signals collected in different states, a one-dimensional convolutional neural network is used to obtain multi-scale dynamic weighted feature vectors of the signal, these dynamic weighted feature vectors are constructed into a two-dimensional matrix, and then the two-dimensional matrix is used as the input of the two-dimensional convolutional neural network, and the advantage of 2D-CNN in local adjacent feature fusion is used to directly fuse the multi-scale dynamic weighted feature vectors, effectively improving the fault diagnosis accuracy; taking the cross entropy error function as the loss function, and using the error back propagation algorithm to optimize the parameters of the multi-scale dynamic weighted hybrid convolutional network model, the final fault diagnosis model is obtained, so that the invention can obtain better diagnostic performance and good data adaptability, and can be used for the diagnosis of various rotating machinery faults. The invention makes full use of the one-dimensional convolutional neural network to construct a two-dimensional expression of the multi-scale dynamic weighting of the original vibration signal, and the powerful feature learning ability of the two-dimensional convolutional neural network, unifies the one-dimensional and two-dimensional convolutional neural networks into an overall network framework, gives full play to the advantage of 2D-CNN in local adjacent feature fusion, and develops a multi-scale dynamic weighted hybrid convolutional neural network model for rotating machinery fault diagnosis, and obtains better diagnostic performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 It is a flow chart of the present invention.
[0043] Figure 2 Schematic diagram of multi-scale feature extraction of the present invention.
[0044] Figure 3 It is a schematic diagram of the dynamic weighting of the present invention.
[0045] Figure 4 Schematic diagram of 1D-2D conversion of the present invention.
[0046] Figure 5 This is a fault diagnosis result diagram of 10 training tests of the gear data of the present invention. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] like Figure 1 As shown in FIG. 1 , a rotating machinery fault diagnosis method based on a multi-scale dynamic weighted hybrid CNN is shown in FIG. 1 , and the steps are as follows:
[0049] Step 1. Complete the collection of vibration signals of the diagnosis object in various states according to the preset sampling frequency.
[0050] Step 2. Data preprocessing: Using The vibration signal collected in step 1 is standardized and divided into training set, validation set and test set according to the set ratio. The model is trained with the data of the training set. At the end of each iteration of the network, the model is verified with the data of the validation set. After the model training is completed, the saved optimal model is tested with the test set to test the model diagnostic accuracy.
[0051] Step 3. Construct the MDW-MCNN model: The MDW-MCNN model consists of a 1D convolutional layer, a 1D activation layer, a 1D BN layer, a 1D pooling layer, a dynamic weighting layer, a Concatenate layer, a 1D-2D conversion layer, a 2D convolutional layer, a 2D activation layer, a 2D pooling layer and a fully connected layer. First, a one-dimensional convolutional neural network is constructed. The one-dimensional convolutional neural network contains a multi-scale feature extraction module, a dynamic weighting module and a Concatenate layer. The multi-scale feature extraction module is composed of 4 groups of parallel single-scale feature extraction units, and each group of single-scale feature extraction units is composed of 1D convolution layer I, 1D activation layer I, 1D pooling layer I, 1D convolution layer II, 1D BN layer I, 1D activation layer II, and 1D pooling layer II connected in sequence. The 1D convolution layer performs local convolution calculation on the input signal to extract high-dimensional signal features. The 1D activation layer uses the ReLU linear rectification function to screen effective features; the 1D pooling layer reduces the data dimension while retaining the characteristics of the original data, outputs the local maximum value, and extracts prominent features. The 1D BN layer normalizes the data by batch normalization to normalize the mean and variance to prevent the gradient from disappearing or exploding due to changes in the data distribution in the intermediate layer during training.
[0052] For each group of single-scale feature extraction units, set the appropriate convolution kernel size, number, step size and pooling step size, so that the original signal is input into each group of single-scale feature extraction units to generate a convolution kernel with a length of n and a number of m (m is the number of convolution kernels in each group, and ). Without loss of generality, the convolution kernel sizes of the 1D convolution layer of the single-scale feature extraction unit are 3×1, 5×1, 7×1, and 9×1, respectively, to extract features of different scales for the input signal. The dynamic weighting module includes a dynamic weighting layer, which is connected after each group of 1D pooling layer II. During network training, the dynamic weighting layer generates custom parameters, namely dynamic weights, with a number of m, which are multiplied with each single-scale feature vector for dynamic weighting. During network training, each weight value is adaptively updated with the loss function, and the weight value is continuously adjusted, that is, the weights of convolution kernels of different scales (lengths) and different convolution kernels at the same scale in feature extraction are adaptively adjusted, so as to obtain 4 groups of single-scale dynamic weighted feature vectors with a length of n and a number of m. The Concatenate layer connects 4 groups of single-scale dynamic weighted feature vectors in parallel to obtain a 1D multi-scale dynamic weighted feature vector with a length of n and a number of 4m, i.e., a number of n. The 1D-2D conversion layer set at the hybrid connection of 1D CNN and 2D CNN is used to superimpose n 1D multi-scale dynamic weighted feature vectors to generate an n×n two-dimensional matrix, which is used as the input of 2D CNN (two-dimensional convolutional neural network). 2D CNN consists of 2D convolution layer I, 2D activation layer I, 2D pooling layer I, 2D convolution layer II, 2D activation layer II, 2D pooling layer II, Flatten layer, dense layer I, dense layer II (dense layer I and dense layer II are fully connected layers, the activation function of dense layer I is ReLU, and the activation function of dense layer II is softmax) connected in sequence. The 2D convolution layer directly fuses the 1D multi-scale dynamic weighted feature vector. The 2D activation layer uses the ReLU linear rectification function to screen effective features. The pooling layer of 2D-CNN uses the maximum pooling to extract the maximum value of adjacent local features. The fully connected layer performs dimensionality reduction so that the final output is a 1×M vector, where M represents the number of state types. The connection weights and bias parameters of each layer of the network are initialized, and the initial learning rate is set to 0.0001.
[0053] The data of the original vibration signal is first passed through a one-dimensional convolutional neural network to obtain multiple 1D multi-scale dynamic weighted feature vectors. These 1D multi-scale dynamic weighted feature vectors are superimposed to construct a two-dimensional matrix and used as the input of the two-dimensional convolutional layer of the 2D CNN. The 2D convolutional layer is followed by a 2D activation layer, a 2D pooling layer, and a 2D convolutional layer. After the 2D pooling layer II, the Flatten layer, dense layer I, and dense layer II are connected in sequence to output a 1×M vector, where M represents the number of state types.
[0054] Step 4. Select cross entropy as the loss function, input the training set into the built MDW-MCNN model, train the network model, and use the gradient descent method to update the weights. According to the error chain propagation law, the error back propagation method is used to calculate the gradient of each layer. Combined with the learning rate, the network can update parameters in time during the iteration process. At the end of each training iteration of the network, the validation set data is used to evaluate the model and adjust the network hyperparameters. When the model training termination conditions are met, stop training, obtain the optimal rotating machinery fault diagnosis model, and save the trained model. Use the test set data to test the trained model to verify the performance of the MDW-MCNN model fault diagnosis.
[0055] The steps for training the MDW-MCNN model using the training set are:
[0056] a. Forward calculation: For the input x of the MDW-MCNN model, x = (x1, x2, ..., x N ), x1,x2,…,x N is an acceleration numerical sequence, which first undergoes multi-scale feature extraction and dynamic weighting, and the output is a dynamic weighted feature vector:
[0057]
[0058] Among them, U represents a single-scale feature vector, represents the feature weighting operation, Y represents the output feature after feature weighting, X ij represents the result of the i-th convolution kernel and the j-th maximum pooling operation, W represents the dynamic weight matrix, and W i Represents the weight multiplied by the i-th convolution kernel. The value range of i is 1-m, the value range of j is 1-n, m is the number of convolution kernels, and j is the number of maximum pooling operations.
[0059] The dynamic weighted feature vector Y passes through the Concatenate layer and the 1D-2D conversion layer, and the output is a 4m×n or n×n multi-scale dynamic weighted two-dimensional matrix:
[0060]
[0061] Among them, Y ij 、M ij 、N ij , Q ij Corresponding to the single-scale dynamic weighted feature vector values extracted by 3×1, 5×1, 7×1, and 9×1 convolution kernels, Y ij is the eigenvalue of the i-th row and j-th column of the dynamic weighted eigenvector Y, that is, Y ij =W i X ij , represents a 1D-2D superposition operation, and K represents the constructed two-dimensional matrix.
[0062] The values produced by the forward calculation process are updated during the parameter backward update process.
[0063] b. Weight update. During the network training process of the MDW-MCNN model, the weight update adopts the gradient descent method. According to the chain propagation law of the error, the error L back propagation method is used to calculate the gradient of each layer. In the dynamic weighting part, the weight W i The gradient is calculated as:
[0064]
[0065] Among them, L is the error loss function, Y i It is the i-th row feature output after weighting.
[0066] The weights are updated as:
[0067]
[0068] Among them, P represents the number of parameter updates, W i p is the weight of the i-th row at the p-th update, and η represents the learning rate.
[0069] In the 1D-2D connection part, i.e. the 1D-2D conversion layer, the error transmitted from the 2D convolution layer for:
[0070]
[0071] in, They are the single-scale dynamic weighted eigenvector values Y ij 、M ij 、N ij , Q ij gradient.
[0072] The weights of the parameters θ corresponding to the two-dimensional matrix K are updated as follows: Among them, p represents the number of parameter updates, η represents the learning rate, and θ p Represents the parameter value of the two-dimensional matrix K at the pth iteration.
[0073] The present invention derives the mechanism of propagation of model training errors from a two-dimensional convolutional neural network to a one-dimensional convolutional neural network, realizes the seamless connection between the two-dimensional convolutional neural network and the one-dimensional convolutional neural network, adopts the error back propagation method to calculate the gradient of each layer, and combines the learning rate to enable the network to update parameters in a timely manner during the iteration process.
[0074] Step 5. Input the validation set into the trained fault diagnosis model for verification; use the validation set samples to verify the deep multi-scale dynamic weighted hybrid convolutional neural network model obtained in step 4; if the diagnostic accuracy does not meet the requirements, re-execute the above steps 2-4 until the diagnostic accuracy meets the requirements and complete the training to obtain the final model parameters. Finally, input the test set into the verified fault diagnosis model to obtain the diagnostic accuracy test results.
[0075] The model's own multi-scale feature extraction capabilities and dynamic adaptive adjustment of the weights of each scale feature can adapt to other vibration signals.
[0076] Specific examples:
[0077] A rotating machinery fault diagnosis method based on multi-scale dynamic weighted hybrid CNN, the fault diagnosis process is as follows Figure 1 shown.
[0078] The experimental data of the present invention adopts the gearbox gear fault data set collected by the QPZZ-II rotating machinery vibration analysis and fault diagnosis test platform, which is mainly composed of a drive motor, a shaft system assembly, a gearbox, a brake, a base and an electric cabinet. The gear damage fault is made using an electric spark wire cutting process, including pitting faults (pitting) and crack faults (crack). According to the number of points, the pitting faults are divided into a-single tooth pitting (diameter 0.4mm*depth 1mm-3 points), b-single tooth pitting (diameter 0.4mm*depth 1mm-6 points), c-single tooth pitting (diameter 0.4mm*depth 1mm-9 points), d-double tooth pitting (diameter 0.4mm*depth 1mm-3 points) and e-double tooth pitting (diameter 0.4mm*depth 1mm-6 points). According to the crack depth and the number of cracks, they are divided into f-single tooth crack (width 0.2mm*depth 0.5mm), g-single tooth crack (width 0.2mm*depth 2mm), h-double tooth crack (width 0.2mm*depth 0.5mm) and m-double tooth crack (width 0.2mm*depth 1mm), and a total of 10 types of gear health conditions are combined with normal gear data. This experiment uses the collected data with a motor speed of 1500r / min, a sampling time of 10s, and a sampling frequency of 12.8kHz as the experimental data. 800 data samples are made for each condition, a total of 8000 samples, and each sample contains 2048 data points. Use the following steps for processing:
[0079] Step 1: Collect 8000 data samples according to The data is standardized and divided into training set, validation set and test set in the ratio of (7:1:2).
[0080] Step 2: Construct the MDW-MCNN model. The MDW-MCNN model consists of a 1D convolution layer, a 1D activation layer, a 1D BN layer, a 1D pooling layer, a dynamic weighting layer, a Concatenate layer, a 1D-2D conversion layer, a 2D convolution layer, a 2D activation layer, a 2D pooling layer and a fully connected layer. The structural parameters of the MDW-MCNN model are: The network structure has 43 layers in total. The signal first passes through 4 groups of parallel single-scale feature extraction units (each group of single-scale feature extraction units successively experiences 1D convolution layer I, 1D activation layer I, 1D pooling layer I, 1D convolution layer II, 1D BN layer I, 1D activation layer II, and 1D pooling layer II), as shown in Figure 2. Figure 2 As shown, each group of single-scale feature extraction units is connected to a dynamic weighting layer to obtain a single-scale dynamic weighted feature vector, such as Figure 3 As shown. Through the Concatenate layer, four groups of single-scale dynamic weighted feature vectors are connected in parallel to obtain a 1D multi-scale dynamic weighted feature vector. Then, the 1D-2D conversion layer is connected to superimpose the 1D multi-scale dynamic weighted feature vectors to form a two-dimensional matrix, and the 2D convolution layer I, 2D activation layer I, 2D pooling layer I, 2D convolution layer II, 2D activation layer II, 2D pooling layer II, Flatten layer, dense layer I, dense layer II (dense layer I and dense layer II are fully connected layers, the activation function of dense layer I is ReLU, and the activation function of dense layer II is softmax), and the classifier function uses softmax. Use a one-dimensional convolutional neural network to obtain multiple 1D multi-scale dynamic weighted feature vectors, and superimpose these 1D multi-scale dynamic weighted feature vectors to construct a two-dimensional matrix. The specific process is as follows:
[0081] For the input x of the MDW-MCNN network, x = (x1, x2, ..., x N ), x1,x2,…,x N is an acceleration numerical sequence, which first undergoes multi-scale feature extraction and dynamic weighting, and the output is a dynamic weighted feature vector:
[0082]
[0083] Among them, U represents a single-scale feature vector, represents the feature weighting operation, Y represents the output feature after feature weighting, X ij represents the result of the jth maximum pooling operation of the i-th convolution kernel, W represents the dynamic weight matrix, and W i Represents the weight corresponding to the i-th convolution kernel. The value range of i is 1-m, and the value range of j is 1-n.
[0084] The dynamic weighted feature vector Y passes through the Concatenate layer and the 1D-2D conversion layer, and its output is a 4m×n or n×n multi-scale dynamic weighted two-dimensional matrix:
[0085]
[0086] Among them, Y ij 、M ij 、N ij , Q ij Corresponding to the single-scale dynamic weighted feature vector values extracted by 3×1, 5×1, 7×1, and 9×1 convolution kernels, Y ij is the eigenvalue of the i-th row and j-th column of the dynamic weighted eigenvector Y, that is, Y ij =W i X ij , represents a 1D-2D superposition operation, and K represents the constructed two-dimensional matrix.
[0087] The multi-scale dynamic weighted two-dimensional matrix constructed by the one-dimensional convolutional neural network is used as the input of the two-dimensional convolutional network for two-dimensional convolution and activation series operations, and finally connected to the fully connected layer.
[0088] Step 3: Initialize the connection weights and bias parameters of each layer of the network, and set the initial learning rate to 0.0001.
[0089] Step 4. Input the training set into the constructed MDW-MCNN model, and start training the network model using the back propagation algorithm. When the model training termination conditions are met, that is, the damage function converges and the diagnostic accuracy value converges to a fixed value, stop training and save the trained model.
[0090] During the network training process, the weight update adopts the gradient descent method. According to the chain propagation law of the error, the error L back propagation method is used to calculate the gradient of each layer. In the dynamic weighting part, the weight W i The gradient of is:
[0091]
[0092] Among them, L is the error loss function, Y i It is the i-th row feature output after weighting.
[0093] The weights are updated as:
[0094]
[0095] P represents the number of parameter updates, W i p is the weight of the i-th row at the p-th update, and η represents the learning rate.
[0096] In the 1D-2D connection part, the error transmitted by the 2D convolution layer for:
[0097]
[0098] in, Corresponding to the eigenvalue Y ij 、M ij 、N ij , Q ij gradient.
[0099] The weights of the parameters θ corresponding to the two-dimensional matrix K are updated as follows: Among them, p represents the number of parameter updates, η represents the learning rate, and θ p Represents the parameter value of the two-dimensional matrix K at the pth iteration.
[0100] Step 5. Test the trained model with the test samples of the test set for 10 times. The obtained training and test fault diagnosis accuracy is as follows: Figure 5 As shown, through Figure 5 It can be seen that the ten diagnostic accuracies are 100%, 99.75%, 99.93%, 99.87%, 99.87%, 99.62%, 100%, 100%, 100%, and 100%, respectively, and the average diagnostic accuracy of the ten times is 99.91%, with a variance of 1.67×10 -6 .
[0101] In the above model training process, a training method for the parameters of the multi-scale dynamic weighted hybrid convolutional neural network model was established. The input fault signal was subjected to multi-scale feature extraction and dynamic weighting. The advantages of 2D CNN were utilized to effectively fuse the 1D multi-scale dynamic weighted features, and finally the fault classification was completed. The mechanism of propagation of model training errors from the two-dimensional convolutional neural network to the one-dimensional convolutional neural network was derived, and the seamless connection between the two-dimensional convolutional neural network and the one-dimensional convolutional neural network was achieved. The gradient descent method was used to update the weights and bias parameters of each layer of the entire model.
[0102] The present invention uses a one-dimensional convolutional neural network to obtain multi-scale dynamic weighted feature vectors of the signal for vibration signals collected in different states, constructs these dynamic weighted feature vectors into a two-dimensional matrix, and then uses these two-dimensional matrices as inputs of the two-dimensional convolutional neural network. The cross entropy error function is taken as the loss function, and the error back propagation algorithm is used to optimize the filter parameters of the multi-scale dynamic weighted hybrid convolutional network model to obtain the final fault diagnosis model and obtain better diagnostic performance.
[0103] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A rotating machinery fault diagnosis method based on multi-scale dynamic weighted hybrid CNN, characterized in that: The steps are as follows: Step 1. Collect vibration signals of the diagnostic object in various states according to a preset sampling frequency; Step 2. Standardize the collected vibration signals to construct a data set, and divide the data set into a training set, a validation set, and a test set according to a set ratio; Step 3. Construct a one-dimensional convolutional neural network and a 2D CNN, set a 1D-2D conversion layer between the one-dimensional convolutional neural network and the 2D CNN, and build an MDW-MCNN model; Step 4. Use the samples in the training set to train the MDW-MCNN model and save the optimal parameters as the fault diagnosis model; use the vibration signal of the validation set to verify the fault diagnosis model. If the diagnostic accuracy does not meet the requirements, return to step 2, otherwise the final fault diagnosis model is obtained; Step 5. Input the vibration signal of the test set into the verified final fault diagnosis model to obtain the fault diagnosis result.
2. The rotating machinery fault diagnosis method based on multi-scale dynamic weighted hybrid CNN according to claim 1 is characterized in that: The 1D-2D conversion layer superimposes n 1D multi-scale dynamic weighted feature vectors generated by the one-dimensional convolutional neural network to generate an n×n two-dimensional matrix, and uses the two-dimensional matrix as the input of the 2D CNN. The 2D CNN extracts the maximum value of adjacent local features and inputs a 1×M vector, where M represents the number of state types.
3. The rotating machinery fault diagnosis method based on multi-scale dynamic weighted hybrid CNN according to claim 1 or 2 is characterized in that: The one-dimensional convolutional neural network comprises a multi-scale feature extraction module, a dynamic weighting module and a concatenate layer connected in sequence. The multi-scale feature extraction module is composed of 4 groups of parallel single-scale feature extraction units. Each group of single-scale feature extraction units comprises a 1D convolution layer I, a 1D activation layer I, a 1D pooling layer I, a 1D convolution layer II, a 1DBN layer, a 1D activation layer II, and a 1D pooling layer II connected in sequence. The dynamic weighting module comprises a dynamic weighting layer. The dynamic weighting layer is connected after each group of 1D pooling layer II, and the dynamic weighting layer is connected to the concatenate layer.
4. The rotating machinery fault diagnosis method based on multi-scale dynamic weighted hybrid CNN according to claim 3 is characterized in that: The single-scale feature extraction unit generates a single-scale feature vector, the dynamic weighting layer generates a custom parameter, i.e., a dynamic weight, and the dynamic weight is multiplied with each single-scale feature vector for dynamic weighting to obtain 4 groups of single-scale dynamic weighted feature vectors with a length of n and a number of m. The Concatenate layer connects the 4 groups of single-scale dynamic weighted feature vectors in parallel to obtain a 1D multi-scale dynamic weighted feature vector with a length of n and a number of 4m, i.e., a number of n.
5. The rotating machinery fault diagnosis method based on multi-scale dynamic weighted hybrid CNN according to claim 3 is characterized in that: The convolution kernel sizes of 1D convolution layers I-II of the four groups of single-scale feature extraction units are 3×1, 5×1, 7×1, and 9×1, respectively, to extract features of vibration signals at different scales, where m is the number of convolution kernels in each group, and During the network training process, the weight value of each dynamic weight is adaptively updated with the loss function, and the weight value is continuously adjusted, that is, the weights of convolution kernels of different scales and different convolution kernels of the same scale in feature extraction are adaptively adjusted.
6. The rotating machinery fault diagnosis method based on multi-scale dynamic weighted hybrid CNN according to claim 4 or 5, characterized in that: The 2D CNN includes a 2D convolution layer I, a 2D activation layer I, a 2D pooling layer I, a 2D convolution layer II, a 2D activation layer II, a 2D pooling layer II, a Flatten layer, a fully connected layer I and a fully connected layer II which are connected in sequence.
7. The rotating machinery fault diagnosis method based on multi-scale dynamic weighted hybrid CNN according to claim 6 is characterized in that: The 1D convolution layer I-II performs local convolution calculation on the input signal to extract high-dimensional signal features, and the 1D activation layer I-II uses the ReLU linear rectification function to screen effective features; the 1D pooling layer I-II reduces the data dimension while retaining the characteristics of the original data, outputs the local maximum value, and extracts prominent features; the 1D BN layer performs mean and variance normalization on the data through batch normalization; The 2D convolution layers I-II perform direct feature fusion on the 1D multi-scale dynamic weighted feature vector. The 2D activation layers I-II use the ReLU linear rectification function to screen effective features. The 2D pooling layers I-II use maximum pooling to extract the maximum value of adjacent local features. The activation function of the fully connected layer I is ReLU, and the activation function of the fully connected layer II is softmax. The fully connected layers I-II perform dimensionality reduction.
8. The rotating machinery fault diagnosis method based on multi-scale dynamic weighted hybrid CNN according to claim 7 is characterized in that: The method for training the MDW-MCNN model is as follows: cross entropy is selected as the loss function, the network in the MDW-MCNN model is trained, the weight update adopts the gradient descent method, according to the error chain propagation law, the error back propagation method is used to calculate the gradient of each layer, and the learning rate is combined to enable the network to update parameters in time during the iteration process; when the model training termination condition is met, the training is stopped and the trained model is saved to obtain a fault diagnosis model.
9. The rotating machinery fault diagnosis method based on multi-scale dynamic weighted hybrid CNN according to claim 8 is characterized in that: For the input signal x=(x1,x2,…,x N ), x1, x2, …, x N is an acceleration numerical sequence containing N data, which is output as a dynamic weighted feature vector after multi-scale feature extraction by the multi-scale feature extraction module and dynamic weighting by the dynamic weighting module: Among them, U represents a single-scale feature vector, represents the feature weighting operation, Y represents the output feature after feature weighting, X ij represents the result of the i-th convolution kernel and the j-th maximum pooling operation, W represents the dynamic weight matrix, and W i Represents the weight multiplied by the i-th convolution kernel; the value range of i is 1-m, the value range of j is 1-n, m is the number of convolution kernels, and j is the number of maximum pooling operations; The dynamic weighted feature vector Y is output as a 4m×n or n×n multi-scale dynamic weighted two-dimensional matrix after the Concatenate layer and the 1D-2D conversion layer: Among them, Y ij 、M ij 、N ij , Q ij Corresponding to the single-scale dynamic weighted feature vector values extracted by 3×1, 5×1, 7×1, and 9×1 convolution kernels, Y ij is the eigenvalue of the i-th row and j-th column of the dynamic weighted eigenvector Y and Y ij =W i X ij , represents a 1D-2D superposition operation, and K represents the constructed two-dimensional matrix.
10. The rotating machinery fault diagnosis method based on multi-scale dynamic weighted hybrid CNN according to claim 9 is characterized in that: The weight update method is: using the gradient descent method, using the error back propagation method to calculate the gradient of each layer, combined with the learning rate, so that the network can update parameters in time during the iteration process; In the dynamic weighting part, the weight W i The gradient of is: Among them, L is the error loss function, Y i It is the i-th row feature output after weighting; The weights are updated as: Among them, P represents the number of parameter updates, W i p is the weight of the i-th row at the p-th update, and η represents the learning rate; In the 1D-2D connection part, i.e., the 1D-2D conversion layer, the error ▽K transmitted from the two-dimensional convolutional layer is: Among them, ▽Y ij , ▽M ij , ▽N ij , ▽Q ij They are the single-scale dynamic weighted eigenvector values Y ij 、M ij 、N ij , Q ij The gradient of The weight of the parameter θ corresponding to the two-dimensional matrix K is updated as: θ p+1 =θ p -η▽K; where p represents the number of parameter updates, θ p Represents the parameter value of the two-dimensional matrix K at the pth iteration.
Citation Information
Patent Citations
Rotating machinery fault diagnosis method based on multi-attention convolution neural network
CN110672343A
Rotating machine fault diagnosis method based on one-dimensional attention mechanism and convolutional neural network
CN115638965A