Online Probabilistic Power Flow with Tie-line Power Transfer: A Stacked Denoising Auto-Encoders Method

Based on stacked denoising auto-encoders (SDAE) and combined with the Monte-Carlo simulation (MCS) method, this paper proposes a hybrid algorithm (SDAE-Based-PPF, SPPF) for online calculation of probabilistic power flow (PPF) with tie-line power transfer. By incorporating the deep structure and reconstructive strategy of SDAE, this paper extracts high-level features of nonlinear power flow equations, thereby constructing SDAE-based power flow models. Then, the parameters of SDAE-based power flow models, with improved training speed and accuracy, are optimized by mini-batch gradient descent algorithm, momentum learning rate and introduced cross-entropy loss function. The SDAE-based power flow models are developed to approximate power flow equations with unidirectional extracted high-level features, so as to enable non-iterative solvability judgment and calculation of power flow, therefore fast and accurate. Benefiting from the parallelizability, speed and accuracy of SDAE, the proposed SDAE-based power flow models, with unsolved random samples generated by the MCS method, are able to calculate all samples simultaneously, and this enables PPF to be calculated online. Finally, numerical results are implemented on three standard IEEE test cases to verify the effectiveness of proposed SDAE-based power flow models and SPPF method.


Introduction
Interconnected power systems improve utilization efficiency of power resources by allowing tie-line power transfer among different regional power systems. However, power systems are affected by uncertainties, including power demand and renewable energy sources. This leads to the uncertainties of tie-line power transfer. Under such a case, probabilistic power flow is fundamental to analyze the uncertainties and probabilistic characteristics of state variables (e.g., tie-line power transfer) in power systems, and thus has attracted wide attention in areas such as power systems planning and operation [1]- [3]. In recent years, due to the integration of intermittent renewable energy systems containing photovoltaic energy and wind energy, the uncertainties in power systems are increasingly obvious. In order to timely provide basis for power system economic dispatch [4] and security analysis [5], a practicable methodology that could compute the probabilistic power flow online becomes preferable.
The area of probabilistic power flow has spanned over forty years since proposed by Borkowska [1]. Currently, three approaches are popular in computing probabilistic power flow: analytical, approximate and simulation methods. Analytical methods, including convolution and fast Fourier transform [6], [7], are based on some assumptions and simplifications and thus benefit from less calculation burden, but  [8]. Approximate methods, including the point estimate method [9] and the unscented transformation methods [10], also benefit from less calculation burden, but only statistical moments are calculated, where complete probabilistic density functions remains hard to obtain. Simulation methods are based on deterministic power flow calculation for all sampled power system status, thus considered to be more accurate compared with analytical methods and approximation methods. Among them, the Monte Carlo simulation by use of simple random sampling (MCS-SRS) is commonly used as reference to validate other methods [11], but the MCS-SRS requires a tremendous number of repeatedly solutions of deterministic power flow, and thus requires more computation time. Hence, researches have been done for reducing the computation time of the MCS method in probabilistic power flow.
Compared with traditional neural networks, regarding accuracy, deep neural networks, with multihidden layers structure, are able to extract high-level nonlinear features from large amount of data. Besides, deep neural networks are theoretically more efficient at representing complicated distributions [21]. As a variation of deep neural networks, stacked denoising auto-encoders (SDAE) is able to handle regression and classification problem simultaneously, and this means judgment of power flow solvability and calculation of power flow can be achieved with only a single calculation.
Consequently, this paper presents SPPF, a hybrid algorithm with combination of SDAE-based power flow models and the MCS method; the contributions of this paper are twofold:  SDAE-based power flow models with corresponding improved training methods are proposed. Based on the approximation and solvability judgment capability of SDAE in nonlinear power flow equations, SDAE-based power flow models are constructed in this paper. After properly trained, SDAE-based power flow models are able to judge the solvability of power systems and noniteratively calculate power flow.  An online calculation method of probabilistic power flow based on SDAE and combined with the MCS is proposed. After random sampling with the Monte-Carlo method, the power flow of all samples is determined by SDAE-based power flow models simultaneously. The rest of the paper is organized as follows. The SDAE-based power flow models and method to train the models are illustrated in Section 2. Probabilistic power flow method based on SDAE and combined with the MCS is presented in Section 3. Simulation results are shown in Section 4, followed by the conclusions in Section 5.

Power Flow Models Based on SDAE
Basic structure of SDAE is introduced in this section. Then, SDAE-based power flow models are presented, with two-stage training algorithm improved by cross-entropy loss function, mini-batch gradient descent algorithm and momentum learning rate.

