## 4 Methodology
### Power System Model  
A power transmission system is described by a directed graph \(G=(V,E)\) consisting of a set of nodes \(V\) and a set of branches \(E\), where each branch \(e\in E\) represent a transmission line or a transformer and each node \(i\in V\) a connection point between two or more electrical components, also referred to as bus. At some of the buses power is injected into the network, while at others power is consumed by system loads. Transmission lines and transformers, can be described by a generic per-phase equivalent \(\pi\)-circuit model depicted in Figure 1, which reflects the basic properties of both components, such as resistance \(R_{ft}\), reactance \(X_{ft}\), line charging susceptance \(b_{ft}\), transformer tap ratio \(t_{ft}\) and phase shift angle \(\phi_{ft}\). From the \(\pi\)-circuit model, we can derive for each branch \(e\in E\) a branch admittance matrix \(\mathbf{Y}_{br}\), which relates the complex from-bus and to-bus current injections \(I_{f}\) & \(I_{t}\), respectively, to the complex from-bus and to-bus voltages \(V_{f}\) & \(V_{t}\), respectively, as follows:  
Figure 1: Generic branch model (\(\pi\)-circuit) for modeling transmission lines (\(t_{ft}=1\) & \(\phi_{ft}=0\)), in-phase transformers (\(\phi_{ft}=0\)) and phase-shifting transformers (\(\phi_{ft}\
eq 0\)). The transformer tap ratio is modeled only on the from-Bus side of the branch model. \[ \begin{bmatrix}I_{f}\\ I_{t}\end{bmatrix} = \begin{bmatrix}a_{ft}^{2}(y_{ft}+\frac{b_{ft}}{2})&-t_{ft}^{*} \cdot y_{ft}\\ -t_{ft}\cdot y_{ft}&a_{tf}^{2}(y_{ft}+\frac{b_{ft}}{2})\end{bmatrix}\begin{bmatrix} V_{f}\\ V_{t}\end{bmatrix}  \tag{1}\]  
with  
\[t_{ft}=\frac{V_{p}}{V_{f}}=a_{ft}\,e^{i\phi_{ft}},\ a_{ft}=\frac{|V_{p}|}{|V_{f}| },\ y_{ft}=\frac{1}{R_{ft}+jX_{ft}}=\frac{1}{Z_{ft}} \tag{2}\]  
The elements of the branch admittance matrices can be used to assemble the bus admittance matrix \(\mathbf{Y_{bus}}\) which describes the relation between the vector of complex bus current injections \(\mathbf{I}\) to the vector of complex bus voltages \(\mathbf{V}\) for the entire power network. \[\mathbf{I}=\mathbf{Y_{bus}}\cdot\mathbf{V},\quad\mathbf{Y_{bus}}=\left[Y_{ij} \right]^{N_{b}\times N_{b}} \tag{3}\]  
The steady state power balance in the power system is derived from [PERSON]'s Current Law (KCL, i.e., all incoming and outgoing currents at a bus must sum up to zero) applied to each bus in the network, which yields the following complex power balance matrix equation for the entire network:  
\[\mathbf{S}=\mathbf{V}\cdot\mathbf{I}^{*}\Rightarrow(\mathbf{P_{G}}-\mathbf{P_ {D}})+j(\mathbf{Q_{G}}-\mathbf{Q_{D}})=\mathbf{V}\cdot\mathbf{Y_{bus}^{*}} \cdot\mathbf{V}^{*} \tag{4}\]  
where the left hand side describes the active \(\mathbf{P}\) and reactive \(\mathbf{Q}\) power injections/extractions at generation/load buses, respectively, and the right hand side the incoming and outgoing apparent power flows from transmission lines and transformers. The operation of a power system is restricted by a number of constraints imposed by technical components and stakeholders (producers, consumers, regulators etc.) involved in the power supply chain. Transmission lines, for instance, can only transport a limited amount of power due to thermal restrictions, while the operation of power plants is limited by the capability curves of the installed generators. The power transmission system operator (TSO) is responsible for respecting these constraints, while operating the system in an economic and secure manner.