This paper presents a data-driven approach that adaptively tunes the parameters of a virtual synchronous generator to achieve optimal frequency response against disturbances. In the proposed approach, the control variables, namely, the virtual moment of inertia and damping factor, are transformed into actions of a reinforcement learning agent. Different from the state-of-the-art methods, the proposed study introduces the settling time parameter as one of the observations in addition to the frequency and rate of change of frequency (RoCoF). In the reward function, preset indices are considered to simultaneously ensure bounded frequency deviation, low RoCoF, fast response, and quick settling time. To maximize the reward, this study employs the Twin-Delayed Deep Deterministic Policy Gradient (TD3) algorithm. TD3 has an exceptional capacity for learning optimal policies and is free of overestimation bias, which may lead to suboptimal policies. Finally, numerical validation in MATLAB/Simulink and real-time simulation using RTDS confirm the superiority of the proposed method over other adaptive tuning methods.


Electrical and Computer Engineering

Publication Status

Early Access

Keywords and Phrases

Adaptation models; Damping; Deep reinforcement learning; Frequency response; frequency response; Inverters; Mathematical models; MATLAB/SIMULINK; microgrid; Microgrids; Power system stability; RTDS; virtual damping; virtual inertia; virtual synchronous generator

International Standard Serial Number (ISSN)

1558-0059; 0885-8969

Document Type

Article - Journal

Document Version


File Type





© 2023 Institute of Electrical and Electronics Engineers, All rights reserved.

Publication Date

01 Jan 2023