Transformer fault diagnosis method and device, electronic equipment and storage medium

By combining boundary-balanced generative adversarial networks (GANs) with capsule networks, a data augmentation method is used to generate high-quality fault feature data. This solves the problems of lack and imbalance of transformer fault samples, and improves the accuracy and stability of transformer fault diagnosis.

CN122153447APending Publication Date: 2026-06-05ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD
Filing Date
2026-03-04
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In transformer fault diagnosis, the lack and imbalance of fault samples make it difficult to effectively advance the diagnosis, and the classification effect of artificial intelligence algorithms is affected.

Method used

A data augmentation method combining Boundary Balanced Generative Adversarial Network (BEGAN) and Capsule Network is adopted to generate high-quality feature data from a limited number of fault samples for transformer fault diagnosis training, and output data augmentation model and capsule network model.

Benefits of technology

It significantly improves the accuracy, balance, and robustness of the fault diagnosis model, reduces misdiagnosis and missed diagnosis, and enhances diagnostic accuracy and stability, especially in the diagnosis of a few types of faults.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122153447A_ABST
    Figure CN122153447A_ABST
Patent Text Reader

Abstract

The application discloses a transformer fault diagnosis method and device, electronic equipment and storage medium, and is used for solving the technical problem that the power transformer fault sample is lack and unbalanced in the current related technology, which leads to the difficulty in effectively promoting the transformer fault diagnosis. The method comprises the following steps: acquiring a sample data set of characteristic dissolved gas in real transformer oil; according to the sample data set, combining a boundary balance generative adversarial network and a capsule network, performing data enhancement-based transformer fault diagnosis training, and outputting a data enhancement model and a capsule network model; acquiring an evaluation sample of the characteristic dissolved gas, inputting the evaluation sample into the data enhancement model for sample generation, and obtaining an expanded sample; and performing transformer fault diagnosis based on the expanded sample through the capsule network model to obtain a fault diagnosis result of the characteristic dissolved gas.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of transformer fault analysis technology, and in particular to a transformer fault diagnosis method, device, electronic equipment and storage medium. Background Technology

[0002] For transformer fault diagnosis, the complex operating environment and numerous factors contribute to diverse and intricate fault scenarios. Furthermore, from a macro perspective, most power transformers operate normally for the majority of the time, with faults accounting for a small percentage in both time and number. Moreover, real-time transformer operating data is crucial for the companies or power plants to which they belong.

[0003] Even though some transformer monitoring equipment companies possess a large number of fault samples, their significant commercial value makes sharing difficult. This leads to an imbalance in the acquisition and classification of fault samples. Artificial intelligence algorithms, especially classification algorithms, heavily rely on the quantity and quality of samples. Data imbalance can significantly impact the classification performance of AI algorithms. This has always been one of the challenges in transformer fault diagnosis and even related fields of power equipment fault diagnosis. Therefore, developing an effective transformer fault sample generation technology is key to solving these problems. Summary of the Invention

[0004] This invention provides a method, apparatus, electronic device, and storage medium for diagnosing transformer faults, which solves or partially solves the technical problem of the lack and imbalance of power transformer fault samples in current related technologies, making it difficult to effectively advance transformer fault diagnosis.

[0005] This invention provides a transformer fault diagnosis method, the method comprising:

[0006] Obtain a sample dataset of characteristic dissolved gases in real transformer oil;

[0007] Based on the sample dataset, a data-augmented transformer fault diagnosis training is performed by combining a boundary-balanced generative adversarial network and a capsule network, and the data-augmented model and the capsule network model are output.

[0008] A sample of the characteristic dissolved gas to be evaluated is obtained, and the sample is input into the data augmentation model to generate an expanded sample.

[0009] Based on the expanded sample, transformer fault diagnosis is performed using the capsule network model to obtain the fault diagnosis results of the characteristic dissolved gas.

[0010] Optionally, the step of training a data-augmented transformer fault diagnosis model based on the sample dataset, combining a boundary-balanced generative adversarial network and a capsule network, and outputting a data-augmented model and a capsule network model includes:

[0011] The samples in the dataset are normalized and divided into a training set and a test set according to a preset ratio.

[0012] The boundary-balanced generative adversarial network is trained with data augmentation based on the sample training set. When the sample generation set generated during the data augmentation training passes the sample quality evaluation, the data augmentation model and the sample generation set are output.

[0013] The capsule network is trained for transformer fault diagnosis using the training set and the generated set, and its performance is tested using the test set. When the performance test results are passed, the capsule network model is output.

[0014] Optionally, the step of performing data augmentation training on the boundary-balanced generative adversarial network based on the sample training set, and outputting the data augmentation model and the sample generation set when the sample generation set generated during the data augmentation training passes the sample quality evaluation, includes:

[0015] Various types of fault samples are extracted from the aforementioned training set as data augmentation training sets;

[0016] The data augmentation training set is used as the real data input for the boundary-balanced generative adversarial network, and sample data is generated based on preset model parameters to obtain a sample generation set.

[0017] The sample quality of the generated sample set is evaluated based on the data augmentation training set.

[0018] When the sample quality assessment is passed, the boundary-balanced generative adversarial network is output as a data augmentation model, and the sample generation set is output.

[0019] Optionally, the step of evaluating the sample quality of the generated sample set based on the data augmentation training set includes:

[0020] Calculate the divergence index value of the data distributions of the generated sample set and the data augmentation training set;

[0021] When the divergence index value is less than the preset divergence threshold, the sample generation set is determined to have passed the sample quality assessment.

[0022] When the divergence index value is greater than or equal to the preset divergence threshold, the sample generation set is determined to have failed the sample quality assessment.

[0023] Optionally, the method further includes:

