Preventive Security-Constrained Optimal Power Flow with Probabilistic Guarantees

: The traditional security-constrained optimal power ﬂow (SCOPF) model under the classical N-1 criterion is implemented in the power industry to ensure the secure operation of a power system. However, with increasing uncertainties from renewable energy sources (RES) and loads, the existing SCOPF model has di ﬃ culty meeting the practical requirements of the industry. This paper proposed a novel chance-constrained preventive SCOPF model that considers the uncertainty of power injections, including RES and load, and contingency probability. The chance constraint is used to constrain the overall line ﬂow within the limits with high probabilistic guarantees and to signiﬁcantly reduce the constraint scales. The cumulant and Johnson systems were combined to accurately approximate the cumulative distribution functions, which is important in solving chance-constrained optimization problems. The simulation results show that the model proposed in this paper can achieve better performance than traditional SCOPF.


Introduction
The growth in renewable energy sources (RES) and charging loads in recent years, such as wind power, photovoltaics and electric vehicle, has brought considerable economic benefits; however, the uncertainty of power injections has increased, which leads to increased operational risks [1][2][3], especially for highly-loaded power systems. The increasing uncertainty of operation increases the need for new criteria, dispatch tools and control methods to better balance operational security and costs [4].
Optimal power flow (OPF) is the fundamental dispatch and planning tool that is used to minimize operational costs while ensuring the security of the normal state, and security-constrained optimal power flow (SCOPF) [4][5][6][7] is an extended form of OPF that considers the classical N-1 criterion. Unlike OPF, which only considers a single system topology (normal state), SCOPF typically ensures that the system state remains within the operational limits when unexpected component outages (contingency set) occur. However, with the emergence of uncertainties in the power system, several drawbacks of traditional SCOPF have become apparent and these need to be addressed. These include: 1. Traditional SCOPF does not consider the influence of the uncertainty of RES and loads, and it cannot provide a robust solution because increasing uncertainty makes the operational state more stochastic and may lead to frequent violations of the N-1 criterion.
2. Traditional SCOPF disregards the probability of a contingency occurring; in other words, it considers the occurrence probability to be 1 for every contingency in a contingency set [4]. Obviously, this does not match the actual situation because the probability of a contingency is usually very low.
2. Instead of using the large-scale line flow limits of traditional PSCOPF, the probability distribution of the overall line flow is obtained and constrained in the proposed optimization model, which significantly reduces the constraint scale.
3. The cumulant and Johnson systems are combined in this paper to accurately approximate the cumulative distribution function (CDF) of an arbitrary distribution random variable, which only requires the first four orders of moment information.
The remainder of this paper is organized as follows: Section 2 reviews the traditional PSCOPF model. Section 3 describes the formulation of the proposed CC-PSCOPF, and a cumulative distribution function (CDF) approximation method based on cumulants and the Johnson system is also introduced. A case study is presented in Section 4 to test the performance of the proposed model. Section 5 presents our discussion and conclusions.

