# Cyber Insurance for Energy Economic Risks
## 3 The Proposed Cyber Insurance Planning Model
### Constraints  
Overall, the power distribution system is radially structured and the DistFlow equation is applied for power flow modelling [49]. Power and gas systems are intertwined through energy converters. These are accounted for in the Weymouth equations for gas systems.  
The output constraints of power distributed generators (DGs) \(p_{j,t}\), gas sources \(p_{j,t}\), gas turbines \(p_{gt,t}\), and power market injection \(p_{m,t}\) are stated in (9). Meanwhile, the reactive power output of DGs \(q_{i,t}\) is ensured in (10). Constraint (11) sets the upper and lower bounds for the charging/discharging power (\(p_{s,t}^{ch}\) and \(p_{s,t}^{dch}\)) of battery storage systems. Constraint (12) indicates the current battery state \(s_{s,t}\) is based on the state of the last time period \(r_{s,t-1}\), where \(\eta_{s}^{ch}\) and \(\eta_{s}^{dch}\) are the efficiencies.  
\[0\leq p_{\{\cdot\},t}\leq p_{\{\cdot\},max}\ \{\cdot\}=i,j,gt,m \tag{9}\]  
\[0\leq q_{i,t}\leq q_{i,max} \tag{10}\]  
\[0\leq p_{s,t}^{ch/dch}\leq p_{s,max}^{ch/dch} \tag{11}\]  
\[r_{s,t}=r_{s,t-1}+p_{s,t}^{ch}\eta_{s}^{ch}-p_{s,t}^{dch}/\eta_{s}^{dch} \tag{12}\]\[r_{s,min}\leq r_{s,t}\leq r_{s,max} \tag{13}\]  
Constraints (14) and (15) establish the relationship between voltage and power flow, where \(u_{b,t}^{ini}\) and \(u_{b,t}^{ter}\) are the voltages of initial and terminal buses on a same line; the active and reactive power flow are represented by \(f_{l,t}\) and \(qf_{l,t}\); the resistance and reactance are denoted as \(R_{l}\) and \(X_{l}\). Followed by the power flow expression are the magnitude constraints of the power flow in (16) and (17).  
\[u_{b,min} \leq u_{b,t}\leq u_{b,max} \tag{14}\] \[u_{b,t}^{ini}-u_{b,t}^{ter} =\left(f_{l,t}R_{l}+qf_{l,t}X_{l}\right)/u_{0}\] (15) \[0\leq f_{l,t}\leq f_{l,max}\] (16) \[0\leq qf_{l,t}\leq qf_{l,max} \tag{17}\]  
Similar to (11)-(13), Equations (18)-(20) show the gas storage modelling, where \(p_{gs,t}^{ch/dch}\) is the charging/discharging power at time t, \(r_{gs,t}\) is the remaining gas storage capacity, the operational efficiencies are represented by \(\eta_{gs}^{ch}\) and \(\eta_{gs}^{dch}\). In [50], the Weymouth gas flow equations are given, where \(\theta_{gl,\ t}\) is the pressure; the pressure at the initial and terminal gas nodes is \(\theta_{gl,t}^{ini}\) and \(\theta_{gl,t}^{ter}\); \(X_{gl}\) is the Weymouth equation constant; the gas flow is denoted as \(f_{g,l}\).  
\[0\leq p_{gs,t}^{ch/dch}\leq p_{gs,max}^{ch/dch} \tag{18}\] \[r_{gs,t}=r_{gs,t-1}+p_{gs,t}^{ch}\eta_{gs}^{ch}-p_{gs,t}^{dch}/ \eta_{gs}^{dch}\] (19) \[r_{gs,min}\leq r_{gs,t}\leq r_{gs,max}\] (20) \[\theta_{gl,\ min}^{2}\leq\theta_{gl,\ t}^{2}\leq\theta_{gl,\ max}^{2}\] (21) \[\theta_{gl,t}^{ini}\geq\theta_{gl,t}^{er}\] (22) \[f_{g,l,t}\Big{|}f_{g,l,t}\Big{|}f_{g,l,t}\Big{|}\] (23) \[0\leq f_{g,l,t}\leq f_{gl,max} \tag{24}\]  
Constraints (25) and (26) are the explicit modelling of FDI attacks. To successfully evade detection, the overall sum of the manipulated load deviation has to be unchanged, and the deviation magnitude must be limited to being within a safety range. Active and reactive power balance constraints are presented in (27) and (28), where \(\sigma_{rew,t}\) represents the renewable generation uncertainty; the load demand is \(p_{pl,t}\); the P2G conversion is \(p_{t}^{p2g}\). In (29), the gas balance constraint at each node is given.  
\[\sum_{pl}\Delta p_{pl,t}^{LR}\ =0 \tag{25}\] \[-\delta_{LR}p_{pl,t}\leq\Delta p_{pl,t}^{LR}\ \leq\delta_{LR}p_{pl,t} \tag{26}\]  
\[\sum_{i}p_{i,t}+\sum_{g\!t}p_{g,l,t}+\sum_{rew}\xi_{rew,t}+\sum_{l}f_{l,t}^{ini }-f_{l,t}^{ter}+\sum_{s}p_{s,t}^{dch}-p_{s,t}^{ch}\ =\sum_{pl}p_{p_{l},t}+\sum_{p 2g}p_{p_{2}g,t}+\Delta p_{pl,t}^{LR}\ -p_{pl,t}^{ls} \tag{27}\] \[\sum_{i}q_{i,t}+\sum_{l}qf_{l,t}^{ini}-\sum_{l}qf_{l,t}^{ter}=\sum _{pl}q_{pl,t}\] (28) \[\sum_{j}p_{j,t}+\sum_{g\!l}f_{g,l}^{ini}-f_{gl,t}^{er}+\sum_{p2g} p_{2g,t}+\sum_{g\!t}g_{gs,t}^{dch}-p_{gs,t}^{ch}=\sum_{gl}p_{g,l,t}+\sum_{g\!t}p_{ g,t} \tag{29}\]