[0024] When the sample quality assessment fails, the model parameters of the boundary balance generative adversarial network are fine-tuned based on the sample quality assessment results, and a new sample generation set is regenerated based on the adjusted boundary balance generative adversarial network.

[0025] The sample quality of the new sample generation set is evaluated again based on the data augmentation training set.

[0026] When the final generated sample set passes the sample quality evaluation, the final boundary-balanced generative adversarial network is output as a data augmentation model, and the final generated sample set is output.

[0027] Optionally, the step of training the capsule network for transformer fault diagnosis based on the sample training set and the sample generation set includes:

[0028] The sample training set is expanded using the generated sample set to obtain an expanded training set;

[0029] The capsule network is trained for transformer fault diagnosis based on the expanded training set.

[0030] During model training, the model parameters of the capsule network are continuously optimized based on the fault diagnosis results of the current round to obtain the trained capsule network.

[0031] Optionally, the step of using the sample test set to perform performance testing on the trained capsule network, and outputting the capsule network model when the performance test result passes, includes:

[0032] The trained capsule network is used to diagnose transformer faults on the sample test set, and the results of the transformer fault diagnosis are evaluated to obtain the evaluation performance index value.

[0033] When the evaluation performance index value is less than or equal to the preset performance index value, the trained capsule network is output as a capsule network model for transformer fault diagnosis.

[0034] When the evaluation performance index value is greater than the preset performance index value, the model parameters of the trained capsule network are fine-tuned until the evaluation performance index value is less than or equal to the preset performance index value.

[0035] The present invention also provides a transformer fault diagnosis device, the device comprising:

[0036] The data acquisition unit is used to acquire a sample dataset of characteristic dissolved gases in real transformer oil;

[0037] The model training unit is used to train a data-augmented transformer fault diagnosis model based on the sample dataset, combining a boundary-balanced generative adversarial network and a capsule network, and outputting a data-augmented model and a capsule network model.

[0038] The sample generation unit is used to acquire the sample to be evaluated of the characteristic dissolved gas, input the sample to be evaluated into the data augmentation model to generate an expanded sample;

[0039] The fault diagnosis unit is used to perform transformer fault diagnosis based on the expanded sample and through the capsule network model to obtain the fault diagnosis results of the characteristic dissolved gas.

[0040] The present invention also provides an electronic device, the device comprising a processor and a memory:

[0041] The memory is used to store program code and transmit the program code to the processor;

[0042] The processor is used to execute the transformer fault diagnosis method as described above, according to the instructions in the program code.

[0043] The present invention also provides a computer-readable storage medium for storing program code for performing the transformer fault diagnosis method as described in any of the preceding claims.

[0044] As can be seen from the above technical solutions, the present invention has the following advantages:

[0045] A transformer fault diagnosis method based on boundary-balanced generative adversarial networks (GANs) and data augmentation is proposed to learn and generate high-quality fault feature data from a limited set of fault samples, addressing the issues of insufficient and imbalanced fault samples in power transformers. In the model training phase, a sample dataset of characteristic dissolved gases in real transformer oil is first obtained. Then, based on this dataset, a data augmentation-based transformer fault diagnosis training is performed using a boundary-balanced GAN and a capsule network, outputting both the data augmentation model and the capsule network model. In the practical fault diagnosis application phase, a small number of samples of characteristic dissolved gases to be evaluated are first obtained and input into the data augmentation model to generate expanded samples. Then, based on these expanded samples, the capsule network model is used for transformer fault diagnosis to obtain the fault diagnosis results for the characteristic dissolved gases.

[0046] The technical solution provided by this invention utilizes data generated by a boundary-balanced generative adversarial network for training, which can significantly improve the accuracy, balance, and robustness of a fault diagnosis model. This effectively verifies the effectiveness of generated data in improving model performance, especially in addressing data imbalance and scarcity issues. On one hand, generated data helps the model more accurately identify and classify transformer faults, thereby effectively reducing misdiagnosis and missed diagnosis and improving diagnostic accuracy. On the other hand, by combining data augmentation and fault diagnosis with real data for joint training, the model's performance across various fault categories becomes more balanced and stable, particularly with a significant improvement in its diagnostic ability for minority faults. Simultaneously, generated data enhances the model's classification ability on both positive and negative samples, significantly improving its robustness in handling different types of faults. Furthermore, generated data plays a crucial role in addressing data scarcity or imbalance, providing the model with richer and more diverse training samples, thereby further optimizing the model's overall performance. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. 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.

[0048] Figure 1 This is a flowchart of the steps in a transformer fault diagnosis method;

[0049] Figure 2 This is an example of a box plot;

[0050] Figure 3 A simplified flowchart illustrating a data-augmented transformer fault diagnosis training process;

[0051] Figure 4 This is a schematic diagram of the overall process of a transformer fault diagnosis method.

[0052] Figure 5 This is a box plot comparison diagram of the generated data Q and the original data P in Example 1, categorized by fault type.

[0053] Figure 6 This is a schematic diagram comparing the generated data Q and the original data P according to the fault type PCA in Example 1;

[0054] Figure 7 This is a schematic diagram illustrating the loss variation with different amounts of generated data added in Example 2;

[0055] Figure 8This is a schematic diagram of the confusion matrix of diagnostic results on the test set for different amounts of generated data in Example 2;

[0056] Figure 9 This is a structural block diagram of a transformer fault diagnosis device. Detailed Implementation

[0057] This invention provides a transformer fault diagnosis method, apparatus, electronic device, and storage medium to solve or partially solve the technical problem in current related technologies where the lack and imbalance of power transformer fault samples makes it difficult to effectively advance transformer fault diagnosis.

[0058] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0059] As an example, transformer fault diagnosis is complex and varied due to the complex operating environment and numerous influencing factors. Furthermore, from a macro perspective, most power transformers operate normally for the majority of the time, with faults occurring only a small percentage in both time and number. Moreover, real-time transformer operating data is crucial for the companies or power plants to which they belong.

