Rolling bearing fault diagnosis method based on integrated twin neural network
Through the integrated twin neural network method, combined with sequential undersampling and contrast loss function, the problem of data imbalance in rolling bearing fault diagnosis is solved, achieving a more robust and efficient fault diagnosis effect.
Patent Information
- Application Number
- CN202411314673.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2024-12-20
AI Technical Summary
When facing extremely unbalanced data sets, existing rolling bearing fault diagnosis methods are prone to overfitting and training instability, and fail to effectively deal with imbalance between different types of fault data.
Using an integrated twin neural network method, a balanced data set is constructed through sequential undersampled data division strategy, and multiple twin neural network models are used for training, combining comparison loss function and elastic network regularization to improve the stability of the model and Generalization ability.
It realizes more reliable and robust fault diagnosis, reduces the risk of information loss and overfitting, improves the generalization ability and prediction accuracy of the model, and is suitable for practical industrial applications.
Smart Images

Figure CN119167175A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of rolling bearing fault diagnosis, and in particular relates to a rolling bearing fault diagnosis method based on an integrated twin neural network. Background Art
[0002] With the rapid development of industrial technology, the reliability and safety of mechanical equipment, especially rolling bearings, have become key factors in the production process. In order to ensure the normal operation of mechanical equipment, it is particularly important to identify and diagnose its potential faults in a timely and accurate manner. In recent years, intelligent fault diagnosis methods based on deep learning have achieved remarkable results in the field of theoretical research due to their powerful deep feature extraction capabilities and end-to-end diagnostic characteristics. However, these methods face severe challenges in practical industrial applications, especially the problem of data imbalance.
[0003] In actual industrial environments, rolling bearings usually operate in normal conditions, while fault conditions occur relatively rarely, which results in a significant imbalance between fault data and normal data. In addition, data between different fault types is often unbalanced, and some faults may be rarer and more difficult to predict due to multiple factors such as equipment type and working environment. This data imbalance problem directly affects the generalization performance and fault identification accuracy of intelligent fault diagnosis models, making it difficult for traditional models based on the assumption of approximate equilibrium of data distribution to be directly applied to actual scenarios.
[0004] To solve the problem of data imbalance, three strategies are currently adopted in the field of intelligent fault diagnosis: strategies based on data enhancement, strategies based on classifier design, and strategies based on feature learning. However, each of these methods has its limitations. Although the data enhancement strategy can generate new samples to alleviate the imbalance problem, it is difficult to train, consumes a lot of computing resources, and may introduce noise; the classifier design strategy depends on the quality of the auxiliary data set and performs poorly on small-scale data sets; the feature learning strategy requires fine-tuning of the regularization parameters to cope with the complexity of imbalanced data, and the debugging process is cumbersome and the effect is unstable.
[0005] As a special type of neural network structure, Siamese Neural Network (SNN) has shown unique advantages in the field of metric learning. It provides a new idea for intelligent fault diagnosis by processing two input samples in parallel and learning the similarity between them. However, the application of existing SNN technology in the field of intelligent fault diagnosis is still limited to solving the problem of small samples, that is, the imbalance between fault data and normal data, and mostly relies on deep convolutional neural network (DCNN) as a subnetwork and uses cross entropy loss function for training. This method is prone to overfitting and training instability when facing extremely unbalanced data sets, which affects the diagnostic performance of the model. In addition, the existing SNN technology does not consider the imbalance problem between different types of fault data, which needs to be studied. Summary of the invention
[0006] The technical problem to be solved by the present invention is to address the deficiencies in the prior art and to provide a rolling bearing fault diagnosis method based on an integrated twin neural network, which utilizes the twin neural network technology to solve the extreme imbalance problem between rolling bearing fault data and normal data and the imbalance problem between different types of rolling bearing fault data.
[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is: a rolling bearing fault diagnosis method based on an integrated twin neural network, comprising the following steps:
[0008] Step 1: Collect the original rolling bearing vibration signal as a sample set, and slice the sample set to divide it into a training set X Train With the test set X Test , according to the data partitioning strategy based on sequential undersampling, the training set X Train Divide into N training subsets
[0009]
[0010] The data partitioning strategy based on sequential undersampling is that there are classes with relatively few samples, that is, the minority class has a class, where the number of samples of each minority class a is p; there are classes with relatively many samples, that is, the majority class has b classes, where the number of samples of each majority class b is q, where q>p, and includes the following steps:
[0011] Step 1.1 If q is divisible by p, a data partitioning strategy based on sequential undersampling is adopted for the divisible case, including the following steps:
[0012] Step 1.1.1: Perform sequential undersampling without replacement on all samples of the majority class b in the sample set, and evenly distribute the majority class b samples to h initial training subsets. The specific method is:
[0013] Set the single sequential undersampling size value to u and p = u, select the first sample of each category as the initial sequential undersampling point; according to the original order of the samples in each category, perform sequential undersampling without replacement for each category sample in the majority class b; this process will be repeated many times until all majority class b samples are traversed; finally, the majority class b samples are evenly distributed to h initial training subsets, where h = q / p, h = N;
[0014] Step 1.1.2: Merge the h initial training subsets with all minority class a samples one by one to form N training subsets;
[0015] Step 1.2: If q is not divisible by p, a data partitioning strategy based on sequential undersampling for non-divisible cases is adopted, including the following steps:
[0016] Step 1.2.1: Apply the sequential undersampling strategy without replacement to evenly distribute the first q-(qmodp)-p samples in each category of the majority class b samples into l initial training subsets, where l = N-2 = (q-(q modp)-p) / p, and merge the l initial training subsets with the minority class a samples one by one to create N-2 training subsets;
[0017] Step 1.2.2: sequentially undersample the first p samples of each category of the majority class b with replacement; then merge the sampled majority class l+1th initial training subset with the minority class a class samples to create the N-1th training subset;
[0018] Step 1.2.3: Take the (q modp)+1th sample in each category of the majority class b sample as the starting sequential undersampling point, and apply the no-replacement sequential undersampling strategy to generate the l+2th initial training subset; then merge the sampled majority class l+2th initial training subset with the minority class a sample to create the Nth training subset;
[0019] Step 2: Use N training subsets N twin neural network models are trained respectively, and the N twin neural network models have the same structure; the twin neural network model includes a twin neural sub-network; the twin neural sub-network structure includes 2 convolutional layers, 1 maximum pooling layer and 1 global average pooling layer; the first convolutional layer uses the ReLU activation function, and a batch normalization layer is added before the activation function; the second convolutional layer does not use the ReLU activation function; by applying the Sigmoid function after the global average pooling layer, each eigenvalue is limited to the range of (0.1);
[0020] Step 2.1: Use the first training subset Train the first Siamese neural network model;
[0021] Step 2.1.1: From the first training subset Randomly select two samples from , combine them into a sample pair (x1, x2), and use them as the input of the first twin neural network model;
[0022] Step 2.1.2: After the first twin neural network model is input, the output d is obtained f (x1,x2), where d f Represents the distance metric value of the sample pair (x1, x2) obtained by the first twin neural network model;
[0023] Step 2.1.3: Set the preset threshold of the contrast loss function, select the contrast loss function as the loss function of the first twin neural network model, and add elastic network regularization. The specific formula is:
[0024]
[0025] Among them, L Contrastive (x1,x2,y) is the contrast loss function; and are L1 and L2 regularizations, respectively; λ1 and λ2 are the coefficients of L1 and L2 regularizations, respectively; n is the number of sample pairs, df(x1,x2) is the distance metric, margin is the preset threshold of the contrast loss function, y is the sample health status label, ω i is the i-th parameter of the first twin neural network model;
[0026] Step 2.1.4: Update the parameters of the first Siamese neural network model using the RMS propagation optimization algorithm;
[0027] Step 2.1.5: When the first twin neural network model converges or reaches the preset number of iterations, the training is automatically terminated and the first twin neural network model is saved; otherwise, return to step 2.1.1 to continue iterative training; determine whether the first twin neural network model has converged by monitoring the accuracy of the training set during the training process; if the accuracy of the training set no longer increases after multiple rounds of training, it is determined that the first twin neural network model has converged;
[0028] Step 2.2: After obtaining the first twin neural network model, use the same method as step 2.1 to train the corresponding twin neural network model using the remaining training subsets, thereby obtaining N trained twin neural network models;
[0029] Step 3: Use the trained N twin neural network models to perform N rolling bearing fault pre-diagnosis on each test sample in the test set, including the following steps:
[0030] Step 3.1: Set the test sample to have a total of M health states Where M is an arbitrary integer; when diagnosing a test sample x0 with unknown health status, first select A sample of each health state is randomly selected from the set to form the support set X for the model testing phase. S :{x1,x2,...,x M}, and then pair the test sample with each sample in the support set to construct M sample pairs {(x0,x1),(x0,x2),...,(x0,x M )};
[0031] Step 3.2: Use the N twin neural network models saved in the training phase to process the M sample pairs respectively. Each twin neural network outputs M distance measurement values. Used to measure the test sample x0 and the support set X S The degree of difference between each sample in
[0032] Step 3.3: Select the smallest one from the M distance measurement values, and use the health status of the corresponding sample in the support set as the rolling bearing fault pre-diagnosis result of the test sample by a twin neural network model. The specific formula is:
[0033]
[0034] in, To predict health status, x C is a sample in the support set with a health status of C, To make the distance metric d f (x0,x C ) reaches the minimum health state C;
[0035] Step 4: The N rolling bearing fault pre-diagnosis results obtained by the N twin neural network models are integrated using a majority voting strategy to obtain the health status of each sample in the test set, including the following steps:
[0036] Step 4.1: Count the number of votes for each health status. The specific formula is:
[0037]
[0038] Among them, δ(g) is the indicator function, is the prediction result of the u-th twin neural network model on the test sample, C j is the jth health state, Health status C j The number of votes received;
[0039] Step 4.2: Select the health state with the most votes as the fault diagnosis result of the test sample. The specific formula is:
[0040]
[0041] in, In order to make Reach the maximum health state C j , To test the health status of the sample;
[0042] If a tie occurs, that is, multiple health states have the same number of votes, random selection will be used to make further decisions; let the candidate health states be C1, C2, ..., C k , where k is the number of tie options, k∈[2,M], and k is an integer; the probability of a tie is uniformly distributed. Randomly select option C from all candidates as the final health state.
[0043] The beneficial effects of adopting the above technical solution are: the present invention provides a rolling bearing fault diagnosis method based on an integrated twin neural network, and the new framework based on the twin neural network proposed by the present invention, by introducing the integration idea and combining the diagnosis results of multiple base twin neural networks, gives full play to the advantages of each model and makes up for the limitations and deviations that may exist in a single model, thereby obtaining a more reliable and robust prediction, which has brought a major breakthrough in the field of accurate prediction and analysis;
[0044] At the same time, the present invention also designs a data partitioning strategy based on sequential undersampling, which effectively constructs a balanced data set without sacrificing the sample size, maintains the stability of the distribution of most class data, reduces the risk of information loss and overfitting, and fundamentally solves the problem of diagnostic result bias caused by data imbalance; in addition, the carefully designed twin network containing a four-layer main structure effectively alleviates the overfitting problem caused by limited sample size through the reasonable selection of activation functions, and improves the generalization ability of the model; it is worth mentioning that the present invention adopts the contrast loss function as the optimization target, and integrates the elastic network regularization technology, which greatly enhances the stability and reliability of model training, and provides a solid guarantee for robust performance in practical applications. In summary, the present invention has shown significant beneficial effects in improving prediction accuracy, processing data imbalance, reducing overfitting and enhancing model stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A flow chart of a rolling bearing fault diagnosis method based on an integrated twin neural network provided by an embodiment of the present invention;
[0046] Figure 2A structural diagram of a twin neural network model provided by an embodiment of the present invention;
[0047] Figure 3 A comparison chart of the diagnostic accuracy of the six methods provided by the embodiment of the present invention under different imbalance ratios;
[0048] Figure 4 A diagram showing the results of a sub-network comparison experiment provided by an embodiment of the present invention;
[0049] Figure 5 Different loss function training curves provided by the embodiments of the present invention;
[0050] Among them, (a) is the network loss curve before and after regularization of the contrast loss function; (b) is the network accuracy curve before and after regularization of the contrast loss function; (c) is the network loss curve of the cross entropy loss function; (d) is the network accuracy curve of the cross entropy loss function;
[0051] Figure 6 A schematic diagram of the effect of an ablation experiment on diagnostic accuracy provided by an embodiment of the present invention;
[0052] Figure 7 A comparison diagram of the confusion matrices before and after ablation provided by an embodiment of the present invention;
[0053] Among them, (a) is after ablation; (b) is before ablation. DETAILED DESCRIPTION
[0054] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0055] In this embodiment, a rolling bearing fault diagnosis method based on an integrated twin neural network is provided. Figure 1 As shown, the following steps are included:
[0056] Step 1: Collect the original rolling bearing vibration signal as a sample set, and slice the sample set to divide it into a training set X Train With the test set X Test , according to the data partitioning strategy based on sequential undersampling, the training set X Train Divide into N training subsets In this embodiment, 250 samples are collected for each state, each sample contains 1024 data points, and the sample set is sliced and divided into training set X according to a 4:1 ratio. Train With the test set X Test , the training set includes 2000 samples and the test set includes 500 samples;
[0057] The data partitioning strategy based on sequential undersampling is as follows: Here, it is assumed that there are categories with relatively few samples, that is, there are a minority class, where the number of samples of each minority class a is p; there are categories with relatively many samples, that is, there are b majority classes, where the number of samples of each majority class b is q, where q>p;
[0058] In this embodiment, in order to deal with the problem of data imbalance, a (1≤a≤9) classes are randomly selected as minority classes a, and the rest are majority classes b; each of the majority classes b has 200 training samples and 50 test samples; each of the minority classes a is randomly sampled to obtain n+50 samples (n ranges from 2 to 200), where n is the number of training samples and 50 is the number of test samples; in particular, when n≤10, it is considered to be extremely unbalanced; the following steps are included:
[0059] Step 1.1: If q is divisible by p, a data partitioning strategy based on sequential undersampling is adopted for the divisible case, including the following steps:
[0060] Step 1.1.1: Perform sequential undersampling without replacement on all samples of the majority class b in the sample set, and evenly distribute the majority class b samples to h initial training subsets. The specific method is:
[0061] Set the single sequential undersampling size value to u and p = u, select the first sample of each category as the initial sequential undersampling point; according to the original order of the samples in each category, perform sequential undersampling without replacement for each category sample in the majority class b; this process will be repeated many times until all majority class b samples are traversed; this method aims to ensure that the data distribution of the majority class b remains relatively stable before and after the sampling process to avoid drastic changes; finally, the majority class b samples are evenly distributed to h initial training subsets, where h = q / p, h = N;
[0062] Step 1.1.2: Merge the h initial training subsets with all minority class a samples one by one to form N training subsets; there is no intersection between the majority class samples in different training subsets, and the minority class a samples are completely consistent in all training subsets;
[0063] In this embodiment, q is 200;
[0064] Step 1.2: If q is not divisible by p, a data partitioning strategy based on sequential undersampling for non-divisible cases is adopted, including the following steps:
[0065] Step 1.2.1: Apply the sequential undersampling strategy without replacement to evenly distribute the first q-(qmodp)-p samples in each category of the majority class b samples into l initial training subsets, where l = N-2 = (q-(q modp)-p) / p, and merge the l initial training subsets with the minority class a samples one by one to create N-2 training subsets;
[0066] Step 1.2.2: Considering the remaining p+(q modp) samples in each category of the majority class b samples, the first p samples of each category of the majority class b are sequentially undersampled with replacement. This process is similar to sequential undersampling without replacement, but in sampling with replacement, the samples are put back into the pool after each sampling; then the sampled majority class l+1 initial training subset is merged with the minority class a samples to create the N-1th training subset;
[0067] Step 1.2.3: Due to the replacement sampling, there are still (q modp) + n samples left in each category of the majority class b samples, so the (q modp) + 1th sample in each category of the majority class b samples is used as the starting sequential under-sampling point, and the no-replacement sequential under-sampling strategy is applied to generate the l+2th initial training subset; then the sampled majority class l+2th initial training subset is merged with the minority class a samples to create the Nth training subset;
[0068] In order to verify the rolling bearing fault diagnosis technology, this embodiment uses the SKF6205 rolling bearing data set provided by the Institute of Industrial Testing and Equipment Diagnosis Technology of Soochow University as the original rolling bearing vibration signal; the experimental device includes a drive motor, two healthy rolling bearings, a test rolling bearing and an adjustable mechanical load system, which are arranged on the same motor shaft; the rolling bearing vibration signal is collected at a sampling frequency of 10kHz at a speed of 896.1rpm and a load of 3kN; the experiment covers 10 states, including normal and 9 different degrees (mild, medium, severe) of roller, inner ring and outer ring faults;
[0069] The data partitioning strategy based on sequential undersampling is adopted if q is divisible by p. The advantage is that the amount of data in the training subset has only one numerical level based on the health state, thus ensuring that the samples of each health state contribute equally to the model during the training process.
[0070] If q is not divisible by p, a data partitioning strategy based on sequential undersampling is adopted for non-divisible cases. The advantage is that it ensures that the data volume of the Nth training subset in the healthy state has only one numerical level, and that the data distribution of the majority class does not change significantly, while making all majority class samples effectively utilized.
[0071] Step 2: During the training process, samples are combined into pairs as input to the twin neural network, using N training subsets. N twin neural network models are trained separately, and the N twin neural network models have the same structure; their training processes are independent and consistent; the twin neural network model contains a twin neural sub-network; the twin neural sub-network structure includes 2 convolutional layers, 1 maximum pooling layer and 1 global average pooling layer; the first convolutional layer uses the ReLU activation function, and a batch normalization layer is added before the activation function; the second convolutional layer does not use the ReLU activation function; by applying the Sigmoid function after the global average pooling layer, each eigenvalue is limited to the range of (0.1); the feature representation can be made more sparse and standardized, which helps the model to better learn the important features of the sample during the training process, thereby optimizing the training effect;
[0072] Step 2.1: Use the first training subset Training the first Siamese neural network model includes the following steps:
[0073] Step 2.1.1: From the first training subset Randomly select two samples from , combine them into a sample pair (x1, x2), and use them as the input of the first twin neural network model;
[0074] Step 2.1.2: After the first twin neural network model is input, the output d is obtained f (x1,x2), where d f Represents the distance metric value of the sample pair (x1, x2) obtained by the first twin neural network model;
[0075] In this embodiment, the experiment uses Python 3.9, the deep learning framework is TensorFlow 2.6, the computer configuration is Core i7-10750H CPU @ 2.60 GHz, 8 GB memory, running on a 64-bit Windows operating system, and a GPU (GTX1650) with 4 GB memory is added to increase the training speed, and the batch size is 128 samples;
[0076] Step 2.1.3: Set the preset threshold of the contrast loss function, select the contrast loss function as the loss function of the first twin neural network model, and add elastic network regularization. The specific formula is:
[0077]
[0078] Among them, L Contrastive (x1,x2,y) is the contrast loss function; and are L1 and L2 regularization respectively; λ1 and λ2 are the coefficients of L1 and L2 regularization respectively, which are used to control the influence of regularization term on loss function, both are set to 0.00001, and the optimization is found by cross-validation method; n is the number of sample pairs, d f (x1,x2) is the distance metric, margin is the threshold of the contrast loss function, y is the sample health status label used to represent the real sample similarity, ω i is the i-th parameter of the model;
[0079] The margin value is the preset threshold of the contrast loss function, that is, the characteristic of the contrast loss function. By adding a threshold, only the distance measurement value d between 0 and margin is considered. f , which enables the model to focus more on the key sample pair differences near the threshold, thereby ignoring the sample pair difference changes far from the threshold. This method more effectively optimizes the model parameters and improves the ability to distinguish heterogeneous sample pairs;
[0080] Step 2.1.4: Update the parameters of the first twin neural network model using the RMS propagation optimization algorithm and setting the learning rate to 0.001;
[0081] Step 2.1.5: When the first twin neural network model converges or reaches the preset number of iterations of 200, the training is automatically terminated and the first twin neural network model is saved; otherwise, return to step 2.1.1 to continue iterative training; the model training termination strategy uses the EarlyStopping function, Patience selects 5, and the monitoring indicator is the accuracy of the training set. The accuracy of the training set during the training process is monitored to determine whether the first twin neural network model has converged; if the accuracy of the training set has not improved after 5 consecutive rounds of training, it is determined that the first twin neural network model has converged, and N trained twin neural network models are obtained;
[0082] The structures of the N twin neural network models built in step 2 of this embodiment are the same, such as Figure 2 As shown; the N twin neural network models constructed include twin neural sub-networks; the main structural parameters of the constructed twin neural sub-networks are shown in Table 1;
[0083] Table 1 Main structural parameters of the twin neural sub-network built
[0084]
[0085] Step 2.2: After obtaining the first twin neural network model, use the same method as step 2.1 to train the corresponding twin neural network model using the remaining training subsets, thereby obtaining N trained twin neural network models;
[0086] Step 3: Use the trained N twin neural network models to perform N rolling bearing fault pre-diagnosis on each test sample in the test set; the test process is independent and consistent; different from the traditional classification network, the twin neural network uses a single test method, including the following steps:
[0087] In step 3 of this embodiment, taking the first base model as an example, the single test process is as follows:
[0088] Step 3.1: Assume that the test sample has a total of M health states Where M is an arbitrary integer. When diagnosing a test sample x0 with unknown health status, first select A sample of each health state is randomly selected from the set to form the support set X for the model testing phase. S :{x1,x2,...,x M}, and then pair the test sample with each sample in the support set to construct M sample pairs {(x0,x1),(x0,x2),...,(x0,x M )}, where M = 10;
[0089] Step 3.2: Use the first twin neural network model saved in the training phase to process M sample pairs. The first twin neural network outputs M distance measurement values. Used to measure the test sample x0 and the support set X S The degree of difference between each sample in
[0090] Step 3.3: Select the smallest one from the M distance measurement values, and use the health status of the corresponding sample in the support set as the rolling bearing fault pre-diagnosis result of the first twin neural network model for the test sample. The specific formula is:
[0091]
[0092] in, To predict health status, x C is a sample in the support set with a health status of C, To make the distance metric d f (x0,x C ) reaches the minimum health state C;
[0093] Finally, the test sample obtains N fault prediction results;
[0094] Step 4: The N rolling bearing fault pre-diagnosis results obtained by the N twin neural network models are integrated using a majority voting strategy to obtain the health status of each sample in the test set;
[0095] In step 4 of this embodiment, the majority voting strategy refers to ultimately adopting the decision that receives the most votes in collective decision-making, including the following steps:
[0096] Step 4.1: Count the number of votes for each health status. The specific formula is:
[0097]
[0098] Among them, δ(g) is an indicator function, and its value C is 1 when the condition in the brackets is true, otherwise it is 0. is the pre-diagnosis result of the j-th base twin neural network model on the test sample, C j is the jth health state, Health status C j The number of votes, i∈[1,10], and i is an integer;
[0099] Step 4.2: Select the health state with the most votes as the fault diagnosis result of the test sample. The specific formula is:
[0100]
[0101] in, In order to make Reach the maximum health state C j , To test the health status of the sample;
[0102] If a tie occurs, that is, multiple health states have the same number of votes, random selection will be used to make further decisions; let the candidate health states be C1, C2, ..., C k , where k is the number of tie options, k∈[2,M], and k is an integer; in this case, the draw will be based on the uniform distribution probability Randomly select option C from all candidates as the final health state;
[0103] In this embodiment, the twin neural network comparison experiment is integrated:
[0104] In order to verify the superiority of the rolling bearing fault diagnosis method based on integrated twin neural network proposed in this invention in dealing with data imbalance problem, a comparative study was designed and five representative fault diagnosis models were selected for comparison:
[0105] Traditional convolutional neural network model (CNN); model combining CNN and support vector machine (CNN-SVM); model combining multi-scale CNN and long short-term memory network (MCNN-LSTM); deep neural network based on metric learning (FCDNN): an SNN architecture similar to the method of the present invention but not integrated structure; improved auxiliary classifier generative adversarial network (MACGAN);
[0106] The diagnostic accuracy was used as the key indicator, and to avoid chance, all experiments were repeated 10 times and the average value was taken;
[0107] The comparison of the diagnostic accuracy of the six methods in this embodiment under different imbalance ratios is as follows: Figure 3 As shown in the figure, the diagnostic accuracy of six different methods under different imbalance ratios is compared; sub-graphs (a) to (i) in the figure correspond to the situation when the number of minority classes m increases from 1 to 9. By comparing the performance curves of different methods, the stable performance and significant advantages of the method of the present invention under different conditions can be clearly seen; in nine groups of experiments with different numbers of minority classes, the integrated twin neural network method (ESNN) of the present invention shows better recognition accuracy than other methods under different λ values, especially when the data is extremely unbalanced (λ≥20), its advantage is particularly obvious. Compared with the significant decline in the diagnostic accuracy of other methods, the method of the present invention maintains a higher stability with the smallest decline. Especially in extreme cases (λ=100, the number of minority classes is 9), the diagnostic accuracy of the present method still reaches 85%, which is 42.6% higher than CNN, 72% higher than CNN-SVM, 56.5% higher than MCNN-LSTM, 71.6% higher than FCDNN, and 52% higher than MACGAN. It shows its superiority in processing extremely unbalanced data;
[0108] The twin neural network comparison experiment in this embodiment:
[0109] In order to verify the advantages of the sub-network designed by the present invention in the case of balanced and extremely small samples, a comparative experiment was carried out on the sub-network:
[0110] The experiment in this embodiment uses a balanced sample set, and the sub-network comparison experimental results are shown in the figure below. Figure 4 As shown, when the sample size is sufficient (>40), each network shows a high accuracy rate (>96%); however, when the sample size is reduced to less than 20, the sub-network designed by the present invention shows a more stable downward trend, especially when the sample size is very small (2 samples / class), it can still maintain an accuracy rate of 74.3%, which is much higher than 15.6%, 32.4%, and 50.4% of the other three sub-networks, which fully proves the superiority of the sub-network of the present invention in the case of extremely small samples;
[0111] In order to evaluate the effectiveness of the comparative loss function and the regularization strategy, this embodiment designs a comparative experiment for the loss function:
[0112] The number of samples in each category is fixed to 10, and the training curves of different loss functions are as follows: Figure 5 As shown, the experiment found that the cross entropy loss function is difficult to train under extremely small sample conditions, and improper learning rate selection can easily lead to gradient explosion or slow convergence; in contrast, the contrast loss function combined with the regularization strategy (especially elastic network regularization) significantly improved the training stability and accuracy; the experimental results show that the model using the contrast loss function combined with the elastic network regularization has a steadily increasing accuracy during the training process and eventually approaches 100%, while the unregularized model has a decrease in accuracy during long-term training; this shows that the loss function and regularization strategy selected by the present invention have significant advantages in improving the training efficiency and stability of the base twin neural network;
[0113] The ablation experiment in this embodiment integrates and verifies:
[0114] In order to verify the effectiveness of the integrated framework in the present invention, an ablation experiment is designed to remove the training subset division and diagnosis result integration steps, and directly input the unbalanced data set into a single twin neural network for comparative analysis:
[0115] The experimental results of the ablation experiment on the diagnostic accuracy are as follows: Figure 6 As shown in the figure, the comparison of the model diagnosis accuracy before and after ablation processing under different imbalance ratios λ; sub-figures (a) to (i) in the figure correspond to the data imbalance scenarios when the number of minority classes m increases from 1 to 9; through this comparison, it can be clearly seen that with the deepening of the data imbalance, the diagnosis accuracy of the model after ablation drops significantly to the range of 60% to 80%, especially under the extreme imbalance conditions of m = 9 and λ = 100, the accuracy drops sharply by 38.4%; this phenomenon reveals the negative impact of direct input of imbalanced data on model performance, that is, the model tends to predict majority class samples and ignore minority class samples;
[0116] To further explore the impact of ablation, the confusion matrix is used to visualize the test results before and after ablation under the conditions of m = 9 and λ = 100. The comparison of the confusion matrix before and after ablation is shown in the figure below. Figure 7 As shown; the comparison results show that the model after ablation ( Figure 7 (a)) is heavily biased towards predicting the normal state (label 0), while minority class samples are generally misidentified; on the contrary, the proposed method ( Figure 7(b) Even with a limited number of samples, it can still effectively identify most minority samples (such as labels 1, 3, 4, 7, and 9), and the overall recognition accuracy is not less than 50%. The values of the main diagonal elements of the confusion matrix are all high, proving that the model is not biased towards any specific category, effectively verifying the significant advantages of the integrated framework in dealing with unbalanced data sets;
[0117] In this embodiment, the generalization performance is studied:
[0118] In order to verify the wide applicability of the fault diagnosis method based on integrated twin neural network proposed in this invention, two representative rolling bearing data sets were selected for experiments: the rolling bearing data set of Case Western Reserve University (CWRU) and the XJTU-SY rolling bearing accelerated life test data set; the CWRU data set was collected at 1750rpm by a 2-horsepower motor platform, including 10 fault types, and each sample had 1024 sampling points. The XJTU-SY data set covers the bearing vibration signals under different working conditions, and selects the signals of 3 faulty bearings under each working condition as fault samples, and includes 10 fault types;
[0119] This embodiment has been extensively verified by adjusting the key parameters m and λ on two data sets. The experimental results are shown in Table 2:
[0120] Table 2 Experimental results of CWRU and XJTU-SY bearing datasets
[0121]
[0122] Experimental results show that the method of the present invention performs well on both data sets and achieves high diagnostic accuracy; specifically, the diagnostic accuracy of the CWRU data set is not less than 89%, and the diagnostic accuracy of the XJTU-SY data set is not less than 93%; more importantly, when the data is extremely unbalanced (such as the number of integrated components m=9, the weight coefficient λ=100), the diagnostic accuracy of the CWRU data set can still reach 89.2%, and the XJTU-SY data set is as high as 93%; these results fully demonstrate that the fault diagnosis method based on the integrated twin neural network proposed in the present invention is not only accurate and reliable, but also has good generalization ability, and can effectively respond to the rolling bearing fault diagnosis needs from different sources and under different working conditions.
[0123] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope defined by the claims of the present invention.
Claims
1. A rolling bearing fault diagnosis method based on an integrated twin neural network, characterized in that: The following steps are involved: Step 1: Collect the original rolling bearing vibration signal as a sample set, and slice the sample set to divide it into a training set X Train With the test set X Test , according to the data partitioning strategy based on sequential undersampling, the training set X Train Divide into N training subsets Step 2: Use N training subsets N twin neural network models are trained respectively, and the N twin neural network models have the same structure; the twin neural network model includes a twin neural sub-network; the twin neural sub-network structure includes 2 convolutional layers, 1 maximum pooling layer and 1 global average pooling layer; the first convolutional layer uses the ReLU activation function, and a batch normalization layer is added before the activation function; the second convolutional layer does not use the ReLU activation function; by applying the Sigmoid function after the global average pooling layer, each eigenvalue is limited to the range of (0.1); Step 3: Use the trained N twin neural network models to perform N rolling bearing fault pre-diagnosis on each test sample in the test set; Step 4: The N rolling bearing fault pre-diagnosis results obtained by the N twin neural network models are integrated using a majority voting strategy to obtain the health status of each sample in the test set.
2. The rolling bearing fault diagnosis method based on integrated twin neural network according to claim 1 is characterized in that: The data partitioning strategy based on sequential undersampling is that there are categories with relatively few samples, that is, there are a minority class, where the number of samples of each minority class a is p; there are categories with relatively many samples, that is, there are b majority classes, where the number of samples of each majority class b is q, where q>p.
3. The rolling bearing fault diagnosis method based on integrated twin neural network according to claim 1 is characterized in that: The step 1 comprises the following steps: Step 1.1 If q is divisible by p, adopt the data partitioning strategy based on sequential undersampling for the divisible case; Step 1.2: If q is not divisible by p, a data partitioning strategy based on sequential undersampling is used for the non-divisible case.
4. The rolling bearing fault diagnosis method based on integrated twin neural network according to claim 3 is characterized in that: The step 1.1 comprises the following steps: Step 1.1.1: Perform sequential undersampling without replacement on all samples of the majority class b in the sample set, and evenly distribute the majority class b samples to h initial training subsets. The specific method is: Set the single sequential undersampling size value to u and p = u, select the first sample of each category as the initial sequential undersampling point; according to the original order of the samples in each category, perform sequential undersampling without replacement for each category sample in the majority class b; this process will be repeated many times until all majority class b samples are traversed; finally, the majority class b samples are evenly distributed to h initial training subsets, where h = q / p, h = N; Step 1.1.2: Merge the h initial training subsets with all minority class a samples one by one to form N training subsets.
5. The rolling bearing fault diagnosis method based on integrated twin neural network according to claim 3 is characterized in that: The step 1.2 comprises the following steps: Step 1.2.1: Apply the sequential undersampling strategy without replacement to evenly distribute the first q-(qmodp)-p samples in each category of the majority class b samples into l initial training subsets, where l = N-2 = (q-(q mod p)-p) / p, and merge the l initial training subsets with the minority class a samples one by one to create N-2 training subsets; Step 1.2.2: sequentially undersample the first p samples of each category of the majority class b with replacement; then merge the sampled majority class l+1th initial training subset with the minority class a class samples to create the N-1th training subset; Step 1.2.3: Take the (q mod p)+1th sample in each category of the majority class b sample as the starting sequential under-sampling point, and apply the sequential under-sampling strategy without replacement to generate the l+2th initial training subset; then merge the sampled majority class l+2th initial training subset with the minority class a sample to create the Nth training subset.
6. The rolling bearing fault diagnosis method based on integrated twin neural network according to claim 5 is characterized in that: The step 2 comprises the following steps: Step 2.1: Use the first training subset Train the first Siamese neural network model; Step 2.2: After obtaining the first twin neural network model, use the same method as step 2.1 to train the corresponding twin neural network model using the remaining training subsets to obtain N trained twin neural network models.
7. The rolling bearing fault diagnosis method based on integrated twin neural network according to claim 6 is characterized in that: Step 2.1 includes the following steps: Step 2.1.1: From the first training subset Randomly select two samples from , combine them into a sample pair (x1, x2), and use them as the input of the first twin neural network model; Step 2.1.2: After the first twin neural network model is input, the output d is obtained f (x1,x2), where d f Represents the distance metric value of the sample pair (x1, x2) obtained by the first twin neural network model; Step 2.1.3: Set the preset threshold of the contrast loss function, select the contrast loss function as the loss function of the first twin neural network model, and add elastic network regularization. The specific formula is: Among them, L Contrastive (x1,x2,y) is the contrast loss function; and are L1 and L2 regularizations, respectively; λ1 and λ2 are the coefficients of L1 and L2 regularizations, respectively; n is the number of sample pairs, df(x1,x2) is the distance metric, margin is the preset threshold of the contrast loss function, y is the sample health status label, ω i is the i-th parameter of the first twin neural network model; Step 2.1.4: Update the parameters of the first Siamese neural network model using the RMS propagation optimization algorithm; Step 2.1.5: When the first twin neural network model converges or reaches the preset number of iterations, the training is automatically terminated and the first twin neural network model is saved; otherwise, return to step 2.1.1 to continue iterative training; determine whether the first twin neural network model has converged by monitoring the accuracy of the training set during the training process; if the accuracy of the training set no longer increases after multiple rounds of training, it is determined that the first twin neural network model has converged.
8. The rolling bearing fault diagnosis method based on integrated twin neural network according to claim 7 is characterized in that: The step 3 comprises the following steps: Step 3.1: Set the test sample to have a total of M health states Where M is an arbitrary integer; when diagnosing a test sample x0 with unknown health status, first select A sample of each health state is randomly selected from the set to form the support set X for the model testing phase. S :{x1,x2,...,x M }, and then pair the test sample with each sample in the support set to construct M sample pairs {(x0,x1),(x0,x2),...,(x0,x M )}; Step 3.2: Use the N twin neural network models saved in the training phase to process the M sample pairs respectively. Each twin neural network outputs M distance measurement values. Used to measure the test sample x0 and the support set X S The degree of difference between each sample in Step 3.3: Select the smallest one from the M distance measurement values, and use the health status of the corresponding sample in the support set as the rolling bearing fault pre-diagnosis result of the test sample by a twin neural network model. The specific formula is: in, To predict health status, x C is a sample in the support set with a health status of C, To make the distance metric d f (x0,x C ) reaches the minimum health state C.
9. The rolling bearing fault diagnosis method based on integrated twin neural network according to claim 8, characterized in that: The step 4 comprises the following steps: Step 4.1: Count the number of votes for each health status. The specific formula is: Among them, δ(·) is the indicator function, is the prediction result of the u-th twin neural network model on the test sample, Cj is the j-th health state, V Cj Health status C j The number of votes received; Step 4.2: Select the health state with the most votes as the fault diagnosis result of the test sample. The specific formula is: in, In order to make Reach the maximum health state C j , To test the health status of the sample; In case of a tie, i.e., the number of votes for multiple health states is the same, a random selection will be used to make further decisions; Let the candidate health states be C1, C2, ..., C k , where k is the number of tie options, k∈[2,M], and k is an integer; the probability of a tie is uniformly distributed. Randomly select option C from all candidates as the final health state.