Review of Traditional PSCOPF
There are two types of SCOPF: PSCOPF and corrective SCOPF (CSCOPF). Using PSCOPF, pre-contingency controls are the only measures allowed to ensure that the system always operates in a state where any single component outage does not lead to constraint violations. This indicates that the operational state determined by PSCOPF simultaneously satisfies the pre-and post-contingency constraints. Different from PSCOPF, CSCOPF determines an operational state that allows post-contingency constraint violations, and it ensures that there are adequate post-contingency control measures, e.g., generator re-dispatch, topology reconfiguration and load shedding to eliminate post-contingency constraint violations. PSCOPF is safer, while CSCOPF is more economical [4].
This paper focuses on improving the traditional PSCOPF, and the proposed optimization model attempts to improve the overall security performance of the system operation through pre-contingency controls.
The DC-based PSCOPF model is reviewed in this section, as it provides the foundation for the optimization model proposed in this paper. DC approximation is used in this paper because it provides a convex guarantee that the optimization problem is tractable [20].
The objective function of DC-based PSCOPF minimizes the system's operational cost in the normal state, and it is expressed as follows: where N G is the number of generators; P Gi is the ith generator output in the normal state, which is the control variable of the optimization model; and c 2i , c 1i , and c 0i are the quadratic, linear and constant cost coefficients, respectively. The equality and inequality constraints of the PSCOPF model are as follows: These include the power balance of the system (2), the generator output limits (3) and the line flow limits (4) and (5). N R and N D are the number of RES and loads, respectively, in the system; P Ri and P Di are the forecast power injections of the ith RES and load; P Gi and P Gi are the ith generator's minimal output and maximum output, respectively; P l and P l are the lower and upper limits of the ith line flows; superscript k is the index of system topology; k = 0 indicates the normal state system topology, while k ≥ 1 indicates the contingency system topology; and A k Gi , A k Ri and A k Di are the power transmission distribution factors (PTDFs) of the ith generator, RES and load under system topology k, respectively. The PTDF can be obtained from the line susceptance matrix and bus susceptance matrix, and details can be found in [6].
The traditional DC-based PSCOPF optimization model is a typical quadratic programming problem that can be solved by common commercial solvers. As discussed in the introduction, the uncertainties of power injections and contingency probability are not considered in this model; therefore, the operational state obtained by this model is not robust to uncertainty and may be very costly. The constraint number of this model is 1 + N G + 2 × N l × N k , where N l is the number of lines and N k is the scale of the contingency set. Obviously, when the system scale is large with a large contingency set, the constraint number of this model is quite high, which significantly increases the calculation burden.

Modeling of Uncertainties
The forecast error of the RES and load is the main source of uncertainty, which is the deviation of the forecast value from the actual value. The forecast error can be seen as a continuous random variable and described by a continuous probability distribution model. Therefore, the actual power injection of RES and loads can be modeled as a forecast value plus a continuous random variable that represents forecast error: where P Ri and P Di are the actual power injection of the ith RES and load, respectively, and δ Ri and δ Di are random variables that represent the forecast error of the power injection of the ith RES and load, respectively. The proper distribution model to describe forecast error depends on the type of power injection, forecasting scale [27], etc. For instance, the forecast error of a load is usually assumed to follow a Gaussian distribution, while the beta distribution [28] is an appropriate choice to describe the short-term forecast error of wind power. Although there are many distribution models that can be used to describe a forecast error, the optimization model proposed in this paper is not sensitive to the distribution used. The first four order moments of a distribution model is the only information that is required and this can be obtained from historical data This moment information is used to approximate the CDF of a random variable, which is discussed in the following section.
The line flow under a single system topology is linearly dependent on power injections; when considering uncertainty, its expression is: where P k l is the lth line flow under the kth system topology. The term in the first bracket of Equation (7) is the line flow part formed by forecast power injections, which is consistent with the traditional PSCOPF. The term in the second bracket of Equation (7) is the uncertainty part of a line flow, which is the linear combination of the forecast error of power injections of RES and load.
The overall line flow probability distribution, which comprehensively considers the influence of the uncertainty of power injection and system topology is our concern. Therefore, the occurrence probability of a system topology, or the so-called contingency probability, should be obtained.
The Poisson distribution [30] is used in this paper to describe the occurrence probability of a system topology: where s k is the kth contingency's system topology, P r (s k ) is the corresponding occurrence probability, e is the base of the natural logarithm and λ t is the failure rate of the component. Note that the failure rate can be modified according to the external weather conditions. An approach to calculate the failure rate under different weather conditions (normal, adverse and major adverse) is provided in [31]. For each contingency, an occurrence probability can be obtained from Equation (8). We assume that contingencies outside the contingency set will have little impact on system operation, so the probability of the normal state is approximated and expressed as: Considering the uncertainty of power injections and the probability of contingency, the overall line flow P l can be obtained through the law of total probability theory, and it is expressed as: Obviously, the probability distribution of the overall line flow P l can be regarded as the weighted average of the line flow probability distribution under each system topology.

