Short-Term Prediction of Electronic Transformer Error Based on Intelligent Algorithms

As the key metering equipment in the smart grid, the measurement accuracy and stability of electronic transformer are important for the normal operation of power system. In order to solve the problem that there is no effective way to predict the error developing trend of electronic transformer, this paper proposed two kinds of short-term prediction methods for electronic transformer error based on the backpropagation neural network and the Prophet model, respectively. First, preprocessing and visualization operation are performed on the original error data. *en, the data fitting and short-term prediction of electronic transformer error are made on the basis of the backpropagation neural network and the Prophet model, and the fitting and prediction results of the two methods are compared and analysed in combination with four evaluation indexes. Finally, the Prophet model is adopted to simulate the development trend and periodic fluctuation of error, and the reason for fluctuation is analysed. *e simulation results show that the Prophet model is more suitable for the prediction of electronic transformer measurement error than the backpropagation neural network.


Introduction
As a key equipment for signal acquisition in the power system, the transformer provides a reliable basis for electric energy measurement, condition monitoring, and relay protection. e electronic transformer (ET), as the important equipment for digitizing electric parameter information in the smart grid, has been highly valued. However, compared with the traditional electromagnetic transformer, ET has a more complicated structure and lower stability, which is easy to exceed error tolerance in the actual operation.
During the actual operation process of ET, it is not only necessary to accurately and quickly diagnose the abnormality of the measurement error, but also to make timely predictions on the deterioration trend of measurement error, so that the related personnel can carry out the inspection and maintenance and thus reduces the loss of electric energy measurement and ensures the normal operation of the monitoring protection device, which is of great significance for ensuring the safe, stable, and economical operation of the power system. So far, many researchers have studied the fault analysis of power transformers and have proposed some typical fault diagnosis methods. Gutten et al. [1] adopt sweep frequency response analysis through time impact test to analyse power transformer winding faults. Rigatos and Siano [2] propose a neural fuzzy network considering hotspot temperature for the detection of incipient faults in power transformers. Yang et al. [3] propose a fault diagnosis method for power transformer based on BA-PNN. Based on the dissolved gas analysis (DGA), the power transformer fault type can be obtained by inputting three key gas ratios through BA-PNN. Mejia et al. [4] applied empirical mode decomposition (EMD) into inrush current signals of power transformer, and thus, three indexes can be obtained providing the proper quantification of the fault severity. However, compared with the power transformer, ET has higher precision and smaller size, and the structures of ET and power transformer are quite different. erefore, the fault analysis methods mentioned above are not suitable for ET. Meanwhile, the error trend prediction method driven by data is an important way to detect equipment failure in advance, which can be utilized in the prediction of ET's metering error.
Intelligent algorithms are often used for data prediction, among which the more common methods include the neural network and the Prophet model. e neural network has been applied in many fields, such as the prediction of power system load [5], oil breakdown voltage [6], and railway freight volume [7]. And the Prophet model has obtained good effect as well in the prediction of bank reserve payment [8], product sales volume [9], daily air quality index [10], and other aspects. However, the research on the prediction of the ET measurement state is almost blank. Because the prediction of secondary output information of ET will be affected by the random fluctuation of the grid state, there is no effective way to predict the trend of the measurement error of ET yet. Error comparison with traditional transformers is still widely adopted in the state analysis of ET for now, which is difficult to meet the requirements of error state analysis under the scenario of large-scale application of ET.
erefore, under the situation of no standard transformer, making full use of the measurement data of ET in the smart grid, this paper analyses and simulates the development trend of ET error through the backpropagation neural network (BPNN) and the Prophet model, respectively, so as to ensure the safe and stable operation of ET.

