A method and system for fault diagnosis of oil-immersed transformer dissolved gas analysis

CN123012956APending Publication Date: 2026-10-30NARI TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611027602.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-10
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0004]这类方法能够在大样本下取得较高的分类精度,但通常存在以下问题:第一,假定所有误分类的代价相等

Benefits of technology

[0045]有益效果:与现有技术相比,本发明具有如下显著优点:1、通过构造非对称的误分类代价矩阵并采用贝叶斯最优决策法则,将”漏检高能放电”等高危误判的代价显式纳入决策目标,决策边界向高代价类别偏移,从根本上降低了高风险故障的漏检率;2、引入共形预测对预测不确定性进行量化,给出具有有限样本边际覆盖率保证的预测集合,为现场运维人员提供“该预测可靠性是多少”的明确依据,弥补了现有方法仅给出确定性结论的不足;3、将SMOTE过采样严格限制在训练子集,使校准子集与测试子集保持原始边缘分布,并显式增加可交换性检验,保护了共形预测的统计有效性,使覆盖率与名义置信水平相匹配;4、采用以期望校准误差为指标的自适应概率校准策略,在温度缩放、Platt 缩放和保序回归之间自动选优,在小样本下避免了保序回归的过拟合,在大样本下保留了保序回归的灵活性,使后验概率更可信,进而使期望损失最小化决策更稳健;5、将贝叶斯点决策与共形集合融合输出“单类高置信–多类中置信–冲突告警”三级诊断结论,与变压器现场实际的“自动放行–人工复核–现场复测”运维流程自然衔接,工程可用性强。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123012956A_ABST
    Figure CN123012956A_ABST
Patent Text Reader

Abstract

The application discloses a kind of oil-immersed transformer dissolved gas analysis fault diagnosis method and system, method includes: the concentration of five characteristic gases collected is preprocessed, data is divided into training, calibration, test three subsets and only SMOTE oversampling is executed on training subset;Final feature subset is obtained by double-layer selection of mutual information and Shapley value;XGBoost classifier is trained on oversampling training subset and probability calibration is carried out on calibration subset with expected calibration error as index;Asymmetry misclassification penalty matrix is constructed and Bayes optimal point decision is given according to expected loss minimization criterion;Finally, after passing through commutativity test, conformal prediction set with limited sample marginal coverage guarantee is constructed, and it is fused with Bayes point decision, output high-confidence single class, medium-confidence multi-class or decision conflict alarm three-level diagnostic conclusion;The application improves diagnostic accuracy, risk is controllable, can give statistically significant effective prediction confidence set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power equipment condition monitoring and fault diagnosis technology, and particularly relates to a method and system for fault diagnosis of dissolved gas analysis in oil-immersed transformers. Background Technology