Structure of stacked denoising auto-encoders
SDAE is composed with denoising auto-encoders layer by layer. As extension models of auto-encoder (AE), DAE forces AE to comprehensively extract high-level features of input X by locally corrupting input vector X, whereby improving the robustness of models [23]. DAE is made of input layer X, single middle layer and output later Z, with those layers linked by encoder and decoder. The logic and structure diagram of DAE is illustrated in Fig.1, and its detailed computational procedure is as follows: By corrupting initial input X with random mapping in (1), locally corrupted input X  is gotten.
where, q D denotes corruption procedure by random mapping, namely to randomly select a certain number of input variables set to zero. This procedure helps DAE adapt to errors and missing of data and improves the robustness of DAE, which will be illustrated in Section 4.
By encoding function f  in (2), middle layer Y is determined by corrupted input X  .  x s x e    is sigmoid function, and is selected as activation function of encoding and decoding in this work.
By decoding function g   in (3), output layer Z of DAE is determined by middle layer Y. Figure 1. Logic and structure diagram of DAE By stacking DAE layer by layer, with the middle layer of DAE in lower layer applied as the input of DAE in higher layer, deep neural network constructed by SDAE is gotten, and its structure is illustrated in Fig. 2. Note that the output layer Z of DAE is not included in calculating the output of SDAE, and marked by grey in the figure. By extracting the high-level features of input X with continuously encoding, the output t Y of SDAE is finally obtained, as shown in (4).

SDAE-based power flow models and their training methods
Based on the sound performance of SDAE in approximating non-linear mapping including equations, SDAE-based power flow models are presented and shown in Fig.2. The input X of SDAE-based power flow models include active and reactive node injection power of all renewable energy nodes and load nodes, active injection power and voltage magnitude of PV nodes; by equation (4), power flow results, as output Y t including solvability of power systems, node voltage of all nodes and power flow of all branches, can be determined; meanwhile, resistance, reactance of branches are not selected as input X, because they don't vary with system state. Encoding function (4) can be seen in (2), where the optimal encoding parameters are the training objective of SDAE-based power flow models, including optimal weight matrix W and biased vector b of SDAE. Two-stage training method based on cross-entropy loss function, mini-batch gradient descent algorithm and momentum learning rate is introduced to train SDAE-based power flow models.

Unsupervised pre-training for SDAE-based power flow models
The optimizing objective and procedure of unsupervised pre-training SDAE is to determine optimal initial parameters for each DAE from bottom layer to top layer. In the process of pre-training SDAE, cross-entropy function is introduced as loss function, and the optimizing objective function (5) is constructed by the input X l and output Z l of DAE in lth layer.
where, d in H L is the dimension of x and z. X l is the input of DAE in lth layer, and also the output Y l- Finally, in order to accelerate updating of parameters and surmount local minimum basins of attraction, momentum learning rate ( ) is introduced as additional item on basis of equations (6)- (7). The constructed parameters updating equations are show in (8)- (9).
By the unsupervised pre-training above, the optimal parameters of encoder in each layer can be determined, and as the initial parameters of supervised training in the next stage.

Supervised fine-tuning for SDAE-based power flow models
The optimizing objective and procedure of supervised training SDAE is to determine optimal parameters { , }  W b  for entire SDAE from the top layer to the bottom layer. In supervised fine-tuning of SDAE, the cross-entropy loss function is constructed by the output of Y t in SDAE . Because that all elements in , is below 0.25, which leads to the decrease of efficiency in parameters updating and this is called the saturation of sigmoid function; On contrary, if cross-entropy loss function is applied, the determined change of weight matrix in top layer is ( ) , , which avoids the saturation of sigmoid function and improves the efficiency of parameters updating.
On this basis, similar with the calculation procedure of unsupervised pre-training, mini-batch gradient descent algorithm (6)-(7) and momentum learning rate (8)-(9) can be applied in optimizing equation (10) and finally determine the optimal parameters of SDAE.
The flowchart of the two-stage training of SDAE power flow model above is presented in Fig. 3.
By introducing the determined optimal parameters    Step 1) Power flow training data acquisition: By channels such as operational monitoring, experiment and simulation, training sample for initializing SDAE is obtained.
Step 2) Data preprocessing: this step includes data pre-processing and determination of hyperparameters for SDAE.
Step 3) Unsupervised pre-training of SDAE: Firstly, apply cross-entropy loss function into equation (5), and construct the loss function of DAE in the first layer with training sample input X. Then, with applied momentum learning rate and mini-batch gradient descent algorithm, the parameters updating equations (8)-(9) are constructed, whereby the optimal parameters for encoder of DAE in the first layer are determined. Afterwards, the output of the middle layer of DAE obtained from equation (2) is also the input of DAE in the second layer. Applying the same methods to construct cross-entropy loss function and so on, optimal encoding parameters   ,  W b  for each DAE are determined from bottom to top.
Step 4) Supervised fine-tuning of SDAE power flow models: Firstly, apply cross-entropy loss function into equation (10), and construct the loss function of whole SDAE power flow models with the input and output of training samples. Then, mini-batch gradient descent algorithm and momentum learning rate are also used to construct the parameters updating equations (8)- (9), whereby all the optimal parameters of encoders   ,  W b  in SDAE are determined; in consequence, SDAE power flow models are well-trained.
Step 5) Sampling of system state: The random variables of system including wind velocity, photovoltaic power, loads, active injection power and voltage magnitude of PV nodes are sampled.
Step 6) Online probabilistic power flow calculation with SPPF: input all the samples obtained from Step 5) into the well-trained SDAE power flow models in Step 4), determine the solvability and power flow for all samples simultaneously, and hence calculate power flow of all samples online.
Step 7) Probabilistic power flow index analysis: Calculate the mean value, standard variance and probability density of all the output variables from SDAE power flow models.

