Control of DGs

Both DGs (WTG and PV) are operated in fixed P-Q (active power-reactive power) control near the unity power factor operation; their active and reactive power supply before, during and after the fault F1 are shown in Figure 15. In grid-connected mode, the current-controlled voltage source converters (VSCs) of both the WTG and the PV models operate in the grid-imposed frequency mode (the grid-following mode) using the PLL (phase locked loop). However, after receiving the CB1 "open" signal, the current-controlled VSCs of both DGs use the reference voltage angle from the free-running VCO (voltage controlled oscillator) and operate in the controlled-frequency mode (the grid-forming mode), since the PLL loses its synchronism after the loss of grid voltage. The variation of the LV side currents of DGs observed during the fault F1 in the grid-connected mode before the tripping of CB1 and before the activation of VCO (Figures 12 and 14) are due to PLL errors in the simulation model during the fault, but this does not cause errors in the OC function operations. Some additional resistances (0.39 ohm per phase) are connected in the series with the output terminal inductors of the PV system to maintain a terminal voltage constant in islanded mode. These types of grid-following and grid-forming VSC controls are explained in more detail in [44]. Previously, the conventional f/P (frequency/active power) and V/Q (voltage/reactive power) droop is applied to at least one grid-side converter of a WTG from the group of WTGs connected to the same bus to act as the voltage and frequency control sources in the islanded mode. The converters of the remaining WTGs follow the controlled system frequency. In this way, the response of the islanded system due to the sudden large changes of the load is kept smoother compared with the controls where the voltage and frequency droops are applied to converters of all WTGs [45,46]. The results in Figures 16 and 17 indicate how the AC microgrid is smoothly transitioned to the islanded mode with the applied controls of DGs after the fault F1 is cleared. Figure 16 indicates the variation of frequency during the clearance of fault F1; therefore, the frequency immunity of DGs is also required in addition to the standard LVRT characteristics.

**Figure 15.** T Active power (P) and reactive power (Q) supply from DGs before, during and after fault F1: (**a**) P and Q from the PV system and (**b**) P and Q from the WTG. Note: WTG supplies the entire Q demand in islanded mode.

**Figure 16.** Three-phase RMS voltage and frequency of DGs before, during and after fault F1 (**a**) low-voltage (LV) side of the PV system and (**b**) medium voltage (MV) side of the WTG.

**Figure 17.** Three-phase RMS voltage and current and single-phase instantaneous voltage at loads before, during and after fault F1: (**a**) MV load and (**b**) LV load.

#### *4.2. Results for Fault F2 in Islanded Mode and the Creation of Two Islands within the Islanded AC Microgrid*

For three-phase fault F2 in the islanded mode (CB1 and CB2 open in Figure 2), the adaptive OC relay logics are implemented in PSCAD according to Figure 8 and settings according to Figure 3 and Table 4. The fault starts at 1.2 s and ends at 5 s; this fault duration is small, but it is assumed to be a permanent fault. The fault current magnitude at IED6 and IED7 before, during and after fault F2 in the islanded mode is shown in Figure 18. It shows that the fault current magnitude is enough at the IED6 location, which is supplied by the WTG that is set to supply 1.2 p.u. of its rated current during the fault. The fault current at IED6, which is supplied by the WTG, is considerably higher than the maximum current at IED6 during any DG scenario, and therefore, the fault can be detected easily even with the grid-connected mode higher OC settings (SG GM) of IED6 (Table 4). Hence, IED6 can be a nonadaptive IED for this fault case. The fault current magnitude is limited at the IED7 location during F2, which is supplied only by the PV system; therefore, the fault F2 can only be detected by IED7 with islanded mode lower settings (SG IM). The IED7 should be necessarily adaptive in order to work even when the transfer trip from IED6 fails. Since the AC microgrid in this case is islanded, the settings of IED7 are already changed to islanded mode settings; hence, both IED6 and IED7 can detect the fault and trip simultaneously to remove the fault F2 after checking the magnitude of the current at downstream IED8. Alternatively, the trip block signal can be issued to IED7 from IED6, and IED7 can later be transfer-tripped after the opening of CB6. The results shown in this section are based on IED6 with one setting group (SG GM) that can detect the fault F2 in both the grid-connected and islanded modes. Although IED7 is adaptive, it has been transfer-tripped by IED6 in these results (Figure 19), according to method-B (20-ms GOOSE transfer) of Figure 8. Figure 20 shows the RMS currents of DGs before, during and after the fault F2 in islanded mode with fault clearance using CB2 direct transfer trip. Figure 21 shows the active and reactive power supply from DGs before, during and after the fault F2. Additionally, it is shown in Figures 22 and 23 how smoothly two islands are formed within the islanded AC microgrid after the clearance of the fault F2 at 1.34 s. The results of adaptive IED7 tripping after transfer trip failure from IED6 during the fault F2 are not included to avoid repetition, in which case the adaptive IED7 may detect the fault with the lower settings (SG IM) just like the adaptive IED2, as explained in Section 4.1. In that case, the adaptive IED7 will wait until the time of direct transfer trip is elapsed; this is considered as a transfer trip failure from IED6. The adaptive IED7 will then decide to trip CB7 with the lower settings for the complete clearance of the fault F2 during transfer trip failure. It should also be noted that the WTG is comparatively stronger source than the PV system. Therefore, for faults F3, F4 or F5 in islanded AC microgrid (CB1 and CB2 open in Figure 2), the WTG may still provide sufficient fault current, and the higher current settings (SG GM) for IED7, IED8 and IED9 may still work for any of the faults F3–F5 downstream of the WTG. For these faults (F3–F5), the current comparison method to find the location of the faults (upstream or downstream faults) will also be valid for the islanded mode with the WTG in operation. However, after the removal of the fault F2 (CB6 and CB7 open), two further islands will be created: the islanded MV system and the islanded LV system (Figure 2). The islanded MV system will be supplied by only the WTG, and the islanded LV system will be supplied by only the PV system. In this situation, only the adaptive lower settings (SG IM) of IED8 and IED9 will work. For any islanded scenario, IED3, IED4 and IED5 will always require lower adaptive settings (SG IM).

**Figure 18.** RMS current magnitude before, during and after fault F2 in the islanded mode at: (**a**) IED6 and (**b**) IED7 (IED7 direct transfer trip).

**Figure 19.** The operating times and status of breakers before, during and after the clearance of fault F2 in the islanded mode: (**a**) CB6 (main protection trip) and (**b**) CB7 (direct transfer trip).

**Figure 20.** RMS current magnitude per phase of DGs before, during and after fault F2 in the islanded mode (CB7 transfer trip): (**a**) LV side of the PV system and (**b**) LV side of the WTG.

**Figure 21.** Active (P) and reactive (Q) power supply from DGs before, during and after fault F2 in the islanded mode: (**a**) P and Q from the PV system and (**b**) P and Q from the WTG.

**Figure 22.** Three-phase RMS voltage and the frequency of DGs before, during and after fault F2 in islanded mode at: (**a**) the LV side of the PV system and (**b**) MV side of the WTG.

**Figure 23.** Three-phase RMS voltage, current and single-phase instantaneous voltage at loads before, during and after the fault F2 in the islanded mode at: (**a**) the MV load and (**b**) LV load.
