*3.1. 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:

$$\begin{cases} \quad \frac{P\_{Ri} = P\_{Ri} + \delta\_{Ri}}{P\_{Di} = P\_{Di} + \delta\_{Di}} & \forall i\\ \quad \frac{P\_{Di} = P\_{Di} + \delta\_{Di}}{P\_{Di} + \delta\_{Di}} & \end{cases} \tag{6}$$

where *P Ri* and *P Di* are the actual power injection of the *i*th RES and load, respectively, and δ*Ri* and δ*Di* are random variables that represent the forecast error of the power injection of the *i*th 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:

*P<sup>k</sup> l* = *N G Gi*=1 *AkGi PGi* + *N R Ri*=1 *AkRi P Ri* − *N D Di*=1 *AkDi P Di* = ( *N G Gi*=1 *AkGi PGi* + *N R Ri*=1 *AkRi PRi* − *N D Di*=1 *AkDi PDi*)+( *N R Ri*=1 *<sup>A</sup>kRi*<sup>δ</sup>*Ri* − *N D Di*=1 *<sup>A</sup>kDi*<sup>δ</sup>*Di*) ∀*l*, ∀*k* (7)

where *P<sup>k</sup> l* is the *l*th line flow under the *k*th 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:

$$P\_{\mathbf{r}}(s\_k) = 1 - e^{-\lambda\_l} \tag{8}$$

where *sk* is the *k*th contingency's system topology, Pr(*sk*) 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:

$$\Pr\_{\mathbf{r}}(\mathbf{s}\_0) = 1 - \sum\_{k=1}^{N\_k} \Pr\_{\mathbf{r}}(\mathbf{s}\_k) \tag{9}$$

Considering the uncertainty of power injections and the probability of contingency, the overall line flow *Pl* can be obtained through the law of total probability theory, and it is expressed as:

$$\begin{array}{rcl}P\_{l} &=& \operatorname{\mathbf{P}\_{\mathbf{r}}}(\mathbf{s}\_{0})P\_{l}^{0} + \operatorname{\mathbf{P}\_{\mathbf{r}}}(\mathbf{s}\_{1})P\_{l}^{1} + \cdots \operatorname{\mathbf{P}\_{\mathbf{r}}}(\mathbf{s}\_{N\_{k}})P\_{l}^{N\_{k}} & \forall l\\ &=& \sum\_{k=0}^{N\_{k}}{\sum\limits\_{G=1}^{k}{A\_{G}^{k}}P\_{G}P\_{\mathbf{r}}}(\mathbf{s}\_{k}) + \sum\_{k=0}^{N\_{k}}{\sum\limits\_{Ri=1}^{k}{A\_{Ri}^{k}}P\_{Ri}P\_{\mathbf{r}}}(\mathbf{s}\_{k}) -\\ & \sum\_{k=0}^{N\_{k}}{\sum\limits\_{Ri=1}^{k}{A\_{Di}^{k}}P\_{Dl}P\_{\mathbf{r}}}(\mathbf{s}\_{k}) + \sum\_{k=0}^{N\_{k}}{\sum\limits\_{Ri=1}^{k}{A\_{Ri}^{k}}P\_{Ri}P\_{\mathbf{r}}}(\mathbf{s}\_{k}) - \sum\_{k=0}^{N\_{k}}{\sum\limits\_{Ri=1}^{k}{A\_{Di}^{k}}P\_{Di}P\_{\mathbf{r}}}(\mathbf{s}\_{k}) \end{array} \qquad \forall l \tag{10}$$

Obviously, the probability distribution of the overall line flow *Pl* can be regarded as the weighted average of the line flow probability distribution under each system topology.
