## 2 Unified Electric Machine Model  
In this section, the derivation of the basic machine equations is done for an induction machine, but it can be easily expanded to any type of conventional machines [17]. Given the three-phase induction machine of Figure 1, the corresponding stator and rotor equations are (1). \[v_{sk}=r_{s}i_{sk}+\frac{d\varphi_{sk}}{dt}\Bigg{\}}\;\forall\;\text{phases}\;k=1,2,3 \tag{1}\]  
Which expand, using the Clarke transformations, into an homopolar component and a complex component, (2). In this work the homopolar component will be disregarded. \[ \begin{split}\bar{v}_{s}&=r_{s}\bar{i}_{s}+\frac{d \bar{\varphi}_{s}}{dt}\\ \bar{v}_{r}&=r_{r}\bar{i}_{r}+\frac{d\bar{\varphi}_{ r}}{dt}\end{split}  \tag{2}\]  
Similarly, the rotor and stator phase flux equations can be transformed into their complex form, (3). \[ \begin{split}\bar{\varphi}_{s}&=L_{s}\bar{i}_{s}+ \bar{\varphi}_{sT}=L_{s}\bar{i}_{s}+L_{m}\bar{i}_{r}e^{i\theta}\\ \bar{\varphi}_{r}&=L_{r}\bar{i}_{r}+\bar{\varphi}_{ rT}=L_{m}\bar{i}_{s}e^{-j\theta}+L_{r}\bar{i}_{r}\end{split}  \tag{3}\]  
where \(L_{m}\) is the coefficient of mutual inductance and \(L_{s}\) and \(L_{r}\) are the stator and rotor auto-inductance respectively. As said before, (2) and (3) are the general machine equation for an induction machine. However, the same description can be used for all the other types of machines with the appropriate consideration regarding the different rotor fluxes. The structure is identical, but the anisotropy introduces asymmetries in the linked fluxes. It is easier now to express these equations in a matrix form using the \(d\)-\(q\) frame convention. Therefore, the stator and rotor voltages, for example, are written as a single column vector such as in (4). \[\mathbf{v}(t)= \begin{bmatrix}v_{sk}^{s}\\ v_{sk}^{s}\\ v_{rd}^{r}\\ v_{rd}^{r}\end{bmatrix}  \tag{4}\]  
For this paper, the naming convention, given a generic value  
\[x_{ab}^{c}\]  
is as follows:* _a_: subscript that indicates where that value is measured, \(s\) for stator, \(r\) for rotor, \(m\) for mutual;
* _b_: subscript indicating if the value is referred to the \(d\) or \(q\) axis;
* _c_: superscript showing the reference frame that the value is given, \(s\) for stator, \(r\) for rotor reference frame. This approach tries to keep all its algorithm into the _natural_ reference frame, which means that every value is given into the reference frame into which it can be measured. This is therefore true when the value has the same letter (_s_ or _r_) for both the measured position and the reference frame. In the same way as (4), currents and fluxes also are put in matrix form, (5). \[\mathbf{i}(t)= \begin{bmatrix}i_{sd}^{s}\\ i_{sd}^{s}\\ i_{rd}^{r}\\ i_{rd}^{r}\end{bmatrix} \qquad\mathbf{\varphi}(t)= \begin{bmatrix}\varphi_{sd}^{s}\\ \varphi_{sd}^{s}\\ \varphi_{rd}^{r}\\ \varphi_{rd}^{r}\end{bmatrix}  \tag{5}\]  
Using (4) and (5), the voltage equation is written in a compact form (6). \[\mathbf{v}(t)=[R]\mathbf{i}(t)+\mathbf{\dot{\varphi}}(t) \tag{6}\]  
In the same way, introducing \(\mathbf{\varphi}_{e}\) as the rotor excitation flux matrix, the flux equation becomes (7). \[\mathbf{\varphi}(t)=[L]\mathbf{i}(t)+\mathbf{\varphi}_{e}(t) \tag{7}\]  
With:  
\[\mathbf{\varphi}_{e}(t)= \begin{bmatrix}\varphi_{sd}^{s}\\ 0\\ \varphi_{cr}^{r}\\ 0\end{bmatrix}  \tag{8}\]  
Other than the excitation flux matrix, any machine is described by the two parameter matrices: \([R]\), or resistance matrix, and \([L]\), or inductance matrix. They are defined as in (9) and (10), as also described in the relative paper [17], where these matrices have been derived for the Unified Electric Model. Figure 1: Three-phase Induction machine example. \[[R]= \begin{bmatrix}r_{s}&0&0&0\\ 0&r_{s}&0&0\\ 0&0&r_{r}&0\\ 0&0&0&r_{r}\end{bmatrix}  \tag{9}\] \[[L]= \begin{bmatrix}L_{sd}&0&L_{md}^{r\to s}&0\\ 0&L_{sq}&0&L_{mq}^{r\to s}\\ L_{md}^{s\to r}&0&L_{md}&0\\ 0&L_{mq}^{s\to r}&0&L_{rq}\end{bmatrix}