[0060] Even though some transformer monitoring equipment companies possess a large number of fault samples, their significant commercial value makes sharing difficult. This leads to an imbalance in the acquisition and classification of fault samples. Artificial intelligence algorithms, especially classification algorithms, heavily rely on the quantity and quality of samples. Data imbalance can significantly impact the classification performance of AI algorithms. This has always been one of the challenges in transformer fault diagnosis and even related fields of power equipment fault diagnosis. Therefore, developing an effective transformer fault sample generation technology is key to solving these problems.

[0061] Therefore, one of the core inventive points of this invention is to propose a transformer fault diagnosis method based on Boundary Equilibrium GAN (BEGAN) data augmentation, addressing the shortcomings of current technologies. By utilizing BEGAN to learn and generate high-quality fault feature data from limited fault samples, this method solves the problems of insufficient and unbalanced fault samples in power transformers. In the model training phase, a sample dataset of characteristic dissolved gases in real transformer oil is first obtained. Then, based on this dataset, the Boundary Equilibrium GAN and capsule network are combined to perform data augmentation-based transformer fault diagnosis training, outputting a data augmentation model and a capsule network model. In the practical fault diagnosis application phase, a small number of samples of characteristic dissolved gases to be evaluated are first obtained. These samples are input into the data augmentation model to generate expanded samples. Then, based on these expanded samples, the capsule network model is used for transformer fault diagnosis to obtain fault diagnosis results for the characteristic dissolved gases.

[0062] Reference Figure 1 The diagram illustrates a flowchart of a transformer fault diagnosis method provided by an embodiment of the present invention, which may specifically include the following steps:

[0063] Step 101: Obtain a sample dataset of characteristic dissolved gases in real transformer oil;

[0064] In the specific implementation, the first step is to obtain a sample dataset of characteristic dissolved gases in transformer oil, i.e., real DGA (Dissolved Gas Analysis) data. In this embodiment of the invention, considering the sufficient number of samples under normal conditions, these are excluded, and the focus is primarily on generating data for the characteristic dissolved gases H2, CH4, C2H6, C2H4, and C2H2 under six different fault states (low-temperature overheating, medium-temperature overheating, high-temperature overheating, partial discharge, low-energy discharge, and high-energy discharge). It should be noted that for other dissolved gases in transformer oil that need to be analyzed, and other possible fault states, the analysis can be performed using the method provided in this embodiment of the invention. It is understood that this invention does not impose any limitations on these aspects.

[0065] Step 102: Based on the sample dataset, train a transformer fault diagnosis model based on data augmentation by combining a boundary-balanced generative adversarial network and a capsule network, and output the data augmentation model and the capsule network model.

[0066] To enable those skilled in the art to better understand the technical solution of the present invention, the evaluation indicators of the generated data used in the embodiments of the present invention will be explained before introducing the transformer fault diagnosis training process.

[0067] In this embodiment of the invention, the evaluation metrics used for the generated data mainly include KL (Kullback-Leibler) divergence and JS (Jensen-Shannon) divergence. Both KL and JS divergences measure the difference between the probability distributions of the real data distribution and the generated data distribution, and can be used to evaluate the quality of data generated by generative adversarial networks. These two divergence metrics provide different perspectives on measuring the similarity or difference between the generated data distribution and the real data distribution.

[0068] Specifically, KL divergence, also known as relative entropy, measures the difference between two probability distributions P and Q. The formula for calculating KL divergence is:

[0069] (1)

[0070] The KL divergence is asymmetric, that is:

[0071] (2)

[0072] Here, P and Q represent two probability distributions: P represents the distribution of the actual data, and Q represents the distribution of the data generated by the generator; x represents the possible values ​​of the random variable, which is a specific value in the discrete case and a range in the continuous case. P(x) represents the probability of x taking a value in distribution P; Q(x) represents the probability of x taking a value in distribution Q. The KL divergence value represents the log-likelihood ratio of P(x) to Q(x), reflecting the amount of information lost when attempting to represent or simulate distribution P using distribution Q. A smaller KL divergence value indicates a greater similarity between the two distributions.

[0073] JS divergence is a symmetric version of KL divergence. It is used to measure the similarity between two probability distributions. JS divergence solves the asymmetry problem of KL divergence and is always bounded (between 0 and 1), making it more suitable as an indicator for comparing the similarity between two distributions. The definition of JS divergence is as follows:

[0074] (3)

[0075] in, Let M represent the mean distributions of P and Q. The difference between P and Q is measured by calculating the average KL divergence of P and Q relative to their mean distributions M. The smaller the KL divergence value, the more similar the two distributions are.

[0076] In data visualization, a box plot is a standardized method for displaying the distribution of data, showing the maximum, minimum, median, and upper and lower quartiles. For example, Figure 2An example box plot is shown. The significance of box plots lies in quickly identifying the center location, dispersion, skewness, and outliers of data. When interpreting a box plot, the following key elements need to be understood:

[0077] (1) Number line, the unit of measurement is consistent with the unit of the data batch.

[0078] (2) A rectangular box, with the positions of the two ends corresponding to the upper and lower quartiles Q1 and Q3 of the data batch, respectively, and the line inside the rectangle is the median line.

[0079] (3) The two line segments at Q3+1.5IQR (interquartile range) and Q1-1.5IQR are outlier cutoff points, called the inner limits. The two line segments at Q3+3IQR and Q1-3IQR are called the outer limits. Data represented by points outside the inner limits are all outliers.

[0080] (4) Extend a line segment outward from each end of the rectangular box until the farthest point that is not an outlier, representing the distribution range of normal values ​​in this batch of data.

