**3. Numerical Simulations: Comparison between Proposed Method and VSG**

#### *3.1. The Microgrid under Test*

In this section, simulations are carried out to verify the proposed ancillary method. The system under analysis is represented in Figure 4, with power generators, loads, transmission lines and VSG equipment. The nominal frequency and line-to-line voltage of the system are respectively equal to 50 Hz and 400 Vrms. In order to have a better understanding of the analysis, most parameters are described using per unit (pu) values. Their base values are calculated and listed in Table 2.

The main power generator is a 250 kVA/400 V salient pole SG. Its detailed parameters are listed in Table 3. The SG is driven by a governor and excited by an excitation system, both of which have a much slower response compared to the power electronic devices in PV systems. The description and the parameters of the excitation and governing systems for the SG are listed in Tables 4 and 5, respectively.

**Figure 4.** Block diagram of the microgrid under test.



**Table 3.** Parameters of the SG in the microgrid.

**Table 4.** Parameters of the excitation system for the SG.


**Table 5.** Parameters of the governing system for the SG.


The second power generator unit is a PV plant. The nominal active power at standard test condition (STC) is 100 kW. The detailed parameters of the PV plant are listed in Table 6.


<sup>∗</sup> Standard test condition: 1000 W/m2 and 25 ◦C.

The VSG is realized by a three-phase inverter whose nominal power is 25 kW. The detailed parameters are listed in Table 7.



Finally, the parameters of the transmission lines are described in Table 8.

**Table 8.** Parameters of the transmission lines.


#### *3.2. Control Methods*

As previously discussed, the grid-tied inverter of the PV plant can be controlled to implement the proposed ancillary service as illustrated in Figure 3. The PV system is controlled to inject in the grid the active power given by the MPPT algorithm while the reactive power reference, *Q*, is set to zero when the frequency is at rated value. In the test of the proposed ancillary service, the reactive power is regulated by means of the current on c-q-axis related to the frequency transient rate. The VSG method is, instead, executed by adding a virtual inertia and friction factor to the active power control loop to emulate the mechanical behavior of the rotor.

#### 3.2.1. Proposed Q/f Control

The control algorithm of grid-tied inverter of the PV plant is proposed as shown in Figure 5. It consists of active power control loop and reactive power control loop. In the active power control, perturb & observe MPPT is firstly performed to determine the right duty cycle of the boost converter. Then the output voltage of the boost converter is stabilized by a feedback control loop using a PI regulator with *Kp* = 7 and *Ki* = 800. The set point of this loop is 500 V and the output will be the set point of c-d-axis current in pu values limited between [−1.5, 1.5] pu. The reactive power control aims at stabilizing frequency. When frequency deviates from the set point 50 Hz, a c-q-axis current (in pu values) is set as a c-q-axis current reference by a positive coefficient *DQ*/ *<sup>f</sup>* = 0.5 :

$$\begin{cases} i\_q^\*(k) = D\_{Q/f} \left( f^\* - f(k) \right) & v \in \left[ 360 \text{V, } 440 \text{V} \right] \\ i\_q^\*(k) = i\_q^\* \left( k - 1 \right) & v \notin \left[ 360 \text{V, } 440 \text{V} \right] \end{cases} \tag{15}$$

The set point of c-q-axis is kept between limits [−1.5, 1.5] pu. With the two set points of currents, the current loop is controlled by a PI regulator with *Kp* = 0.3 and *Ki* = 20. The output signals will be considered as the set points of c-d-axis and c-q-axis voltages in pu values and be limited between [−2, 2] pu. Feed-forward control concerning the output filter is added to speed up the control loop.

The regulators have been tuned by means of a trial and error procedure in order to obtain a fast and stable response by each control loop. The choice of the droop coefficient *DQ*/ *<sup>f</sup>* is done to have a pu quadrature current 0.5 when a 1Hz (i.e., 2%) deviation occurs on the grid frequency.

**Figure 5.** Control block diagram of the PV system.
