A transformer oil dissolved gas prediction method based on NBEATSx algorithm

CN123017223APending Publication Date: 2026-10-30NANCHANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411537575.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

虽然这些模型都取得了一定的效果,但也存在一定的局限性,大多模型只考虑了单个油中溶解气体的历史数据,没有考虑变压器油中溶解气体之间的影响和其他因素的影响

Benefits of technology

[0037]本发明提供的一种基于NBEATSx算法的变压器油中溶解气体预测方法,利用全连接层对时间序列进行分解,通过不同的函数形式建模时间序列的周期项、趋势项等,并考虑气体之间的影响和其他因素的影响,能够提升模型的可解释性,有助于提升变压器油中溶解气体含量的预测精度和效果,也能为变压器的早期故障预警提供可靠的保障。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123017223A_ABST
    Figure CN123017223A_ABST
Patent Text Reader

Abstract

The application discloses a transformer oil dissolved gas prediction method based on an NBEATSx algorithm. First, transformer oil dissolved gas and load online monitoring data samples are collected; second, a prediction target gas is determined, other oil dissolved gases and loads are used as exogenous variables, time series sample data is normalized, and the data is divided into a training set, a validation set and a test set; finally, a transformer oil dissolved gas prediction model based on the NBEATSx algorithm is constructed, model parameter optimization is carried out by using an adaptive genetic algorithm, and through time series signal decomposition and considering time exogenous variables, the accurate prediction of the oil dissolved gas content at a future time is realized. The application can fully consider the connection between feature gases and the influence of external factors, and effectively improve the accuracy and effect of transformer oil dissolved gas content prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power equipment monitoring technology, specifically to a method for predicting dissolved gases in transformer oil based on the NBEATSx algorithm. Background Technology

[0002] As an indispensable core component of the power system, the safe and reliable operation of power transformers is a prerequisite for ensuring the safe and reliable operation of the entire power system. During operation, transformers may experience faults such as overheating, discharge, and short circuits due to various reasons, leading to the decomposition of oil and insulating materials, producing various gases, including hydrogen, methane, ethane, ethylene, acetylene, carbon monoxide, and carbon dioxide. Accurate prediction of dissolved gases in transformer oil can help anticipate the transformer's operating status and promptly detect internal defects, thus ensuring the safe and reliable operation of the transformer.

[0003] Currently, deep learning models are widely used in predicting dissolved gases in transformer oil, such as recurrent neural network models, long short-term memory models, and convolutional neural network models. These models leverage the powerful learning and feature extraction capabilities of deep learning to accurately predict future trends in dissolved gas content. While these models have achieved some success, they also have limitations. Most models only consider historical data for dissolved gases in individual oil samples, neglecting the influence of interactions between dissolved gases and other factors. Furthermore, compared to traditional models, the complexity of deep learning models makes interpretable extraction and analysis more difficult. Summary of the Invention

[0004] To address the problems existing in the prior art, the present invention aims to provide a method for predicting dissolved gas content in transformer oil based on the NBEATSx algorithm. This method decomposes time series signals, considers time-dependent exogenous variables, and optimizes the hyperparameters of the model using an adaptive genetic algorithm, thereby achieving accurate prediction of the dissolved gas content in the oil at future times.

[0005] To achieve this objective, the present invention employs the following technical solution: a method for predicting dissolved gases in transformer oil based on the NBEATSx algorithm, comprising the following steps:

[0006] S1: Collects online monitoring data on dissolved gases in transformer oil and load. The dissolved gases in the oil mainly include seven gases: H2, CH4, C2H6, C2H4, C2H2, CO, and CO2.

[0007] S2: Determine the target gas for prediction, with other gases and loads as exogenous variables. Normalize the time series sample data of the above gases and loads, and divide the normalized time series sample data into training set, validation set and test set.

[0008] S3: Construct a prediction model for dissolved gases in transformer oil based on the NBEATSx algorithm.

[0009] S4: Train the NBEATSx model and use an adaptive genetic algorithm to optimize the hyperparameters of the NBEATSx model.

[0010] S5: Predict the dissolved gas content in oil based on the optimized NBEATSx model and evaluate the effectiveness of the NBEATSx model.