[0081] (5) Mark outliers with “*”. Data points with the same value are marked on the same data line, and data points with different values ​​are marked on different data lines.

[0082] Based on the preceding information, the following combines... Figure 3 This paper describes the training process for transformer fault diagnosis based on BEGAN data augmentation.

[0083] In its specific implementation, the training process for transformer fault diagnosis based on BEGAN data augmentation is as follows: Based on the sample dataset, a data augmentation-based transformer fault diagnosis training is performed by combining a boundary-balanced generative adversarial network (BGA) and a capsule network, outputting a data augmentation model and a capsule network model. The implementation process may include the following steps S1 to S3:

[0084] Step S1: Normalize each sample in the sample dataset and divide it into a training set and a test set according to a preset ratio.

[0085] The first step is data preparation and normalization. For a pre-prepared dataset D of characteristic dissolved gases in real transformer oil, the discrete normalization method is used to normalize each variable in the dataset D to [0, 1].

[0086] Next, all normalized real data samples are divided into a training set and a test set, with a ratio of 80% and 20%, respectively.

[0087] Step S2: Perform data augmentation training on the boundary balance generative adversarial network based on the sample training set, and output the data augmentation model and the sample generation set when the sample generation set generated during the data augmentation training passes the sample quality evaluation.

[0088] In this embodiment of the invention, data augmentation training is performed using the Boundary Balanced Generative Adversarial Network (BEGAN) based on the sample training set.

[0089] The Boundary Balanced Generative Adversarial Network (BEGAN) mainly includes a generator G, a discriminator D, and an encoder E. Its execution principle is roughly as follows: the generator G receives a latent vector z (random noise, referring to random, low-dimensional input signals) and generates a sample G(z); the discriminator simultaneously receives real data samples x and generated samples G(z), outputting a discrimination result G(z) → D(G(z)), x → D(x), which is the probability of determining whether the discriminator's input is real data; the encoder E receives the generated sample G(z), generates a latent vector z', and compares it with the input latent vector z to calculate the reconstruction loss.

[0090] In this embodiment of the invention, considering the imbalance of sample categories in the dataset, the fewer fault samples of each category in the sample training set are used as the data augmentation training set.

[0091] The data augmentation training set is used as the real data input for the Boundary Balanced Generative Adversarial Network (BEGAN). Data generated by the BEGAN with pre-set parameters (e.g., defining initial hyperparameters gamma = 0.75; lambda_k = 0.001; k = 0.0, which are subsequently corrected based on the divergence determination results) is used to supplement the small number of various fault samples.

[0092] Next, sample quality is evaluated based on the generated data and the real data (i.e., the data-augmented training set). Specifically, the sample data quality is evaluated based on the two divergence metrics (KL divergence and JS divergence) introduced earlier. When the evaluation criteria are met (e.g., both divergence metrics meet their corresponding minimum threshold conditions), an expanded training set is constructed based on the generated sample data and the fault diagnosis sample training set. Otherwise, the Boundary Balanced Generative Adversarial Network (BEGAN) is fine-tuned based on the training results until it meets the evaluation criteria.

[0093] Furthermore, the boundary-balanced generative adversarial network is trained with data augmentation based on the sample training set. When the sample generation set generated during the data augmentation training passes the sample quality evaluation, the implementation process of the data augmentation model and the sample generation set is output, including the following steps S21 to S24:

[0094] Step S21: Extract various types of fault samples from the sample training set as data augmentation training sets;

[0095] Step S22: Use the data augmentation training set as the real data input for the boundary-balanced generative adversarial network, and generate sample data based on the preset model parameters to obtain the sample generation set;

[0096] Step S23: Evaluate the sample quality of the generated sample set based on the data augmentation training set;

[0097] Specifically, the sample quality assessment of the generated sample set based on the data augmentation training set may include: calculating the divergence index (including KL divergence and JS divergence) of the data distributions of the generated sample set and the data augmentation training set; in one case, when the divergence index value is less than a preset divergence threshold, the generated sample set is determined to have passed the sample quality assessment; in another case, when the divergence index value is greater than or equal to the preset divergence threshold, the generated sample set is determined to have failed the sample quality assessment.

[0098] Step S24: When the sample quality assessment is passed, output the boundary-balanced generative adversarial network as a data augmentation model and output the sample generation set.

[0099] In the first case, when the sample quality assessment is passed, the output boundary-balanced generative adversarial network is used as a data augmentation model and outputs a sample generation set.

[0100] In the second scenario, when the sample quality assessment fails, the model parameters of the boundary-balanced generative adversarial network are fine-tuned based on the sample quality assessment results, and a new sample generation set is regenerated based on the adjusted boundary-balanced generative adversarial network. The sample quality of the new sample generation set is then assessed again based on the data augmentation training set. The sample quality assessment and model parameter fine-tuning process is repeated. When the final generated sample generation set passes the sample quality assessment, the final boundary-balanced generative adversarial network is output as the data augmentation model, and the final generated sample generation set is also output.

[0101] Step S3: Train the capsule network for transformer fault diagnosis based on the sample training set and the sample generation set, and perform performance testing on the trained capsule network using the sample test set. When the performance test results are passed, output the capsule network model.

[0102] To enable those skilled in the art to better understand the technical solution of this invention, a brief description of the capsule network used in transformer fault diagnosis is provided. The capsule network framework mainly includes an input layer, a primary capsule layer, a dynamic routing layer, and an output layer.

[0103] The input layer receives the raw data to be processed, such as the diagnostic sample (in image form) of the characteristic dissolved gas in this embodiment of the invention. Unlike traditional CNNs (Convolutional Neural Networks), the input layer of the capsule network is a simple linear layer that directly maps image pixels to low-dimensional vectors.

