Reinforcement-Learning-Guided Two-Stage Multi-Energy Optimization for Carbon-Aware Charging Infrastructure
Abstract
1. Introduction
1.1. Motivation and Background
1.2. Related Work and Research Gap
1.3. Proposed Approach and Contributions
- A data-driven EV charging reference is generated from real parking lot data. A DQN agent uses SoC, time-to-departure, vehicle presence, electricity price, and grid-load information to learn session-level charging behavior over a 96-step daily horizon.
- A two-stage optimization structure is developed to convert the learned charging profile into a feasible system-level schedule. Stage 1 determines the baseline operation and residual grid headroom, while Stage 2 schedules EV charging under power-capacity, departure-energy, and carbon-budget constraints.
- A soft-tracking mechanism is introduced to couple RL and optimization without imposing the learned profile as a hard dispatch constraint. Positive and negative deviation variables, together with the tracking coefficient , allow the optimizer to retain the RL charging pattern when feasible and modify it when system constraints become binding.
- The regime-dependent roles of CCS and P2G are evaluated within the same multi-energy framework. The analysis shows that CCS affects carbon-budget feasibility and the deliverable EV charging level, whereas P2G contributes to renewable-surplus utilization and operating-cost reduction in the surplus-enabled regime.
2. Materials and Methods
2.1. Parking Lot Dataset
2.2. Time Representation and Vehicle Presence
2.3. State-of-Charge and Charging Target
2.4. Electricity Price and Grid-Load Signals
2.5. RL-to-Optimization Data Interface
2.6. Reinforcement Learning Problem Formulation
2.7. Two-Stage Multi-Energy Optimization and RL–GAMS Coupling
2.7.1. Stage 1: Baseline System Optimization and Headroom Calculation
2.7.2. Stage 2: EV and Multi-Energy Scheduling
2.7.3. Carbon Budget and CCS Constraints
2.7.4. P2G Modeling Under Renewable Surplus
2.7.5. RL Soft-Tracking Formulation
2.7.6. Aggregate EV Energy Balance and Departure Service
3. Experimental Design and Evaluation Methodology
3.1. Compared Scheduling Cases
3.2. Operating Regimes
3.3. Multi-Energy Activation Configurations
3.4. RL-Tracking Weight Scenarios
3.5. Performance Metrics
4. Results and Discussion
4.1. RL-Only Charging Behavior
4.2. Stage 1 Headroom and Feasibility Limitation of the RL Profile
4.3. RL-Guided Optimized Schedule
4.4. Effect of the RL-Tracking Weight
4.5. Multi-Scenario and Multi-Seed Robustness
4.6. Role of CCS Under Carbon-Budget Constraint
4.7. Role of P2G Under Surplus-Enabled Operation
4.8. Comparative Effects of P2G and CCS Across Operating Regimes
4.9. Forecast-Error Sensitivity and Perfect-Foresight Limitation
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Mukherjee, J.C.; Gupta, A. A Review of Charge Scheduling of Electric Vehicles in Smart Grid. IEEE Syst. J. 2015, 9, 1541–1553. [Google Scholar] [CrossRef] [Scilit]
- Amin, A.; Tareen, W.U.K.; Usman, M.; Ali, H.; Bari, I.; Horan, B.; Mekhilef, S.; Asif, M.; Ahmed, S.; Mahmood, A. A Review of Optimal Charging Strategy for Electric Vehicles under Dynamic Pricing Schemes in the Distribution Charging Network. Sustainability 2020, 12, 10160. [Google Scholar] [CrossRef] [Scilit]
- Binding, C.; Sundstrom, O. Flexible Charging Optimization for Electric Vehicles Considering Distribution Grid Constraints. IEEE Trans. Smart Grid 2012, 3, 26–37. [Google Scholar] [CrossRef] [Scilit]
- Rotering, N.; Ilić, M. Optimal Charge Control of Plug-In Hybrid Electric Vehicles in Deregulated Electricity Markets. IEEE Trans. Power Syst. 2011, 26, 1021–1029. [Google Scholar] [CrossRef] [Scilit]
- Limmer, S. Evaluation of Optimization-Based EV Charging Scheduling with Load Limit in a Realistic Scenario. Energies 2019, 12, 4730. [Google Scholar] [CrossRef] [Scilit]
- Cheng, K.-W.; Bian, Y.; Shi, Y.; Chen, Y. Carbon-Aware EV Charging. In Proceedings of the 2022 IEEE International Conference on Communications, Control, and Computing Technologies for Smart Grids (SmartGridComm), Singapore, 25–28 October 2022; pp. 186–192. [Google Scholar] [CrossRef] [Scilit]
- Hoehne, C.G.; Chester, M.V. Optimizing plug-in electric vehicle and vehicle-to-grid charge scheduling to minimize carbon emissions. Energy 2016, 115, 646–657. [Google Scholar] [CrossRef] [Scilit]
- IPCC. IPCC Special Report on Carbon Dioxide Capture and Storage; Metz, B., Davidson, O., de Coninck, H.C., Loos, M., Meyer, L.A., Eds.; Cambridge University Press: Cambridge, UK; New York, NY, USA, 2005. [Google Scholar]
- Faisal, S.; Gao, C. A Comprehensive Review of Integrated Energy Systems Considering Power-to-Gas Technology. Energies 2024, 17, 4551. [Google Scholar] [CrossRef] [Scilit]
- Zhang, B.; Wu, X.; Ghias, A.M.Y.M.; Chen, Z. Coordinated carbon capture systems and power-to-gas dynamic economic energy dispatch strategy for electricity–gas coupled systems considering system uncertainty: An improved soft actor–critic approach. Energy 2023, 271, 126965. [Google Scholar] [CrossRef] [Scilit]
- Pantoš, M. Stochastic optimal charging of electric-drive vehicles with renewable energy. Energy 2011, 36, 6567–6576. [Google Scholar] [CrossRef] [Scilit]
- Zhao, J.; Wang, J.; Xu, Z.; Wang, C.; Wan, C.; Chen, C. Distribution Network Electric Vehicle Hosting Capacity Maximization: A Chargeable Region Optimization Model. IEEE Trans. Power Syst. 2017, 32, 4119–4130. [Google Scholar] [CrossRef] [Scilit]
- Zou, S.; Ma, Z.; Liu, X.; Hiskens, I.A. An Efficient Game for Coordinating Electric Vehicle Charging. IEEE Trans. Autom. Control 2017, 62, 2374–2389. [Google Scholar] [CrossRef] [Scilit]
- Tan, B.; Lin, Z.; Zheng, X.; Xiao, F.; Wu, Q.; Yan, J. Distributionally robust energy management for multi-microgrids with grid-interactive EVs considering the multi-period coupling effect of user behaviors. Appl. Energy 2023, 350, 121770. [Google Scholar] [CrossRef] [Scilit]
- Minchala-Ávila, C.; Arévalo, P.; Ochoa-Correa, D. A Systematic Review of Model Predictive Control for Robust and Efficient Energy Management in Electric Vehicle Integration and V2G Applications. Modelling 2025, 6, 20. [Google Scholar] [CrossRef] [Scilit]
- Wu, C.; Gao, S.; Liu, Y.; Song, T.E.; Han, H. A model predictive control approach in microgrid considering multi-uncertainty of electric vehicles. Renew. Energy 2021, 163, 1385–1396. [Google Scholar] [CrossRef] [Scilit]
- Hermans, B.A.L.M.; Walker, S.; Ludlage, J.H.A.; Özkan, L. Model predictive control of vehicle charging stations in grid-connected microgrids: An implementation study. Appl. Energy 2024, 368, 123210. [Google Scholar] [CrossRef] [Scilit]
- Zhao, Z.; Lee, C.K.M.; Yan, X.; Wang, H. Reinforcement learning for electric vehicle charging scheduling: A systematic review. Transp. Res. Part E Logist. Transp. Rev. 2024, 190, 103698. [Google Scholar] [CrossRef] [Scilit]
- Qiu, D.; Wang, Y.; Hua, W.; Strbac, G. Reinforcement learning for electric vehicle applications in power systems: A critical review. Renew. Sustain. Energy Rev. 2023, 173, 113052. [Google Scholar] [CrossRef] [Scilit]
- Sutton, R.S.; Barto, A.G. Reinforcement Learning: An Introduction, 2nd ed.; The MIT Press: Cambridge, MA, USA, 2018. [Google Scholar]
- Watkins, C.J.C.H.; Dayan, P. Q-learning. Mach. Learn. 1992, 8, 279–292. [Google Scholar] [CrossRef] [Scilit]
- Mnih, V.; Kavukcuoglu, K.; Silver, D.; Rusu, A.A.; Veness, J.; Bellemare, M.G.; Graves, A.; Riedmiller, M.; Fidjeland, A.K.; Ostrovski, G.; et al. Human-level control through deep reinforcement learning. Nature 2015, 518, 529–533. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Wan, Z.; Li, H.; He, H.; Prokhorov, D. Model-Free Real-Time EV Charging Scheduling Based on Deep Reinforcement Learning. IEEE Trans. Smart Grid 2019, 10, 5246–5257. [Google Scholar] [CrossRef] [Scilit]
- Sadeghianpourhamami, N.; Deleu, J.; Develder, C. Definition and Evaluation of Model-Free Coordination of Electrical Vehicle Charging With Reinforcement Learning. IEEE Trans. Smart Grid 2020, 11, 203–214. [Google Scholar] [CrossRef] [Scilit]
- García, J.; Fernández, F. A Comprehensive Survey on Safe Reinforcement Learning. J. Mach. Learn. Res. 2015, 16, 1437–1480. [Google Scholar]
- Gu, S.; Yang, L.; Du, Y.; Chen, G.; Walter, F.; Wang, J.; Knoll, A. A Review of Safe Reinforcement Learning: Methods, Theories, and Applications. IEEE Trans. Pattern Anal. Mach. Intell. 2024, 46, 11216–11235. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Li, H.; Wan, Z.; He, H. Constrained EV Charging Scheduling Based on Safe Deep Reinforcement Learning. IEEE Trans. Smart Grid 2020, 11, 2427–2439. [Google Scholar] [CrossRef] [Scilit]
- Paraskevas, A.; Aletras, D.; Chrysopoulos, A.; Marinopoulos, A.; Doukas, D.I. Optimal Management for EV Charging Stations: A Win–Win Strategy for Different Stakeholders Using Constrained Deep Q-Learning. Energies 2022, 15, 2323. [Google Scholar] [CrossRef] [Scilit]
- Wu, F.; Sioshansi, R. A two-stage stochastic optimization model for scheduling electric vehicle charging loads to relieve distribution-system constraints. Transp. Res. Part B Methodol. 2017, 102, 55–82. [Google Scholar] [CrossRef] [Scilit]
- Soroudi, A. Power System Optimization Modeling in GAMS; Springer: Cham, Switzerland, 2017. [Google Scholar] [CrossRef] [Scilit]
- Hawkes, A.D. Estimating marginal CO2 emissions rates for national electricity systems. Energy Policy 2010, 38, 5977–5987. [Google Scholar] [CrossRef] [Scilit]
- Elenes, A.G.N.; Williams, E.; Hittinger, E.; Goteti, N.S. How Well Do Emission Factors Approximate Emission Changes from Electricity System Models? Environ. Sci. Technol. 2022, 56, 14701–14712. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Sukprasert, T.; Bashir, N.; Souza, A.; Irwin, D.; Shenoy, P. On the Implications of Choosing Average versus Marginal Carbon Intensity Signals on Carbon-aware Optimizations. In Proceedings of the 15th ACM International Conference on Future and Sustainable Energy Systems (e-Energy ’24), Singapore, 4–7 June 2024; Association for Computing Machinery: New York, NY, USA, 2024; pp. 422–427. [Google Scholar] [CrossRef] [Scilit]
- Alikhani, P.; Brinkel, N.; Schram, W.; Lampropoulos, I.; van Sark, W. Multi-objective optimization of electric vehicle charging considering market coupling in north-western Europe. Transp. Res. D Transp. Environ. 2025, 146, 104829. [Google Scholar] [CrossRef] [Scilit]
- Chen, W.; Zhang, J.; Li, F.; Zhang, R.; Qi, S.; Li, G.; Wang, C. Low Carbon Economic Dispatch of Integrated Energy System Considering Power-to-Gas Heat Recovery and Carbon Capture. Energies 2023, 16, 3472. [Google Scholar] [CrossRef] [Scilit]
- Ma, Y.; Wang, H.; Hong, F.; Yang, J.; Chen, Z.; Cui, H.; Feng, J. Modeling and optimization of combined heat and power with power-to-gas and carbon capture system in integrated energy system. Energy 2021, 236, 121392. [Google Scholar] [CrossRef] [Scilit]
- EPİAŞ. Turkey Electricity Market Prices. 2025. Available online: https://enerji.gov.tr/evced-cevre-ve-iklim-elektrik-uretim-tuketim-emisyon-faktorleri (accessed on 4 August 2025).
- Republic of Türkiye Ministry of Energy and Natural Resources. 2023 Türkiye Elektrik Üretimi ve Elektrik Tüketim Noktası Emisyon Faktörleri Bilgi Formu [2023 Türkiye Electricity Generation and Electricity Consumption Point Emission Factors]. Available online: https://enerji.gov.tr/evced-cevre-ve-iklim-elektrik-uretim-tuketim-emisyon-faktorleri (accessed on 11 September 2026).
- Wang, X.; Star, A.G.; Ahluwalia, R.K. Performance of Polymer Electrolyte Membrane Water Electrolysis Systems: Configuration, Stack Materials, Turndown and Efficiency. Energies 2023, 16, 4964. [Google Scholar] [CrossRef] [Scilit]











