Skip to content

Original Research

Frontiers in Smart Grids ·

Volume 5 - 2026 | https://doi.org/10.3389/frsgr.2026.1774205

Research on transformer fault diagnosis and early warning technology based on digital twins

  • Kaibo Hu1*corresponding author
  • Lifeng Yu1
  • Wuyin Gu1
  • Kefeng Qian1
  • Jiahe Sun1
  1. Zhejiang Zheneng Lanxi Power Generation Company, Lanxi, Zhejiang, China
Article metrics0 viewsView details

Abstract

Power transformers are critical equipment in power systems, and their operational reliability directly affects the safety and stability of grid operation. Conventional transformer operation and maintenance methods are often limited by fixed alarm rules and insufficient integration of monitoring information, making it difficult to achieve intelligent fault diagnosis and timely warning support. To address these issues, this paper proposes a digital twin-assisted framework for transformer fault diagnosis and early warning by integrating transformer digital modeling, online monitoring information, and dissolved gas analysis (DGA)-based intelligent diagnosis. A three-dimensional transformer digital model is constructed using laser point cloud reconstruction and parametric modeling to support equipment state representation and information mapping. Meanwhile, a Snake Optimization-Random Forest (SO-RF) model is developed for multi-class transformer fault diagnosis using five characteristic dissolved gas features. The proposed model is trained and tested using dissolved gas data from a power company's transformer fault case library and compared with Support Vector Machine (SVM) and Random Forest (RF) models. Experimental results show that the proposed SO-RF model achieves an overall diagnostic accuracy of 93.80%, which is higher than those of RF and SVM, with accuracies of 89.98% and 86.39%, respectively. The proposed framework provides a feasible technical route for combining data-driven transformer fault diagnosis with digital twin-assisted state visualization and warning support for intelligent transformer operation and maintenance.

Keywords

1 Introduction

With the continuous expansion of power systems and the increasing complexity of equipment operation, transformer condition monitoring and maintenance are facing growing challenges (Xu et al., 2017; Liao et al., 2018). Power transformers, as one of the most critical assets in transmission and distribution networks, are characterized by complex internal structures, high maintenance costs, and long service lifetimes. Their operational reliability directly affects the safety and stability of power systems. Therefore, timely identification of abnormal operating states and accurate diagnosis of potential faults are essential for improving maintenance efficiency and reducing operational risk (Qi et al., 2021). Conventional operation and maintenance strategies, such as manual inspection, periodic maintenance, and threshold-based alarms, remain useful in practical engineering. However, these methods are often limited by inspection intervals, fixed alarm rules, and dependence on expert experience, making it difficult to capture the continuous evolution of transformer health states and identify latent abnormalities at an early stage (Hao et al., 2022).

Dissolved gas analysis (DGA) is one of the most widely used techniques for transformer fault diagnosis. By analyzing the concentrations and variation patterns of characteristic gases dissolved in transformer oil, DGA can provide important information for identifying internal thermal and electrical faults. Conventional DGA interpretation methods and engineering standards are widely used because of their simplicity and interpretability. Nevertheless, their diagnostic performance may be affected by fixed empirical boundaries, overlapping gas patterns among different fault types, and imbalanced fault samples. With the development of artificial intelligence and machine learning, data-driven diagnostic models have shown potential in capturing nonlinear relationships between gas features and transformer fault categories (Li et al., 2022a). However, standalone diagnostic models are often separated from equipment visualization, state synchronization, warning interaction, and maintenance decision support, which limits their practical value in intelligent transformer operation and maintenance.

In recent years, digital twin technology has attracted increasing attention in power equipment monitoring and health management (Su and Liu, 2022; Ji, 2020; Feng et al., 2022; Hu et al., 2017). By establishing a virtual representation of physical equipment and maintaining data interaction between physical and digital spaces, a digital twin can support equipment visualization, state perception, and decision assistance. In the field of power systems, digital twin technology has been explored for condition assessment, operation monitoring, and fault warning of transmission and transformation equipment (Wang et al., 2024). Zhang et al. (2023) proposed a digital twin-based method for intelligent perception of transmission and transformation equipment operating states, achieving heterogeneous multi-source data fusion and equipment health assessment. Wang and Zhang (2020) combined digital twin technology with an optimized probabilistic neural network for transformer fault identification. Zhang et al. (2022) constructed a digital twin model for transmission line apparatus zones from the perspectives of three-dimensional configuration and electrothermal sensing. These studies indicate that digital twins can provide an effective platform for equipment modeling, state interaction, and intelligent monitoring. However, many existing studies still focus mainly on system architecture, visualization, or single-function diagnosis, while the integration of data-driven transformer fault diagnosis with digital twin-assisted warning and maintenance decision support remains insufficient.

Meanwhile, machine-learning-based transformer fault diagnosis has also been extensively investigated. For example, random forest, support vector machine, and sample balancing strategies have been introduced to improve the recognition performance of transformer fault diagnosis models (Zhou et al., 2018; Liu L. et al., 2023; Liu K. et al., 2023). These methods improve the ability to distinguish nonlinear fault patterns to some extent, especially when dealing with complex DGA feature distributions. However, two issues remain. First, the diagnostic performance of machine learning models depends heavily on feature representation, parameter settings, and sample distribution. Second, the diagnostic output is often used only as an isolated classification result, rather than being further connected with fault warning, risk indication, and operation and maintenance decision-making. Therefore, it is necessary to develop a diagnosis-oriented digital twin framework in which data-driven fault identification results can be integrated into a unified platform for state perception and early warning. In addition, effective alarm processing and warning interaction are also important for improving the practical usability of intelligent operation and maintenance systems (Li et al., 2021).

