Training method, device and medium for transformer fault diagnosis model based on dissolved gas in oil
By constructing and screening a feature set of dissolved gases in oil, and selecting the feature combination with the highest diagnostic performance round by round, a transformer fault diagnosis model is trained. This solves the problems of insufficient feature representation and low diagnostic accuracy in existing technologies, and achieves higher fault diagnosis accuracy and stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG UNIV OF TECH
- Filing Date
- 2026-03-26
- Publication Date
- 2026-06-26
AI Technical Summary
In the existing technology, transformer fault diagnosis methods based on dissolved gas analysis in oil have problems such as insufficient input feature expression, insufficient feature screening, and the need to improve fault diagnosis accuracy. In particular, traditional methods rely on fixed ratios or empirical coding, which are not capable of adapting to complex faults. Intelligent diagnosis methods are easily affected by redundant and irrelevant features.
By constructing an initial feature set, removing features with correlation below a preset threshold, selecting the feature combination with the highest diagnostic performance round by round to form a target feature set, and training a transformer fault diagnosis model based on the target feature set, a subset of features with stronger correlation to the fault state is selected to reduce interference from redundant features.
It improves the accuracy and stability of transformer fault diagnosis, can more fully explore the characteristic information of dissolved gases in oil, and enhances the diagnostic model's ability to distinguish fault categories.
Smart Images

