**4. Simulation Results**

Simulation results are shown in Figures 8–10, considering the following variables: frequency per unit (fpu) in Figure 8, Root Mean Square (RMS) voltage p.u. in Figure 9 and active powers in kW for the WTG, HTG, DL and consumer load in Figure 10. In Figure 10, generated and consumed active powers are plotted positive and negative, respectively, so that in steady state the active powers sum is null. At the test starting point, the WHIM is in WO mode (flip-flop mode output 0 in Figure 7), so the HTG active power and flow rate are null, the consumer load and the DL are consuming 150 kW and 50 kW, respectively, and the WTG is generating an active power of 200 kW with a wind speed of 10 m/s. The system is in steady state.

In the following simulation results, the settling time has been chosen to be the time it takes for the system frequency to fall within a neighborhood of 0.01% around 1 p.u. steady state value after the event that produced the transient under discussion.

*Energies* **2020**, *13*, 5937

**Figure 9.** Microgrid RMS voltage in p.u.

*Energies* **2020**, *13*, 5937

**Figure 10.** Active powers in WTG, HTG, consumer load and dump load in kW.

#### *4.1. Simulations in WO Mode*

The three-phase breaker in Figure 3 is closed at *t* = 1 s, so that an extra 40 kW resistive load is connected to the system, as it can be observed in the load active power curve in Figure 10. The DL controller reacts by reducing the DL consumed power in the same quantity that the consumer load has increased, being the DL active power final value of 10 kW in steady state. Figure 10 also shows a positive peak transient in the WTG active power after the 40 kW positive load step, which counteracts the active power deficit and improves the frequency response. This effect is due to the IG present in the WTG, which provides a damped response [27]. The WTG power in steady state is 200 kW, as initially, since the wind speed does not change. In the transient, the fpu shows a minimum of 0.9988, the voltage maximum and minimum values are 1.0018 and 0.9908, respectively, and the settling time in this case is 0.975 s. The active power deficit detector does not activate.

#### *4.2. WO to WH Mode Transition*

At *t* = 5 s, wind speed decreases from 10 to 9 m/s and, consequently, the WTG active power decreases too, and gets smaller than the consumer load. The system frequency falls due to the active power deficit, so that DL PID control reduces the DL consumed power until it reaches zero. The system frequency fall activates the active power deficit detector, so the WHIM mode flip-flop output changes to 1, starting the WO to WH mode transition. The positive edge of the WH/WO\* signal triggers the HT KS system, whose output is added, as stated above, to the frequency error to be the HT PID input. Figure 10 shows a HTG power increasing with some initial oscillations during the transient. At steady state, which is reached 26.488 s after the negative wind step, the HTG final power is 47 kW. The final WTG active power is 143 kW. Due to voltage oscillations, the load power shows small variations too during the transient, but eventually settles at the initial value of 190 kW. The system frequency presents a minimum of 0.968 p.u. and the minimum and maximum voltages obtained are 0.9817 and 1.0146, respectively. Figure 8 also shows the system frequency with the KS function deactivated in red line, in which the frequency error is the only variable considered by the HT-PID. In the no-KS case, the minimum frequency is 0.9577, the minimum and maximum voltages are 0.9758 and 1.0195 and the settling time is 32.844 s. The frequency transient in

the noKS case is therefore 24% longer, and the voltage and frequency variations are bigger, which justifies the necessity of using the KS system for the WO mode to WH mode transition.

As can be seen, the transient duration occurring in WO mode is more than 26 times shorter than the one occurring in the transition from WO mode to WH mode. This fact indicates that both controllers, HT PID and DL PID, operate in different time scales and therefore supports the decision stated in Section 3 of keeping both active in WO mode.

#### *4.3. The WH Mode Simulation*

At *t* = 45 s the circuit breaker in Figure 3 is opened, thus reducing the consumer load in 40 kW. The WTG active power reacts firstly with a negative peak, which temporarily compensates the consumer load reduction. Again in this case, the IG provides damping. In steady state, this reached 30.89 s after the load reduction and the WTG remained at the initial value of 143 kW, since the wind speed does not change. Figure 10 shows a HTG power decreasing with oscillations at the beginning of the negative load step, and finally, the HTG assumes the load reduction with a final power of 7 kW. The fpu maximum is 1.0177 and the RMS voltage p.u. minimum and maximum values are 0.9898 and 1.0235, respectively.

Table 1 summarizes the results obtained with the simulations.


**Table 1.** Simulation results summary.