To address these issues, this paper proposes a digital twin-assisted framework for transformer fault diagnosis and early warning. The proposed framework integrates transformer digital modeling, online monitoring information, and data-driven DGA fault diagnosis. First, a three-dimensional transformer digital model is constructed using laser point cloud reconstruction and parametric modeling, providing a structural basis for equipment visualization and state information mapping. Then, a Snake Optimization–Random Forest (SO-RF) model is developed for multi-class transformer fault diagnosis using five characteristic dissolved gas features, namely H2, CH4, C2H6, C2H4, and C2H2. The diagnostic model is trained and tested using dissolved gas data from a power company's transformer fault case library and compared with RF and SVM baseline models. Furthermore, the diagnosis results are embedded into the digital twin platform to support warning display, risk indication, and maintenance decision support.

The main contributions of this paper are summarized as follows:

  • A digital twin-assisted transformer fault diagnosis and early warning framework is proposed, integrating transformer digital modeling, online monitoring information, and data-driven DGA diagnosis.
  • A SO-RF diagnostic model is developed for multi-class transformer fault identification based on dissolved gas features, and its performance is evaluated using fault case data from a power company.
  • The diagnostic results are integrated into the digital twin platform to support state visualization, risk indication, and maintenance assistance, providing a feasible framework for digital twin-assisted transformer operation and maintenance.

2 Methodology

2.1 Digital twin-assisted framework for diagnosis and early warning

To support transformer fault diagnosis and early warning, this study develops a digital twin-assisted framework that integrates transformer digital modeling, online monitoring information, data-driven dissolved gas analysis, and diagnosis-result-driven warning support. The framework is designed to connect equipment state representation with intelligent fault identification, so that diagnostic results can be further used for state updating, risk indication, and maintenance decision-making.

The proposed framework consists of three main components: the physical transformer and monitoring data source, the digital twin platform, and the fault diagnosis and warning application module. The physical transformer provides equipment information and operating data, including asset records, online monitoring data, dissolved gas information, temperature-related variables, electrical parameters, and insulation-related indicators. Among these data, dissolved gas information is used as the primary input for fault diagnosis, while the remaining monitoring variables are organized as auxiliary state information for equipment visualization and warning support.

The overall workflow of the proposed digital twin-assisted framework is shown in Figure 1.

Digital twin-assisted framework for transformer fault diagnosis and early warning.
Figure 1. Digital twin-assisted framework for transformer fault diagnosis and early warning.

The digital twin platform serves as the carrier for equipment representation and state information integration. The three-dimensional transformer model constructed from laser point cloud reconstruction and parametric modeling provides the structural basis for visualizing the physical equipment. Monitoring information and diagnostic outputs are then mapped to the corresponding digital model to support state information display and warning interaction. In this framework, the digital twin is not used merely as a visualization interface; rather, it connects monitoring data, fault diagnosis results, and early warning information within a unified platform.

The fault diagnosis module is the core analytical component of the framework. Five dissolved gas features, including H2, CH4, C2H6, C2H4, and C2H2, are selected as input variables, and a Snake Optimization–Random Forest model is constructed to identify typical transformer fault types. The diagnostic output generated by the SO-RF model is transmitted to the digital twin platform and used to update the corresponding equipment state. When a potential abnormal condition is identified, the warning module provides risk indication and maintenance reference information based on the diagnostic result and auxiliary operating-state information.

Through this workflow, the proposed framework links data acquisition, DGA feature construction, SO-RF-based fault diagnosis, digital twin state updating, and early warning support. Compared with conventional transformer information systems that mainly focus on data storage, query, and threshold-based display, the proposed framework further integrates intelligent diagnosis and warning decision support into the digital twin environment, thereby providing a practical basis for transformer intelligent operation and maintenance.

2.2 Digital modeling and state information mapping

A digital model of the transformer is constructed to provide the structural basis for state representation and diagnosis-result visualization. In this study, laser point cloud reconstruction and parametric modeling are used to establish the three-dimensional transformer model. The external structures of the transformer, such as the tank, cooling fins, bushings, and auxiliary components, are reconstructed based on point cloud data after denoising, registration, and geometric processing. For internal or partially enclosed components, such as windings, core structures, and insulation-related parts, parametric modeling is adopted according to equipment design information and engineering records. Through this process, the digital model provides a structured representation of the physical transformer and supports the visual association between equipment components and operating-state information. The schematic diagram of laser point cloud scanning and 3D model reconstruction is illustrated in Figure 2.

Schematic diagram of laser point cloud scanning and 3D model reconstruction.
Figure 2. Schematic diagram of laser point cloud scanning and 3D model reconstruction.

