1 Introduction

Power load operation is complex. Accurate power load forecasting has great significance for designing power supply program and making a good power balance between supply and demand. The power load sequence contains relatively obvious white noise. With longer sampling time interval, the white noise becomes more intense [1, 2]. The prediction accuracy of power load is related to the length of historical observation data. With noise and chaos in the observed data, different time series have different upper limit of prediction accuracy [3, 4]. It is important to estimate the noise intensity directly from the observed data and to separate the noise from the observed data, which is very important to improve the accuracy of the power load forecasting result.

To improve the quality of power load data, stochastic noise present in the load data must be identified and filtered out [5, 6]. At present, there are mainly following methods in the power load forecasting field, such as regression analysis, combined forecasting, exponentially smoothing, neural network and wavelet methods, and so on. Moreover, in view of the uncertainties and randomness of short-term load, innovative data processing strategies are proposed, such as frequency domain decomposition method and property matrix hierarchical analysis method [7,8,9]. However, the existing time series modeling methods may not meet the requirements of time series stationary. These methods neglect the pretreatment of load data and statistical checking [10]. Independent, steady, normal, zero-mean and trend-item processing of the required data is required, and non-stationary, non-random and non-normal characteristics of power load data are needed to be tested.

Time series method and Kalman filter algorithm are proposed to filter the power load stochastic noise by pretreating and statistically testing of power load data, then, the total variance method is used to evaluate the stochastic errors of the load data before and after filtering effectively.

2 Methods

2.1 Stochastic noise time series method in power load data

2.1.1 Timing sequence processing

Traditional load forecasting method adopts the regression analysis and the least square method. However, this method is difficult to reflect the new information of the load change during the operation of the power system to the model, and the prediction accuracy is low. According to the characteristics of power load data, the statistical parameter model reflecting the running state of the system is established, and the time series of electric load is constructed. Then, the shortcomings of the existing methods can be effectively overcomed [11,12,13].

The time series model is used to fit the stationary, normal sequence. An auto regressive moving average (ARMA) model ARMA(p, q) with appropriate order can be used to describe the stationary stochastic process of power load. ARMA(p, q) model of a stable normal time series {x k }(k = 1,  … , n) can be obtained by

$$ \begin{array}{l}{x}_k={\phi}_1{x}_{k-1}+{\phi}_2{x}_{k-2}+\dots +{\phi}_p{x}_{k- p}\\ {}\kern2em +{a}_k-{\theta}_1{a}_{k-1}-\cdots -{\theta}_q{x}_{k- q}\end{array} $$
(1)

where {x k } is time series, x k is the value of the time series {x k } at the k-th moment, and x k can be estimated by the value of the timing in the past periods x k ‐ 1 , x k ‐ 2 ,  ⋯  , x k ‐ p, ϕ p is autoregressive coefficient, θ q is moving average coefficient, a k is residual, p and q are orders of ARMA model.

The estimated error of x k is obtained by

$$ \mathrm{e}={a}_k-{\theta}_1{a}_{k-1}-\cdots -{\theta}_a{a}_{k- a} $$
(2)

The prerequisite for establishing the ARMA model is that the load data satisfy the requirements of stationarity and normality. Power load output data usually do not meet these requirements, then, it is necessary to make pre-processing operations and test of the corresponding characteristics for sampled data.

The first step is stationary test. The reverse order test is used to test the stationary state of the power load data sequence. If the stationarity requirement is not satisfied, the trend item extraction is carried out for the stochastic load sequence. The reverse order test method is carried out as following. {x n }is divided as subsequences {x j , n } with quantity of l. The mean value μ i of each subsequence is obtained, and new subsequence is obtained with μ 1 μ 2 … μ i . With i > j, the reverse order A j equals to the amount of μ i  > μ j . The total reverse order number of sequences is obtained by

$$ A=\sum_{j=1}^{l-1}{A}_j $$
(3)

