Small sample fault diagnosis method based on twinborn consistency fault representation self-learning
By building a twin-consistent fault characterization self-learning network, and extracting robust fault characteristics, the problem of weak fault diagnosis capabilities of the fault diagnosis model in the existing technology in the scenario of unbalanced fault sample distribution is solved, and higher fault diagnosis performance and generalization capabilities are achieved.
Patent Information
- Application Number
- CN202510669604.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-05-23
AI Technical Summary
In the prior art, the fault diagnosis model based on deep learning has weak fault diagnosis capabilities in scenarios where the fault sample distribution is unbalanced and the effective fault information is small.
A small sample fault diagnosis method based on twin consistency fault characterization self-learning is adopted. By building a twin consistency fault characterization self-learning network, the fault correlation between samples in the original sample dataset is learned, robust fault characteristics are extracted, and the generalization ability and diagnostic performance of the fault diagnosis model are improved.
It effectively improves the generalization ability and diagnostic performance of the fault diagnosis model under the conditions of fault information imbalance, reduces the dependence on the quality of the original sample, and improves the robustness and adaptability of the model.
Smart Images

Figure CN120197114A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of fault diagnosis under the condition of small sample data, and relates to a small sample fault diagnosis method based on self-learning of twin consistency fault characterization. Background Art
[0002] With the gradual improvement of the automation level and complexity of industrial equipment, the requirements for safety, reliability, and stability during the operation of the equipment have also gradually increased. Timely and accurate fault diagnosis technology can provide effective technical support for the autonomous perception of equipment status and the autonomous decision-making of task planning. Fault diagnosis methods based on deep learning have become the current mainstream fault diagnosis methods due to their flexible models and strong feature extraction capabilities. The performance of fault diagnosis methods based on deep learning highly depends on the quality of equipment monitoring data. However, during the operation of the equipment, it is mostly in a normal state, so the collected normal samples are much larger than the fault samples [Chinese Invention Patent CN113281029A]. When there is a large difference in the number of samples between different fault modes of the equipment, it will cause the fault diagnosis model based on deep learning to conduct biased fault information mining, thus unable to accurately extract highly generalized equipment status characterization, ultimately leading to a decline in diagnostic performance.
[0003] Currently, for the problem of poor diagnostic performance caused by the imbalance in the number of samples for different fault modes, the main solutions include fault diagnosis methods based on expert knowledge, fault diagnosis methods based on generative models, and fault diagnosis methods based on resampling. Among them, fault diagnosis methods based on expert knowledge mainly utilize the experience and rules of domain experts and other knowledge to guide the model learning process by establishing fault inference rules, thereby conducting fault identification. However, this method highly depends on expert knowledge, and fault knowledge is usually difficult to construct, and the model has poor generalization and flexibility. Fault diagnosis methods based on generative models are based on generative adversarial network models to simulate the real data distribution, thereby generating new samples similar to the original data, thus alleviating the problem of insufficient partial fault samples. This method has high requirements for the original samples and is prone to generating redundant samples containing a large amount of duplicate information. Fault diagnosis methods based on resampling balance the number of samples of different categories by oversampling or undersampling the original sample data, thereby improving the classification accuracy. The main problem of this type of method is that excessive resampling may introduce noise and thus reduce the model learning efficiency. Summary of the Invention
[0004] Aiming at the problem that the fault diagnosis model in the prior art has weak fault diagnosis ability in the scenario of unbalanced fault sample distribution and less effective fault information, the present invention provides a small-sample fault diagnosis method based on self-learning of twin-consistent fault representations. This method draws on the form of the twin network architecture to construct a twin-consistent fault representation self-learning network, and extracts and mines robust fault features with strong representation ability by learning the fault correlation relationships between samples in the original sample dataset, ultimately improving the generalization ability and diagnosis performance of the fault diagnosis model under the condition of unbalanced fault information.
[0005] To achieve the above object, the technical solution adopted by the present invention is as follows:
[0006] A small-sample fault diagnosis method based on self-learning of twin-consistent fault representations, wherein the small-sample fault diagnosis includes the following steps:
[0007] Step 1: Collect the status monitoring data of the device to construct a sample dataset, and preprocess the sample dataset to obtain training set samples and test set samples.
[0008] Step 2: Based on the training set samples obtained in Step 1, use the fault label information of different samples to perform sample association matching, thereby constructing fault-associated samples to obtain a fault sample association dataset.
[0009] Step 3: Based on the fault sample association dataset obtained in Step 2, perform sample space reduction. By setting a reduction scale, reduce the fault-associated samples to construct a reduced fault sample association dataset.
[0010] Step 4: Construct and train a fault diagnosis model based on the twin-consistent fault representation self-learning network. By selecting the model architecture and parameters, construct a fault diagnosis model based on the twin-consistent fault representation self-learning network, and based on the fault sample association dataset obtained in Step 3, complete the training and optimization of the fault diagnosis model by setting training hyperparameters.
[0011] Step 5: Extract the fault features of the samples to be measured and the training set samples. After completing the training of the fault diagnosis model, based on the feature encoder in the trained fault diagnosis model, extract the fault features for the samples to be measured and the training set samples respectively.
[0012] Step 6: Perform fault feature twin similarity measurement. For the fault features of the samples to be measured and the training set samples obtained in Step 5, use the feature fusion measurement module in the trained fault diagnosis model to measure the fault feature twin similarity between the features.
[0013] Step 7: Identify the fault mode of the sample to be tested. Based on the fault feature twin similarity measurement results obtained in Step 6, set a label recognition strategy based on the unbalanced sample distribution to identify the fault mode of the sample to be tested.
[0014] Specifically as follows:
[0015] Furthermore, the sample dataset construction method described in Step 1 includes using a sliding window to divide the condition monitoring data into samples and performing min-max normalization processing, providing a data basis for the subsequent fault diagnosis model based on the twin consistency fault characterization self-learning network to learn fault features; it includes the following sub-steps:
[0016] Step 1.1: Divide the training set and test set samples;
[0017] For the condition monitoring data of the device, construct a sample dataset. First, for the condition monitoring data of each fault mode collected, use a sliding window to cut and generate multiple samples. Suppose the condition monitoring data under a certain fault mode has a length of , and use a window with a length of w and a moving step size of s to cut the samples, obtaining generated samples, and then select training samples from them, and the remaining samples as test samples.
[0018] Step 1.2: Data normalization;
[0019] Normalize each sample S in the training data to obtain a normalized training sample set and test sample set. The normalization formula is:
[0020]
[0021] where, is the signal sequence composed of training samples; where is the maximum value in the signal sequence composed of training samples, is the minimum value in the signal sequence composed of training samples, is the normalized sample obtained by normalizing the original sample.
[0022] Finally, obtain the training dataset and the test dataset , with a total of N fault modes, where and represent the training sample set and test sample set with the fault mode of N.
[0023] Further, the sample association matching described in step 2 is specifically as follows: According to the failure modes of the samples, the samples are paired and matched. Samples with the same failure mode are matched as positively associated samples, and samples with different failure modes are matched as negatively associated samples; the combination label of samples with the same label is 1, and the combination label of samples with different labels is 0. It includes the following sub-steps:
[0024] Step 2.1, association matching of samples with the same failure mode;
[0025] For the training sample set with the failure mode i, any two samples are selected from it , since they belong to the same failure mode, there is , where represents the failure association operator; for samples with the same failure mode, their association attribute is 1.
[0026] Step 2.2, association matching of samples with different failure modes;
[0027] For the training sample sets with the failure modes and , , , one sample is taken from each of them. Since they belong to different failure modes, there is , and for samples with different failure modes, their association attribute is 0.
[0028] After the failure sample association matching of all training samples, the failure sample association data set , is finally obtained, where the subscripts , are the numbers of associated sample pairs with association attributes of 1 and 0 respectively.
[0029] Further, the sample space reduction described in step 3 is specifically as follows: For the failure sample association data set obtained in step 2, considering the distribution of the numbers of samples with different failure modes in the training data set obtained in step 1, a reduction scale is set, and the samples with different failure modes participating in sample association are reduced, so as to realize the reduction of the failure association sample space; it includes the following sub-steps:
[0030] Step 3.1, constructing the reduction scale;
[0031] For the training sample set , N is the number of failure modes. The present invention considers the relative magnitudes of the distributions of the numbers of samples with different failure modes in the training data set, and thus there is , . Among them, is the training sample set with the failure mode , For the training sample set with the failure mode being and being the minimum value of the number of samples of each failure mode in the training dataset, being the median value of the number of samples of each failure mode in the training dataset, and respectively represent the training sample sets of a failure mode. For the associated sample set with the associated attribute being 1, the reduction scale is ; for the associated sample set with the associated attribute being 0, the reduction scale is .
[0032] Step 3.2, sample space reduction;
[0033] For the failure sample association dataset constructed in Step 2 and , where is the associated sample set constructed from samples of the same failure mode. Since there are a total of N failure modes, therefore, in , randomly select and retain samples, and eliminate the remaining samples to complete sample space reduction; is the associated sample set constructed from samples of different failure modes. Among the N failure modes, for the failure associated samples obtained by associating samples with normal samples, randomly select and retain samples in these associated samples and eliminate the remaining samples to complete sample space reduction. Through the above sample reduction operations, while reducing redundant failure association information, it is possible to ensure the diversification and maximization of failure information as much as possible. Finally, the reduced failure associated sample set is obtained.
[0034] Furthermore, the construction and training of the fault diagnosis model based on the twin consistency fault characterization self - learning network described in Step 4 are specifically as follows: This model uses a twin neural network as the fault feature encoding module and a deep convolutional neural network as the feature fusion metric module. Furthermore, based on the reduced failure associated sample set obtained in Step 3, and using the root - mean - square error as the training loss function, the training of the fault diagnosis model is completed. It includes the following sub - steps:
[0035] Step 4.1, design the fault diagnosis model architecture;
[0036] The present invention constructs a fault diagnosis model based on the twin consistency fault characterization self - learning network. This fault diagnosis model is composed of a fault feature encoding module and a feature fusion metric module. The fault feature encoder is composed of a two - branch network with shared weights, and the feature fusion metric module is composed of a convolutional network.
[0037] First, for a pair of associated samples and feature extraction is performed using the feature encoding module to obtain fault features and , where represents performing a linear transformation operation on the input sample using the encoder module, represents a non-linear transformation operation. Then, the feature fusion metric module is used to perform twin similarity measurement on the above-mentioned fault features, and the measurement result is , where is the feature splicing operation, and the two fault features are spliced along the sample dimension in a way that ensures the feature dimension remains unchanged, is to use the feature metric module based on the convolutional neural network to measure the twin similarity of the fault features through convolutional operations on the input. Finally, the fault feature twin similarity of this pair of associated samples is calculated.
[0038] Step 4.2, training the fault diagnosis model;
[0039] Based on the fault diagnosis model constructed in Step 4.1, the present invention uses the root mean square error as the loss function, where for the k-th group of fault-associated samples , is the predicted twin similarity value, is the twin similarity label value. This method uses the gradient descent strategy to update the parameters of the fault diagnosis model. Its principle is to assume that the parameters of the fault diagnosis model are , and the loss function used for training this fault diagnosis model is , then the optimization objective is :
[0040] The parameter update strategy is:
[0041]
[0042] where is the initial parameter, is the updated parameter; is the learning rate.
[0043] The value of the learning rate can control the update amplitude of the parameters in each iteration. When the learning rate is relatively large, the gradient descent amplitude of the parameters is relatively large, and the convergence speed of the loss function is relatively fast. However, when the learning rate is too large, it will cause the loss function to oscillate near its extreme point, thus hindering convergence; when the learning rate is relatively small, the gradient descent amplitude of the parameters is relatively small, resulting in a slower convergence speed of the model. Finally, when gradually converges to 0, it represents that the fault diagnosis model has optimized to obtain a set of suitable parameters , such that the loss function obtains the minimum value.
[0044] Furthermore, the feature extraction described in Step 5 is specifically as follows: After completing the training of the fault diagnosis model, based on the fault feature encoding module in the fault diagnosis model, for the training data set constructed in Step 1, all training samples are extracted to obtain training set fault features , and for the test sample fault features are extracted to obtain test sample fault features.
[0045] Furthermore, the fault feature twin similarity measurement described in Step 6 is specifically as follows:
[0046] Step 6.1, reconstruction of test sample fault features;
[0047] The fault features of the test sample obtained in Step 5 are concatenated with all sample fault features in the training set fault features . The concatenation method is to concatenate along the sample dimension to ensure that the feature dimension remains unchanged. Finally, through feature concatenation, a reconstructed fault feature set is obtained, where represents the concatenated fault feature composed of the th training sample with fault mode N and the th test sample with fault mode
[0048] Step 6.2, fault feature twin similarity measurement;
[0049] Using the feature fusion measurement module in the fault diagnosis model, calculate the twin similarity of each concatenated fault feature in the fault feature set obtained in Step 6.1, and obtain the twin similarity degree result between the test sample and the training set samples, defined as , where represents the set of twin similarities between a total of training samples with fault mode N and the test sample .
[0050] Furthermore, the discrimination of the fault mode of the test sample described in Step 7 is specifically as follows:
[0051] Based on the twin similarity degree result between the test sample and the training set samples obtained in Step 6, the label recognition result of the test sample is , that is, calculate the mean of the twin similarities between the training set samples of different fault modes and the sample to be tested, and then take the fault mode with the largest similarity mean as the fault mode discrimination result of the test sample. Complete the fault mode discrimination of the sample to be tested; finally, perform the operations from step five to step seven on all the test set samples, so as to realize the fault diagnosis of all the test samples.
[0052] The beneficial effects of the present invention are as follows:
[0053] (1) Aiming at the problems of weak generalization ability and poor feature robustness of the fault diagnosis model caused by the imbalance of the sample numbers of different fault modes in the prior art, a fault diagnosis method based on twin consistency representation self-learning is proposed.
[0054] (2) The sample correlation matching method in the fault diagnosis method of the present invention can utilize the fault information of different samples, establish the fault correlation relationship between different samples through the correlation matching of different samples, and realize the correlation matching of samples.
[0055] (3) The sample reduction method in the fault diagnosis method of the present invention can reduce and redistribute the unbalanced fault information distribution for the constructed fault correlation sample set, which helps the model to learn more robust fault features.
[0056] (4) The twin consistency fault representation self-learning network in the fault diagnosis method of the present invention realizes the adaptive measurement of twin feature similarity by integrating the feature encoding module based on the twin network and the feature fusion measurement module based on the convolutional network, avoiding the subjective dependence on the selection of hyperparameters in the training process of the traditional contrast loss function.
[0057] (5) The method for discriminating the fault mode of the sample to be tested proposed by the present invention can comprehensively weigh and measure the fault category to which the sample to be tested belongs by using the fault information of the existing training samples, improving the accuracy of fault mode discrimination. Description of the Drawings
[0058] Figure 1 is the flowchart of the small sample fault diagnosis method based on twin consistency fault representation self-learning;
[0059] Figure 2 is the sample correlation diagram of the same fault mode;
[0060] Figure 3 is the sample correlation diagram of different fault modes;
[0061] Figure 4 is the sample correlation diagram of the same fault mode after reduction;
[0062] Figure 5 is the sample correlation diagram of different fault modes after reduction;
[0063] Figure 6 It is the structural diagram of the fault diagnosis model based on the twin consistency fault characterization self - learning network;
[0064] Figure 7 It is the loss function curve during the training process of the fault diagnosis model;
[0065] Figure 8 It is the twin similarity result of the associated samples in the training set;
[0066] Figure 9 It is the fault feature result of the samples in the training set;
[0067] Figure 10 It is the fault feature result of the samples in the test set;
[0068] Figure 11 It is the measurement result of the twin similarity of the fault characteristics between the samples to be measured in different fault modes and the original samples;
[0069] Figure 12 It is the result of the fault diagnosis confusion matrix of the samples in the test set;
[0070] Figure 13 It is the accuracy comparison between the method proposed in the present invention and the fault diagnosis model based on the traditional twin network;
[0071] Figure 14 It is the diagnosis performance comparison of the method proposed in the present invention under different data conditions. Specific embodiments
[0072] The following further illustrates the present invention in combination with specific implementation cases.
[0073] Step 1: Collect the state monitoring data of the device to construct a sample data set, and pre - process the sample data set to obtain training set samples and test set samples;
[0074] The present invention takes the vibration signal data of a hydraulic pump test bench as an example to verify the case of the method of the present invention. The data are respectively collected from the vibration signal data of the hydraulic pump in three different states: normal state, wear state of the slipper and swash plate (fault 1), and wear state of the port plate and original rotor (fault 2). Using the sample set construction method described in Step 1, through methods such as training set and test set sample division and data normalization, 100 training samples and 400 test samples are generated respectively under each fault state. The present invention designs different degrees of fault sample scarcity conditions to verify the effectiveness of the method of the present invention. The specific data conditions are shown in Table 1:
[0075] Table 1, Training data set under sample scarcity conditions
[0076]
[0077] Step 2: Based on the training set samples obtained in Step 1, use the fault label information of different samples to perform sample correlation matching, thereby constructing fault-correlated samples and obtaining a fault sample correlation dataset; taking Data Condition 1 as an example, first perform sample correlation matching on the original unbalanced sample dataset. According to different fault modes of the samples, the types of correlated samples are divided into two categories. One category is obtained by correlating and matching samples with the same fault mode, and the other category is obtained by correlating and matching samples with different fault modes.
[0078] Step 2.1, Correlation matching of samples with the same fault mode;
[0079] Correlation matching of samples with the same fault mode helps the model identify different sample manifestations of the same fault mode, thereby mining the intrinsic components of fault features. The correlation matching results of samples with the same fault mode are as Figure 2 shown. As Figure 2 can be seen, samples with different fault modes are marked with different symbols. Among them, since each sample is also a relationship of the same type of sample with itself, sample correlation is also given. By constructing a correlation relationship between samples, more sample correlation results will be generated. And because the number of original normal samples is much larger than the number of fault samples, correlating samples with the same fault mode will cause the fault information of this fault mode to further increase, thereby exacerbating the imbalance of fault information.
[0080] Step 2.2, Correlation matching of samples with different fault modes;
[0081] Correlation matching of samples with different fault modes helps the model identify the differential components of different fault modes, thereby achieving more accurate fault feature extraction. The correlation matching results of samples with different fault modes are as Figure 3 shown. As Figure 3 can be seen, for the correlation of samples with different fault modes, in the data space after sample correlation, more correlated samples are used to represent the correlation relationship between fault samples and normal samples, while only a small number of correlated samples are used to represent the correlation relationship between different fault modes, which also exacerbates the imbalance of fault information in the data space.
[0082] Step 3: Based on the fault sample correlation dataset obtained in Step 2, perform sample space reduction. By setting a reduction scale, reduce the fault-correlated samples, thereby constructing a reduced fault sample correlation dataset. As Figure 2 and Figure 3 can be seen, all the original sample data participated in sample correlation before reduction. However, both sample correlation methods exacerbated the further deepening of the imbalance degree of fault information in the entire sample space. Therefore, it is necessary to perform sample space reduction to balance the fault information in the sample space, thereby improving the data quality.
[0083] Step 3.1, construct the reduction scale;
[0084] According to the reduction scale calculation method described in Step 3, and based on the dataset conditions set in Table 1, for the associated sample sets with associated attribute 1 and associated attribute 0 under different data conditions, the calculated reduction scales are respectively (400, 400), (225, 300), (100, 200), (225, 225), (100, 150), (100, 100).
[0085] Step 3.2, sample space reduction;
[0086] The graphs of the associated matching results of the same and different fault mode samples after reduction are as Figure 4 and Figure 5 shown. As can be seen from the figures, after sample reduction, for the three types of fault samples with fault labels of normal, fault - 1, and fault - 2 respectively, when performing sample association of the same fault mode, the three types of samples participating in the sample association have all been reduced to varying degrees, and the association relationships between the same - type fault samples have significantly decreased, so that the number of the same - type associated sample pairs after the final association can be kept relatively balanced. For the scenario of sample association between different fault modes, the normal - type samples participating in the sample association have also been significantly reduced, so that during the construction of sample association, the sample information of fault 1 and fault 2 with a small number of samples is retained as much as possible, while the redundant information of the normal samples with a large number of samples is reduced, thus balancing the distribution of fault information in the sample space.
[0087] In order to quantitatively measure the fault information before and after sample space reduction, the present invention has counted the sample association pairs before and after reduction, and the results are shown in Table 2:
[0088] Table 2, Comparison results of fault - associated sample data before and after reduction
[0089]
[0090] As can be seen from Table 2, for the 6 data scenarios, when no sample reduction is performed, after sample association construction, the ratio between the samples associated with the same fault and those associated with different faults deepens as the degree of unbalanced data increases. For the extremely unbalanced data condition 6, the ratio between the two reaches 2.40, that is, each sample associated with a different fault will correspond to 2.4 samples associated with the same fault. After sample association, the imbalance phenomenon of fault information still exists. In the reduced sample space, the ratio between the samples associated with the same fault and those associated with different faults remains relatively stable and does not show obvious fluctuations as the degree of unbalanced data increases, and the average ratio remains around 0.5:1. The reduced fault-associated data set can ensure a relatively stable distribution of fault information for data sets with different degrees of imbalance, thus providing a good data basis for subsequent robust fault feature extraction.
[0091] Step 4: Construct and train a fault diagnosis model based on the self-learning network of twin consistency fault representations. By selecting the model architecture and parameters, construct a fault diagnosis model based on the self-learning network of twin consistency fault representations. Based on the reduced fault sample association data set obtained in Step 3, by setting the training hyperparameters, complete the training and optimization of the fault diagnosis model.
[0092] Step 4.1, design the architecture of the fault diagnosis model;
[0093] The present invention proposes a fault diagnosis model based on the self-learning network of twin consistency fault representations. The architecture of this model is as Figure 6 shown, and the model structure parameters are shown in Table 3:
[0094] Table 3, Structure parameters of the fault diagnosis model based on the self-learning network of twin consistency fault representations
[0095]
[0096] Based on the Python language, the present invention uses the PyTorch deep learning framework to construct a fault diagnosis model based on the above parameter configuration. The training hyperparameters of the fault diagnosis model are shown in Table 4:
[0097] Table 4, Configuration of training hyperparameters of the fault diagnosis model
[0098]
[0099] Step 4.2, train the fault diagnosis model;
[0100] Based on the architecture parameters and training parameter configuration of the fault diagnosis model in Tables 3 and 4, taking data condition 2 (100 normal - 20 fault 1 - 20 fault 2) as an example, the model training process is as Figure 7 shown: By Figure 7It can be seen that the loss function based on the mean square error (MSE) steadily decreases during the model training process and finally converges near 0, indicating that the model parameters are updated and optimized normally. After completing the model training, all training data are associated and matched based on the sample labels, and the fault-associated samples are input into the trained fault model in pairs. The twin similarity of the fault-associated samples in the training set is as Figure 8 shown: As Figure 8 can be seen, for all samples in the training set, the labels are normal, fault 1, and fault 2 respectively. Therefore, when associating samples with different fault labels, there are a total of three types of fault association forms. For samples associated with the same fault label, their twin similarity is close to 1. For samples with different fault labels, since there are three types of association types, the twin similarity curve is divided into three heights and all are close to 0, indicating that the trained model can well extract twin-consistent fault features for samples associated with the same fault label. For samples associated with different fault labels, since there is little twin-consistent information between the extracted fault features, it is further proved that the model can specifically extract better generalizable fault features for samples with different fault modes.
[0101] Step Five: After completing the training of the fault diagnosis model, based on the feature encoder in the trained fault diagnosis model, extract fault features for the training set samples. In the case where the sample situation is 100 normal - 20 fault 1 - 20 fault 2, use the feature encoding module in this fault diagnosis model to extract features for all training set and test set samples to be measured. The results are as Figure 9 and Figure 10 shown: It can be seen from the figure that after extracting the fault features of the training set and test set samples to be measured through the fault diagnosis model proposed in the present invention, the distribution of each fault feature in the low-dimensional space is uniform, and the fault features of the same type of test samples are distributed compactly, and the fault features of different types of test samples are evenly distributed in the feature space. Therefore, the method proposed in the present invention can extract accurate and robust fault features for samples, thus effectively supporting the subsequent work of identifying fault sample labels.
[0102] Step Six: Perform fault feature twin similarity measurement. For the fault features of the samples to be measured and the training set samples obtained in Step Five, use the feature fusion and measurement module in the trained fault diagnosis model to measure the fault feature twin similarity between the features;
[0103] Step 6.1, Reconstruct the fault features of the test samples;
[0104] In this case, taking the 30th test sample under three fault modes of normal state, wear state of slipper and swash plate (fault 1), and wear state of original rotor of valve plate (fault 2) in the test set as an example, the fault features are spliced with those of the training set samples to reconstruct the fault features of each test sample.
[0105] Step 6.2, Fault feature twin similarity measurement;
[0106] The reconstructed fault features are input into the trained fault diagnosis model, and the fault feature twin similarities between the 30th test sample under the three fault modes and all known samples are obtained respectively as Figure 11 shown.
[0107] As Figure 11 can be seen, for the test sample with a normal fault label, the fault feature twin similarity between this sample and all known training samples with a normal fault label is the highest and the similarity is close to 1. For the other two types of known training samples, their fault feature twin similarities are both small and close to 0. Thus, it can be judged that the fault label of this test sample is normal; for the test sample with a fault label of wear of slipper and swash plate (fault 1), the fault feature twin similarity between this sample and all known training samples with a fault label of fault 1 is the highest and the similarity is close to 1, while for the known training samples of normal and fault 2, their fault feature twin similarities are both small and close to 0. Therefore, it is judged that the fault label of this test sample is fault 1; similarly, the fault label of the last test sample can be judged as fault 2.
[0108] Step seven, Discriminate the fault modes of the test set samples. Based on the above fault mode recognition process of the test samples, the fault diagnosis of the test samples under data condition 2 is carried out, and the confusion matrix of the diagnosis results is as Figure 12 shown: In the figure, the vertical axis represents the true label and the horizontal axis represents the predicted label. As can be seen from the figure, for the test samples with a true label of normal, 94% of the samples are diagnosed as normal and 6% of the samples are diagnosed as fault 1. For the test samples with a true label of fault 1, all are diagnosed as fault 1, and the same is true for fault 2. Therefore, finally for data situation 1, the final test accuracy is 98.17%.
[0109] Based on various unbalanced data conditions set in Table 1, the fault diagnosis performance verification of the fault diagnosis method proposed in the present invention under different data conditions is carried out. The method proposed in the present invention is compared and analyzed with the fault diagnosis model based on the traditional neural network (T-Siam), and the influence of different hyperparameter values (margine) on the fault diagnosis accuracy under various unbalanced data conditions in the fault diagnosis model based on the traditional twin network is analyzed. The results are as Figure 13 shown.
[0110] As can be seen from Figure 13 , as the number of faulty samples in the small sample dataset decreases and the degree of imbalance in the number between samples of different fault modes deepens, the fault diagnosis accuracy of the two fault diagnosis methods shows a downward trend. In addition, for the fault diagnosis model based on the traditional neural network (T-Siam), different hyperparameter settings have an obvious impact on the method performance. As can be seen from Table 5, when the hyperparameter value is set to 0.5, higher diagnosis accuracy can be achieved under each small sample dataset, while the method performance decreases when the hyperparameter value is greater than or less than 0.5. Thus, the optimal hyperparameter range is determined to be [0.1, 1.0], but it is still difficult to determine the specific value of the optimal hyperparameter. The comparison results of the diagnosis accuracy of the method of the present invention and the fault diagnosis method based on the traditional Siamese network under different data conditions are shown in Table 5:
[0111] Table 5. Comparison of the diagnosis accuracy of the method of the present invention and the fault diagnosis method based on the traditional Siamese network under different data conditions
[0112]
[0113] As can be seen from Table 5, the method proposed in the present invention achieves better fault diagnosis accuracy under each data condition and can still achieve relatively high diagnosis accuracy under the extreme data condition of data condition 6.
[0114] In addition, in order to verify the effectiveness of the present invention, a comparative analysis was also carried out with the current mainstream fault diagnosis models based on deep learning. Finally, a comparative analysis of the fault diagnosis performance of the method proposed in the present invention, the fault diagnosis model based on the traditional Siamese network (comparative method 1), and the autoencoder model based on the deep convolutional neural network (comparative method 2) was carried out, and the results are as Figure 14 shown in Table 6.
[0115] Table 6. Comparison of the diagnosis accuracy of different fault diagnosis methods
[0116]
[0117] As can be seen from Figure 14 , when there are sufficient faulty samples, all three fault diagnosis methods can achieve relatively high fault diagnosis accuracy. However, as the number of faulty samples decreases, the autoencoder model based on the deep convolutional neural network shows an obvious decline. It can be seen that the data-driven fault diagnosis models based on deep learning are very sensitive to data changes. As can be seen from Table 6, the fault diagnosis model proposed by the present method maintains better fault diagnosis accuracy than the other two methods under various unbalanced data conditions. It can be seen that the method proposed in the present invention has good fault diagnosis performance and model adaptability under different sample imbalance scenarios and small sample data conditions.
[0118] In summary, the present invention proposes a few-shot fault diagnosis method based on twin-consistent fault characterization self-learning. This method can perform sample correlation matching based on the fault correlation of different samples for the original unbalanced few-shot data set, and redistribute the fault information in the sample space through sample reduction. Furthermore, a fault diagnosis model based on the twin-consistent fault characterization self-learning network is constructed. By learning and self-measuring the twin similarity of fault features between correlated samples, the twin-consistent fault characterization of the same type of samples is extracted, and a more robust fault diagnosis model is obtained. Finally, this model is used to autonomously measure the twin similarity of fault features between the sample to be tested and the known samples, and the fault diagnosis of the sample to be tested is completed in combination with the measurement results. The method has advanced technicality and strong innovation, and has good practicability and operability.
[0119] The above embodiments only represent the implementation manners of the present invention, but should not be construed as limiting the scope of the present invention. It should be noted that for those skilled in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention.
Claims
1. A few-shot fault diagnosis method based on self-learning of twin consistency fault characterization, characterized in that The small-sample fault diagnosis described above includes the following steps: Step 1: Collect the status monitoring data of the device to construct a sample data set, preprocess the sample data set, and obtain training set samples and test set samples; Step 2: Based on the training set samples obtained in Step 1, use the fault label information of different samples to perform sample correlation matching, construct fault-correlated samples, and obtain a fault sample correlation data set; Step 3: Based on the fault sample correlation data set obtained in Step 2, perform sample space reduction. By setting a reduction scale, reduce the fault-correlated samples to construct a reduced fault sample correlation data set; Step 4: Construct and train a fault diagnosis model based on the twin consistency fault characterization self-learning network. Specifically: by selecting the model architecture and parameters, construct a fault diagnosis model based on the twin consistency fault characterization self-learning network. Based on the fault sample correlation data set obtained in Step 3, by setting training hyperparameters, complete the training and optimization of the fault diagnosis model; Step 5: Extract the fault features of the samples to be tested and the training set samples. Specifically: after completing the training of the fault diagnosis model, based on the trained fault diagnosis model, extract the fault features for the samples to be tested and the training set samples respectively; Step 6: Perform fault feature twin similarity measurement. Specifically: for the fault features of the samples to be tested and the training set samples obtained in Step 5, use the feature fusion measurement module in the trained fault diagnosis model to measure the fault feature twin similarity between the features; Step 7: Based on the fault feature twin similarity measurement results obtained in Step 6, by setting a label recognition strategy based on the unbalanced sample distribution, perform fault mode discrimination on the samples to be tested.
2. The small-sample fault diagnosis method based on self-learning of twin consistency fault characterization according to claim 1, wherein In the above Step 1, the method for constructing the sample data set includes using a sliding window to divide the status monitoring data and performing normalization processing; It includes the following sub-steps: Step 1.1, dividing the training set and test set samples; Construct a sample data set for the status monitoring data of the device. First, for the status monitoring data of each collected fault mode, use a sliding window to cut and generate multiple samples; assume the status monitoring data under a certain fault mode has a length of . Cut the samples with a window of length w and a moving step size of s to obtain generated samples, select training samples from them, and the remaining samples are used as test samples; Step 1.2, data normalization; Normalize each sample S in the training data to obtain a normalized training sample set and test sample set. The normalization formula is: Among them, is a signal sequence composed of training samples; among them is the maximum value in the signal sequence composed of training samples, is the minimum value in the signal sequence composed of training samples, is the normalized sample obtained by normalizing the original sample; Finally, a training dataset is obtained and a test dataset , with a total of N failure modes, where and represent the training sample set and the test sample set with the failure mode of N.
3. A few-shot fault diagnosis method based on self-learning of twin consistency fault characterization according to claim 2, characterized in that In the above Step 2, the sample correlation matching is specifically: according to the fault modes of the samples, pair and match the samples. Samples with the same fault mode are matched as positive correlation samples, and samples with different fault modes are matched as negative correlation samples; the combination label of samples with the same label is 1, and the combination label of samples with different labels is 0; It includes the following sub-steps: Step 2.1, sample correlation matching of samples with the same fault mode; For the training sample set with the fault mode i, randomly select two samples from it , , where represents the fault correlation operator; for samples with the same fault mode, their correlation attribute is 1; Step 2.2, sample correlation matching of samples with different fault modes; For the training sample sets with failure modes of and respectively and , randomly select one sample from each of them , , for samples with different failure modes, their associated attributes are 0; After the fault sample association matching for all training samples, a fault sample association data set is finally obtained , , where the subscripts , are the numbers of associated sample pairs with associated attributes of 1 and 0 respectively.
4. A small-sample fault diagnosis method based on self-learning of twin consistency fault characterization according to claim 3, characterized in that In the above Step 3, the sample space reduction includes the following sub-steps: Step 3.1, constructing a reduction scale; For the training sample set , where N is the number of failure modes, considering the relative magnitudes of the distributions of the numbers of samples of different failure modes in the training dataset, we have , ; among which, is the training sample set with the failure mode of , is the training sample set with the failure mode of , is the minimum value of the number of samples of each failure mode in the training dataset, is the median value of the number of samples of each failure mode in the training dataset, and respectively represent the training sample sets of a failure mode; for the associated sample set with the associated attribute of 1, the reduction scale is ; for the associated sample set with the associated attribute of 0, the reduction scale is ; Step 3.2, sample space reduction; For the fault sample association dataset constructed in step 2 , ,in, The associated sample set constructed for the same fault mode sample, since there are a total of N fault modes, Randomly select and keep number of samples, and remove the remaining samples to complete The sample space of simplifies; The associated sample set constructed for different fault mode samples, among N kinds of fault modes, for the fault associated samples obtained by sample association with normal samples, randomly select and retain The number of samples is eliminated and the rest of the samples are completed The sample space is simplified; and the simplified fault-related sample set is obtained.
5. A small-sample fault diagnosis method based on self-learning of twin consistency fault characterization according to claim 4, characterized in that, The above Step 4 includes the following sub-steps: Step 4.1, design the fault diagnosis model architecture based on the twin consistency fault characterization self-learning network; the fault diagnosis model is composed of a fault feature encoding module and a feature fusion measurement module; First, for a pair of associated samples and feature extraction is performed using the feature encoding module to obtain fault features and , where represents the linear transformation operation on the input sample using the encoder module, represents the non-linear transformation operation; then, the feature fusion metric module is used to perform twin similarity measurement on the above fault features, and the measurement result is , where is the feature splicing operation, which splices the two fault features along the sample dimension in a way that keeps the feature dimension unchanged, is the feature metric module based on the convolutional neural network, which measures the twin similarity of the fault features through convolutional operations on the input; finally, the fault feature twin similarity of this pair of associated samples is calculated; Step 4.2, train the fault diagnosis model; Based on the fault diagnosis model constructed in step 4.1, with the root mean square error as the loss function, where for the k-th group of fault correlation samples , is the predicted value of the twin similarity, is the label value of the twin similarity; And perform parameter update of the fault diagnosis model.
6. The small-sample fault diagnosis method based on self-learning of twin consistency fault characterization according to claim 5, characterized in that: In step 4.1, the fault feature encoder is composed of a double-branch network with shared weights, and the feature fusion metric module is composed of a convolutional network; In step 4.2, the gradient descent strategy is adopted to update the parameters of the fault diagnosis model. Suppose the parameters of the fault diagnosis model are , and the loss function for training this fault diagnosis model is . Then the optimization objective is : The parameter update strategy is: In the formula, is the initial parameter, is the updated parameter; is the learning rate; When gradually converges to 0, it means that the fault diagnosis model has optimized to obtain a set of appropriate parameters , such that the loss function achieves the minimum value.
7. A small-sample fault diagnosis method based on self-learning of twin consistency fault characterization according to claim 5, characterized in that In step 5, the feature extraction is specifically as follows: After the training of the fault diagnosis model is completed, based on the fault feature encoding module in the fault diagnosis model, for the training data set constructed in step 1 all the training samples in , the fault features of the training set are extracted , and for the sample to be tested the fault features are extracted to obtain the fault features of the sample to be tested.
8. A small-sample fault diagnosis method based on self-learning of twin consistency fault characterization according to claim 7, characterized in that In step six, the twin similarity metric of fault features is specifically: Step 6.1, reconstruction of the fault features of the test sample; The fault features of the sample to be tested obtained in step five are concatenated with the fault features of the training set for all sample fault features. The concatenation method is to concatenate along the sample dimension to ensure that the feature dimension remains unchanged. Finally, through feature concatenation, a reconstructed fault feature set is obtained, where represents the concatenated fault feature composed of the th training sample with fault mode N and the th test sample with fault mode . Step 6.2, twin similarity metric of fault features; Using the feature fusion metric module in the fault diagnosis model, calculate the twin similarity of each spliced fault feature in the fault feature set obtained in step 6.1, and obtain the twin similarity result between the sample to be tested and the training set samples, which is defined as where , and represents the total number of training samples with fault mode N and the sample to be tested twin similarity set.
9. The small-sample fault diagnosis method based on self-learning of twin consistency fault characterization according to claim 8, wherein In step seven, the discrimination of the fault mode of the test sample is specifically: Based on the twin similarity degree results between the sample to be tested obtained in Step 6 and the training set samples , the label recognition result of the sample to be tested is , calculate the mean twin similarity between the training set samples of different fault modes and the sample to be tested, and then take the fault mode with the largest similarity mean as the fault mode discrimination result of the test sample; complete the fault mode discrimination of the sample to be tested; finally, perform the operations from Step 5 to Step 7 on all the test set samples, so as to realize the fault diagnosis of all the test samples.
Citation Information
Patent Citations
Rotating machinery fault diagnosis method and system based on multi-scale network structure
CN113281029A
Online fault detection method for reduced set-based downsampling unbalance SVM (Support Vector Machine) transformer
CN103645249A
Small sample fault diagnosis method based on task sorting meta learning
CN113837000A
Fault diagnosis method based on feature decoupling and sample recombination under small sample condition
CN117932230A
Method and system for fault diagnosis with small samples of power equipment based on virtual and real twin spaces
US20210319156A1
