*3.2. Islanding Detection*

The continuity of power supply to critical local load should be guaranteed also in case of lack of utility grid supply (e.g., fault condition or maintenance purpose). For this purpose, the grid trip must be properly detected to quickly counteract to this event. Several IDMs have been proposed. They can be classified in two main categories: passive and active methods. The former methods are based on the detection of a change or the rate of change in a power system parameter, while the latter are generally based on the introduction of small perturbations at the inverter output, thus generating small changes in a parameter of the power system [6]. As already discussed in the introduction, the proposed method is based on the pure observation of the envelope of the PCC voltage (e.g., *eA* in Figure 2) obtained by performing the absolute value of the Hilbert transform, thus it can be classified as a passive IDM. The outcome of the used Hilbert transform algorithm is an analytical complex signal:

$$y(t) = f(t) + j\hat{f}(t),\tag{23}$$

where *f*(*t*) is a real function and ˆ *f*(*t*) is its Hilbert transform, which, in the time domain, is a convolution between the Hilbert transformer 1/(π *t*) and the original signal *f*(*t*):

$$f(t) = f(t) \* \frac{1}{\pi \text{ ft}}^{} = \frac{1}{\pi} P \int\_{-\infty}^{+\infty} \frac{f(\tau)}{t - \tau} \,\text{d}\tau \tag{24}$$

where *P* represents the Cauchy principal value. By means of some mathematical manipulations, it is easy to verify that a real function and its Hilbert transform are orthogonal. The polar representation of the analytical complex signal is:

$$y(t) = \text{ } \mathfrak{e}(t) \text{ } \text{e}^{j}\text{ } \text{ } \text{ } \tag{25}$$

where ϕ(*t*) = tan−<sup>1</sup> ˆ *f*(*t*)/ *f*(*t*) is the instantaneous phase, while *e* (*t*) = *f* <sup>2</sup>(*t*) + ˆ *f* <sup>2</sup>(*t*) is the instantaneous amplitude or rather the envelope of the original signal. In our case, it is the envelope of the PCC voltage *eA*:

$$
\sigma\_c(t) = \sqrt{\mathfrak{e}\_A^2(t) + \mathfrak{e}\_A^2(t)}\tag{26}
$$

The grid trip event determines a large spike in the monitored quantity (Equation (26)), which exceeds a suitable permitted range, thus allowing proper and quick detection of the grid fault. In fact, the proposed islanding detection method is carried out by monitoring the envelope of the original sampled voltage *eA* (i.e., the line-to-line voltage) at PCC. In particular, a moving window of 20 ms (i.e., one grid cycle) with a time shift of 5 ms is used to evaluate the envelope, but only the center value in the window is considered to detect the possible grid outage with the aim of excluding the edge e ffects that could produce a false positive.

As a consequence, after a grid trip event, the maximum time requested to detect the islanding is equal to 12.5 ms (i.e., 10 ms due to half of the window length plus half the time shift), while in case the grid trip event results in synchronization with the grid period, the minimum time of 10 ms is required to detect the network failure.

Once this event is detected, the control section rapidly acts in order to disconnect the grid from the PV inverter by means of the proper circuit breaker interposed between the inverter and the utility network (see also Figure 2). Moreover, the selection signal (i.e., *sel* in Figure 2) provided by the islanding detection block is able to commutate the control in order to take into account the new system configuration.

In fact, in islanded mode, the control of the displacement angle α is no longer needed, while the dynamics of DC-link voltage *vout* are now useful in order to control the *BESS*, which acts to guarantee the energy continuity to the critical local load. As a consequence, an increase of the voltage *vout* means that the load power request is greater than the PV generated one; the *BESS* should provide the needed amount of power to cover the load demand, while, when the power load request is lower than generated one, the *BESS* can accumulate the excess of power from the PVG.
