journal article·2026-02-12Open access

Practical Considerations for the Development of Two-Stage Deterministic EMS (Cloud–Edge) to Mitigate Forecast Error Impact on the Objective Function

Gregorio Fernández, J. F. Sanz Osorio, Roberto Rocca, Luis Luengo-Baranguan, Miguel Torres

Applied Sciences· Volume 16· Issue 4

Abstract

The growing penetration of Distributed Energy Resources (DERs)—such as photovoltaic generation, battery energy storage, electric vehicles, hydrogen technologies and flexible loads—requires advanced Energy Management Systems (EMS) capable of coordinating their operation and leveraging controllability to optimize microgrid performance and enable flexibility provision to the grid. When the physical, electrical, and economic system model is properly defined, the main sources of performance degradation typically arise from forecast uncertainty and temporal discretization effects, which propagate into sub-optimal schedules and infeasible setpoints. This paper proposes and tests a two-stage deterministic EMS architecture featuring rolling-horizon planning at an upper layer and fast local setpoint adaptation at a lower layer, jointly to reduce the impact of forecast errors and other uncertainties on the objective function. The first stage can be deployed either on the edge or in the cloud, depending on computational requirements, whereas the second stage is executed locally, close to the physical assets, to ensure timely corrective action. In the simulated cloud-executed planning case, moving from hourly to 15 min granularity improves the objective value from −49.39€ to −72.12€, corresponding to an approximate 46% reduction in operating cost. In our case study, the proposed second-stage local adaptation can reduce the mean absolute error (MAE) of the EMS performance loss by approximately 50% compared with applying the first-stage schedule without local correction. Results show that this two-stage hierarchical EMS effectively limits objective-function degradation while preserving operational efficiency and robustness.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Microgrid Control and Optimization · Optimal Power Flow Distribution · Integrated Energy Systems Optimization

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Department of Electrical Systems, CIRCE Technology Centre, 50018 Zaragoza, Spain

Instituto de Investigación Mixto de la Energía y la Eficiencia de los Recursos de Aragón, ENERGAIA, Universidad de Zaragoza-Fundación CIRCE, 50018 Zaragoza, Spain

Funding

European Union’s Horizon Europe Research and Innovation program

References (74)