Data Source.
e ET error data used in this paper is obtained through a 220 kV ET metering error condition monitoring platform shown in Figures 1 and 2.
In the monitoring platform, the electromagnetic current transformer and the air-core coil current transformer are installed at the line interval. e accuracy of the two transformers are both 0.2, and their rated current is 600 A. e electromagnetic transformer's rated output is 5 A, the rated secondary capacity is 25 V·A, and ratio error and phase error under the rated current are 0.08% and 6′, respectively; the air-core coil current transformer's ratio error and phase error under the rated current are 0.12% and 6′, respectively, and its output complies with the IEC61850-9-2 protocol [11]. e signal acquisition unit converts the analog signal of the electromagnetic current transformer into a digital signal. e data processing unit, which meets the accuracy requirement of 0.05 level, receives the output signal and sampled value message data of the signal acquisition unit and then obtains the error comparison result by taking the output of the electromagnetic current transformer as the standard.
In this paper, ET metering error prediction methods based on BPNN and the Prophet model are proposed. In the case study, the phase error data are taken as an example to illustrate the effectiveness of the proposed prediction methods. e original transformer phase error data are the actual running data of the ET during the period from July 1 to 31, 2018, and the sampling interval is 1 s, as shown in Figure 3.

Data Preprocessing.
Since the error data of ET are generally irregular and contain noise, the following preprocessing operations need to be performed on the phase error dataset before using the intelligent algorithms to predict the phase error of ET [12]: (1) Set the upper and lower boundary of phase error data and delete the abnormal value. (2) Determine the ratio of missing values in the dataset.
When the ratio is large, Lagrange interpolation or Newton interpolation will be adopted to supplement data; when the ratio is small, extra processing is not necessary. (3) Due to the high acquisition frequency of the signal acquisition unit, the data samples of one month contain more than 2.6 million sets of data, and thus, the solving of the prediction model becomes very difficult. erefore, the average values of the hourly phase error can be obtained by (1), which are used as the training samples to reduce the prediction complexity and improve the prediction efficiency of the model: where p ah i represents the average values of hourly phase error and p as j represents the per-second sample value of phase error. e ET phase error data after preprocessing is shown in Figure 4. Figure 4 can show the hourly variation curve of the ET phase error, the symmetry, the dispersion level, and the general development trend of the phase error data cannot be visually seen through Figure 4. is paper introduces the boxplot to visualize the phase error data. e boxplot [13] is a common method for data visualization, which mainly uses five kinds of statistics to describe the data: the minimum, the first quartile, the median, the third quartile, and the maximum. e preprocessed dataset is divided into 31 groups of datasets at intervals of 24 h, corresponding to the time period from July 1 to 31. e boxplot is drawn as shown in Figure 4.

Data Visualization. Although
It can be seen from Figure 5 that in July, the overall distribution of the ET phase error is relatively uniform and the dispersion level is relatively stable. Only a few days (3 rd , 5 th , 6 th , 7 th , 8 th , and 22 nd ) have relatively more abnormal values, and thus, the distribution can be seen as concentrated to some degree. On 13 th to 21 st , the median line is in the middle, and the phase error presents normal distribution; at the beginning and the end of the month, the median line is shifted upwards, and the phase error presents skew

Prediction Model Based on Intelligent Algorithms
e BPNN algorithm widely used in various fields and the Prophet model which has a huge advantage in processing periodic data are chosen in this paper to make short-term prediction of the ET metering error data.

Backpropagation Neural Network.
e BPNN [14] is a concept proposed by scientists led by Rumelhart and McClelland in 1986. BPNN is a multilayer feedforward neural network trained by the backpropagation algorithm, which is one of the most widely used neural networks. BPNN has a simple structure and fast convergence.
ere are many factors influencing the error developing trend of ET, and thus, it is difficult to establish an analytical model. However, BPNN can realize a mapping function from input to output without knowing the analytical expression, which is especially suitable for the simulation of the system with complex internal mechanism. According to the Kolmogorov theorem, as long as the number of hidden layer nodes of a 3-layer BPNN is sufficient, any nonlinear continuous function can be approximated on the closed set with arbitrary precision [15]. erefore, BPNN is applicable for the prediction of ET measurement error.
A typical BPNN topology [16] is shown in Figure 6, which contains input layer, hidden layer, and output layer. Each layer consists of a certain number of neurons. All the neurons in the upper and lower layers are interconnected, and the connection strength is represented by the weight. But neurons in the same layer are not interconnected.
In the figure, x 0 , x 1 , . . . , x l−1 stand for the inputs. It is assumed that there are m neurons in the hidden layer, the inputs of which are x 0 ′ , x 1 ′ , . . . , x m−1 ′ . ere are n neurons in the output layer, the outputs of which are y 0 , y 1 , . . . , y n−1 .
e weight and threshold of input layer to hidden layer are w ij and θ j , respectively; the weight and threshold of hidden layer to output layer are w jk ′ and θ k ′ , respectively. e outputs of neurons in each layer are as follows: where f(•) is the activation function, and the S-type activation function is shown in the following equation: e output values are obtained by the input values through the activation functions of each layer. e network 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29   corrects each weight according to the reducing direction of error of the output value and actual value, so as to approximate the output response value to the actual value with set accuracy level through constant iterations.