[0104] The primary capsule layer consists of multiple capsules, each responsible for detecting specific features (such as edges, textures, etc. of the image sample to be evaluated). The output of each capsule is a vector, rather than a single scalar value. The length of the vector represents the probability of the feature's presence, and the direction of the vector represents the feature's attributes (such as position, orientation, etc.).

[0105] Dynamic routing is the core mechanism of capsule networks, used to pass the outputs of lower-level capsules to higher-level capsules. Unlike the fixed weights of traditional CNNs, dynamic routing learns how to combine lower-level features into a complete representation of higher levels through iterative optimization. The goal of dynamic routing is to maximize the output vector length of the target capsule while minimizing the output of the background capsule.

[0106] The output layer consists of one or more capsules, representing the final classification result. The vector length of the output capsule represents the probability of classification, and the direction of the vector represents the classification attribute.

[0107] In this embodiment of the invention, the capsule network is trained for transformer fault diagnosis using a sample training set and a sample generation set, and the performance of the trained capsule network is tested using a sample test set. When the performance test results are satisfactory, the capsule network model is output. Specifically, the generated data samples and the fault diagnosis training set are used together to expand the training set, and the expanded training set is used to train the capsule network model.

[0108] In the specific implementation, the process of training the capsule network for transformer fault diagnosis based on the sample training set and the sample generation set includes the following steps S31 to S33:

[0109] Step S31: Expand the sample training set using the sample generation set to obtain the expanded training set;

[0110] Step S32: Train the capsule network for transformer fault diagnosis based on the expanded training set;

[0111] Step S33: During model training, continuously optimize the model parameters of the capsule network based on the fault diagnosis results of the current round to obtain the trained capsule network.

[0112] After training the capsule network, the trained capsule network model can be used to diagnose faults on the sample test set and the diagnostic effect can be evaluated.

[0113] Furthermore, the trained capsule network is tested using a sample test set. When the performance test results are satisfactory, the implementation process of the capsule network model is output. Specifically, this may include: using the trained capsule network to diagnose transformer faults on the sample test set, evaluating the transformer fault diagnosis results, and obtaining an evaluation performance index value; in one case, when the evaluation performance index value is less than or equal to a preset performance index value, the trained capsule network is output as the capsule network model for transformer fault diagnosis; in another case, when the evaluation performance index value is greater than the preset performance index value, the model parameters of the trained capsule network are fine-tuned until the evaluation performance index value is less than or equal to the preset performance index value.

[0114] Step 103: Obtain the sample to be evaluated of the characteristic dissolved gas, input the sample to be evaluated into the data augmentation model to generate an expanded sample;

[0115] Through the aforementioned steps, a data augmentation model for expanding the sample and a capsule network model for transformer fault diagnosis based on the expanded sample can be obtained. In practical applications, a sample of the characteristic dissolved gas to be evaluated can be obtained, and the sample to be evaluated can be input into the data augmentation model to generate an expanded sample for subsequent fault diagnosis.

[0116] Step 104: Based on the expanded sample, perform transformer fault diagnosis through the capsule network model to obtain the fault diagnosis results of the characteristic dissolved gas.

[0117] Based on expanded samples, the capsule network model obtained after training can be used for transformer fault diagnosis to obtain fault diagnosis results for characteristic dissolved gases. For example, it can quickly diagnose a certain characteristic dissolved gas in a low-temperature overheating fault state.

[0118] This invention proposes a transformer fault diagnosis method based on boundary-balanced generative adversarial network (BEGAN) data augmentation. By utilizing BEGAN to learn and generate high-quality fault feature data from a limited set of fault samples, the method addresses the problems of insufficient and imbalanced fault samples in power transformers. In the model training phase, a sample dataset of characteristic dissolved gases in real transformer oil is first obtained. Then, based on this dataset, a data augmentation-based transformer fault diagnosis training is performed using a boundary-balanced generative adversarial network and a capsule network, outputting a data augmentation model and a capsule network model. In the practical fault diagnosis application phase, a small number of samples of characteristic dissolved gases to be evaluated are first obtained. These samples are then input into the data augmentation model to generate expanded samples. Finally, based on these expanded samples, transformer fault diagnosis is performed using the capsule network model to obtain fault diagnosis results for the characteristic dissolved gases.

[0119] Implementing the technical solution provided by this invention, training with data generated by BEGAN can significantly improve the accuracy, balance, and robustness of fault diagnosis models, thereby effectively verifying the effectiveness of generated data in improving model performance, especially in addressing data imbalance and scarcity issues. On one hand, generated data helps the model more accurately identify and classify transformer faults, effectively reducing misdiagnosis and missed diagnosis, and improving diagnostic accuracy. On the other hand, by combining data augmentation and fault diagnosis with real data for joint training, the model's performance across various fault categories becomes more balanced and stable, particularly with a significant improvement in diagnostic capabilities for minority fault classes. Simultaneously, generated data can enhance the model's classification ability on both positive and negative samples, significantly improving its robustness in handling different types of faults. Furthermore, generated data plays a crucial role in addressing data scarcity or imbalance, providing the model with richer and more diverse training samples, thereby further optimizing the model's overall performance.

[0120] For better illustration, refer to Figure 4 This diagram illustrates the overall flow of a transformer fault diagnosis method provided by an embodiment of the present invention. It should be noted that this embodiment only provides a brief description of the general flow of transformer fault diagnosis. The specific implementation process of each step can be understood by referring to the relevant content in the foregoing embodiments, and will not be elaborated upon here. It is understood that the present invention does not impose any limitations on this.

[0121] Step 401: Obtain a sample dataset of characteristic dissolved gases in real transformer oil, normalize each sample in the sample dataset, and divide it into a sample training set and a sample test set according to a preset ratio.