Show source-provided references
1. All you need to know about model predictive control for buildings10.1016/j.arcontrol.2020.09.001 ↗
2. Zhou, E., Hale, E., Stephen, G., and Radhakrishnan, N. (2023). Reducing Grid Costs while Abating Emissions: Opportunities for Flexible Building Loads, National Renewable Energy Laboratory (NREL). NREL/TP-6A40-84828.10.2172/1968836 ↗
3. Strezoski, L. (2023). Distributed energy resource management systems—DERMS: State of the art and how to move forward. Wiley Interdisciplinary Reviews: Energy and Environment, John Wiley and Sons Ltd.10.1002/wene.460 ↗
4. ENTSO-E (2024). System Flexibility Needs for the Energy Transition: Executive Summary, ENTSO-E—European Network of Transmission System Operators for Electricity.
5. Agency for the Cooperation of Energy Regulators (ACER) (2025). Decision on the Flexibility Needs Assessment (FNA) Methodolo-gy—Annex I: Type and Format of Data and the Methodology for TSOs’ and DSOs’ Flexibility Needs Analysis in Accordance with Article 19e(4) of Regulation (EU) 2019/943, ACER.
6. Flexibility potential quantification of electric vehicle charging clusters10.1016/j.segan.2024.101547 ↗
7. Model predictive control of microgrids—An overview10.1016/j.rser.2020.110422 ↗
8. Satchwell, A., Piette, M.A., Khandekar, A., Granderson, J., Frick, N.M., Hledik, R., Faruqui, A., Lam, L., Ross, S., and Cohen, J. (2021). A National Roadmap for Grid-Interactive Efficient Buildings, U.S. Department of Energy.10.2172/1784302 ↗
9. Agha Kassab, F., Rodriguez, R., Celik, B., Locment, F., and Sechilariu, M. (2024). A Comprehensive Review of Sizing and Energy Management Strategies for Optimal Planning of Microgrids with PV and Other Renewable Integration. Appl. Sci., 14.10.3390/app142210479 ↗
10. A computationally efficient mixed-integer linear formulation for the thermal unit commitment problem10.1109/TPWRS.2006.876672 ↗
11. Tight and Compact MILP Formulation for the Thermal Unit Commitment Problem10.1109/TPWRS.2013.2251373 ↗
12. Rawlings, J.B., Mayne, D.Q., and Diehl, M.M. (2020). Model Predictive Control: Theory, Computation, and Design, Nob Hill Publishing. [2nd ed.]. Available online: http://www.nobhillpublishing.com.
13. SCIP: Solving constraint integer programs10.1007/s12532-008-0001-1 ↗
14. Model predictive control of a building heating system: The first experience10.1016/j.enbuild.2010.10.022 ↗
15. Quantifying the impact of building load forecasts on optimizing energy storage systems10.1016/j.enbuild.2024.113913 ↗
16. A rolling horizon optimization framework for the simultaneous energy supply and demand planning in microgrids10.1016/j.apenergy.2015.05.090 ↗
17. Control of systems integrating logic, dynamics, and constraints10.1016/S0005-1098(98)00178-2 ↗
18. Optimal residential load control with price prediction in real-time electricity pricing environments10.1109/TSG.2010.2055903 ↗
19. MILP-based optimal day-ahead scheduling for a system-centric community energy management system supporting different types of homes and energy trading10.1038/s41598-022-22293-y ↗
20. Javaid, S., Lim, Y., and Tan, Y. (2025). Optimized Energy Management and Storage Sizing in Smart Homes with Renewable Energy Sources Under Safe Operating Conditions. Designs, 9.10.3390/designs9010022 ↗
21. Dehghani, M., Bornapour, S.M., Ruiz, F., and Rodriguez, J. (2025). Multi-Objective Energy Management System in Smart Homes with Inverter-Based Air Conditioner Considering Costs, Peak-Average Ratio, and Battery Discharging Cycles of ESS and EV. Energies, 18.10.3390/en18195298 ↗
22. MILP-Based Imitation Learning for HVAC Control10.1109/JIOT.2021.3111454 ↗
23. Kelman, R., and Borrelli, F. (September, January 28). Bilinear model predictive control for HVAC systems. Proceedings of the 18th IFAC World Congress, Milano, Italy.
24. Experimental evaluation of model predictive control and fuzzy logic control for demand response in buildings10.1016/j.apenergy.2025.126666 ↗
25. Liu, G., Ferrari, M.F., Ollis, T.B., and Tomsovic, K. (2022). An MILP-Based Distributed Energy Management for Coordination of Networked Microgrids. Energies, 15.10.3390/en15196971 ↗
26. Optimal scheduling of industrial park integrated energy systems considering dynamics of multiple fluid networks10.1016/j.jclepro.2025.145743 ↗
27. Optimal scheduling of district heat pumps conceived for implementation in Energy Management Systems to participate in demand response
28. An Energy Management System for Industrial Manufacturing with demand response based on a Hybrid Robust MPC10.1016/j.ifacol.2025.10.106 ↗
29. Diabate, M., Krishnamoorthy, H.S., and Shi, J. (2023, January 17–20). Optimal Energy Management of A Hydrogen and Battery-Based Energy Storage System (ESS) for Future DC Microgrids. Proceedings of the 2023 IEEE International Conference on Power Electronics, Smart Grid, and Renewable Energy (PESGRE), Trivandrum, India.10.1109/PESGRE58662.2023.10405233 ↗
30. Optimal sizing and energy management of a microgrid: A joint MILP approach for minimization of energy cost and carbon emission10.1016/j.renene.2024.120186 ↗
31. Optimal design of aggregated energy systems with (N-1) reliability: MILP models and decomposition algorithms10.1016/j.apenergy.2023.122002 ↗
32. Luengo-Baranguan, L., Remiro-Cinca, M., Rivas-Ascaso, D., Rocca, R., Fernández, G., and Elorza-Uriarte, L. (2024, January 17–20). Optimal Sizing Algorithm of PV-BESS Systems Considering a Price-Driven Rule-Based Energy Management Strategy. Proceedings of the 2024 IEEE International Conference on Environment and Electrical Engineering and 2024 IEEE Industrial and Commercial Power Systems Europe (EEEIC/I&CPS Europe), Rome, Italy. Available online: https://ieeexplore.ieee.org/document/10751250.10.1109/EEEIC/ICPSEurope61470.2024.10751250 ↗
33. MILP-based model predictive control for home energy management systems: A real case study in Algarve, Portugal10.1016/j.enbuild.2023.112774 ↗
34. Characterization, quantification and application of energy flexibility in office building: A comprehensive review10.1016/j.enbuild.2025.116306 ↗
35. Energy flexibility of residential buildings: A systematic review of characterization and quantification methods and applications10.1016/j.adapen.2021.100054 ↗
36. Predictive energy management of residential buildings while self-reporting flexibility envelope10.1016/j.apenergy.2021.116653 ↗
37. Hekmat, N., Cai, H., Zufferey, T., Hug, G., and Heer, P. (2023, January 25–29). Data-Driven Demand-Side Flexibility Quantification: Prediction and Approximation of Flexibility Envelopes. Proceedings of the 2023 IEEE Belgrade PowerTech, Belgrade, Serbia.10.1109/PowerTech55446.2023.10202703 ↗
38. Chondrogiannis, S., Vasiljevska, J., Marinopoulos, A., Papaioannou, I., and Flego, G. (2022). Local Electricity Flexibility Markets in Europe, Publications Office of the European Union. EUR 31194 EN.
39. Olivella-Rosell, P., Lloret-Gallego, P., Munné-Collado, Í., Villafafila-Robles, R., Sumper, A., Ottessen, S.Ø., Rajasekharan, J., and Bremdal, B.A. (2018). Local flexibility market design for aggregators providing multiple services at the distribution level. Energies, 11.10.3390/en11040822 ↗
40. Peer-to-peer, community self-consumption, and transactive energy: A systematic literature review of local energy market models10.1016/j.rser.2022.112403 ↗
41. Sustainable local energy communities: The role of peer-to-peer trading, EVs, and RECs on social welfare and emissions10.1016/j.segan.2025.101715 ↗
42. Fernandez, G., Almajano, J., Garcia, E., Bludszuweit, H., Machin, S., and Sanz, J.F. (2019, January 10–13). Control structure for optimal demand-side management with a multi-technology BESS. Proceedings of the ETFA 2019, Zaragoza, Spain.10.1109/ETFA.2019.8869314 ↗
43. Use of model predictive control and weather forecasts for energy efficient building climate control10.1016/j.enbuild.2011.09.022 ↗
44. Grant, P., and Gehbauer, C. (2022, January 14–16). Evaluating the impacts of weather forecast inaccuracy on performance of model predictive control for dynamic facades. Proceedings of the 2022 Building Performance Modeling Conference and SimBuild, Chicago, IL, USA.10.26868/25746308.2022.simbuild2022_C026 ↗
45. Hodge, B.-M., Lew, D., and Milligan, M. (2012). Wind Power Forecasting Error Distributions: An International Comparison, National Renewable Energy Laboratory. NREL/CP-5500-56130.
46. Review of photovoltaic power forecasting10.1016/j.solener.2016.06.069 ↗
47. Electricity price forecasting: A review of the state-of-the-art with a look into the future10.1016/j.ijforecast.2014.08.008 ↗
48. Stochastic model predictive control for economic/environmental operation management of microgrids: An experimental case study10.1016/j.jprocont.2016.04.008 ↗
49. Stochastic security for operations planning with significant wind power generation10.1109/TPWRS.2008.919318 ↗
50. Microgrid energy management: How uncertainty modelling impacts economic performance10.1049/iet-gtd.2019.0241 ↗
51. A novel fitted rolling horizon control approach for real-time policy making in microgrid10.1109/TSG.2020.2966931 ↗
52. Fernández, G., Oliván Monge, M.Á., Sediles Ortiz, J., Muñoz Zuara, A., Bruna Romero, J., Bludszuweit, H., and Prieto Borrero, I. (2019, January 3–6). Transformation of a microgrid into a distribution-grid support asset: UC-7 Málaga. Proceedings of the 25th International Conference Electricity Distribution (CIRED 2019), Madrid, Spain.
53. A hierarchical two-stage energy management for a home microgrid using model predictive and real-time controllers10.1016/j.apenergy.2020.115118 ↗
54. (2025, December 02). REEFLEX Project. Available online: https://reeflexhe.eu/.
55. (2025, December 02). ECOASIS Project. Available online: https://circutor.com/empresa/innovacion/ecoasis/?gad_source=1&gad_campaignid=22781287628&gbraid=0AAAAADlsprZKzu86ZAzqt0eLRAi05E8Rz&gclid=CjwKCAiA3L_JBhAlEiwAlcWO55Zk_cXd4AvIZybtuSe6eSRH9kNGbGPvVpXuv0yTQbQYvqN-5mfwIhoCjl0QAvD_BwE.
56. The nature of domestic electricity-loads and effects of time averaging on statistics and on-site generation calculations10.1016/j.apenergy.2006.09.008 ↗
57. Impact of simulation time-resolution on the matching of PV production and household electric demand10.1016/j.apenergy.2014.04.075 ↗
58. Influence of time resolution in the estimation of self-consumption and self-sufficiency of photovoltaic facilities10.1016/j.apenergy.2018.08.072 ↗
59. Burgio, A., Menniti, D., Sorrentino, N., Pinnarelli, A., and Leonowicz, Z. (2020). Influence and Impact of Data Averaging and Temporal Resolution on the Assessment of Energetic, Economic and Technical Issues of Hybrid Photovoltaic-Battery Systems. Energies, 13.10.3390/en13020354 ↗
60. Marín, L.G., Sumner, M., Muñoz-Carpintero, D., Köbrich, D., Pholboon, S., Sáez, D., and Núñez, A. (2019). Hierarchical Energy Management System for Microgrid Operation Based on Robust Model Predictive Control. Energies, 12.10.3390/en12234453 ↗
61. Development and experimental validation of hierarchical energy management system based on stochastic model predictive control for Off-grid Microgrids10.1016/j.adapen.2021.100028 ↗
62. Hierarchical microgrid energy management in an office building10.1016/j.apenergy.2017.10.002 ↗
63. Hierarchical Energy Management System for Home Microgrids10.1109/TSG.2018.2884323 ↗
64. Two-stage robust scheduling and real-time load control of community microgrid with multiple uncertainties10.1016/j.ijepes.2023.109684 ↗
65. Hierarchical Control of Droop-Controlled AC and DC Microgrids—A General Approach Toward Standardization10.1109/TIE.2010.2066534 ↗
66. Cárdenas, P.A., Martínez, M., Molina, M.G., and Mercado, P.E. (2023). Development of Control Techniques for AC Microgrids: A Critical Assessment. Sustainability, 15.10.3390/su152115195 ↗
67. A critical review of energy storage technologies for microgrids10.1007/s12667-021-00464-6 ↗
68. A review on battery energy storage systems: Applications, developments, and research trends of hybrid installations in the end-user sector10.1016/j.est.2024.111192 ↗
69. Storage requirements for PV power ramp-rate control10.1016/j.solener.2013.10.037 ↗
70. Control strategies to use the minimum energy storage requirement for PV power ramp-rate control10.1016/j.solener.2014.10.038 ↗
71. A review on rapid responsive energy storage technologies for frequency regulation in modern power systems10.1016/j.rser.2019.109626 ↗
72. Becchi, L., Belloni, E., Bindi, M., Intravaia, M., Grasso, F., Lozito, G.M., and Piccirilli, M.C.A. (2024). Computationally Efficient Rule-Based Scheduling Algorithm for Battery Energy Storage Systems. Sustainability, 16.10.3390/su162310313 ↗
73. Camblong, H., Zapirain, I., Curea, O., Ugartemendia, J., Boussaada, Z., and Zamora, R. (2024). Rule-Based Energy Management System to Enhance PV Self-Consumption in a Building: A Real Case. Energies, 17.10.3390/en17236099 ↗
74. (2026, January 05). Solar Cast, Live and Forecast Accuracy. Available online: https://solcast.com/forecast-accuracy.