The purpose of digital modeling in this study is not limited to geometric visualization. More importantly, the digital model provides a carrier for organizing different types of state information. Monitoring data, equipment records, dissolved gas information, temperature-related variables, electrical parameters, and insulation-related indicators are associated with the corresponding transformer model and component information. In this way, the digital twin platform forms a unified state information space in which heterogeneous data can be displayed, queried, and further connected with fault diagnosis results.

In the proposed framework, state information mapping is organized according to the role of each data category in fault diagnosis and warning support. Dissolved gas information is used as the core input of the SO-RF fault diagnosis model. Temperature, electrical, and insulation-related variables are treated as auxiliary operating-state information, which provides contextual support for equipment visualization and warning interpretation. Asset records and component information are used to maintain the correspondence between the physical transformer and the digital model. The diagnostic result generated by the SO-RF model is then mapped back to the digital twin platform to update the equipment state and support warning indication.

Through this mapping mechanism, the digital twin platform connects equipment representation with data-driven fault diagnosis. Instead of treating the digital model and the diagnostic model as independent modules, the proposed framework uses the digital twin platform to organize monitoring information, diagnostic outputs, and warning information in a unified environment. This provides the basis for subsequent SO-RF-based fault diagnosis result integration and diagnosis-result-driven early warning display.

2.3 SO-RF-based transformer fault diagnosis model

The fault diagnosis module is the core analytical part of the proposed framework. Since dissolved gas analysis is widely used for identifying internal transformer faults, this study selects five characteristic dissolved gases as the input features of the diagnostic model, including H2, CH4, C2H6, C2H4, and C2H2. These gases are closely related to thermal and discharge faults inside oil-immersed transformers and can reflect different fault development mechanisms. For each sample, the input feature vector is defined in Equation 1.

x=[xH2,xCH4,xC2H6,xC2H4,xC2H2](1)

where x<sub>H2</sub>, x<sub>CH4</sub>, x<sub>C2H6</sub>, x<sub>C2H4</sub>, and x<sub>C2H2</sub> denote the concentrations of the corresponding dissolved gases. For a dataset containing n samples, the input feature matrix is given in Equation 2.

X=[x1,x2,...,xn]T∈ℝn×5(2)

The corresponding fault labels are denoted in Equation 3.

y=[y1,y2,...,yn]T(3)

where y*i* represents the fault type of the i-th sample.

Because the magnitudes of different dissolved gas concentrations may vary significantly, feature normalization is performed before model training. The min-max normalization method is adopted to scale each gas feature into the interval [0,1] as shown in Equation 4:

xj*=xj-xj,minxj,max-xj,min(4)

where x*j* denotes the original value of the j-th gas feature, xj* denotes the normalized value, and x<sub>*j*, min</sub> and x<sub>*j*, max</sub> represent the minimum and maximum values of the corresponding gas feature in the training data. After normalization, the influence of scale differences among gas features is reduced, allowing the classifier to better learn the relationship between dissolved gas patterns and fault categories.

Random Forest (RF) is selected as the base classifier because of its robustness, nonlinear classification ability, and suitability for multi-class fault diagnosis (Zhou et al., 2020). The RF model constructs multiple decision trees using bootstrap sampling and random feature selection. Each decision tree gives a classification result for the input sample, and the final fault category is determined by majority voting. For an input sample x, the RF classification result is expressed in Equation 5:

ŷ=argmaxc∈C∑i=1NΠ(hi(x)=c)(5)

where C denotes the set of fault categories, N is the number of decision trees, h*i*(x) represents the prediction result of the i-th decision tree, and I(·) is the indicator function. The voting proportion of each class can also be used to indicate the confidence of the diagnostic result, as shown in Equation 6:

P(c|x)=1N∑i=1NI(hi(x)=c)(6)

where P(c|x) denotes the voting-based probability that sample x belongs to fault category c. This probability provides useful information for subsequent warning indication in the digital twin platform (Li et al., 2022b).

Although RF has good generalization ability, its diagnostic performance is influenced by hyperparameters such as the number of trees, maximum tree depth, minimum number of samples required for splitting, minimum number of samples at leaf nodes, and the number of features considered at each split. Manual parameter tuning or grid search may be inefficient and may not obtain a suitable parameter combination. Therefore, this study introduces the Snake Optimization algorithm to optimize the hyperparameters of the RF classifier.

In the SO-RF model, each snake individual represents a candidate hyperparameter combination of the RF classifier. The position vector of the i-th individual is defined in Equation 7.

θi=[ntree,dmax,smin,lmin,mfeature]i(7)

where ntree is the number of decision trees, dmax is the maximum tree depth, smin is the minimum number of samples required for node splitting, lmin is the minimum number of samples at leaf nodes, and mfeature is the number of features considered when searching for the best split. During the optimization process, each candidate parameter combination is used to train an RF classifier, and its validation accuracy is used as the fitness value, as shown in Equation 8:

F(θi)=Accval(RF(Xtrain,ytrain;θi))(8)

where Accval denotes the diagnostic accuracy on the validation set. The objective of the SO algorithm is to find the optimal hyperparameter combination, as shown in Equation 9:

θ*=argmaxθiF(θi)(9)

after the optimal hyperparameters are obtained, the final RF classifier is trained using the training dataset and then evaluated on the test dataset. The complete workflow of the SO-RF-based transformer fault diagnosis model is shown in Figure 3.

