A method for evaluating the health state of a power transformer
Patent Information
- Application Number
- CN202610908136.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-23
- Publication Date
- 2026-10-16
AI Technical Summary
[0005]为解决现有电力变压器DGA故障诊断方法存在的输入特征维度单一导致信息利用率不足、特征提取尺度单一难以覆盖多粒度故障模式、注意力机制简单且无法建模长程依赖关系的问题,本发明的目的在于提供一种使模型在诊断准确率、收敛效率及复合故障识别能力上均取得实质性提升的电力变压器健康状态评估方法
[0072] As can be seen from the above technical solution, the beneficial effects of the present invention are as follows: First, the present invention expands the input features from the traditional 5 to 7-dimensional original gas concentration to an extended feature vector of approximately 49 dimensions, covering four dimensions: original concentration, pairwise ratios, statistical features, and key ratios. In particular, the 10 gas ratio features directly inherit the mature experience of international standards such as IEC 60599, enabling the model to understand the relative relationships between gases from a professional perspective rather than relying solely on absolute values. Experiments show that the fault diagnosis accuracy of the model after feature engineering expansion is improved by about 5% to 8% compared to using only the original concentration input. Second, this invention constructs a deep neural network model that simultaneously captures local details, global trends, and cross-dimensional interaction features in DGA data. Ablation experiments confirm that the contributions of each branch are independent and complementary, achieving progressive and precise focusing by first selecting the channel and then determining the position, significantly improving the recall rate of composite faults, effectively alleviating the gradient degradation problem of deep networks, and preserving the underlying feature information, resulting in substantial improvements in diagnostic accuracy, convergence efficiency, and composite fault identification capabilities. Third, the deep neural network model of this invention maintains a clear and concise modular structure, with well-defined functional boundaries for each module, facilitating engineering implementation and maintenance. The total number of model parameters is controlled within a moderate range, enabling real-time inference on ordinary servers or even edge computing devices, meeting the dual requirements of real-time performance and resource constraints of power transformer online monitoring systems.
Smart Images