e Prophet Model.
e Prophet model is a model developed by Facebook for large-scale time series analysis, which has an open access software package to facilitate the implementation of model algorithms [17,18].
rough the ET phase error data and its analysis, it can be seen that the fluctuation of ET phase error in July is obviously periodic. e Prophet model is designed to handle complex features in time series, which has very powerful predictive capabilities and is especially good at handling daily periodic data with shifts in trend [19], and thus is suitable for the prediction based on ET measurement error.
e Prophet model is robust to missing data and handles large outliers well, which can have good performance when the actual operation data of ET is not complete or has outliers. In addition, this model is also designed to have intuitive parameters that can be adjusted without knowing the details of the underlying model [20].
e Prophet model uses a generalized additive model to fit and predict functions, as shown in (4), where the model regards the time series as a superposition of three parts: the trend g(t), the period s(t), and the mutation h(t): (a) If the growth trend of time series is nonlinear, g(t) is a logistic regression function; if the growth trend is linear, g(t) is a linear function. It can be seen from the boxplot of ET phase error that the growth trend is linear, and thus, the linear growth model is adopted in this paper. (b) s(t) represents the periodic change, which consists of Fourier series: where p indicates the period of the target time series. c n is the parameters to be estimated. N is the set number of approximation terms. e larger N is, the more complex periodicity can be fitted, but the filtering effect may be not good. e setting of N needs to be considered in combination with p. For the periodicity of each week, p is set to 7, and N is set to 3 [8].
where D i indicates the dates with special changes in the time series; l is an indicator function representing whether time t belongs to D i ; k follows normal distribution, i.e., k ∼ N(0, v), and the larger v is, the larger fluctuations the model is allowed to adapt to, while the smaller value of v will suppress the influence of the model. (d) ε t is a noise term that follows normal distribution and is used to represent random and unpredictable fluctuations.

Parameter Settings of BPNN.
Before using the BPNN to predict the phase error of ET, the preprocessed data need to be standardized. e Z-score standardization method is adopted in this paper, as shown in the following equation: where μ and σ are the mean and the standard deviation of ET phase error dataset, respectively. e parameter settings of BPNN include the number of hidden layers, the number of neurons in each layer, the neuron training function of each layer, and the learning efficiency. ese parameters have a great influence on the final fitting and prediction accuracy. Unreasonable parameter settings will easily cause the error convergence of neural network fall into local optimum and thus cannot meet the accuracy requirement. Moreover, it is noteworthy that too high target fitting accuracy may lead to the overfitting phenomenon of the neural network, which will reduce the prediction accuracy.
In the BPNN training, the neural network parameters can be continually modified through looping statements, and multiple sets of experimental results can be obtained, so that the optimal parameter settings can be obtained through comparison. e parameter selection and training process of BPNN are shown in Figure 7. e loop in Figure 7 represents the number of loops. After multiple cycles of the comparison test, the parameter settings with the best prediction effect are shown in Table 1.

Parameter Settings of the Prophet Model.
Before using the Prophet model to predict the ET phase error, the preprocessed data need to be adjusted according to the data requirements of Prophet. e data should be changed to two columns of data frame with fixed name: ds and y, where the columns of ds are the date and the columns of y are the series of phase error of ET. After the format of input data is processed, parameters of the Prophet model will be set according to Table 2. e process of prediction phase error of ET with the Prophet model is presented in Figure 8.