[0122] Step 402: Extract various fault samples from the sample training set as the data augmentation training set, use the data augmentation training set as the real data input for the boundary balance generative adversarial network, and generate sample data based on the preset model parameters to obtain the sample generation set;

[0123] Step 403: Evaluate the sample quality based on the generated sample set and the data augmentation training set. When the sample quality evaluation is passed, output the boundary-balanced generative adversarial network as the data augmentation model, and output the generated sample set at the same time.

[0124] Step 404: Expand the sample training set using the sample generation set to obtain the expanded training set. Train the capsule network for transformer fault diagnosis based on the expanded training set. During the training process, continuously optimize the model parameters of the capsule network based on the fault diagnosis results of the current round to obtain the trained capsule network.

[0125] Step 405: Use the sample test set to perform performance testing on the trained capsule network. When the performance test results are satisfactory, output the capsule network model.

[0126] Step 406: Obtain the sample of characteristic dissolved gas to be evaluated, input the sample to be evaluated into the data augmentation model to generate the sample, obtain the expanded sample, and based on the expanded sample, perform transformer fault diagnosis through the capsule network model to obtain the fault diagnosis result of characteristic dissolved gas.

[0127] To enable those skilled in the art to better understand the technical solutions of the present invention, the embodiments of the present invention are described below through two specific examples.

[0128] Example 1: Comparison of generated data and original data

[0129] Since the number of samples under normal conditions is sufficient, they are excluded. The focus is on generating data for five characteristic dissolved gases—H2, CH4, C2H6, C2H4, and C2H2—under six different fault conditions (low-temperature overheating, medium-temperature overheating, high-temperature overheating, partial discharge, low-energy discharge, and high-energy discharge). This example compares and analyzes the similarity between the generated data Q and the original data P by comprehensively using box plots and PCA scatter plots. For example, Figure 5 The diagram shows a comparison of the generated data Q and the original data P by fault type in Example 1.

[0130] in, Figure 5 The box plots are obtained by randomly drawing the same number of samples (300 each) from the original data P and the generated data Q, and are represented by blue and yellow respectively. It can be seen that there are some small differences between the generated data Q and the original data P. For example, in the low-temperature overheating fault, the upper quartile of CH4 is larger in the generated data Q than in the original data P. Analysis suggests that this is because generative adversarial networks do not simply replicate data and involve a degree of randomness. Additionally, this may also be because the distribution of CH4 in the original low-temperature overheating fault samples is relatively dispersed, thus the patterns learned by the network are not significant.

[0131] Overall, across all fault types and for all gas data distributions, the container positions of the generated data Q and the original data P are not significantly different. Furthermore, the upper and lower boundaries of the container represent the upper and lower quartiles, respectively, indicating the central concentration areas of the data, suggesting a high degree of similarity between the generated and original data.

[0132] Figure 6 This diagram illustrates a comparison of generated data Q and original data P by fault type using PCA in Example 1. In this example, equal numbers of original and generated data were randomly selected for principal component analysis (PCA). Figure 6As can be seen, for different fault types, the principal component analysis plots of the generated data Q and the original data P show that the distribution and contours of the scatter points in the principal component space after dimensionality reduction are very similar, with a high degree of overlap. Furthermore, the scatter points of the generated data are scattered, and intuitively, simple linear relationships are rarely observed. This also reflects the high quality of the generated data Q.

[0133] In addition, this example also calculates the KL divergence and JS divergence of the generated data Q and the original data P for different fault state categories, as well as the overall data. The results are shown in Table 1.

[0134] Table 1: KL divergence and JS divergence between generated data Q and original data P

[0135]

[0136] As shown in Table 1, the KL divergence and JS divergence for different fault state categories, as well as the overall divergence, are at low levels. This indicates that the generated data Q produced through the embodiments of the present invention is of high quality.

[0137] Example 2: The impact of different amounts of generated data on diagnostic results

[0138] Considering that generating more data with less training data could lead to overfitting, the reason is that the generated data becomes highly similar to the training samples instead of learning the underlying distribution that can generalize to new instances. This means that the generated data may lack diversity and novelty. Therefore, this example keeps the amount of generated data below the amount of original data. Specifically, the number of generated data for each category other than the NS normal state is set at 300. This setting not only helps to balance data quality and quantity, avoiding data homogeneity problems caused by over-generation, but also provides richer and more diverse data samples for model training while maintaining the data distribution characteristics. If the number of additional samples is customized according to the original sample size of each class, for example, adding 300 samples for the LD low-energy discharge state and 100 samples for the LT low-temperature overheating state, although it can more accurately balance the sample size of each fault class, this method may increase the complexity of operation and, to some extent, ignore the essence of model learning, that is, learning more general rules from limited data variations. Adding 300 samples at once can increase the amount of data for classes with fewer samples, while avoiding the introduction of too much human bias, thus better evaluating the model's adaptability to changes in the amount of data.

[0139] Since 300 samples were generated for each fault type, four experimental groups were set up to investigate the effect of the generated data on the fault diagnosis model. The first group did not add any generated data, and the next three groups successively added 1 / 3 of the generated data to each fault type sample. That is, the fourth experimental group added all generated samples to the training set. The test set used only the original real fault samples. To control for variables, the test set remained unchanged. The number of samples of different fault types in the training set used in this example is shown in Table 2.

[0140] Table 2: Data volume of fault samples in different training sets

[0141]

[0142] For example, Figure 7 The diagram illustrates the loss variation with different amounts of generated data added in Example 2. Figure 7 It is evident that with the addition of generated fault data, the imbalance of the original fault samples is reduced, the loss function of the fault diagnosis model converges faster, and its value is also lower.