Chance-Constrained Optimization
In this section, we briefly introduce the CCO, which also underpins the model proposed in this paper.
CCO is an important tool proposed by Charnes and Cooper [16,17] for solving optimization problems under uncertainties. The general form of a CCO problem is expressed as follows: where f (·) is the objective function, g(·) is the equality constraint, h(·) is the inequality constraint, x is the decision variable, ξ is the uncertainty variable and α is the reliability parameter representing the allowed constraint violation level. Under the CCO, the inequality constraint is formed as the chance constraint and ensures that the constraint h(·) is satisfied with probability 1 − α at least. The original CCO problem is often transformed into an equivalent deterministic form to facilitate the solution [20,24].

Chance-Constrained PSCOPF Model
In this section, we present a novel CC-PSCOPF model that considers the uncertainties of power injections and the probability of contingency.
The goal function, power balance constraint and generator output limit of the proposed CC-PSCOPF are the same as those of the traditional PSCOPF model, as Equations (1) The key improvement is the modeling of the line flow inequality constraints.
Instead of line flow constraints under each system topology used in traditional PSCOPF, the overall line flow P l is constrained in CC-PSCOPF. As analyzed in the previous section, P l is a random variable; therefore, the chance constraint is used to place it in a certain range with a high probability, and it is expressed as follows: Pr where α + l and α − l are predefined violation levels. Considering the low occurrence probability of contingencies, α + l and α − l should be carefully defined. A comparison of Equations (12) and (13) to Equations (4) and (5) shows that the optimization model proposed in this paper has the following significant advantages: 1. The uncertainty of power injections and contingency occurrence probability are considered through P l . Even with the influence of various uncertainties, the operational state obtained by CC-PSCOPF has a high probability of ensuring that constraints are not violated. Obviously, the operational state is more robust to uncertainties compared to traditional PSCOPF.
2. The violation level for different lines is adjustable; for critical lines, the violation level could be adjusted lower to ensure operational safety, while for noncritical lines, the violation level could be increased to save control costs.
3. The scale of the line flow constraint is significantly reduced, which is only related to the number of lines in the system, allowing the optimization problems to be solved more efficiently.
4. As the occurrence probabilities of the contingency and chance constraints are used in this model, some contingencies that have quite low probability but high control costs are ignored in the optimization model, which helps to reduce the control costs. The control measures of these low probability contingencies can be solved using a separate accident plan.
However, solving an optimization problem with chance constraints directly is a challenging task. In this paper, chance constraints are transformed into deterministic linear constraints based on the cumulant and Johnson systems in the following section, which ensures that the CC-PSCOPF is tractable and solved efficiently.

Deterministic Reformulation of CC-PSCOPF
The main challenge of solving the proposed model is how to handle the two chance constraints related to overall line flows. In this section, these two constraints are converted into deterministic linear constraints. Through conversion, the optimization model becomes a linear constrained convex optimization problem that is easy to solve.
For convenience, the factors that determine the overall line flow P l are divided into two terms: where P k l,control is the line flow part determined by the control variable, which varies with the output of the generators, and P l,uncertainty is the line flow part determined by power injections of the RES and load, which is a random variable.
Substituting Equation (14) into Equation (12) yields: Pr P l,uncertainty ≤ P l − P l,control } ≥ 1 − α + l ∀l (15) Note that P l,uncertainty is the uncertainty part of the overall line flows, and we can obtain: where CDF l,uncertainty and CDF −1 l,uncertainty are the CDF and inverse CDF of P l,uncertainty , respectively. Similar to Equation (16), by substituting Equation (14) into (13), we can obtain: To replace Equations (12) and (13) with deterministic linear constraints Equations (16) and (17), CDF −1 l,uncertainty should be obtained. Traditionally, CDF l,uncertainty is obtained from Monte Carlo simulation (MCS), which performs a numerical search for the CDF −1 l,uncertainty [20]; however, this is time consuming. Moreover, MCS is difficult to implement in the absence of samples. Here, this procedure is improved by using the cumulant and Johnson system to obtain CDF −1 l,uncertainty .

