Distributionally Robust Stochastic Optimal Power Flow Considering N-1 Security Constraints with renewable

. This paper proposes a data-driven stochastic optimal power flow model considering the uncertainties of renewable energy sources. The proposed model also focuses on the constraints of reactive voltage, aiming at improving the safety of voltage amplitude and reactive power output at each bus. Using data-driven linearization techniques, we simplified the calculation of system. In addition, Wasserstein ambiguity set was used to describe the uncertainties of renewable energy prediction error distribution, and a robust stochastic optimal power flow model considering N-1 security constraints is established. The simulation results on IEEE-39 system showed the accuracy and effectiveness of the distributionally robust optimization model and the reactive voltage constraint model provided a more stable operation schedule.


Introduction
The grid-connected operation of Renewable Energy Sources (RESs) makes the balance between the economic benefits of the transmission grid and the reliability or safety of the system more complicated. In recent researches, stochastic optimization (SO) and robust optimization (RO) are currently used to tackling optimal power flow (OPF) with uncertainties. However, the SO assumed that prediction errors of uncertainties followed a certain probability distribution, such as Gaussian distribution [1]. These assumptions are unreasonable and cannot simulate the real power system operating characteristics due to the complex nonlinear phenomena. What's more, the RO completely ignores the statistical information of uncertainties, leading to conservative solutions. In the real world, the probability distribution of prediction errors can only be calculated from limited data sets, so data-driven methods [2]have been widely used in stochastic OPF models with Conditional Value-at-Risk (CVaR) [3]. Distributionally Robust Optimization (DRO) method [4] combined the above-mentioned stochastic OPF with the traditional RO, using historical data to estimate the parameters of the distribution [5]. It minimized the operation cost of the system under the worst case of uncertainties distribution and considered both robustness and conservativeness.
However, the existing power transmission grid model with uncertainties does not take into account the constraints of the node voltage and the reactive power output of the generators, which will cause the calculation to be inconsistent with the real world. This paper establishes a multi-period data-based DRO model for the transmission grid OPF with renewable energy and storage, which also fully takes into account the voltage magnitude constraints and reactive power constraints of each node in the system for optimization. The results on the IEEE-39 case showed that safer and more economical strategies for the system can be made base on our DRO model considering voltage and reactive power.

Stochastic OPF model
Let ij z be the complex impedance of the line between bus i and bus j , then the line admittance is . The power bus injections are given by 1 1 where , m t l P and , m t l Q indicate active and reactive line transmission power, and are the vectors of them at time t .
In addition, OPF model has various constraints on grid-connected devices and branches including generator ramping limits, state of charge limitations for energy storage devices, power injection ranges, voltage magnitudes and line flows and other device limits. All these constraints can be modeled or approximated as linear inequalities form as Power balance is given as where l p , l q is the active and reactive power for loads at bus i .
To deal with the non-convex of AC power flow, this paper adopts a data-driven linearization method [6]. The data-driven linearization method is based on formulas (1) and (2) where V A and V C are the coefficient matrix related to voltage calculation. The branch power flow (3)can be mapped by regression from m l P , m l Q to i P similar to the mapping of power injection: where PF  is the coefficient matrix related to branch power flow calculation. Based on data-driven power flow linearization model, the stochastic OPF model considering voltage constraints given as: (12) where x includes all the decision variables, R indicates the transformation of the inequality constraints into stochastic versions, h denotes the operating cost of the grid,    E is the expectation of variables. Constraints (10) includes the stochastic form of voltage magnitude and branch power flow constraints based on linearized equations, constraint (11)is the stochastic form of constraint (5), formula (12) is the matrix form of power balance equations.
Due to the uncertainty of renewable energy, ξ defines vectors of variables' forecast errors, so the affine form   x Fξ D (13) where x is parameterized by a nominal value D plus a linear function F of prediction error of uncertainties ξ . Define a set t V includes l N constraints (10)-(11), each individual constraint in the set can be written in the affine form as

Data-driven distributionally robust stochastic optimal power flow
In the optimization model, the distribution P of uncertainties  should be well known, but the real distribution cannot be obtained from limited data. An empirical distribution can be obtained from limited historical data, and the "distance" between the real distribution and the empirical distribution can be defined by Wasserstein radius, so the distribution of uncertainties belongs to the ambiguity set    [8].
The goal of Multi-stage distributionally robust stochastic optimal problem is to minimize the weighted sum of an operating cost and a constraint violation risk under the worst-case distribution in the forecast ambiguity set where Risk J defines constraint violation risk function, which is a sum of CVaR of a set of constraint functions: In this paper, we also consider the security constraints of transmission system. The outages included any single generators, lines, or loads, taking total

Case studies
A modified IEEE-39 bus test system shown in Fig. 1is taken as an example to prove the effectiveness of the proposed model. Two wind farms are connected to bus #30 and bus #34 with the normal power 700MW and 500MW respectively, and the corresponding conventional generators are removed. The energy storage systems are also placed in the system at certain bus and the locations are marked by orange boxes. Their capabilities are 500 kW h  . To simplify our presentation, only two line flows are handled with distributionally robust optimization with red lines in the figure. The rest of line flows are modeled by N-1 security constraints with CVaR. In addition, conditional risk values of voltage magnitude are added to the objective function. The accuracy of data-driven linearization model is related to the size of regression training dataset. We use the size of training data is 1000. Compared with AC power flow, we use the maximum error to demonstrate the accuracy of the model. The error of voltage magnitude is 0.001 p.u., and the error of active line flow is 2.65 MW. Therefore, the results of the linearized model meet the requirements of calculation accuracy.
We assumed the forecast errors have zero mean and standard deviations of 300MW and the operating period was 24H. Wasserstein radius measures the distance between the real distribution and the empirical distribution. The larger the radius is, the greater uncertainties of the real distribution is, and the more conservative the solution is. In Fig. 2 shows the solutions of the proposed data-driven ditributionally robust stochastic linearized OPF for varying risk aversion and Wasserstein radius. When the branch line flows and voltage magnitudes did not exceed the boundary, the CVaR value may be negative.

Conclusion
In conclusion, the data-driven power flow linearization model used in this paper has high accuracy and meets the practical production. The value of Wasserstein radius and risk affect the optimal solution of stochastic optimization, and with their increasing values branch line flow and voltage magnitude become lower than their bounds. Considering the reactive power and voltage constraints in the model, the risk of overvoltage will be significantly reduced to keep the voltage quality at buses and maintain safe and stable operation.