Workflow of the SO-RF-based transformer fault diagnosis method.
Figure 3. Workflow of the SO-RF-based transformer fault diagnosis method.

The complete SO-RF diagnostic procedure includes feature normalization, fault label encoding, hyperparameter optimization, RF training, test prediction, and diagnostic result output. The output fault category and voting-based confidence are then transmitted to the digital twin platform for state updating and warning support (Chen and Zhou, 2021).

The main procedure of the SO-RF diagnostic model is summarized as follows:

  • Collect dissolved gas samples and corresponding fault labels from the transformer fault case dataset.
  • Construct the input feature matrix using H2, CH4, C2H6, C2H4, and C2H2.
  • Normalize the dissolved gas features using min–max normalization.
  • Divide the dataset into training and test sets according to the experimental design.
  • Initialize the Snake Optimization population, where each individual represents an RF hyperparameter combination.
  • Train the RF classifier under each candidate parameter combination and calculate the validation accuracy as the fitness value.
  • Update the candidate parameter combinations through the SO algorithm until the termination condition is reached.
  • Train the final RF classifier using the optimized hyperparameters.
  • Output the predicted fault type and diagnosis confidence for each test sample.
  • Map the diagnostic result to the digital twin platform for state updating and warning indication.

Through this process, the SO-RF model combines the nonlinear classification capability of RF with the adaptive hyperparameter search capability of SO. This makes it suitable for multi-class transformer fault diagnosis based on dissolved gas features, especially when the sample distribution among different fault types is imbalanced (Qi et al., 2022).

2.4 Diagnosis-result-driven early warning mechanism

After the SO-RF model identifies the transformer fault type, the diagnostic result is further used to support early warning in the digital twin platform. In the proposed framework, the early warning module is diagnosis-result-driven. Its purpose is not to replace the fault diagnosis model or to establish an independent physical prediction model, but to transform diagnostic outputs into interpretable warning information and maintenance support.

The warning mechanism takes the predicted fault category and the corresponding diagnosis confidence as its main inputs. For a given sample, the SO-RF model outputs the predicted fault type and the voting-based confidence P(ŷ|x). When the predicted result corresponds to a normal state, the equipment status in the digital twin platform remains normal. When the predicted result corresponds to a fault state, the corresponding component or transformer object in the digital twin platform is updated to an abnormal or warning state. The warning level can be preliminarily determined according to the predicted fault category, diagnosis confidence, and auxiliary operating-state information. A general warning logic can be expressed in Equation 10:

W=f(ŷ,P(ŷ|x),s)(10)

where W denotes the warning level, ŷ is the predicted fault category, P(ŷ|x) is the diagnosis confidence, and s represents auxiliary operating-state information, such as temperature-related variables, electrical parameters, and insulation-related indicators. In practical application, the warning level can be classified into several states, such as normal, attention, warning, and alarm. The specific thresholds can be adjusted according to operation and maintenance requirements, historical fault records, and engineering experience.

The warning information generated by the platform includes the identified fault type, warning level, related state information, and suggested maintenance attention. For example, when the diagnostic model identifies a discharge-related fault, the platform can highlight the corresponding transformer object, display the DGA feature pattern, and provide warning information for maintenance personnel. When the diagnosis confidence is relatively low, the platform can mark the equipment as requiring further attention rather than directly generating a high-level alarm. This design avoids relying solely on fixed threshold alarms and allows the warning result to be linked with data-driven fault identification.

The diagnosis-result-driven warning mechanism has three functions in the proposed framework. First, it updates the state of the transformer in the digital twin platform according to the diagnostic output. Second, it converts the classification result into warning information that can be understood by operation and maintenance personnel. Third, it provides a connection between fault diagnosis and maintenance decision-making by combining diagnostic results with auxiliary state information. Therefore, the early warning module serves as the application extension of the SO-RF diagnostic model within the digital twin platform.

Compared with a standalone diagnostic model, the proposed mechanism improves the usability of the diagnostic result in operation and maintenance scenarios. The diagnostic model provides the fault identification result, while the digital twin platform provides the visual carrier and state information context. Through their integration, maintenance personnel can not only obtain the predicted fault category, but also observe the corresponding equipment state and related monitoring information. This supports a more intuitive and timely understanding of transformer abnormal conditions.

Overall, the methodology developed in this study forms a complete technical process: transformer state data are collected and organized in the digital twin platform; DGA features are extracted and input into the SO-RF diagnostic model; the model outputs fault categories and diagnosis confidence; and the digital twin platform transforms the diagnostic output into state updating, risk indication, and maintenance decision support. This process provides the methodological basis for the subsequent experimental validation and application analysis.

3 Experimental validation and application

3.1 Data source and sample distribution

To evaluate the effectiveness of the proposed SO-RF-based transformer fault diagnosis model, dissolved gas analysis data were collected from the transformer fault case library of a power company. The dataset contains typical dissolved gas records associated with different transformer operating states and fault categories. According to transformer fault diagnosis standards and the characteristics of internal thermal and electrical faults, the operating states were divided into seven categories: normal condition, high-energy discharge, low-energy discharge, partial discharge, high-temperature overheating, medium-temperature overheating, and low-temperature overheating. The fault labels in the case library were determined by the power company based on historical diagnostic records and expert assessments. Since not all cases were supported by direct disassembly verification, the dataset is regarded as an engineering fault case dataset rather than a laboratory type-test dataset.

