**2. System Modeling**

The power inverter in the "two legs" configuration shown in Figure 2 is arranged in a double-stage architecture. The first power stage is a step-up DC-DC converter with coupled inductors [20–22] that allows high efficiency and high voltage gain (see Figure 3). It consists of a primary inductor *L*1 and a secondary inductor *L*2, while resistors *R*1 and *R*2 account for inductors copper losses.

**Figure 3.** First power stage with coupled-inductors and *BESS*.

The winding ratio of the magnetically coupled inductors is equal to *rn* = *N*2/*N*1, where *N*1 and *N*2 are the turn numbers of the primary and the secondary inductor, respectively. In our analysis, the coupling coefficient *k* is considered ideal (i.e., *k* = 1), thus the total inductance is *L* = (*N*1 + *<sup>N</sup>*2)<sup>2</sup>*L*0, with *L*0 the inductance of a single winding. The integrated *BESS* is connected to the input DC-link through an auxiliary bidirectional DC-DC converter.

With reference to Figure 3, the mathematical model of the coupled inductors converter can be expressed as:

$$\begin{cases} \frac{\text{d}\ \dot{i}\_{in}}{\text{d}\ \dot{t}} = \frac{v\_{in} - R\_1 \ i\_{in}}{L\_1} u + \frac{v\_{in} - v\_{out}}{L\_1(1+r\_n)}(1-u) - \frac{R\_1 + R\_2}{L\_1(1+r\_n)^2} i\_{\text{nt}}(1-u) \\\\ \frac{\text{d}\ \dot{v}\_{in}}{\text{d}\ \dot{t}} = \frac{\dot{i}\_{\text{pv}} + \dot{i}\_{\text{ds}}}{C\_{\text{in}}} - \frac{\dot{i}\_{\text{m}}}{C\_{\text{in}}} u - \frac{\dot{i}\_{\text{m}}}{(1+r\_n)C\_{\text{in}}} \left(1-u\right) \\\\ \frac{\text{d}\ \dot{v}\_{\text{mt}}}{\text{d}\ \dot{t}} = \frac{2\left.\dot{i}\_{\text{m}}\right|}{(1+r\_n)C} \left(1-u\right) - \frac{2\left.\dot{i}\_{\text{mu}}}{C} \end{cases} (1)$$

where *u* {0,1}. More specifically, *u* = 1 when *S*1 is ON; *u* = 0 when *S*1 is OFF. Moreover, *C* is equal to *C*1 = *C*2.

The second power stage is a two-phase DC-AC inverter, where the phase *A* is supplied by the line-to-line voltage *eA*, and the phase *B* by *eB*, while the generated output inverter voltages are *vinvA* and *vinvB*. The two capacitors *C*1 = *C*2 ensure the power decoupling with respect to the first power stage. The inverter supplies the local load modeled by means of two properly sized resistors (i.e., *RA*, *RB*) through a filter (*Lf* − *Cf*). The load is clearly unbalanced, but, as demonstrated below, the inverter is always capable of carrying out an effective balancing action. At the network side, the line three-phase transformer is modeled by the equivalent parameters *Rt* − *Lt*, which also includes a suitable series inductance to decouple the inverter from the grid with the aim of reaching better performance in terms of power quality. Considering the circuit in Figure 2, the following Equations can be written:

$$\begin{cases} \frac{\text{d} \ \text{i}\_j}{\text{d} \ \text{f}} = \frac{2}{\text{3L}} \left( \mathbf{c}\_j - 2 \ R\_t \ \mathbf{i}\_j - \mathbf{v}\_{pj} - R\_t \ \mathbf{i}\_k \right) - \frac{1}{\text{3L}} \left( \mathbf{c}\_k - 2 \ R\_t \ \mathbf{i}\_k - \mathbf{v}\_{pk} - R\_t \ \mathbf{i}\_j \right) \\\\ \frac{\text{d} \ \text{i}\_{\text{inv}j}}{\text{d} \ \text{f}} = \frac{1}{\text{L}\_f} \left( \mathbf{v}\_{\text{inv}j} - \mathbf{v}\_{pj} \right) \\\\ \frac{\text{d} \ \text{v}\_{pj}}{\text{d} \ \text{f}} = \frac{1}{\text{L}\_f} \left( \mathbf{i}\_j + \mathbf{i}\_{\text{inv}j} - \mathbf{i}\_{pj} \right) \end{cases} \tag{2}$$

where the subscript indexes *j*, *k* ∈ {*A*, *B*} with *j* - *k*, while the dynamic behavior of DC-link voltages is given by:

$$\begin{cases} \frac{\mathbf{d} \cdot \mathbf{v}\_{\mathrm{cl}}}{\mathbf{d} \, t} = -\frac{1}{\mathbf{C}\_{1}} \begin{pmatrix} \boldsymbol{u}\_{A} \ \boldsymbol{i}\_{\mathrm{inv}A} + \ \boldsymbol{u}\_{B} \ \boldsymbol{i}\_{\mathrm{invB}} \end{pmatrix} + \begin{array}{c} \frac{\boldsymbol{i}\_{\mathrm{m}}(1-\boldsymbol{u})}{\mathbf{C}\_{1}(1+\boldsymbol{r}\_{\mathrm{n}})} \\\\ \frac{\mathbf{d} \cdot \mathbf{v}\_{\mathrm{c}2}}{\mathbf{d} \, t} = \frac{1}{\mathbf{C}\_{2}} \begin{bmatrix} (1-\boldsymbol{u}\_{A}) \ \boldsymbol{i}\_{\mathrm{invA}} + \left(1-\boldsymbol{u}\_{B}\right) \ \boldsymbol{i}\_{\mathrm{invB}} \end{bmatrix} + \begin{array}{c} \frac{\boldsymbol{i}\_{\mathrm{m}}(1-\boldsymbol{u})}{\mathbf{C}\_{2}(1+\boldsymbol{r}\_{\mathrm{n}})} \end{array} \end{cases} \tag{3}$$

It should be noted that only the two line-to-line voltages *vpA* and *vpB* are controlled in open-delta connection. At the ac network side, a circuit breaker can disconnect the inverter from the grid if this is tripped, thus forcing the operating mode changing from "normal operation" to "islanded mode" in order to meet the requirements of the new circuit configuration.
