A Model-Predictive Smart Energy Management System for Grid-Connected PV–Battery Microgrids with Hardware-in-the-Loop Validation
Preprint
- 18 September 2026
- preprint
- Published by Elsevier in SSRN Electronic Journal
Abstract
Smart energy management systems (SEMS) are increasingly used to coordinate photovoltaic (PV) generation, battery energy storage, and flexible loads in grid-connected and islandable microgrids. However, most reported SEMS are validated only through software simulations, leaving controller timing, converter nonlinearities, and communication delays largely unverified. This paper presents a hierarchical SEMS combining a receding-horizon model predictive control (MPC) secondary/tertiary economic dispatch layer with a primary droop-controlled inverter layer. The control problem is formulated as a convex quadratic program (QP) incorporating battery state-of-charge (SOC) dynamics, inverter power constraints, and a coincident-peak-aware cost objective. First-order optimality (KKT) conditions provide a shadow-price interpretation of battery dispatch, while recursive feasibility, input-to-state stability, and small-signal analysis establish closed-loop stability and exponential elimination of droop-induced steady-state error. The proposed controller is validated using a Controller-Hardware-in-the-Loop (CHIL) platform, where the physical EMS controller operates in real time against a real-time simulated microgrid. For a 24-hour PV–battery–load case study, the SEMS reduces coincident peak grid import by 22% and day-ahead energy cost by 8% compared with a fixed-threshold reactive controller. During islanding transitions, the secondary control restores voltage and frequency within regulatory limits in under 3 s. Across 5000 test cycles, execution time remains below the 100 ms real-time deadline, with a mean of 51.3 ± 0.3 ms. Sensitivity analysis of the MPC prediction horizon (R² = 0.984) quantifies the trade-off between computational effort and economic performance, demonstrating the practicality of the proposed SEMS for real-time deployment and future multi-microgrid applications.Keywords
This publication has 5 references indexed in Scilit:
- Experimental Validation of a Remedial Action via Hardware-in-the-Loop System Against Cyberattacks Targeting a Lab-Scale PV/Wind MicrogridIEEE Transactions on Smart Grid, 2023
- Real-Time Fuzzy Logic Based Energy Management System for Microgrid Using Hardware in the LoopEnergies, 2023
- Hardware-in-the-Loop Simulation of Distributed Intelligent Energy Management System for MicrogridsEnergies, 2013
- Hierarchical Control of Droop-Controlled AC and DC Microgrids—A General Approach Toward StandardizationIEEE Transactions on Industrial Electronics, 2010
- Convex Optimization2004