Simulation Results
In order to demonstrate the effectiveness of proposed SDAE power flow models and SPPF probabilistic power flow method, simulations are implemented on modified IEEE 39-bus system, modified IEEE 118-bus system and modified IEEE 300-bus system integrated with renewable energy.

System Information and Methods for Comparison
The system data of original IEEE 39-bus system, IEEE 118-bus system and IEEE 300-bus system is given in [24]. Three cases are modified by installing photovoltaic stations and wind farms at certain buses. For an illustrative purpose, tie-line power transfer is also modelled as wind farms or photovoltaic stations in a quite general view.
The choice of suggested parameters and model of wind farms and photovoltaic station for output powers as function of wind speed and solar radiation can be found in [25]- [28]. It is assumed that the power factors of wind farms' generation were kept at 0.95 p.u. The load uncertainties are modeled by normal distributes. Five cases with different penetration rates and load variance are analyzed: Case 1: Modified IEEE 39-bus system, and the maximum active power output of photovoltaic station is 200MW, rated active power output of wind farms is 260MW, and the standard deviations of load is 10%.
Case 2: Modified IEEE 118-bus system, and the maximum active output of photovoltaic station is 200MW, rated active power output of wind farms is 260MW, and the standard deviations of load is 10%.
Case 3: Modified IEEE 118-bus system, and the maximum active power output of the photovoltaic stations is 100MW at bus 13 and bus 16 and 150MW at bus 14 and bus 26. The rated active power output of wind farms at bus 59, bus 80 and bus 90 are 220MW, 200MW and 260MW respectively, and the standard deviations of load is 5%.
Case 4: Modified IEEE 118-bus system, 1% of the data is randomly lost among 50000 samples. The rest of parameters are the same as Case 2.
Case 5: Modified IEEE 300-bus system, and the forecasted active power outputs are 200MW for photovoltaic station and 260MW for wind farms. The standard deviation of load is 5%.
Methods The end-criterion when training mentioned neural networks is that the change of the sum of weight matrix is below 1% for BP and SDAE, or neuron number for RBF neural network reaches maximum. The sample number of the MCS method is 50000.

Validity of power flow solvability judgment
With the Newton-Raphson (NR) algorithm taken as reference, this work assumes the power flow is unsolvable if the calculation is not converged after 50 iterations. In order to validate the accuracy of SDAE to judge the solvability of power flow, load level in Case 1 is enhanced and the judgment results are given in Table I. The correct rate means the number of correct judgement (the judged solvability is identical to actual solvability) over the number of total judgement. From Table I, we can see that the number of unsolvable samples is increasing with the enhancement of load level. When load level is 100%, 115% and 125%, the solvable rates of power flow obtained by NR methods is 100.00%, 99.99% and 61.78%, respectively; meanwhile, the solvable rates of power flow obtained by SDAE are 100.00%, 99.98% and 61.95%, respectively. The accuracy of solvability judgment is 100.00%, 99.99% and 99.59%, respectively. In conclusion, SDAE power plow models are able to judge the solvability of power flow with sound accuracy under various load level.

Accuracy of SDAE power flow models
The accuracy to calculate power flow together with the robustness against missing data and variation of system status using SDAE is verified in this section. The power flow and probabilistic power flow for Case 2, Case 3 and Case 4 are calculated using M0-M4 with the system status randomly sampled by the MCS. In order to compare the accuracy of different non-iterative methods in power flow calculation, the probability that error of active power flow exceeds 5MW (P ef in Table II) and probability that error of bus voltage exceeds 0.001 p.u. (P ev in Table II) is shown in Table II.
From Table II, while calculating the power flow for Case 2 and Case 3 with SDAE power flow models, the maximum and minimum P ef are 0.10% and 0.06%, and the maximum and minimum P ev are 0.05% and 0.03%. For other non-iterative methods, the maximum and minimum P ef are 22.61% and 11.17%, and their maximum and minimum P ev are 32.62% and 5.30%, and their errors are obviously higher than SDAE. In addition, from Case 4 when 1% of the input data is randomly lost, we can see that SDAE power flow models maintain a better accuracy compared with BP neural network and RBF neural network, while the Newton-Raphson algorithm and DC power flow models cannot directly calculate the power flow if the data is missing. In conclusion, the constructed SDAE power flow models demonstrate sound accuracy and robustness while calculating power flow. 11.17% 15.23% 11.93% 26.41% 5.30% 26.73% Note: "-" means the index is not available with specified method.

Conclusions
Uncertainties caused by power demand and renewable energy sources lead to the uncertainties of tieline power transfer. Consequently, this paper presents an online probabilistic power flow algorithm based on SDAE and combined with the MCS. Firstly, benefiting from the approximation ability of SDAE in nonlinear power flow equations, SDAE power flow models are proposed. Two-stage training methods with cross-entropy loss function, mini-batch gradient descent algorithm and momentum learning rates are introduced to improve the parameters updating efficiency of SDAE. The well-trained