sustainability Article Assessing the Value of Demand Response in Microgrids Isaías Gomes 1,2 , Rui Melicio 1,2, * and Victor M. F. Mendes 3   Citation: Gomes, I.; Melicio, R.; Mendes, V.M.F. Assessing the Value of Demand Response in Microgrids. Sustainability 2021, 13, 5848. https:// doi.org/10.3390/su13115848 Academic Editor: Eklas Hossain Received: 31 March 2021 Accepted: 12 May 2021 Published: 22 May 2021 Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affil- iations. Copyright: © 2021 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 (https:// creativecommons.org/licenses/by/ 4.0/). 1 IDMEC, Instituto de Engenharia Mecânica, Universidade de Lisboa, 1049-001 Lisboa, Portugal; ilrgomes21@gmail.com 2 ICT, Instituto de Ciências da Terra, Universidade de Évora, 59, 7000-671 Évora, Portugal 3 CISE, Electromechatronic Systems Research Centre, Universidade da Beira Interior, 6201-001 Covilhã, Portugal; vfmendes@deea.isel.pt * Correspondence: ruimelicio@gmail.com; Tel.: +351-218-417-351 Abstract: This paper presents a computer application to assist in decisions about sustainability enhancement due to the effect of shifting demand from less favorable periods to periods that are more convenient for the operation of a microgrid. Specifically, assessing how the decisions affect the economic participation of the aggregating agent of the microgrid bidding in an electricity day-ahead market. The aggregating agent must manage microturbines, wind systems, photovoltaic systems, energy storage systems, and loads, facing load uncertainty and further uncertainties due to the use of renewable sources of energy and participation in the day-ahead market. These uncertainties cannot be removed from the decision making, and, therefore, require proper formulation, and the proposed approach customizes a stochastic programming problem for this operation. Case studies show that under these uncertainties and the shifting of demand to convenient periods, there are opportunities to make decisions that lead to significant enhancements of the expected profit. These enhancements are due to better bidding in the day-ahead market and shifting energy consumption in periods of favorable market prices for exporting energy. Through the case studies it is concluded that the proposed approach is useful for the operation of a microgrid. Keywords: microgrid; demand response; stochastic programming; energy management; renew- able energy 1. Introduction Environmental and social sustainability concerns have driven the transition of power systems from a paradigm of natural monopoly to a market paradigm guided by the objective of liberalization, free access to the grid, and deregulation [14], which are part of the contemporary paradigm of the electricity sector. Although the transition has had technical and economic implications for the management of an electric grid, centralized production is still seen in large power plants, usually in association with extensive lines for delivering energy to geographic sites with a large population. Therefore, it is expected that the distribution grid will have a more active role in the future, which remains an opportunity to be explored since an essentially passive attitude has been exercised [5]. Thus, a more active attitude towards the distribution grid is also expected, through production from distributed energy resources that try to ensure local energy sustainability, including the possibility of energy exporting. A contemporary electric grid should have systems that offer the intelligence of a smart grid [6,7]. The indiscriminate integration of distributed energy resources presents challenges for the safe management and control of power systems [5]. In the context of ensuring local energy sustainability, including the possibility of exporting energy, the best way to take advantage of the potential of production from distributed energy resources is through the approach of a power system that considers production and a set of loads as a subsystem of the power system itself. Therefore, production sources and loads are Sustainability 2021, 13, 5848. https://doi.org/10.3390/su13115848 https://www.mdpi.com/journal/sustainability