Impact of an ML-Based Demand Response Mechanism on the Electrical Distribution Network: A Case Study in Terni
Abstract
:1. Introduction
- Modelling and testing an original ML-based forecasting model, with continuous model training, applied to the PV production trend and industrial and domestic consumption trends;
- Modelling and testing an original ML model for optimising an electricity grid, leveraging local flexibility resources;
- Integration of the models and deployment on a real power grid, analysing the benefits for the DN.
2. Methodology and Models
2.1. Forecasting Model
2.2. Grid Optimisation Model
- The environment refers to the physical or simulated space that the agents interact with.
- Agents are entities that are affected by and are in a position to interact with the environment by taking action.
- Agents take a state (e.g., vector) that represents their status at every point in time. States are defined as a discrete or a continuous closed set.
- A set of actions is defined for the agents to take. This group is defined as a discrete or a continuous closed set.
- Rewards are given by the environment after the undertaking of actions by the autonomous agents.
- Observations are pre-processed snapshots (e.g., in the form of vectors) collected after each transition, which gather relevant variables from the environment as well as the previous state and the actions taken, resulting in the state and the observed reward.
- Policies, in broad terms, are the learned (deterministic or stochastic) mapping between the set of states and the set of actions.
2.2.1. Environment
2.2.2. States
Discretisation of States
2.2.3. Actions
2.2.4. Rewards
2.2.5. Agents
- Variable number of steps per episode: some experiments show that the reward fell down after some steps and was incapable of going up for the rest of the episode. To avoid wasting time in the training process, the episode is concluded when the obtained rewards go down a customisable threshold of 20%.
- Variable exploration time: the training process supports the configuration of a variable exploration rate, which can be diminished as the learning process progresses over more learning episodes.
- State density matrix: the optimisation training process registers all the states visited by the agent, intended to give a clear vision of the agent’s preferable combination of states, aiming to understand the reasons for the agent to choose such a state combination as optimal. This state’s matrix consists of 48 columns, corresponding to the 24 h of both domestic and industrial consumers, and 10 rows, corresponding to the 10 state bins available for each state.
3. Case Study
4. Results
4.1. Forecasting Results
4.2. Results of Grid Optimisation Using the Demand Response
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
API | application programming interface |
DER | distributed energy resources |
DL | deep learning |
DN | distribution network |
DR | demand response |
DSO | distribution system operator |
GRU | gated recurrent unit |
LSTM | long short-term memory |
ML | machine learning |
MQTT | message queuing telemetry transport |
MSE | mean squared error |
PMU | phasor measurement unit |
PS | primary substation |
RL | reinforcement learning |
RNN | recurrent neural network |
RPF | reverse power flow |
SCR | self-consumption rate |
SSR | self-sufficiency rate |
References
- European Environment Agency. Total Greenhouse Gas Emission Trends and Projections in Europe. 2022. Available online: https://www.eea.europa.eu/ims/total-greenhouse-gas-emission-trends (accessed on 10 September 2023).
- Albadi, M.H.; El-Saadany, E.F. Demand response in electricity markets: An overview. In Proceedings of the 2007 IEEE Power Engineering Society General Meeting, Tampa, FL, USA, 24–28 June 2007; pp. 1–5. [Google Scholar] [CrossRef]
- Chen, C. Demand response: An enabling technology to achieve energy efficiency in a smart grid. In Application of Smart Grid Technologies; Lamont, L.A., Sayigh, A., Eds.; Academic Press: Cambridge, MA, USA, 2018; pp. 143–171. [Google Scholar] [CrossRef]
- Haider, H.T.; See, O.H.; Elmenreich, W. A review of residential demand response of smart grid. J. Renew. Sustain. Energy Rev. 2016, 59, 166–178. [Google Scholar] [CrossRef]
- European Commission. Communication from the Commission to the European Parliament, the Council, the European Economic and Social Committee, the Committee of the Regions and the European Investment Bank—Clean Energy for All Europeans; European Commission: Luxembourg, 2016. [Google Scholar]
- Willems, B.; Zhou, J. The clean energy package and demand response: Setting correct incentives. Energies 2020, 13, 5672. [Google Scholar] [CrossRef]
- Srivastava, A.; Passel, S.V.; LAes, E. Assessing the success of electricity demand response programs: A meta-analysis. Energy Res. Soc. Sci. J. 2018, 40, 110–117. [Google Scholar] [CrossRef]
- Larsen, S.P.; Johra, H. User engagement with smart home technology for enabling building energy flexibility in a district heating system. IOP Conf. Ser. Earth Environ. Sci. 2019, 352, 012002. [Google Scholar] [CrossRef]
- Eguiarte, O.; de Agustín-Camacho, P.; Garrido-Marijuán, A.; Romero-Amorrortu, A. Domestic space heating dynamic costs under different technologies and energy tariffs: Case study in Spain. Energy Rep. 2020, 6, 2205. [Google Scholar] [CrossRef]
- Aalami, H.; Moghaddam, M.P.; Yousefi, G. Demand response modeling considering interruptible/curtailable loads and capacity market programs. Appl. Energy 2010, 87, 243–250. [Google Scholar] [CrossRef]
- Mohsenian-Rad, A.; Wong, V.W.S.; Jatskevich, J.; Schober, R.; Leon-Garcia, A. Autonomous demand-side management based on game-theoretic energy consumption scheduling for the future smart grid. IEEE Trans. Smart Grid. 2010, 1, 320–331. [Google Scholar] [CrossRef]
- Nguyen, D.T.; Nguyen, H.T.; Le, L.B. Dynamic pricing design for demand response integration in power distribution networks. IEEE Trans. Power Syst. 2016, 31, 3457–3472. [Google Scholar] [CrossRef]
- Rahmani-andebili, M. Modeling nonlinear incentive-based and price-based demand response programs and implementing on real power markets. Electr. Power Syst. Res. 2016, 132, 115–124. [Google Scholar] [CrossRef]
- Kathirgamanathan, A.; Péan, T.; Zhang, K.; De Rosa, M.; Salom, J.; Kummert, M.; Finn, D.P. Towards standardising market-independent indicators for quantifying energy flexibility in buildings. Energy Build. 2020, 220, 110027. [Google Scholar] [CrossRef]
- Lu, R.; Hong, S.H.; Yu, M. Demand response for home energy management using reinforcement learning and artificial neural network, IEEE Trans. Smart Grid. 2019, 10, 6629–6639. [Google Scholar]
- Gao, N.; Ge, S.; Tian, Y.; You, C. A review of decision-making strategies of profit seeking demand response aggregators. In Proceedings of the 2020 IEEE sustainable power and energy conference (ISPEC), Chengdu, China, 23–25 November 2020; pp. 2135–2140. [Google Scholar]
- Lu, X.; Li, K.; Xu, H.; Wang, F.; Zhou, Z.; Zhang, Y. Fundamentals and business model for resource aggregator of demand response in electricity markets. Energy 2020, 204, 117885. [Google Scholar] [CrossRef]
- Osman, S.R.; Sedhom, B.E.; Kaddah, S.S. Impact of implementing emergency demand response program and tie-line on cyber-physical distribution network resiliency. Sci. Rep. 2023, 13, 3667. [Google Scholar] [CrossRef]
- Zakariazadeh, A.; Homaee, O.; Jadid, S.; Siano, P. A new approach for real time voltage control using demand response in an automated distribution system. Appl. Energy 2014, 117, 157–166. [Google Scholar] [CrossRef]
- Safdarian, A.; Fotuhi-Firuzabad, M.; Lehtonen, M. A distributed algorithm for managing residential demand response in smart grids. IEEE Trans. Ind. Inf. 2014, 10, 2385–2393. [Google Scholar] [CrossRef]
- Borou, S.; Anastasakis, Z.; Voulkidis, A.; Velivassaki, T.; Mira, J.; Moreno, I.; Gorroñogoitia, J.; Bardisbanian, H. Enhanced IoT Federated Deep Learning/Reinforcement ML. IoT NGIN Report. Available online: https://iot-ngin.eu/wp-content/uploads/2023/01/IOT-NGIN_D3.3_V1.0_PENDING_EC_APPROVAL.pdf (accessed on 10 September 2023).
- Rumelhart, D.E.; Hinton, G.E.; Williams, R.J. Learning Internal Representations by Error Propagation; Institute for Cognitive Science, University of California: San Diego, CA, USA, 1985. [Google Scholar]
- Tiwari, A.; Pindoriya, N.M. Automated Demand Response in Smart Distribution Grid: A Review on Metering Infrastructure, Communication Technology and Optimization Models. Electr. Power Syst. Res. 2022, 206, 107835. [Google Scholar] [CrossRef]
- Antonopoulos, I.; Robu, V.; Couraud, B.; Kirli, D.; Norbu, S.; Kiprakis, A.; Flynn, D.; Elizondo-Gonzalez, S.; Wattam, S. Artificial intelligence and machine learning approaches to energy demand-side response: A systematic review. Renew. Sustain. Energy Rev. 2020, 130, 109899. [Google Scholar] [CrossRef]
- Hernandez-Matheus, A.; Löschenbrand, M.; Berg, K.; Fuchs, I.; Aragüés-Peñalba, M.; Bullich-Massagué, E.; Sumper, A. A systematic review of machine learning techniques related to local energy communities. Renew. Sustain. Energy Rev. 2022, 170, 112651. [Google Scholar] [CrossRef]
- Mohsenian-Rad, H.; Ghamkhari, M. Optimal charging of electric vehicles with uncertain departure times: A closed-form solution. IEEE Trans. Smart Grid 2014, 6, 940–942. [Google Scholar] [CrossRef]
- Van Der Kam, M.; van Sark, W. Smart charging of electric vehicles with photovoltaic power and vehicle-to-grid technology in a microgrid; a case study. Appl. Energy 2015, 152, 20–30. [Google Scholar] [CrossRef]
- Riffonneau, Y.; Bacha, S.; Barruel, F.; Ploix, S. Optimal power flow management for grid connected pv systems with batteries. IEEE Trans. Sustain. Energy 2011, 2, 309–320. [Google Scholar] [CrossRef]
- Haider, H.T.; Muhsen, D.H.; Al-Nidawi, Y.M.; Khatib, T.; See, O.H. A novel approach for multi-objective cost-peak optimization for demand response of a residential area in smart grids. Energy 2022, 254, 124360. [Google Scholar] [CrossRef]
- Gerke, B.F.; Zhang, C.; Murthy, S.; Satchwell, A.J.; Present, E.; Horsey, H.; Wilson, E.; Parker, A.; Speake, A.; Adhikari, R.; et al. Load-driven interactions between energy efficiency and demand response on regional grid scales. Adv. Appl. Energy 2022, 6, 100092. [Google Scholar] [CrossRef]
- Zhu, J.R.; Jin, Y.; Zhu, W.; Lee, D.-K.; Bohlooli, N. Multi-objective planning of micro-grid system considering renewable energy and hydrogen storage systems with demand response. Int. J. Hydrogen Energy 2023, 48, 15626–15645. [Google Scholar] [CrossRef]
- IoT-NGIN Project Website. Available online: https://iot-ngin.eu/ (accessed on 10 September 2023).
- Energy Community. POLICY GUIDELINES by the Energy Community Secretariat on the Grid Integration of Prosumers; Energy Community: Vienna, Austria, 2018. [Google Scholar]
- Pascanu, R.; Mikolov, T.; Bengio, Y. On the difficulty of training recurrent neural networks. In Proceedings of the International Conference on Machine Learning, Atlanta, GA, USA, 16–21 June 2013; pp. 1310–1318. [Google Scholar]
- Dey, R.; Salem, F.M. Gate-Variants of Gated Recurrent Unit (GRU) Neural; Department of Electrical and Computer Engineering: Vancouver, BC, Canada, 2017. [Google Scholar]
- Kserve. Available online: https://kserve.github.io/website/0.10/ (accessed on 10 September 2023).
- Kubeflow. Available online: https://www.kubeflow.org/ (accessed on 10 September 2023).
- FastAPI. Available online: https://fastapi.tiangolo.com (accessed on 10 September 2023).
- Prometheus. Available online: https://prometheus.io/ (accessed on 10 September 2023).
- Grafana. Available online: https://grafana.com/ (accessed on 10 September 2023).
- Sutton, R.S.; Barto, A.G. Reinforcement learning: An introduction. MIT Press: Cambridge, MA, USA, 2018. [Google Scholar]
- Tensorforce. Available online: https://github.com/tensorforce/tensorforce (accessed on 10 September 2023).
- Pandapower. Available online: http://www.pandapower.org/ (accessed on 10 September 2023).
- Pypower. Available online: https://pypi.org/project/PYPOWER/ (accessed on 10 September 2023).
- GSE, Gruppi di Autoconsumatori di Energia Rinnovabile che Agiscono Collettivamente e Comunità di Energia Rinnovabile. Available online: https://www.gse.it/servizi-per-te/autoconsumo/gruppi-di-autoconsumatori-e-comunita-di-energia-rinnovabile/documenti (accessed on 10 September 2023). (In Italian).
- Bragatto, T.; Bucarelli, M.A.; Carere, F.; Cresta, M.; Gatta, F.M.; Geri, A.; Maccioni, M.; Paulucci, M.; Poursoltan, P.; Santori, F. Near real-time analysis of active distribution networks in a Digital Twin framework: A real case study. Sustain. Energy Grids Netw. 2023, 35, 101128. [Google Scholar] [CrossRef]
- Bragatto, T.; Bucarelli, M.A.; Bucarelli, M.S.; Carere, F.; Geri, A.; Maccioni, M. False Data Injection Impact on High RES Power Systems with Centralized Voltage Regulation Architecture. Sensors 2023, 23, 2557. [Google Scholar] [CrossRef] [PubMed]
- Bragatto, T.; Bucarelli, M.A.; Carere, F.; Cavadenti, A.; Santori, F. Optimization of an energy district for fuel cell electric vehicles: Cost scenarios of a real case study on a waste and recycling fleet. Int. J. Hydrogen Energy 2022, 47, 40156–40171. [Google Scholar] [CrossRef]
- Kingma, D.P.; Ba, J.L. ADAM: A method for stochastic optimization. arXiv 2014, arXiv:1412.6980. [Google Scholar]
- Shapiro, S.S.; Wilk, M.B. An Analysis of Variance Test for Normality. Biometrika 1965, 52, 591–611. [Google Scholar] [CrossRef]
- Anderson, T.W.; Darling, D.A. Asymptotic Theory of Certain “Goodness of Fit” Criteria Based on Stochastic Processes. Ann. Math. Stat. 1952, 23, 193–212. [Google Scholar] [CrossRef]
- D’Agostino, R.B.; Pearson, E.S. Tests for Departure from Normality. Empirical Results for the Distributions of b2 and √b1. Biometrika 1973, 60, 613–622. [Google Scholar] [CrossRef]
Action Subset | Length |
---|---|
Domestic demand cluster selection | 4 |
Industrial demand cluster selection | 4 |
Domestic initial time slot | 24 |
Industrial initial time slot | 24 |
Final domestic time slot | 2 |
Final industrial time slot | 2 |
Demand shift for domestic cluster | 2 |
Industrial shift for domestic cluster | 2 |
Hyper-Parameters | Value |
---|---|
Epochs | 50 |
Learning Rate | 0.005 |
Optimiser | Adam |
Loss Function | Mean squared error |
Batch size | 128 |
Normality Test | Value |
---|---|
Shapiro–Wilk | 0.47 |
Anderson–Darling | 0.76 |
Agostino–Pearson | 0.10 |
Hyper-Parameter | Value |
---|---|
RL Algorithm | PPO |
Learning Rate | 0.001 |
Optimiser | Adam |
Multistep | 10 |
Batch size | 1 |
Reward discount | 10% |
1 | |
Load threshold | 30% |
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. |
© 2023 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/).
Share and Cite
Bucarelli, M.A.; Ghoreishi, M.; Santori, F.; Mira, J.; Gorroñogoitia, J. Impact of an ML-Based Demand Response Mechanism on the Electrical Distribution Network: A Case Study in Terni. Electronics 2023, 12, 3948. https://doi.org/10.3390/electronics12183948
Bucarelli MA, Ghoreishi M, Santori F, Mira J, Gorroñogoitia J. Impact of an ML-Based Demand Response Mechanism on the Electrical Distribution Network: A Case Study in Terni. Electronics. 2023; 12(18):3948. https://doi.org/10.3390/electronics12183948
Chicago/Turabian StyleBucarelli, Marco Antonio, Mohammad Ghoreishi, Francesca Santori, Jorge Mira, and Jesús Gorroñogoitia. 2023. "Impact of an ML-Based Demand Response Mechanism on the Electrical Distribution Network: A Case Study in Terni" Electronics 12, no. 18: 3948. https://doi.org/10.3390/electronics12183948
APA StyleBucarelli, M. A., Ghoreishi, M., Santori, F., Mira, J., & Gorroñogoitia, J. (2023). Impact of an ML-Based Demand Response Mechanism on the Electrical Distribution Network: A Case Study in Terni. Electronics, 12(18), 3948. https://doi.org/10.3390/electronics12183948