where j ∈ (0, 1, 2,  … , l).

The theoretical mean and variance of the total number of reversal order are obtained as following [14]:

$$ E\left[ A\right]=\sum_{j=1}^{l-1} E\left[{A}_j\right]=\frac{l\left( l-1\right)}{4} $$
(4)
$$ {\sigma}_A^2=\frac{l\left(2{l}^2+3 l-5\right)}{72} $$
(5)

Statistics value u is obtained as following [14]:

$$ u=\frac{\left( A+\frac{1}{2}- E\left[ A\right]\right)}{\sigma_A} $$
(6)

If ∣u∣ ≤ 1.96, there is no significant difference between μ i , and {x n } can be determined to be a stationary sequence.

The second step is trend item extraction. The data sequence is processed by difference to get the new sequence. Data sequence subtracts the mean of the new sequence, then, obtains the mean value of the difference to complete the trend item extraction.

The third step is normality test. The power load data sequence was tested for normality [14], mainly including standard skewness coefficient ξ and standard kurtosis coefficient ν.

Mean value is obtained by

$$ \overset{-}{x}=\frac{1}{n}\sum_{i=1}^n{x}_i $$
(7)

Variance value is obtained by

$$ {S}^2=\frac{1}{n}\sum_{i=1}^n{\left({x}_i-\overline{x}\right)}^2 $$
(8)

Standard skewness coefficient is obtained by

$$ \xi =\sqrt{\frac{1}{6 n}}{\sum_{i=1}^n\left(\frac{x_i-\overline{x}}{S}\right)}^3 $$
(9)

Standard kurtosis coefficient is obtained by

$$ \nu =\sqrt{\frac{n}{24}}\left[\sum_{i=1}^n{\left(\frac{x_i-\overline{x}}{S}\right)}^4-3\right] $$
(10)

ξ ≈ 0 and ν ≈ 0 indicates stochastic sequence satisfies the normality requirement.

2.1.2 Online timing modeling

After pretreatment and statistical tests of power load data, model order and parameters also need to be calculated. In addition, the applicability of the new model still need to be tested [14, 15]. Based on the new model, the system state equation and output equation can be established, and Kalman filter method can be used to deal with the power load data.

The common method Akaike Information Criterion (AIC) for judging the order of time series models is given by

$$ \mathrm{AIC}\left( p, q\right)=\mathrm{nln}{\sigma}_a^2+2\left( p+ q\right) $$
(11)

where p and q are orders of ARMA model, n is the number of data in the sequence, \( {\sigma}_a^2 \) is the Variance of noise a(t).

The AIC criterion takes into account the interaction between model order and residuals, and the smallest AIC value is to be selected.

The applicability of the model is also a critical task for online modeling of power load data. The criterion is to check whether the model residuals are white noise. If the model residuals are white noise, the model is available; otherwise, it is not applicable.

2.2 Kalman filtering based on time series model

Kalman filtering method, a kind of effective recursive filtering method, estimates the system state according to a series of measurements including stochastic noise. Kalman filtering selects proper state space, builds state equation and measurement equation, based on the period and characteristic of load prediction. Parameter estimation and load forecasting are implemented in the filtering, to be an organic whole.

According to the ARMA model, Kalman filtering method is adopted to suppress the stochastic noise of power load. System state equation is built by white noise of the stochastic noise of power load [16, 17].

State equation is as following:

$$ {X}_k={A\widehat{X}}_k+{Bv}_k $$
(12)

Assuming that W k is estimation error of ARMA model, so there is an equation as following:

$$ {Y}_k={X}_k+{W}_k $$
(13)

System output is as following:

$$ {Z}_k={Y}_k $$
(14)

Output equation is as following:

$$ {Z}_k={CX}_k+{W}_k $$
(15)

The mean of both v k and W k is zero, white noise with constant autocorrelation function is independent of each other. The statistical properties satisfy the mean equals to zero, E(W k ) = E(v k ) = 0. Autocorrelation function φ vv  =  ki  , φ vv  =  kj , and cross-correlation function φ vw (k, j) = 0.

