Enhancing PI control in microgrids using machine-learning techniques

E Eman Abo-Elkhair A Ahmed E. B. Abu-Elanien G Gamal M. Mahmoud H Hesham B. ElRefaie

Abstract

Abstract The integration of renewable energy sources (RES) into power systems requires sophisticated control strategies to ensure stable operation. This study presents a comprehensive framework that combines Machine Learning (ML) techniques—specifically Artificial Neural Networks (ANNs) and Reinforcement Learning (RL)—with traditional Proportional-Integral (PI) controllers to enhance microgrid control performance. Traditional PI controllers, while essential for microgrid operation with RES technologies such as solar and wind systems, face challenges in parameter tuning. Suboptimal selection of proportional gain $$\left({K}_{p}\right)$$ and integral gain $$\left({K}_{i}\right)$$ values can result in system instability or degraded performance. Our proposed ML-enhanced framework dynamically adjusts $${K}_{p}$$ based on real-time operational data and historical performance metrics, addressing these limitations. We evaluate three control strategies—traditional PI, ANN-based PI, and RL-based PI controllers—through extensive simulations of a microgrid with distributed energy resources (DERs). The RL-based controller demonstrates superior performance by reducing voltage Total Harmonic Distortion (THD) to 0.43%, compared to 16.99% for traditional PI control. The ANN-based controller achieves a THD of 0.58%, representing a 96.6% improvement over conventional methods. Both ML-enhanced approaches exceed IEEE 1547 requirements while improving settling time by 75% and frequency stability by 93%. These results validate the effectiveness of ML and deep learning techniques in enhancing microgrid stability and reliability, providing practical solutions for advanced RES management in modern power systems.

Article Details

Volume / Issue Vol. 15, Issue 1
Published October 31, 2025
ISSN 2045-2322
Publisher Nature Portfolio

Journal Info

Scientific Reports

Nature Portfolio

ISSN: 2045-2322 Open Access Life Sciences

Authors (4)

E

Eman Abo-Elkhair

A

Ahmed E. B. Abu-Elanien

G

Gamal M. Mahmoud

H

Hesham B. ElRefaie