An interpretable bearing fault diagnosis method based on two-stage feature extraction
Through the combination of two-stage feature extraction and zebra optimization algorithm, the accuracy and interpretability of bearing fault diagnosis are improved, the problems of poor model interpretability and insufficient generalization ability in the existing technology are solved, and higher accuracy and interpretability are achieved. robustness.
Patent Information
- Application Number
- CN202411110562.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-08-14
AI Technical Summary
Existing bearing fault diagnosis methods have problems such as poor model interpretability and need to improve generalization capabilities. Especially in deep learning methods, the black box characteristics make fault diagnosis results difficult to interpret.
A method based on two-stage feature extraction is adopted. First, the vibration signal is extracted through the Gram parallel convolutional neural network model of the zebra optimization algorithm, including the extraction of time domain, frequency domain and wavelet packet energy features, and converted into a two-dimensional Gram. images, and then extract high-dimensional features through a parallel convolutional neural network, combine the multi-head attention mechanism and SVM layer for fault diagnosis, and use the zebra optimization algorithm to automatically adjust model parameters.
It improves the accuracy and robustness of bearing fault diagnosis, enhances the interpretability of the model, and solves the problems of difficult feature identification, strong data dependence, and complex model parameter adjustment.
Smart Images

Figure CN118626945B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of fault diagnosis, and in particular relates to an interpretable bearing fault diagnosis method based on two-stage feature extraction. Background Art
[0002] As a key component that provides stable support for the rotating body of industrial machinery and reduces its motion friction, changes in the working state of the bearing may cause major impacts, ranging from mechanical damage and equipment failure to casualties. Therefore, effective and accurate fault diagnosis of bearings is of great significance to preventing major accidents.
[0003] The main methods for traditional bearing fault diagnosis include sound and vibration analysis, oil sample analysis and temperature monitoring, visual inspection and vibration signal analysis. Among them, the traditional method of using time series or spectrum methods to extract feature signals for fault identification can effectively perform preliminary classification of bearing faults.
[0004] Nowadays, bearing fault diagnosis methods have made great progress. The main method is to use data-driven models to classify and identify fault types. For example, methods based on machine learning and deep learning have effectively solved the problem that the vibration signal of a bearing failure has nonlinear and non-stationary characteristics, which makes it difficult to identify and extract fault features. As a branch of machine learning, compared with traditional machine learning methods, deep learning has more powerful feature learning and feature expression capabilities. It constructs a multi-layer artificial neural network structure and uses a large amount of data to train the model, automatically learns and extracts features from the data, thereby improving the accuracy of fault diagnosis and prediction effects.
[0005] Although the fault diagnosis methods based on deep learning are constantly developing, their data processing capabilities and model complexity are improving, which has continuously improved the efficiency and accuracy of fault diagnosis. However, the black box characteristics of deep learning still make its interpretability need to be improved, and the interpretability of the model remains a research focus. Summary of the invention
[0006] In order to solve the above technical problems, the present invention proposes an interpretable bearing fault diagnosis method based on two-stage feature extraction, which can solve the problems that the fault diagnosis model has weak interpretability and the generalization ability needs to be improved.
[0007] To achieve the above object, the present invention provides an interpretable bearing fault diagnosis method based on two-stage feature extraction, comprising:
[0008] Acquire a vibration signal to be detected;
[0009] The vibration signal to be detected is input into the Grammar parallel convolutional neural network model of the zebra optimization algorithm to obtain a fault diagnosis result, wherein the Grammar parallel convolutional neural network model of the zebra optimization algorithm is trained by a training set, and the training set is the time domain characteristics, frequency domain characteristics and wavelet packet energy characteristics of the original vibration signal.
[0010] Optionally, obtaining the fault diagnosis result includes:
[0011] Acquire an original vibration signal, perform a first feature extraction on the original vibration signal, and acquire a one-dimensional feature;
[0012] Based on the one-dimensional feature, obtaining a two-dimensional Gram image;
[0013] Performing second feature extraction on the two-dimensional Gram image using a parallel convolutional neural network to obtain high-dimensional features;
[0014] Input the high-order features into the flattening layer to obtain fused features, and input the fused features into the multi-head attention mechanism layer to obtain attention calculation results;
[0015] Input the attention calculation result into the SVM layer to obtain a fault sample;
[0016] Based on the fault samples and combined with the zebra optimization algorithm, a fault diagnosis result is obtained.
[0017] Optionally, obtaining the one-dimensional feature includes:
[0018] The original vibration signal of the bearing is collected through the bearing test platform to obtain several samples;
[0019] Setting a category label for the sample to obtain a label category sample;
[0020] Performing a first feature extraction on the label category samples, respectively extracting time domain features, frequency domain features and wavelet packet energy features;
[0021] The time domain characteristics include: mean value, peak-to-peak value, root mean square, skewness, kurtosis, impulse factor, margin factor and coefficient of variation.
[0022] The frequency domain features include: spectrum energy, spectrum entropy and spectrum peak.
[0023] Optionally, the method to obtain a 2D Gram image is:
[0024]
[0025]
[0026]
[0027]
[0028]
[0029] Among them, x i is the i-th element in the one-dimensional time series X. The max(X) operation means selecting the element with the largest value from the elements of vector X. The min(X) operation means selecting the element with the smallest value from the elements of vector X. n is the total number of sampling points in the one-dimensional time series X. is the normalized one-dimensional time series element, φ is The corresponding polar coordinate cosine angle; r i for The corresponding polar coordinate radius; t i For x i The corresponding timestamp, is the normalized value when the one-dimensional time series data point is -1 after normalization. is the normalized value when the one-dimensional time series data point is 0 after normalization, for The corresponding polar coordinate radius is, For point x i The corresponding timestamp, is the number of all time points contained in the time series data, is the scaled time series, is the angle mapped to polar coordinates ( represents the angle between vector i and vector j), for The transpose of for The square of , where I is the unit row vector [1,1,...,1].
[0030] Optionally, obtaining the high-dimensional feature includes:
[0031] Inputting the two-dimensional Grammar image into the parallel convolutional neural network, assigning image learning weights to the two-dimensional Grammar image, and obtaining the high-dimensional features;
[0032] The convolutional neural network includes a convolutional layer, a batch normalization layer, an activation layer and a pooling layer.
[0033] Optionally, the method for obtaining the attention calculation result is:
[0034]
[0035]
[0036]
[0037] in, is the value matrix, X is the input data, W v is the parameter matrix, is the attention matrix, Q is the query matrix, is the transpose of the key matrix, H is the output matrix, the softmax() function normalizes the row vector, D k is the dimension of the key vector in the key matrix K.
[0038] Optionally, the method for obtaining the fault sample is:
[0039]
[0040] in, is the output of the decision function, SGN is the symbol function, is the Lagrange multiplier, Indicates feature vectors, represents the corresponding category label, K represents the kernel function and b represents the deviation.
[0041] Optionally, based on the fault sample and in combination with the zebra optimization algorithm, obtaining the fault diagnosis result includes:
[0042] Initializing the zebra population position parameters of the model to obtain a population matrix, wherein the rows and columns of the population matrix represent zebra individuals and decision variables, respectively;
[0043] Calculating the objective function value of the zebra individual and storing the calculation result;
[0044] Iterating the objective function until an optimal objective function is obtained;
[0045] Based on the optimal objective function, the fault diagnosis result is obtained.
[0046] Compared with the prior art, the present invention has the following advantages and technical effects:
[0047] The present invention extracts the first-stage features of the original bearing vibration signal, including time domain, frequency domain features and wavelet packet energy features, and then converts the one-dimensional feature sequence into a two-dimensional Gram image through the Gram angle field; inputs the GAF image into the PCNN model to extract the second-stage high-dimensional features; inputs the extracted high-dimensional features into the flattening layer, performs feature fusion and then inputs into the multi-head attention mechanism layer to focus on strengthening the features; improves the original Softmax layer into the SVM layer, inputs the strengthened features into the SVM layer, and uses the edge of the sample distribution to classify the fault samples within a certain distance; uses ZOA to automatically optimize the learning rate of the model, the convolution kernel size of the two branches and the learning weights, so as to achieve accurate identification and classification of the fault category and obtain the rolling bearing fault diagnosis results. Finally, the diagnostic accuracy of the model is compared with the support vector machine (SVM) model, the long short-term memory network (LSTM) model and the radial basis neural network (RBF) model, and the results are finally obtained. The method proposed in the present invention has higher accuracy, better robustness and stronger interpretability, and solves the problems of difficult feature identification of fault diagnosis models under different working conditions, strong data dependence, complex model parameter adjustment and lack of interpretability. At the same time, the strong interpretability of the present invention can be of reference significance for fault diagnosis based on deep learning technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0049] Figure 1 A flow chart of an interpretable bearing fault diagnosis method based on two-stage feature extraction according to an embodiment of the present invention;
[0050] Figure 2 A time domain signal feature arrangement diagram provided by an embodiment of the present invention;
[0051] Figure 3 A frequency domain signal feature arrangement diagram provided by an embodiment of the present invention;
[0052] Figure 4 The wavelet packet decomposition and reconstruction diagram provided by the embodiment of the present invention;
[0053] Figure 5 A wavelet packet energy spectrum provided by an embodiment of the present invention;
[0054] Figure 6 A GAF encoded image in a normal state provided by an embodiment of the present invention;
[0055] Figure 7A GAF coded image of an outer ring fatigue pitting fault state with a damage degree of 0-2% provided by an embodiment of the present invention;
[0056] Figure 8 A GAF coded image of an outer ring plastic indentation fault state with a damage degree of 0-2% provided by an embodiment of the present invention;
[0057] Fig. 9 A GAF coded image of an inner race fatigue pitting fault state with a damage degree of 2-5% provided by an embodiment of the present invention;
[0058] Fig.10 A GAF coded image of an inner race fatigue pitting fault state with a damage degree of 0-2% provided by an embodiment of the present invention;
[0059] Fig.11 A GAF coded image of a combined fatigue pitting fault state with a damage degree of 2-5% provided by an embodiment of the present invention;
[0060] Fig.12 A GAF coded image of a combined fatigue pitting fault state with a damage degree of 5-15% provided by an embodiment of the present invention;
[0061] Fig.13 The first four convolution features of the first branch provided by the embodiment of the present invention;
[0062] Fig.14 The first four convolution features of the second branch provided by the embodiment of the present invention;
[0063] Fig.15 Iterative graph of error and accuracy provided by an embodiment of the present invention;
[0064] Fig.16 The fitness of the iterative process of training the ZOA-PCNN-MSA-SVM classification model provided in the embodiment of the present invention;
[0065] Fig.17 A training curve of the iterative process of the ZOA-PCNN-MSA-SVM classification model training provided by an embodiment of the present invention;
[0066] Fig.18 A t-SNE visualization cluster scatter plot of sample classification before recognition provided by an embodiment of the present invention;
[0067] Fig.19 A t-SNE visualized cluster scatter plot of sample classification after identification provided in an embodiment of the present invention;
[0068] Fig. 20 The fault sample prediction result of the ZOA-PCNN-MSA-SVM classification model provided in the embodiment of the present invention;
[0069] Fig.21 The training result of the ZOA-PCNN-MSA-SVM classification model provided in the embodiment of the present invention;
[0070] Fig. 22 The recognition results of the ZOA-PCNN-MSA-SVM classification model provided in the embodiment of the present invention for bearings in different types of states;
[0071] Fig.23 A wind rose diagram of the recall rate of the ZOA-PCNN-MSA-SVM classification model provided in an embodiment of the present invention;
[0072] Fig.24 The F1 score wind rose diagram of the ZOA-PCNN-MSA-SVM classification model provided by the embodiment of the present invention;
[0073] Fig.25 A comparison chart of the diagnostic accuracy of the ZOA-PCNN-MSA-SVM classification model provided in an embodiment of the present invention and different models. DETAILED DESCRIPTION
[0074] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0075] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0076] This paper proposes an interpretable bearing fault diagnosis method based on two-stage feature extraction, such as Figure 1 As shown, the specific steps include:
[0077] Acquire a vibration signal to be detected;
[0078] The vibration signal to be detected is input into the Grammar parallel convolutional neural network model of the zebra optimization algorithm to obtain the fault diagnosis result, wherein the Grammar parallel convolutional neural network model of the zebra optimization algorithm is trained by a training set, and the training set is the time domain characteristics, frequency domain characteristics and wavelet packet energy characteristics of the original vibration signal.
[0079] Furthermore, obtaining the fault diagnosis result includes:
[0080] Acquire an original vibration signal, perform a first feature extraction on the original vibration signal, and acquire a one-dimensional feature;
[0081] Based on the one-dimensional features, a two-dimensional Gram image is obtained;
[0082] A parallel convolutional neural network is used to extract the second feature of the two-dimensional Gram image to obtain high-dimensional features;
[0083] Input the high-order features into the flattening layer to obtain the fused features, and input the fused features into the multi-head attention mechanism layer to obtain the attention calculation results;
[0084] Input the attention calculation results into the SVM layer to obtain fault samples;
[0085] Based on the fault samples and combined with the zebra optimization algorithm, the fault diagnosis results are obtained.
[0086] Specifically, step 1, using the original vibration signal to perform the first feature extraction, extracting the time domain, frequency domain and wavelet packet energy features;
[0087] Step 2: Convert N one-dimensional feature sequences into N×N two-dimensional Gram images;
[0088] Step 3: Input the converted GAF image into the parallel convolutional neural network at the same time. The two branches of CNN have convolution kernels of different sizes, and assign different image learning weights to perform the second stage of high-dimensional feature extraction.
[0089] Step 4: Input the high-dimensional features into the flattening layer, perform feature fusion, and then input them into the multi-head attention mechanism layer for training;
[0090] Step 5: The original Softmax layer is improved to an SVM layer, the training results are input into the SVM layer, and the edge of the sample distribution is used to classify the fault samples within a certain distance;
[0091] Step 6: Use the zebra optimization algorithm (ZOA) to optimize the model's learning rate, branch 1 convolution kernel size, branch 2 convolution kernel size and other parameters to obtain the optimal model parameters and perform fault classification.
[0092] Furthermore, obtaining one-dimensional features includes:
[0093] The original vibration signal of the bearing is collected through the bearing test platform to obtain several samples;
[0094] Set category labels for samples and obtain label category samples;
[0095] Perform the first feature extraction on the label category samples, extracting time domain features, frequency domain features and wavelet packet energy features respectively;
[0096] Among them, the time domain characteristics include: mean value, peak-to-peak value, root mean square, skewness, kurtosis, impulse factor, margin factor and coefficient of variation.
[0097] Frequency domain features include: spectrum energy, spectrum entropy and spectrum peak.
[0098] Specifically, the vibration signal sampling sequence is decomposed into 3 layers of orthogonal wavelet packets to obtain 8 frequency bands, and the energy of each frequency band is calculated. .
[0099] The time domain, frequency domain and wavelet packet energy features are used to construct a multi-domain feature sample set.
[0100] Furthermore, obtaining high-dimensional features includes:
[0101] Input the two-dimensional Gram image into the parallel convolutional neural network, assign image learning weights to the two-dimensional Gram image, and obtain high-dimensional features;
[0102] Among them, the convolutional neural network includes: convolution layer, batch normalization layer, activation layer and pooling layer.
[0103] Specifically, the converted GAF images are simultaneously input into parallel convolutional neural networks. The CNN of each branch consists of a convolutional layer, a batch normalization layer, an activation layer, and a pooling layer to perform the second stage of high-dimensional feature extraction. The CNNs of the two branches have convolution kernels of different size ranges, which are assigned different image learning weights to make the deep features complementary.
[0104] Furthermore, based on the fault samples and combined with the zebra optimization algorithm, the fault diagnosis results obtained include:
[0105] Initialize and obtain the population matrix, where the rows and columns of the population matrix represent zebra individuals and decision variables respectively;
[0106] Calculate the objective function value of the zebra individual and store the calculation result;
[0107] Iterate the objective function until the optimal objective function is obtained;
[0108] Based on the optimal objective function, the fault diagnosis results are obtained.
[0109] Example
[0110] like Figure 1 As shown, the present invention provides an interpretable bearing fault diagnosis method based on two-stage feature extraction, including: performing the first feature extraction, converting the one-dimensional feature sequence into a two-dimensional Grammar image, performing the second-stage high-dimensional feature extraction of the PCNN model, using the ZOA optimization algorithm to automatically optimize the hyperparameters of the model, and improving the original Softmax layer to SVM and classification model training and testing.
[0111] Furthermore, the first feature extraction is performed:
[0112] The first feature extraction is performed on the collected rolling bearing vibration signal, and the statistical feature indicators in the time domain and frequency domain are calculated. At the same time, wavelet packet transformation and decomposition are performed, which can capture more subtle one-dimensional features in the signal and improve the denoising efficiency.
[0113] The time domain features of the collected bearing vibration signals are extracted, and a set of time domain diagrams of healthy state samples are drawn, such as Figure 2 shown.
[0114] In this case, the time domain statistical characteristic indicators extracted include mean value, peak-to-peak value, root mean square, skewness, kurtosis, impulse factor, margin factor and coefficient of variation.
[0115] In this case, the collected bearing time domain signal is Fourier transformed to extract frequency domain features, and a set of frequency domain diagrams of healthy state samples are drawn, such as Figure 3 shown.
[0116] In this case, the frequency domain statistical feature indicators extracted include spectrum energy, spectrum entropy and spectrum peak.
[0117] Bearing fault signals exhibit different characteristic parameters in the time and frequency domains, which enable these parameters to be effectively used for the preliminary classification of bearing faults.
[0118] Simply relying on time domain and frequency domain analysis has certain limitations, and it may not be able to fully capture the complex frequency-related state information contained in the signal.
[0119] To achieve more comprehensive fault detection, the next step is to perform wavelet packet energy feature extraction to reveal those characteristics that are not obvious in the time domain.
[0120] Perform three-layer orthogonal wavelet packet decomposition on the vibration signal sampling sequence to obtain 8 frequency bands.
[0121] Assume that the energy of each frequency band after decomposition is ,in Reconstruct the signal discrete point amplitude for each frequency band.
[0122] The sub-band energy characteristics extracted by wavelet packet decomposition algorithm are used as the theoretical basis for extracting bearing fault characteristics. A group of healthy bearing sample signals are taken and the frequency band reconstruction diagram after wavelet packet decomposition is shown as follows: Figure 4 shown.
[0123] After performing three-layer wavelet packet decomposition on the signal, the distribution of energy in eight sub-bands is obtained. In order to more intuitively present the distribution of sub-band energy after wavelet packet decomposition of rolling bearings under different conditions, the energy of each frequency band of wavelet packet decomposition is obtained by calculating the coefficients of each node provided by the Wenergy function in MATLAB. , the calculated wavelet packet energy spectrum is as follows Figure 5 shown.
[0124] like Figure 5 As shown, the horizontal axis represents the wavelet packet spaces arranged in order of increasing frequency, and the vertical axis represents the proportion of the energy of each wavelet packet space to the total energy.
[0125] Assume that a signal is decomposed into wavelet packets to the i-th layer, and the energy of each sub-band signal is calculated according to formula (1):
[0126]
[0127] The overall calculation formula is:
[0128]
[0129] The characteristic vector of the signal is the energy percentage of each sub-band, and the characteristic vector is expressed as:
[0130]
[0131] Where: is the energy of each frequency band after decomposition, Reconstruct the discrete point amplitude of the signal for each frequency band, Si,j represents the jth node (i.e. ) is the decomposed signal corresponding to the signal, n is the number of discrete sampling points of the signal, E is the total energy of the analyzed signal, and T is the energy percentage of each sub-band as the characteristic vector of the signal.
[0132] Based on the information contained in the energy spectrum of each sample, the frequency band energy of the sample data in this case after wavelet packet decomposition is used as the feature parameter, and a one-dimensional feature sequence is constructed together with the time domain and frequency domain feature indicators to describe the internal information from the different characteristics of the bearing system structure. By comprehensively constructing a one-dimensional feature sequence using these three feature vectors, the sensitivity of the feature parameters can be improved, the statistical characteristics in the time series can be highlighted, the overall characteristics of the results can be enhanced, and redundant and irrelevant details can be removed at the same time, making the image after GAF conversion clearer and more distinguishable, thereby improving the classification accuracy.
[0133] Furthermore, the one-dimensional feature sequence is converted into a two-dimensional Gram image:
[0134] The N one-dimensional feature sequences are converted into an N×N two-dimensional Gram image to more comprehensively describe the characteristics of the data.
[0135] Each Gram image consists of time domain, frequency domain and wavelet packet energy features, which has stronger interpretability and better discrimination, and helps to extract richer and more distinctive features, thereby improving the accuracy of classification and recognition.
[0136] In the Gram angle field, the main diagonal elements correspond to values of different timestamps, so they have a unique mapping relationship with the time series and fully reflect all the information of the time series.
[0137] The non-main diagonal elements of the Gram angle field represent the correlation of data at different moments and reflect the internal correlation of the time series.
[0138] Perform normalization according to formula (4) or formula (5):
[0139]
[0140]
[0141] Where: x i is the ith element in the one-dimensional time series X; the max(X) operation means selecting the element with the largest value from the elements of vector X; the min(X) operation means selecting the element with the smallest value from the elements of vector X; n is the total number of sampling points in the one-dimensional time series X; x i ~ is the normalized one-dimensional time series element. is the normalized value when the one-dimensional time series data point is -1 after normalization. It is the normalized value when the one-dimensional time series data point is 0 after normalization.
[0142] The normalized one-dimensional time series is encoded in polar coordinates, as shown in formula (6):
[0143]
[0144] Where φ is x i ~ The corresponding polar cosine angle; rᵢ i For x i ~ The corresponding polar coordinate radius; t i For x i The corresponding timestamp; is the normalization factor.
[0145] Use equation (7) or equation (8) to calculate the Gram angle field:
[0146]
[0147]
[0148] in, is the scaled time series, is the angle mapped to polar coordinates ( represents the angle between vector i and vector j), for The transpose of for The square of , where I is the unit row vector [1,1,...,1].
[0149] From the above equation, we can see that as time goes by, the matrix elements move from the upper left to the lower right, the time dimension is encoded into the geometry of the matrix, and the matrix diagonal elements are single angle values, so an approximate reconstruction of the time series can be achieved.
[0150] By transforming the bearing vibration signal into a Gram angle field, the noise interference in the original bearing signal can be expressed in the form of an image, reducing the steps of bearing signal denoising.
[0151] Using the richness of image information to diagnose bearing faults is more efficient and convenient.
[0152] like Figures 6 to 12 As shown in the figure, it can be seen from the Gram images of different bearing states that after feature extraction, the Gram images converted from the Gram angle field into two-dimensional Gram images are composed of N×N feature matrices. The Gram images of different bearing states show similar but different color distributions. Different color areas represent the characteristics of this type of bearing state, which have the meaning of time domain, frequency domain and wavelet packet statistical eigenvalues. That is, the Gram images converted after the first stage of feature extraction have higher discrimination and stronger interpretability.
[0153] In order to more intuitively show the complementarity of the two branches of the PCNN network, we use heat maps to plot the first four convolutional feature maps of the two branches to achieve feature visualization, such as Figure 13-14 shown.
[0154] like Fig.15 As shown in the figure, the color depth of the convolution feature map at the same position on different branches is different, indicating that the features extracted by the two branches are different and complementary, and can better extract and process the features contained in the data set.
[0155] In order to more intuitively display the training iteration process of the model, this case draws the fitness curve and training curve of ZOA-PCNN-MSA-SVM, as shown in Figures 16 to 17 shown.
[0156] Furthermore, PCNN-MSA-SVM is input for the second stage of high-dimensional feature extraction:
[0157] The converted GAF images are simultaneously input into parallel convolutional neural networks. The CNNs of the two branches have convolution kernels of different size ranges, which are assigned different image learning weights to perform the second stage of high-dimensional feature extraction and enhance the deep spatial features.
[0158] Applying CNN to the processing of image data can help extract image features such as texture, shape, and edges, thereby performing more accurate classification and fault identification.
[0159] Convolutional neural network is a deep learning model that is particularly suitable for processing data with grid-like topological structures. Its structure is as follows:
[0160] The main structure of CNN includes convolution layer, normalization layer, activation layer and pooling layer. The principle of each layer is as follows:
[0161] The first layer is the convolutional layer. The operations related to the convolutional layer are as follows:
[0162] For each convolution kernel, a new feature map is generated by sliding (convolution) on the input feature map and calculating the dot product. Assume that the size of the input image is (width, height and depth), F is the size of the convolution kernel, and the size of the convolution kernel is (square convolution kernel, the depth is the same as the input image) can be recorded as , the stride is , then the feature map size of the convolutional layer output is It can be calculated by the following formula:
[0163]
[0164]
[0165] in, The number of convolution kernels
[0166] The second layer is a normalization layer, which is a method of normalizing each mini-batch of data during training. For each feature dimension, a normalization layer performs the following operations:
[0167]
[0168]
[0169]
[0170]
[0171] in, is a sample in a mini-batch, m is the number of samples in a mini-batch, and are the mean and variance of the mini-batch, is a small constant used for numerical stability, and are learnable parameters for scaling and translation, is the output value after normalization, scaling and offset are applied.
[0172] The third layer is the activation layer, which uses the ReLU activation function. Its calculation formula is:
[0173]
[0174] in is the output of the convolutional layer, and g(x) is the output of the ReLU activation function.
[0175] The fourth layer is the pooling layer, which is used to reduce the size of the feature map while retaining the most important information. For all values in the pooling window, the largest one is selected. The calculation formula for the maximum pooling is:
[0176]
[0177] output represents the output of the pooling layer, represents the input feature map, This specifies the size of the pooling window.
[0178] Assume that the pooling window size is , stride S, then the feature map size of the pooling layer output It can be calculated by the following formula:
[0179]
[0180]
[0181]
[0182] After the second stage feature extraction of the parallel convolutional neural network, the Gram image is input into the flattening layer. The operation process of the flattening layer is as follows:
[0183] Iterate over each element in the feature map and put them into a one-dimensional array in order.
[0184] This process can be viewed as a reshaping operation. If 𝑥 is the input feature map, then the output 𝑦 of the flattening layer can be obtained as follows:
[0185]
[0186] The high-dimensional features are input into the flattening layer, and the features are fused and input into the multi-head attention mechanism layer for training to effectively grasp the contribution of the extracted features and focus on strengthening the features. The process is as follows:
[0187]
[0188]
[0189]
[0190] Among them, W q , W k and W v is the parameter matrix, the softmax() function normalizes the row vector, D k It represents the dimension of the key vector in the key matrix K. Its square root is used as the denominator mainly to solve the problem that when the vector dimension is large, the variance of the numerator value is too large, resulting in too small gradient and difficult model training.
[0191] According to formula (6), the value matrix is obtained Then, the attention matrix is obtained according to the attention score function , and then normalize it through the softmax function to get the attention weight matrix Finally, matrix multiplication is performed on the attention weight matrix and the value matrix to obtain the output .
[0192] Assuming there are h projection spaces, the multi-head self-attention calculation process is as follows:
[0193]
[0194]
[0195]
[0196] Each head component can be calculated by formula (8), and then the query matrix can be obtained by formulas (9) and (10): , key matrix , then map the vectors of Q, K, and V into multiple Q / K / V matrices with different linear projection matrices, and then perform attention function calculation on each group of Q / K / V matrices at the same time, and finally combine the calculation results of each group of attention with the parameter matrix W O Multiply to get the output value.
[0197] The original Softmax layer is improved to SVM, which uses the edge of sample distribution to classify fault samples within a certain distance and has stronger robustness to outliers.
[0198] SVM is used to solve binary classification problems. Its goal is to find a hyperplane that can separate data points of different categories and maximize the distance between the closest data points in the two categories and the hyperplane.
[0199] The data points closest to the hyperplane are called support vectors. It can be expressed as the hyperplane that SVM searches for.
[0200] The features are input into the SVM layer, and the edge of the sample distribution is used to classify the fault samples within a certain distance, so that the outliers have stronger robustness.
[0201]
[0202] in, The output of the decision function SGN is the symbolic function, is the Lagrange multiplier, Indicates feature vectors, represents the corresponding category label, represents the kernel function, Indicates deviation.
[0203] Among them, classification can be performed based on the hyperplane through formula (12).
[0204] Furthermore, the ZOA optimization algorithm is used to automatically optimize the model's hyperparameters:
[0205] In order to improve the interpretability of the model, the t-SNE interpretability algorithm is used to visualize the feature graphs of each branch module, and the sample distribution of the original sample and the sample distribution after the features are extracted by ZOA-PCNN-MSA-SVM are compared. Figure 18-19 shown.
[0206] The ZOA algorithm can automatically search for the best parameter combination, avoiding the trouble and subjectivity of manual parameter selection, thereby optimizing the parameter selection problem of the PCNN-MSA-SVM model so that it can better adapt to the real-time changing environment. At the same time, this method can also quickly update and adjust the model to adapt to new data while keeping the existing model unchanged.
[0207] like Figure 20-21 As shown, this embodiment also provides prediction results and training results obtained by the ZOA-PCNN-MSA-SVM model based on prediction samples.
[0208] In order to obtain the diagnostic accuracy of the proposed model, the ZOA-PCNN-MSA-SVM model was tested 10 times, and the diagnostic accuracy of the model was 97.8572±1.7496%. In order to see the results of the 10 tests more intuitively, this case draws an accuracy radar chart and shows the recognition results of the model for bearings in different types of states, such as Fig. 22 shown.
[0209] like Fig. 22As shown in the figure, the ZOA-PCNN-MSA-SVM model performs well in identifying bearing states in states 1, 2, 3, and 6, with an accuracy rate of 100%. In addition, for bearings in other states, the model also shows a high accuracy rate, highlighting its reliability and robustness, and is suitable for bearing fault diagnosis.
[0210] like Figures 23 to 24 As shown, it can be seen that the ZOA-PCNN-MSA-SVM model has a higher recall rate and F1 score, indicating that the proposed model has good reliability and robustness and is suitable for bearing fault diagnosis.
[0211] like Fig.25 As shown in the figure, compared with the SVM model, LSTM model and RBF model, ZOA-PCNN-MSA-SVM is significantly better than the other three methods in bearing fault diagnosis, with higher accuracy and better robustness.
[0212] The present invention aims at the problems of difficulty in feature recognition of fault diagnosis models under different working conditions, strong data dependence, complex model parameter adjustment and lack of interpretability. The first stage feature extraction is performed on the original bearing vibration signal, including time domain, frequency domain features and wavelet packet energy features, and then the one-dimensional feature sequence is converted into a two-dimensional Gram image through the Gram angle field; the GAF image is input into the PCNN model for the second stage high-dimensional feature extraction; the extracted high-dimensional features are input into the flattening layer, and the features are fused and then input into the multi-head attention mechanism layer to focus on strengthening the features; the original Softmax layer is improved into the SVM layer, and the strengthened features are input into the SVM layer, and the edge of the sample distribution is used to classify the fault samples within a certain distance; the learning rate of the model, the convolution kernel size of the two branches and the learning weights are automatically optimized by ZOA, so as to realize the accurate identification and classification of the fault category and obtain the rolling bearing fault diagnosis result. Finally, the diagnostic accuracy of the model is compared with the SVM model, the LSTM model and the RBF model, and the result is finally obtained. Experimental studies have shown that the method proposed in the present invention has higher accuracy, better robustness and stronger interpretability.
[0213] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An interpretable bearing fault diagnosis method based on two-stage feature extraction, It is characterized in that include: Acquire a vibration signal to be detected; The vibration signal to be detected is input into the Gram parallel convolutional neural network model of the zebra optimization algorithm to obtain a fault diagnosis result, wherein the Gram parallel convolutional neural network model of the zebra optimization algorithm is trained by a training set, and the training set is the time domain characteristics, frequency domain characteristics and wavelet packet energy characteristics of the original vibration signal; wherein obtaining the fault diagnosis result includes: Acquire an original vibration signal, perform a first feature extraction on the original vibration signal, and acquire a one-dimensional feature; Based on the one-dimensional features, a two-dimensional Gram image is obtained; wherein each Gram image is composed of a time domain feature, a frequency domain feature and a wavelet packet energy feature; Performing second feature extraction on the two-dimensional Gram image using a parallel convolutional neural network to obtain high-dimensional features; Input the high-dimensional features into the flattening layer to obtain fused features, and input the fused features into the multi-head attention mechanism layer to obtain attention calculation results; Input the attention calculation result into the support vector machine layer to obtain fault samples; Based on the fault sample, combined with the zebra optimization algorithm, a fault diagnosis result is obtained; Among them, obtaining one-dimensional features includes: The original vibration signal of the bearing is collected through the bearing test platform to obtain several samples; Setting a category label for the sample to obtain a label category sample; Performing a first feature extraction on the label category samples, respectively extracting time domain features, frequency domain features and wavelet packet energy features; The time domain characteristics include: mean value, peak-to-peak value, root mean square, skewness, kurtosis, impulse factor, margin factor and coefficient of variation; The frequency domain features include: spectrum energy, spectrum entropy and spectrum peak; The method for obtaining the attention calculation result is: In the formula, is the value matrix, X is the input data, W v is the parameter matrix, is the attention matrix, Q is the query matrix, is the transpose of the key matrix K, H is the output matrix, the softmax() function normalizes the row vector, D k is the dimension of the key vector in the key matrix K, is the attention weight matrix; The method for obtaining the fault sample is as follows: In the formula, is the output of the decision function, sgn is the symbol function, is the Lagrange multiplier, Indicates feature vectors, Indicates feature vectors, u is the u-th feature, represents the corresponding category label, K represents the kernel function, b represents the deviation; Wherein, based on the fault sample and in combination with the zebra optimization algorithm, obtaining the fault diagnosis result includes: Initializing the zebra population position parameters of the Gram parallel convolutional neural network model of the zebra optimization algorithm to obtain a population matrix, wherein the rows and columns of the population matrix represent zebra individuals and decision variables, respectively; Calculating the objective function value of the zebra individual and storing the calculation result; Iterate the objective function until the optimal objective function is obtained; Based on the optimal objective function, the fault diagnosis result is obtained.
2. According to claim 1, an interpretable bearing fault diagnosis method based on two-stage feature extraction, It is characterized in that Based on the one-dimensional feature, the method for obtaining the two-dimensional Gram image is: Among them, x i is the i-th element in the one-dimensional time series X. The max(X) operation means selecting the element with the largest value from the elements of the one-dimensional time series X. The min(X) operation means selecting the element with the smallest value from the elements of the one-dimensional time series X. is the element of the normalized one-dimensional time series, t i For x i The corresponding timestamp, is the normalized value when the one-dimensional time series data point is -1. is the normalized value when the one-dimensional time series data point is 0 after normalization, for The corresponding polar coordinate radius is, is the number of all time points contained in the one-dimensional time series data, is the scaled one-dimensional time series, Represents the angle mapped to polar coordinates, for The transpose of for The square of , where I is the unit row vector [1,1,...,1].
3. According to claim 1, an interpretable bearing fault diagnosis method based on two-stage feature extraction, It is characterized in that Obtaining high-dimensional features includes: Inputting the two-dimensional Grammar image into the parallel convolutional neural network, assigning image learning weights to the two-dimensional Grammar image, and obtaining the high-dimensional features; The convolutional neural network includes a convolutional layer, a batch normalization layer, an activation layer and a pooling layer.
Citation Information
Patent Citations
CNN rolling bearing fault diagnosis method based on improved GAF and SA
CN115221916A
Bearing fault diagnosis method, system and equipment and storage medium
CN116610993A
