A high order derivation method for distribution network transient data

. Nowadays, high-order data needs to be processed quickly and accurately by various algorithms in distribution networks. It is difficult to ensure the accuracy of calculation both in low-order and high-order cases, due to the theoretical limitations of traditional high-order derivation methods. Aimed to improve the calculation accuracy, a new high-order derivative method based on the polynomial fitting is proposed in this paper. By analyzing the transient characteristics of voltage and current signals in the distribution network, the base fitting-function can be selected, and the coefficient of the base function can be obtained to fit the objective function by the least square method. The original discrete data will be replaced by new fitting-function for derivative operation, which not only ensures the anti-interference ability, but also overcomes the limitations of the traditional polynomial fitting method in high-order cases. The simulation results show that this method has high accuracy in high-order and low-order cases, and has good accuracy and anti-interference ability.


Introduction
The safe and reliable operation of power system is inseparable from the support of its underlying data. In the processing and calculation of power system related data, high-order derivation calculation can be seen everywhere, such as derivation and calculation of distributed parameter line model in time domain [1][2], establishment of equivalent parameter model of power system [3], research on load model identification of power system [4], fault location [5][6], etc. High order derivation has penetrated into all aspects of power system. It is not only closely related to power grid related models, but also closely related to power system state assessment, fault treatment and protection strategy [7][8][9]. Thus, the calculation of higher-order derivative is an important foundation in power system, and it is necessary to accurately calculate higher-order derivative.
In power system, usually the data are the sampled values of voltage and current signals, that is, discrete data. At present, the commonly used methods are difference derivative method and polynomial fitting derivative method. In the differential derivative method, differential is used to approximate the derivative of a point. The greater the sampling frequency is, the higher the accuracy is, and the realization is simple and convenient. However, due to the influence of the boundary effect, the derivative value of the first or the last end in sampling interval is uncertain, that is, the freedom degree minus one. The sampling value of point N can only determine n-1 values of first-order derivative. When the order is increased by one, the degree of freedom is reduced by one. The fundamental reason is that under the truncation and sampling of continuous functions, the first and last data information will inevitably be missing. More importantly, the antiinterference ability of the difference method is very poor, and a weak interference can cause great error. The polynomial fitting method [10][11][12] uses a series of linearly independent polynomials (x, x 2 , ..., x n ) to fit the discrete data, and transforms the discrete data into continuous functions, and replaces the solution with continuous function approximation. However, this method is affected by the fitting accuracy and highest degree. If the fitting accuracy is low, the error will be large. In addition, the order of derivation is restricted by the highest degree of the fitting polynomial. The n-th derivative of the polynomial of degree n is a constant, and the derivative of the n-1 order is a function of one variable. The error is obvious when the derivative order is close to the higher order of polynomial.
In order ensure high accuracy of data fitting, a sine polynomial fitting method to obtain the high-order derivative of grid discrete data is proposed. On the basis of polynomial fitting, according to the characteristics of transient and steady-state components of voltage and current in power system, the sine polynomial function is selected reasonably as the base and the least square method is used to realize polynomial fitting. This method not only improves the fitting accuracy, but also relieves the restriction of derivative order. The experimental results show that the method has small error, strong anti-interference ability and high reliability.