Prediction Evaluation Indexes.
In order to improve the accuracy of the two prediction methods, the data of July are divided into the training set and the test set according to the ratio of 7 : 3. e training set contains the data from 1 st to 21 st , while the test set contains the data from 22 nd to 31 st . In order to evaluate the accuracy of the prediction methods, the verification set is composed of the actual operating data of Journal of Control Science and Engineering ET from August 1 st to 8 th . e mean absolute error (MAE), mean absolute percentage error (MAPE), mean square error (MSE), and root mean square error (RMSE) are taken as the accuracy measurement indexes to compare the prediction data with the data in the verification set:

Prediction Result.
e prediction results of the ET phase error using BPNN and the Prophet model are shown in Figures 9(a) and 9(b), respectively, and the evaluation index comparison of the two methods is shown in Table 3.
4.5. Discussion. As can be seen from Figure 9(a), since the overfitting of the neural network may cause worse prediction effect, the BPNN fitting curve and the actual operation curve in the prediction result are not completely matched due to the appropriate parameter settings of BPNN. In terms of prediction results, the BPNN only predicts the general trend of the ET phase error in the next 8 days. Although the MAE and RMSE indexes are not high, the daily prediction error is relatively large.
As can be seen from Figure 9(b), the Prophet model has a good effect in fitting to the ET phase error data and is highly inclusive for the mutation points and abnormal points. At the same time, as the Prophet model is very good at predicting time series with obvious periodicity, the prediction curve not only is in line with the development trend of phase error, but also has lower value of MAE and RMSE indexes. Moreover, the daily prediction error of this method is also very small, and thus, the prediction curve is very close to the actual operation curve.
rough the comparison of Figures 9(a) and 9(b), it can be seen that since the Prophet model does not exist overfitting problem, the fitting effect of the Prophet model is better than that of the BPNN method. Furthermore, compared with four evaluation indexes in Table 3, the prediction trend of the Prophet model is more accurate than that of the BPNN method. erefore, for the ET phase error prediction, the method based on the Prophet model is significantly better than the method based on BPNN. e Prophet model fits the time series according to (4). When the Prophet model is adopted to predict the phase error of ET, in addition to the prediction results, the development trend and periodic fluctuation of the phase error over a period of time can be obtained as well, as shown in Figure 10. e trend component in Figure 10 represents the development and prediction trend of the ET in July, and the blue shading indicates the confidence interval of the prediction. e weekly and daily components represent the weekly fluctuations and daily fluctuations of the ET phase error. Comparing the fluctuation amplitude of each component, i.e., the trend term (−0.02, 0.04), the weekly fluctuation (−0.0025, 0.015), and the daily fluctuation (−0.03, 0.03), it can be found that the variation of the ET phase error is mainly the daily fluctuation.
In the daily component, it can be seen that the phase error is at a very high level from 9 : 00 PM to 8 : 00 AM of the next day, while at a very low level from 10 : 00 AM to 6 : 00 PM.
is phenomenon may be caused by temperature variation between day and night, resulting in the difference between the error variation speed of the air-core coil current transformer and the electromagnetic current transformer, which caused significant daily fluctuations in the final phase error data. erefore, the trend component of the metering

Conclusions
e short-term prediction methods of ET error based on BPNN and the Prophet model are proposed in this paper. After the preprocessing of data, the prediction of 8 days is made based on the ET phase error data in July through the proposed methods, and then, the indexes of MAE, MAPE, MSE, and RMSE are adopted to compare and analyse the prediction results of the two methods.
rough the case results, the following conclusions can be obtained: (1) e fitting effect of the BPNN is negatively correlated with the prediction effect, while the Prophet model can obtain better fitting effect as well as ensures the prediction accuracy (2) rough the comparison of image results and quantitative analysis, it can be seen that the prediction effect of the Prophet model on the error of ET is significantly better than that of the BPNN method   (3) e periodic change of the ET error mainly depends on the daily fluctuation, which may be caused by the change of the error variation speed due to the temperature change in one day In summary, the Prophet model, which is good at predicting obviously periodic time series, is more suitable for short-term prediction of ET error than BPNN.
Currently, we have completed the short-term prediction of the trend of the metering error of ET through the historical metering error data. In the follow-up work, more historical operating data of ETs in different periods will be collected, including factory, operation, failure, and scrapping. us, a multisample space of ETs can be built, so as to realize the simulation of the whole life cycle operation situation of ETs driven by data and provide reference for the operation and maintenance of ETs under the corresponding types.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.