Kalman filtering equations of power load are built based on state equation and output equation, shown as following:

$$ \left\{\begin{array}{l}{\widehat{X}}_{k, k}= A{\widehat{X}}_{k-1, k-1}\\ {}{\widehat{X}}_{k, k}={\widehat{X}}_{k, k\hbox{-} 1}+{K}_k\left[{Y}_k- C{\widehat{X}}_{k, k\hbox{-} 1}\right]\\ {}{K}_k={P}_{k, k-1}{C}^{\mathrm{T}}{\left[{ C P}_{k, k-1}{C}^{\mathrm{T}}+{R}_k\right]}^{-1}\\ {}{P}_{k, k-1}={ A P}_{k, k-1}{A}^{\mathrm{T}}+{ B Q}_{k-1, k}{B}^{\mathrm{T}}\\ {}{P}_{k, k}=\left[ I-{K}_k C\right]{P}_{k, k-1}\\ {}{\widehat{Y}}_k= C{\widehat{X}}_{k, k}\end{array}\right. $$
(16)

where, \( {\widehat{X}}_{k, k-1} \) is further estimation of filtering state, \( {\widehat{X}}_{k, k} \) is the filtering state at the time k, \( {Y}_k-{C\widehat{X}}_{k, k\hbox{-} 1} \) is optimal estimate at the time k being the error between observation estimation and observation value, K k is gain matrix of filter at the time k, R is error of system measurement noise, and Q is noise variance of system process, and \( {\widehat{Y}}_k \) is the output of filter at the time k. Initial values need to be given in advance.

Kalman prediction process is the filtering process of state reconstruction. Known from Eq.(16), estimated information \( \widehat{X} \) of state phasor X is updated constantly. Considering feedback unit, this part can avoid the effect of dynamic noise v k . However, for estimation value \( \widehat{Y} \) of output phasor Y, it can only be approximated owing to the influence of dynamic noise v k .

3 Result

3.1 Application and analysis of time series model and Kalman filtering

To verify the validity of time series model and Kalman filtering method of power load stochastic noise, 100 power load data of some place in 2015 is analyzed as following. After mean-filtering, power load data is able to effectively characterize raw power load data, both shown in Fig.1.

Fig. 1
figure 1

Raw power load data and the data after mean filtering

The first stationarity test results of power load data is as following: ∣u∣ = 2.54 > 1.96, which means it doesn’t meet the stationarity requirement. After extracting trend, the result is this, namely ∣u∣ = 0.5 < 1.96, meeting the requirement. The results of normality test are as following: standard skewness coefficient ξ = 0.0032 ≈ 0, standard kurtosis coefficient ν = 4.54 × 10−4 ≈ 0. The new data sequence meets the normality requirements. After trend extraction, stochastic noise of power load is shown in Fig. 2. And new power load data is stationary, zero-mean and normal, satisfying the precondition of online modeling.

Fig. 2
figure 2

Stochastic noise of electric power load after one-order differential process

As for the power load suitable for modeling, AIC values are calculated. In addition, orders of ARMA model are relatively small, p and q is set to be less than 3. AIC values of chosen model are listed in Table 1.

Table 1 AIC values of ARMA model of power load

Table 1 demonsttates that ARMA(2,1) model shall be selected for power load stochastic noise model according to the minimum AIC value, built as following:

$$ {x}_k={\phi}_1{x}_{k-1}+{\phi}_2{x}_{k-2}+{a}_k-{\theta}_1{a}_{k-1} $$
(17)

where, x k is the model output, and a k is the white noise, of which mean is 0 and variance is \( {\sigma}_a^2 \). ϕ 1, ϕ 2 and θ 1 is calculated by least square fitting (LSF)

$$ \begin{array}{l}{x}_k=-0.7072{x}_{k-1}-0.1325{x}_{k-2}\\ {}\kern2em +{a}_k-0.1242{a}_{k-1}\end{array} $$
(18)

ACF and PACF of model residual is shown as Fig.3, and both can be regarded as white noise input.

Fig. 3
figure 3

ACF and PACF of model residual

According to established model ARMA(2,1), corresponding system state equation is obtained as following:

$$ \begin{array}{c}{x}_k=-0.7072{x}_{k-1}-0.1325{x}_{k-2}\\ {}\kern1.5em +{a}_k-0.1242{a}_{k-1}\end{array} $$
(19)

System output equation is as following:

$$ {X}_k={AX}_{k-1}+{BV}_k $$
(20)

where, \( A=\left[\begin{array}{cc}\hfill -0.7072\hfill & \hfill -0.1325\hfill \\ {}\hfill 1\hfill & \hfill 0\hfill \end{array}\right] \), \( B=\left[\begin{array}{cc}\hfill 1\hfill & \hfill 0.1242\hfill \\ {}\hfill 0\hfill & \hfill 0\hfill \end{array}\right] \),C = [1 0].

Initial value of co-variance matrix P is \( \left[\begin{array}{cc}\hfill 1\hfill & \hfill 0\hfill \\ {}\hfill 0\hfill & \hfill 1\hfill \end{array}\right] \), initial value of matrix X is \( {\left[\begin{array}{cc}\hfill 0\hfill & \hfill 0\hfill \end{array}\right]}^{\mathrm{T}} \),value of matrix R is variance of estimation error, and value of progress noise Q equals to \( \left[\begin{array}{cc}\hfill {\sigma}_a^2\hfill & \hfill 0\hfill \\ {}\hfill 0\hfill & \hfill {\sigma}_a^2\hfill \end{array}\right] \).

Kalman filtering method is used to denoise the stochastic noise of power load data, the curves before and after filtering shown in Fig. 4. Result demonstrates that noise amplitude in the stochastic noise data is significantly reduced by ARMA model and Kalman filter. Variance before filtering is 1.56 × 10‐4, after filtering it becomes 3.58 × 10‐6, reduced by two orders of magnitude. The filtered stochastic noise is obviously suppressed.

Fig. 4
figure 4

Electric power load data comparison before and after Kalman filtering

Stochastic noise of power load is presented with different correlation time and power spectral density, and total variance method is effective to evaluate five kinds of stochastic noise of power load data before and after filtering, including load random walk (L), bias instability (B), rate ramp walk (K), rate ramp (R) and quantization noise (Q). Table 2 is each stochastic noise coefficient before and after Kalman filtering, and Fig.5. is the total variance curve of power load before and after Kalman filtering.

Table 2 Stochastic noise coefficients before and after Kalman filtering
Fig. 5
figure 5

Total variance analysis before and after Kalman filter

Known from Table 2 and Fig.5, selected power load data mainly contains quantization noise, rate random walk and bias instability. However, each stochastic coefficient in the power load data is effectively reduced through time series modeling and Kalman filtering, each coefficient value is reduced by an order of magnitude. The proposed method can eliminate the stochastic noise of power load data and promote power load accuracy.

4 Conclusion

Suppressing power load stochastic noise is one of the important links in power load modeling and forecasting. Based on the characteristics of power load data, time series analysis is used to model the data of power load on-line, realizing the pretreatment and inspection analysis of power load data. ARMA (2,1) model is established and Kalman filtering method is used to denoise load data. And total variance method is adopted to verify the effect of modeling and filtering, namely the stochastic error coefficients before and after filtering.

The results show that stochastic noise amplitude of power load data after time series modeling and Kalman filtering is significantly reduced, the variance value is decreased by two orders of magnitude, and each stochastic error coefficient of power load is reduced by an order of magnitude. The proposed time series modeling and filtering method can effectively suppress the stochastic noise of power load data and improve the prediction accuracy of power load.