For each sample, five dissolved gas features were selected as diagnostic inputs, including H2, CH4, C2H6, C2H4, and C2H2. These gases are commonly associated with discharge and overheating processes in oil-immersed transformers and provide essential information for distinguishing different fault types. The dataset was divided into training and test sets. The training set was used for model learning and SO-based hyperparameter optimization, while the test set was used only for final performance evaluation. This separation ensures that the reported diagnostic performance reflects the generalization ability of the model on unseen samples. The sample distribution of different transformer operating states is shown in Table 1.

Table 1. Sample distribution of different transformer operating states.

State typeTotal quantityTraining set quantityTest set quantity
Normal (N)82073882
High-energy discharge (D1)15013515
Low-energy discharge (D2)13011713
Partial discharge (D3)21018921
High-temperature overheating (T1)75687
Medium-temperature overheating (T2)95869
Low-temperature overheating (T3)17015317

As shown in Table 1, the dataset is imbalanced across fault categories. The number of normal samples is much larger than that of overheating and discharge fault samples, and the sample size of T1 and T2 is particularly limited. This imbalance reflects the practical characteristics of transformer fault data, where normal operating records are usually more abundant than confirmed fault cases. However, it also increases the difficulty of fault diagnosis, because the model must maintain classification performance for minority fault classes while avoiding bias toward the dominant normal category.

3.2 Experimental settings and evaluation metrics

The proposed SO-RF model was implemented in Python 3.9 under a Windows 10 environment. The diagnostic performance of the proposed method was compared with two baseline machine-learning models, namely Support Vector Machine (SVM) and Random Forest (RF). The SVM model was selected as a representative conventional machine-learning classifier, while the RF model was used to evaluate the improvement introduced by the SO-based hyperparameter optimization strategy. In the proposed SO-RF model, the Snake Optimization algorithm searches for an appropriate combination of RF hyperparameters, and the optimized RF classifier is then used for final fault classification.

Before model training, all dissolved gas features were normalized using the min–max normalization method. The dataset was first divided into training and test sets according to the experimental design. During SO optimization, the training set was further divided into an internal training subset and a validation subset. For each candidate RF hyperparameter combination, the RF classifier was trained on the internal training subset, and the validation accuracy was used as the fitness function to guide the SO search process. The independent test set was not involved in hyperparameter optimization and was used only for final performance evaluation.

The main evaluation metrics include accuracy, precision, recall, and F1-score. Accuracy reflects the overall proportion of correctly classified samples and is defined in Equation 11.

Accuracy=TP+TNTP+TN+FP+FN(11)

where TP, TN, FP, and FN denote true positives, true negatives, false positives, and false negatives, respectively. For each fault category, precision and recall are defined in Equations 12 and 13:

Precision=TPTP+FP(12)

Recall=TPTP+FN(13)

The F1-score is used to balance precision and recall, as shown in Equation 14:

F1=2×Precision×RecallPrecision+Recall(14)

Considering the imbalanced sample distribution, macro-averaged and weighted-averaged indicators are also recommended for comprehensive evaluation. The macro-average gives equal importance to each fault category, while the weighted-average considers the number of samples in each category. Therefore, these indicators provide a more balanced assessment than accuracy alone, especially for minority fault categories.

The experimental comparison includes three models, as shown in Table 2.

Table 2. Compared diagnostic models.

ModelDescription
SVMBaseline classifier for nonlinear fault classification
RFRandom Forest classifier without SO-based hyperparameter optimization
SO-RFProposed method using Snake Optimization to optimize RF hyperparameters

To improve the diagnostic performance of the RF classifier, the Snake Optimization algorithm was used to search for the optimal RF hyperparameter combination. The candidate hyperparameters included the number of decision trees, maximum tree depth, minimum number of samples required for node splitting, minimum number of samples at leaf nodes, and the number of features considered at each split. The main parameter settings and search ranges are summarized in Table 3. During the optimization process, the validation accuracy of the RF classifier was used as the fitness function. The optimization process was terminated when the maximum number of iterations was reached. After the optimal hyperparameter combination was obtained, the optimized RF classifier was retrained using the training set and evaluated on the independent test set.

Table 3. Main hyperparameters of the SO-RF model.

HyperparameterDescriptionSearch range/setting
TmaxMaximum number of iterations of SO100
NpopPopulation size of SO30
Male-to-female ratioRatio of male and female individuals in the snake population1:1
nestimatorsNumber of decision trees in RF[100, 1,000]
max_depthMaximum depth of each decision tree[3, 30]
min_samples_splitMinimum number of samples required to split an internal node[2, 10]
min_samples_leafMinimum number of samples required at a leaf node[1, 5]
max_featuresNumber of features considered when looking for the best split[1, 5]

3.3 Diagnosis results and comparative analysis

The diagnostic accuracy of SVM, RF, and SO-RF on the test set is shown in Table 4. The results indicate that the proposed SO-RF model achieves better diagnostic performance than the two baseline models for most transformer operating states. In particular, the proposed model improves the recognition accuracy of discharge-related fault categories, including high-energy discharge, low-energy discharge, and partial discharge. This suggests that SO-based hyperparameter optimization can enhance the ability of RF to capture nonlinear relationships between dissolved gas features and fault categories.