Figure CN122930274A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power transformer technology, and in particular to a method for assessing the health status of power transformers. Background Technology
[0002] The reliable operation of a power system largely depends on the health and performance of critical equipment, especially power transformers. Faults or malfunctions in power transformers directly impact the safety and reliability of the entire power grid. Over the decades, numerous condition monitoring methods have been developed to detect various faults in power transformers. In industrial practice, one of the most widely used methods for analyzing power transformer oil to detect early-stage faults is dissolved gas analysis (DGA). This technique has proven effective in identifying potential problems in power transformers and has become an important asset management tool.
[0003] Several conventional DGA interpretation methods derived from ANSI / IEEE standards, including the Key Gas Method and the David's Triangle Method, have been widely used in the power industry. However, each of these methods exhibits certain limitations, such as out-of-code ratios, different boundaries, and exclusion of gas escape, which can lead to erroneous and inconsistent fault diagnoses. Therefore, the accuracy of diagnostic results depends more on the experience level of the professionals performing the tests.
[0004] To overcome this subjective interpretation, researchers have developed several AI-based methods to improve diagnostic accuracy. One approach is fuzzy logic, which replaces the precise values of input and output variables with a series of values to handle the uncertainty and imprecision in DGA data. Other AI methods, such as decision trees, random forests, k-nearest neighbors, logistic regression, support vector machines, Bayesian networks, artificial neural networks, and adaptive neurofuzzy inference systems, have also shown promising results in enhancing DGA data analysis. These methods are designed for different levels of data complexity and typically require multiple trained models to comprehensively analyze DGA data. For example, ANFIS models may encounter difficulties and get stuck during training; on the other hand, fuzzy logic requires a large number of fuzzy rules, which complicates DGA models with multiple input and output parameters and reduces accuracy. Summary of the Invention
[0005] To address the problems of existing power transformer DGA fault diagnosis methods, such as insufficient information utilization due to single input feature dimensions, difficulty in covering multi-granularity fault modes due to single feature extraction scale, and simple attention mechanism that cannot model long-range dependencies, the present invention aims to provide a power transformer health status assessment method that substantially improves the model's diagnostic accuracy, convergence efficiency, and ability to identify complex faults.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a method for assessing the health status of a power transformer, the method comprising the following sequential steps:
[0007] (1) Obtain dissolved gas concentration data monitored by the sensor, wherein the dissolved gases include five gases: hydrogen (H2), methane (CH4), ethylene (C2H4), ethane (C2H6), and acetylene (C2H2); preprocess the obtained dissolved gas concentration data, wherein the preprocessing includes filling missing values and removing outliers, and divide the preprocessed data into training set, test set and validation set in a ratio of 6:2:2;
[0008] (2) Perform intelligent feature engineering on the preprocessed data to generate an extended feature vector X;
[0009] (3) Construct a deep neural network model that integrates multi-scale convolution and hybrid attention mechanism, input the extended feature vector X into the deep neural network model for training, and obtain the trained model;
[0010] (4) After the test set data is preprocessed and feature engineering processed, it is input into the trained model. The trained model outputs the health status assessment results of the transformer.
[0011] In step (2), the intelligent feature engineering process specifically includes the following steps:
[0012] (2a) Calculate the pairwise ratios of the concentrations of the five dissolved gases to obtain 10 ratio characteristics. These 10 ratio characteristics include C2H2 / C2H4, C2H4 / C2H6, C2H2 / H2, CH4 / H2, C2H4 / CH4, and their reciprocals. The calculation formula is as follows:
[0013] ;
[0014] in, This represents the concentration value of the i-th gas; C is a very small positive constant used to prevent division by zero errors; j This represents the concentration value of the j-th gas;
[0015] (2b) Calculate the gas statistical characteristics, which include the mean, standard deviation, maximum, minimum and range of the concentrations of the five gases;
[0016] (2c) Calculate the key gas ratio characteristics, which include the proportion of each hydrocarbon gas in the total hydrocarbons;
[0017] (2d) Concatenate the dissolved gas concentration data, ratio features, gas statistical features, and key gas ratio features into an extended feature vector X∈ℝ. d , where d is the expanded feature dimension;
[0018] (2e) The extended feature vector X is normalized to the [0,1] interval using the Min-Max normalization method.
[0019] In step (3), the deep neural network model includes a multi-scale feature extraction module, a hybrid attention module, a self-attention encoding layer, a residual connection layer, and a classification output layer connected in sequence;
[0020] The multi-scale feature extraction module comprises three parallel branches: a depthwise separable convolution (DSC) branch, a large-kernel dilated convolution branch, and a fully connected mapping branch. These three branches extract local patterns, global receptive fields, and dimensionality interaction information of the input features from different scales, respectively. The outputs of these three parallel branches are concatenated and fused to obtain a multi-scale fused feature map. ;
[0021] Hybrid attention modules in multi-scale feature map fusion The channel attention submodule and spatial attention submodule are applied sequentially to obtain the output feature map. The channel attention module is used to adaptively learn the importance weights of different feature channels, while the spatial attention module is used to focus on key spatial locations in the feature map.
[0022] The self-attention coding layer is based on the Transformer encoder structure, uses a multi-head self-attention mechanism to capture the global dependencies between features, and is supplemented by a feedforward neural network for nonlinear transformation;
[0023] The residual connection layer adds the output of the self-attention encoding layer and the input of the multi-scale feature extraction module through a skip connection to obtain the output of the residual connection layer. This is to alleviate the gradient vanishing problem and accelerate model convergence;
[0024] After flattening the output of the residual connection layer, the classification output layer consists of a fully connected layer and a Softmax activation function, and outputs the confidence probability distribution of various fault states.
[0025] In step (4), the health status assessment results of the transformer include at least one of the following: transformer fault type prediction label, prediction confidence probability value of each fault type, channel attention weight distribution, and spatial attention heatmap.
[0026] The transformer fault type prediction labels include normal state, thermal fault (overheating), partial discharge fault, and arc discharge fault.
[0027] The channel attention weight distribution refers to the degree of contribution of each feature channel to the diagnostic results, and is used to identify key influencing factors.
[0028] The spatial attention heatmap refers to the visualization of key feature regions that the model focuses on, helping maintenance personnel understand the basis for the model's decision-making.
[0029] The depthwise separable convolutional (DSC) branch sequentially includes a depthwise convolutional layer, a pointwise convolutional layer, a normalization layer, and a ReLU activation function. The depthwise convolutional layer uses a grouped convolution method to perform spatial convolution independently on each input channel. The depthwise convolutional layer consists of two cascaded depthwise separable convolutional blocks, and each depthwise separable convolutional block is followed by a max pooling layer. The pointwise convolutional layer uses 1×1 convolution to fuse information between channels.
[0030] The large-kernel dilated convolution branch uses dilated convolution with a kernel size of 7×7 and an expansion rate of 3 to expand the receptive field without increasing the number of parameters, in order to capture the global trend of gas concentration data.
[0031] The fully connected mapping branch consists of two fully connected layers. The first fully connected layer maps the input features to a high-dimensional latent space, and the second fully connected layer reshapes the output of the first fully connected layer into a feature map format with the same dimensions as the other two branches.
[0032] The outputs of the three parallel branches are concatenated along the channel dimension, and then processed by a 1×1 convolutional layer to integrate the channels, resulting in a multi-scale fused feature map. Where C is the number of channels, and W and H are the width and height of the multi-scale fused feature map, respectively.
[0033] The hybrid attention module includes a channel attention submodule and a spatial attention submodule;
[0034] First, the input feature map is processed. Global average pooling and max pooling are performed separately to obtain two different spatial context descriptors. These are then processed by a shared multilayer perceptron (MLP), which includes a dimensionality reduction layer and an dimensionality increase layer, with ReLU activation between the two layers. Finally, the feature vectors output from the dimensionality reduction and increase layers are element-wise summed and then passed through a sigmoid activation function to obtain the channel attention weight vector. :
[0035] ;
[0036] in, For the Sigmoid function, For average pooling function, It is the max pooling function;
[0037] Channel attention weight vector With input feature map Multiply to obtain the output of the channel attention submodule. Complete the feature recalibration along the channel dimension:
[0038] ;
[0039] in, This represents broadcast multiplication.
[0040] Output of the channel attention submodule Average pooling and max pooling operations are performed along the channel axis respectively, and the concatenation results in a dual-channel spatial descriptor; subsequently, a two-dimensional spatial attention weight map is generated by passing it through a 7×7 convolutional layer and a sigmoid activation function. W and H represent the width and height of the multi-scale fused feature map, respectively.
[0041] ;
[0042] in, This indicates a convolution operation with a kernel size of 7×7; For channel-dimensional global average pooling function, It is a channel-dimensional global max-pooling function;
[0043] Two-dimensional spatial attention weight map With the output of the channel attention submodule Multiplying them together yields the output feature map of the hybrid attention module. :
[0044] .
[0045] The self-attention encoding layer will convert the output feature map of the hybrid attention module Flattened into a one-dimensional input feature sequence Where L is the sequence length and D is the embedding dimension at each position; then, multi-head self-attention is calculated for Z, specifically including the following steps:
[0046] (7a) Through three independent linear transformation matrices Map the one-dimensional input feature sequence Z to the query matrix Q, the key matrix K, and the value matrix V, respectively:
[0047] ;
[0048] (7b) For each head attention s, compute the scaled dot product attention. :
[0049] ;
[0050] Where s = 1, 2, ..., S, and S is the number of attention heads; Let be the query matrix for the s-th attention head; Let be the key matrix of the s-th attention head. Let be the value matrix of the s-th attention head; This is the attention score matrix; Let be the dimension of the key vector for each attention; This is the normalization function;
[0051] (7c) The output of the multi-head self-attention module is obtained by concatenating the outputs of all attention heads and then performing linear projection. :
[0052] ;
[0053] in, To output the projection matrix; For splicing operations; This is the output of the first attention head; This is the output of the S-th attention head;
[0054] (7d) A feedforward neural network is connected after the multi-head self-attention module. The input of the feedforward neural network is the features. :
[0055] ;
[0056] in, This represents the sum of residuals; Z is the input to the multi-head self-attention module, i.e., the one-dimensional input feature sequence; LayerNorm is layer normalization;
[0057] The feedforward neural network consists of two cascaded fully connected blocks with identical structures: a first fully connected block and a second fully connected block. Each fully connected block includes a fully connected linear transformation, a Gaussian error linear unit activation function (GELU), and a Dropout regularization operation.
[0058] First fully connected block receive As input, through the first weight matrix With the first bias vector A linear transformation is performed to obtain the intermediate hidden representation. This intermediate hidden representation is then passed sequentially through the GELU activation function and the Dropout regularization layer to obtain the output of the first fully connected block. :
[0059] ;
[0060] The second fully connected block receives the output of the first fully connected block. Through the second weight matrix With the second bias vector Perform a linear transformation to obtain the original output of the feedforward neural network. Then the original output The output of the second fully connected block is obtained by sequentially passing the GELU activation function and the Dropout regularization layer. :
[0061]
[0062] The output of the second fully connected block With the input of the feedforward neural network The output of the self-attention encoding layer is obtained by summing the element-wise residuals and then normalizing them through a LayerNorm layer. :
[0063] .
[0064] The output of the residual connection layer for:
[0065] ;
[0066] in, For multi-scale fused feature maps, the identity mapping component is used as a skip connection; These are the feature components processed by the hybrid attention module and the self-attention coding layer. SAEL is the self-attention coding layer, and HAM is the hybrid attention module.
[0067] In step (3), the training process of the deep neural network model uses the cross-entropy loss function with class weights as the optimization objective:
[0068] ;
[0069] Where T represents the total number of fault categories. One-hot encoding for the real label, Let be the probability of class t predicted by the model. Let be the weight coefficient of class t; The value is inversely proportional to the number of samples in each category, as shown in the following formula:
[0070] ;
[0071] in, The total number of training samples, Let be the number of samples in class t; an early stopping strategy is also adopted during training, and training is stopped when the validation set loss does not decrease for P consecutive rounds, where P is a preset positive integer threshold.
[0072] As can be seen from the above technical solution, the beneficial effects of the present invention are as follows: First, the present invention expands the input features from the traditional 5 to 7-dimensional original gas concentration to an extended feature vector of approximately 49 dimensions, covering four dimensions: original concentration, pairwise ratios, statistical features, and key ratios. In particular, the 10 gas ratio features directly inherit the mature experience of international standards such as IEC 60599, enabling the model to understand the relative relationships between gases from a professional perspective rather than relying solely on absolute values. Experiments show that the fault diagnosis accuracy of the model after feature engineering expansion is improved by about 5% to 8% compared to using only the original concentration input. Second, this invention constructs a deep neural network model that simultaneously captures local details, global trends, and cross-dimensional interaction features in DGA data. Ablation experiments confirm that the contributions of each branch are independent and complementary, achieving progressive and precise focusing by first selecting the channel and then determining the position, significantly improving the recall rate of composite faults, effectively alleviating the gradient degradation problem of deep networks, and preserving the underlying feature information, resulting in substantial improvements in diagnostic accuracy, convergence efficiency, and composite fault identification capabilities. Third, the deep neural network model of this invention maintains a clear and concise modular structure, with well-defined functional boundaries for each module, facilitating engineering implementation and maintenance. The total number of model parameters is controlled within a moderate range, enabling real-time inference on ordinary servers or even edge computing devices, meeting the dual requirements of real-time performance and resource constraints of power transformer online monitoring systems. Attached Figure Description
[0073] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0074] like Figure 1 As shown, a method for assessing the health status of a power transformer includes the following sequential steps:
[0075] (1) Obtain dissolved gas concentration data monitored by the sensor, wherein the dissolved gases include five gases: hydrogen (H2), methane (CH4), ethylene (C2H4), ethane (C2H6), and acetylene (C2H2); preprocess the obtained dissolved gas concentration data, wherein the preprocessing includes filling missing values and removing outliers, and divide the preprocessed data into training set, test set and validation set in a ratio of 6:2:2;
[0076] (2) Perform intelligent feature engineering on the preprocessed data to generate an extended feature vector X;
[0077] (3) Construct a deep neural network model that integrates multi-scale convolution and hybrid attention mechanism, input the extended feature vector X into the deep neural network model for training, and obtain the trained model;
[0078] (4) After the test set data is preprocessed and feature engineering processed, it is input into the trained model. The trained model outputs the health status assessment results of the transformer.
[0079] In step (2), the intelligent feature engineering process specifically includes the following steps:
[0080] (2a) Calculate the pairwise ratios of the concentrations of the five dissolved gases to obtain 10 ratio characteristics. These 10 ratio characteristics include C2H2 / C2H4, C2H4 / C2H6, C2H2 / H2, CH4 / H2, C2H4 / CH4, and their reciprocals. The calculation formula is as follows:
[0081] ;
[0082] in, This represents the concentration value of the i-th gas; C is a very small positive constant used to prevent division by zero errors; j This represents the concentration value of the j-th gas;
[0083] (2b) Calculate the gas statistical characteristics, which include the mean, standard deviation, maximum, minimum and range of the concentrations of the five gases;
[0084] (2c) Calculate the key gas ratio characteristics, which include the proportion of each hydrocarbon gas in the total hydrocarbons;
[0085] (2d) Concatenate the dissolved gas concentration data, ratio features, gas statistical features, and key gas ratio features into an extended feature vector X∈ℝ. d , where d is the expanded feature dimension;
[0086] (2e) The extended feature vector X is normalized to the [0,1] interval using the Min-Max normalization method.
[0087] In step (3), the deep neural network model includes a multi-scale feature extraction module, a hybrid attention module, a self-attention encoding layer, a residual connection layer, and a classification output layer connected in sequence;
[0088] The multi-scale feature extraction module comprises three parallel branches: a depthwise separable convolution (DSC) branch, a large-kernel dilated convolution branch, and a fully connected mapping branch. These three branches extract local patterns, global receptive fields, and dimensionality interaction information of the input features from different scales, respectively. The outputs of these three parallel branches are concatenated and fused to obtain a multi-scale fused feature map. ;
[0089] Hybrid attention modules in multi-scale feature map fusion The channel attention submodule and spatial attention submodule are applied sequentially to obtain the output feature map. The channel attention module is used to adaptively learn the importance weights of different feature channels, while the spatial attention module is used to focus on key spatial locations in the feature map.
[0090] The self-attention coding layer is based on the Transformer encoder structure, uses a multi-head self-attention mechanism to capture the global dependencies between features, and is supplemented by a feedforward neural network for nonlinear transformation;
[0091] The residual connection layer adds the output of the self-attention encoding layer and the input of the multi-scale feature extraction module through a skip connection to obtain the output of the residual connection layer. This is to alleviate the gradient vanishing problem and accelerate model convergence;
[0092] After flattening the output of the residual connection layer, the classification output layer consists of a fully connected layer and a Softmax activation function, and outputs the confidence probability distribution of various fault states.
[0093] In step (4), the health status assessment results of the transformer include at least one of the following: transformer fault type prediction label, prediction confidence probability value of each fault type, channel attention weight distribution, and spatial attention heatmap.
[0094] The transformer fault type prediction labels include normal state, thermal fault (overheating), partial discharge fault, and arc discharge fault.
[0095] The channel attention weight distribution refers to the degree of contribution of each feature channel to the diagnostic results, and is used to identify key influencing factors.
[0096] The spatial attention heatmap refers to the visualization of key feature regions that the model focuses on, helping maintenance personnel understand the basis for the model's decision-making.
[0097] The depthwise separable convolutional (DSC) branch sequentially includes a depthwise convolutional layer, a pointwise convolutional layer, a normalization layer, and a ReLU activation function. The depthwise convolutional layer uses a grouped convolution method to perform spatial convolution independently on each input channel. The depthwise convolutional layer consists of two cascaded depthwise separable convolutional blocks, and each depthwise separable convolutional block is followed by a max pooling layer. The pointwise convolutional layer uses 1×1 convolution to fuse information between channels.
[0098] The large-kernel dilated convolution branch uses dilated convolution with a kernel size of 7×7 and an expansion rate of 3 to expand the receptive field without increasing the number of parameters, in order to capture the global trend of gas concentration data.
[0099] The fully connected mapping branch consists of two fully connected layers. The first fully connected layer maps the input features to a high-dimensional latent space, and the second fully connected layer reshapes the output of the first fully connected layer into a feature map format with the same dimensions as the other two branches.
[0100] The outputs of the three parallel branches are concatenated along the channel dimension, and then processed by a 1×1 convolutional layer to integrate the channels, resulting in a multi-scale fused feature map. Where C is the number of channels, and W and H are the width and height of the multi-scale fused feature map, respectively.
[0101] The hybrid attention module includes a channel attention submodule and a spatial attention submodule;
[0102] First, the input feature map is processed. Global average pooling and max pooling are performed separately to obtain two different spatial context descriptors. These are then processed by a shared multilayer perceptron (MLP), which includes a dimensionality reduction layer and an dimensionality increase layer, with ReLU activation between the two layers. Finally, the feature vectors output from the dimensionality reduction and increase layers are element-wise summed and then passed through a sigmoid activation function to obtain the channel attention weight vector. :
[0103] ;
[0104] in, For the Sigmoid function, For average pooling function, It is the max pooling function;
[0105] Channel attention weight vector With input feature map Multiply to obtain the output of the channel attention submodule. Complete the feature recalibration along the channel dimension:
[0106] ;
[0107] in, This represents broadcast multiplication.
[0108] Output of the channel attention submodule Average pooling and max pooling operations are performed along the channel axis respectively, and the concatenation results in a dual-channel spatial descriptor; subsequently, a two-dimensional spatial attention weight map is generated by passing it through a 7×7 convolutional layer and a sigmoid activation function. W and H represent the width and height of the multi-scale fused feature map, respectively.
[0109] ;
[0110] in, This indicates a convolution operation with a kernel size of 7×7; For channel-dimensional global average pooling function, It is a channel-dimensional global max-pooling function;
[0111] Two-dimensional spatial attention weight map With the output of the channel attention submodule Multiplying them together yields the output feature map of the hybrid attention module. :
[0112] .
[0113] The self-attention encoding layer will convert the output feature map of the hybrid attention module Flattened into a one-dimensional input feature sequence Where L is the sequence length and D is the embedding dimension at each position; then, multi-head self-attention is calculated for Z, specifically including the following steps:
[0114] (7a) Through three independent linear transformation matrices Map the one-dimensional input feature sequence Z to the query matrix Q, the key matrix K, and the value matrix V, respectively:
[0115] ;
[0116] (7b) For each head attention s, compute the scaled dot product attention. :
[0117] ;
[0118] Where s = 1, 2, ..., S, and S is the number of attention heads; Let be the query matrix for the s-th attention head; Let be the key matrix of the s-th attention head. Let be the value matrix of the s-th attention head; This is the attention score matrix; Let be the dimension of the key vector for each attention; This is the normalization function;
[0119] (7c) The output of the multi-head self-attention module is obtained by concatenating the outputs of all attention heads and then performing linear projection. :
[0120] ;
[0121] in, To output the projection matrix; For splicing operations; This is the output of the first attention head; This is the output of the S-th attention head;
[0122] (7d) A feedforward neural network is connected after the multi-head self-attention module. The input of the feedforward neural network is the features. :
[0123] ;
[0124] in, This represents the sum of residuals; Z is the input to the multi-head self-attention module, i.e., the one-dimensional input feature sequence; LayerNorm is layer normalization;
[0125] The feedforward neural network consists of two cascaded fully connected blocks with identical structures: a first fully connected block and a second fully connected block. Each fully connected block includes a fully connected linear transformation, a Gaussian error linear unit activation function (GELU), and a Dropout regularization operation.
[0126] First fully connected block receive As input, through the first weight matrix With the first bias vector A linear transformation is performed to obtain the intermediate hidden representation. This intermediate hidden representation is then passed sequentially through the GELU activation function and the Dropout regularization layer to obtain the output of the first fully connected block. :
[0127] ;
[0128] The second fully connected block receives the output of the first fully connected block. Through the second weight matrix With the second bias vector Perform a linear transformation to obtain the original output of the feedforward neural network. Then the original output The output of the second fully connected block is obtained by sequentially passing the GELU activation function and the Dropout regularization layer. :
[0129]
[0130] The output of the second fully connected block With the input of the feedforward neural network The output of the self-attention encoding layer is obtained by summing the element-wise residuals and then normalizing them through a LayerNorm layer. :
[0131] .
[0132] The output of the residual connection layer for:
[0133] ;
[0134] in, For multi-scale fused feature maps, the identity mapping component is used as a skip connection; These are the feature components processed by the hybrid attention module and the self-attention coding layer. SAEL is the self-attention coding layer, and HAM is the hybrid attention module.
[0135] In step (3), the training process of the deep neural network model uses the cross-entropy loss function with class weights as the optimization objective:
[0136] ;
[0137] Where T represents the total number of fault categories. One-hot encoding for the real label, Let be the probability of class t predicted by the model. Let be the weight coefficient of class t; The value is inversely proportional to the number of samples in each category, as shown in the following formula:
[0138] ;
[0139] in, The total number of training samples, Let be the number of samples in class t; an early stopping strategy is also adopted during training, and training is stopped when the validation set loss does not decrease for P consecutive rounds, where P is a preset positive integer threshold.
[0140] In summary, this invention expands the input features from the traditional 5-7 dimension of raw gas concentration to an extended feature vector of approximately 49 dimensions, covering four dimensions: raw concentration, pairwise ratios, statistical features, and key ratios. In particular, the 10 gas ratio features directly inherit the mature experience of international standards such as IEC 60599, enabling the model to understand the relative relationships between gases from a professional perspective rather than relying solely on absolute values. Experiments show that the fault diagnosis accuracy of the model after feature engineering expansion is improved by approximately 5% to 8% compared to using only the raw concentration input.
[0141] This invention constructs a deep neural network model consisting of a multi-scale feature extraction module, a hybrid attention module, a self-attention encoding layer, and residual connections, achieving the following technical gains: The multi-scale feature extraction module, through a three-branch parallel architecture of depthwise separable convolution, large-kernel dilated convolution, and fully connected mapping, simultaneously captures local details, global trends, and cross-dimensional interaction features in DGA data. Ablation experiments confirm that the contributions of each branch are independent and complementary. The hybrid attention module adopts a two-level cascaded structure of channel attention and spatial attention, achieving progressive and precise focusing by first selecting channels and then determining positions. The self-attention encoding layer explicitly models long-range dependencies between features through a multi-head self-attention mechanism, significantly improving the recall rate of composite faults. Residual connections effectively alleviate the gradient degradation problem of deep networks and preserve low-level feature information. The synergistic effect of these modules results in substantial improvements in diagnostic accuracy, convergence efficiency, and composite fault identification capabilities.
[0142] Although the deep neural network model of this invention has undergone several enhancements in its architectural design, it maintains a clear and concise modular structure overall. The functional boundaries of each module are clearly defined, facilitating engineering implementation and maintenance. The total number of parameters in the model is controlled within a moderate range, enabling real-time inference on ordinary servers or even edge computing devices. The time for a single inference is in the millisecond range, meeting the dual requirements of real-time performance and resource constraints of the online monitoring system for power transformers.
[0143] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.
Claims
1. A method for assessing the health status of a power transformer, characterized in that: The method includes the following steps in sequence: (1) Acquire dissolved gas concentration data monitored by the sensor, wherein the dissolved gas includes hydrogen. methane ethylene ethane Acetylene Five gases were used in total. The obtained dissolved gas concentration data were preprocessed, including missing value filling and outlier removal. The preprocessed data were then divided into training set, test set and validation set in a ratio of 6:2:
2. (2) Perform intelligent feature engineering on the preprocessed data to generate an extended feature vector X; (3) Construct a deep neural network model that integrates multi-scale convolution and hybrid attention mechanism, input the extended feature vector X into the deep neural network model for training, and obtain the trained model; (4) After the test set data is preprocessed and feature engineering processed, it is input into the trained model. The trained model outputs the health status assessment results of the transformer.
2. The method for assessing the health status of power transformers according to claim 1, characterized in that: In step (2), the intelligent feature engineering process specifically includes the following steps: (2a) Calculate the pairwise ratios of the concentrations of the five dissolved gases to obtain 10 ratio characteristics. The 10 ratio characteristics include and its reciprocal form; ratio characteristics The calculation formula is as follows: ; in, This represents the concentration value of the i-th gas; C is a very small positive constant used to prevent division by zero errors; j This represents the concentration value of the j-th gas; (2b) Calculate the gas statistical characteristics, which include the mean, standard deviation, maximum, minimum and range of the concentrations of the five gases; (2c) Calculate the key gas ratio characteristics, which include the proportion of each hydrocarbon gas in the total hydrocarbons; (2d) The dissolved gas concentration data, ratio features, gas statistical features, and key gas ratio features are concatenated into an extended feature vector. , where d is the expanded feature dimension; (2e) The extended feature vector X is normalized to the [0,1] interval using the Min-Max normalization method.
3. The method for assessing the health status of power transformers according to claim 1, characterized in that: In step (3), the deep neural network model includes a multi-scale feature extraction module, a hybrid attention module, a self-attention encoding layer, a residual connection layer, and a classification output layer connected in sequence; The multi-scale feature extraction module comprises three parallel branches: a depthwise separable convolution (DSC) branch, a large-kernel dilated convolution branch, and a fully connected mapping branch. These three branches extract local patterns, global receptive fields, and dimensionality interaction information of the input features from different scales, respectively. The outputs of these three parallel branches are concatenated and fused to obtain a multi-scale fused feature map. ; Hybrid attention modules in multi-scale feature map fusion The channel attention submodule and the spatial attention submodule are applied sequentially to obtain the output feature map of the hybrid attention module. The channel attention module is used to adaptively learn the importance weights of different feature channels, while the spatial attention module is used to focus on key spatial locations in the feature map. The self-attention coding layer is based on the Transformer encoder structure, uses a multi-head self-attention mechanism to capture the global dependencies between features, and is supplemented by a feedforward neural network for nonlinear transformation; The residual connection layer adds the output of the self-attention encoding layer and the input of the multi-scale feature extraction module through a skip connection to obtain the output of the residual connection layer. This is to alleviate the gradient vanishing problem and accelerate model convergence; After flattening the output of the residual connection layer, the classification output layer consists of a fully connected layer and a Softmax activation function, and outputs the confidence probability distribution of various fault states.
4. The method for assessing the health status of power transformers according to claim 1, characterized in that: In step (4), the health status assessment results of the transformer include at least one of the following: transformer fault type prediction label, prediction confidence probability value of each fault type, channel attention weight distribution, and spatial attention heatmap. The transformer fault type prediction labels include normal state, thermal fault (overheating), partial discharge fault, and arc discharge fault. The channel attention weight distribution refers to the degree of contribution of each feature channel to the diagnostic results, and is used to identify key influencing factors. The spatial attention heatmap refers to the key feature regions that the model focuses on, which helps maintenance personnel understand the basis of the model's decision-making.
5. The method for assessing the health status of power transformers according to claim 3, characterized in that: The depthwise separable convolutional (DSC) branch sequentially includes a depthwise convolutional layer, a pointwise convolutional layer, a normalization layer, and a ReLU activation function. The depthwise convolutional layer uses a grouped convolution method to perform spatial convolution independently on each input channel. The depthwise convolutional layer consists of two cascaded depthwise separable convolutional blocks, and each depthwise separable convolutional block is followed by a max pooling layer. The pointwise convolutional layer uses 1×1 convolution to fuse information between channels. The large-kernel dilated convolution branch uses dilated convolution with a kernel size of 7×7 and an expansion rate of 3 to expand the receptive field without increasing the number of parameters, in order to capture the global trend of gas concentration data. The fully connected mapping branch consists of two fully connected layers. The first fully connected layer maps the input features to a high-dimensional latent space, and the second fully connected layer reshapes the output of the first fully connected layer into a feature map format with the same dimensions as the other two branches. The outputs of the three parallel branches are concatenated along the channel dimension, and then processed by a 1×1 convolutional layer to integrate the channels, resulting in a multi-scale fused feature map. Where C is the number of channels, and W and H are the width and height of the multi-scale fused feature map, respectively.
6. The method for assessing the health status of a power transformer according to claim 3, characterized in that: The hybrid attention module includes a channel attention submodule and a spatial attention submodule; First, the input feature map is processed. Global average pooling and max pooling are performed separately to obtain two different spatial context descriptors. These are then processed by a shared multilayer perceptron (MLP), which includes a dimensionality reduction layer and an dimensionality increase layer, with ReLU activation between the two layers. Finally, the feature vectors output from the dimensionality reduction and increase layers are element-wise summed and then passed through a sigmoid activation function to obtain the channel attention weight vector. : ; in, For the Sigmoid function, For average pooling function, It is the max pooling function; Channel attention weight vector With input feature map Multiply to obtain the output of the channel attention submodule. Complete the feature recalibration along the channel dimension: ; in, This represents broadcast multiplication. Output of the channel attention submodule Average pooling and max pooling operations are performed along the channel axis respectively, and the concatenation results in a dual-channel spatial descriptor; subsequently, a two-dimensional spatial attention weight map is generated by passing it through a 7×7 convolutional layer and a sigmoid activation function. W and H represent the width and height of the multi-scale fused feature map, respectively. ; in, This indicates a convolution operation with a kernel size of 7×7; For channel-dimensional global average pooling function, It is a channel-dimensional global max-pooling function; Two-dimensional spatial attention weight map With the output of the channel attention submodule Multiplying them together yields the output feature map of the hybrid attention module. : 。 7. The method for assessing the health status of power transformers according to claim 3, characterized in that: The self-attention encoding layer will convert the output feature map of the hybrid attention module Flattened into a one-dimensional input feature sequence Where L is the sequence length and D is the embedding dimension at each position; then, multi-head self-attention is calculated for Z, specifically including the following steps: (7a) Through three independent linear transformation matrices Map the one-dimensional input feature sequence Z to the query matrix Q, the key matrix K, and the value matrix V, respectively: ; (7b) For each head attention s, compute the scaled dot product attention. : ; Where s = 1, 2, ..., S, and S is the number of attention heads; Let be the query matrix for the s-th attention head; Let be the key matrix of the s-th attention head. Let be the value matrix of the s-th attention head; This is the attention score matrix; Let be the dimension of the key vector for each attention; This is the normalization function; (7c) The output of the multi-head self-attention module is obtained by concatenating the outputs of all attention heads and then performing linear projection. : ; in, To output the projection matrix; For splicing operations; This is the output of the first attention head; This is the output of the S-th attention head; (7d) A feedforward neural network is connected after the multi-head self-attention module. The input of the feedforward neural network is the features. : ; in, This represents the sum of residuals; Z is the input to the multi-head self-attention module, i.e., the one-dimensional input feature sequence; LayerNorm is layer normalization; The feedforward neural network consists of two cascaded fully connected blocks with identical structures: a first fully connected block and a second fully connected block. Each fully connected block includes a fully connected linear transformation, a Gaussian error linear unit activation function (GELU), and a Dropout regularization operation. First fully connected block receive As input, through the first weight matrix With the first bias vector A linear transformation is performed to obtain the intermediate hidden representation. This intermediate hidden representation is then passed sequentially through the GELU activation function and the Dropout regularization layer to obtain the output of the first fully connected block. : ; The second fully connected block receives the output of the first fully connected block. Through the second weight matrix With the second bias vector Perform a linear transformation to obtain the original output of the feedforward neural network. Then the original output The output of the second fully connected block is obtained by sequentially passing the GELU activation function and the Dropout regularization layer. : ; The output of the second fully connected block With the input of the feedforward neural network The output of the self-attention encoding layer is obtained by summing the element-wise residuals and then normalizing them through a LayerNorm layer. : 。 8. The method for assessing the health status of a power transformer according to claim 3, characterized in that: The output of the residual connection layer for: ; in, For multi-scale fused feature maps, the identity mapping component is used as a skip connection; These are the feature components processed by the hybrid attention module and the self-attention coding layer. SAEL is the self-attention coding layer, and HAM is the hybrid attention module.
9. The method for assessing the health status of a power transformer according to claim 1, characterized in that, In step (3), the training process of the deep neural network model uses the cross-entropy loss function with class weights as the optimization objective: ; Where T represents the total number of fault categories. One-hot encoding for the real label, Let be the probability of class t predicted by the model. Let be the weight coefficient of class t; The value is inversely proportional to the number of samples in each category, as shown in the following formula: ; in, The total number of training samples, Let be the number of samples in class t; an early stopping strategy is also adopted during training, and training is stopped when the validation set loss does not decrease for P consecutive rounds, where P is a preset positive integer threshold.