[0143] In the table, NS (Normal State) represents normal operation; LT (Low Temperature) represents low temperature overheating fault state; MT (Medium Temperature) represents medium temperature overheating fault state; HT (High Temperature) represents medium temperature overheating fault state; PD (Partial Discharge) represents partial discharge fault state; LD (Light Load) represents light load fault state, i.e., low energy discharge fault state; and HD (Heavy Load) represents heavy load fault state, i.e., high energy discharge fault state.

[0144] Finally, the trained model was used to perform fault diagnosis on the proprietary test data set to obtain... Figure 8 The diagram shows the confusion matrix of diagnostic results on the test set with different amounts of generated data.

[0145] IEC TC 10 data was used as the training set. Compared to not using generated data, the diagnostic accuracy of the model improved from 0.9402 to 0.9658 after using the data generated by BEGAN. This indicates that the generated data can help the model more accurately identify and classify faults, reducing false positives and false negatives. The macro F1 score of the model using the generated data improved from 0.9186 to 0.9520. The improvement in the macro F1 score indicates that the model's performance across fault categories is more balanced and stable, performing well not only in the majority class but also in the minority class. The G-mean score of the model using the generated data improved from 0.8255 to 0.9551. The significant improvement in the G-mean score indicates that the model's classification ability on both positive and negative samples is more balanced, and the generated data enhances the model's robustness in handling different types of faults.

[0146] Overall, using data generated by BEGAN as the training set significantly improved the performance metrics of the fault diagnosis model, demonstrating the effectiveness of generated data in enhancing model accuracy, balance, and robustness. This further validates the important role of data augmentation techniques in machine learning model training, particularly in addressing data scarcity or imbalance issues such as fault diagnosis.

[0147] Reference Figure 9 The diagram illustrates a structural block diagram of a transformer fault diagnosis device provided in an embodiment of the present invention, which may specifically include:

[0148] The data acquisition unit 901 is used to acquire a sample dataset of characteristic dissolved gases in real transformer oil;

[0149] The model training unit 902 is used to train a transformer fault diagnosis model based on data augmentation by combining a boundary-balanced generative adversarial network and a capsule network based on the sample dataset, and output the data augmentation model and the capsule network model.

[0150] The sample generation unit 903 is used to acquire the sample to be evaluated of the characteristic dissolved gas, input the sample to be evaluated into the data augmentation model to generate an expanded sample;

[0151] The fault diagnosis unit 904 is used to perform transformer fault diagnosis based on the expanded sample and through the capsule network model to obtain the fault diagnosis result of the characteristic dissolved gas.

[0152] In one alternative embodiment, the model training unit 902 includes:

[0153] The data partitioning unit is used to normalize each sample in the sample dataset and divide it into a sample training set and a sample test set according to a preset ratio.

[0154] The data augmentation training unit is used to perform data augmentation training on the boundary balance generative adversarial network based on the sample training set, and outputs the data augmentation model and the sample generation set when the sample generation set generated during the data augmentation training passes the sample quality evaluation.

[0155] The fault diagnosis training unit is used to train the capsule network for transformer fault diagnosis based on the sample training set and the sample generation set, and to perform performance testing on the trained capsule network using the sample test set. When the performance test results are passed, the capsule network model is output.

[0156] In one alternative embodiment, the data augmentation training unit includes:

[0157] The sample extraction unit is used to extract various types of fault samples from the sample training set as a data augmentation training set.

[0158] The sample data generation unit is used to take the data augmentation training set as the real data input of the boundary-balanced generative adversarial network, and generate sample data based on preset model parameters to obtain a sample generation set.

[0159] A sample quality assessment unit is used to assess the sample generation set based on the data augmentation training set.

[0160] The sample generation set output unit is used to output the boundary-balanced generative adversarial network as a data augmentation model and output the sample generation set when the sample quality assessment is passed.

[0161] In one optional embodiment, the sample quality assessment unit includes:

[0162] A divergence index calculation unit is used to calculate the divergence index value of the data distribution between the sample generation set and the data augmentation training set;

[0163] The sample quality assessment is performed by a judgment unit, which determines that the sample generation set passes the sample quality assessment when the divergence index value is less than a preset divergence threshold.

[0164] The sample quality assessment failure determination unit is used to determine that the sample generation set has failed the sample quality assessment when the divergence index value is greater than or equal to a preset divergence threshold.

[0165] In one alternative embodiment, the device further includes:

[0166] The model parameter fine-tuning unit is used to fine-tune the model parameters of the boundary balance generative adversarial network based on the sample quality assessment results when the sample quality assessment fails, and to regenerate a new sample generation set based on the adjusted boundary balance generative adversarial network.

[0167] The sample quality secondary evaluation unit is used to evaluate the sample quality of the new sample generation set again based on the data augmentation training set.

[0168] The final output unit of the sample generation set is used to output the final boundary-balanced generative adversarial network as a data augmentation model when the final generated sample set passes the sample quality evaluation, and output the final generated sample set.

[0169] In one optional embodiment, the fault diagnosis training unit includes:

[0170] The sample set expansion unit is used to expand the sample training set using the sample generation set to obtain an expanded training set.

[0171] The fault diagnosis training execution unit is used to perform transformer fault diagnosis training on the capsule network based on the expanded training set.

[0172] The model parameter optimization unit is used to continuously optimize the model parameters of the capsule network based on the fault diagnosis results of the current round during the model training process, so as to obtain the trained capsule network.

[0173] In one optional embodiment, the fault diagnosis training unit includes:

[0174] The fault diagnosis and evaluation unit is used to perform transformer fault diagnosis on the sample test set through the trained capsule network, evaluate the transformer fault diagnosis results, and obtain evaluation performance index values.

[0175] The capsule network model output unit is used to output the trained capsule network as a capsule network model for transformer fault diagnosis when the evaluation performance index value is less than or equal to the preset performance index value.

