**4. Numerical Results**

A set of simulations is carried out on the grid-connected PV system (see Figure 2) in PLECS environment. The system under study is implemented by using the circuit parameters listed in Table 1.


**Table 1.** Used circuit parameters.

The PV array is described by a physical model based on the five parameters single diode model, where the unknown parameters are: *Iph* (photo-generated current), *I*0 (reverse saturation current), *Rs* (parasitic series resistance), *Rsh* (parasitic shunt resistance), and *a* (diode ideality factor). The aim is the evaluation of these parameters at Standard Test Conditions (STC) and also under varying environmental conditions by using data-sheet information. As a consequence, the parameters of the PV model are estimated, and the used values are reported in Table 2, where *Vt* = *akT*STC/*q* is the thermal voltage, *T*STC is the junction temperature at STC, and *ns* is the number of cells.

**Table 2.** Estimated input parameters of a PV module.


The considered PVG consists of a PV array with *Ns* = 17 series connected panels (i.e., PV string) and *Np* = 3 parallel connected strings to reach the desired power level. Figure 4 shows the current–voltage (I–V) and the power–voltage (P–V) characteristics of the considered PV array in Standard Conditions. The corresponding MPP values are *V*MPP = 412 V, *I*MPP = 20.4 A, *P*MPP = 8.41 kW. Moreover, the used control parameters are summarized in Table 3.

**Figure 4.** Current–voltage (I–V) and power–voltage (P–V) curves at Standard Test Conditions (STC).


**Table 3.** Control parameters.

Regarding the sizing of the battery pack, the most relevant parameter to take into account is the battery capacity, which is assumed constant, even in cases of di fferent discharging current rates, in order to simplify the model. The other main parameters are the stored energy and the State of Charge (*SOC*). The latter is reported in the following Equation:

$$\text{SOC}(t) = \text{SOC}(t\_0) - \frac{1}{\text{Q}\_0} \int\_{t\_0}^t i\_b \,\text{d}\tau \tag{30}$$

where *Q*0 is the total charge storable in the battery, while *ib* is the discharging current.

A simplified circuital model is implemented to describe the behavior of the *BESS*. The equivalent circuit is the series of a voltage source providing the open-circuit voltage *Voc* and a lumped resistor *Rint*, modeling internal resistance of batteries. The open-circuit voltage is dynamically obtained as function of the *SOC* by the following non-linear relationship:

$$V\_{\alpha} = E\_0 + \frac{R \, T}{F} \, \log\left(\frac{SOC}{1 - SOC}\right) \tag{31}$$

where *E*0 is the standard potential of the battery, *R* is the ideal gas constant, *T* is the absolute temperature, and *F* is the Faraday constant. The size of the battery results from the need to support the PV power generation in order to meet the load demand. As a consequence, a storage unit should be able to provide the total rated load power (i.e., 4 kW) for an hour, corresponding to a battery energy of 4 kWh. This choice allows one to overcome a grid trip and also to mitigate the inherent variability of PV production while ensuring a continuous power supply to critical load. Hence, the used *BESS* presents a capacity of 20 Ah with a rated voltage of about 200 V and total internal resistance of 30 m Ω.

The load is considered pure resistive, and the chosen resistance of each load is equal to the *rms* line-to-line grid voltage divided by the corresponding power *RA* = *RB* = *E*<sup>2</sup>/*Pload* = 80 Ω (see Figure 2). Moreover, an additional load in parallel with the grid is considered to take into account other loads on the grid network, which may continue to be supplied by the inverter after the grid trip and before the grid disconnection. These additional loads are assumed to be an order of magnitude greater than the local load.

#### *4.1. Normal Operation and Islanding Detection*

In this work, we paid particular attention to both islanding detection and *BESS* control in order to guarantee fault tolerant operation of the inverter. The load demand is globally set at 4 kW (i.e., 2 kW for each load), while the PVG is considered to be operated at STC, thus leading to a PV power production of about 8.4 kW. In such a case, the power di fference between PV available power and load demand is transferred to the grid with unity power factor due to the proper control of the displacement angle α, which assumes a positive value. As a consequence, the main issue to be addressed is represented by the islanding detection and the consequent disconnection from the utility network within the time constraint fixed by standard rules [27], which is typically 2 s.

Figure 5 shows the behavior of the PV voltage, which tracks stably the desired MPP in steady-state, thus leading to an MPPT efficiency of 99%. Furthermore, the control strategy allows one to obtain the desired voltage level at the inverter input (see Figure 6a) by means of well-balanced voltages *vc*1, *vc*2 at the DC-link (see Figure 6b,c).

**Figure 5.** PV voltage (blue line) vs. maximum power point tracking (MPPT) reference voltage (red line).

**Figure 6.** Time behavior of DC-link voltage: (**a**) total DC-link voltage; (**b**) separate DC-link voltage at each capacitor; (**c**) zoom view of separate DC-link voltage at each capacitor.

The time behavior of the displacement angle α is drawn in Figure 7; as expected, it assumes a positive value, which means that the excess power (i.e., the difference between PV power generation and load power request) is transferred to the grid. The voltage and the current behavior of the latter are shown in Figure 8. The grid currents results are sinusoidal and in phase with the grid voltages, thus leading to an almost unity power factor.

**Figure 7.** Time behavior of displacement angle α.

**Figure 8.** Steady-state behavior of grid currents and voltages.

The steady-state behavior of the load current is in Figure 9a, while Figure 9b shows the power at steady-state. It can be noted that PV excess power with reference to the load power demand is transferred to the grid.

**Figure 9.** Steady-state behavior of load currents (**a**) and of power (**b**): load power (blue line), PV power (green line), and grid power (red line).

Figure 10 shows the results of the proposed ID method. The circles correspond to the envelope value in the middle of the chosen moving window, which has a time duration of 20 ms, as highlighted in the figure and discussed in Sub-Section 3.2. The arrow lines identify the sliding windows, while the colors are the same of the corresponding envelope detected value. The detection happens when the PCC voltage envelope falls outside a suitable safety range, whose typical upper and lower limits are <sup>+</sup>10%/−15% of the rated value. In our case, in a conservative way, we considered a range of ±10% of the rated value equal to √ 2 *E* (i.e., the voltage interval (509–622 V) defined by the blue and red lines in Figure 10).

The grid fault event occurs at *t* = 3 s (i.e., after 200 ms, it reached steady-state condition). The first value of the envelope that lies outside the safety range is the green circle, which represents the center of the window identified with the green arrow line. Nevertheless, as previously discussed, the grid trip event can be detected only at the end of the window or rather, in such a case, 10 ms after the event itself.

**Figure 10.** Point of common coupling (PCC) voltage envelope middle values (circles).

## *4.2. Islanded Mode*

Once the grid trip is detected, the control strategy must properly act to prevent supplying the network by disconnecting the inverter, which must continue to feed the critical local load.

The PV and the DC-link voltage behaviors in islanding mode are depicted in Figure 11. The grid trip event occurs at 3 s, while its detection is at 3.01 s, which is the time instant when the inverter is disconnected from the grid and the new control action starts.

**Figure 11.** PV and the DC-link voltage behaviors: (**a**) PV voltage (blue line) and maximum power point (MPP) voltage reference (red line); (**b**) DC-link voltage (blue line) and corresponding reference voltage.

The MPP tracking is lost during only one MPPT cycle after the grid fault, while the DC-link voltage diverges from its reference with a maximum overshoot of 0.3% of the reference and recovers the desired behavior in a time interval lower than 1 s.

The time behavior of the *BESS* is drawn in Figure 12; initially (i.e., during normal operation), the battery is in idle mode (battery voltage is equal to the rated value of 200 V, battery current is zero, and the *SOC* is equal to its initial value of 50%). Once the grid trip is detected, the control section activates the battery, which can absorb (i.e., *BESS* charging) the PV power not used by the load; the system operates in island mode without undesired curtailment of PV production. Otherwise, the battery can provide the difference of the PV power with respect to the load demand, ensuring a continuous power supply to the critical load and enhancing system reliability and flexibility.

Finally, in Figure 13, the steady-state load current and the system power behavior are depicted.

**Figure 12.** *BESS* time behavior: (**a**) voltage; (**b**) current; (**c**) power; (**d**) State of Charge (*SOC*).

**Figure 13.** Steady-state behavior of load currents: (**a**) and of power (**b**); load power (blue line), PV power (green line), and battery power (red line).

It can be noted (see Figure 13a) that the load current is the same of Figure 9a, or rather no detrimental effect on the load arises from the grid trip event. In addition, Figure 13b shows how the PV power (i.e., about 8.4 kW) is higher than load demand (i.e., 4 kW). The excess power, which usually would be lost, is provided to the battery, leading to a flat power transfer to the load.