Table 4. Diagnostic accuracy results of different models.

Fault typeDiagnostic accuracy of different models/%
SVM/%RF/%SO-RF/%
N96.5296.92100
D183.7090.2093.89
D286.7193.5693.80
D385.3292.3193.51
T188.8992.5390.87
T264.5463.6472.73
T351.5063.5776.50
Overall accuracy86.3989.9893.80

As shown in Table 4, SO-RF obtains the highest diagnostic accuracy for N, D1, D2, D3, T2 and T3. Compared with RF and SVM, the improvement is particularly evident for D1 and T2, indicating that the SO optimization strategy can improve RF performance in fault categories with more complex or overlapping gas patterns. For T1, the RF model slightly outperforms SO-RF, which indicates that the optimization strategy does not uniformly improve all categories. This may be related to the limited sample size of T1 and the overlap between overheating-related gas features. Therefore, the diagnostic result should be interpreted not only through overall accuracy, but also through class-wise indicators.

To more comprehensively evaluate diagnostic performance under imbalanced sample conditions, precision, recall, and F1-score should be further reported. The class-wise results can be summarized in Table 5.

Table 5. Class-wise precision, recall, and F1-score of the SO-RF model.

Fault typePrecision/%Recall/%F1-score/%
N98.80100.0099.39
D191.1893.8992.51
D293.0193.8093.40
D396.0693.5194.77
T183.8390.8787.21
T264.2972.7368.25
T391.3876.5083.28
Macro average88.3688.7688.40
Weighted average93.9993.8093.80

As the dataset is imbalanced across different fault categories, precision, recall, and F1-score were further calculated to evaluate the class-wise diagnostic performance of the proposed SO-RF model. As shown in Table 5, the proposed model achieves high F1-scores for N, D1, D2, and D3, indicating its good capability in identifying normal states and discharge-related faults. The F1-score of T2 is relatively lower than those of the other categories, which may be attributed to the limited number of medium-temperature overheating samples and the overlap of dissolved gas patterns among overheating-related faults. In addition, the weighted-average F1-score is higher than the macro-average F1-score because the normal samples account for a relatively large proportion of the dataset.

In addition, the normalized confusion matrix of the SO-RF model is shown in Figure 4. The confusion matrix provides a direct visualization of the classification results for each fault type and helps identify which fault categories are more likely to be confused. This is particularly important for transformer fault diagnosis, because some overheating and discharge faults may exhibit partially overlapping dissolved gas patterns.

Normalized confusion matrix of the SO-RF diagnostic model on the test set.
Figure 4. Normalized confusion matrix of the SO-RF diagnostic model on the test set.

From the above results, the proposed SO-RF model demonstrates three main advantages. First, compared with SVM, the RF-based model is more suitable for handling nonlinear feature interactions among multiple dissolved gases. Second, compared with the original RF model, SO-RF reduces the dependence on manually selected hyperparameters and improves the adaptability of the classifier. Third, the output of SO-RF can provide not only the predicted fault category but also the diagnosis confidence based on the voting results of the optimized RF classifier, which is useful for subsequent warning indication in the digital twin platform.

However, the results also show that the improvement of SO-RF is not uniform across all fault types. For fault categories with limited samples, such as T1 and T2, the diagnostic accuracy may still fluctuate. This indicates that the model performance is affected by both sample size and gas feature overlap. Therefore, future improvement should focus on expanding minority fault samples, introducing more informative gas-ratio features, and combining data-driven diagnosis with engineering diagnostic rules.

3.4 Digital twin platform application and early warning display

After the SO-RF diagnostic model outputs the predicted fault category and diagnosis confidence, the diagnostic results are mapped to the digital twin platform to support equipment state updating and early warning display. In the proposed framework, the digital twin platform is used as an integrated environment for equipment visualization, state information organization, and diagnosis-result-driven warning support. The platform does not replace the diagnostic model; instead, it provides a visual and interactive carrier through which the diagnostic results can be transformed into interpretable state information for operation and maintenance personnel.

The application process is organized as follows. First, the DGA data of the transformer are preprocessed and input into the SO-RF diagnostic model. Second, the model outputs the predicted fault type and diagnosis confidence. Third, the diagnostic result is transmitted to the digital twin platform and associated with the corresponding transformer object or equipment information. Finally, the platform updates the equipment status and provides warning support according to the diagnostic result and auxiliary operating-state information.

The mapping relationship between diagnostic results and warning support is summarized in Table 6.

Table 6. Mapping relationship between diagnostic results and warning support.

Diagnostic outputWarning support in the digital twin platform
Normal stateMaintain normal equipment status and routine monitoring.
Discharge-related faultMark abnormal equipment status and prompt inspection of DGA trends and discharge-related indicators.
Overheating-related faultDisplay thermal warning information and prompt inspection of load condition, temperature variables, and cooling system.
Low-confidence diagnosisMark the equipment as requiring further attention and recommend additional monitoring or expert review.

The visualization interface of the digital twin platform is shown in Figure 5. As an example of the platform application, the interface presents the transformer digital model together with key operating-state information, such as gas-related indicators, temperature-related variables, electrical parameters, and insulation-state information. This visualization function provides a unified display environment for monitoring data and equipment status, allowing operation and maintenance personnel to observe transformer conditions more intuitively.