[0011] Furthermore, the normalization process described in S2 is mainly to eliminate the influence of different dimensions between data, using minimum-max standardization. The transformation rule is as follows:

[0012]

[0013] In the formula, x represents a certain time-series sample data. * For the normalized time series sample data, x min x is the minimum value in this time series sample data. max This is the maximum value in the time series sample data.

[0014] Furthermore, as described in S2, the normalized time series sample data is divided into a training set, a validation set, and a test set, with a ratio of 7:1:2.

[0015] Furthermore, the specific steps for constructing the NBEATSx model for predicting dissolved gases in transformer oil based on the NBEATSx algorithm, as described in S3, are as follows:

[0016] S3.1: Assume the target gas is represented by vector y, and the input to the NBEATSx model is a backtracking window vector y of length L. back and a prediction window vector y of length H for Where L is the lag length available for classical autoregressive features, H is the prediction length of the target, exogenous variables are represented by matrix X, and the NBEATSx model consists of S stacks, each stack consisting of B basic structural blocks.

[0017] S3.2: For a given s-th Stack and its b-th Block, the NBEATSx model performs two transformations. The input to the Block includes the historical sequence and exogenous variables. The two are transformed into hidden states h using a fully connected FCNN layer. s,b Then through two linear layers LINEAR back and LINEAR for It will be converted into coefficients. and and The transformation process retains information from historical sequences and exogenous variables, and is as follows:

[0018]

[0019] Obtaining coefficients and Then, a mapping is performed to obtain predictions of past and future values. and The transformation process is as follows:

[0020]

[0021] In the formula, and These are the basis vectors for backtracking and prediction, respectively.

[0022] S3.3: Stack blocks using the principle of double residual superposition, and backtrack the residuals. It is by Subtract the b-th block from the s-th stack. The basis vector-related components, and the prediction of the stack. The predictions from each block are aggregated, and the formula is as follows:

[0023]

[0024] S3.4: Sum all the Stack predictions to obtain the final prediction result of the NBEATSx model. The formula is as follows:

[0025]

[0026] Furthermore, as described in S4, an adaptive genetic algorithm is used to optimize the hyperparameters of the NBEATSx model. These hyperparameters mainly include the batch size and the number of hidden layer nodes. The adaptive genetic algorithm improves upon the genetic algorithm by adding a crossover and mutation step. The specific steps for optimizing hyperparameters using the adaptive genetic algorithm are as follows:

[0027] S4.1: Create the initial population. Given the search range for each hyperparameter, each individual in the initial population contains all the hyperparameters to be optimized. The values ​​of all hyperparameters are represented by binary codes, and the binary codes of each hyperparameter constitute a chromosome.

[0028] S4.2: Calculate fitness. Calculate the fitness of each individual in the current population. The fitness calculation formula is determined by the specific task.

[0029] S4.3: Selection, Crossover, and Mutation. Selection preserves dominant individuals in the population; crossover creates two new chromosomes representing offspring by exchanging parts of their chromosomes between two selected individuals; mutation randomly modifies one or more chromosomes of each newly created individual, but with a low probability. The specific formulas are as follows:

[0030]

[0031]

[0032] In the formula, f1 represents the fitness of the larger individual among the two crossover individuals, f a For average fitness, f max Q represents the highest fitness in the population, f represents the fitness of the individual that will mutate, and Q is the fitness of the individual that will mutate. c Q represents the probability of a crossover. m Q represents the probability of mutation. c1 =0.9, Q c2 =0.85, Q m1 =0.1, Q m2 =0.096.

[0033] S4.4: Repeat steps S4.2-S4.3 until the set number of iterations is reached or the stopping condition is met.

[0034] S4.5: Select the individual with the highest fitness in the population, perform reverse encoding, and obtain the optimized hyperparameters.

[0035] Furthermore, in S5, the dissolved gas content in oil is predicted based on the optimized NBEATSx model, and the effectiveness of the NBEATSx model is evaluated. The main evaluation indicators are root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R²). 2 ).

[0036] The beneficial effects of this invention are:

