Intelligent fault diagnosis method for rotating machinery sample under extremely unbalanced condition
By introducing the combination and comparison of normal state samples and fault state samples in rotary mechanical fault diagnosis, the sample imbalance problem is solved, and the effectiveness and reliability of intelligent fault diagnosis of rotary mechanical is realized.
Patent Information
- Application Number
- CN202510682609.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-05-26
AI Technical Summary
Rotating machinery faces sample imbalance in fault diagnosis, and deep learning models are difficult to train, resulting in poor intelligent fault diagnosis.
A priori knowledge that the two consecutive normal state samples of rotating machinery are highly similar and the samples of different fault states are different. By combining the normal state samples with the fault state samples, a comparative learning loss function is constructed and the deep learning model parameters are optimized.
It realizes intelligent fault diagnosis of rotating machinery under extremely unbalanced samples, improves the accuracy and reliability of diagnosis, and can effectively use a small number of fault status samples for diagnosis.
Smart Images

Figure CN120197065A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of intelligent fault diagnosis of rotating machinery, and particularly relates to an intelligent fault diagnosis method under the condition of extremely unbalanced samples of rotating machinery. Background Art
[0002] Rotating machinery is the basis of human activities and is widely used in fields such as ships, aerospace, and manufacturing. However, in practical applications, due to continuous long-term operation, improper maintenance, complex load effects, etc., the performance degradation and faults of rotating machinery are inevitable. Therefore, achieving accurate diagnosis of the fault state of rotating machinery is of great significance for ensuring its operation safety and stability. In recent years, intelligent fault diagnosis methods based on deep learning have been greatly developed and shown great application potential. However, such methods require a large number of data samples to support training, and have both quality and quantity requirements for fault state samples. However, in practice, the fault state samples of rotating machinery are extremely few and cannot form a sample-balanced training data set with a large number of normal state samples, which makes the training of deep learning models difficult and it is difficult to establish an intelligent fault diagnosis model for rotating machinery. Therefore, to solve the problem of imbalance between normal state samples and fault state samples of rotating machinery, it is necessary to consider how to use normal state samples to expand fault state samples. Considering the inherent differences between fault state samples and normal state samples of rotating machinery, how to use this prior knowledge to achieve the above goal is the key to the present invention. Summary of the Invention
[0003] The purpose of the present invention is to provide an intelligent fault diagnosis method under the condition of extremely unbalanced samples of rotating machinery for the extremely unbalanced problem faced in the intelligent fault diagnosis modeling of rotating machinery. First, introduce the prior knowledge that adjacent samples of time series signals are highly similar, and set the information contained in two adjacent samples to be the same; secondly, considering that there are inherent differences in the information contained in different fault state samples, the information contained in the combination of different fault state samples and normal state samples still has inherent differences; furthermore, based on the above understanding, construct a comparison relationship after combining different fault state samples with adjacent normal state samples respectively, and at the same time construct a contrastive learning loss function based on this comparison relationship to optimize the parameters of the constructed deep learning model; finally, combine the sample to be measured with normal state samples, input them into the trained deep learning model, output the results, and design a fault diagnosis algorithm to diagnose the state of rotating machinery.
[0004] To achieve the above object, the technical solution of the present invention is: an intelligent fault diagnosis method under extremely unbalanced conditions of rotating machinery samples, introducing the prior knowledge that two consecutive normal state samples of rotating machinery are highly similar and different fault state samples are different from each other, constructing a comparison relationship after combining different fault state samples with adjacent normal state samples respectively, and simultaneously constructing a contrastive learning loss function based on this comparison relationship; constructing a deep learning model, and combining the contrastive learning loss function, normal state samples and fault state samples to train the deep learning model; combining the sample to be measured with normal state samples and inputting them into the trained deep learning model to diagnose the state of rotating machinery.
[0005] Further, the method includes the following steps: (1) Collect the monitoring data of the normal state of the rotating machinery, obtain normal state samples through sliding window sampling. At the same time, collect each type of fault state sample when the rotating machinery fails as the reference fault state sample; (2) According to the acquisition time sequence of the normal state monitoring data, take two consecutive normal state samples, combine them pairwise, and at the same time combine them with the reference fault state samples respectively to form a training data set; (3) Construct a deep learning model, design the input layer and output layer of the model network, where the input layer receives two input samples in the training data set, and the output layer is the similarity between the two input samples; (4) Combining the constructed sample combinations, introducing the prior knowledge that two consecutive normal state samples are highly similar and different fault state samples are different from each other, constructing a contrast matrix, and designing a contrastive learning loss function; (5) Using the obtained normal state samples and reference fault state samples, combined with the contrastive learning loss function, train the constructed deep learning model; (6) Based on the trained deep learning model, diagnose the state of the rotating machinery.
[0006] Further, in step (2), let the reference fault state sample be represent the number of reference fault state samples, and the combination of two consecutive normal state samples is Combined with the reference fault state samples respectively to obtain and .
[0007] Further, in step (3), the deep learning model includes two parts of networks, namely the initial feature extraction network and the similarity calculation network ; where the input of is , , the input of is , The sample combinations in The high-dimensional features obtained by extraction.
[0008] Furthermore, in step (4), prior knowledge that two consecutive normal state samples are highly similar and different fault state samples are distinct is introduced, and is used for the k-th sample combination in and the m-th sample combination in to perform high-dimensional feature extraction respectively to obtain high-dimensional features , and then through to obtain the cosine similarity between the two, denoted by , where k, m ∈ [1, C] and k ≠ m. At the same time, is used for and to perform high-dimensional feature extraction respectively, and then through to obtain the cosine similarity between the two high-dimensional features; by processing all sample combinations and , a similarity comparison matrix M is obtained: where n = C.
[0009] Furthermore, based on the physical prior knowledge trained by supervised learning, the cross-entropy calculation is performed on the similarity comparison matrix M and where H is the entropy calculation, is the n*n expectation matrix, expressed as: is the divergence calculation, representing the similarity between M and ; where represents the element in the I-th row and J-th column of the matrix; Furthermore, Finally, a new cross-entropy comparison loss function is obtained: where is the loss function, represents the k-th row element of the matrix, represents the k-th row element in represents the k-th row element in M, is the penalty factor, T represents the transposed symbol, is the weight coefficient; There is also a difference in information entropy between normal state samples and reference fault state samples, so the physical prior knowledge 0 and 1 are used to describe this difference, that is, the two normal state samples have a high degree of similarity, which is described as 1; the normal state samples and the reference fault state samples have mutual differences, which are described as 0; based on this, a new binary classification cross entropy loss function is constructed, which is defined as: in, is a normal state sample, is the benchmark fault state sample, ; When j=0, , when j≠0, , The predicted value output by the deep learning model, K represents the Kth time; Under the condition of extremely unbalanced samples, the final contrastive learning loss function is expressed as: in, is the loss function, is the cross entropy loss function for binary classification.
[0010] Compared with the prior art, the present invention has the following beneficial effects: 1. The prior knowledge that the state data continuously collected under the normal state of rotating machinery are highly similar, and the prior knowledge that different fault state samples are different from each other are introduced. By combining the normal state samples with the fault state samples, the requirement of traditional deep learning for a complete training set is realized, and the balance between normal state samples and fault state samples is ensured.
[0011] 2. A new network input layer is designed based on the capsule neural network. This layer can accept two inputs and output the high-level fusion features of the two inputs. At the same time, it can judge the similarity of the two input samples.
[0012] 3. A new contrast loss function is designed, which can achieve effective optimization of the above network parameters by using only a small number of fault state samples (only 1 fault sample is required) combined with normal state samples.
[0013] 4. Combine the training results to obtain a deep neural network, combine the output results of the combination of the test sample and the normal state sample, and compare them with the results of the combination of the benchmark fault state sample and the normal state sample, and finally obtain the diagnosis result of the test state sample. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 This invention provides a construction of a contrast loss function and a fault diagnosis algorithm flow.
[0015] Figure 2 It is the training process of the constructed deep network model.
[0016] Figure 3 It is the test result of the proposed fault diagnosis method under the condition of extremely unbalanced fault samples. Specific implementation manners
[0017] The technical solution of this invention will be specifically described below in conjunction with the attached drawings.
[0018] This invention provides an intelligent fault diagnosis method for rotating machinery under the condition of extremely unbalanced samples. It introduces the prior knowledge that two consecutive normal state samples of rotating machinery are highly similar and different fault state samples are mutually different, constructs the contrast relationship after combining different fault state samples with adjacent normal state samples respectively, and constructs a contrast learning loss function based on this contrast relationship at the same time; constructs a deep learning model, and combines the contrast learning loss function, normal state samples and fault state samples to train the deep learning model; combines the sample to be measured with the normal state samples and inputs them into the trained deep learning model to diagnose the state of the rotating machinery. The method includes the following steps: (1) Collect the monitoring data of the normal state of the rotating machinery, and obtain normal state samples through sliding window sampling. At the same time, collect each type of fault state sample during the fault of the rotating machinery as the reference fault state samples; (2) According to the acquisition time sequence of the normal state monitoring data, take two consecutive normal state samples, combine them pairwise, and combine them with the reference fault state samples respectively to form a training data set; (3) Construct a deep learning model, design the input layer and output layer of the model network, where the input layer receives two input samples in the training data set, and the output layer is the similarity between the two input samples; (4) Combine the constructed sample combinations, introduce the prior knowledge that two consecutive normal state samples are highly similar and different fault state samples are mutually different, construct a contrast matrix, and design a contrast learning loss function; (5) Use the obtained normal state samples and reference fault state samples, and combine with the contrast learning loss function to train the constructed deep learning model; (6) Based on the trained deep learning model, diagnose the state of the rotating machinery.
[0019] The following is the specific implementation process of this invention.
[0020] Please refer to Figure 1 、 Figure 2 andFigure 3 , an intelligent fault diagnosis method for a rotating machinery sample under extremely unbalanced conditions provided by the present invention mainly includes the following steps: Step 1: Select a typical rotating machinery, namely a wind power gearbox. Specifically, fault experiments are carried out using an experimental platform, and a total of 7 single-fault experimental data are obtained, namely gear breakage, gear erosion, gear crack, outer ring wear of the bearing, fracture of the bearing ball, loosening of the fixed disk, and axial imbalance. In each fault experiment, the vibration signal is collected by NI-cDAQ-9174 / 9234 vibration sensors in two directions, the X-axis and the Y-axis. The sampling frequency is 10240 Hz, and 1228800 vibration data points are collected. A sliding window with a length of 2048 is used to sample the vibration data in the normal state, and a total of 2000 samples are obtained. 1010 samples are taken for each type of fault, among which 10 samples are used for training and 1000 samples are used for testing.
[0021] Step 2: Select 1000 normal state samples and combine them with 7 types of fault state samples to form a training set. By combining normal state samples and fault samples, the balance between normal state samples and fault state samples in the obtained training set is ensured.
[0022] Specifically, taking the case where there is only 1 sample for each type of fault state as an example, two consecutive samples are selected from the normal state samples, and the fault state sample is combined with these two normal state samples respectively.
[0023] Step 3: Construct a based on a capsule neural network, with the initial capsule layer parameter being 3 and the routing capsule layer parameter being 5. By modifying the input layer structure and the forward and backward propagation algorithms, it can receive the input of two samples and can perform high-level fusion on them. Construct a based on a fully connected neural network, which includes a total of two fully connected layers, and the output layer neuron is 1.
[0024] Step 4: Select 1 sample for each type of fault state and 2 normal state samples. Introduce the prior knowledge that two normal state samples are highly similar and different fault state samples are different, construct a contrast matrix, and design a contrast learning loss function based on the contrast matrix.
[0025] Specifically, let the two consecutive normal state samples be , and by combining the two normal state samples with 7 benchmark fault state samples in pairs respectively, and are obtained. According to the prior knowledge, , where c∈[1,7], we can design an 8×8 comparison matrix, and the matrix satisfies that the diagonal elements are the largest and the non-dual line elements are the smallest. In addition, the similarity relationship of the input samples can also be expressed by The output is represented by , if two normal state samples are input, the output is 1, otherwise it is 0. Based on this, the formula of contrastive learning loss function can be finally obtained.
[0026] Step 5: Combine the designed comparative learning loss function with the training set to construct and The present invention selects three extreme sample imbalance conditions for method testing.
[0027] Specifically, the number of samples of each type of fault state is 1, 5 and 10 respectively, which are combined with two consecutive normal state samples in turn to construct a contrast matrix, calculate the contrast learning loss function, and optimize the network parameters. The training batch is set to 1000 and the learning rate is 0.0001.
[0028] Step 6: Select 1000 normal state samples and 1000 fault state samples to form a test set, which contains 8000 samples in total. Combine each test sample with the randomly selected normal state samples, and obtain the training Perform output characterization, and obtain test results based on similarity comparison results between the output characterization and each benchmark characterization.
[0029] Step 6.1, let the test sample be , the normal state sample is , the combination of the two is , The high-dimensional representation of the output is .
[0030] Step 6.2, set and After two combinations, The high-dimensional representations of the output are , introduce the cosine similarity calculation method, and obtain the high-dimensional representation Similar results were obtained.
[0031] Step 6.3, through the Argmax operation, take the maximum value of the similarity calculation result, and take the index of the position where the similarity maximum value is located as the fault diagnosis result of the sample to be tested. By comparing it with the real one, the test result of the test set is finally obtained. The ten verification results under three extreme sample imbalance conditions are shown in Figure 3 shown.
[0032] The above are the preferred embodiments of the present invention. All changes made in accordance with the technical solution of the present invention and whose functional effects do not exceed the scope of the technical solution of the present invention shall fall within the protection scope of the present invention.
Claims
1. An intelligent fault diagnosis method under the condition of extreme imbalance of a rotating machinery sample, characterized in that, Introduce the prior knowledge that there is a high similarity between two consecutive normal state samples of a rotating machine and the samples of different fault states are different from each other. Construct the comparison relationship after combining the samples of different fault states with the adjacent normal state samples respectively. At the same time, construct a contrastive learning loss function based on this comparison relationship. Build a deep learning model, and combine the contrastive learning loss function, normal state samples and fault state samples to train the deep learning model. Combine the sample to be measured with the normal state sample and input it into the trained deep learning model to diagnose the state of the rotating machine.
2. The intelligent fault diagnosis method under the condition of extreme imbalance of a rotating machinery sample according to claim 1, characterized in that The method includes the following steps: (1) Collect the monitoring data of the rotating machine in the normal state. Through sliding window sampling, obtain the normal state samples. At the same time, collect each type of fault state sample during the fault of the rotating machine as the reference fault state sample; (2) According to the acquisition time sequence of the normal state monitoring data, take two consecutive normal state samples, combine them pairwise, and at the same time combine them with the reference fault state samples respectively to form a training data set; (3) Build a deep learning model, design the input layer and output layer of the model network. The input layer receives two input samples in the training data set, and the output layer is the similarity between the two input samples; (4) Combine the constructed sample combinations, introduce the prior knowledge that there is a high similarity between two consecutive normal state samples and the samples of different fault states are different from each other, construct a contrast matrix, and design a contrastive learning loss function; (5) Use the obtained normal state samples and reference fault state samples, and combine the contrastive learning loss function to train the constructed deep learning model; (6) Based on the trained deep learning model, diagnose the state of the rotating machine.
3. The intelligent fault diagnosis method under the condition of extreme imbalance of a rotating machinery sample according to claim 2, characterized in that In step (2), let the reference fault state sample be representing the number of reference fault state samples, and two consecutive normal state samples are combined into which are respectively combined with the reference fault state samples to obtain and .
4. The intelligent fault diagnosis method under the condition of extreme imbalance of a rotating machinery sample according to claim 3, characterized in that, In step (3), the deep learning model includes two parts of networks, namely the initial feature extraction network , and the similarity calculation network ; where takes as input , , takes as input the high-dimensional features extracted from the sample combinations in , through .
5. The intelligent fault diagnosis method under the condition of extremely unbalanced rotating machinery samples according to claim 4, characterized in that, In step (4), the prior knowledge that the two consecutive normal state samples are highly similar and different fault state samples are different is introduced, and by using to the k-th sample combination and the m-th sample combination perform high-dimensional feature extraction respectively to obtain high-dimensional features , and then through obtain the cosine similarity between the two, denoted by , where k, m ∈ [1, C] and k ≠ m. At the same time, by using to and perform high-dimensional feature extraction respectively, and then through obtain the cosine similarity between the two high-dimensional features; by processing all sample combinations and , a similarity comparison matrix M is obtained: Among them, n = C.
6. The intelligent fault diagnosis method under the condition of extreme imbalance of a rotating machinery sample according to claim 5, characterized in that, The physical prior knowledge trained by supervised learning compares the similarity matrix M with to calculate the cross entropy where H is the calculation of entropy, is the n*n expected matrix, expressed as: For divergence calculation, indicating the similarity between M and ; Among them, represents the I-th row and J-th column in the matrix; Furthermore, Finally, a new cross-entropy contrastive loss function is obtained: Among them, is the loss function, represents the k-th row element in the matrix, represents the k-th row element in represents the k-th row element in M, is the penalty factor, T represents the transpose symbol, is the weight coefficient; There are also differences in information entropy between the normal state samples and the reference fault state samples. Therefore, the physical prior knowledge 0 and 1 are used to describe this difference, that is, there is a high similarity between two normal state samples, which is described as 1; there is a difference between the normal state sample and the reference fault state sample, which is described as 0; based on this, a new binary classification cross-entropy loss function is constructed and defined as: Among them, is a normal state sample, is a reference fault state sample, ; when j = 0, , when j ≠ 0, , is the predicted value output by the deep learning model, and K represents the Kth time; Under the condition of extremely unbalanced samples, the final contrastive learning loss function is expressed as: Among them, is the loss function, is the binary classification cross-entropy loss function.
Citation Information
Patent Citations
Rotating equipment small sample fault diagnosis method based on semi-supervised contrast learning
CN117113198A
Method for analyzing gas dissolved in oil by fusing two-channel filter and SMOTE algorithm
CN117574265A
Power grid health assessment and analysis method based on multiple modes
CN118657404A
Space-time self-supervised runoff data completion method and device and storage medium
CN119088793A
Method, apparatus, device and medium for training and applying a contrastive learning model
US20240152760A1
Cited By
Rotary machinery zero sample intelligent fault detection method and device driven by vibration signal analysis knowledge
CN120873554A