The Cumulant
The cumulant [32,33] is an alternative moment of a continuous probability distribution, and the relationship between the cumulant κ and moment m is as follows: Cumulants have two important characteristics. One is homogeneity. For a random variable x, the nth cumulant is homogeneous of order r: The other is additivity; for two independent random variables x and y, and z = x + y, then: The uncertainty part of line flow under a single system topology is the linear combination of δ Ri and δ Di . As we know the first four order moments of δ Ri and δ Di in advance, using Equation (18) and the characteristics of the cumulant, the first four order moments of the uncertainty part of the line flow under a single system topology can be obtained.

The Johnson System
Previous works [34,35] have shown that the Johnson system is a reliable and accurate method for obtaining CDF compared to the commonly used Gram-Charlier series [32] or Cornish-Fisher series [33]; therefore, it is used here to obtain the CDF of the uncertainty part of the line flow under a single system topology.
The Johnson system is a 4-parameter transformation system that uses the following function to transform the standard Gaussian variable u into a variable x that follows an unknown arbitrary probability distribution: where a and b are the shape parameters, c is the position parameter, and d is the scale parameter. The function f −1 (·) takes 4 forms to distinguish different distribution families: where S L is the family of lognormal distributions, S U is the family of unbounded distributions, which means the range of variables is unlimited, S B is the family of bounded distributions, and S N is the family of Gaussian distributions. If the first four order moments of random variable x (the uncertainty part of the line flow in this paper) are available, the moment-based algorithm [36] can be used to obtain the parameters of the Johnson system, and the CDF of x is a function of the CDF of the standard Gaussian variable, which can be obtained easily.
The CDF of the uncertainty part of the line flow under each system topology is obtained. Based on the law of total probability, CDF l,uncertainty is calculated through the weighted average of each CDF of the uncertainty part of the line flow, and its inverse function CDF −1 l,uncertainty can be efficiently calculated.

Case Study
In this section, we discuss the performances of traditional PSCOPF and CC-PSCOPF, which were tested on two test systems. The optimization problem was solved by Ipopt [37] on a PC with a 2.8-GHz CPU and 16 GB RAM.

Description of the Test System
A modified IEEE-30 test system [38] was used here to analyze the characteristics of these two optimization formulations and a modified IEEE-108 test system [38] was used to evaluate the efficiency of these two methods. The IEEE-30 test system was modified to add two wind power generators at bus 7 and 12, which are representative of a RES power injection. Similarly, the IEEE-108 test system was modified to add four power generators at bus 44, 50, 88 and 98. The rated power of the wind power generators is 80 MW, the forecast outputs of wind power generators are assumed to be 0.8 p.u., and forecast error is assumed to follow a beta distribution: Beta (0.83, 1.82). The forecast error of the load at each bus is assumed to follow a Gaussian distribution, with the means of the power injections equal to those of the base case data and standard deviations equal to 5% of the means.
All N-1 contingencies are included in the contingency set, the occurrence probability of each contingency is assumed to be 0.01, and the violation level α + l is set at 1% for all lines.

CDF Approximation Performance of the Proposed Method
Obtaining an accurate CDF curve, especially in the tail area, is the basis for accurately solving the chance-constrained optimization. This section presents the results to show that the proposed cumulant + Johnson system can accurately and efficiently approximate a CDF curve.
The proposed method is compared with 10,000 MCS, the commonly used cumulant + Gram-Charlier series proposed in [25], and a CDF curve based on the assumption that wind power forecast error follows a Gaussian distribution. The average root mean square (ARMS) [18] is also introduced here to quantitatively indicate the accuracy of the CDF approximation. The smaller the ARMS value is, the more accurately the method approximates the CDF curve. Table 1 shows the ARMS values of the evaluated methods. The results in Figure 1 and Table 1 show that the cumulant + Johnson system approximates the CDF curve best and only a small amount of error exists, while the curve approximated by cumulant + Johnson and Gaussian assumptions shows significant deviation, especially in the tail area.
Moreover, the method proposed in this paper has an advantage over MCS; that is, MCS cannot be implemented when only the moment information of power injections is available, while the method proposed in this paper can provide a reliable CDF curve.