[0037] This invention provides a method for predicting dissolved gases in transformer oil based on the NBEATSx algorithm. It utilizes a fully connected layer to decompose the time series, models the periodic and trend terms of the time series through different functional forms, and considers the influence between gases and the influence of other factors. This improves the interpretability of the model, helps to improve the prediction accuracy and effect of dissolved gas content in transformer oil, and can also provide a reliable guarantee for early fault warning of transformers. Attached Figure Description

[0038] Figure 1 This is a flowchart of the method for predicting dissolved gases in transformer oil based on the NBEATSx algorithm in this invention.

[0039] Figure 2 This is a structural diagram of the NBEATSx model in an embodiment of the present invention.

[0040] Figure 3 This is the predicted result of methane gas in the embodiments of the present invention. Detailed Implementation

[0041] The present invention will be further described below with reference to the embodiments. It should be noted that the following embodiments are only used to further illustrate the present invention and should not be construed as limiting the scope of protection of the present invention. Some non-essential improvements and adjustments made by those skilled in the art based on the above-described invention are still within the scope of protection of the present invention.

[0042] like Figure 1 As shown, a specific embodiment of the present invention provides a method for predicting dissolved gases in transformer oil based on the NBEATSx algorithm, comprising the following steps:

[0043] S1: Collects online monitoring data on dissolved gases in transformer oil and load. The dissolved gases in the oil mainly include seven gases: H2, CH4, C2H6, C2H4, C2H2, CO, and CO2. The online monitoring data covers 140 days, with a time interval of 12 hours.

[0044] S2: In this embodiment, methane is identified as the target gas for prediction, while other gases and loads are treated as exogenous variables. The time-series sample data of the aforementioned gases and loads are normalized to eliminate the influence of different dimensions, using minimum-max standardization. The transformation rule is as follows:

[0045]

[0046] In the formula, x represents a certain time-series sample data. * For the normalized time series sample data, x min x is the minimum value in this time series sample data. max This represents the maximum value in the time series sample data. The normalized time series sample data is divided into a training set, a validation set, and a test set, with a ratio of 7:1:2.

[0047] S3: Construct a prediction model for dissolved gases in transformer oil based on the NBEATSx algorithm. The NBEATSx model structure diagram is shown below. Figure 2 As shown.

[0048] In this embodiment, the window vector y is pushed back. back The length is 14 and the prediction window vector y forThe length is 1, and exogenous variables are represented by matrix X. The NBEATSx model consists of three stacks: a trend stack, a seasonal stack, and an exogenous stack. Each stack consists of B blocks, and the blocks in each stack can be projected directly using harmonic functions, multinomial trend functions, and exogenous variables. The formula is as follows:

[0049]

[0050] In the formula, the time vector t Τ =[0,1,2,…,H-2,H-1] / H is discretely defined. When the basis vectors yes When, where N pol The degree of the maximal polynomial is given by the coefficients. These are the coefficients of the trend polynomial model. When the basis vectors... yes

[0051]

[0052] When, coefficient This can be interpreted as Fourier transform coefficients, with hyperparameter N. hr It controls harmonic oscillations. When the basis vector... When the matrix is ​​exogenous, the exogenous basis expansion can be considered as a time-varying local regression. Where N x The number of exogenous variables.

[0053] For a given s-th stack and its b-th block, the NBEATSx model performs two transformations. The input to the block includes the historical sequence and exogenous variables. The two are transformed into hidden states h using a fully connected FCNN layer. s,b Then through two linear layers LINEAR back and LINEAR for It will be converted into coefficients. and and The transformation process retains information from historical sequences and exogenous variables, and is as follows:

[0054]

[0055] Obtaining coefficients and Then, a mapping is performed to obtain predictions of past and future values. and The transformation process is as follows:

[0056]

[0057] In the formula, and These are the basis vectors for backtracking and prediction, respectively.

[0058] Blocks are stacked using the principle of double residual superposition, and residual backtracking is performed. It is by Subtract the b-th block from the s-th stack. The basis vector-related components, and the prediction of the stack. The predictions from each block are aggregated, and the formula is as follows:

[0059]

[0060] The final prediction result of the NBEATSx model is obtained by summing all the Stack prediction results. The formula is as follows:

[0061]