Visualization interface of the transformer state information in the digital twin platform.
Figure 5. Visualization interface of the transformer state information in the digital twin platform.

In the proposed framework, the SO-RF diagnostic output can be further linked with this visualization interface to support diagnosis-result-driven warning display. When the diagnostic model identifies a potential abnormal state, the corresponding transformer object or state panel can be updated in the platform, and warning information can be provided based on the predicted fault category, diagnosis confidence, and auxiliary operating-state information. In this way, the diagnostic output is not treated as an isolated classification result, but is integrated into the digital twin-assisted operation and maintenance workflow.

Compared with a standalone diagnostic model, this integrated application improves the usability of data-driven diagnosis in practical operation and maintenance scenarios. The SO-RF model provides fault identification and diagnosis confidence, while the digital twin platform provides equipment state representation and warning interaction. Their integration enables operation and maintenance personnel to observe diagnostic results together with equipment status and auxiliary monitoring information, thereby supporting a more intuitive understanding of transformer abnormal conditions.

It should be noted that the early warning application in this study is mainly driven by the fault diagnosis result and auxiliary operating-state information. The focus is on integrating diagnostic outputs into the digital twin platform for warning display and maintenance support, rather than establishing an independent multi-physics prediction model. This setting is consistent with the main objective of this study, which is to validate the SO-RF-based DGA fault diagnosis method and demonstrate its integration into a digital twin-assisted transformer operation and maintenance framework.

4 Conclusions

This paper proposed a digital twin-assisted framework for transformer fault diagnosis and early warning. The framework integrates transformer digital modeling, online monitoring information, DGA-based fault diagnosis, and diagnosis-result-driven warning support. A three-dimensional transformer model was constructed using laser point cloud reconstruction and parametric modeling, providing a structural basis for equipment visualization and state information mapping. Within the proposed framework, dissolved gas information serves as the primary input for fault diagnosis, while other monitoring variables are organized as auxiliary state information to support state representation and warning interaction in the digital twin platform.

To improve the accuracy of transformer fault diagnosis, a SO-RF model was developed using five characteristic dissolved gas features, including H2, CH4, C2H6, C2H4, and C2H2. The Snake Optimization algorithm was used to optimize key hyperparameters of the RF classifier, reducing the dependence on manual parameter selection. The proposed model was trained and tested using dissolved gas data from a power company's transformer fault case library and compared with SVM and RF baseline models. The experimental results show that the SO-RF model achieved an overall diagnostic accuracy of 93.80%, which is higher than those of RF and SVM, with overall accuracies of 89.98% and 86.39%, respectively. The results indicate that the proposed SO-RF model has better capability for multi-class transformer fault identification under imbalanced sample conditions.

The class-wise evaluation further shows that the proposed model performs well in identifying normal states and discharge-related faults. However, the diagnostic performance for some overheating-related categories, especially medium-temperature overheating, remains relatively lower than that of other categories. This may be attributed to the limited number of fault samples and the overlap of dissolved gas patterns among different overheating faults. Therefore, the use of class-wise metrics, such as precision, recall, and F1-score, is necessary for evaluating transformer fault diagnosis models under imbalanced data conditions.

In addition, the diagnostic outputs of the SO-RF model were integrated into the digital twin platform to support equipment state updating, risk indication, and early warning display. This integration enables the diagnostic result to be used not only as an isolated classification output but also as interpretable information for operation and maintenance support. The proposed framework therefore provides a feasible technical route for combining data-driven transformer fault diagnosis with digital twin-assisted state visualization and warning support.

Future work will focus on expanding the transformer fault case dataset, especially for minority fault categories, and introducing more informative DGA-derived features, such as gas ratios and temporal variation indicators. In addition, further validation using long-term field operation data and engineering cases will be conducted to improve the robustness and practical applicability of the proposed framework. The warning mechanism can also be further enhanced by incorporating more quantitative risk assessment rules and expert knowledge, so as to provide more reliable support for intelligent transformer operation and maintenance.

Generative AI statement

The author(s) declared that generative AI was not used in the creation of this manuscript.

Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.

Publisher's note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

Footnotes

Edited by: Najib Essounbouli, Université de Reims Champagne-Ardenne, France

Reviewed by: Yin Wu, Guangxi Power Grid Dispatching Control Center, China

Zehua Wu, CSG Electric Power Research Institute, China

Statements

Conflict of interest

Author(s) KH, LY, WG, and KQ were employed by Zhejiang Zheneng Lanxi Power Generation Company.

Funding

The author(s) declared that financial support was not received for this work and/or its publication.

Data availability

The data analyzed in this study is subject to the following licenses/restrictions: The data used in this study were obtained from internal operational records of our company and are not publicly available due to confidentiality and data security agreements. However, researchers may request access to the dataset by contacting the corresponding author and providing a suitable justification Requests to access these datasets should be directed to Kaibo Hu, hukb663873@163.com.

Author contributions

KH: Writing – original draft, Writing – review & editing. LY: Writing – review & editing. WG: Writing – review & editing. KQ: Writing – review & editing. JS: Writing – review & editing.

