Work

Machine learning enabled predictive framework for real time estimation of optimal PID controller parameters in renewable microgrids

Year: 2026
Type: article
Abstract: The ability to predict optimal PID controller gains in real time is essential for maintaining frequency stability, voltage regulation, and power balance in renewable-energy-based microgrids. This paper presents a machine learning (ML)-driven predictive framework for a hybrid microgrid comprising photovoltaic (PV), wind, and battery energy storage systems developed in the MATLAB/Simulink environment. Initially, the Grey Wolf Optimization (GWO) algorithm is employed to determine the optimal PID controller gains under varying operating conditions. GWO achieves a minimum fitness value of 0.50 within 16 iterations, outperforming Particle Swarm Optimization (PSO) and Grasshopper Optimization Algorithm (GOA), which converge to 3.00 and 1.90 after 23 and 22 iterations, respectively. The GWO-tuned controller also reduces voltage overshoot to 3.2–4.6% with settling times of 0.10–0.13 s, compared with 14.2–28.9% overshoot obtained using PSO and GOA. Using the optimized controller gains, a dataset of 3000 operating samples was generated by systematically varying solar irradiance, temperature, wind speed, and load conditions. Five ensemble machine learning models, namely AdaBoost, Random Forest, Extra Trees, Histogram Gradient Boosting, and Gradient Boosting, were trained to directly predict the optimal PID gains. Among them, the Gradient Boosting model achieved the highest prediction accuracy, with an average RMSE of 0.0805 and an average R 2 of 0.9981, outperforming Histogram Gradient Boosting (RMSE = 0.0851, R 2 = 0.9979), Random Forest (RMSE = 0.1152, R 2 = 0.9957), Extra Trees (RMSE = 0.1405, R 2 = 0.9935), and AdaBoost (RMSE = 0.3390, R 2 = 0.9669). Model performance was further validated using actual-versus-predicted analysis, residual distribution, scatter plots, cumulative distribution function (CDF), and Kolmogorov–Smirnov (KS) testing, confirming the robustness and reliability of the proposed framework. The proposed approach effectively replaces computationally intensive real-time optimization with fast and accurate machine learning-based prediction of PID controller parameters, providing an intelligent and scalable solution for renewable microgrid control and future smart grid applications.
Language: English
Open Access status: gold
Estimated APC paid: $2,690
OpenAlex ID: W7221062953
FWCI:
Cites: 1
Cited by:
Related to: 10