3.2.3. Test Condition and Results

In Sections 3.2.4 and 3.2.2, the droop coefficient of the Q/f control is set to 0.5 pu/Hz and the virtual inertia and the friction factor are set to 15 kgm2 and 33 Nms for VSG control. Under the condition of such parameters, the two ancillary services can achieve the same attenuation of the frequency overshooting during a transient. In this way, the two methods can be compared from the working principle aspect.

The simulation test starts from a steady state where load power is 175.8 kW–6.1 kvar. Referring to the base values of the SG, the load power is 0.704–0.024 j pu. The PV plant is generating 100 kW which means 1 pu referring to PV plant. Both ancillary services are not activated. In order to produce a frequency transient, an extra load of 27 kW–1.4 kvar (0.108–0.006 j pu referring to the SG) is connected to the micro grid at 0 s and disconnected at 10th s. The connection and disconnection is done by a circuit breaker. Therefore, under-frequency and over-frequency situations are provided.

The test is repeated three times. At the first time, neither of the ancillary services is activated. In the following plots, this case is named as No AS and it is taken as the reference. At the second time, just the proposed ancillary service, i.e., the Q/f control is activated. This case is named as Proposed AS. Finally, the VSG ancillary service is activated. This case is named as VSG AS.

The frequency transients are shown in Figure 7a. Even though the maximum deviations of frequency are comparable for VSG and the proposed ancillary service, the frequency transients are still different. According to the test results, both ancillary services are effective on reducing frequency over-shooting. However, the two methods are distinguished from each other by the transient curves.

Figure 7b describes the power provided by the two ancillary services. In Q/f control, it is the reactive power that is responsible for the frequency transient mitigation where in VSG control, the active power is in charge. As shown in Figure 7b a 10% of additional reactive power is required to the inverter of the RES. In order to be able to exchange this reactive power also when the active power is maximum, the inverter has to be oversized. Anyway, an additional 10% of reactive power implies only a 0.5% increasing of the apparent power. Therefore, the additional cost to oversize the inverter (by 0.5%) can be considered negligible and it is possible to state that the service can be obtained with almost null costs. In the VSG test, Δ*P* performs the compensation process with the slow response of the governer. Δ*Q* in Q/f method controls the flux inside SG and thus smoothing the voltage recovery, which is shown in Figure 7c. Summarizing, the proposed ancillary service performances are comparable to those of a VSG in terms of limitation of minimum and maximum frequencies during the transients. Nevertheless, the recovery time of both frequency and voltage is slowed by the proposed ancillary service. Even if this seems a disadvantage, it is worth highlighting that this is obtained without needing any energy reserve and this makes the proposed service implementable in all the RES devices distributed in the grid. This is the main advantage of the proposed algorithm in comparison with the traditional VSG.

Figure 8 shows the transients of the internal variables of the SG based on the c-dq-frame. The armature currents are regulated by the ancillary services. Relating to the reference current obtained in the reference test, the changing trends of *id* and *iq* being regulated by Q/f method and VSG method are different. Therefore, the resultant electromagnetic torques *Te* of the two ancillary services have different shapes. However, both torques are smoother than that of the reference test, giving more time to the governor system to follow the change of load.

**Figure 7.** *Cont*.

**Figure 7.** Offline simulation test results of the proposed ancillary service (AS) in comparison with VSG. ∗ pu values are obtained according to the base values of the synchronous generation system in Table 2.

With quite close performances of alleviating frequency deviation, the proposed method is shown to be more efficient owing to the sole use of reactive power. In other words, the proposed method does not ask for an extra reserve to provide the requested active power. From the budget and simplicity point of view, the proposed ancillary service is a viable choice for the existing networks.

The main advantage of the method is that it can be implemented on every grid-connected inverter and works without affecting the functionalities of the MPPT. Requiring no additional power reserves, this methodology reduces costs of installation and can be flexibly integrated into the existing equipment.

(**c**) Electromagnetic torque of SG.

**Figure 8.** Internal changes of the SG due to the proposed ancillary service. ∗ pu values are obtained according to the base values of the synchronous generation system in Table 2.

3.2.4. Stability Analisys of the Proposed Q/f Control

In order to test the local stability of the proposed Q/f control we chose to use the indirect Lyapunov method for nonlinear systems. This method consists in linearizing the nonlinear system around an equilibrium point and assess its local stability for small perturbations. In our case, we want to assess the mechanical frequency stability of the SG at 50 Hz. The linearization was performed using the linear analysis tool of Matlab/Simulink software. Moreover, for the stability analysis all the saturations of the regulators were removed and the VSG is not connected. In the simulink model, we had to select one input perturbation point and one output measurement point in order to obtain the linearized closed loop transfer function between the mechanical frequency of the SG and the reference one. In fact, a perturbation in the reference frequency acts on both the governor of the SG and the proposed Q/f control. The poles placement of this closed loop transfer function is dependent on several parameters, among which, the value of the droop coefficient *DQ*/ *f* that we want to assess for the stability analysis. Therefore, this was varied between 0 (proposed control not active) and 15 pu/Hz with a step of 0.5 pu/Hz. Since, the system was simulated using a discrete solver the poles are in the z-domain. As is well known, a nonlinear time invariant discrete system, trimmed at an equilibrium point and for small perturbations, is stable if and only if all the poles of the linearized system have an amplitude less than one, i.e., they are into the circumference of unitary radius. Figure 9 shows the zero-pole map of the closed loop transfer function for the different droop coefficient values. We can note that the region of the map in which some poles are out of the circumference is near to 1. Figure 10 show a zoom of such region. From this figure, we can see that for increasing values of the droop coefficient the poles are moving towards the boundary of the circumference up to pass it for values higher than 11 pu/Hz. This means that for droop coefficients greater than 11 pu/Hz the system becomes unstable; for droop coefficients less than 11 pu/Hz the system is locally stable, i.e., only for small perturbations. In order to assess the convergence domain, i.e., for which values of perturbation the system is stable, we should use other stability methods that for our system can be very difficult to apply. On the other hand, the transfer function for the chosen value of the droop coefficient (0.5 pu/Hz) has the poles far enough from the boundary of the circumference. Moreover, the actual system contains several saturations in the controllers helping in stabilizing the system response. Therefore, it is possible to state that the proposed service is stable if the droop coefficient is chosen much lower than the stability limit. In the paper a value 20 times lower than the limit was used obtaining a stable answer from the system.

**Figure 9.** Zero-pole map. Poles (crosses); zeros (circles).

**Figure 10.** Zoom of the zero-pole map. Poles (crosses); zeros (circles).