References

  1. Chen M., Zhou D. (2021). Research on the application of multi-dimensional state perception and digital twin technology of transformers. Electron. Technol. Softw. Eng. 53, 222 – 223. doi: doi:10.13296/j.1001-1609.hva.2017.08.035
  2. Feng Y., Yin S., Yan J.. (2022). Fault diagnosis method of power grid transformer based on digital twin. Mach. Electron. 40, 26 – 30.
  3. Hao L., Zhu Y., Wang Y. (2022). Transformer fault diagnosis method based on DCAE-KSSELM. Electric Power 55, 125 – 130. doi: doi:10.11930/j.issn.1004-9649.202111003
  4. Hu C., Shi Q., Si X., Zhang Z. (2017). Data-driven life prediction and health management: state of the art. Inf. Control 46, 72 – 82. doi: doi:10.13976/j.cnki.xk.2017.0072
  5. Ji Z. (2020). Research on ubiquitous power internet of things model based on digital twinning. J. Electr. Power 35, 274 – 279. doi: doi:10.13357/j.dlxb.2020.037
  6. Li J., Wu J., Xiong F., Hao L. (2022a). Analysis and control of safe and stable operation region for multiport power electronic transformer. Autom. Electr. Power Syst. 46, 129 – 138.
  7. Li L., Fan J., Yan L. (2021). Transformer fault diagnosis based on hybrid sampling and support vector machines. Electr. Power 54, 150 – 155. doi: doi:10.11930/j.issn.1004-9649.202109153
  8. Li P., Dong M., Li G. (2022b). Residual flux evaluation and experimental validation of power transformer based on external DC excitation. Power Syst. Technol. 46, 4122−4130. doi: doi:10.13335/j.1000-3673.pst.2021.1845
  9. Liao R., Wang Y., Liu H., Liu H., Ma Z. (2018). Research status of condition assessment method for power equipment. High Voltage Technol. 44, 3454 – 3464. doi: doi:10.13336/j.1003-6520.hve.20181031002
  10. Liu K., Yao Y., Zhao X., Yang C., Sheng G., Wang K. (2023). Transformer fault diagnosis based on sample integration learning and SO-SVM. Electr. Mach. Control Appl. 50, 21 – 31.
  11. Liu L., Li L., Han X. (2023). Research on transformer fault diagnosis based on SMOTE and random forest. Shandong Electr. Power 50, 11 – 19. doi: doi:10.20097/j.cnki.issn1007-9904.2023.11.002
  12. Qi B., Zhang P., Zhang S., Zhao L., Wang H., Huang M.. (2021). Application status and development prospects of digital twin technology in condition assessment of power transmission and transformation equipment. High Voltage Technol. 47, 1522 – 1538. doi: doi:10.13336/j.1003-6520.hve.20210093
  13. Qi S., Hu R., Wang W., Wu M., Zhang Y. (2022). Transformer fault diagnosis method based on SMOTE balanced data set and Bp neural network. Shandong Electr. Power 49, 15 – 22.
  14. Su K., Liu Q. (2022). Parameter identification of oil paper insulation equivalent circuit of transformer and new feature extraction based on TLS-ESPRIT. Electr. Eng. 23, 89 – 96.
  15. Wang X., Pu T., Zhang D. (2024). Overview and prospect of power system digital twin. New Power Syst. 2, 52−64. doi: doi:10.20121/j.2097-2784.ntps.230006
  16. Wang Y., Zhang T. (2020). Fault diagnosis of transformers based on optimal probabilistic neural network based on digital twin. Comb. Mach. Tools Autom. Mach. Technol. 11, 20−23. doi: doi:10.13462/j.cnki.mmtamt.2020.11.005
  17. Xu X., Li J., Wang J., Wu C. (2017). Summary of reliability and state evaluation methods for transformer. High Voltage Electr. Appl. 53, 211 – 216. doi: doi:10.13296/j.1001-1609.hva.2017.08.035
  18. Zhang J., Liu S., Li R. (2023). Intelligent perception of operation state of power transmission and transformation equipment based on digital twin technology. Comput. Simul. 40, 123−127.
  19. Zhang S., Peng Z., Cheng J., He Y. (2022). Research on digital twin model of outgoing-line device area of UHV converter transformer based on three-dimensional configuration and electro-thermal sensing. High Voltage Electr. Appl. 58, 128 – 140. doi: doi:10.13296/j.1001-1609.hva.2022.07.016
  20. Zhou B., Qin J., Wang J.. (2020). A power system fault alarm processing method based on ANN and FSM. Shandong Electr. Power 47, 6−13.
  21. Zhou Y., Ma H., Huang F., Gu J., Chen T., Gong J.. (2018). Determine method of the transformer winding looseness defeat based on vibration. Electr. Power 51, 83 – 88.

Citation

Hu, K., et al. (2026). Research on transformer fault diagnosis and early warning technology based on digital twins. Frontiers in Smart Grids, Volume 5. https://doi.org/
Received
Accepted
Published
Volume
5 - 2026

Copyright

Copyright © 2026 Hu, Yu, Gu, Qian and Sun.

License: https://creativecommons.org/licenses/by/4.0/

*Correspondence: Kaibo Hu

Article metrics

Views
0
Downloads
0
Citations
0
Shares
0