An intelligent fault diagnosis method under extremely unbalanced conditions of a rotating machinery sample
By introducing the similarity of normal state samples and the mutual opposite-sex prior knowledge of fault state samples in the rotating machinery, constructing a comparative learning loss function and optimizing the deep learning model, the problem of unbalanced samples of rotating machinery is solved and high-precision fault diagnosis is achieved.
Patent Information
- Application Number
- CN202510682609.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-05-26
AI Technical Summary
The prior art is difficult to effectively utilize extremely unbalanced sample data in rotating machinery for intelligent fault diagnosis, especially because there are very few samples of fault status, which makes it difficult to train deep learning models and it is difficult to establish a high-precision fault diagnosis model.
Introduce the similarity between normal state samples of rotating machinery and the mutual opposite-sex prior knowledge between fault state samples, construct a comparative learning loss function, and optimize deep learning model parameters, design capsule neural networks for feature encoding and similarity calculations to realize intelligent fault diagnosis of rotating machinery.
Under extremely unbalanced conditions, a small number of fault state samples are used to achieve high-precision fault diagnosis of rotating machinery, solving the sample imbalance problem, and improving the accuracy and reliability of the diagnostic model.
Smart Images

Figure CN120197065B_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 requirements for both the quality and quantity of 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 of 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 different combinations of fault state samples and normal state samples still has inherent differences; furthermore, based on the above understanding, construct the 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:
[0006] (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 sample;
[0007] (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;
[0008] (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;
[0009] (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 different from each other, construct a contrast matrix, and design a contrastive learning loss function;
[0010] (5) Use the obtained normal state samples and reference fault state samples, and combine with the contrastive learning loss function to train the constructed deep learning model;
[0011] (6) Based on the trained deep learning model, diagnose the state of the rotating machinery.
[0012] Further, in step (2), let the reference fault state sample be represents the number of reference fault state samples, and the combination of two consecutive normal state samples is respectively combined with the reference fault state samples to obtain and .
[0013] Further, in step (3), the deep learning model includes two parts of networks, namely the initial feature extraction network , the similarity calculation network ; where The input is 、 , The input is 、 The high-dimensional features extracted from the sample combinations in .
[0014] Furthermore, in step (4), prior knowledge that two consecutive normal state samples are highly similar and different fault state samples are different is introduced, and is used to the k-th sample combination in and the m-th sample combination in are respectively subjected to high-dimensional feature extraction to obtain high-dimensional features , and then through the cosine similarity between the two is obtained and represented by , where k, m ∈ [1, C] and k ≠ m. At the same time, is used to and are respectively subjected to high-dimensional feature extraction, and then through the cosine similarity between the two high-dimensional features is obtained; by processing all sample combinations and , a similarity comparison matrix M is obtained:
[0015]
[0016] where n = C.
[0017] Furthermore, based on the physical prior knowledge trained by supervised learning, the cross-entropy calculation is performed on the similarity comparison matrix M and :
[0018]
[0019] where H is the entropy calculation, is the n*n expectation matrix, expressed as:
[0020]
[0021] is the divergence calculation, representing the similarity between M and ;
[0022]
[0023] where represents the i-th row and j-th column in the matrix;
[0024] Furthermore,
[0025]
[0026] Finally, a new cross - entropy contrast loss function is obtained:
[0027]
[0028] wherein, 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;
[0029] There are also differences in information entropy between normal - state samples and reference - fault - state samples. Therefore, physical prior knowledge 0 and 1 are used to describe this difference, that is, there is a high similarity between pairwise normal - state samples, which is described as 1; there is a mutual difference between normal - state samples and reference - fault - state samples, which is described as 0. Based on this, a new binary - classification cross - entropy loss function is constructed and defined as:
[0030]
[0031] wherein, is the normal - state sample, is the reference - fault - state sample, ; when j = 0, , when j≠0, ,[[]]END]] is the predicted value output by the deep - learning model, K represents the K - th time;
[0032] Under the condition of extremely unbalanced samples, the final contrast - learning loss function is expressed as:
[0033]
[0034] wherein, is the loss function, is the binary - classification cross - entropy loss function.
[0035] Compared with the prior art, the present invention has the following beneficial effects:
[0036] 1. By introducing the prior knowledge that the continuously collected state data under normal conditions of rotating machinery have high similarity, and the prior knowledge that different fault - state samples are mutually different, through combining normal - state samples and fault - state samples, the requirement of traditional deep learning for a complete training set is achieved, and the balance between normal - state samples and fault - state samples is ensured.
[0037] 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.
[0038] 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.
[0039] 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
[0040] Figure 1 The present invention provides a comparative loss function construction and fault diagnosis algorithm process.
[0041] Figure 2 It is the training process of the constructed deep network model.
[0042] Figure 3 It is the test result of the fault diagnosis method under the condition of extreme fault sample imbalance. DETAILED DESCRIPTION
[0043] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings.
[0044] The present invention provides an intelligent fault diagnosis method under the condition of extremely unbalanced rotating machinery samples, introduces the prior knowledge that two consecutive normal state samples of rotating machinery are highly similar and different fault state samples are different, constructs the comparison relationship after different fault state samples are combined with adjacent normal state samples, and constructs the comparison learning loss function based on the comparison relationship; constructs a deep learning model, and trains the deep learning model in combination with the comparison learning loss function, normal state samples and fault state samples; combines the sample to be tested with the normal state sample, and inputs it into the trained deep learning model to diagnose the state of the rotating machinery. The method comprises the following steps:
[0045] (1) Collect normal state monitoring data of rotating machinery, obtain normal state samples through sliding window sampling, and at the same time, collect each type of fault state samples of rotating machinery as benchmark fault state samples;
[0046] (2) According to the acquisition sequence of normal state monitoring data, two consecutive normal state samples are taken, and they are combined in pairs. At the same time, they are combined with the reference fault state samples to form a training data set;
[0047] (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 dataset, and the output layer is the similarity between the two input samples;
[0048] (4) Combine the constructed sample combinations, introduce the prior knowledge that two continuously normal state samples are highly similar and different fault state samples are different from each other, construct a contrast matrix, and design a contrastive learning loss function;
[0049] (5) Use the obtained normal state samples and benchmark fault state samples, and combine with the contrastive learning loss function to train the constructed deep learning model;
[0050] (6) Based on the trained deep learning model, diagnose the state of the rotating machinery.
[0051] The following is the specific implementation process of the present invention.
[0052] Please refer to Figure 1 , Figure 2 and Figure 3 A method for intelligent fault diagnosis under extremely unbalanced samples of rotating machinery provided by the present invention mainly includes the following steps:
[0053] Step 1, select a typical rotating machinery, the wind power gearbox;
[0054] Specifically, conduct fault experiments using an experimental platform. 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. During each fault experiment, the vibration signals are 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 the number of vibration data points collected is 1228800. Use a sliding window with a length of 2048 to sample the normal state vibration data, and a total of 2000 samples are obtained. For each type of fault, 1010 samples are taken, among which 10 samples are used for training and 1000 samples are used for testing.
[0055] Step 2, select 1000 normal state samples and combine them with 7 types of fault state samples to form a training set, and ensure the balance of normal state samples and fault state samples in the obtained training set by combining normal state samples with fault samples.
[0056] Specifically, taking the example that there is only 1 sample for each type of fault state, select two consecutive samples from the normal state samples, and combine the fault state sample with these two normal state samples respectively.
[0057] Step 3, construct a , the initial capsule layer parameter is 3, and the routing capsule layer parameter is 5. By modifying the input layer structure and the forward and backward propagation algorithms, it can receive the inputs of two samples and can perform high-level fusion on them. Construct a based on a fully connected neural network, which altogether contains two fully connected layers, and the output layer has 1 neuron.
[0058] 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 from each other, construct a contrast matrix, and design a contrast learning loss function based on the contrast matrix.
[0059] Specifically, let two consecutive normal state samples be , by combining the two normal state samples with 7 benchmark fault state samples pairwise respectively to obtain and , according to the prior knowledge, we can get , where c ∈ [1, 7]. An 8×8 contrast matrix can be designed, and the diagonal elements of this matrix are the largest, and the non-diagonal elements are the smallest. In addition, the similarity relationship of the input samples can also be represented by the output. If the inputs are two normal state samples, the output is 1, otherwise it is 0. Based on this, the formula of the contrast learning loss function can be finally obtained.
[0060] Step 5: Combine the designed contrast learning loss function with the training set to train the network parameters of the and constructed. The present invention altogether selects three extremely sample imbalance conditions for method testing.
[0061] Specifically, the numbers of samples for each type of fault state are 1, 5, and 10 respectively. Combine them 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 set training batch is 1000, and the learning rate is 0.0001.
[0062] Step 6: Select 1000 normal state samples and 1000 samples for each type of fault state respectively to form a test set, which altogether contains 8000 samples. Combine each test sample with a randomly selected normal state sample, and perform output characterization through the obtained by training. Based on the similarity comparison results between the output characterization and each benchmark characterization, the test results are obtained.
[0063] Step 6.1: Let the test sample be , and the normal state sample be , the combination of the two is , The output high-dimensional representation is .
[0064] Step 6.2, set and After pairwise combination, the high-dimensional representations output by are respectively . Introduce the cosine similarity calculation method, and respectively obtain the similarity results with the high-dimensional representation .
[0065] Step 6.3, through the Argmax operation, take the maximum value of the similarity calculation results, and use the index of the position where the maximum similarity value is located as the fault diagnosis result of the sample to be tested. By comparing it with the truth, the test results of the test set are finally obtained. The ten verification results under three extremely sample imbalance conditions are as Figure 3 shown.
[0066] The above are the preferred embodiments of the present invention. All changes made according to the technical solution of the present invention, when the functions and effects generated 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 mutually different. Construct the comparison relationships 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 samples and input them into the trained deep learning model to diagnose the state of the rotating machine. The method includes the following steps: (1) Collect the monitoring data of the normal state of the rotating machine, 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 machine as the benchmark 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 benchmark 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, 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 there is a high similarity between two consecutive normal state samples and the samples of different fault states are mutually different, construct a contrast matrix, and design a contrastive learning loss function; (5) Use the obtained normal state samples and benchmark 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; The physical prior knowledge trained by supervised learning compares the similarity matrix M with to perform cross-entropy calculation where H is the calculation of entropy, is an n*n expected matrix, expressed as: For divergence calculation, representing the similarity between M and ; Among them, represents the I-th row and J-th column in the matrix; Obtain 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 is also a difference in information entropy between the normal state samples and the benchmark 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 mutual difference between the normal state samples and the benchmark fault state samples, 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, , C represents the number of reference fault state samples; 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: Among them, is the loss function, is the binary classification cross-entropy loss function.
2. The intelligent fault diagnosis method under the condition of extreme imbalance of a rotating machinery sample according to claim 1, wherein In step (2), let the reference fault state sample be , and the combination of two consecutive normal state samples be . Combine them with the reference fault state sample respectively to obtain and .
3. The intelligent fault diagnosis method under the condition of extreme imbalance of a rotating machinery sample according to claim 2, wherein, In step (3), the deep learning model includes two parts of networks, namely the initial feature extraction network , and the similarity calculation network ; among them 's input is , , 's input is , the high-dimensional features extracted from the sample combinations in .
4. The intelligent fault diagnosis method under the condition of extreme imbalance of a rotating machinery sample according to claim 3, wherein In step (4), introduce the prior knowledge that the heights of two consecutive normal state samples are highly similar and different fault state samples are different, and use to the k-th sample combination in and the m-th sample combination respectively perform high-dimensional feature extraction to obtain high-dimensional features , and then through obtain the cosine similarity between them, denoted by , where k, m ∈ [1, C] and k ≠ m. At the same time, use to and respectively perform high-dimensional feature extraction, and then through obtain the cosine similarity between the two high-dimensional features; by processing all sample combinations and , obtain the similarity comparison matrix M: where, n = C.
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