Fault diagnosis method based on local structure convolutional neural network
By adopting a local structure convolutional neural network method in fault diagnosis, using a two-dimensional local maintenance projection algorithm to extract features and downsample, the shortcomings of linear methods in processing nonlinear data are solved, and higher fault diagnosis accuracy and good performance of small sample data sets are achieved.
Patent Information
- Application Number
- CN202411845931.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-11
AI Technical Summary
In the prior art, linear methods such as principal component analysis (PCA) cannot effectively maintain the internal structure of the data when processing complex nonlinear structural data, resulting in the principal component not representing the original data well, and even losing useful information.
The fault diagnosis method based on local structure convolutional neural network is adopted. By constructing a local structure convolutional neural network including the first stage network, the second stage network and the output layer, the two-dimensional local maintenance projection algorithm is used to extract features, perform convolution and downsample, generate extended histogram features, and troubleshoot them in combination with support vector machines.
Improve the accuracy of fault diagnosis, can process complex nonlinear structure data more effectively, maintain the internal structure of the data, thereby showing high accuracy on small sample data sets.
Smart Images

Figure CN119807874A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of fault diagnosis, and mainly relates to the use of deep learning methods and machine learning methods to realize fault diagnosis and classification, and specifically relates to a fault diagnosis method based on a local structure convolutional neural network. Background Art
[0002] With the continuous development of industry, rotating machinery and gearboxes are widely used in industrial production and operation. In modern industry, rotating machinery and gearboxes are prone to failure due to long-term high-load operation, which may cause a lot of economic losses and casualties. Therefore, accurate fault diagnosis is needed to provide guarantee for maintaining the safe operation of rotating machinery or gearboxes.
[0003] In recent years, machine learning has been applied to fault diagnosis. The main methods include principal component analysis (PCA), clustering (CL), and support vector machine (SVM). Machine learning enables computers to process data more efficiently than traditional methods. Computers are able to identify more subtle features for analysis, making the results more accurate. In order to detect faults more accurately, deep learning is further used for fault diagnosis. Compared with previous diagnostic methods, deep learning methods easily complete feature extraction, thereby improving diagnostic accuracy and better processing speed, and are now widely used.
[0004] Feedforward convolutional neural networks have shown excellent performance in various fields, among which PCANet is the most typical. PCANet uses principal component analysis to learn multi-layer filter kernels, and then uses binary hash coding and block histogram features to perform downsampling and encoding operations. In the field of fault diagnosis, PCANet also performs well. However, PCANet also has some limitations. PCA is the core algorithm of PCANet. The premise of PCA is that the data has a global linear structure or is linearly separable. However, in real life, it is an ideal situation for the data to meet the above conditions. The actual data is highly distorted in high-dimensional space, and the variables are highly correlated. The actual data has more nonlinear structures, that is, it is a manifold distribution in high-dimensional space, such as vibration signal data from mechanical equipment. When the PCA method is used to process complex nonlinear structure data, the principal components obtained by the PCA method cannot represent the original data well, and even some useful information may be lost. Therefore, we need a method that can maintain the internal structure of the data to replace PCA. Summary of the invention
[0005] To solve the above problems, the present invention provides a fault diagnosis method based on a local structure convolutional neural network, comprising the following steps:
[0006] S1. Obtain a one-dimensional vibration data set and perform cutting and stacking processing to obtain a preprocessed data set, and divide the preprocessed data set into a training set and a test set;
[0007] S2. reshape each sample in the training set to obtain a reshaped training set;
[0008] S3. construct a local structure convolutional neural network, which includes a first-stage network, a second-stage network and an output layer; initialize the parameters of the local structure convolutional neural network, including filter size, the number of first-stage filters and the size of the second-stage filters;
[0009] S4. Based on the reshaped training set, grid search is used to obtain the optimal filter size k1×k2, the optimal number of first-stage filters L1, and the optimal number of second-stage filters L2 of the local structure convolutional neural network;
[0010] S5. Sampling and removing the mean operation on each sample in the reshaped training set obtains a first new data matrix; based on the reshaped training set and the first new data matrix, obtaining a hierarchical convolution sample set through the first stage network;
[0011] S6. Perform sampling and de-averaging operations on each hierarchical convolution sample in the hierarchical convolution sample set to obtain a second new data matrix; based on the hierarchical convolution sample set and the second new data matrix, obtain a convolution matrix through a second-stage network;
[0012] S7. Binarize and histogram the convolution matrix through the output layer to obtain extended histogram features; S8. Use the extended histogram features to train a support vector machine to obtain a fault diagnosis model; input the data to be diagnosed into the fault diagnosis model to obtain a diagnosis result.
[0013] Beneficial effects of the present invention:
[0014] Aiming at the problem that the principal components obtained by linear methods such as principal component analysis (PCA) when processing complex nonlinear structure data cannot represent the original data well, the present invention introduces a two-dimensional locality preserving projection algorithm with the ability to maintain the local structure between data and process complex nonlinear data. The algorithm is divided into two stages and an output layer. Both the first stage and the second stage generate convolution filters for convolution through features extracted by two-dimensional locality preserving projection, and then perform binary hash coding and block histogram feature downsampling and encoding operations through the output layer, thereby improving accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 is a flow chart of the method of the present invention;
[0016] Figure 2It is a structural diagram of the local structure convolutional neural network of the present invention;
[0017] Figure 3 Schematic diagram of grayscale image conversion of some samples in an embodiment of the present invention. DETAILED DESCRIPTION
[0018] 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.
[0019] The present invention provides a fault diagnosis method based on local structure convolutional neural network, such as Figure 1 , Figure 2 As shown, the following steps are included:
[0020] S1. Obtain a one-dimensional vibration data set and perform cutting and stacking processing to obtain a preprocessed data set, and divide the preprocessed data set into a training set and a test set.
[0021] Specifically, step S1 performs cutting and stacking processing on the one-dimensional vibration data of the machine, including: for each one-dimensional vibration data, cutting once every 1024 data points in time sequence to obtain a plurality of cutting data, each cutting data is used as a sample to form a preprocessing data set.
[0022] S2. Reshape each sample in the training set to obtain a reshaped training set.
[0023] Specifically, step S2 reshapes each sample in the training set, including:
[0024] S21. normalize the samples and reshape them into integer grayscale values in the range of [0,255];
[0025] S22. performing L2 norm normalization on the integer grayscale image value to obtain a normalized integer grayscale image value;
[0026] S23. According to the local convolutional neural network input size m×n, the normalized integer grayscale image values are reshaped into samples of size 1×n or m×n, where m represents the row of the data matrix and n represents the column of the data matrix.
[0027] S3. Construct a local structure convolutional neural network, which includes a first-stage network, a second-stage network and an output layer; initialize the parameters of the local structure convolutional neural network, including filter size, the number of first-stage filters and the size of second-stage filters.
[0028] S4. Based on the reshaped training set, grid search is used to obtain the optimal filter size k1×k2, the optimal number of first-stage filters L1, and the optimal number of second-stage filters L2 of the local structure convolutional neural network.
[0029] S5. Perform sampling and de-meaning operations on each sample in the reshaped training set to obtain a first new data matrix; based on the reshaped training set and the first new data matrix, obtain a hierarchical convolution sample set through the first stage network.
[0030] Specifically, step S5 includes:
[0031] S51. Use a filter of size k1×k2 to sample the i=1, 2, ..., N samples in the reshaped training set with a block size of k1×k2, and concatenate all sample blocks obtained by sampling the i-th sample to generate the first sample block represents the j-th sample block of the i-th sample, represents rounding up to an integer, N represents the number of samples; reshape the size of all samples in the training set to m×n, represents a real vector space of dimension k1×k2;
[0032] S52. For the first sample block Perform a mean removal operation on each sample block in to obtain the first processed sample block matrix The mean removal operation is expressed as:
[0033]
[0034] It represents the result of removing the mean value of the j-th sample block of the i-th sample, and 1 represents an all-one vector of appropriate dimension.
[0035] S53. Use the first processed sample block matrix corresponding to the N samples to construct a first new data matrix X. The first new data matrix represents a matrix space with k1×k2 rows and Nmn columns; Nmn represents the number of sample blocks, which is N×m×n;
[0036] S54. The first new data matrix X1 is processed by a two-dimensional local preservation projection algorithm to obtain L1 convolution filters. Specifically, the eigenvectors corresponding to the first L1 maximum eigenvalues of the first new data matrix X1 are obtained by the two-dimensional local preservation projection algorithm to form a feature mapping matrix, and each eigenvector is reorganized into a k1×k2 matrix. This matrix is the convolution filter, which can be expressed as:
[0037]
[0038] Among them, Wl 1 represents the lth convolution filter in the first stage network, represents the projection function, 2DLPP l () represents the two-dimensional locality preserving projection algorithm, represents a real vector space of dimension k1×k2;
[0039] S55. For each sample in the reshaped training set, the sample is convolved using the L1 convolution filters obtained in step S54 to obtain L1 first features, and the L1 first features constitute the hierarchical convolution sample corresponding to the sample.
[0040] Specifically, in step S55, each sample in the reshaped training set is convolved using L1 convolution filters obtained in step S54 to obtain L1 first features, which can be expressed as:
[0041]
[0042] Among them, I i Represents the i=1,2,…,Nth sample in the reshaped training set, represents the i-th sample I i And the lth convolution filter W in the first stage network l 1 The first feature obtained by convolution. * indicates the convolution operation.
[0043] Specifically, to ensure that the samples do not change before and after the convolution, the results are zero-padded at the edges after each convolution operation.
[0044] S6. Perform sampling and de-averaging operations on each hierarchical convolution sample in the hierarchical convolution sample set to obtain a second new data matrix; based on the hierarchical convolution sample set and the second new data matrix, obtain the convolution matrix through the second stage network.
[0045] Specifically, taking the hierarchical convolution sample set as input, performing the same operation as step S5, step S6 specifically includes:
[0046] S61. Use a filter of size k1×k2 to sample the lth first feature of the i=1, 2, ..., Nth hierarchical convolution sample in the hierarchical convolution sample set with a block size of k1×k2, and concatenate all sample blocks obtained by sampling the lth first feature of the i-th hierarchical convolution sample to generate a second sample block;
[0047] S62. Perform a de-meaning operation on each sample block in the second sample block to obtain a second processed sample block matrix;
[0048] S63. Construct a second new data matrix X2 using all second processed sample block matrices;
[0049] S64. Process the second new data matrix X2 using a two-dimensional local preservation projection algorithm to obtain L2 convolution filters, expressed as:
[0050]
[0051] in, represents the qth convolution filter in the second stage network, represents the projection function, 2DLPP l () represents the two-dimensional locality preserving projection algorithm, represents the set of all real vectors of length k1×k2;
[0052] S65. For each first feature of each hierarchical convolution sample in the hierarchical convolution sample set, convolution operation is performed using the L2 convolution filters obtained in step S64 to obtain L2 second features, and the L2 second features are combined into a convolution feature corresponding to the first feature; the convolution features corresponding to the L1 first features of the same hierarchical convolution sample form a global feature, and finally the N global features are combined into a convolution matrix output.
[0053] Specifically, the convolution operation is performed on each first feature using the L2 convolution filters obtained in step S64, and the corresponding convolution feature can be expressed as:
[0054]
[0055] in, Represents the i-th sample I in the reshaped training set i And the lth convolution filter W in the first stage network l 1 The first feature obtained by convolution, Indicates the first feature The corresponding convolutional features.
[0056] Specifically, the 2D locality preserving projection algorithm is an unsupervised method that is directly applicable to matrices, assuming that α is an m-dimensional unit column vector and X i Representing an image with m rows and n columns, the two-dimensional local preservation projection algorithm can directly transform the image X i Projecting onto the unit column vector α, the method is as follows:
[0057] Y i =α T X i
[0058] Y i Represents image X i The projection result.
[0059] The objective function of the two-dimensional local preservation projection algorithm is expressed as follows:
[0060]
[0061] A ij Represents image X i With image X j The cosine similarity of is defined as follows:
[0062]
[0063] β i and β j They are image X i With image X j In vector form, the minimization objective function of the two-dimensional local preservation projection algorithm can be expressed as:
[0064]
[0065] Among them, X represents the original high-dimensional data matrix, L represents the local preservation matrix, and I n represents the n-order identity matrix;
[0066] Adding Constraints The minimization objective function is transformed into the following eigenvalue problem:
[0067]
[0068] S7. Perform binarization and histogram processing on the convolution matrix through the output layer to obtain extended histogram features.
[0069] Specifically, step S7 specifically includes:
[0070] S71. Binarize each convolution feature in the convolution matrix to obtain the corresponding binary matrix where H(·) is the Heaviside step function, assigned a positive value of 1 and otherwise 0.
[0071] S72. Binarize the matrix Convert to a decimal number. This operation converts the convolution feature The L2 second convolution features in are converted into a single integer image, regardless of the order of the L2 second convolution features and weights. The following formula describes this process:
[0072]
[0073] Each pixel is in the range Then, for each integer image T il , l=1,…,L1, it is divided into binary blocks, calculate the decimal value histogram corresponding to each binary block, and The decimal value histograms are connected into a vector, denoted as Bhist(T i l ).
[0074] S73. Concatenate the vectors corresponding to the L1 convolution features of each global feature to obtain an original image feature, expressed as:
[0075]
[0076] Among them, f i represents the i-th original image feature; all original image features are combined to obtain the extended histogram feature F = {f1,f2,..,f N}.
[0077] S8. Using extended histogram feature F = {f1,f2,..,f N}Train the support vector machine to obtain a fault diagnosis model; input the data to be diagnosed into the fault diagnosis model to obtain the diagnosis result.
[0078] In the embodiment, the Figure 3 The different data sets shown implement the content of the present method, thereby verifying the effectiveness of the present method.
[0079] Table 1 Case Western Reserve University bearing data set test accuracy
[0080]
[0081] Table 2 Test accuracy of the University of Connecticut gear dataset
[0082]
[0083] Table 3 Test accuracy of bearing dataset of Polytechnic University of Turin
[0084]
[0085] Table 4 Test accuracy of the bearing data set of the Mechanical Failure Prevention Technology Association
[0086]
[0087] Table 5 Test accuracy of the University of Ottawa bearing dataset
[0088]
[0089] The above test results are all obtained through the steps of the present invention. The first row in the table above indicates the proportion of the number of training samples to the total number of samples, such as 1% means that the number of training samples is 1% of the total number of samples; the data items in the table represent the accuracy, such as 70.93, which means that the accuracy of the item is 70.93%. Batch_size and epochs are uniformly set to 128 and 500 respectively. The local structure convolutional neural network (LPPNet_SVM) provided by the present invention obtains and sets the best k1×k2 and L1×L2 by grid search to 5×5 and 8×8 respectively. It can be seen from the table above that: 1. As an improvement of PCANet, the present invention has achieved good results on all data sets, and compared with PCANet, especially when the proportion of training samples is low, the accuracy is improved by more than 10%. 2. The present invention obtains relatively high accuracy on all data sets when the training samples are 1% and 5%, and far exceeds other convolutional neural networks, indicating that the present invention has great advantages on small sample data sets.
[0090] In the present invention, unless otherwise clearly stipulated and limited, the terms such as "installation", "setting", "connection", "fixation" and "rotation" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral one; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium; it can be the internal connection of two elements or the interaction relationship between two elements. Unless otherwise clearly defined, ordinary technicians in this field can understand the specific meanings of the above terms in the present invention according to the specific circumstances.
[0091] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A fault diagnosis method based on local structure convolutional neural network, characterized in that: The following steps are involved: S1. Obtain a one-dimensional vibration data set and perform cutting and stacking processing to obtain a preprocessed data set, and divide the preprocessed data set into a training set and a test set; S2. reshape each sample in the training set to obtain a reshaped training set; S3. construct a local structure convolutional neural network, which includes a first-stage network, a second-stage network and an output layer; initialize the parameters of the local structure convolutional neural network, including filter size, the number of first-stage filters and the number of second-stage filters; S4. Based on the reshaped training set, grid search is used to obtain the optimal filter size k1×k2, the optimal number of first-stage filters L1, and the optimal number of second-stage filters L2 of the local structure convolutional neural network; S5. Sampling and removing the mean operation on each sample in the reshaped training set obtains a first new data matrix; based on the reshaped training set and the first new data matrix, obtaining a hierarchical convolution sample set through the first stage network; S6. Perform sampling and de-averaging operations on each hierarchical convolution sample in the hierarchical convolution sample set to obtain a second new data matrix; based on the hierarchical convolution sample set and the second new data matrix, obtain a convolution matrix through a second-stage network; S7. Binarize and histogram the convolution matrix through the output layer to obtain an extended histogram feature; S8. Use the extended histogram feature to train the support vector machine to obtain a fault diagnosis model; input the data to be diagnosed into the fault diagnosis model to obtain a diagnosis result.
2. A fault diagnosis method based on local structure convolutional neural network according to claim 1, characterized in that: Step S1 performs cutting and stacking processing on the one-dimensional vibration data set, including: for each one-dimensional vibration data, cutting once every 1024 data points in time sequence to obtain a plurality of cutting data, each cutting data is used as a sample to form a preprocessing data set.
3. A fault diagnosis method based on local structure convolutional neural network according to claim 1, characterized in that: Step S2 reshapes each sample in the training set, including: S21. normalize the samples and reshape them into integer grayscale values in the range of [0,255]; S22. performing L2 norm normalization on the integer grayscale image value to obtain a normalized integer grayscale image value; S23. According to the local convolutional neural network input size m×n, the normalized integer grayscale image values are reshaped into samples of size m×n, where m represents the rows of the data matrix and n represents the columns of the data matrix.
4. A fault diagnosis method based on local structure convolutional neural network according to claim 1, characterized in that: Step S5 specifically includes: S51. Use a filter of size k1×k2 to sample the i=1, 2, ..., N samples in the reshaped training set with a block size of k1×k2, and cascade to generate the first sample block represents the j-th sample block of the i-th sample, represents an integer upwards, N represents the number of samples in the reshaped training set; the size of all samples in the reshaped training set is m×n, represents a real vector space of dimension k1×k2; S52. For the first sample block Perform a mean removal operation on each sample block in the matrix to obtain the first processed sample block matrix S53. Use the first processed sample block matrix corresponding to the N samples to construct a first new data matrix X1. The first new data matrix represents a matrix space with k1×k2 rows and Nmn columns; Nmn represents the number of sample blocks, which is N×m×n; S54. Process the first new data matrix X1 using a two-dimensional local preservation projection algorithm to obtain L1 convolution filters, expressed as: Among them, W l 1 represents the lth convolution filter in the first stage network, represents the projection function, 2DLPP l () represents the two-dimensional locality preserving projection algorithm, represents the set of all real vectors of length k1×k2; S55. For each sample in the reshaped training set, the sample is convolved using the L1 convolution filters obtained in step S54 to obtain L1 first features, and the L1 first features constitute the hierarchical convolution sample corresponding to the sample.
5. A fault diagnosis method based on local structure convolutional neural network according to claim 4, characterized in that: Step S6 specifically includes: S61. Use a filter of size k1×k2 to sample the lth first feature of the i=1, 2, ..., Nth hierarchical convolution sample in the hierarchical convolution sample set with a block size of k1×k2, and cascade to generate a second sample block; S62. Perform a de-meaning operation on each sample block in the second sample block to obtain a second processed sample block matrix; S63. Construct a second new data matrix X2 using all second processed sample block matrices; S64. Process the second new data matrix X2 using a two-dimensional local preservation projection algorithm to obtain L2 convolution filters, expressed as: Among them, W l 2 represents the lth convolution filter in the second stage network, represents the projection function, 2DLPP l () represents the two-dimensional locality preserving projection algorithm, represents a real vector space of dimension k1×k2; S65. For each first feature of each hierarchical convolution sample in the hierarchical convolution sample set, respectively use the L2 convolution filters obtained in step S64 to perform convolution operations to obtain L2 second features, and combine the L2 second features into a convolution feature; the convolution features corresponding to the L1 first features of each hierarchical convolution sample form a global feature, and finally combine the N global features into a convolution matrix output.
6. A fault diagnosis method based on local structure convolutional neural network according to claim 5, characterized in that: The minimization objective function of the two-dimensional local preservation projection algorithm is expressed as: Among them, α represents the unit column vector, Y i Represents image X i The projection result, Y j Represents image X j The projection result, A ij Represents image X i With image X j The cosine similarity of X represents the original high-dimensional data matrix, L represents the local preservation matrix, and I n It represents the n-th order identity matrix; Adding Constraints The minimization objective function is transformed into the following eigenvalue problem:
7. A fault diagnosis method based on local structure convolutional neural network according to claim 5, characterized in that: The convolution matrix is binarized and histogram processed through the output layer to obtain the extended histogram features, including: S71. For each convolution feature in the convolution matrix Perform binarization to obtain the corresponding binarization matrix in, Represents the i-th sample I in the reshaped training set i and the l=1,2,…,L1 convolutional filters W in the first stage network l 1 The first feature obtained by convolution, Represents the first feature The corresponding convolution feature, H(·) is the Heaviside step function; S72. Binarize the matrix Convert to an integer image T i l , expressed as: The integer image T i l Divide into binary blocks, and calculate the decimal value histogram corresponding to each binary block, and then The decimal value histograms are connected into a vector Bhist(T i l ); S73. Concatenate the vectors corresponding to the L1 convolution features of each global feature to obtain an original image feature, expressed as: Among them, f i represents the i-th original image feature; all original image features are combined to obtain the extended histogram feature F = [f1,f2,..,f N ].