## 3 Modeling and Linearization of the System
### Network Equations  
In order to obtain the network equations, which consist of those algebraic equations associated with the power flow, it is necessary to make a generalization of [PERSON]'s law. For only one element, the relation between voltage/power and current is given by the following expression: \(\dot{I}=\frac{\dot{V}}{\dot{Z}}=\dot{I}\cdot\dot{Y}\) where:  
* \(\dot{Z}\) the impedance element (pu);
* \(\dot{Y}\) the admittance element (pu).  
As \(\dot{Y}=(\dot{Z})^{-1}\) is fulfilled for the multimachine case, an admittance element matrix is used as follows:  
\[\dot{Y}_{system}=\begin{bmatrix}\dot{Y}_{11}&\dots&\dot{Y}_{1n}^{{}^{\prime}} \\ \vdots&\ddots&\vdots\\ \dot{Y}_{n1}&\dots&\dot{Y}_{nm}\end{bmatrix} \tag{33}\]  
When considering the electric system in balanced conditions, the admittance matrix has a range given by the number of bars that the network has.  
In the case of an EPS under unbalanced conditions, it is not possible to use a phase equivalent model, and it is necessary to model the elements in its three components \(a\), \(b\), and \(c\). In this case, each element \(Y_{ij}\) of the admittance matrix \(Y_{system}\) corresponds to the other \(3\times 3\) matrix:  
Figure 3: Circuit of the zero sequence for the multimachine case generator.  
\[\dot{Y}_{ij}=\dot{Z_{ij}}^{-1}=\begin{bmatrix}\dot{Y}_{ij}^{\alpha i}&\dot{Y}_{ij}^{ \alpha b}&\dot{Y}_{ij}^{ac}\\ \dot{Y}_{ij}^{\alpha i}&\dot{Y}_{ij}^{\alpha b}&\dot{Y}_{ij}^{bc}\\ \dot{Y}_{ij}^{\alpha a}&\dot{Y}_{ij}^{cb}&\dot{Y}_{ij}^{cc}\end{bmatrix} \tag{34}\]  
where:  
* \(\dot{Y}_{ij}^{\alpha\beta}\) the admittance between bus \(i\) and bus \(j\) between phase \(\alpha\) and phase \(\beta\) (pu).  
In this case, the three-phase representation of the lines and transformers connected to the different bars of the EPS is considered. Thus, the network equations are used for each phase \(\beta\in(a,b,c)\) and for each \(i\) bar.  
Therefore, for each bar, there are three active and reactive power equations. Overall, there will be six algebraic equations for each bar. To represent the foregoing, the factor \(\gamma\) is used for all the necessary equations of the linear model.  
* Algebraic equations for a generation bus: \[\begin{split}& V_{i}^{\beta}[l_{Re_{i}}^{\beta}\cos(\theta_{i}^{ \beta})+l_{Im_{i}}^{\beta}\sin(\theta_{i}^{\beta})]+P_{L_{i}}^{\beta}(V_{i \beta})\\ =& V_{i}^{\beta}\times\left[\sum_{k=1\
eq i}^{n}\sum_{ \gamma\in[a,b,c]}\left[Y_{ik}^{\beta\gamma}\times[V_{i}^{\gamma}\cos(\theta_ {i}^{\gamma}+\delta_{ik}^{\beta\gamma}-\theta_{i}^{\beta})\right.\right.\\ &\left.\left.-\,V_{k}^{\gamma}\cos(\theta_{k}^{\gamma}+\delta_{ik}^{ \beta\gamma}-\theta_{i}^{\beta})\right]\right]\\ & V_{i}^{\beta}[l_{Re_{i}}^{\beta}\sin(\theta_{i}^{\beta})-I_{Im_{i }}^{\beta}\cos(\theta_{i}^{\beta})]+Q_{L_{i}}^{\beta}(V_{i\beta})\\ =& V_{i}^{\beta}\times\left[\sum_{k=1\
eq i}^{n}\sum_{ \gamma\in[a,b,c]}\left[Y_{ik}^{\beta\gamma}\times[-V_{i}^{\gamma}\sin(\theta_ {i}^{\gamma}+\delta_{ik}^{\beta\gamma}-\theta_{i}^{\beta})\right.\right.\\ &\left.\left.+\,V_{k}^{\gamma}\sin(\theta_{k}^{\gamma}+\delta_{ik}^{ \beta\gamma}-\theta_{i}^{\beta})\right]\right]\right]\end{split}\] (35)
* Algebraic equations for a load bus: \[\begin{split}& P_{L_{i}}^{\beta}(V_{\beta})=\\ & V_{i}^{\beta}\times\left[\sum_{k=1\
eq i}^{n}\sum_{\gamma\in[a, b,c]}\left[Y_{ik}^{\beta\gamma}\times[V_{i}^{\gamma}\cos(\theta_{i}^{ \gamma}+\delta_{ik}^{\beta\gamma}-\theta_{i}^{\beta})\right.\right.\\ &\left.\left.-\,V_{k}^{\gamma}\cos(\theta_{k}^{\gamma}+\delta_{ik}^ {\beta\gamma}-\theta_{i}^{\beta})\right]\right.\\ & Q_{L_{i}}^{\beta}(V_{i\beta})=\\ & V_{i}^{\beta}\times\left[\sum_{k=1\
eq i}^{n}\sum_{\gamma\in[a, b,c]}\left[Y_{ik}^{\beta\gamma}\times[-V_{i}^{\gamma}\sin(\theta_{i}^{ \gamma}+\delta_{ik}^{\beta\gamma}-\theta_{i}^{\beta})\right.\right.\\ &\left.\left.+\,V_{k}^{\gamma}\sin(\theta_{k}^{\gamma}+\delta_{ik}^ {\beta\gamma}-\theta_{i}^{\beta})\right]\right]\right]\end{split}\] (36)