Figure CN122286304A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power equipment condition monitoring and fault diagnosis technology, and in particular to a training method, equipment and medium for a transformer fault diagnosis model based on dissolved gas in oil. Background Technology
[0002] Transformers are key equipment in power systems for energy conversion and transmission, and their operating status directly affects the safety and stability of the power grid. During long-term operation, transformers are susceptible to internal faults such as overheating and discharge due to factors such as thermal stress, electrical stress, and insulation aging. Failure to detect and diagnose these faults promptly can lead to equipment damage or even power outages. Therefore, transformer fault diagnosis is of great importance. Dissolved gas analysis in oil is currently an important method for transformer fault diagnosis. When different types of faults occur in a transformer, the oil-paper insulation material decomposes, producing different types and amounts of characteristic gases. By detecting changes in the concentrations of gases such as hydrogen, methane, acetylene, ethylene, and ethane, the internal fault state of the transformer can be reflected.
[0003] In existing technologies, diagnostic methods based on dissolved gas analysis in oil mainly include traditional methods such as the characteristic gas method and the ratio method, as well as intelligent diagnostic methods that combine machine learning. Traditional methods are simple in rules and easy to apply, but they usually rely on fixed ratios or empirical coding, resulting in problems such as absolute boundary delineation and insufficient adaptability to complex faults. Although existing intelligent diagnostic methods have improved diagnostic accuracy, most of them directly use the original gas concentration or a small number of fixed ratios as input features, failing to fully explore the combination relationships and discriminative information in the gas data, and are easily affected by redundant and irrelevant features, resulting in room for improvement in diagnostic accuracy and stability.
[0004] Therefore, how to construct a gas feature set that can fully characterize the fault features of transformers, and how to select the optimal feature subset that is more correlated with the fault state, is a technical problem that urgently needs to be solved in this field. Summary of the Invention
[0005] In view of the above-mentioned problems, the present invention provides a training method, equipment and medium for a transformer fault diagnosis model based on dissolved gas in oil.
[0006] Therefore, the technical problem solved by this invention is: how to provide a transformer fault diagnosis method that can fully extract the characteristic information of dissolved gases in oil, reduce redundant feature interference, and improve the accuracy and stability of transformer fault diagnosis, and make it implementable in the form of electronic devices and computer-readable storage media. This overcomes the problems of insufficient input feature representation, inadequate feature selection, and the need to improve fault diagnosis accuracy in existing technologies.
[0007] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0008] In a first aspect, the present invention provides a training method for a transformer fault diagnosis model based on dissolved gases in oil, comprising: Acquire concentration data of at least five dissolved gases in transformer oil and transformer status labels. The at least five dissolved gases include H2, C2H4, C2H2, CH4, and C2H6. The transformer status labels include at least normal state, low-energy discharge, high-energy discharge, high-temperature overheating, partial discharge, and medium-low temperature overheating. Construct an initial feature set based on the concentration data of at least five dissolved gases. The initial feature set includes multiple preset features, including the concentration of one or more dissolved gases and the ratio of the concentration of one or more dissolved gases to the concentration of one or more dissolved gases. The correlation between various preset features in the initial feature set and the transformer operating status is evaluated, and preset features with correlation below a preset threshold are removed to obtain a candidate feature set. Number each candidate feature in the candidate feature set; Candidate features are selected from the candidate feature set in numerical order to form the feature set to be evaluated; The evaluation model is trained based on the feature set to be evaluated. The diagnostic performance index of the evaluation model is calculated. The candidate feature with the highest diagnostic performance index is selected as the first feature in the preferred feature set, and the diagnostic performance index of this round is recorded. In subsequent rounds of feature selection, the remaining unselected candidate features are added to the previous round's preferred feature set in the order of their numbers to form a new set of features to be evaluated. The evaluation model is trained and the diagnostic performance index is calculated based on the new set of features to be evaluated. The candidate feature with the highest diagnostic performance index is selected and added to the preferred feature set. The diagnostic performance index of each round is recorded. After the optimal termination condition is met, the diagnostic performance indicators recorded in each round of feature selection are compared, and the feature subset corresponding to the round with the highest diagnostic performance indicator is selected as the target feature set. A transformer fault diagnosis model is trained based on the concentration data corresponding to the target feature set.
[0009] In some embodiments, the present invention provides a training method for a transformer fault diagnosis model based on dissolved gases in oil, comprising: Step 1: Obtain dissolved gas data and corresponding status labels for at least five types of transformer oil; Step 2: Construct an initial feature set based on dissolved gas data from at least five types of transformer oil; Step 3: Evaluate the correlation between various preset features in the initial feature set and the transformer operating status, and remove preset features with correlation below a preset threshold to obtain a candidate feature set; Step 4: Number each candidate feature in the candidate feature set and construct the feature set to be evaluated, including: selecting candidate features in the candidate feature set according to the numbering order to form the feature set to be evaluated; in the subsequent rounds of feature selection, based on the selected feature set determined in the previous round, select the unselected candidate features in the order of the remaining candidate feature numbers and add them to the determined selected feature set to form multiple new feature sets to be evaluated. Step 5: Train an evaluation model based on the feature set to be evaluated and calculate the diagnostic performance index of the evaluation model. Perform feature optimization to obtain the target feature set, including: training the evaluation model based on the feature set to be evaluated, calculating the diagnostic performance index of the evaluation model, selecting the candidate feature with the highest diagnostic performance index as the first feature in the optimized feature set, and recording the diagnostic performance index of this round; in subsequent rounds of feature optimization, calculate the diagnostic performance index corresponding to multiple new feature sets to be evaluated, select the candidate feature corresponding to the new feature set to be evaluated with the highest diagnostic performance index, and add it to the determined optimized feature set to form a new optimized feature set; after the optimization termination condition is met, compare the diagnostic performance indices recorded in each round of feature selection, and select the feature subset corresponding to the round with the highest diagnostic performance index as the target feature set; Step 6: Construct and train a transformer fault diagnosis model based on the feature data corresponding to the target feature set; Step 7: Input the target feature set corresponding to the sample to be diagnosed into the transformer fault diagnosis model, and output the fault diagnosis result corresponding to the sample to be diagnosed.
[0010] Preferred Option 1: Initial Feature Set Construction As a preferred method for training a transformer fault diagnosis model based on dissolved gases in transformer oil, at least five types of dissolved gas data in transformer oil are acquired and an initial feature set is constructed, including: Obtain the concentration data of dissolved gases in five types of oil: H2, CH4, C2H2, C2H4, and C2H6; An initial feature set is constructed based on the dissolved gas concentrations in at least five types of transformer oils. The initial feature set includes multiple preset features, including the concentration of one or more dissolved gases and the ratio of the concentration of one or more dissolved gases to the concentration of one or more dissolved gases. When calculating the ratio characteristics, values of 0 for dissolved gas concentration in transformer oil are replaced with preset small positive values to avoid a denominator of 0. Preferred Option 2: Correlation Screening A preferred method for training a transformer fault diagnosis model based on dissolved gases in oil includes: The correlation between each preset feature in the initial feature set and the fault tag is evaluated. The absolute value of the correlation coefficient between each preset feature and the transformer tag status is calculated. A candidate feature set is obtained based on the preset features whose absolute value of the correlation coefficient is greater than or equal to the preset threshold.
[0011] Preferred Option 3: Candidate Feature Numbering and Feature Selection Rules A preferred method for training a transformer fault diagnosis model based on dissolved gases in oil includes: Each preset feature in the candidate feature set is numbered, and unused preset features are selected in sequence according to the numbering order to add them to the historical feature set to be evaluated, so as to form the current feature set to be evaluated.
[0012] As a preferred method for training a transformer fault diagnosis model based on dissolved gases in oil, the evaluation model is trained based on the feature set to be evaluated, and diagnostic performance indicators are calculated, including: Feature data corresponding to the feature set to be evaluated is extracted and combined with transformer state labels to form a training sample set; supervised learning is used to train the evaluation model, and diagnostic performance indicators corresponding to the feature set to be evaluated are obtained based on cross-validation; the diagnostic performance indicators are cross-validation average performance, cross-validation accuracy, or other evaluation values that can reflect classification performance.
[0013] Preferred Option 4: Termination Conditions As a preferred option, the preferred termination condition is: all candidate features in the candidate feature set have participated in the construction and performance evaluation of the feature set to be evaluated.
[0014] Preferred Option 5: Fault Diagnosis Model As a preferred method for training a transformer fault diagnosis model based on dissolved gases in oil, wherein: The transformer fault diagnosis model includes a feature input unit, a feature mapping unit, and a discrimination output unit. The feature input unit receives feature data corresponding to the target feature set, the feature mapping unit performs parameterized mapping on the feature data to obtain intermediate representations, and the discrimination output unit outputs fault category results based on the intermediate representations. The fault category results include at least normal state, medium and low temperature overheating, high temperature overheating, partial discharge, low energy discharge, and high energy discharge.
[0015] In a second aspect, the present invention provides a computer device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the training method for a transformer fault diagnosis model based on the characteristics of dissolved gases in oil are implemented.
[0016] Thirdly, the present invention provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of a training method for a transformer fault diagnosis model optimized based on the characteristics of dissolved gases in oil.
[0017] The training method for a transformer fault diagnosis model provided by this invention includes: acquiring concentration data of at least five dissolved gases in transformer oil and transformer status labels, wherein the at least five dissolved gases include H2, C2H4, C2H2, CH4, and C2H6; the transformer status labels include at least normal state, low-energy discharge, high-energy discharge, high-temperature overheating, partial discharge, and medium-low temperature overheating; constructing an initial feature set based on the concentration data of at least five dissolved gases, wherein the initial feature set includes multiple preset features, wherein the multiple preset features include the concentration of one or more dissolved gases and the ratio of the concentration of one or more dissolved gases to the concentration of one or more dissolved gases; evaluating the correlation between the multiple preset features in the initial feature set and the transformer operating state, and removing preset features with correlation below a preset threshold to obtain a candidate feature set; numbering each candidate feature in the candidate feature set; and sorting the candidate feature set according to the numbering order. Candidate features are selected to form a feature set to be evaluated. An evaluation model is trained based on this feature set, and its diagnostic performance index is calculated. The candidate feature with the highest diagnostic performance index is selected as the first feature in the preferred feature set, and the diagnostic performance index for this round is recorded. In subsequent rounds of feature selection, the remaining unselected candidate features are added sequentially to the preferred feature set of the previous round, forming a new feature set to be evaluated. An evaluation model is trained based on this new feature set, and its diagnostic performance index is calculated. The candidate feature with the highest diagnostic performance index is selected and added to the preferred feature set, and the diagnostic performance index for each round is recorded. After the preferred feature set is terminated, the diagnostic performance indices recorded in each round are compared, and the feature subset corresponding to the round with the highest diagnostic performance index is selected as the target feature set. Based on the concentration data corresponding to the target feature set, a transformer fault diagnosis model is trained. By evaluating the correlation between preset features in the initial feature set and the transformer's operating state, and combining this with round-by-round feature optimization, a target feature set that is strongly correlated with the fault state and contributes significantly to improving diagnostic performance is selected. Then, the transformer fault diagnosis model is trained based on the concentration data corresponding to the target feature set. This achieves the effect of extracting key fault characterization information from dissolved gas data in oil and reducing the interference of low-relevance and redundant features on model training. Since the target feature set can more fully characterize the changing patterns of dissolved gases in oil under different fault states, it can improve the transformer fault diagnosis model's ability to distinguish fault categories, thereby enhancing the accuracy and stability of transformer fault diagnosis. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating the training method of the transformer fault diagnosis model optimized based on the characteristics of dissolved gases in oil according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the preferred features determined in each round of the present invention and their corresponding diagnostic performance indicators; Figure 3 This is a schematic diagram of the confusion matrix of transformer fault diagnosis results in an embodiment of the present invention. Detailed Implementation
[0020] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0021] Figure 1 This application discloses a training method for a transformer fault diagnosis model based on dissolved gases in oil, comprising: Acquire concentration data of at least five dissolved gases in transformer oil and transformer status labels. The at least five dissolved gases include H2, C2H4, C2H2, CH4, and C2H6. The transformer status labels include at least normal state, low-energy discharge, high-energy discharge, high-temperature overheating, partial discharge, and medium-low temperature overheating. Construct an initial feature set based on the concentration data of at least five dissolved gases. The initial feature set includes multiple preset features, including the concentration of one or more dissolved gases and the ratio of the concentration of one or more dissolved gases to the concentration of one or more dissolved gases. The correlation between various preset features in the initial feature set and the transformer operating status is evaluated, and preset features with correlation below a preset threshold are removed to obtain a candidate feature set. Number each candidate feature in the candidate feature set; Candidate features are selected from the candidate feature set in numerical order to form the feature set to be evaluated; The evaluation model is trained based on the feature set to be evaluated. The diagnostic performance index of the evaluation model is calculated. The candidate feature with the highest diagnostic performance index is selected as the first feature in the preferred feature set, and the diagnostic performance index of this round is recorded. In subsequent rounds of feature selection, the remaining unselected candidate features are added to the previous round's preferred feature set in the order of their numbers to form a new set of features to be evaluated. The evaluation model is trained and the diagnostic performance index is calculated based on the new set of features to be evaluated. The candidate feature with the highest diagnostic performance index is selected and added to the preferred feature set. The diagnostic performance index of each round is recorded. After the optimal termination condition is met, the diagnostic performance indicators recorded in each round of feature selection are compared, and the feature subset corresponding to the round with the highest diagnostic performance indicator is selected as the target feature set. A transformer fault diagnosis model is trained based on the concentration data corresponding to the target feature set.
[0022] Based on the above technical solution, by acquiring concentration data of at least five dissolved gases in transformer oil and transformer status labels, an initial feature set containing multiple preset features is constructed. The correlation between the preset features and the transformer operating status is further evaluated to obtain a candidate feature set. On this basis, the candidate features are numbered, and a feature set to be evaluated is constructed round by round. The diagnostic performance of different feature combinations is quantitatively compared using an evaluation model. Finally, the feature subset corresponding to the round with the highest diagnostic performance index is selected as the target feature set. The transformer fault diagnosis model is then trained based on the concentration data corresponding to the target feature set. Using this method, key features that are more beneficial for distinguishing fault categories can be screened from the dissolved gas characteristics in various oils. This is because the gas change patterns corresponding to different fault states differ, and correlation evaluation can pre-select preset features with weak correlation to the fault state. Round-by-round feature optimization can further identify feature combinations that contribute significantly to improving diagnostic performance. Therefore, it can effectively reduce the impact of irrelevant and redundant features on model training and improve the accuracy and stability of the transformer fault diagnosis model.
[0023] Example 1: This example provides a training method for a transformer fault diagnosis model based on dissolved gases in oil, including the following steps: S1: Obtain dissolved gas sample data and corresponding transformer status labels from transformer oil. In this embodiment, the concentrations of five gases—H2, C2H4, C2H2, CH4, and C2H6—are selected as the basic gas data, and corresponding labels are set according to the sample fault status. As a specific example, the transformer status labels may include six status categories: normal state, medium-low temperature overheating, high temperature overheating, partial discharge, low-energy discharge, and high-energy discharge. Some of the obtained data is shown in Table 1. Table 1. Partial data on dissolved gases in transformer oil and their status labels.
[0024] S2: Construct an initial feature set based on the concentrations of five gases. This initial feature set includes not only the original concentration features of the five gases, but also ratio features, summation features, and combination features constructed based on the gas concentrations. The initial feature set includes at least some of the following 31 preset features: H2, C2H4, C2H2, CH4, C2H6, CH4 / H2, C2H2 / H2, CH4 / C2H6, C2H4 / C2H6, CH4 / C2H4, C2H6 / C2H4, C2H2 / C2H4, H2 / ALL, C2H4 / ALL, C2H2 / ALL, CH4 / ALL, C2H6 / ALL, H2 / THC, C2H4 / THC, C2H2 / THC. C, CH4 / THC, C2H6 / THC, (CH4+C2H2) / ALL, (CH4+C2H4) / ALL, (CH4+C2H6) / ALL, (C2H2+C2H6) / ALL, (C2H2+C2H4) / ALL, (C2H4+C2H6) / ALL, (CH4+C2H4+C2H6) / ALL, (CH4+C2H2+C2H6) / ALL, (CH4+C2H2+C2H4) / ALL; where ALL represents the sum of the concentrations of the five dissolved gases H2, CH4, C2H2, C2H4, and C2H6, and THC represents the sum of the concentrations of the four dissolved gases CH4, C2H2, C2H4, and C2H6.
[0025] In some implementations, the initial feature set includes 31 preset features as shown in Table 2, including single gas concentration features, gas ratio features, and combination proportion features. Using this approach, transformer fault states can be characterized from different levels, improving the sufficiency of the initial feature set in describing different fault types and the effectiveness of subsequent feature selection, thus providing a more representative candidate basis for the optimal selection of the target feature set. These preset features are not randomly constructed, but rather based on the gas generation patterns, concentration change patterns, and relative relationships between gases corresponding to different fault states in the analysis of dissolved gases in oil. Specifically, single gas concentration features characterize the absolute content changes of different characteristic gases under various fault states; gas ratio features characterize the relative proportions of multiple gases under different fault states; and combination proportion features characterize the relative distribution of a certain gas in the total gas or a specific combination of gases. Since different fault states may not only manifest as an increase in the concentration of a single dissolved gas, but also as differences in the proportions and combination distributions of multiple dissolved gases, simultaneously introducing these multiple types of preset features can more comprehensively reflect the changing characteristics of dissolved gases in oil under different transformer fault states, rather than unfounded combinations of raw gas data.
[0026] Table 2 Initial Feature Set
[0027] When constructing the ratio features, to avoid a denominator of 0, gases with a concentration of 0 are replaced with 1×10⁻⁶. After construction, all features can be normalized to eliminate the influence of dimensions.
[0028] S3: Based on the preset feature concentration data and transformer status labels in the initial feature set, calculate the absolute value of the correlation coefficient between each preset feature and the transformer operating status; obtain the candidate feature set based on the preset features whose absolute value of the correlation coefficient is greater than or equal to the preset threshold.
[0029] The correlation between each preset feature in the initial feature set and the transformer operating state is evaluated, and features with correlation below a preset threshold are removed to obtain a candidate feature set. In this embodiment, the Pearson correlation coefficient is used as the correlation evaluation index. The Pearson correlation coefficient, also known as the Pearson product matrix correlation coefficient, is used to measure the linear correlation between two variables. The covariance between two variables divided by their respective standard deviations is the quotient, and its calculation expression is as follows:
[0030] In the formula, cov(X,Y) is the covariance between variables X and Y; , Let X and Y be the standard deviations. The Pearson correlation coefficient ranges from -1 to 1. The sign of the Pearson correlation coefficient does not affect the degree of correlation, but only indicates the direction of the correlation between variables.
[0031] For subsequent result comparison, this embodiment performs absolute value processing on the calculated Pearson correlation coefficients, calculates the correlation coefficient between each preset feature and the transformer status label, and retains features with correlation coefficients greater than or equal to a preset threshold to form a candidate feature set. In this embodiment, the preset threshold is set to 0.3.
[0032] In some implementations, the correlation between various preset features in the initial feature set and the transformer operating state is evaluated. Preset features with correlation below a preset threshold are eliminated to obtain a candidate feature set. This includes: calculating the absolute value of the correlation coefficient between each preset feature and the transformer operating state based on the preset feature concentration data and transformer state labels in the initial feature set; and obtaining the candidate feature set based on preset features whose absolute correlation coefficient is greater than or equal to a preset threshold. Using this method, preset features with a high degree of correlation to transformer fault states can be preferentially retained, reducing the probability of low-correlation and irrelevant features entering the subsequent feature selection process, thereby improving the effectiveness of the candidate feature set and the targeting of subsequent selection. This is because different preset features contribute differently to fault category differentiation. Preset features with larger absolute correlation coefficients usually have a stronger correlation with the transformer operating state and are more likely to contain effective discriminative information for fault identification. Therefore, by taking the absolute value of the correlation coefficient and setting a preset threshold for screening, the candidate space can be narrowed while retaining effective information, reducing the interference of redundant features on subsequent evaluation model training and feature selection processes.
[0033] In this embodiment, the correlation between each preset feature in the initial feature set and the transformer operating state is evaluated. The Pearson correlation coefficients of each feature are shown in Table 3 below: Table 3. Pearson Correlation Coefficient Table for Characteristics of Gas Ratios
[0034] As shown in Table 3, 11 of the 31 features have a Pearson correlation coefficient greater than or equal to 0.3. The specific features are shown in Table 4. Table 4. Preset features of the candidate feature set and their Pearson correlation coefficients
[0035] S4: Train and evaluate the model and calculate diagnostic performance metrics. In this embodiment, the diagnostic performance index is obtained by training and validating the evaluation model corresponding to the current feature set to be evaluated, and is used to characterize the fault diagnosis performance of the current feature set to be evaluated.
[0036] In some implementations, training an evaluation model based on the feature set to be evaluated and calculating the diagnostic performance index of the evaluation model includes: extracting corresponding feature data based on the feature set to be evaluated and forming a training sample set with the corresponding transformer state labels; training the evaluation model using supervised learning to obtain model parameters; using the evaluation model to output the prediction result of the transformer state based on the input feature data; validating the evaluation model based on cross-validation and calculating the diagnostic performance index based on the prediction result of cross-validation; wherein, the diagnostic performance index is the classification accuracy of cross-validation.
[0037] By employing the above method, we can evaluate the actual performance of different feature sets in fault classification tasks in a unified and quantifiable manner, providing an objective evaluation basis for subsequent feature optimization. This is because it is difficult to directly judge the merits of different feature sets based solely on their feature forms. However, by evaluating model training and cross-validation, we can directly reflect the supporting ability of corresponding feature combinations for fault category identification. At the same time, cross-validation can reduce the randomness brought about by a single data partitioning, making the obtained diagnostic performance indicators more stable and representative, thus facilitating a fair comparison of different feature sets.
[0038] Specifically, feature data corresponding to the current feature set to be evaluated is extracted and combined with transformer state labels to form a training sample set; supervised learning is used to train the evaluation model and cross-validation is used to validate the evaluation model in order to obtain the diagnostic performance indicators corresponding to the current feature set to be evaluated.
[0039] In one specific embodiment, the evaluation model employs the extreme gradient boosting model XGBoost. For the feature subset Sk to be evaluated obtained in the k-th round, k-fold cross-validation is used to validate the XGBoost model, obtaining the average cross-validation performance Perf(Sk) corresponding to the feature subset, and Perf(Sk) is used as the diagnostic performance metric for the feature set to be evaluated.
[0040] In other embodiments, the diagnostic performance metrics may also be the classification accuracy of cross-validation, the F1 score, or other evaluation metrics that can characterize classification performance. This invention does not limit this.
[0041] Diagnostic performance metrics are used to compare the fault diagnosis performance of different feature sets to be evaluated, and serve as the evaluation basis in the subsequent feature selection process.
[0042] S5: After the candidate feature set is determined, each candidate feature in the candidate feature set is numbered, including: assigning numbers to each candidate feature in sequence according to the order of the candidate features in the candidate feature set; after a candidate feature is selected into the preferred feature set, the numbers of the unselected candidate features remain unchanged.
[0043] In some implementations, each candidate feature in the candidate feature set is assigned a number sequentially according to its order of appearance in the set, and the numbers of the remaining unselected candidate features remain unchanged after a candidate feature is selected into the preferred feature set. This approach ensures consistency in the identification of candidate features throughout each round of feature selection, facilitating the unified recording and comparison of the feature sets to be evaluated and their corresponding diagnostic performance indicators. This is because in subsequent rounds of feature selection, it is necessary to continuously track the performance of each candidate feature in different feature sets to be evaluated. If the candidate feature numbers change, it can easily lead to confusion in the correspondence between candidate features and diagnostic performance indicators. Maintaining the numbers of unselected candidate features unchanged improves the traceability and repeatability of the feature selection process.
[0044] Furthermore, to ensure the consistency of the construction rules for the feature set to be evaluated, this embodiment sequentially traverses the remaining unselected candidate features in numerical order during each round of feature selection. Using the aforementioned fixed numbering and sequential traversal method ensures that the same candidate feature set has a consistent feature optimization path under the same dataset and model parameters, facilitating horizontal comparison of diagnostic performance indicators corresponding to different feature sets to be evaluated. Simultaneously, after candidate features are selected into the preferred feature set round by round, the numbering of the remaining candidate features remains stable, which also helps maintain the stability of the mapping relationship between candidate features, the feature set to be evaluated, and their corresponding diagnostic performance indicators. Correspondingly, if a fixed numbering and sequential addition method is not adopted, the candidate feature traversal order may be inconsistent under different running batches, different program implementations, or different candidate feature storage methods, thereby increasing the complexity of constructing the feature set to be evaluated, recording performance, and backtracking the optimization results, which is detrimental to the standardized implementation of the transformer fault diagnosis model training process.
[0045] As a specific example, after relevance screening, 11 candidate features were obtained, which were numbered sequentially from 1 to 11, as shown in Table 5: Table 5 Candidate Feature Sets After Numbering
[0046] S6: After numbering the candidate feature sets, construct the feature sets to be evaluated and perform feature optimization, including: training an evaluation model based on the feature sets to be evaluated, calculating the diagnostic performance index of the evaluation model, selecting the candidate feature with the highest diagnostic performance index as the first feature in the optimized feature set, and recording the diagnostic performance index of this round; in subsequent rounds of feature optimization, based on the optimized feature sets determined in the previous round, according to the remaining candidate feature numbers, sequentially select the unselected candidate features and add them to the determined optimized feature sets to form multiple new feature sets to be evaluated; then calculate the diagnostic performance index corresponding to each of the multiple new feature sets to be evaluated; select the candidate feature corresponding to the new feature set with the highest diagnostic performance index and add it to the determined optimized feature set to form a new optimized feature set; wherein, in each round of feature selection, according to the size of the candidate feature numbers, sequentially add the remaining unselected candidate features to the currently determined optimized feature sets to form multiple feature sets to be evaluated.
[0047] By employing the above method, based on the previously determined preferred feature set, the impact of different remaining candidate features combined with existing preferred features on diagnostic performance can be evaluated round by round. This allows for more targeted selection of candidate features that significantly contribute to fault category differentiation, avoiding unstable selection results caused by relying solely on experience or random feature addition. Since different candidate features may improve the diagnostic performance of the evaluation model to varying degrees when combined with the currently determined preferred feature set, constructing multiple new feature sets to be evaluated and calculating their corresponding diagnostic performance indicators allows for a quantitative comparison of the gain effect of each candidate feature in the current round. This enables the selection of the candidate feature most beneficial to improving diagnostic performance in this round to be added to the preferred feature set, gradually forming a feature combination with superior performance.
[0048] The process of constructing the feature set to be evaluated and performing feature selection will be further explained below with reference to this embodiment.
[0049] S6.1: Initialize the number of features in the feature set to be evaluated to 0; S6.2: In the first round of feature selection, according to the candidate feature number order, select one candidate feature from the candidate feature set to form the current feature set to be evaluated, and calculate the diagnostic performance index corresponding to each current feature set to be evaluated; select the candidate feature with the highest diagnostic performance index as the first feature in the preferred feature set, and record the first diagnostic performance index at this time. S6.3: In the second round of feature selection, based on the first selected feature, one unselected candidate feature is added according to the remaining candidate feature numbering order to form a new current feature set to be evaluated, and the diagnostic performance index corresponding to each current feature set to be evaluated is calculated; the candidate feature with the highest diagnostic performance index is selected as the second feature in the preferred feature set, and the second diagnostic performance index at this time is recorded. S6.4: Repeat the above process. Based on the preferred feature set determined in the previous round, add one candidate feature in order of number from the remaining unselected candidate features each time to form a new current feature set to be evaluated, and calculate the corresponding diagnostic performance index for each. In each round, select the candidate feature with the highest diagnostic performance index to add to the preferred feature set. S6.5: After the termination condition is met: each candidate feature in the candidate feature set has completed the construction and performance evaluation of its corresponding feature set to be evaluated, compare the diagnostic performance indicators recorded in each round, select the feature set corresponding to the round with the highest diagnostic performance indicator, and determine it as the final preferred feature set. This final preferred feature set is the target feature set.
[0050] In some implementations, determining the preferred feature set as the target feature set includes: comparing the diagnostic performance indicators recorded in each round of feature selection, selecting the feature set corresponding to the round with the highest diagnostic performance indicators as the optimal feature set, and determining the optimal feature set as the target feature set.
[0051] The above approach avoids directly determining the target feature set based solely on the order of feature addition or the final number of features. Instead, it selects the best-performing feature combination from the optimized feature sets formed in each round based on actual diagnostic performance, thus balancing feature quantity and diagnostic performance. This is because as candidate features are added round by round, the diagnostic performance of the evaluation model does not necessarily continue to improve, and some subsequently added candidate features may introduce redundant information. Therefore, comparing the diagnostic performance indicators recorded during each round of feature selection and determining the target feature set in the round with the highest performance is more conducive to selecting the feature combination with the strongest ability to distinguish fault categories. The optimized features determined in each round of feature selection and the changes in their corresponding diagnostic performance indicators are shown below. Figure 2 As shown.
[0052] After obtaining the target feature set, the target feature set is used as the input feature set to input the transformer fault diagnosis model for fault diagnosis.
[0053] S7: Construct and train a transformer fault diagnosis model After determining the target feature set, a transformer fault diagnosis model is constructed based on the feature data corresponding to the target feature set, and the transformer fault diagnosis model is trained using labeled samples to achieve the identification of transformer fault states. In some implementations, the transformer fault diagnosis model includes a feature input unit, a feature mapping unit, and a discrimination output unit; wherein, the feature input unit is used to receive feature data corresponding to the target feature set, the feature mapping unit is used to perform parameterized mapping on the feature data to obtain intermediate representations, and the discrimination output unit is used to output fault category results based on the intermediate representations.
[0054] Specifically, a training sample set is constructed based on the feature data corresponding to the target feature set and the transformer state labels. This training sample set is then used to train the transformer fault diagnosis model to determine the model parameters of the feature mapping unit. After training, during the inference phase, the target feature set corresponding to the sample to be diagnosed is input into the transformer fault diagnosis model. The feature input unit receives the input feature data, which is then parameterized and mapped by the feature mapping unit to obtain an intermediate representation. Finally, the discrimination output unit outputs the corresponding fault category result based on the intermediate representation. This approach clearly realizes the classification process from input to output of the fault category result for the feature data corresponding to the target feature set, enabling the target feature set obtained through feature optimization to be effectively used for fault identification. This is because training with labeled training samples allows the transformer fault diagnosis model to learn the correspondence between target features and fault categories. The intermediate representation formed by the feature mapping unit after parameterizing the input feature data is more conducive to subsequent classification and discrimination, thus improving the ability to distinguish between different transformer fault states.
[0055] In one specific embodiment, the transformer fault diagnosis model can be implemented using a support vector machine classification model. The feature mapping unit can map the input feature data to the classification space through kernel function mapping to obtain an intermediate representation for fault category discrimination. Support Vector Machines (SVMs) are a binary classification model whose basic characteristic is to find the maximum linear margin in the classification space and then perform the classification. Its learning strategy is to maximize the margin, ultimately transforming it into a convex quadratic programming problem. It can be described by the following expression:
[0056] in, For penalty parameters; These are weight parameters; This is the bias value; These are slack variables; For data capacity; , These represent the input value and the expected value, respectively. In practical applications, most problems are nonlinear. Kernel functions are used to map nonlinear data to a high-dimensional space, constructing an optimal hyperplane in this space and classifying the data. This paper chooses the Gaussian kernel function for high-to-low dimensional mapping, and its expression is:
[0057] in, This represents the i-th input value; Indicates kernel parameters.
[0058] By incorporating the Lagrange multipliers into the above formula, we obtain the classification decision function of SVM:
[0059] in, Represents the Lagrange factor; Furthermore, optimization algorithms can be used to optimize the model parameters of the support vector machine classification model to obtain a transformer fault diagnosis model with better diagnostic performance. In one embodiment of the present invention, the optimization algorithm may be the alpha evolution algorithm, and the model parameters may include a penalty factor and kernel function parameters; This specific embodiment introduces the AE algorithm to penalize the parameters of the Support Vector Machine (SVM). With kernel parameters By implementing optimization operations and using the algorithm's iterative search mechanism to determine the optimal combination of model parameters, the problem of model accuracy degradation caused by unreasonable parameter configuration is effectively solved, and the classification and recognition performance of the SVM model for transformer fault samples is significantly improved.
[0060] S8: Output fault diagnosis results Input the feature data corresponding to the target feature set of the sample to be diagnosed into the trained transformer fault diagnosis model, and output the corresponding fault category result; In this embodiment, the output result may include one of the following: normal state, medium and low temperature overheating, high temperature overheating, partial discharge, low energy discharge, and high energy discharge.
[0061] Example 2: Electronic Device Example In some embodiments, this application also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed on the processor, it causes the processor to perform a training method for a transformer fault diagnosis model based on the characteristics of dissolved gases in oil, as described in any of the above embodiments.
[0062] Specifically, the processor can be used to execute steps such as data acquisition, initial feature set construction, correlation screening, candidate feature numbering, feature set construction to be evaluated, evaluation model training and diagnostic performance index calculation, target feature set determination, and transformer fault diagnosis model training; the memory is used to store training samples, feature data, model parameters, program instructions, and intermediate calculation results. Using this approach, the aforementioned training method can be deployed to actual hardware devices for execution, improving the engineering feasibility and application convenience of the technical solution of this application. This is because the aforementioned training method can essentially be broken down into data reading, feature construction, feature screening, model training, and result output processes executed by the processor. Therefore, by configuring a processor, memory, and corresponding program in an electronic device, the automatic execution of this training method can be achieved.
[0063] Example 3: Example of a computer-readable storage medium In some embodiments, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a training method for a transformer fault diagnosis model based on the characteristics of dissolved gases in oil as described in any of the above embodiments.
[0064] Specifically, the computer program may include data reading instructions, feature construction instructions, correlation filtering instructions, feature optimization instructions, evaluation model training instructions, target feature set determination instructions, and transformer fault diagnosis model training instructions. Using this approach, the training method of this application can be presented as a program product, improving the portability, reusability, and deployment flexibility of the technical solution. This is because the aforementioned training method can be broken down into program steps executed sequentially by the processor, such as data acquisition, feature construction, correlation filtering, feature optimization, and diagnostic model training. Therefore, by storing the corresponding program in a computer-readable storage medium, the corresponding method flow and technical effects can be reproduced on different electronic devices.
[0065] Table 6. Diagnostic accuracy of transformer fault diagnosis models corresponding to features selected by different methods
[0066] To further illustrate the diagnostic effectiveness of the transformer fault diagnosis model constructed in this embodiment, the confusion matrix of its classification results for each fault category is as follows: Figure 3 As shown.
[0067] It should be noted that the above description of the process is for illustrative purposes only and is not intended to limit the scope of this application. Those skilled in the art, inspired by the disclosure of this application, can adjust or replace the order of steps, execution methods, and combinations of some steps in the above process without departing from the technical concept and protection scope of this application.
[0068] The above embodiments are merely preferred embodiments of this application, used to illustrate the technical solutions of this application, and are not intended to limit the scope of protection of this application. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that various modifications, equivalent substitutions, and improvements can be made to the technical solutions of this application without departing from the spirit and substance of this application, and all such modifications, equivalent substitutions, and improvements should fall within the scope of protection of this application.
[0069] It should be noted that the terms "an embodiment," "a preferred embodiment," or "an optional embodiment" used in this application indicate that the specific features, structures, materials, or characteristics described in connection with that embodiment are included in at least one embodiment of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any appropriate manner in one or more embodiments.
[0070] It should also be understood that the various units, modules, or steps in this application can be implemented in hardware, software, or a combination of both. For example, the data acquisition module, initial feature construction module, correlation screening module, feature optimization module, evaluation model training module, and fault diagnosis module can be implemented by a processor executing program instructions in memory, or by dedicated circuits, programmable logic devices, or other functional components.
[0071] This application can also be implemented in the form of a computer program product, which can be stored in one or more computer-readable storage media. When executed by a processor, the computer program is used to implement all or part of the steps of the transformer fault diagnosis method based on the characteristics of dissolved gas in oil, as described in the embodiments of this application. The computer-readable storage medium can be a read-only memory, random access memory, magnetic disk, optical disk, flash memory, mobile storage device, or other media capable of storing program code.
[0072] The feature selection process, evaluation model training process, and fault diagnosis process involved in this application are only set for ease of explanation and do not constitute a strict limitation on the execution order. Without affecting the realization of the technical effect, those skilled in the art can adjust, execute in parallel, merge, or split the relevant steps.
[0073] Furthermore, it should be understood that the use of terms such as "feature input unit," "feature mapping unit," "discrimination output unit," "module," and "unit" in this application is only for distinguishing different functional or logical processing stages and does not imply any limitation on their physical structure, quantity, or deployment method. Each unit can be integrated into the same processor or device, or it can be distributed across different devices or systems for collaborative implementation.
[0074] The evaluation model, fault diagnosis model, and parameter optimization method involved in this application can be implemented in different specific forms in different embodiments. As long as they can achieve performance evaluation of the feature set to be evaluated, fault category identification of the target feature set, and obtain the corresponding technical effects, they can all be used as optional implementation methods of this application.
[0075] In summary, the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method of training a dissolved gas in oil based transformer fault diagnosis model, characterized by, The method comprises the following steps: obtaining concentration data of at least five kinds of dissolved gases in transformer oil and a transformer state label, the at least five kinds of dissolved gases including H2, C2H4, C2H2, CH4, C2H 6; The transformer state label at least includes normal state, low-energy discharge, high-energy discharge, high-temperature overheating, partial discharge, medium-low temperature overheating; an initial feature set is constructed based on the concentration data of the at least five kinds of dissolved gases, the initial feature set including a plurality of preset features, the plurality of preset features including the concentration of one or more of the dissolved gases, the ratio of the concentration of one or more of the dissolved gases to the concentration of one or more of the dissolved gases; evaluating the correlation between the plurality of preset features in the initial feature set and the operating state of the transformer, eliminating the preset features with a correlation lower than a preset threshold to obtain a candidate feature set; numbering each candidate feature in the candidate feature set; selecting the candidate features in the candidate feature set in the order of numbering to form a to-be-evaluated feature set; training an evaluation model based on the to-be-evaluated feature set, calculating the diagnostic performance index of the evaluation model, and selecting the candidate feature with the highest diagnostic performance index as the first feature in a preferred feature set and recording the diagnostic performance index of this round; in the subsequent feature selection process, the candidate features are sequentially added to the preferred feature set of the previous round in the order of the numbering of the remaining candidate features that have not been selected to form a new to-be-evaluated feature set, and the evaluation model is trained based on the new to-be-evaluated feature set, the diagnostic performance index is calculated, the candidate feature with the highest diagnostic performance index is selected and added to the preferred feature set, and the diagnostic performance index of each round is recorded; after the preferred end condition is met, the diagnostic performance indexes recorded in each round of feature selection process are compared, and the feature subset corresponding to the round with the highest diagnostic performance index is selected as the target feature set; a transformer fault diagnosis model is trained based on the concentration data corresponding to the target feature set.
2. The method of claim 1, wherein, The method comprises the following steps: each candidate feature is sequentially numbered according to the arrangement order of the candidate feature in the candidate feature set; after the candidate feature is selected into the preferred feature set, the numbering of the candidate feature that has not been selected remains unchanged.
3. The method of claim 1, wherein, The method further comprises the following steps: in the subsequent feature selection process, the candidate features that have not been selected are sequentially added to the preferred feature set determined in the previous round in the order of the numbering of the remaining candidate features to form a plurality of new to-be-evaluated feature sets; the diagnostic performance indexes corresponding to the plurality of new to-be-evaluated feature sets are calculated respectively; the candidate feature corresponding to the new to-be-evaluated feature set with the highest diagnostic performance index is selected and added to the preferred feature set determined to form a new preferred feature set.
4. The method of claim 1, wherein, The end condition is that each candidate feature in the candidate feature set has completed the construction and performance evaluation of the corresponding to-be-evaluated feature set.
5. The method of claim 1, wherein, The initial feature set includes at least part of the following 31 preset features: H2, C2H4, C2H2, CH4, C2H6, CH4 / H2, C2H2 / H2, CH4 / C2H6, C2H4 / C2H6, CH4 / C2H4, C2H6 / C2H4, C2H2 / C2H4, H2 / ALL, C2H4 / ALL, C2H2 / ALL, CH4 / ALL, C2H6 / ALL, H2 / THC, C2H4 / THC, C2H2 / THC, CH4 / THC, C2H6 / THC, (CH4+C2H2) / ALL, (CH4+C2H4) / ALL, (CH4+C2H6) / ALL, (C2H2+C2H6) / ALL, (C2H2+C2H4) / ALL, (C2H4+C2H6) / ALL, (CH4+C2H4+C2H6) / ALL, (CH4+C2H2+C2H6) / ALL, (CH4+C2H2+C2H4) / ALL; Wherein, ALL represents the sum of the concentrations of the five dissolved gases H2, CH4, C2H2, C2H4 and C2H6, and THC represents the sum of the concentrations of the four dissolved gases CH4, C2H2, C2H4 and C2H6.
6. The method according to any one of claims 1-5, characterized in that, The correlation between the plurality of preset features in the initial feature set and the transformer operating state is evaluated, and preset features with a correlation lower than a preset threshold are removed to obtain a candidate feature set, including: Based on the preset feature concentration data in the initial feature set and the transformer state label, the absolute value of the correlation coefficient between each preset feature and the transformer operating state is calculated; According to the preset features with the absolute value of the correlation coefficient greater than or equal to a preset threshold, the candidate feature set is obtained.
7. The method according to any one of claims 1-5, characterized in that, The evaluation model is trained based on the to-be-evaluated feature set, and a diagnostic performance index of the evaluation model is calculated, including: Based on the to-be-evaluated feature set, corresponding feature data is extracted, and a training sample set is formed with the corresponding transformer state label; the evaluation model is trained in a supervised learning manner to obtain model parameters; The evaluation model is used to output the prediction result of the transformer state for the input feature data; the evaluation model is verified based on cross-validation, and the diagnostic performance index is calculated according to the prediction result of cross-validation; Wherein, the diagnostic performance index is the classification accuracy of cross-validation.
8. The method according to any one of claims 1-5, characterized in that, The transformer fault diagnosis model includes: A feature input unit for receiving feature data corresponding to the target feature set; A feature mapping unit for parameterizing and mapping the feature data to obtain an intermediate representation; A discriminant output unit for outputting a fault category result based on the intermediate representation; Wherein, the transformer fault diagnosis model is trained by labeled training samples to determine the model parameters of the feature mapping unit, and outputs the corresponding fault category result for the input feature data in the inference stage.
9. An electronic device, comprising: A computer program product comprising a computer readable storage medium having computer readable program instructions embodied therewith, the computer readable program instructions comprising instructions for causing a processor to perform the method of any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, A computer readable storage medium having stored thereon a computer program, the computer program comprising instructions for causing a processor to perform the method of any one of claims 1-8.