Citation: Muhsen, H.; Alkhraibat, A.; Al-Halhouli, A. Real-Time Simulation and Energy Management Attainment of Microgrids. Sustainability 2023, 15, 2696. https://doi.org/10.3390/ su15032696 Academic Editor: George Kyriakarakos Received: 29 December 2022 Revised: 26 January 2023 Accepted: 31 January 2023 Published: 2 February 2023 Copyright: © 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/). sustainability Article Real-Time Simulation and Energy Management Attainment of Microgrids Hani Muhsen 1,2, * , Asma Alkhraibat 2 and Ala’aldeen Al-Halhouli 1,2 1 Department of Mechatronics Engineering, School of Applied Technical Sciences, German Jordanian University, Madaba 11180, Jordan 2 Smart Grid Lab, German Jordanian University, Madaba 11180, Jordan * Correspondence: hani.mohsen@gju.edu.jo Abstract: The rapid spread of Microgrid systems has led to the need for an intensive analysis of the system to avoid several challenges such as stability, reliability, power balance, and other aspects. In this context, real-time simulation plays a vital role in the overall system study before the actual implementation stage. This helps avoid many on-site problems of the Microgrid by simulating the system and studying different operation scenarios. This paper uses the OPAL-RT simulator to perform a real-time simulation of an MG case study. Furthermore, it examines the implementation of the Fault Ride Through technique to overcome the total disconnection of the PV system following unpredictable faults. Moreover, a Load curtailment solution method is proposed in this study, to meet the balance and stable operation of the MG. The results prove the effectiveness of both techniques, with FRT implementation reducing the losses by about 62%, and the Load curtailment algorithm maintaining the balance of the MG. Keywords: real-time simulation; microgrid; OPAL-RT; fault ride through; load curtailment 1. Introduction Microgrid (MG) systems’ proliferation has significantly increased in recent years. The penetration of renewable energy resources, the limitation of carbon dioxide emissions, and the broad deployment of smart power systems have contributed to the wide spread of MG applications. An MG is a smart small-scale power system comprising a mix of generating resources, controllable loads, energy storage units, transmission lines, transformers, and a point of common coupling (PCC) [1]. The PCC is the main circuit breaker installed in the MG system to control the operation mode of the network. The MG system’s operation modes can be grid-connected or grid-islanded [2]. Various research projects have been directed toward the MG topic as a promising field in the electrical energy world [3,4]. The main and critical feature of the MG system is the ability to work in two operation modes: connected or islanded. The potential complexity of such a network is caused by the transition between operation modes while maintaining a stable operation [5]. MG systems have several benefits to different sides of the community, including environmental aspects [6], economic aspects [7], and trading aspects [8]. In addition, the control part of the MG includes energy management [9], stability and resiliency [2], decentralized monitoring [10], real-time monitoring [11], and system protection [12]. The control side of power systems has countless articles highlighting diverse fields and techniques that help to maintain a stable operation. Advanced transactive control strategies have been developed to optimally utilize the installed distributed energy resources and storage units in the energy community [13]. The proposed techniques have been built based on the game theoretical control scheme. In addition, two other innovative control techniques have been established, the whale optimization algorithm (WOA) and the artificial neural Sustainability 2023, 15, 2696. https://doi.org/10.3390/su15032696 https://www.mdpi.com/journal/sustainability