[0062] S4: The hyperparameters of the NBEATSx model are optimized using an adaptive genetic algorithm. In this embodiment, the hyperparameters include the learning rate, batch size, and number of hidden layer nodes. The specific steps are as follows:

[0063] S4.1: Create the initial population. Given the search range for each hyperparameter, each stack contains 2 to 8 blocks, 1 to 64 batches, and 1 to 512 hidden layer nodes. Each individual in the initial population contains all the hyperparameters to be optimized. The values ​​of all hyperparameters are represented by binary encoding, and the binary encoding of each hyperparameter constitutes a chromosome, that is, an individual is represented by three binary chromosomes.

[0064] S4.2: Calculate Fitness. Calculate the fitness of each individual in the current population. Since the prediction error should be as small as possible, i.e., the smaller the error, the higher the fitness. The specific formula is as follows:

[0065]

[0066] In the formula, This represents the root mean square error of the model for the x-th individual in the current population. y represents the maximum root mean square error occurring in the current population. i For the true value sequence of gas, For the gas prediction value sequence, f x Let x be the fitness of the xth individual in the current population.

[0067] S4.3: Selection, Crossover, and Mutation. Selection preserves dominant individuals in the population; crossover creates two new chromosomes representing offspring by exchanging parts of their chromosomes between two selected individuals; mutation randomly modifies one or more chromosomes of each newly created individual, but with a low probability. The specific formulas are as follows:

[0068]

[0069] In the formula, f1 represents the fitness of the larger individual among the two crossover individuals, f a For average fitness, f max Q represents the highest fitness in the population, f represents the fitness of the individual that will mutate, and Q is the fitness of the individual that will mutate. c Q represents the probability of a crossover. m Q represents the probability of mutation. c1 =0.9, Q c2 =0.85, Q m1 =0.1, Q m2 =0.096.

[0070] S4.4: Repeat steps S4.2-S4.3 until the set number of iterations is reached or the stopping condition is met.

[0071] S4.5: Select the individual with the highest fitness in the population, perform reverse encoding, and obtain the optimized hyperparameters. Each stack contains 3 blocks, 4 batches, and 256 hidden layer nodes.

[0072] S5: Predict methane gas content using the optimized NBEATSx model. The prediction results are as follows: Figure 3 As shown, the performance of the NBEATSx model is evaluated using the root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R²). 2 The calculation formula is as follows:

[0073]

[0074]

[0075] In the formula, y i For the true value sequence of gas, This is a sequence of predicted gas values. This represents the mean of the true gas values. The NBEATSx model is compared with other models in terms of evaluation metrics as follows:

[0076]

[0077] Compared to the LSTM model, the NBEATSx model of this invention reduces the root mean square error (RMSE) and evaluation error by 11.58% and 10.669%, respectively, and increases the coefficient of determination by 0.063. Compared to the VMD-LSTM model, the RMSE and evaluation error are reduced by 6.298% and 6.133%, respectively, and the coefficient of determination is increased by 0.029. Compared to the GM-VMD-LSTM model, the RMSE and evaluation error are reduced by 1.682% and 1.776%, respectively, and the coefficient of determination is increased by 0.006. Therefore, compared to the three other models shown, the NBEATSx prediction model performs best, with the smallest error and the highest degree of fit, and can more accurately predict the dissolved gas content in transformer oil.

[0078] The above description merely illustrates preferred embodiments of the present invention, and while the description is relatively specific and detailed, it should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications, improvements, and substitutions without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this patent should be determined by the appended claims.

Claims

1. A method for predicting dissolved gases in transformer oil based on the NBEATSx algorithm, characterized in that: Includes the following steps: S1: Collect online monitoring data of dissolved gases in transformer oil and load. The dissolved gases in the oil include seven gases: H2, CH4, C2H6, C2H4, C2H2, CO, and CO2. S2: Determine the target gas for prediction, with other gases and loads as exogenous variables. Normalize the time series sample data of the above gases and loads, and divide the normalized time series sample data into training set, validation set and test set. S3: Construct a prediction model for dissolved gases in transformer oil based on the NBEATSx algorithm; S4: Train the NBEATSx model and use an adaptive genetic algorithm to optimize the hyperparameters of the NBEATSx model; S5: Use the optimized NBEATSx model to predict the dissolved gas content in oil and evaluate the effectiveness of the NBEATSx model.

