Reinforcement learning for community energy sharing: a cost-fairness analysis

Authors

  • Andrés A. Pabón Pérez Universidad de La Laguna
  • Juan Albino Méndez Pérez Universidad de La Laguna
  • José Manuel González Cava Universidad de La Laguna
  • Benjamín González Díaz Universidad de La Laguna
  • Santiago Torres Álvarez Universidad de La Laguna
  • A. Marcos Trujillo Trujillo Universidad de La Laguna

DOI:

https://doi.org/10.17979/ja-cea.2026.47.13697

Keywords:

Energy communities, Photovoltaic sharing, Reinforcement learning, Model predictive control, Collective self-consumption

Abstract

This work proposes a reinforcement learning strategy for allocating photovoltaic (PV) energy in energy communities with collective self-consumption. A three-member community with unequal consumption profiles and participation rights is considered as a case study. The proposed approach employs Proximal Policy Optimization (PPO) and is compared with static allocation, a rule-based controller (RBC), and model predictive control (MPC). All strategies determine the same allocation coefficients while keeping the local control layer fixed. The evaluation considers the average cost and the fairness of cumulative compliance with PV participation rights. PPO and MPC share the same 8 h prediction horizon, whereas RBC does not use forecasts. Simulation results show that RBC achieves the lowest average admissible cost, MPC provides the highest dynamic fairness, and PPO offers a compromise between the two. These results demonstrate the potential of reinforcement learning for energy allocation in energy communities.

References

Ahmed, S., Ali, A., D’Angola, A., 2024. A review of renewable energy communities: Concepts, scope, progress, challenges, and recommendations. Sustainability 16 (5), 1749. DOI: 10.3390/su16051749

European Parliament and Council of the European Union, 2018. Directive (EU) 2018/2001 on the promotion of the use of energy from renewable sources. Official Journal of the European Union, L 328, 82–209.

European Parliament and Council of the European Union, 2023. Directive (EU) 2023/2413 amending Directive (EU) 2018/2001 as regards the promotion of energy from renewable sources. Official Journal of the European Union, L 2023/2413. URL: https://eur-lex.europa.eu/eli/dir/2023/2413/oj

Fornier, Z., Lecl`ere, V., Pinson, P., 2025. Fairness by design in shared-energy allocation problems. Computational Management Science 22 (2), 11. DOI: 10.1007/s10287-025-00532-7

Gasca, M.-V., Rigo-Mariani, R., Debusschere, V., Sidqi, Y., 2025. Fairness in energy communities: Centralized and decentralized frameworks. Renewable and Sustainable Energy Reviews 208, 115054. DOI: 10.1016/j.rser.2024.115054

Jain, R. K., Chiu, D.-M. W., Hawe, W. R., 1984. A quantitative measure of fairness and discrimination for resource allocation in shared computer systems. Tech. Rep. DEC-TR-301, Digital Equipment corporation.

Joshal, K. S., Gupta, N., 2023. Microgrids with model predictive control: A critical review. Energies 16 (13), 4851. DOI: 10.3390/en16134851

Li, J., Jiang, Z., Chen, Z., Liu, J., Cheng, L., 2024. CuEMS: Deep reinforcement learning for community control of energy management systems in microgrids. Energy and Buildings 304, 113865. DOI: 10.1016/j.enbuild.2023.113865

Lopez, I., Goitia-Zabaleta, N., Milo, A., Gomez-Cornejo, J., Aranzabal, I., Gaztanaga, H., Fernandez, E., 2024. European energy communities: Characteristics, trends, business models and legal framework. Renewable and Sustainable Energy Reviews 197, 114403. DOI: 10.1016/j.rser.2024.114403

May, D. C., Taylor, M., Musilek, P., 2024. Decentralized coordination of distributed energy resources through local energy markets and deep reinforcement learning. Energy and AI 18, 100446. DOI: 10.1016/j.egyai.2024.100446

Palma, G., Guiducci, L., Stentati, M., Rizzo, A., Paoletti, S., 2024. Reinforcement learning for energy community management: A european-scale study. Energies 17 (5), 1249. DOI: 10.3390/en17051249

Pinthurat, W., Surinkaew, T., Hredzak, B., 2024. An overview of reinforcement learning-based approaches for smart home energy management systems with energy storages. Renewable and Sustainable Energy Reviews 202, 114648. DOI: 10.1016/j.rser.2024.114648

Schulman, J., Wolski, F., Dhariwal, P., Radford, A., Klimov, O., 2017. Proximal policy optimization algorithms. DOI: 10.48550/arXiv.1707.06347

Soares, J., Lezama, F., Faia, R., Limmer, S., Dietrich, M., Rodemann, T., Ramos, S., Vale, Z., 2024. Review on fairness in local energy systems. Applied Energy 374, 123933. DOI: 10.1016/j.apenergy.2024.123933

Sutton, R. S., Barto, A. G., 2018. Reinforcement Learning: An Introduction, 2nd Edition. MIT Press, Cambridge, MA. URL: https://mitpress.mit.edu/9780262039246/reinforcement-learning/

Downloads

Published

2026-09-01

Issue

Section

Control Inteligente