Oil-immersed current transformer fault diagnosis method under extremely small sample condition
Through transfer learning and hybrid integration methods, the problem of fault diagnosis of oil-immersed current transformers under extremely small sample conditions is solved, and higher diagnostic accuracy and robustness are achieved, which is suitable for fault diagnosis of oil-immersed current transformers.
Patent Information
- Application Number
- CN202510603811.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-08-05
AI Technical Summary
Under extremely small sample conditions, the fault diagnosis of oil-immersed current transformers faces the problem of sparse sample count and uneven category distribution, and the application effect and generalization capabilities of traditional methods and standard machine learning models are limited.
Transfer learning method is adopted, and cross-validation of data preprocessing, feature selection, target domain leave a cross-validation, feature weighting and rare category oversampling, combined with the hybrid integration of domain adaptation neural networks and traditional machine learning classifiers, cross-domain fault diagnosis is carried out, and the gradient inversion layer and prototype network are used for adversarial training is enhanced to enhance the model's attention to rare categories.
It improves the accuracy and robustness of fault diagnosis under extremely small sample conditions, effectively deals with small sample and category imbalance problems, and improves the performance of the diagnostic model.
Smart Images

Figure CN120429755A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of current transformer fault diagnosis, and more particularly to a method for diagnosing oil-immersed current transformer faults under extremely small sample conditions. Background Art
[0002] Oil-immersed current transformers are key components of the power grid and their reliable operation is of vital importance.
[0003] Dissolved gas analysis (DGA) is widely used as a core technology for diagnosing latent faults within such equipment. However, traditional rule-based interpretation methods (such as the three-ratio method) lack accuracy and ability to handle edge cases. In recent years, data-driven machine learning and deep learning technologies (such as autoencoders and convolutional networks) have been widely studied. These methods can autonomously learn complex fault patterns directly from data, aiming to improve the automation and reliability of diagnosis while avoiding the traditional methods' reliance on tedious manual feature extraction.
[0004] However, for current transformers, actual fault samples are often scarce and their distribution is extremely uneven, which greatly limits the application effectiveness and generalization capabilities of traditional diagnostic methods and standard machine learning models. Therefore, how to effectively diagnose current transformers based on small sample data has become a major challenge. Summary of the Invention
[0005] The purpose of this method is to propose a fault diagnosis method for oil-immersed current transformer under extremely small sample conditions to solve the above technical problems.
[0006] To achieve the above objectives, the oil-immersed current transformer data enhancement method based on transfer learning is as follows:
[0007] Step 1: Build a data preprocessing module, load the source and target domain data, and preprocess the data, including filling missing values, handling outliers, and generating new features such as gas ratio and total hydrocarbons through DGA feature engineering;
[0008] Step 2: Through joint standardization and ANOVA feature selection method, the most relevant features are selected;
[0009] Step 3: In the core evaluation phase, we use leave-one-out cross-validation in the target domain. In each fold, we use a feature weighting strategy for each sample in the target domain, a targeted random oversampling method for specific rare categories, and select an appropriate ensembler for training based on the type of test sample.
[0010] Step 4: For model training, we use a domain adaptation neural network with optional Focal Loss, combined with traditional machine learning classifiers for hybrid integration. We implement adversarial training between the source and target domains through a gradient reversal layer. For rare categories, we use a prototype network for few-shot learning.
[0011] Step 5: Calculate and summarize the performance indicators.
[0012] According to the above scheme, in step 2, the ANOVA feature selection method is used to screen out the most relevant features. This method evaluates the importance of each feature by calculating the ratio of the variance between categories to the variance within categories. The formula is as follows:
[0013]
[0014] Among them, n represents the total number of all samples, k is the number of categories, and n k represents the number of samples in the i-th category, X ij is the eigenvalue of sample j in category i, is the feature mean of category i, represents the characteristic mean of all samples;
[0015] According to the above scheme, in step 3, a suitable integrator is selected for training according to the type of test sample. When the test sample is a rare class sample, an instantiated rare class integrator containing a prototype network is selected for training; otherwise, an adaptive integrator is selected.
[0016] According to the above scheme, in step 4, the domain adaptation neural network uses a gradient reversal layer and binary cross entropy loss to better achieve adversarial training between the source domain and the target domain. The binary cross entropy loss formula is as follows:
[0017]
[0018] Where N is the total number of samples; y i is the true label of the i-th sample, 0 represents the target domain sample, and 1 represents the source domain sample; p i is the predicted probability of the target category of the i-th sample;
[0019] At the same time, in order to enhance the model's attention to difficult samples and strengthen its ability to handle class imbalance, FocalLoss can be selected to give higher weights to difficult-to-classify samples. The formula is as follows:
[0020] FL(p i )=-α t (1-p t ) γ log(p i )
[0021] Among them, p i is the predicted probability of the target category of the i-th sample; α t is the weight coefficient of the category; γ is the focusing parameter.
[0022] Compared with the prior art, the present invention has the following beneficial effects:
[0023] By combining adversarial domain adaptation with domain-invariant features and applying a specific integration strategy that includes deep learning and multiple traditional machine learning models, cross-domain fault diagnosis can be directly performed, which can more effectively deal with the problems of small samples, imbalance and domain drift, and improve the accuracy and robustness of the final diagnostic model. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 This is a workflow diagram of a method for diagnosing faults of an oil-immersed current transformer under extremely small sample conditions of the present invention;
[0025] Figure 2 is a confusion diagram of the fault diagnosis result in the embodiment. DETAILED DESCRIPTION
[0026] The technical solution of the present invention is clearly and completely described below in conjunction with the accompanying drawings and specific embodiments:
[0027] Example 1
[0028] The present invention provides a method for diagnosing faults of an oil-immersed current transformer under extremely small sample conditions, comprising the following steps:
[0029] Step 1: Build a data preprocessing module, load the source and target domain data, and preprocess the data, including filling missing values, handling outliers, and generating new features such as gas ratio and total hydrocarbons through DGA feature engineering:
[0030] S101: Load the specified source and target domain data, use the median to fill missing values in the six columns {H2, CH4, C2H2, C2H4, C2H6, type}, and use the Winsorization method to handle outliers in each column. The specific formula is as follows:
[0031]
[0032] Where Q1 and Q3 are the 1st and 3rd quartiles of the data, respectively, and IQR is the interquartile range;
[0033] S102: Generate gas ratios C2H2 / C2H4, CH4 / H2, C2H4 / C2H6 and total hydrocarbon content feature Total_HC=sum([CH4, C2H2, C2H4, C2H6]) through DGA feature engineering;
[0034] Step 2: Through joint standardization and ANOVA feature selection method, the most relevant features are selected:
[0035] S201: Normalize the features using methods such as RobustScaler to ensure that different features are trained on the same scale;
[0036] S202: Use the ANOVAF method to select features. The importance of each feature is evaluated by calculating the ratio of the variance between categories to the variance within categories. The most relevant features are retained to improve the generalization ability of the model. The formula is as follows:
[0037]
[0038] Among them, n represents the total number of all samples, k is the number of categories, and n k represents the number of samples in the i-th category, X ij is the eigenvalue of sample j in category i, is the feature mean of category i, represents the characteristic mean of all samples;
[0039] Step 3: In the core evaluation part, we use leave-one-out cross-validation in the target domain. In each fold, for each sample in the target domain, we use a feature weighting strategy, a targeted random oversampling method for specific rare categories, and select an appropriate ensemble for training based on the type of test sample:
[0040] S301: In each fold, one sample from the target domain is used as the test set, and the remaining target domain samples and all source domain samples are used as the training set. This method can be expressed as: Test one target domain sample at a time, and repeat the process until every target domain sample has been tested once;
[0041] S302: Before each training, give higher weights to key features (such as gas ratio features), which can be calculated using the weighting factor ω feature To adjust: X weighted =X×ω feature ;
[0042] S303: For rare categories, increase the number of rare category samples in the target domain by random replication. Assume that the number of samples of target category c is n c , by oversampling it to reach the target number n target :
[0043] X oversampled =RandomOverSampler(X target ,ytarget ,n target =n c new )
[0044] S304: Select an adaptive integrator or an integrator designed specifically for rare faults according to the category of the current test sample (whether it is a rare fault category);
[0045] Step 4: In terms of model training, a domain adaptation neural network with optional Focal Loss is used, combined with traditional machine learning classifiers for hybrid integration. A gradient reversal layer is used to implement adversarial training between the source and target domains. For rare category problems, a prototype network is used for few-shot learning:
[0046] S401: The neural network used for transfer learning includes a classifier and a domain classifier. The domain classifier learns the shared features of the source and target domains through adversarial training (gradient reversal layer). The formula of the gradient reversal layer is:
[0047] S402: The domain adaptation neural network uses a gradient reversal layer and binary cross entropy loss to better implement adversarial training between the source domain and the target domain. The binary cross entropy loss formula is as follows:
[0048]
[0049] Where N is the total number of samples; y i is the true label of the i-th sample, 0 represents the target domain sample, and 1 represents the source domain sample; p i is the predicted probability of the target category of the i-th sample;
[0050] S403: To enhance the model's focus on difficult samples and strengthen its ability to handle class imbalance, you can choose FocalLoss to give higher weights to difficult-to-classify samples. The formula is as follows:
[0051] FL(p i )=-α t (1-p t ) γ log(p i )
[0052] Among them, p i is the predicted probability of the target category of the i-th sample; α t is the weight coefficient of the category; γ is the focusing parameter;
[0053] S404: For rare categories, auxiliary judgment is performed by calculating the similarity between the new sample and the prototype (compact feature representation of the rare class). The formula for calculating similarity is:
[0054]
[0055] Among them, X new is the feature of the new sample, μ prototype It is a prototype feature;
[0056] Step 5: Calculate and summarize the performance indicators.
[0057] Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0058] Example 2
[0059] 399 sets of transformer oil chromatogram data and 39 sets of current transformer oil chromatogram data were collected. The sample types are divided into 0 to 9, respectively. The distribution of the number of each type is shown in Table 1.
[0060] Table 1 Distribution of source domain and target domain types
[0061]
[0062] The most relevant features were screened using the ANOVA F test, and the top 8 most significant features were retained. The importance of each feature is shown in Table 2.
[0063] Table 2 Feature importance and weight
[0064]
[0065] In each fold, one sample from the target domain is taken as the test set, and the other target domain samples and all source domain samples are used as the training set. The size of the target training set in each fold is 38, and the target domain category distribution is adjusted by a custom oversampling strategy: custom oversampling strategy = {0:16, 3:40, 5:13, 6:60, 7:40, 8:40, 9:40}.
[0066] Finally, after model training integrating multiple technologies, the final results are shown in Table 3.
[0067] Table 3 Diagnostic accuracy results
[0068]
[0069]
[0070] Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
Claims
1. A method for diagnosing faults of oil-immersed current transformers under extremely small sample conditions, characterized by: By utilizing transformer oil chromatogram data with a relatively large sample size, the fault diagnosis accuracy of an oil-immersed current transformer with a very small sample size is improved. The oil-immersed current transformer fault diagnosis method under the condition of extremely small sample size includes: Step 1: Build a data preprocessing module, load the source and target domain data, and preprocess the data, including filling missing values, handling outliers, and generating new features such as gas ratio and total hydrocarbons through DGA feature engineering; Step 2: Through joint standardization and ANOVA feature selection method, the most relevant features are selected; Step 3: In the core evaluation phase, we use leave-one-out cross-validation in the target domain. In each fold, we use a feature weighting strategy for each sample in the target domain, a targeted random oversampling method for specific rare categories, and select an appropriate ensembler for training based on the type of test sample. Step 4: For model training, we use a domain adaptation neural network with optional Focal Loss, combined with traditional machine learning classifiers for hybrid integration. We implement adversarial training between the source and target domains through a gradient reversal layer. For rare categories, we use a prototype network for few-shot learning. Step 5: Calculate and summarize the performance indicators.
2. The method for diagnosing faults of an oil-immersed current transformer under extremely small sample conditions according to claim 1, characterized in that: In step 2, the ANOVA feature selection method is used to screen out the most relevant features. This method evaluates the importance of each feature by calculating the ratio of the variance between categories to the variance within categories. The formula is as follows: Among them, n represents the total number of all samples, k is the number of categories, and n k represents the number of samples in the i-th category, X ij is the eigenvalue of sample j in category i, is the feature mean of category i, represents the feature mean of all samples.
3. The method for diagnosing faults of an oil-immersed current transformer under extremely small sample conditions according to claim 1, characterized in that: As described in step 3, a suitable integrator is selected for training according to the type of test sample. When the test sample is a rare class sample, an instantiated rare class integrator containing a prototype network is selected for training; otherwise, an adaptive integrator is selected.
4. The method for diagnosing faults of an oil-immersed current transformer under extremely small sample conditions according to claim 1, characterized in that: The domain adaptation neural network described in step 4 uses a gradient reversal layer and binary cross entropy loss to better implement adversarial training between the source and target domains. The binary cross entropy loss formula is as follows: Where N is the total number of samples; y i is the true label of the i-th sample, 0 represents the target domain sample, and 1 represents the source domain sample; p i is the predicted probability of the target category of the i-th sample; At the same time, in order to enhance the model's attention to difficult samples and strengthen its ability to handle class imbalance, FocalLoss can be selected to give higher weights to difficult-to-classify samples. The formula is as follows: FL(p i )=-a t (1-p t ) γ log(p i ) Among them, p i is the predicted probability of the target category of the i-th sample; α t is the weight coefficient of the category; γ is the focusing parameter.
Citation Information
Cited By
Deep learning and transfer learning fused intelligent diagnosis method and system for mutual inductor
CN120822135A
Intelligent diagnostic method and system for transformer based on deep learning and transfer learning
CN120822135B