2. The method for predicting dissolved gases in transformer oil based on the NBEATSx algorithm as described in claim 1, characterized in that: The normalization process described in S2 uses max-min standardization, and its transformation rule is as follows: In the formula, x represents a certain time-series sample data. * For the normalized time series sample data, x min x is the minimum value in this time series sample data. max This is the maximum value in the time series sample data.

3. The method for predicting dissolved gases in transformer oil based on the NBEATSx algorithm as described in claim 1, characterized in that: As described in S2, the normalized time series sample data is divided into a training set, a validation set, and a test set, with a ratio of 7:1:

2.

4. The method for predicting dissolved gases in transformer oil based on the NBEATSx algorithm as described in claim 1, characterized in that: The specific steps for constructing the NBEATSx model for predicting dissolved gases in transformer oil based on the NBEATSx algorithm, as described in S3, are as follows: S3.1: Assume the target gas is represented by a vector y, and the input to the NBEATSx model is a backtracking window vector y of length L. back and a prediction window vector y of length H for Where L is the lag length available for classical autoregressive features, H is the prediction length of the target, exogenous variables are represented by matrix X, and the NBEATSx model consists of S stacks, each stack consisting of B basic structural blocks. S3.2: For a given s-th Stack and its b-th Block, the NBEATSx model performs two transformations; the input to the Block includes the historical sequence and exogenous variables. The two are transformed into hidden states h using a fully connected FCNN layer. s,b Then through two linear layers LINEAR back and LINEAR for It will be converted into coefficients. and and The transformation process retains information from historical sequences and exogenous variables, and is as follows: Obtaining coefficients and Then, a mapping is performed to obtain predictions of past and future values. and The transformation process is as follows: In the formula, and These are the basis vectors for backtracking and prediction, respectively; S3.3: Stack blocks using the principle of double residual superposition, and backtrack the residuals. It is by Subtract the b-th block in the s-th stack The basis vector-related components, and the prediction of the stack. The predictions from each block are aggregated, and the formula is as follows: S3.4: Sum all the Stack predictions to obtain the final prediction result of the NBEATSx model. The formula is as follows:

5. The method for predicting dissolved gases in transformer oil based on the NBEATSx algorithm as described in claim 1, characterized in that: The adaptive genetic algorithm described in S4 is used to optimize the hyperparameters of the NBEATSx model. The adaptive genetic algorithm improves the crossover and mutation process based on the genetic algorithm. The specific steps of the adaptive genetic algorithm to optimize hyperparameters are as follows: S4.1: Create an initial population; given the search range for each hyperparameter, each individual in the initial population contains all the hyperparameters to be optimized, and the values ​​of all hyperparameters are represented by binary codes. The binary codes of each hyperparameter constitute a chromosome. S4.2: Calculate fitness; calculate the fitness of each individual in the current population. The fitness calculation formula is determined by the specific task. S4.3: Selection, Crossover, and Mutation; Selection preserves dominant individuals in the population; Crossover creates two new chromosomes representing offspring by exchanging parts of the chromosomes of two selected individuals; Mutation randomly modifies one or more chromosomes of each newly created individual; the specific formulas are as follows: In the formula, f1 represents the fitness of the larger individual among the two crossover individuals, f a For average fitness, f max Q represents the highest fitness in the population, f represents the fitness of the individual that will mutate, and Q is the fitness of the individual that will mutate. c Q represents the probability of a crossover. m Q represents the probability of mutation. c1 =0.9, Q c2 =0.85, Q m1 =0.1, Q m2 =0.096; S4.4: Repeat steps S4.2-S4.3 until the set number of iterations is reached or the stopping condition is met; S4.5: Select the individual with the highest fitness in the population, perform reverse encoding, and obtain the optimized hyperparameters.

6. The method for predicting dissolved gases in transformer oil based on the NBEATSx algorithm as described in claim 1, characterized in that: S5 uses the optimized NBEATSx model to predict dissolved gas content in oil and evaluates the model's performance using metrics including root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R²). 2 .