  Integrating electric vehicles (EVs) into the power grid can revolutionize
energy management strategies, offering both challenges and opportunities for
creating a more sustainable and resilient grid. In this context, model
predictive control (MPC) emerges as a powerful tool for addressing the
complexities of Grid-to-vehicle (G2V) and vehicle-to-grid (V2G) enabled demand
response management. By leveraging advanced optimization techniques, MPC
algorithms can anticipate future grid conditions and dynamically adjust EV
charging and discharging schedules to balance supply and demand while
minimizing operational costs and maximizing flexibility. However, no standard
tools exist to evaluate novel energy management strategies based on MPC
approaches. Our research focuses on harnessing the potential of MPC in G2V and
V2G applications, by providing a simulation tool that allows to maximize EV
flexibility and support demand response initiatives while mitigating the impact
on EV battery health. In this paper, we propose an open-source MPC controller
for G2V and V2G-enabled demand response management. The proposed approach is
capable of tackling the uncertainties inherent in demand response operations.
Through extensive simulation and analysis, we demonstrate the efficacy of our
approach in maximizing the benefits of G2V and V2G while assessing the impact
on the longevity and reliability of EV batteries. Specifically, our controller
enables Charge Point Operators (CPOs) to optimize EV charging and discharging
schedules in real-time, taking into account fluctuating energy prices, grid
constraints, and EV user preferences.
