Small Sample Bearing Fault Diagnosis Method Based on Adaptive Subspace of Two-Dimensional Grayscale Image
By converting the bearing vibration signal into two-dimensional grayscale images and building an adaptive subspace network model, the problem of insufficient feature representation extraction and classification accuracy in small sample bearing fault diagnosis is solved, and better classification accuracy and generalization performance are achieved , achieving 99.83% accuracy.
Patent Information
- Application Number
- CN202210673986.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-15
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2042-06-15
AI Technical Summary
The existing small sample bearing fault diagnosis methods have insufficient characteristics and classification accuracy, and have poor generalization performance, especially in the case of limited fault samples, which is difficult to effectively diagnose.
Adaptive subspace method based on two-dimensional grayscale images is adopted to collect bearing vibration signals through sensors, convert them into two-dimensional grayscale images, and construct an adaptive subspace network model, and extract feature vectors using multi-layer convolutional neural networks, and use Truncate the singular value decomposition and softmax function to optimize the subspace, maximizing the distance between fault categories to improve the robustness of the classifier.
The original information of the data is effectively retained, the feature representation extraction ability is improved, and the classification accuracy and generalization performance of bearing failures is significantly improved, achieving 99.83% accuracy.
Smart Images

Figure CN115046766B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of bearing fault diagnosis methods, and in particular to a small sample bearing fault diagnosis method based on a two-dimensional grayscale image adaptive subspace. Background Art
[0002] Rolling bearings are one of the most important parts in mechanical equipment, and they are also one of the parts that are prone to failure. The occurrence of bearing failure will cause certain economic losses and time losses, and more seriously may threaten life. Therefore, it is very important to diagnose the bearing vibration signal.
[0003] In recent years, fault diagnosis technology based on deep learning has attracted widespread attention because it avoids excessive reliance on humans and improves the efficiency of fault diagnosis. However, most of these technologies require a large amount of training data. However, in actual engineering applications, it is very difficult and expensive to collect a large number of signal samples of various fault types. Small sample learning can learn fault diagnosis knowledge from limited fault samples, does not require a large number of samples for training, and has strong diagnostic and generalization capabilities.
[0004] The adaptive subspace method is a small sample learning method based on metric learning. It is different from the prototype classification method of small sample learning, which performs classification in a unified feature space. The subspace classification method establishes a subspace for each fault type and classifies in the subspaces of multiple fault types. Compared with the unified feature space, the subspace can establish a more accurate model for each fault type, thus obtaining better fault diagnosis results. Summary of the invention
[0005] The technical problem to be solved by the present invention is how to provide a small sample bearing fault diagnosis method which is more conducive to feature representation extraction, can better classify, and has better generalization performance.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is: a small sample bearing fault diagnosis method based on two-dimensional grayscale image adaptive subspace, characterized by comprising the following steps:
[0007] Collect n bearing vibration signals of different fault types through sensors;
[0008] The bearing vibration signal is sampled according to the length b, b is the square of a natural number, and the step length w, and converted into a two-dimensional grayscale image to form a data set;
[0009] Select k samples from each fault type of the data set to form a support set S, and select h samples to form a query set Q;
[0010] Construct an adaptive subspace network model for bearing fault diagnosis;
[0011] Input the support set S and query set Q into the adaptive subspace network model and obtain a dynamic classifier through training;
[0012] The trained dynamic classifier network model is used for testing to obtain the classification results.
[0013] The beneficial effects of adopting the above technical solution are: the method described in the present invention converts a one-dimensional vibration signal into a two-dimensional grayscale image as input, which better retains the original information of the data; using the grayscale image as input is more conducive to the representation and extraction of features, and adopts a metric-based dynamic subspace method to classify the bearing fault types, which has better classification accuracy and better generalization performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0015] Figure 1 A flowchart of the method according to an embodiment of the present invention;
[0016] Figure 2 A grayscale image sample diagram of the bearing vibration signal conversion used in the embodiment of the present invention;
[0017] Figure 3 A structural diagram of an adaptive subspace network model used in an embodiment of the present invention;
[0018] Figure 4 is a loss curve during the training process of an embodiment of the present invention;
[0019] Figure 5 This is an accuracy curve during the training process of the embodiment of the present invention. DETAILED DESCRIPTION
[0020] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings 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.
[0021] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0022] like Figure 1 As shown, the embodiment of the present invention discloses a small sample bearing fault diagnosis method based on a two-dimensional grayscale image adaptive subspace, which specifically includes the following steps:
[0023] Step 1): collecting bearing vibration signals of n different fault types through sensors;
[0024] Step 2): Sample the bearing vibration signal according to the length b (b is the square of a natural number, b = L × L) and step length w, and convert it into a two-dimensional grayscale image to form a bearing fault data set. Figure 2 Grayscale images of bearing vibration signals of four different fault categories are shown;
[0025] Specifically, the method of converting the vibration signal into a two-dimensional grayscale image is:
[0026] First, the one-dimensional bearing vibration signal sample with a length of b is converted into a two-dimensional matrix A of L×L, and the formula is as follows:
[0027] A(e, f) = G(L×(e-1)+f)
[0028] Where: G() is a two-dimensional matrix conversion function, and A(e, f) (e, f∈(0, L]) is the value of the element in the e-th row and the f-th column in the converted matrix.
[0029] Then the two-dimensional matrix A is converted into a grayscale image D. The specific operation is to normalize the two-dimensional matrix, that is, compress the values in it to the range of 0 to 1; then multiply it by 255 to convert it into the pixel value of the two-dimensional grayscale image. The formula is as follows:
[0030]
[0031] Where: D(e, f) (e, f∈(0, L]) is the pixel value of the e-th row and f-th column in the grayscale image matrix of the bearing vibration signal, max(A) is the maximum value of the elements in the matrix A, and min(A) is the minimum value of the elements in the matrix A.
[0032] Step 3): Select k samples from each fault type in the data set to form a support set S, and select h samples to form a query set Q;
[0033] Step 4): Construct an adaptive subspace network model for bearing fault diagnosis. The model consists of two parts: feature extractor f θ With classifiers such as Figure 3 As shown;
[0034] Among them, the feature extractor f θ It is composed of a multi-layer convolutional neural network (can be 3, 4, 5...10 layers). Through the feature extractor fθ Map the grayscale image D to the feature space to obtain the corresponding feature vector f θ (D) and subtract it from the average value of the characteristic vector of each type of bearing fault.
[0035] Specifically, take the i-th grayscale image sample x of bearing fault category C c,i , using the feature extractor f θ Extract sample x c,i The characteristics of the feature vector f θ (x c,i ). Then, the average value μ of the feature vector of the bearing fault category C is c Do the difference to get the set The formula is as follows:
[0036]
[0037]
[0038] Where: μ c is the mean of the characteristic vectors of bearing fault category C, f θ () is the feature extraction function.
[0039] Will gather The subspace P of the bearing fault category C is constructed by truncating the singular value decomposition matrix. c (c∈[1,n]), where the subspace P c (c∈[1,n]) is generated by the support set samples of fault category C. Different support set samples are used, and the subspace P c are also different, so the generated subspace P c It is called adaptive subspace.
[0040] Specifically, the set obtained by the bearing fault category C Perform singular value decomposition, the formula is as follows:
[0041]
[0042] Where U and V are k×k dimensional matrices composed of k eigenvectors, ∑ is a k×k dimensional matrix with k eigenvalues as the main diagonal;
[0043] Then select the first z dimensions in U to obtain the truncated matrix P of the bearing fault category C c , because P c The basis of is orthogonal, so P c As a subspace of bearing fault category C.
[0044] Step 5): Use the query sample set Q to optimize the subspace so that the subspace P of different fault typesc The distance between (c∈[1,n]) is maximized, and the subspace has better discrimination ability, resulting in a more robust fault classifier.
[0045] Among them, the optimization method of the subspace is as follows:
[0046] (1) Input sample q in query set Q into feature extractor f θ Get the eigenvector f θ (q), calculate f θ (q) to each fault category subspace P c The distance d between (c∈[1,n]) i (q), and use the softmax() function to calculate the probability that the query sample q belongs to each bearing fault category; then use the projection F-norm to calculate the probability of each two fault category subspaces P c (c∈[1,n]) The distance between them; Calculate the loss function L t , and through back propagation, each two fault category subspaces P c The distance between (c∈[1,n]) is maximized and the feature extractor network parameters are updated. Finally, a dynamic classifier is obtained through training, which can recognize and classify new categories with a small number of samples.
[0047] Specifically, calculate the feature vector f of the query sample q θ (q) to the bearing fault category C subspace P c The distance d between (c∈[1,n]) c (q), the formula is as follows:
[0048] d c (q)=-||(IM c )(f θ (q)-μ c )|| 2
[0049] Where: M c =P c P c T .
[0050] The probability that the query sample q belongs to each bearing fault category is calculated by the softmax() function, and the formula is as follows:
[0051]
[0052] The projected F-norm is used to calculate the distance between each two bearing category subspaces. The formula is as follows:
[0053]
[0054] Where: P l and P j is the basis of the subspace of the given two bearing fault categories, and z is the dimension of the subspace.
[0055] (2) To obtain the fault category subspace P c (c∈[1n]) has better separability and improves the ability to identify the faulty bearing type. Here, by maximizing the fault category subspace P c (c∈[1,n]) to achieve this, that is, to minimize Specifically, by minimizing the following L t To get:
[0056]
[0057] Where: the first term is the classification loss, n is the number of fault categories, k is the number of samples for each fault category; the second term is to make each fault category subspace P c (c∈[1,n]), where λ is a custom parameter.
[0058] Minimize the loss function L t The value is obtained by back propagation training. The parameters of the adaptive subspace classification model are updated. By training the model, a classifier is obtained, which can classify the bearing fault category with a small number of samples.
[0059] Step 6): Input the test sample into the tested adaptive network model to obtain the classification result;
[0060] Specifically, the test sample t is passed into the feature extractor f θ , and obtain the feature vector f θ (t). Then calculate f θ (t) to each fault category subspace P c The distance d between (c∈[1,n]) c (t); then the softmax() function is used to calculate the probability that the test sample t belongs to each bearing fault category, and the category with the largest probability is defined as the fault category of the test sample.
[0061] The present invention is explained by taking a specific bearing fault classification experiment as an example. In this embodiment, bearing vibration data from Case Western Reserve University in the United States are used. In this experiment, 4 types of bearing vibration data are selected, including 1 normal data and 3 data of different fault types. Each data is divided into 1024 lengths and 100 steps and sampled. It is converted into a two-dimensional grayscale image with a scale of 32×32 to form a data set. During the training process, 5 samples are randomly selected from each category in the training set in each round to form a support set, and 15 samples are randomly selected from each category in the validation set to form a query set. The support set and the query set are passed into the model for training. In this example, the number of training times is set to 100 and the learning rate is 0.001. The loss curve saved during the training process is shown as follows. Figure 4 As shown, the accuracy curve is as Figure 5 As shown in Figure 2, the trained model was tested using the test set, and the accuracy reached 99.83%.
Claims
1. A small sample bearing fault diagnosis method based on two-dimensional grayscale image adaptive subspace, characterized in that The steps include: Collect n bearing vibration signals of different fault types through sensors; The bearing vibration signal is sampled according to the length b, b is the square of a natural number, and the step length w, and converted into a two-dimensional grayscale image to form a data set; Select k samples from each fault type of the data set to form a support set S, and select h samples to form a query set Q; Construct an adaptive subspace network model for bearing fault diagnosis; Input the support set S and query set Q into the adaptive subspace network model and obtain a dynamic classifier through training; Use the trained dynamic classifier network model to test and obtain the classification results; The formula for converting the bearing vibration signal into a grayscale image is as follows: A(e, f) = G(L×(e-1)+f) Where: G() is a two-dimensional matrix conversion function, A(e, f) is the value of the element in the e-th row and the f-th column of the converted matrix, e, f∈(0, L); D(e, f) is the pixel value in the e-th row and the f-th column of the bearing vibration signal grayscale image matrix, e, f∈(0, L); max(A) is the maximum value of the elements in the matrix A, and min(A) is the minimum value of the elements in the matrix A; The method for constructing an adaptive subspace network model for bearing fault diagnosis and training the model includes the following steps: The adaptive subspace network model for bearing fault diagnosis consists of two parts: feature extractor f θ with dynamic classifiers; Feature Extractorf θ It is composed of a multi-layer convolutional neural network, through the feature extractor f θ Map the grayscale image D to the feature space to obtain the corresponding feature vector f θ (D), and subtract it from the average value of the characteristic vector of each type of bearing fault; Will gather The adaptive subspace P of the fault category C is constructed by truncating the singular value decomposition matrix. c (c∈[1,n]); Input the support set S and query set Q into the adaptive subspace network model and obtain a dynamic classifier through training; The query sample q is passed through the feature extractor f θ Get the eigenvector f θ (q), calculate f θ (q) to the bearing fault category C subspace P c The distance d between (c∈[1,n]) c (q); The softmax() function is used to calculate the probability between the query sample and each category; The projection metric is calculated using the projected F-norm to maximize the distance between each bearing category subspace; The parameters of the adaptive subspace classification model are updated by back-propagation training through minimizing the loss function value. By training the model, a dynamic classifier is obtained, which can classify new categories with a small number of samples.
2. The small sample bearing fault diagnosis method based on two-dimensional grayscale image adaptive subspace as claimed in claim 1 is characterized in that: The method for converting the bearing vibration signal into a grayscale image comprises: First, the one-dimensional bearing vibration signal sample with a length of b is converted into a two-dimensional matrix A of L×L, and then the two-dimensional matrix A is converted into a grayscale image D. The specific operation is to normalize the two-dimensional matrix, that is, compress the values in it to the range of 0 to 1, and then multiply it by 255 to convert it into the pixel value of the two-dimensional grayscale image.
3. The small sample bearing fault diagnosis method based on two-dimensional grayscale image adaptive subspace as claimed in claim 1 is characterized in that: The formula for the difference between the characteristic vector and the average value of the characteristic vector of each type of bearing fault is as follows: Where: μ c is the mean of the characteristic vectors of bearing fault category C, f θ () is the feature extraction function; The singular value decomposition formula is as follows: Where U and V are k×k dimensional matrices composed of k eigenvectors, ∑ is a k×k dimensional matrix with k eigenvalues as the main diagonal; The calculation f θ (q) to the fault category C subspace P c The distance d between (c∈[1,n]) c (q) The formula is as follows: d c (q)=-||(I-M c )(f θ (q)-μ c )|| 2 Where: M c =P c P c T ; The softmax() function formula is as follows: The projection F-norm formula and loss function formula are as follows: Where: P l and P j is the basis of the given two bearing fault category subspaces, and z is the dimension of the subspace; The loss function is as follows: Where: the first term is the classification loss, n is the number of fault categories, k is the number of samples for each fault category; the second term is to make the fault category subspace P c (c∈[1,n]), where λ is a custom parameter.
Citation Information
Patent Citations
Motor bearing fault diagnosis method and device
CN110068462A
Bearing fault intelligent diagnosis method and diagnosis system, computer equipment and medium
CN112633339A
Motor bearing fault diagnosis method based on one-dimensional data enhancement and CNN
CN113203566A
device for monitoring the temperature of lithium-based accumulators in battery packs
DE202017006725U1
Bearing failure mode diagnosis method using small sample data sets, and system
WO2022077901A1
