A bearing fault diagnosis method and system based on small samples
The twin neural network model addresses the challenge of limited data in bearing fault diagnosis by grouping samples with same or different labels, improving fault diagnosis accuracy and generalization ability.
Patent Information
- Application Number
- CN202210832171.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-15
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2042-07-15
AI Technical Summary
Bearing fault diagnosis using deep learning faces challenges due to the difficulty in obtaining sufficient training data, especially under varying working conditions, leading to poor generalization ability and data imbalance.
A method utilizing a twin neural network model that combines signal samples with same or different fault category labels into sample pairs, trained with an N-shot K-way test method, to adapt to limited data and improve fault diagnosis accuracy and generalization.
The method effectively diagnoses bearing faults with limited samples, avoiding high preprocessing costs and maintaining key signal information, enhancing accuracy and robustness under varying conditions.
Smart Images

Figure CN115081490B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of bearing fault diagnosis, and more specifically, to a bearing fault diagnosis method and system based on a small sample. Background Art
[0002] Fault diagnosis is widely used in many fields such as manufacturing, aerospace, automobile, power generation, transportation, etc. In recent years, with the rapid development of deep learning, intelligent fault diagnosis technology based on deep learning avoids reliance on time-consuming and unreliable manual analysis, improves fault diagnosis efficiency, and has attracted widespread attention.
[0003] Bearing fault diagnosis monitors the operating status of bearings under actual working conditions, thereby preventing bearing failures from causing system crashes without stopping the production line. Deep learning is an effective technical means. However, bearing fault diagnosis based on deep learning generally requires a large amount of training data. In actual fault diagnosis, the signals of the same fault often vary greatly under different working conditions, resulting in major challenges in fault diagnosis. It is often impossible to obtain enough samples to make the classifier robust to each fault type. There may be several reasons for this: (1) Due to adverse consequences, industry systems do not allow bearings to enter a fault state, especially for critical systems and faults; (2) Most electromechanical faults occur slowly and follow a degradation path. Therefore, the system's fault degradation may take months or even years, which makes it difficult to collect relevant data sets; (3) The working conditions of mechanical systems are very complex and often change according to production requirements. It is unrealistic to collect and label enough training samples; (4) In practical applications, fault categories and working conditions are usually unbalanced. Therefore, it is difficult to collect enough samples for each fault type under different working conditions.
[0004] A bearing fault diagnosis scheme is disclosed in the prior art, which adopts a hierarchical adaptive deep convolutional neural network, which has two hierarchically organized components: a fault determination layer and a fault size assessment layer. Among them, the learning rate is dynamically changed to maintain a better trade-off between training speed and accuracy. The ADCNN model of the first layer is based on the classic LeNet5 model proposed by LeCun, with 9 layers and a batch size of 100, and SoftMax is used in the classification layer. Among them, there are a total of 4 data types, one is a "healthy" bearing class, and the other three are faulty bearings (outer ring, inner ring, and shape). This scheme makes the accuracy of identifying fault types reach 97.7%. Although the use of an adaptive deep convolutional neural network model can achieve a high fault diagnosis accuracy, there are many actual data types, because the vibration signals of the bearings collected under different load operating conditions such as horsepower and motor speed are different and the fault types are far less than 3. In addition, there is also a data imbalance problem, because the data set used in the scheme is artificially simulated, which is very different from the naturally generated bearing fault data, so the generalization ability of the model is poor. Summary of the invention
[0005] In order to solve the problem of how to use limited data for bearing fault diagnosis, the present invention provides a bearing fault diagnosis method and system based on small samples, which overcomes the defect that it is difficult to obtain a sufficient number of samples in data-driven fault diagnosis, is effective for fault diagnosis and improves generalization ability.
[0006] In order to achieve the above technical effects, the technical solution of the present invention is as follows:
[0007] A bearing fault diagnosis method based on a small sample, the method comprising the following steps:
[0008] S1. Collect the original vibration signal of the bearing, label the original vibration signal with a fault category label, and obtain a signal sample with a label;
[0009] S2. Signal samples with the same or different fault category labels are grouped into sample pairs, and several sample pairs constitute a training set;
[0010] S3. construct a twin neural network model, input the training set into the twin neural network model and train the model to obtain a trained twin neural network model;
[0011] S4. Randomly select a number of signal samples from the training set to form a support data set for each time, use the N-shot K-way test method, use each support data set to test the trained twin neural network model, and output the probability distance;
[0012] S5. Determine the fault category based on the probability distance.
[0013] This technical solution is used for rolling bearing fault diagnosis with limited sample data. First, the original vibration signal of the bearing is collected to avoid the high cost of the current signal preprocessing operation and the adverse consequences of easily shielding the key information of the original signal. The core is based on the twin neural network, which combines signal samples with the same or different fault category labels into sample pairs, trains and tests the twin neural network, and finally uses the N-shot K-way algorithm to adapt to the lack of bearing fault data, overcomes the current defect of difficulty in obtaining a sufficient number of samples in data-driven fault diagnosis, is effective for fault diagnosis and improves generalization ability.
[0014] Preferably, let a signal sample be represented as x r , r = 1, 2, ..., k, assuming that a single sample has k fault categories labeled, then the signal sample with labels is represented as: (x1, y1), ..., (x k ,y k ).
[0015] Preferably, the signal samples constitute a sample pair represented by (X i1 , X i2 ), where X i1 With X i2 A general term for signal samples with the same or different fault category labels. i represents a batch. In a training set consisting of several sample pairs, there are sample pairs with the same fault category labels and there are also sample pairs with different fault category labels.
[0016] Preferably, in step S3, the twin neural network model includes two deep convolutional neural networks WDCNN with the same structure, and the two deep convolutional neural networks WDCNN share weights. After the training set is input into the twin neural network model, the twin neural network model extracts the features of the signal samples in the training set to obtain a feature vector. Finally, based on the feature vector and combined with the metric formula, the probability of the fault category to which the signal samples in the training set belong is calculated, and the fault category corresponding to the maximum value of the probability is taken as the output fault category.
[0017] Preferably, let a pair of samples in the training set be i represents a batch. The twin neural network model extracts the features of the sample to the signal sample in the training set. The obtained feature vectors are expressed as and f() represents the feature vector extraction operation through the twin neural network model, and the measurement formula is:
[0018]
[0019] in, It represents the distance of the characteristic vector output of the twin neural network model for the signal sample, that is, whether the two signal samples are considered to be very similar or very different after the output of the twin neural network model. The probability calculation formula is:
[0020]
[0021] Among them, FC is a dense fully connected layer, sigm is the sigmoid function, Represents sample pairs The probability that two signal samples belong to the same fault category.
[0022] Preferably, when the training set is input into the twin neural network model and the model is trained, is a vector of length M, which contains the label of the batch; when and From the same fault category, let Otherwise, Among them, j is the jth sample pair from the first batch, and the selected loss function is a regularized cross entropy:
[0023]
[0024] in, Represents the loss function. During the training process, the Adam optimizer is used to optimize the twin neural network model, implement gradient updates, and calculate the individual adaptive learning rate of each network parameter. The network parameter updates include:
[0025]
[0026]
[0027]
[0028]
[0029]
[0030] Among them, W (T) Indicates the parameters of epoch T, L (T) is the loss function, β1 and β2 are the forgetting factors of the first moment and the second moment of the gradient respectively, m and V are moving averages, and the training is completed when the set epoch is reached.
[0031] Preferably, in step S4, an N-shot K-way test method is used to test the trained twin neural network model using each support data set, and N probability vectors (P1, P2, ..., PN) are output; a support set is represented as:
[0032] S={(x1,y1),...,(x k ,y k )}
[0033] Among them, the support set contains k signal samples, y k Represents the fault category label. For the test signal sample x^, the test sample is classified according to the most similar sample in the support set. The expression is:
[0034] C(x^, S) = argmax c (P(x^,x c )), x c ∈S;
[0035] In the N-shot K-way test, a support set consisting of K different fault categories is given, each category has N signal samples (S1, ..., S N ), the test sample is classified according to the most similar sample in the support set, and the expression is:
[0036] The largest sum of probabilities indicates that the signal sample has the greatest possibility of belonging to this fault category.
[0037] The present application also proposes a bearing fault diagnosis system based on a small sample, the system comprising:
[0038] The collection and labeling module is used to collect the original vibration signal of the bearing, label the original vibration signal with a fault category label, and obtain a signal sample with a label;
[0039] The training set construction module combines signal samples with the same or different fault category labels into sample pairs, and several sample pairs constitute the training set;
[0040] A model building and training module is used to build a twin neural network model, input a training set into the twin neural network model and train the model to obtain a trained twin neural network model;
[0041] The test module randomly selects several signal samples from the training set to form a supporting data set for each time. The N-shot K-way test method is used to test the trained twin neural network model using the supporting data set for each time, outputs the probability distance, and determines the fault category based on the probability distance.
[0042] Preferably, the model constructed by the model construction training module is a twin neural network model, including two deep convolutional neural networks WDCNN with the same structure, and the two deep convolutional neural networks WDCNN share weights. After the training set is input into the twin neural network model, the twin neural network model extracts the features of the signal samples in the training set to obtain a feature vector. Finally, based on the feature vector and combined with the metric formula, the probability of the fault category to which the signal samples in the training set belong is calculated, and the fault category corresponding to the maximum value of the probability is taken as the output fault category.
[0043] Preferably, in the process of training the twin neural network model in the model construction training module, the Adam optimizer is used to optimize the twin neural network model to achieve gradient update.
[0044] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:
[0045] The present invention proposes a bearing fault diagnosis method and system based on small samples. First, the original vibration signal of the bearing is collected to avoid the high operating cost of the current signal preprocessing and the adverse consequences of easily shielding the key information of the original signal. The core is based on the twin neural network model, and the signal samples with the same or different fault category labels are composed of sample pairs. The twin neural network is trained and tested, and finally the N-shot K-way algorithm is used to adapt to the lack of bearing fault data, thereby overcoming the defect that it is difficult to obtain a sufficient number of samples in the current data-driven fault diagnosis. The method is effective for fault diagnosis and improves the generalization ability. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A schematic diagram showing a flow chart of a bearing fault diagnosis method based on a small sample proposed in Embodiment 1 of the present invention;
[0047] Figure 2 A diagram showing the training process of the twin neural network model proposed in Example 2 of the present invention;
[0048] Figure 3 A process diagram showing the testing of the twin neural network model proposed in Embodiment 2 of the present invention;
[0049] Figure 4 A structural diagram showing a bearing fault diagnosis system based on a small sample size proposed in Embodiment 3 of the present invention DETAILED DESCRIPTION
[0050] The drawings are for illustrative purposes only and should not be construed as limiting the present patent;
[0051] In order to better illustrate the present embodiment, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the actual size;
[0052] It is understandable to those skilled in the art that descriptions of certain well-known contents in the drawings may be omitted.
[0053] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0054] The positional relationships described in the drawings are only for illustrative purposes and should not be construed as limiting the present patent;
[0055] Example 1
[0056] like Figure 1 As shown, this embodiment proposes a bearing fault diagnosis method based on a small sample, and the method includes the following steps:
[0057] S1. Collect the original vibration signal of the bearing, label the original vibration signal with a fault category label, and obtain a signal sample with a label;
[0058] In this step, the original vibration signal of the bearing is first collected to avoid the current high cost of pre-processing the signal and the adverse consequences of easily shielding the key information of the original signal.
[0059] S2. Signal samples with the same or different fault category labels are grouped into sample pairs, and several sample pairs constitute a training set;
[0060] Suppose a signal sample is represented by x r , r = 1, 2, ..., k, assuming that a single sample has k fault categories labeled, then the signal sample with labels is represented as: (x1, y1), ..., (x k ,y k ).
[0061] Assume that the signal samples form a sample pair represented as (X i1 , X i2 ), where X i1 With X i2 A general term for signal samples with the same or different fault category labels. i represents a batch. In a training set consisting of several sample pairs, there are sample pairs with the same fault category labels and there are also sample pairs with different fault category labels.
[0062] S3. construct a twin neural network model, input the training set into the twin neural network model and train the model to obtain a trained twin neural network model;
[0063] S4. Randomly select a number of signal samples from the training set to form a support data set for each time, use the N-shot K-way test method, use each support data set to test the trained twin neural network model, and output the probability distance;
[0064] S5. Determine the fault category based on the probability distance.
[0065] Example 2
[0066] The small sample-based bearing diagnosis method is used for rolling bearing fault diagnosis with limited sample data. The core is based on a twin neural network model. In this embodiment, the twin neural network model is described. The twin neural network model includes two deep convolutional neural networks WDCNN with the same structure, and the two deep convolutional neural networks WDCNN share weights. After the training set is input into the twin neural network model, the twin neural network model extracts the features of the signal samples in the training set to obtain a feature vector. Finally, based on the feature vector and combined with the metric formula, the probability of the fault category to which the signal sample in the training set belongs is calculated, and the fault category corresponding to the maximum value of the probability is taken as the output fault category.
[0067] Table 1 shows the WDCNN architecture settings in this embodiment. See Table 1. The first row in Table 1 is the number, network layer, kernel size and step size, number of kernels, output size, and the method used by the pooling layer. Then the following rows correspond to the settings, where the network layers include convolution layers, pooling layers, and fully-connected layers.
[0068] Table 1: WDCNN architecture settings
[0069]
[0070] The training process of the twin neural network model is shown in the figure Figure 2 As shown in Figure 2, the model training process includes updating parameters such as learning rate, weight of each network layer, etc. By adjusting these parameters, the accuracy of the model is improved. Figure 2 In the example, the input sample pairs can be sample pairs with the same fault category labels or sample pairs with different fault category labels. Suppose a pair of sample pairs in the training set is i represents a batch. The twin neural network model extracts the features of the sample to the signal sample in the training set. The obtained feature vectors are expressed as and f() represents the feature vector extraction operation through the twin neural network model, and the measurement formula is:
[0071]
[0072] in, It represents the distance of the characteristic vector output of the twin neural network model for the signal sample, that is, whether the two signal samples are considered to be very similar or very different after the output of the twin neural network model. The probability calculation formula is:
[0073]
[0074] Among them, FC is a dense fully connected layer, sigm is the sigmoid function, Represents sample pairs The probability that two signal samples belong to the same fault category.
[0075] That is, overall, the input is in the form of sample pairs, with the structure of the twin neural network model based on WDCNN in the middle, and finally there are two outputs. Then the probability of the fault category to which the signal sample belongs is calculated according to the measurement formula, and the one with the largest probability is defined as belonging to this fault category.
[0076] When the training set is input into the twin neural network model and the model is trained, is a vector of length M, which contains the label of the batch; when and From the same fault category, let Otherwise, Among them, j is the jth sample pair from the first batch, and the selected loss function is a regularized cross entropy:
[0077]
[0078] in, Represents the loss function. During the training process, the Adam optimizer is used to optimize the twin neural network model, implement gradient updates, and calculate the individual adaptive learning rate of each network parameter. The network parameter updates include:
[0079]
[0080]
[0081]
[0082]
[0083]
[0084] Among them, W (T) Indicates the parameters of epoch T, L (T) is the loss function, β1 and β2 are the forgetting factors of the first moment and the second moment of the gradient respectively, m and V are moving averages, and the training is completed when the set epoch is reached.
[0085] The process of testing the twin neural network model is shown in the figure Figure 3As shown in the figure, the N-shot K-way test method is used to test the trained twin neural network model with each support data set, and N probability vectors (P1, P2, ..., PN) are output. In essence, it is the N-times application of small sample learning of a sample, and finally N probability vectors are obtained. The sum of the maximum probabilities indicates that the sample has the greatest probability of belonging to this type. Suppose a support set is expressed as:
[0086] S={(x1,y1),...,(x k ,y k )}
[0087] Among them, the support set contains k signal samples, y k Represents the fault category label. For the test signal sample x^, the test sample is classified according to the most similar sample in the support set. The expression is:
[0088] C(x^, S) = argmax c (P(x^,x c )), x c ∈S;
[0089] In the N-shot K-way test, a support set consisting of K different fault categories is given, each category has N signal samples (S1, ..., S N ), the test sample is classified according to the most similar sample in the support set, and the expression is:
[0090] The largest sum of probabilities indicates that the signal sample has the greatest possibility of belonging to this fault category.
[0091] Example 3
[0092] like Figure 4 As shown, this embodiment proposes a bearing fault diagnosis system based on a small sample, and the system includes:
[0093] The collection and labeling module is used to collect the original vibration signal of the bearing, label the original vibration signal with a fault category label, and obtain a signal sample with a label;
[0094] The training set construction module combines signal samples with the same or different fault category labels into sample pairs, and several sample pairs constitute the training set;
[0095] A model building and training module is used to build a twin neural network model, input a training set into the twin neural network model and train the model to obtain a trained twin neural network model;
[0096] The test module randomly selects several signal samples from the training set to form a supporting data set for each time. The N-shot K-way test method is used to test the trained twin neural network model using the supporting data set for each time, outputs the probability distance, and determines the fault category based on the probability distance.
[0097] The model constructed by the model building training module is a twin neural network model, which includes two deep convolutional neural networks WDCNN with the same structure, and the two deep convolutional neural networks WDCNN share weights. After the training set is input into the twin neural network model, the twin neural network model extracts the features of the signal samples in the training set to obtain the feature vector. Finally, based on the feature vector and combined with the metric formula, the probability of the fault category to which the signal samples in the training set belong is calculated, and the fault category corresponding to the maximum value of the probability is taken as the output fault category.
[0098] In the process of training the twin neural network model in the model construction training module, the Adam optimizer is used to optimize the twin neural network model to achieve gradient update.
[0099] In practice, this embodiment can be used for (1) fault type identification under different noise environments, (2) prediction of new fault types, and (3) prediction of fault types under different load conditions. Moreover, the results of these three experiments show that the accuracy of the model is improved and the robustness is better than that of the comparison model.
[0100] Obviously, the above embodiments of the present invention are only examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. A bearing fault diagnosis method based on a small sample, characterized in that: The method comprises the following steps: S1. Collect the original vibration signal of the bearing, label the original vibration signal with a fault category label, and obtain a signal sample with a label; S2. Signal samples with the same or different fault category labels are grouped into sample pairs, and several sample pairs constitute a training set; S3. construct a twin neural network model, input the training set into the twin neural network model and train the model to obtain a trained twin neural network model; In step S3, the twin neural network model includes two deep convolutional neural networks WDCNN with the same structure, and the two deep convolutional neural networks WDCNN share weights. After the training set is input into the twin neural network model, the twin neural network model extracts the features of the signal samples in the training set to obtain a feature vector. Finally, based on the feature vector and combined with the metric formula, the probability of the fault category to which the signal samples in the training set belong is calculated, and the fault category corresponding to the maximum value in the probability is taken as the output fault category. S4. Randomly select a number of signal samples from the training set to form a support data set for each time, use the N-shot K-way test method, use each support data set to test the trained twin neural network model, and output the probability distance; In step S4, the N-shot K-way test method is used to test the trained twin neural network model using each support data set, and N probability vectors (P1, P2, ..., PN) are output; let a support set be represented as: S={( , ),......,( , )} Among them, support focuses on k signal samples, Indicates the fault category label, for the test signal sample , classify the test sample according to the most similar sample in the support set, the expression is: C( ,S)= (P( )), ; In the N-shot K-way test, a support set consisting of K different fault categories is given, and each category has N signal samples ( ,……, ), the test sample is classified according to the most similar sample in the support set, and the expression is: C( ,( ,……, )) = ( ), , the maximum sum of probabilities indicates that the signal sample has the greatest possibility of belonging to the fault category; S5. Determine the fault category based on the probability distance.
2. The bearing fault diagnosis method based on small samples according to claim 1 is characterized in that: Assume that a signal sample is represented as , r =1,2,..., k , assuming that the single sample has k The fault category is labeled, and the signal sample with label is expressed as: , ),......,( , ).
3. The bearing fault diagnosis method based on small samples according to claim 2 is characterized in that: Assume that the signal samples form sample pairs represented as ( , ),in, and A collective term for signal samples with the same or different fault class labels. i Represents a batch. In the training set consisting of several sample pairs, there are sample pairs with the same fault category labels and there are also sample pairs with different fault category labels.
4. The bearing fault diagnosis method based on small samples according to claim 3 is characterized in that: Suppose a pair of samples in the training set is ( , ), i represents a batch, and the twin neural network model extracts the features of the sample pair signal sample in the training set, and the obtained feature vectors are expressed as f ( )and f ( ), f () represents the feature vector extraction operation through the twin neural network model, and the measurement formula is: ( , )=|| f ( )- f ( )|| in, ( , ) represents the distance between the characteristic vector output of the twin neural network model and the signal sample, that is, whether the two signal samples are considered to be very similar or very different after the output of the twin neural network model. The probability calculation formula is: P( , )=sigm(FC( ( , ))) Among them, FC is a dense fully connected layer, sigm is the sigmoid function, P( , ) represents the sample pair ( , ) belongs to the same fault category.
5. The bearing fault diagnosis method based on small samples according to claim 4 is characterized in that: When the training set is input into the twin neural network model and the model is trained, =y( , ) is a vector of length M, which contains the label of the batch; when and From the same fault category, let =1, otherwise =0, where j is from the first batch j The loss function used is a regularized cross entropy: L( , )= log(P( ))+(1- )log(1-P( ))+ |W Among them, L( , ) represents the loss function. During the training process, the Adam optimizer is used to optimize the twin neural network model, implement gradient updates, and calculate the individual adaptive learning rate of each network parameter. The network parameter updates include: = + (1 - ) = + (1 - ) = = in, Represents the parameters of epoch T, is the loss function, and are the forgetting factors of the first and second moments of the gradient, m and V is the moving average, It is a parameter factor. When the set epoch is reached, the training is completed.
6. A bearing fault diagnosis system based on small samples, characterized in that: The system comprises: The collection and labeling module is used to collect the original vibration signal of the bearing, label the original vibration signal with a fault category label, and obtain a signal sample with a label; The training set construction module combines signal samples with the same or different fault category labels into sample pairs, and several sample pairs constitute the training set; A model building and training module is used to build a twin neural network model, input the training set into the twin neural network model and train the model to obtain a trained twin neural network model; The model constructed by the model building training module is a twin neural network model, which includes two deep convolutional neural networks WDCNN with the same structure, and the two deep convolutional neural networks WDCNN share weights. After the training set is input into the twin neural network model, the twin neural network model extracts the features of the signal samples in the training set to obtain the feature vector. Finally, based on the feature vector and combined with the metric formula, the probability of the fault category to which the signal samples in the training set belong is calculated, and the fault category corresponding to the maximum value of the probability is taken as the output fault category. The test module randomly selects several signal samples from the training set to form a support data set for each time, adopts the N-shot K-way test method, uses each support data set to test the trained twin neural network model, outputs the probability distance, and determines the fault category based on the probability distance; When the trained twin neural network model is tested using each support data set, N probability vectors (P1, P2, ..., PN) are output; let a support set be represented as: S={( , ),......,( , )} Among them, support focuses on k signal samples, Indicates the fault category label, for the test signal sample , classify the test sample according to the most similar sample in the support set, the expression is: C( ,S)= (P( )), ; In the N-shot K-way test, a support set consisting of K different fault categories is given, and each category has N signal samples ( ,……, ), the test sample is classified according to the most similar sample in the support set, and the expression is: C( ,( ,……, )) = ( ), , the one with the largest sum of probabilities indicates that the signal sample has the greatest possibility of belonging to the fault category.
7. The bearing fault diagnosis system based on small samples according to claim 6 is characterized in that: In the process of training the twin neural network model in the model construction training module, the Adam optimizer is used to optimize the twin neural network model to achieve gradient update.
Citation Information
Patent Citations
Rolling bearing fault diagnosis method
CN114091553A
Small sample classification method based on twinborn knowledge distillation and self-supervised learning
CN114298160A
