Hierarchical RL–ANFIS Energy Management with Supervisory Override for Priority-Aware Microgrids Under Measured Iraqi Grid Outages
Grid-deficient environments such as Iraq experience frequent and prolonged outages, forcing buildings to operate as isolated microgrids for substantial periods. This study proposes a hierarchical hybrid energy management controller combining a tabular Q-learning supervisory master based on reinforcement learning (RL), an Adaptive Neuro-Fuzzy Inference System (ANFIS) tactical slave, and a physical safety layer that protects urgent-load service whenever physically feasible. The controller was evaluated over a full year using measured Iraqi irradiance and grid-availability data and compared with rule-based, standalone ANFIS, standalone RL, model predictive control, and perfect-foresight dynamic programming benchmarks. For the learned controllers, annual performance is reported as mean ± standard deviation across four independent retraining runs, while generalisation is assessed separately using a seasonally distributed four-month temporal hold-out. The Hybrid achieved a mean annual cost of $9353.49 ± 122.63, a 20.91% reduction relative to the deterministic rule-based baseline. It also reduced diesel use by 55.6%, generator starts by 56.4%, and deep-discharge events by 54.8%, while maintaining 100% urgent-load service. Standalone RL used less fuel but showed more generator cycling and deep discharge. On the 11,808-timestep hold-out, normalised cost differed by 2.6% for RL and 1.2% for ANFIS between training and test periods. The Hybrid mean annual cost was 12.48% above the perfect-foresight DP lower bound. These results support the proposed architecture as a lightweight, priority-aware option for weak-grid microgrids.
Authors
- Doğu Çağdaş Atilla (ORCID: https://orcid.org/0000-0002-4249-6951)
- Naseer K. Kasim
- Noor A. Jasim (ORCID: https://orcid.org/0000-0003-1534-6314)
Institutions
- Prime Minister's Office (BN)
- University of Baghdad (IQ)
- Türkisch-Deutsche Universität (TR)
Publication Details
- Journal
- Energies
- Published
- 2026-10-16
- DOI
- https://doi.org/10.3390/en19204907
- Primary Topic
- Microgrid Control and Optimization
- Type
- article
- Field-Weighted Citation Impact
- 0.00