Solutions of Different Optimization Formulations
The generation costs for the two optimization approaches are listed in Table 2. The cost of CC-PSCOPF is higher because it considers the uncertainty of power injections and gives a high probabilistic guarantee that line flows limit violations will not happen. Because the chance constraint is a soft constraint and the Gaussian distribution is an unbounded distribution, there are always extreme values that cause line flow violations. Based on the generator output schemes given by these two problem formulations, we implemented MCS with 10,000 samples to observe the actually probability of line flow violations.
The average violation probability and the maximum violation probability were introduced to illustrate the effectiveness of the proposed method. These two indices are listed in Table 3. It is obvious that the chance constraint works; the maximum violation probability under CC-PSCOPF equals 0.01, which is equal to the preset violation level, while under PSCOPF, the same index significantly exceeds the violation level. Both the average and maximum violation probability are The average root mean square (ARMS) [18] is also introduced here to quantitatively indicate the accuracy of the CDF approximation. The smaller the ARMS value is, the more accurately the method approximates the CDF curve. Table 1 shows the ARMS values of the evaluated methods. The results in Figure 1 and Table 1 show that the cumulant + Johnson system approximates the CDF curve best and only a small amount of error exists, while the curve approximated by cumulant + Johnson and Gaussian assumptions shows significant deviation, especially in the tail area.
Moreover, the method proposed in this paper has an advantage over MCS; that is, MCS cannot be implemented when only the moment information of power injections is available, while the method proposed in this paper can provide a reliable CDF curve.

Solutions of Different Optimization Formulations
The generation costs for the two optimization approaches are listed in Table 2. The cost of CC-PSCOPF is higher because it considers the uncertainty of power injections and gives a high probabilistic guarantee that line flows limit violations will not happen. Because the chance constraint is a soft constraint and the Gaussian distribution is an unbounded distribution, there are always extreme values that cause line flow violations. Based on the generator output schemes given by these two problem formulations, we implemented MCS with 10,000 samples to observe the actually probability of line flow violations.
The average violation probability and the maximum violation probability were introduced to illustrate the effectiveness of the proposed method. These two indices are listed in Table 3. It is obvious that the chance constraint works; the maximum violation probability under CC-PSCOPF equals 0.01, which is equal to the preset violation level, while under PSCOPF, the same index significantly exceeds the violation level. Both the average and maximum violation probability are smaller under CC-PSCOPF, which indicates that the proposed method provides a more robust operational state than PSCOPF.
Moreover, although the goal of the proposed method is to improve the operational reliability by controlling the violation probability of line flows in the overall situation rather than the violation probability under a specific contingency system topology, it is interesting to note that CC-PSCOPF effectively reduces violations under a single contingency system topology. We counted the number of contingencies N V where the line flow violation probability exceeds the violation level. For contingencies with violations, the average number of line flows N alv and maximum number of line flows N mlv that exceeds the violation level were also counted. The statistical data are listed in Table 3. Obviously, CC-PSCOPF effectively reduces N V , N alv and N mlv , and this indicates that more contingencies are effectively controlled. The line flow of 15-18 was chosen as representative to visually show the flow probability distributions under these two formulations. The histograms of line flow are shown in Figure 2a smaller under CC-PSCOPF, which indicates that the proposed method provides a more robust operational state than PSCOPF. Moreover, although the goal of the proposed method is to improve the operational reliability by controlling the violation probability of line flows in the overall situation rather than the violation probability under a specific contingency system topology, it is interesting to note that CC-PSCOPF effectively reduces violations under a single contingency system topology. We counted the number of contingencies where the line flow violation probability exceeds the violation level. For contingencies with violations, the average number of line flows and maximum number of line flows that exceeds the violation level were also counted. The statistical data are listed in Table  3. Obviously, CC-PSCOPF effectively reduces , and , and this indicates that more contingencies are effectively controlled.

Influence of the Value of Violation Level
Changing the violation level influences the solution of CC-PSCOPF. Figure 3 shows the change in the generation cost and violation probability of CC-PSCOPF with different violation levels.

