*3.3. Islanded Mode*

During islanding operation, the system dynamic behavior consequently changes. In fact, the presence of the *BESS* must be considered in order to properly control the power flow (i.e., *isto* - 0 in Equation (1)). In such a case, by considering the state space averaged model of the step-up converter in Equation (1), the magnetizing current reference can be written as:

$$I\_{m}^{ref} = \frac{1 + r\_{\text{n}}}{1 - D} I\_{out}^{ref} = \frac{1 + r\_{\text{n}}}{1 - D} \frac{V\_{in}^{ref}}{V\_{out}^{ref}} \left( i\_{pv} + i\_{sto} \right) \tag{27}$$

where the reference storage current is obtained by the PI controller as reported in Figure 2. Then, the same reasoning as in Sub-Section 3.1 can be here repeated in order to obtain a suitable sliding mode control law. Moreover, in the relationship in Equation (2), *ij* is zeroed due to activation of the breaker, while the dynamic behavior of DC-link voltages remains the same as described in Equation (3).

The control of the second power stage no longer takes into account the displacement angle α because of grid tripping. Thus, the reference quantities (subscript index 2) for the load line-to-line voltages (i.e., *vpA*, *vpB*) and also for their derivative (subscript index 1) of the two-phase system can be described by the vector:

$$\mathbf{x}\_{r\rangle} = \begin{bmatrix} \mathbf{x}\_{r\bar{\jmath}1}, \mathbf{x}\_{r\bar{\jmath}2} \end{bmatrix}^T \tag{28}$$

where the two components of **<sup>x</sup>***rj* for *j* = *A*, *B* are:

$$\begin{cases} \begin{aligned} \mathbf{x}\_{rA1} &= -\sqrt{2} \,\omega \, V\_p^{ref} \sin \left( \omega \, t + \vartheta \right) \\ \mathbf{x}\_{rA2} &= \sqrt{2} \, V\_p^{ref} \cos \left( \omega \, t + \vartheta \right) \\ \mathbf{x}\_{rB1} &= -\sqrt{2} \,\omega \, V\_p^{ref} \sin \left( \omega \, t + \vartheta + \pi/3 \right) \\ \mathbf{x}\_{rB2} &= \sqrt{2} \, V\_p^{ref} \cos \left( \omega \, t + \vartheta + \pi/3 \right) \end{aligned} \tag{29}$$

Then, the sliding surface can be obtained as in Equation (21) by considering the properly modified circuit variables.
