**3. System Control**

The controller design plays a very important role in order to guarantee safe and reliable interconnection and interoperability of DER with electric power systems (EPS) as requested by the standard rules [23]. Instead of traditional linear control methods, a sliding mode technique is adopted to control the power stages (i.e., DC-DC converter and inverter) with the aim of obtaining optimal performance in terms of fast dynamic response and robustness against uncertainties and disturbances. The sliding surface of the first power stage is developed to ensure a reduced ripple of the PV voltage, thus limiting fluctuations around the MPP. A suitable control of the inverter is implemented in order to keep balanced the voltages (*vC*1, *vC*2) at the inverter DC-link while ensuring higher power quality. In fact, in the two legs configuration (Figure 2), the midpoint at the DC-link capacitors ( *C*1 − *C*2) becomes a common-phase of the open-delta system. Consequently, the voltage unbalancing between the two capacitors is a relevant issue to be suitably controlled in order to prevent undesired e ffects.

The paper does not focus on the control of the power exchange between the *BESS* and the PV sources because of well-established control strategy, and the same applies for the battery managemen<sup>t</sup> system (BMS). On the contrary, attention is paid to the possibility of enhancing the system reliability due to the *BESS* integration, thus ensuring fulfillment of the load power demand even if the grid is tripped. In fact, the *BESS* does not act during normal operation (i.e., grid connected operation) but only in island mode. In the latter case, the *BESS* can accumulate the excess of power from the PVG (i.e., charging mode) if the power required by the load is less than the generated one.

Otherwise, it can provide the power backup if the load requires more power than generated (i.e., discharging mode). This means that the presence of the storage unit allows a flat profile of the load power regardless of the inherent variability of PV power production. Therefore, *BESS* makes the system able to continuously feed the critical load, thus enhancing the overall reliability.

In normal operation, the control of the DC-AC stage must ensure the energy transfer to the grid with unitary power factor and sinusoidal network currents, also keeping the load and the DC voltages (i.e., *vC*1, *vC*2) balanced. Thus, the dynamics of the DC-link voltage *vout* are relevant to control the displacement angle α (angle between load voltages and network voltages) during normal operation and the storage system during islanding.

As shown in Figure 2, the sliding controllers adapt to circuit configuration due to a de-multiplexer driven by a proper selection signal (*sel*) derived from the islanding detection block, which also activates the circuit breaker by means of the signal *S*. In other words, the islanding detection block is able to autonomously change the operating mode from normal operation to islanded mode. The two di fferent operating modes are described in the following sub-sections.