[0176] The network parameter fine-tuning unit is used to fine-tune the model parameters of the trained capsule network when the evaluation performance index value is greater than the preset performance index value, until the evaluation performance index value is less than or equal to the preset performance index value.

[0177] As the device embodiment is basically similar to the method embodiment, it is described in a relatively simple way. For relevant details, please refer to the description of the method embodiment above.

[0178] This invention also provides an electronic device, which includes a processor and a memory:

[0179] The memory is used to store program code and transfer the program code to the processor;

[0180] The processor is used to execute the transformer fault diagnosis method of any embodiment of the present invention according to the instructions in the program code.

[0181] This invention also provides a computer-readable storage medium for storing program code for executing the transformer fault diagnosis method of any embodiment of this invention.

[0182] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0183] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this invention are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0184] In the embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units through some interfaces, and may be electrical, mechanical, or other forms.

[0185] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0186] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0187] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0188] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for diagnosing transformer faults, characterized in that, include: Obtain a sample dataset of characteristic dissolved gases in real transformer oil; Based on the sample dataset, a data-augmented transformer fault diagnosis training is performed by combining a boundary-balanced generative adversarial network and a capsule network, and the data-augmented model and the capsule network model are output. A sample of the characteristic dissolved gas to be evaluated is obtained, and the sample is input into the data augmentation model to generate an expanded sample. Based on the expanded sample, transformer fault diagnosis is performed using the capsule network model to obtain the fault diagnosis results of the characteristic dissolved gas.

2. The transformer fault diagnosis method according to claim 1, characterized in that, The step involves training a data-augmented transformer fault diagnosis model based on the sample dataset, combining a boundary-balanced generative adversarial network (GAN) and a capsule network, and outputting a data-augmented model and a capsule network model, including: The samples in the dataset are normalized and divided into a training set and a test set according to a preset ratio. The boundary-balanced generative adversarial network is trained with data augmentation based on the sample training set. When the sample generation set generated during the data augmentation training passes the sample quality evaluation, the data augmentation model and the sample generation set are output. The capsule network is trained for transformer fault diagnosis using the training set and the generated set, and its performance is tested using the test set. When the performance test results are passed, the capsule network model is output.

3. The transformer fault diagnosis method according to claim 2, characterized in that, The step of performing data augmentation training on the boundary-balanced generative adversarial network based on the sample training set, and outputting the data augmentation model and the sample generation set when the sample generation set generated during the data augmentation training passes the sample quality evaluation, includes: Various types of fault samples are extracted from the aforementioned training set as data augmentation training sets; The data augmentation training set is used as the real data input for the boundary-balanced generative adversarial network, and sample data is generated based on preset model parameters to obtain a sample generation set. The sample quality of the generated sample set is evaluated based on the data augmentation training set. When the sample quality assessment is passed, the boundary-balanced generative adversarial network is output as a data augmentation model, and the sample generation set is output.

4. The transformer fault diagnosis method according to claim 3, characterized in that, The process of evaluating the sample quality of the generated sample set based on the data augmentation training set includes: Calculate the divergence index value of the data distributions of the generated sample set and the data augmentation training set; When the divergence index value is less than the preset divergence threshold, the sample generation set is determined to have passed the sample quality assessment. When the divergence index value is greater than or equal to the preset divergence threshold, the sample generation set is determined to have failed the sample quality assessment.

5. The transformer fault diagnosis method according to claim 3 or 4, characterized in that, Also includes: When the sample quality assessment fails, the model parameters of the boundary balance generative adversarial network are fine-tuned based on the sample quality assessment results, and a new sample generation set is regenerated based on the adjusted boundary balance generative adversarial network. The sample quality of the new sample generation set is evaluated again based on the data augmentation training set. When the final generated sample set passes the sample quality evaluation, the final boundary-balanced generative adversarial network is output as a data augmentation model, and the final generated sample set is output.

6. The transformer fault diagnosis method according to claim 2, characterized in that, The step of training the capsule network for transformer fault diagnosis based on the sample training set and the sample generation set includes: The sample training set is expanded using the generated sample set to obtain an expanded training set; The capsule network is trained for transformer fault diagnosis based on the expanded training set. During model training, the model parameters of the capsule network are continuously optimized based on the fault diagnosis results of the current round to obtain the trained capsule network.

7. The transformer fault diagnosis method according to claim 2 or 6, characterized in that, The process of using the sample test set to perform performance testing on the trained capsule network, and outputting the capsule network model when the performance test results are satisfactory, includes: The trained capsule network is used to diagnose transformer faults on the sample test set, and the results of the transformer fault diagnosis are evaluated to obtain the evaluation performance index value. When the evaluation performance index value is less than or equal to the preset performance index value, the trained capsule network is output as a capsule network model for transformer fault diagnosis. When the evaluation performance index value is greater than the preset performance index value, the model parameters of the trained capsule network are fine-tuned until the evaluation performance index value is less than or equal to the preset performance index value.

8. A transformer fault diagnosis device, characterized in that, include: The data acquisition unit is used to acquire a sample dataset of characteristic dissolved gases in real transformer oil; The model training unit is used to train a data-augmented transformer fault diagnosis model based on the sample dataset, combining a boundary-balanced generative adversarial network and a capsule network, and outputting a data-augmented model and a capsule network model. The sample generation unit is used to acquire the sample to be evaluated of the characteristic dissolved gas, input the sample to be evaluated into the data augmentation model to generate an expanded sample; The fault diagnosis unit is used to perform transformer fault diagnosis based on the expanded sample and through the capsule network model to obtain the fault diagnosis results of the characteristic dissolved gas.

9. An electronic device, characterized in that, The device includes a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the transformer fault diagnosis method according to any one of claims 1-7 according to the instructions in the program code.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store program code for executing the transformer fault diagnosis method according to any one of claims 1-7.