| Ref. | EV Charging | Optimization | RL | Carbon Emissions | P2G | CCS | RL–Optimization Coupling | Uncertainty | Constraint Hierarchy |
|---|---|---|---|---|---|---|---|---|---|
| [1] | ✓ | ✓ | × | × | × | × | × | M | M |
| [2] | ✓ | ✓ | × | × | × | × | × | M | M |
| [3] | ✓ | ✓ | × | × | × | × | × | D | H |
| [4] | ✓ | ✓ | × | × | × | × | × | D | H |
| [5] | ✓ | ✓ | × | × | × | × | × | A | H |
| [6] | ✓ | ✓ | × | ✓ | × | × | × | A | H |
| [7] | ✓ | ✓ | × | ✓ | × | × | × | D | H |
| [8] | × | × | × | ✓ | × | ✓ | × | — | — |
| [9] | × | ✓ | × | ✓ | ✓ | × | × | M | M |
| [10] | × | × | ✓ | ✓ | ✓ | ✓ | × | A | H |
| [11] | ✓ | ✓ | × | × | × | × | × | S | H |
| [12] | ✓ | ✓ | × | × | × | × | × | R | H |
| [13] | ✓ | ✓ | × | × | × | × | × | A | H |
| [14] | ✓ | ✓ | × | × | × | × | × | R | H |
| [15] | ✓ | ✓ | × | × | × | × | × | M | M |
| [16] | ✓ | ✓ | × | × | × | × | × | S + A | H |
| [17] | ✓ | ✓ | × | × | × | × | × | A | H |
| [18] | ✓ | × | ✓ | × | × | × | × | M | M |
| [19] | ✓ | × | ✓ | × | × | × | × | M | M |
| [20] | × | × | ✓ | × | × | × | × | — | — |
| [21] | × | × | ✓ | × | × | × | × | — | — |
| [22] | × | × | ✓ | × | × | × | × | — | — |
| [23] | ✓ | × | ✓ | × | × | × | × | A | P |
| [24] | ✓ | × | ✓ | × | × | × | × | A | P |
| [25] | × | × | ✓ | × | × | × | × | M | M |
| [26] | × | × | ✓ | × | × | × | × | M | M |
| [27] | ✓ | × | ✓ | × | × | × | × | A | H |
| [28] | ✓ | × | ✓ | × | × | × | × | A | H |
| [29] | ✓ | ✓ | × | × | × | × | × | S | H + P |
| [30] | × | ✓ | × | × | × | × | × | M | M |
| [31] | × | × | × | ✓ | × | × | × | — | — |
| [32] | × | × | × | ✓ | × | × | × | — | — |
| [33] | × | ✓ | × | ✓ | × | × | × | D | H |
| [34] | ✓ | ✓ | × | ✓ | × | × | × | D | H |
| [35] | × | ✓ | × | ✓ | ✓ | ✓ | × | D | H |
| [36] | × | ✓ | × | ✓ | ✓ | ✓ | × | D | H |
| This Study | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | D* | H + P |
| Parameter | Value |
|---|---|
| Total parking spots | 772 |
| Scenarios used | 100 of 1000 |
| Extracted EV sessions | 23,472 |
| Time resolution | 15 min |
| Daily horizon | 96 steps |
| Horizon length | 24 h |
| Battery capacity | 75 kWh |
| Maximum charger power | 22 kW |
| SoC target | 80% |
| Parameter | Value |
|---|---|
| State dimension | 6 |
| Action space | 3 actions |
| Network architecture | 2 × 64 dense layers with ReLU |
| Learning rate | 0.001 |
| Discount factor | 0.95 |
| Replay buffer size | 10,000 |
| Batch size | 64 |
| Initial exploration rate | 1.0 |
| Minimum exploration rate | 0.01 |
| Exploration decay | 0.998 per replay update (every 4 environment steps, after buffer warm-up) |
| Target update frequency | 10 episodes |
| Training episodes | 1500 |
| Training frequency | Every 4 steps |
| Parameter/İnput | Value/Regme | Meaning | Source/Basis |
|---|---|---|---|
| 1500 kW | Grid connection capacity | Assumption | |
| 0.50 tCO2 | Daily Stage-2 carbon budget | Assumption; sensitivity in Section 4.6 | |
| 0.00047 tCO2/kWh | Constant representative grid emission factor | Republic of Türkiye Ministry of Energy and Natural Resources [38] | |
| 50 USD/tCO2 | Carbon cost coefficient | Assumption | |
| 0.050 tCO2/step | Maximum capture per interval | Assumption | |
| 20 USD/tCO2 | Capture operating cost | Assumption | |
| 200 kW | P2G electrical input capacity | Assumption | |
| 0.65 | Electricity-to-hydrogen energy conversion efficiency | Literature-informed [39] | |
| 0.08 USD/kWhH2 | Hydrogen-energy output value | Assumption | |
| 0.030 USD/kWh | Grid export price | Input data: Grid Price.xlsx | |
| 50 USD/kWh | Unserved-energy penalty | Assumption | |
| 0 kW | V2G disabled | Model setting | |
| Δt | 0.25 h | Interval duration | Model time resolution |
| 1 USD/kW | Reference power-tracking weight | Selected value; sensitivity in Section 4.4 | |
| 200/1200 kW | Load-dominant/surplus-enabled renewable peak | Assumption | |
| (t) | Half-sine; 24 < t < 72 | PRES,peak sin[π(t − 24)/48]; zero otherwise | Assumption |
| (t) | 400 + 500G(t) kW | Non-EV baseline demand | Assumption |
| (t) | 0.057–0.161 USD/kWh | Time-varying grid purchase price | Input data: Grid Price.xlsx; Section 2.4 |
| Case | Description | Main Role |
|---|---|---|
| RL-only | Charging profile generated directly by the trained DQN policy | Behavioral reference |
| Optimization-only | EV schedule obtained mainly from the mathematical optimization model | Constraint-driven benchmark |
| RL-guided optimization | GAMS schedule with soft tracking of the RL profile | Proposed hybrid case |
| Regime | Renewable Surplus | P2G Availability | Main Interpretation |
|---|---|---|---|
| Load-dominant | No effective surplus | Inactive | Grid and CCS constrained charging |
| Surplus-enabled | Available at selected intervals | Active within surplus limit | Surplus utilization through P2G |
| Scenario | P2G | CCS | Description |
|---|---|---|---|
| M0 | Off | Off | Electricity-only operation |
| M1 | On | Off | Electricity + P2G |
| M2 | Off | On | Electricity + CCS |
| M3 | On | On | Electricity + P2G + CCS |
| Schedule | EV Energy (kWh) | Peak EV Power (kW) | Headroom Violation (kWh) | Tracking Deviation (kWh) | Feasibility |
|---|---|---|---|---|---|
| RL only | 2395.75 | 1617.81 | 483.66 | 0.00 | Headroom violated |
| Optimization-only ( = 0) | 2404.27 | 425.53 | 0.00 | 4513.85 | Feasible with service shortfall |
| RL-guided ( = 1) | 2340.89 | 950.00 | 0.00 | 912.45 | Feasible with service shortfall |
| Method | Metric | Mean | Scenario SD | Seed SD |
|---|---|---|---|---|
| Headroom-clipped RL reference | EV energy delivered (kWh) | 1470.52 | 101.94 | 283.81 |
| Headroom-clipped RL reference | Aggregate shortfall (kWh) | 743.85 | 92.88 | 283.81 |
| Headroom-clipped RL reference | Peak EV power (kW) | 938.05 | 1.25 | 9.10 |
| RL-guided, = 1 | EV energy delivered (kWh) | 2155.87 | 143.93 | 17.40 |
| RL-guided, = 1 | Aggregate shortfall (kWh) | 58.51 | 17.77 | 17.40 |
| RL-guided, = 1 | Peak EV power (kW) | 946.82 | 20.99 | 7.02 |
| Regime | Scenario | EV Energy (kWh) | CCS Captured (tCO2) | P2G Input (kWh) | Net Emissions (tCO2) | Physical Operating Cost (USD) |
|---|---|---|---|---|---|---|
| load-dominant | M0 | 1063.83 | 0.000000 | 0.00 | 0.500000 | 86.14 |
| load-dominant | M1 | 1063.83 | 0.000000 | 0.00 | 0.500000 | 86.14 |
| load-dominant | M2 | 2340.89 | 0.717673 | 0.00 | 0.382546 | 206.87 |
| load-dominant | M3 | 2340.89 | 0.717673 | 0.00 | 0.382546 | 206.87 |
| Surplus | M0 | 2370.20 | 0.000000 | 0.00 | 0.500000 | 87.59 |
| Surplus | M1 | 2370.20 | 0.000000 | 45.07 | 0.500000 | 86.59 |
| Surplus | M2 | 2340.89 | 0.678663 | 0.00 | 0.382546 | 159.24 |
| Surplus | M3 | 2340.89 | 0.678663 | 1024.68 | 0.382546 | 136.70 |
| Metric | Mild | Stress |
|---|---|---|
| Mean EV-energy degradation | 2.20% (51.5 kWh) | 5.11% (119.6 kWh) |
| Degradation range | −0.28–4.15% | 1.36–9.11% |
| Mean max headroom exceedance | 55.6 kW | 120.1 kW |
| Exceedance range | 34.5–63.6 kW | 114.0–127.2 kW |
| Mean violation energy | 38.1 kWh | 86.9 kWh |
| Carbon-budget violations | 0/5 | 0/5 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Aykut, T.; Guner, S. Reinforcement-Learning-Guided Two-Stage Multi-Energy Optimization for Carbon-Aware Charging Infrastructure. Electronics 2026, 15, 4294. https://doi.org/10.3390/electronics15184294
Aykut T, Guner S. Reinforcement-Learning-Guided Two-Stage Multi-Energy Optimization for Carbon-Aware Charging Infrastructure. Electronics. 2026; 15(18):4294. https://doi.org/10.3390/electronics15184294
Chicago/Turabian StyleAykut, Tuna, and Sıtkı Guner. 2026. "Reinforcement-Learning-Guided Two-Stage Multi-Energy Optimization for Carbon-Aware Charging Infrastructure" Electronics 15, no. 18: 4294. https://doi.org/10.3390/electronics15184294
APA StyleAykut, T., & Guner, S. (2026). Reinforcement-Learning-Guided Two-Stage Multi-Energy Optimization for Carbon-Aware Charging Infrastructure. Electronics, 15(18), 4294. https://doi.org/10.3390/electronics15184294

