**Yujia Huo, Simone Barcellona, Luigi Piegari and Giambattista Gruosso \***

Politecnico di Milano, Dipartimento di Elettronica Informazione e Bioingegneria, Piazza Leonardo da Vinci 32, 20133 Milano, Italy; yujia.huo@polimi.it (Y.H.); simone.barcellona@polimi.it (S.B.); luigi.piegari@polimi.it (L.P.)

**\*** Correspondence: giambattista.gruosso@polimi.it

Received: 22 January 2020; Accepted: 12 April 2020; Published: 17 April 2020

**Abstract:** The increasing integration of renewable energies reduces the inertia of power systems and thus adds stiffness to grid dynamics. For this reason, methods to obtain virtual inertia have been proposed to imitate mechanical behavior of rotating generators, but, usually, these methods rely on extra power reserves. In this paper, a novel ancillary service is proposed to alleviate frequency transients by smoothing the electromagnetic torque of synchronous generators due to change of active power consumed by loads. Being implemented by grid-tied inverters of renewables, the ancillary service regulates the reactive power flow in response to frequency transients, thereby demanding no additional power reserves and having little impact on renewables' active power generation. Differently from the active power compensation by virtual inertia methods, it aims to low-pass filter the transients of the active power required to synchronous generators. The proposed ancillary service is firstly verified in simulation in comparison with the virtual inertia method, and afterwards tested on processor by controller-hardware-in-the-loop simulation, analysing practical issues and providing indications for making the algorithm suitable in real implementation. The ancillary service proves effective in damping frequency transients and appropriate to be used in grid with distributed power generators.

**Keywords:** ancillary service; PV Plant; frequency-assisting; hardware-in-the-loop; Photovoltaic; DER