The principle of sine polynomial fitting
The voltage and current transient signals in power grid can be expressed in the following form [13][14], taking the current signal as an example : Where i(t), i s (t), i t (t) represent current signal, current steady-state component and current transient component respectively, which Ȧ is angular velocity under power IUHTXHQF\ LHʌ The steady-state current i s (t) can be sinusoidally decomposed into two components with coefficients A 0 and B 0 , respectively. As for the transient component i t (t), it consists of high-frequency attenuation component ‫)ݐ(݃‬ , and DC attenuation component in which C and ߬1 is the coefficient and time constant. In the actual distribution network, the transient current component will decay and return to zero, as shown in Figure 1. Different from the general polynomial method based on (x, x 2 , ..., x n ), after analyzing the characteristics of the above distribution network data, sine function is added to the polynomial to make the selected polynomial closer to the distribution network data. Therefore, the exponential attenuation function is applied to the polynomial to constrain the transient components. The sinusoidal polynomial used to fit the transient signal can be written as following: Where the transient component is fitted by a sinusoidal polynomial with attenuation. Where, ߬2 is the attenuation time constant, which can be adjusted and corrected according to the actual grid data.
So the problem becomes to get the value of the unknown coefficient ‫ܣ‬ ‫ܤ‬ ܽ ܾ … ܽ ܾ in ‫(‬t) to approximate the objective function ݅(t) . The value of unknown coefficient can be obtained by least square method [15]: In the formula, equation (5) is the constraint condition, and the sum of square errors in equation (4) is minimum; ‫ݐ‬ is the sampling time, ‫ݐ(‬ ) is the fitting value at time ‫ݐ‬ , ‫ݐ(݅‬ ) is the actual value at time ‫ݐ‬ ; ߜ is the fitting error of the ith sampling value.

Realization of algorithm
The following equation (6) can be expanded from equation (3): Where , Assumming m+1 sampling points, i=0,1,…,m for ‫ݐ‬ . After substituting equation (6) into equation (5), it can be seen that the aim of finding the minimum value of sum of square errors ԡߜԡ ଶ ଶ can be transformed into finding the extremum point of multivariate functions. Te result is as follows : = ݀ (10) Then equation (7) can be expressed as : σ ൫߮ , ߮ ൯ ୀ ܽ = ݀ (݇ = 0,1, … ,2݊ + 1) (11) Equation (11) can be expressed as matrix to facilitate the implementation of MATLAB. Matrices A, B are created as follows: Where ߮ ൫‫ݐ‬ ൯ is the value of function ߮ ‫)ݐ(‬ at time ‫ݐ‬ . Therefore, equation (11) can be expressed as Equation (14) is a system consist of linear equations about the coefficient ܽ of sine polynomial. Since the polynomial ĳ j (j=0, 1, …, 2n+3) is linearly independent, the coefficient matrix A ‫כ‬ ‫ܣ‬ ᇱ of the equation system is full rank and unique solution, which is recorded as point O(ܽ ‫כ‬ , ܽ ଵ ‫כ‬ , … , ܽ ଶାଷ

Simulation analysis
The method is verified by simulating current signal with DC attenuation and high frequency attenuation signals, and compared with traditional difference method and polynomial fitting method. The current signal after fault is set as follows: The sampling frequency is 2000Hz, the sampling period is 0.02ms, the highest order of sine polynomial is n = 15, ߬2 = 0.02, and the highest degree of polynomial is n = 15. It is verified that the derivative order N is 1, 5, 8, 13 and 15 separately without interference.
In order to compare the differences between the results of different methods, this paper evaluates the effect of each method through the maximum relative error.
The calculation method is as follows: Every time the difference method calculates the first derivative, it will result in a lack of data. And the boundary of the result calculated by the difference method may have serious deviation from the real value. Therefore, in the following comparison, the boundary value calculated by the difference method is not included in the calculation. By comparing the e of different methods when N = 1,5,8,13,15, we can confirm the effectiveness of the method in this paper. Because of the limitation of polynomial method, the accuracy of polynomial method is not ideal when the order of derivation is high. The difference method is seriously affected by the edge effect, and there is a gap between the calculation results of the difference method and the method proposed in this paper when the edge value is not calculated in the Table 1. In the difference method, e is too large to be given, when n = 5.
In Figure 2, the standard value of each order derivative is calculated from the derivative calculation formula according to the current signal expression, and the value calculated by the polynomial fitting method is derived from the derivative calculation of the fitting function. It can be seen that the difference method is difficult to get rid of the influence of boundary effect. In the case of low order derivative, obvious error appears at the beginning and the end, and small error can be ignored when N=1. However, when N increases to 5, the error cannot be ignored, and with the increase of N, the error becomes more and more serious. Therefore, when calculating the higher derivative in the future, there is no difference derivative result, but the effect in the middle of the data is obvious. The polynomial method has a high accuracy in the low order derivative, and it still has a high accuracy when N increases to 8 (about n/2). As N approaches n, the error of polynomial fitting becomes more and more obvious. When n reaches the highest degree of polynomial 15, the calculation result is a constant; when N reaches the highest order of polynomial, the calculation result is a constant; the sine polynomial fitting method basically coincides with the actual value in the case of low order derivative, and its error is difficult to be distinguished by eyes. Even if the order is increased, most of the regions still maintain super-high fitting degree, and the overall error is small. It is not difficult to see that no matter how much N is taken, the accuracy of sine polynomial is much higher than the other two methods. In the case of low order, the effect of polynomial method is close to that of the sinusoidal polynomial method. The higher the order is, the more obvious the advantage of sine polynomial.
A weak white noise is added to the current signal, and the signal-to-noise ratio is 20 dB, as shown in Figure  3. After adding interference, verify the case when the derivative order N is 1,3,5,8 respectively, as in Figure 4. It can be seen that even if the interference signal added is very weak, the difference method still shows great error in the low order case, and its anti-interference performance is the worst. The result of difference method with N= 3 deviates from the standard value too much, so there is no difference derivative result in the later calculation of higher derivative.
By comparing the images in Figure 2 and Figure 4, especially the images with N= 8, it can be seen that the calculation results of sine polynomial fitting method and polynomial fitting method are almost the same as those without interference in case of interference, and both show excellent anti-interference ability.

Conclusion
In weak interference environment, traditional highorder derivation calculation method cannot guarantee the calculation accuracy which matters in protection calculation. Practically, polynomial fitting method is bound to be a finite term limited to the decided max order of the polynomial. Since the boundary effect of high derivative-order cannot be ignored, antiinterference ability is weak. The sinusoidal polynomial fitting method proposed in this paper is superior to the traditional method in all kinds of situations. It can greatly improve the accuracy of high order and almost zero error in the low order, so it has very high accuracy and anti-interference ability.