Simulation and Optimization of V2G Energy Exchange in an Energy Community Using MATLAB and Multi-Objective Genetic Algorithm Optimization

The Vehicle-to-Grid (V2G) technology is considered one of the best solutions for integrating renewable energy systems; however, most literature reports favorable economic results using synthetic data, without accounting for seasonal or market limitations. The current research presents the results of the MATLAB R2023b (Version 23.2, MathWorks, Natick, MA, USA) simulation of the 100-household energy community in Debrecen, Hungary, with 30 electric vehicles (EVs) using entirely simulation-based Lithium Iron Phosphate (LiFePO4) batteries, a simulation-based 150 kW solar photovoltaic (PV) system, and a simulation-based 200 kW wind power system, using real meteorological data for January 2024. The optimization of charging/discharging for electric vehicles was performed using a multi-objective genetic algorithm (GA) over 30 days at a 15 min time resolution, accounting for stochastic loads and temperature effects on battery degradation, with a sensitivity analysis of key parameters. The results of the optimized solution for the electric vehicle charging/discharging were unexpected: the total energy cost increased by 68.9% ($4337.65 to $7327.54), the peak demand increased by 266.2% (31.9 to 116.9 kW), the degradation cost was $479.63, the load factor was reduced from 0.847 to 0.722, and the SOC constraint was violated for 0.758% of measurements. The V2G is not economically viable under current Hungarian pricing and Central Europe winter conditions. Results are robust for varying parameters using sensitivity analysis and Pareto front tracing. The break-even point is achieved when ratios of peak-to-off-peak prices are above 3.5:1. Seasonal policies and market reforms are critical for V2G viability. Importantly, the influence of inherent design deficiencies in the optimization model on the reported results cannot be ruled out.

Authors

Institutions

Publication Details

Journal
Batteries
Published
2026-04-17
DOI
https://doi.org/10.3390/batteries12040143
Primary Topic
Electric Vehicles and Infrastructure
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Simulation and Optimization of V2G Energy Exchange in an Energy Community Using MATLAB and Multi-Objective Genetic Algorithm Optimization

József Menyhárt, Mohammad Talha Yaar Khan
Batteries
Electric Vehicles and Infrastructure
article

Simulation and Optimization of V2G Energy Exchange in an Energy Community Using MATLAB and Multi-Objective Genetic Algorithm Optimization

József Menyhárt, Mohammad Talha Yaar Khan
article en

Abstract

The Vehicle-to-Grid (V2G) technology is considered one of the best solutions for integrating renewable energy systems; however, most literature reports favorable economic results using synthetic data, without accounting for seasonal or market limitations. The current research presents the results of the MATLAB R2023b (Version 23.2, MathWorks, Natick, MA, USA) simulation of the 100-household energy community in Debrecen, Hungary, with 30 electric vehicles (EVs) using entirely simulation-based Lithium Iron Phosphate (LiFePO4) batteries, a simulation-based 150 kW solar photovoltaic (PV) system, and a simulation-based 200 kW wind power system, using real meteorological data for January 2024. The optimization of charging/discharging for electric vehicles was performed using a multi-objective genetic algorithm (GA) over 30 days at a 15 min time resolution, accounting for stochastic loads and temperature effects on battery degradation, with a sensitivity analysis of key parameters. The results of the optimized solution for the electric vehicle charging/discharging were unexpected: the total energy cost increased by 68.9% ($4337.65 to $7327.54), the peak demand increased by 266.2% (31.9 to 116.9 kW), the degradation cost was $479.63, the load factor was reduced from 0.847 to 0.722, and the SOC constraint was violated for 0.758% of measurements. The V2G is not economically viable under current Hungarian pricing and Central Europe winter conditions. Results are robust for varying parameters using sensitivity analysis and Pareto front tracing. The break-even point is achieved when ratios of peak-to-off-peak prices are above 3.5:1. Seasonal policies and market reforms are critical for V2G viability. Importantly, the influence of inherent design deficiencies in the optimization model on the reported results cannot be ruled out.

BatteriesVol. 12(4)
University of Debrecen (HU)
Debreceni Egyetem
Affordable and clean energy
Openalex Percentile: Top 22%
Electric Vehicles and Infrastructure
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.