## 3 Mathematical Model  
The mathematical model of the system can be written with some simplifying hypotheses. In particular, under the assumption that the capacitor of each submodule doesn't suffer large voltage perturbations during a single switching period and by neglecting the rise/fall time of the IGBTs, each leg of the converter can be represented as an ideal controllable voltage source, whose output depends on the instantaneous voltages of its submodules capacitors and on the switching signals applied to the submodules IGBTs. Moreover, it is reasonable to neglect the effect of the inductors' resistances and the difference between their inductances. The KVLs applied through each leg give  
\[\left\{ \begin{array}{l}v_{Sk}+v_{GT}=v_{Tk}+L_{int}\frac{\mathrm{d}i_{Tk}}{ \mathrm{d}t}+L_{S}\frac{\mathrm{d}i_{k}}{\mathrm{d}t}\\ v_{Sk}+v_{GB}=v_{Bk}+L_{int}\frac{\mathrm{d}i_{Bk}}{\mathrm{d}t}+L_{S}\frac{ \mathrm{d}i_{k}}{\mathrm{d}t}\end{array} \right.\text{with }k=1,2,3 \tag{1}\]  
where \(v_{Sk}\) is the \(k\)-th grid phase voltage, \(i_{k}\) is the \(k\)-th grid current, \(i_{Tk}\) and \(i_{Bk}\) are the \(k\)-th currents (flowing through the top and the bottom MMC converter legs, respectively), and \(v_{GT}\) and \(v_{GB}\) are the voltages measured between the ideal ground \(G\) and the transformer side output terminals \(T\) and \(B\). In particular, as it can be seen in Figure 2, while the grid voltages \(v_{Sk}\) are the input of the MMC converter, the voltage \(v_{MV}=v_{GB}-v_{GT}\) is the controllable output that actually feeds the primary side of the HF transformer. A simple equation for the transformer MV-side current \(i_{R}\) can be found once the transformer magnetizing current is neglected [17]. \[v_{MV}=v_{LV}^{\prime}+L_{R}\frac{\mathrm{d}i_{R}}{\mathrm{d}t} \tag{2}\]  
where \(v_{LV}^{\prime}\) is the transformer's LV-side voltage referred to the MV-side and \(L_{R}\) is the sum of the leakage inductances and of optional additional external series inductances. Naturally, \(i_{R}\) can be obtained as  
\[i_{R}=\sum_{k=1}^{3}i_{Tk}=-\sum_{k=1}^{3}i_{Bk} \tag{3}\]  
By using the space vector and zero sequence components, defined as  
\[\mathbf{x}=\frac{2}{3}\sum_{k=1}^{3}x_{k}\mathrm{e}^{\mathrm{i}\frac{2\pi}{3} (k-1)},x_{0}=\frac{1}{3}\sum_{k=1}^{3}x_{k} \tag{4}\]  
and by introducing the average and differential quantities, defined as  
\[x_{\Sigma}=\frac{x_{T}+x_{B}}{2},x_{\Delta}=x_{B}-x_{T} \tag{5}\]  
the system model can be rewritten as  
\[\left\{ \begin{array}{l}\mathbf{v}_{g}=\mathbf{v}_{\Sigma}+L_{g}\frac{ \mathrm{d}i}{\mathrm{d}t}\\ 0=\mathbf{v}_{\Delta}+L_{int}\frac{\mathrm{d}i_{B}}{\mathrm{d}t}\\ v_{\Delta 0}=v_{LV}^{\prime}+L_{eq}\frac{\mathrm{d}i_{B}}{\mathrm{d}t}\end{array} \right. \tag{6}\]  
where \(L_{g}=L_{s}+L_{int}/2\) is the grid-side equivalent inductance, while \(L_{eq}=L_{R}+2L_{int}/3\) is the transformer-side equivalent inductance. From the proposed model, it is evident how it is necessary to guarantee a balancing of the voltages on the capacitors of all the modules in order to appropriately control the power flows through the PET. Indeed, Equation (6) can be easily exploited with respect to the definition of the control strategy only if the capacitor voltages are assumed quasi-constant; in this case, each module can be modeled with a voltage generator driven by a constant source. In [18] the authors proposed an analytically based steady state model of the MMC in order to highlight the dependencies of the modules DC sides voltages behavior from the system operating condition and filter parameters. However, the proposed method refers to an MMC driven by a DC source for high-voltage DC (HDVC) systems, for which the DC sides of the converter are forced by unbalancing powers characterized by two predominant harmonics at \(f\) (dependent only on the AC currents) and \(2f\) (dependent on the AC currents and on the modulation index), with \(f\) the AC output frequency.