# Probabilistic Resilience Analysis of the Icelandic Power System under Extreme Weather
## 3 Methodology
### Bi-Level Attacker-Defender Model  
The scope of the bi-level attacker-defender model is to quantify the vulnerability of any random system state generated by simulating the uncertain impact of extreme weather on the survival of transmission system components. More specifically, we seek to quantify how well the system can cope with any additional failure, while taking into account the fact that the control room operators would use any available action to avoid the involuntary loss of load. To do so, the problem upper-level models an intelligent attacker agent, seeking to maximize the damage that it may cause by removing an additional transmission component from service. We express the damage caused by such intelligent attacker in terms of the amount of load demand that the control room operators would have to inevitably shed upon realizing its chosen additional outage. Accordingly, the lower-level models an intelligent defender agent, seeking to minimize involuntary load shedding given the realization of the outage chosen by the attacker. The lower-level part of the problem includes the DC power flow equality constraints, upper and lower bounds on active power generation, as well as bounds on the power flowing through all surviving system branches. Mathematically, the problem is stated as:  
\[\max_{\mathbf{u},sev}\mathit{ev} \tag{5}\]  
\[u_{\ell}\in[0;1]\quad\forall\ell\in\mathcal{L} \tag{6}\]  
\[u_{\ell}\leq a_{\ell}\quad\forall\ell\in\mathcal{L} \tag{7}\]\[\sum_{\ell\in\mathcal{L}}(1-u_{\ell})\leq 1+\sum_{\ell\in\mathcal{L}}(1-a_{ \ell,t}) \tag{8}\] \[\sum_{\ell\in\mathcal{L}}u_{\ell}\cdot|\beta_{n,\ell}|\geq\sum_{ \ell\in\mathcal{L}}a_{\ell,t}\cdot|\beta_{n,\ell}|+(1-\sum_{\ell\in\mathcal{L} }\cdot|\beta_{n,\ell}|)\cdot M\quad\forall n\in\mathcal{N}\] (9) \[\text{\it sev}\leq\sum_{n\in\mathcal{N}}s_{n}^{*}\cdot d_{n}\] (10) \[s_{n}^{*}\in\operatorname*{arg\,min}_{\textbf{f},\textbf{p}, \textbf{s}},\sum_{n\in\mathcal{N}}s_{n}\cdot d_{n}\] (11) \[\theta_{n_{0}}=0\] (12) \[0\leq s_{n}\leq 1\quad\forall n\in\mathcal{N}\] (13) \[\sum_{g\in\mathcal{G}}\gamma_{g,n}\cdot p_{g}-\sum_{\ell\in \mathcal{L}}\beta_{\ell,n}\cdot f_{\ell}=d_{n}\cdot(1-s_{n})\quad\forall n\in \mathcal{N}\] (14) \[u_{\ell}\in[0;1]\quad\forall\ell\in\mathcal{L} \tag{6}\]0 (15) \[u_{\ell}\in[0;1]\quad\forall\ell\in\mathcal{L} \tag{6}\]1 (16) \[u_{\ell}\in[0;1]\quad\forall\ell\in\mathcal{L} \tag{6}\]2  
where,  
* upper-level continuous variable, modeling the severity of the attacker's choice;
* upper-level binary variable, modeling the choice of the attacker to remove branch \(\ell\) from service;
* binary parameter, modeling the availability status of branch \(\ell\);
* binary parameter, modeling the connectivity of branch \(\ell\) with node \(n\) and the assumed flow direction;
* a large constant parameter;
* lower-level continuous variable, modeling the ratio of involuntary load shedding applied at node \(n\);
* parameter, modeling the active power demand at node \(n\);
* lower-level continuous variable, modeling the voltage angle at node \(n\) (index \(n_{0}\) is used to denote the network reference node);
* binary parameter, modeling the connectivity of generator \(g\) with node \(n\);
* lower-level continuous variable, modeling the active power output of generator \(g\);
* lower-level continuous variable, modeling the active power flow through branch \(\ell\);
* parameter, modeling the capacity of generator \(g\);
* parameter, modeling the reactance of branch \(\ell\);
* parameter, modeling the capacity of branch \(\ell\);
* set of generating units;
* set of transmission branches; and,
* set of nodes. Constraints (6)-(8) impose that the upper-level agent may only remove from service any single component that has survived thus far, while (9) can be used to avoid trivial solutions that are associated to structural vulnerabilities of the intact system, and more specifically the choice of an attack isolating a node that is connected to the network by a single branch.