Influence of the Value of Violation Level
Changing the violation level influences the solution of CC-PSCOPF. Figure 3 shows the change in the generation cost and violation probability of CC-PSCOPF with different violation levels. As Figure 3 shows, with increasing violation level, the generation cost of CC-PSCOPF decreases, and inevitably, this causes a larger probability of constraint violations.
Obviously, the contradiction between power generation costs and operational security can be balanced by adjusting the violation level. As different transmission system operators have different requirements for line constraint violation probability, how to determine the optimal violation will be explored in subsequent studies. Note that, theoretically, the violation level can be set at 0 to completely eliminate the constraint violations, but this is not worth the gains. On the one hand, this will cause a surge in control costs, and on the other hand, it is easy to make the problem infeasible, especially when the uncertainty of power injection is large. Moreover, the violation level of different lines can be set to different values. For the critical lines, appropriately reducing the violation level can improve safety, and for non-critical lines, increasing the violation level appropriately can reduce generation costs. Obviously, CC-PSCOPF is more flexible compared with traditional PSCOPF, which can only balance the control costs and security by adjusting the contingency set.

Efficiency of the Proposed Method
The time consumption of PSCOPF and CC-PSCOPF was tested on the IEEE-30 test system and a larger-scale system, the IEEE-118 test system. The constraint numbers and time consumption of these two optimization formulations are listed in Table 4. It is evident that the constraint numbers significantly influence the efficiency of the optimization model. CC-PSCOPF is much faster than PSCOPF because the line limit constraints of all the system topologies are reduced to the same number of lines by the law of total probability.

Conclusions
Currently, and in the future, increasing uncertainty brings challenges for power systems. The traditional SCOPF under strict N-1 criterion can barely meet the requirements of a secure operation. To obtain an operational state that is robust to uncertainties and to improve the overall operational Obviously, the contradiction between power generation costs and operational security can be balanced by adjusting the violation level. As different transmission system operators have different requirements for line constraint violation probability, how to determine the optimal violation will be explored in subsequent studies. Note that, theoretically, the violation level can be set at 0 to completely eliminate the constraint violations, but this is not worth the gains. On the one hand, this will cause a surge in control costs, and on the other hand, it is easy to make the problem infeasible, especially when the uncertainty of power injection is large. Moreover, the violation level of different lines can be set to different values. For the critical lines, appropriately reducing the violation level can improve safety, and for non-critical lines, increasing the violation level appropriately can reduce generation costs. Obviously, CC-PSCOPF is more flexible compared with traditional PSCOPF, which can only balance the control costs and security by adjusting the contingency set.

Efficiency of the Proposed Method
The time consumption of PSCOPF and CC-PSCOPF was tested on the IEEE-30 test system and a larger-scale system, the IEEE-118 test system. The constraint numbers and time consumption of these two optimization formulations are listed in Table 4. It is evident that the constraint numbers significantly influence the efficiency of the optimization model. CC-PSCOPF is much faster than PSCOPF because the line limit constraints of all the system topologies are reduced to the same number of lines by the law of total probability.

Conclusions
Currently, and in the future, increasing uncertainty brings challenges for power systems. The traditional SCOPF under strict N-1 criterion can barely meet the requirements of a secure operation. To obtain an operational state that is robust to uncertainties and to improve the overall operational reliability, a novel CC-PSCOPF was proposed in this paper. The probability distribution of the overall line flow is obtained and constrained within the limits with a high probability guarantee in the proposed optimization model. This type of constraint greatly reduces the number of constraints for the entire optimization problem, and additionally, the violation probability of each line can be flexibly adjusted as needed. In addition, the cumulant and Johnson systems are proposed to approximate the CDF curves, so the chance-constraint optimization model proposed in this paper is not limited to the Gaussian distribution assumption.
The proposed CC-PSCOPF can be used to improve the safety level of a system's operation, especially for a system with a high level of RES penetration. How to determine the optimal violation level and correlations between uncertainty sources will be investigated in subsequent studies.
Author Contributions: H.L. conceived and designed the study; this work was performed under the guidance of Z.Z., B.Z. and X.Y. All authors have read and agreed to the published version of the manuscript.
Funding: This research received no external funding.