[0002] Oil-immersed transformers are critical electrical equipment in power systems. If latent internal faults are not identified in a timely manner, they can lead to serious power grid accidents and economic losses. Transformer oil decomposes under the influence of internal faults, producing hydrogen gas (…). ), methane ( ), acetylene ( ), ethylene ( ), ethane ( Dissolved gas analysis (DGA) can detect characteristic gases such as oil and other gases. By monitoring changes in the composition and concentration of dissolved gases in the oil, it can infer the type and severity of transformer faults and is one of the most mature methods for diagnosing internal transformer faults.

[0003] Existing transformer fault diagnosis methods based on Dewar's Gauge Algorithm (DGA) can be broadly categorized as follows: The first category comprises traditional methods based on thresholds and ratios, including the IEC three-ratio method, Rogers ratio method, and Dewar's triangle method. These methods have clear physical meanings but inherent drawbacks such as missing encodings, rigid boundaries, and poor discrimination ability for critical samples. The second category includes artificial intelligence-based methods, including artificial neural networks, support vector machines, random forests, and gradient boosting trees.

[0004] These methods can achieve high classification accuracy with large samples, but they typically suffer from the following problems: First, they assume that the cost of all misclassifications is equal. In actual engineering, the consequences of misclassifying "high-energy discharge" as "normal" are far more serious than the unnecessary shutdowns and maintenance caused by misclassifying "normal" as "overheating." Existing methods use symmetric loss functions, which cannot reflect the strong asymmetry of this cost in decision-making. Second, they lack the quantification of prediction uncertainty. Existing methods only provide deterministic class predictions and cannot tell on-site maintenance personnel "how reliable the prediction is." They are insufficient in handling critical samples and out-of-distribution samples, which is detrimental to reliable decision-making in high-risk engineering scenarios. Third, the handling of class imbalance undermines the statistical assumptions of probabilistic prediction. In actual transformer operation, "normal" samples account for the vast majority, while fault samples such as "discharge" are extremely rare. Existing methods often use Synthetic Minority Oversampling Technique (SMOTE) on all data to alleviate class imbalance, and then perform probability calibration and confidence interval construction on the synthesized data. However, the synthetic samples introduced by SMOTE alter the marginal distribution of the data, undermining the commutativity assumption upon which subsequent uncertainty quantification relies, leading to calibration failure and insufficient confidence interval coverage. Fourth, the probabilities output by the classifier are uncalibrated; overconfidence or overconservatism can distort subsequent cost-based optimal decisions. Summary of the Invention

[0005] Purpose of the invention: The purpose of this invention is to provide a method and system for diagnosing faults in oil-immersed transformers by dissolved gas analysis, which can improve the accuracy of diagnosis.

[0006] Technical solution: The present invention provides a method for fault diagnosis of dissolved gas analysis in oil-immersed transformers, comprising:

[0007] S1: Collect the concentrations of various characteristic gases in the oil-immersed transformer, and form a sample set together with the fault category label; perform preprocessing on the sample set and divide it into training subset, calibration subset and test subset, and perform SMOTE oversampling only on the training subset to obtain a balanced training subset, while the calibration subset and test subset maintain the original marginal distribution;

[0008] S2: Perform filtering selection based on K-nearest neighbor mutual information estimation and wrapping re-examination based on Shapley value on the balanced training subset to obtain the final feature subset;

[0009] S3: Train an XGBoost multi-class classifier on the balanced training subset with the final feature subset, and adaptively calibrate the multi-class posterior probabilities output by the classifier on the calibration subset; construct an asymmetric misclassification cost matrix, and obtain the Bayesian optimal decision according to the expected loss minimization criterion.

[0010] S4: Perform a commutativity test between the calibration subset and the test subset. If the test passes, construct the inconsistency score and its quantile threshold based on the calibration posterior and output a conformal prediction set for the samples to be diagnosed.

[0011] S5: Combine the Bayesian optimal decision and the conformal prediction set according to a predetermined fusion rule, and output a diagnostic conclusion including the fault category, conformal prediction set, expected loss and confidence level.

[0012] Furthermore, the preprocessing described in step S1 includes anomaly removal, logarithmic transformation, and construction of IEC three ratios and percentage features.

[0013] Furthermore, the filtering feature selection based on K-nearest neighbor mutual information estimation described in step S2 employs the Kraskov–Stögbauer–Grassberger mutual information estimator, and performs label permutation tests at least a preset number of times on each feature in the balanced training subset to determine the significance of mutual information. Value, Reserved Features whose values ​​are less than the significance level;

[0014] The wrap-around re-examination based on Shapley values ​​performs pairwise normalized mutual information calculation among the retained features, and discards the features with smaller mutual information when the normalized mutual information exceeds the redundancy threshold.

[0015] Further, the adaptive calibration in step S3 includes: using a candidate method to automatically select the optimal method based on the expected calibration error ECE on the calibration subset; wherein the candidate method includes temperature scaling, Platt scaling, and ordinal-preserving regression, and the scalar temperature parameter for temperature scaling is obtained by minimizing the negative log-likelihood on the calibration subset.

[0016] Furthermore, step S3, which involves constructing the asymmetric misclassification cost matrix, includes assigning values ​​according to a preset principle.

[0017] The preset principles include: the cost of missing a fault is significantly greater than the cost of a false alarm; the cost of missing a discharge fault is greater than the cost of missing an overheat fault and is positively correlated with the severity of the fault; the cost of misjudging adjacent severity categories within the same type of fault is small; and the cost of the diagonal is zero.

[0018] Further, step S3, which involves obtaining the Bayesian optimal decision based on the expected loss minimization criterion, includes:

[0019] For each sample to be diagnosed Calculate each candidate decision using the following formula. Expected loss :

[0020]

[0021] in, For fault category labels, For a set of fault categories, Indicates the true category is Time prediction is The resulting cost, This is the posterior after the adaptive calibration;

[0022] And select the category that minimizes conditional risk as the point decision output according to the Bayesian optimal decision rule:

[0023] ;

[0024] in, For Bayesian point decision-making.

[0025] Further, step S4 describes performing a commutativity test between the calibration subset and the test subset, specifically: performing a Kolmogorov–Smirnov test on each feature in the final feature subset, and a permutation test on the inconsistency score sequence. When both tests do not reject, the test is deemed to have passed, and conformal prediction construction is performed.

[0026] Further, step S4, which involves outputting a conformal prediction set for the sample to be diagnosed, includes:

[0027] Define the inconsistency score function:

[0028] ;

[0029] in, As a sample, For fault category labels, For the posterior after adaptive calibration;

[0030] In calibration subset Calculate the inconsistency score for all samples. ,in, For the first One sample, For the first Fault category labels for each sample The total number of samples; for the significance level threshold The conformal threshold is determined by empirical quantiles. :

[0031]

[0032] For each sample to be diagnosed Construct its conformal prediction set :

[0033] ;

[0034] in, This is a set of fault categories.

[0035] Further, the predetermined fusion rule in step S5 specifically involves: setting a three-level fusion rule to jointly determine the Bayesian optimal decision and the conformal prediction set, and outputting a diagnostic conclusion that includes the diagnostic confidence state; the three-level fusion rule includes:

[0036] When the cardinality of the conformal prediction set is 1 and the Bayesian point decision belongs to this set, the corresponding diagnostic confidence state is output.

[0037] If the cardinality of the conformal prediction set is greater than 1 and the Bayesian point decision belongs to that set, output the corresponding diagnostic confidence state and trigger manual review;

[0038] If the Bayesian point decision does not belong to the conformal prediction set or the conformal prediction set is empty, output the corresponding diagnostic confidence state and trigger on-site retesting.

[0039] Based on the same inventive concept, the present invention also provides a dissolved gas analysis fault diagnosis system for oil-immersed transformers, comprising:

[0040] The initialization module is used to collect the concentration of various characteristic gases in the oil-immersed transformer, which together with the fault category label constitute the sample set. The sample set is preprocessed and divided into training subset, calibration subset and test subset. SMOTE oversampling is performed only on the training subset to obtain a balanced training subset, while the calibration subset and test subset maintain the original marginal distribution.

[0041] The feature selection module is used to perform filtering selection based on K-nearest neighbor mutual information estimation and wrapping re-examination based on Shapley value on the balanced training subset to obtain the final feature subset.

[0042] The decision module is used to train an XGBoost multi-class classifier on a balanced training subset with the final feature subset, and to adaptively calibrate the multi-class posterior probabilities output by the classifier on a calibration subset; it constructs an asymmetric misclassification cost matrix and obtains the Bayesian optimal point decision according to the expected loss minimization criterion.

[0043] The test prediction module is used to perform an exchangeability test between the calibration subset and the test subset. After the test passes, the inconsistency score and its quantile threshold are constructed based on the calibrated posterior and the conformal prediction set is output for the sample to be diagnosed.

[0044] The diagnostic module is used to jointly determine the Bayesian optimal decision and the conformal prediction set according to a predetermined fusion rule, and output a diagnostic conclusion including the fault category, conformal prediction set, expected loss and confidence level.

[0045] Beneficial Effects: Compared with existing technologies, this invention has the following significant advantages: 1. By constructing an asymmetric misclassification cost matrix and employing the Bayesian optimal decision rule, the cost of high-risk misclassifications such as "missing high-energy discharge" is explicitly incorporated into the decision objective, shifting the decision boundary towards high-cost categories and fundamentally reducing the missed detection rate of high-risk faults; 2. The introduction of conformal prediction quantifies prediction uncertainty, providing a prediction set with finite sample marginal coverage, offering on-site maintenance personnel a clear basis for "how reliable is this prediction," thus overcoming the shortcomings of existing methods that only provide deterministic conclusions; 3. Strictly limiting SMOTE oversampling to the training subset ensures that the calibration subset and test subset maintain their original marginal distribution, and explicitly adding a commutativity test protects the statistical validity of conformal prediction, matching the coverage with the nominal confidence level; 4. Adopting an adaptive probabilistic calibration strategy with expected calibration error as the indicator, it addresses temperature scaling and Platt... Automatic optimization between scaling and ordinal-preserving regression avoids overfitting in small samples and retains the flexibility of ordinal-preserving regression in large samples, making the posterior probability more reliable and thus making the decision to minimize expected loss more robust; 5. The fusion of Bayesian point decision and conformal set outputs a three-level diagnostic conclusion of "single-class high confidence - multi-class medium confidence - conflict alarm", which is naturally connected with the actual operation and maintenance process of transformer site "automatic release - manual review - on-site retest", and has strong engineering usability. Attached Figure Description

[0046] Figure 1 This is a flowchart of a method according to an embodiment of the present invention. Detailed Implementation

[0047] To enable those skilled in the art to better understand the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.

[0048] Example 1, as Figure 1 As shown, the oil-immersed transformer dissolved gas analysis fault diagnosis method of this embodiment includes:

[0049] S1: Collect the concentrations of various characteristic gases in the oil-immersed transformer, and form a sample set together with the fault category label; perform preprocessing on the sample set and divide it into training subset, calibration subset and test subset, and perform SMOTE oversampling only on the training subset to obtain a balanced training subset, while the calibration subset and test subset maintain the original marginal distribution;

[0050] S2: Perform filtering selection based on K-nearest neighbor mutual information estimation and wrapping re-examination based on Shapley value on the balanced training subset to obtain the final feature subset;

[0051] S3: Train an XGBoost multi-class classifier on the balanced training subset with the final feature subset, and adaptively calibrate the multi-class posterior probabilities output by the classifier on the calibration subset; construct an asymmetric misclassification cost matrix, and obtain the Bayesian optimal decision according to the expected loss minimization criterion.

[0052] S4: Perform a commutativity test between the calibration subset and the test subset. If the test passes, construct the inconsistency score and its quantile threshold based on the calibration posterior and output a conformal prediction set for the samples to be diagnosed.

[0053] S5: Combine the Bayesian optimal decision and the conformal prediction set according to a predetermined fusion rule, and output a diagnostic conclusion including the fault category, conformal prediction set, expected loss and confidence level.

[0054] Specifically, step S1 includes:

[0055] Data on dissolved gas concentrations from multiple oil-immersed transformers under different operating conditions were collected to construct a sample set. ,in, The total number of samples, For the first One sample, For the first Fault category labels for each sample , This vector represents the concentrations of five characteristic gases, specifically: , , , and , , The set of fault categories is defined as follows:

[0056] ;

[0057] in, Indicates a normal state. Indicates overheating at low temperature , Indicates overheating at medium temperature. , Indicates overheating due to high temperature. , This indicates low-energy discharge and partial discharge. Indicates high-energy discharge;

[0058] Outlier removal and logarithmic transformation are performed sequentially on the original concentrations of each characteristic gas in the sample set to compress the concentration range and improve the approximate normality:

[0059] ;

[0060] in, To use extremely small positive numbers, avoid taking the logarithm of zero; construct the IEC three ratio characteristics. , , The percentage characteristics of each component and the total hydrocarbon (THC) characteristics were constructed.

[0061] The preprocessed sample set is randomly divided into training subsets according to a preset ratio. Calibration subset With test subset To address the class imbalance problem in the training subset, SMOTE oversampling is applied only to the training subset to obtain a balanced training subset. Calibration subset With test subset The original edge distribution is kept unchanged and used as the basis for subsequent probability calibration and conformal prediction.

[0062] The filtering feature selection based on K-nearest neighbor mutual information estimation described in step S2 is specifically as follows:

[0063] For the balanced training subset One of the features Calculate its relationship with the fault category label Mutual information between them:

[0064]

[0065] in, For a set of fault categories, Represents a probability distribution;

[0066] pass The permutation test estimates the significance of mutual information. Value, Reserved The characteristics, among which, , The significance level threshold is used; further, normalized mutual information is calculated pairwise between the retained features:

[0067]

[0068] in, Mutual information is used to measure the amount of relevant information between two variables. Information entropy is used to measure the uncertainty of a single variable.

[0069] when At that time, the subset with smaller mutual information is removed to obtain the feature subset. ; The preset threshold;

[0070] The wrap-around feature re-examination based on Shapley values ​​specifically includes:

[0071] exist Train an XGBoost proxy model and calculate the global Shapley importance of each feature. :

[0072]

[0073] in, The model's prediction gain on the feature subset is calculated; features with Shapley importance greater than a preset threshold are retained, and the final feature subset is output. .

[0074] Step S3 includes:

[0075] In the balanced training subset Above, with the final feature subset Input, labeled with fault category To achieve this, an XGBoost multi-class classifier is trained, and the Optuna algorithm, based on a tree-structured Parzen estimator, is used to perform a Bayesian search for hyperparameters; this yields uncalibrated multi-class posterior probability estimates. ;

[0076] In calibration subset Top Perform probabilistic calibration to achieve the desired calibration error. Evaluation indicators:

[0077]

[0078] in, The first division based on prediction confidence level Equal intervals, For the number of intervals, The number of samples in the calibration subset. and These represent the empirical accuracy and average confidence level for the samples in that interval, respectively; from the candidate methods, in The calibration method that minimizes ECE is selected as the final method, and the posterior a posteriori of the calibration is output. The candidate methods include temperature scaling, Platt scaling, and ordinal-preserving regression; wherein the scalar temperature parameter of the temperature scaling method... Learning by minimizing the negative log-likelihood:

[0079]

[0080] in, For the classifier to classify samples In category The logarithmic odds of the output;

[0081] Constructing the misclassification cost matrix ,in Indicates the true category is Time prediction is The resulting costs are assigned values ​​according to preset principles; the preset principles include: the cost of missing faults is significantly greater than the cost of false alarms; the cost of missing discharge faults is greater than the cost of missing overheat faults and is positively correlated with the severity of the fault; the cost of misjudging adjacent severity categories within the same type of fault is small; and the cost of diagonal faults is zero.

[0082] For each sample to be diagnosed Calculate each candidate decision using the following formula. Expected loss:

[0083]

[0084] And select the category that minimizes conditional risk as the point decision output according to the Bayesian optimal decision rule:

[0085] ;

[0086] in, For Bayesian point decision, Indicates the true category is Time prediction is The costs incurred.

[0087] Step S4 includes:

[0088] In calibration subset With test subset A commutativity test is performed between them, the commutativity test including: for the final feature subset Perform a Kolmogorov–Smirnov test on each feature and count the number of features that violate the significance level threshold; for inconsistency score sequences Perform a permutation test;

[0089] If both tests pass, the commutativity hypothesis is true, and conformal prediction is performed; otherwise, data resampling is triggered and the process returns to step S1.

[0090] Specifically, define the inconsistency score function:

[0091] ;

[0092] In calibration subset Calculate the inconsistency score for all samples. For significance level threshold The conformal threshold is determined by empirical quantiles. :

[0093]

[0094] For each sample to be diagnosed Construct its conformal prediction set:

[0095] ;

[0096] When the commutativity assumption holds, the set has a marginal coverage guarantee under finite sample conditions:

[0097] .

[0098] Step S5 includes:

[0099] Bayesian point decision With conformal prediction set The fusion process will be performed, and the final diagnostic conclusion will be output as follows:

[0100] like and Output "High-confidence single-class decision", fault category is ;

[0101] like and Output "Medium Confidence Multi-Class Candidates", with the primary decision being... Alternative decision is This triggers manual review;

[0102] like or The system outputs a "decision conflict alarm," indicating that the sample may be an out-of-distribution sample or that the cost matrix is ​​seriously inconsistent with the probability distribution, triggering on-site retesting.

[0103] Simultaneously output the total expected loss corresponding to this sample. As a risk quantification indicator.

[0104] Example 2, based on the same inventive concept, also provides a dissolved gas analysis fault diagnosis system for oil-immersed transformers, comprising:

[0105] The initialization module is used to collect the concentration of various characteristic gases in the oil-immersed transformer, which together with the fault category label constitute the sample set. The sample set is preprocessed and divided into training subset, calibration subset and test subset. SMOTE oversampling is performed only on the training subset to obtain a balanced training subset, while the calibration subset and test subset maintain the original marginal distribution.

[0106] The feature selection module is used to perform filtering selection based on K-nearest neighbor mutual information estimation and wrapping re-examination based on Shapley value on the balanced training subset to obtain the final feature subset.

[0107] The decision module is used to train an XGBoost multi-class classifier on a balanced training subset with the final feature subset, and to adaptively calibrate the multi-class posterior probabilities output by the classifier on a calibration subset; it constructs an asymmetric misclassification cost matrix and obtains the Bayesian optimal point decision according to the expected loss minimization criterion.

[0108] The test prediction module is used to perform an exchangeability test between the calibration subset and the test subset. After the test passes, the inconsistency score and its quantile threshold are constructed based on the calibrated posterior and the conformal prediction set is output for the sample to be diagnosed.

[0109] The diagnostic module is used to jointly determine the Bayesian optimal decision and the conformal prediction set according to a predetermined fusion rule, and output a diagnostic conclusion including the fault category, conformal prediction set, expected loss and confidence level.

[0110] Example 3: The method for diagnosing dissolved gas analysis faults in oil-immersed transformers in this example uses DGA data collected by an online monitoring system for a 220 kV oil-immersed transformer as the application scenario, but the present invention is not limited to this specific scenario.

[0111] Step 1: Data Acquisition and Preprocessing.

[0112] The transformer oil was periodically sampled using an online oil chromatography monitoring device. The volume fractions (in μL / L) of the five gases were used to determine the true fault category of each sample, in conjunction with on-site maintenance records and disassembly inspection conclusions. Perform the following preprocessing on the raw data:

[0113] (a) Use the robust Z-score method to remove obviously abnormal data entries;

[0114] (b) Performing adjustments to the concentrations of each gas. The logarithmic transformation, in this embodiment Pick ;

[0115] (c) Constructing the IEC three ratio characteristics ;

[0116] (d) Constructing the percentage characteristics of each gas and the total hydrocarbon characteristics .

[0117] Stratified sampling was performed in a 6:2:2 ratio to divide the population into... , , and in SMOTE is performed using K=5 nearest neighbors, where the number of synthesized samples is automatically determined based on the original number of samples in each category and the target balance. and No oversampling or undersampling is performed to preserve the edge distribution consistent with the samples from the site to be diagnosed.

[0118] Step 2: Two-layer feature selection.

[0119] exist Perform feature selection. First, for each candidate feature... The KSG estimator (K=5) is used to calculate its correlation with the label. Inter-information ;implement Sublabel permutation yields a null distribution; statistics The tail probability under the null distribution is... Value, Reserved The features. Secondly, normalized mutual information is calculated pairwise between the retained features, for The features are used to eliminate those with low mutual information, resulting in the first-level feature subset. .

[0120] exist Train a lightweight XGBoost model to calculate the global Shapley importance of each feature. ;reserve Features that are greater than the mean of all its features are used to obtain the final feature subset. In this embodiment It typically includes several IEC ratio characteristics and several logarithmic concentration characteristics.

[0121] Step 3: Probability calibration and cost-sensitive Bayesian decision making.

[0122] exist Above, with Using the input features, an XGBoost multi-class classifier is trained. At least 30 Bayesian hyperparameter searches are performed using the Optuna framework in the following search space: n_estimators∈[50,300], max_depth∈[3,10], learning_rate∈[0.01,0.30], subsample∈[0.6,1.0], colsample_bytree∈[0.6,1.0], min_child_weight∈[1,10], gamma∈[0,5], reg_alpha∈[0,10], reg_lambda∈[0,10]. The optimal hyperparameters and the trained classifier are obtained using the log loss of hierarchical K-fold cross-validation (K=5) as the objective function.

[0123] In calibration subset The above describes three methods: temperature scaling, Platt scaling, and order-preserving regression. Perform probability calibration; above The ECE of each method is calculated using equal-interval confidence intervals, and the method with the smallest ECE is selected as the final calibration function. In this embodiment, temperature scaling is preferred when the sample size is small (<50 samples per class), while order-preserving regression is preferred when the sample size is sufficient.

[0124] Construct a misclassification cost matrix of the following form:

[0125]

[0126] The row index is the predicted category. The column index is the true category. The columns and rows correspond to N, T1, T2, T3, D1, and D2 respectively. This matrix ensures that the maximum cost (missed detection D2) is several times the minimum non-zero cost, thereby driving the decision boundary to effectively shift towards the high-cost category.

[0127] For each test sample ,according to Calculate the expected loss for each candidate decision and select the class that minimizes the expected loss. As a point decision output.

[0128] Step 4: Exchangeability test and conformal prediction.

[0129] exist Perform a commutativity test on the above. Perform a two-sample Kolmogorov–Smirnov test on each feature and statistically analyze the violation. The number of features; perform no less than 500 permutation tests on the inconsistency score sequences of the whole sample, and count the frequency of the permuted mean difference falling outside the original mean difference as the number of features. Value. When the number of violated features is zero and the permutation test If the condition is met, determine if commutability is true; otherwise, return to step one and re-divide the data.

[0130] After commutability is established, according to exist Calculate the inconsistency scores for all samples and construct the quantile thresholds:

[0131]

[0132] This embodiment is... Multiple thresholds are constructed simultaneously to facilitate output under different risk preferences. For each test sample... ,according to Output the conformal prediction set.

[0133] Step 5: Integrate decision and diagnostic outputs.

[0134] According to the three-level fusion rules described in the invention, and The joint assessment yields a final diagnostic conclusion. This conclusion includes the following information:

[0135] (a) Fault Category ;

[0136] (b) Conformal prediction set With confidence level ;

[0137] (c) Expected loss ;

[0138] (d) Decision confidence level (high confidence single class / medium confidence multi class / decision conflict alarm).

[0139] The above conclusions are pushed to the transformer online monitoring master station system as a basis for maintenance personnel to formulate maintenance strategies.

Claims

1. A method for fault diagnosis of dissolved gas analysis in oil-immersed transformers, characterized in that, include: S1: Collect the concentrations of various characteristic gases in the oil-immersed transformer, and combine them with the fault category labels to form a sample set; The sample set is preprocessed and divided into training subset, calibration subset and test subset. SMOTE oversampling is performed only on the training subset to obtain a balanced training subset, while the calibration subset and test subset maintain the original marginal distribution. S2: Perform filtering selection based on K-nearest neighbor mutual information estimation and wrapping re-examination based on Shapley value on the balanced training subset to obtain the final feature subset; S3: Train the XGBoost multi-class classifier on the balanced training subset with the final feature subset, and adaptively calibrate the multi-class posterior probabilities output by the classifier on the calibration subset. Construct an asymmetric misclassification cost matrix and obtain the Bayesian optimal decision based on the expected loss minimization criterion; S4: Perform a commutativity test between the calibration subset and the test subset. If the test passes, construct the inconsistency score and its quantile threshold based on the calibration posterior and output a conformal prediction set for the samples to be diagnosed. S5: Combine the Bayesian optimal decision and the conformal prediction set according to a predetermined fusion rule, and output a diagnostic conclusion including the fault category, conformal prediction set, expected loss and confidence level.

2. The method for diagnosing dissolved gas analysis faults in oil-immersed transformers according to claim 1, characterized in that, The preprocessing described in step S1 includes anomaly removal, logarithmic transformation, and construction of IEC three ratios and percentage features.

3. The method for fault diagnosis of dissolved gas analysis in oil-immersed transformers according to claim 1, characterized in that, Step S2, the filtering feature selection based on K-nearest neighbor mutual information estimation, employs the Kraskov–Stögbauer–Grassberger mutual information estimator and performs label permutation tests at least a preset number of times on each feature in the balanced training subset to determine the significance of mutual information. Value, Reserved Features whose values ​​are less than the significance level; The wrap-around re-examination based on Shapley values ​​performs pairwise normalized mutual information calculation among the retained features, and discards the features with smaller mutual information when the normalized mutual information exceeds the redundancy threshold.

4. The method for fault diagnosis of dissolved gas analysis in oil-immersed transformers according to claim 1, characterized in that, The adaptive calibration in step S3 includes: using a candidate method to automatically select the optimal method based on the expected calibration error ECE on the calibration subset; wherein the candidate method includes temperature scaling, Platt scaling and ordinal-preserving regression, and the scalar temperature parameter for temperature scaling is obtained by minimizing the negative log-likelihood on the calibration subset.

5. The method for fault diagnosis of dissolved gas analysis in oil-immersed transformers according to claim 1, characterized in that, Step S3 involves constructing the asymmetric misclassification cost matrix, including assigning values ​​according to a preset principle. The preset principles include: the cost of missing a fault is significantly greater than the cost of a false alarm; the cost of missing a discharge fault is greater than the cost of missing an overheat fault and is positively correlated with the severity of the fault; the cost of misjudging adjacent severity categories within the same type of fault is small; and the cost of the diagonal is zero.

6. The method for fault diagnosis of dissolved gas analysis in oil-immersed transformers according to claim 1, characterized in that, Step S3, which involves obtaining the Bayesian optimal decision based on the expected loss minimization criterion, includes: For each sample to be diagnosed Calculate each candidate decision using the following formula. Expected loss : ; in, For fault category labels, For a set of fault categories, Indicates the true category is Time prediction is The resulting cost, This is the posterior after the adaptive calibration; And select the category that minimizes conditional risk as the point decision output according to the Bayesian optimal decision rule: ; in, For Bayesian point decision-making.

7. The method for fault diagnosis of dissolved gas analysis in oil-immersed transformers according to claim 1, characterized in that, Step S4 describes performing a commutativity test between the calibration subset and the test subset. Specifically, this involves performing a Kolmogorov–Smirnov test on each feature in the final feature subset and a permutation test on the inconsistency score sequence. If both tests do not reject the test, the test is deemed to have passed, and conformal prediction construction is performed.

8. The method for diagnosing dissolved gas faults in oil-immersed transformers according to claim 1, characterized in that, Step S4, which involves outputting a conformal prediction set for the sample to be diagnosed, includes: Define the inconsistency score function: ; in, As a sample, For fault category labels, For the posterior after adaptive calibration; In calibration subset Calculate the inconsistency score for all samples. ,in, For the first One sample, For the first Fault category labels for each sample The total number of samples; for the significance level threshold The conformal threshold is determined by empirical quantiles. : ; For each sample to be diagnosed Construct its conformal prediction set : ; in, This is a set of fault categories.

9. The method for diagnosing dissolved gas analysis faults in oil-immersed transformers according to claim 1, characterized in that, The predetermined fusion rule in step S5 specifically involves: setting a three-level fusion rule to jointly determine the Bayesian optimal decision and the conformal prediction set, and outputting a diagnostic conclusion that includes the diagnostic confidence state; the three-level fusion rule includes: When the cardinality of the conformal prediction set is 1 and the Bayesian point decision belongs to this set, the corresponding diagnostic confidence state is output. If the cardinality of the conformal prediction set is greater than 1 and the Bayesian point decision belongs to that set, output the corresponding diagnostic confidence state and trigger manual review; If the Bayesian point decision does not belong to the conformal prediction set or the conformal prediction set is empty, output the corresponding diagnostic confidence state and trigger on-site retesting.

10. A dissolved gas analysis fault diagnosis system for oil-immersed transformers, characterized in that, include: The initialization module is used to collect the concentration of various characteristic gases in the oil-immersed transformer, which together with the fault category label constitutes the sample set; The sample set is preprocessed and divided into training subset, calibration subset and test subset. SMOTE oversampling is performed only on the training subset to obtain a balanced training subset, while the calibration subset and test subset maintain the original marginal distribution. The feature selection module is used to perform filtering selection based on K-nearest neighbor mutual information estimation and wrapping re-examination based on Shapley value on the balanced training subset to obtain the final feature subset. The decision module is used to train an XGBoost multi-class classifier on a balanced training subset with the final feature subset, and to adaptively calibrate the multi-class posterior probabilities output by the classifier on a calibration subset. Construct an asymmetric misclassification cost matrix and obtain the Bayesian optimal decision based on the expected loss minimization criterion; The test prediction module is used to perform an exchangeability test between the calibration subset and the test subset. After the test passes, the inconsistency score and its quantile threshold are constructed based on the calibrated posterior and the conformal prediction set is output for the sample to be diagnosed. The diagnostic module is used to jointly determine the Bayesian optimal decision and the conformal prediction set according to a predetermined fusion rule, and output a diagnostic conclusion including the fault category, conformal prediction set, expected loss and confidence level.