{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,4,21]],"date-time":"2026-04-21T15:01:59Z","timestamp":1776783719178,"version":"3.51.2"},"reference-count":28,"publisher":"MDPI AG","issue":"3","license":[{"start":{"date-parts":[[2023,1,20]],"date-time":"2023-01-20T00:00:00Z","timestamp":1674172800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"European Union","award":["864400"],"award-info":[{"award-number":["864400"]}]},{"name":"European Union","award":["NORTE 2020"],"award-info":[{"award-number":["NORTE 2020"]}]},{"name":"European Union","award":["NORTE-01-0145-FEDER-000065"],"award-info":[{"award-number":["NORTE-01-0145-FEDER-000065"]}]},{"name":"Norte Portugal Regional Operational Program","award":["864400"],"award-info":[{"award-number":["864400"]}]},{"name":"Norte Portugal Regional Operational Program","award":["NORTE 2020"],"award-info":[{"award-number":["NORTE 2020"]}]},{"name":"Norte Portugal Regional Operational Program","award":["NORTE-01-0145-FEDER-000065"],"award-info":[{"award-number":["NORTE-01-0145-FEDER-000065"]}]},{"name":"European Regional Development Fund","award":["864400"],"award-info":[{"award-number":["864400"]}]},{"name":"European Regional Development Fund","award":["NORTE 2020"],"award-info":[{"award-number":["NORTE 2020"]}]},{"name":"European Regional Development Fund","award":["NORTE-01-0145-FEDER-000065"],"award-info":[{"award-number":["NORTE-01-0145-FEDER-000065"]}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Energies"],"abstract":"<jats:p>This paper proposes a three-stage model for managing energy communities for local energy sharing and providing grid flexibility services to tackle local distribution grid constraints. The first stage addresses the minimization of each prosumer\u2019s individual energy bill by optimizing the schedules of their flexible resources. The second stage optimizes the energy bill of the whole energy community by sharing the prosumers\u2019 energy surplus internally and re-dispatching their batteries, while guaranteeing that each prosumer\u2019s new energy bill is always be equal to or less than the bill that results for this prosumer from stage one. This collective optimization is designed to ensure an additional collective benefit, without loss for any community member. The third stage, which can be performed by the distribution system operator (DSO), aims to solve the local grid constraints by re-dispatching the flexible resources and, if still necessary, by curtailing local generation or consumption. Stage three minimizes the impact on the schedule obtained at previous stages by minimizing the loss of profit or utility for all prosumers, which are furthermore financially compensated accordingly. This paper describes how the settlement should be performed, including the allocation coefficients to be sent to the DSO to determine the self-consumed and supplied energies of each peer. Finally, some case studies allow an assessment of the performance of the proposed methodology. Results show, among other things, the potential benefits of allowing the allocation coefficients to take negative values to increase the retail market competition; the importance of stage one or, alternatively, the need for a fair internal price to avoid unfair collective benefit sharing among the community members; or how stage three can effectively contribute to grid constraint solving, profiting first from the existing flexible resources.<\/jats:p>","DOI":"10.3390\/en16031143","type":"journal-article","created":{"date-parts":[[2023,1,20]],"date-time":"2023-01-20T02:35:55Z","timestamp":1674182155000},"page":"1143","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":31,"title":["A Three-Stage Model to Manage Energy Communities, Share Benefits and Provide Local Grid Services"],"prefix":"10.3390","volume":"16","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-6794-8926","authenticated-orcid":false,"given":"Rog\u00e9rio","family":"Rocha","sequence":"first","affiliation":[{"name":"INESC TEC\u2014Institute for Systems and Computer Engineering, Technology and Science, 4200-465 Porto, Portugal"},{"name":"Faculty of Engineering, University of Porto, 4200-465 Porto, Portugal"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-3740-9366","authenticated-orcid":false,"given":"Ricardo","family":"Silva","sequence":"additional","affiliation":[{"name":"INESC TEC\u2014Institute for Systems and Computer Engineering, Technology and Science, 4200-465 Porto, Portugal"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-3051-7230","authenticated-orcid":false,"given":"Jo\u00e3o","family":"Mello","sequence":"additional","affiliation":[{"name":"INESC TEC\u2014Institute for Systems and Computer Engineering, Technology and Science, 4200-465 Porto, Portugal"},{"name":"Faculty of Engineering, University of Porto, 4200-465 Porto, Portugal"}]},{"given":"S\u00e9rgio","family":"Faria","sequence":"additional","affiliation":[{"name":"INESC TEC\u2014Institute for Systems and Computer Engineering, Technology and Science, 4200-465 Porto, Portugal"}]},{"given":"F\u00e1bio","family":"Retorta","sequence":"additional","affiliation":[{"name":"INESC TEC\u2014Institute for Systems and Computer Engineering, Technology and Science, 4200-465 Porto, Portugal"},{"name":"Faculty of Engineering, University of Porto, 4200-465 Porto, Portugal"}]},{"given":"Clara","family":"Gouveia","sequence":"additional","affiliation":[{"name":"INESC TEC\u2014Institute for Systems and Computer Engineering, Technology and Science, 4200-465 Porto, Portugal"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-6954-9833","authenticated-orcid":false,"given":"Jos\u00e9","family":"Villar","sequence":"additional","affiliation":[{"name":"INESC TEC\u2014Institute for Systems and Computer Engineering, Technology and Science, 4200-465 Porto, Portugal"}]}],"member":"1968","published-online":{"date-parts":[[2023,1,20]]},"reference":[{"key":"ref_1","unstructured":"European Union (2020, March 23). Directive (EU) 2018\/2001 of the European Parliament and of the Council of 11 December 2018 on the Promotion of the Use of Energy from Renewable Sources (Text with EEA Relevance), 32018L2001. Available online: http:\/\/data.europa.eu\/eli\/dir\/2018\/2001\/oj\/eng."},{"key":"ref_2","doi-asserted-by":"crossref","unstructured":"Rocha, R., Mello, J., Villar, J., and Saraiva, J.T. (July, January 28). Comparative Analysis of Self-Consumption and Energy Communities Regulation in the Iberian Peninsula. Proceedings of the 2021 IEEE Madrid PowerTech, Madrid, Spain.","DOI":"10.1109\/PowerTech46648.2021.9494916"},{"key":"ref_3","unstructured":"Portuguese Government (2022, February 05). Decreto-Lei n.o 15\/2022: Organisation and Functioning of the National Electricity System 2022. Available online: https:\/\/dre.pt\/."},{"key":"ref_4","first-page":"3569","article-title":"Energy-Sharing Model with Price-Based Demand Response for Microgrids of Peer-to-Peer Prosumers","volume":"32","author":"Liu","year":"2017","journal-title":"IEEE J. Mag."},{"key":"ref_5","doi-asserted-by":"crossref","first-page":"261","DOI":"10.1016\/j.apenergy.2018.05.097","article-title":"Peer-to-peer energy sharing through a two-stage aggregated battery control in a community Microgrid","volume":"226","author":"Long","year":"2018","journal-title":"Appl. Energy"},{"key":"ref_6","doi-asserted-by":"crossref","unstructured":"Zhang, B., Du, Y., Lim, E.G., Jiang, L., and Yan, K. (2019, January 26\u201329). Design and Simulation of Peer-to-Peer Energy Trading Framework with Dynamic Electricity Price. Proceedings of the 2019 29th Australasian Universities Power Engineering Conference (AUPEC), Nadi, Fiji.","DOI":"10.1109\/AUPEC48547.2019.211948"},{"key":"ref_7","doi-asserted-by":"crossref","first-page":"468","DOI":"10.1109\/TEC.2018.2878351","article-title":"Optimal Charge\/Discharge Scheduling of Batteries in Microgrids of Prosumers","volume":"34","author":"Martins","year":"2019","journal-title":"IEEE Trans. Energy Convers."},{"key":"ref_8","doi-asserted-by":"crossref","first-page":"115671","DOI":"10.1016\/j.apenergy.2020.115671","article-title":"Framework design and optimal bidding strategy for ancillary service provision from a peer-to-peer energy trading community","volume":"278","author":"Zhou","year":"2020","journal-title":"Appl. Energy"},{"key":"ref_9","unstructured":"de Heer, H., and van der Laan, M. (2022, December 18). USEF: Recommended Practices and Key Considerations for a Regulatory Framework and Market Design on Explicit Demand Response. Available online: https:\/\/www.usef.energy\/app\/uploads\/2017\/09\/Recommended-practices-for-DR-market-design-2.pdf."},{"key":"ref_10","first-page":"1","article-title":"A Three-Stage Strategy with Settlement for an Energy Community Management Under Grid Constraints","volume":"14","author":"Putratama","year":"2022","journal-title":"IEEE Trans. Smart Grid"},{"key":"ref_11","doi-asserted-by":"crossref","unstructured":"Mengelkamp, E., Staudt, P., Garttner, J., and Weinhardt, C. (2017, January 6\u20139). Trading on local energy markets: A comparison of market designs and bidding strategies. Proceedings of the 2017 14th International Conference on the European Energy Market (EEM), Dresden, Germany.","DOI":"10.1109\/EEM.2017.7981938"},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"547","DOI":"10.1016\/j.apenergy.2019.03.109","article-title":"A community microgrid architecture with an internal local market","volume":"242","author":"Savelli","year":"2019","journal-title":"Appl. Energy"},{"key":"ref_13","doi-asserted-by":"crossref","unstructured":"Yahaya, A.S., Javaid, N., Alzahrani, F.A., Rehman, A., Ullah, I., Shahid, A., and Shafiq, M. (2020). Blockchain Based Sustainable Local Energy Trading Considering Home Energy Management and Demurrage Mechanism. Sustainability, 12.","DOI":"10.3390\/su12083385"},{"key":"ref_14","doi-asserted-by":"crossref","unstructured":"Faia, R., Pinto, T., and Vale, Z. (2019). Fair Remuneration of Energy Consumption Flexibility Using Shapley Value, Springer.","DOI":"10.1007\/978-3-030-30241-2_45"},{"key":"ref_15","doi-asserted-by":"crossref","unstructured":"de Almansa, M., Campos, F.A., Dom\u00e9nech, S., and Villar, J. (2019, January 18\u201320). Residential DER Cooperative Investments. Proceedings of the 2019 16th International Conference on the European Energy Market (EEM), Ljubljana, Slovenia.","DOI":"10.1109\/EEM.2019.8916424"},{"key":"ref_16","unstructured":"Tounquet, F. (2023, January 09). Energy Communities in the European Union\u2014ASSET Projet. Available online: https:\/\/www.powerpeers.nl\/media\/1330\/asset-energy-comminities-revised-final-report.pdf."},{"key":"ref_17","doi-asserted-by":"crossref","unstructured":"Mello, J., Villar, J., and Saraiva, J.T. (SSRN, 2022). Conciliating the settlement of local energy markets with self-consumption regulations, SSRN, preprint article, not reviewed.","DOI":"10.2139\/ssrn.4097357"},{"key":"ref_18","doi-asserted-by":"crossref","unstructured":"Long, C., Wu, J., Zhang, C., Thomas, L., Cheng, M., and Jenkins, N. (2017, January 16\u201320). Peer-to-Peer Energy Trading in a Community Microgrid. Proceedings of the 2017 IEEE Power & Energy Society General Meeting, Chicago, IL, USA.","DOI":"10.1109\/PESGM.2017.8274546"},{"key":"ref_19","unstructured":"(2021, October 17). French Government Code de l\u2019\u00e9nergie-Law-l\u2019autoconsommation-Chapter V: Self-consumption (Articles L315-1 to L315-8), Available online: https:\/\/www.legifrance.gouv.fr\/codes\/id\/LEGISCTA000032939883\/."},{"key":"ref_20","unstructured":"Spanish Government (2020, March 21). Real Decreto 244\/2019: Regulation of the Administrative, Tecnical and Economic Conditions of the Self-Consumptions of Electric Energy, Available online: https:\/\/www.boe.es\/eli\/es\/rd\/2019\/04\/05\/244."},{"key":"ref_21","unstructured":"Portuguese Government (2020, January 20). Decreto-Lei n.o 162\/2019|DRE: Legal Scheme Applicable to Self-Consumption of Renewable Energy, Available online: https:\/\/dre.pt\/dre\/detalhe\/decreto-lei\/162-2019-125692189."},{"key":"ref_22","doi-asserted-by":"crossref","first-page":"479","DOI":"10.1109\/TPWRS.2008.2008681","article-title":"Flexible Transmission Expansion Planning with Uncertainties in an Electricity Market","volume":"24","author":"Zhao","year":"2009","journal-title":"IEEE Trans. Power Syst."},{"key":"ref_23","unstructured":"Irish Social Science Data Archive, and Commission for Energy Regulation (CER) (2023, January 11). CER Smart Metering Project\u2014Electricity Customer Behaviour Trial, 2009\u20132010, Available online: https:\/\/www.ucd.ie\/issda\/data\/commissionforenergyregulationcer\/."},{"key":"ref_24","doi-asserted-by":"crossref","first-page":"741","DOI":"10.1109\/TSG.2012.2221751","article-title":"Efficient Computation of Sensitivity Coefficients of Node Voltages and Line Currents in Unbalanced Radial Electrical Distribution Networks","volume":"4","author":"Christakou","year":"2013","journal-title":"IEEE Trans. Smart Grid"},{"key":"ref_25","doi-asserted-by":"crossref","unstructured":"Retorta, F., Gouveia, C., Sampaio, G., Bessa, R., and Villar, J. (2022, January 13\u201315). Local flexibility need estimation based on distribution grid segmentation. Proceedings of the 2022 18th International Conference on the European Energy Market (EEM), Ljubljana, Slovenia.","DOI":"10.1109\/EEM54602.2022.9920997"},{"key":"ref_26","unstructured":"(2023, January 09). Pyomo: Python-Based Open-Source Software for Optimation. Available online: http:\/\/www.pyomo.org\/."},{"key":"ref_27","unstructured":"Cbc (2021, September 08). COIN-OR Foundation. Available online: https:\/\/github.com\/coin-or\/Cbc."},{"key":"ref_28","unstructured":"(2022). Standard for Interconnection and Interoperability of Distributed Energy Resources with Associated Electric Power Systems Interfaces (Standard No. P1547). Available online: https:\/\/standards.ieee.org\/ieee\/1547\/10906\/."}],"container-title":["Energies"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1996-1073\/16\/3\/1143\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T18:11:20Z","timestamp":1760119880000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1996-1073\/16\/3\/1143"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,1,20]]},"references-count":28,"journal-issue":{"issue":"3","published-online":{"date-parts":[[2023,2]]}},"alternative-id":["en16031143"],"URL":"https:\/\/doi.org\/10.3390\/en16031143","relation":{},"ISSN":["1996-1073"],"issn-type":[{"value":"1996-1073","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023,1,20]]}}}