###### Abstract  
Simulating complex systems in real time presents both significant advantages and challenges. Hardware-in-the-loop (HIL) simulation has emerged as an interesting technique for addressing these challenges. While HIL has gained attention in the scientific literature, its application in energy studies and power systems remains scattered and challenging to locate. This paper aims to provide an assessment of the penetration of the HIL technique in energy studies and power systems. The analysis of the literature reveals that HIL is predominantly employed in evaluating electrical systems (smart grids, microgrids, wind systems), with limited application in thermal energy systems (energy storage). Notably, the combination of electrical hardware-in-the-loop (EHIL) and thermal hardware-in-the-loop (THIL) techniques has found application in the assessment of vehicle thermal management systems and smart cities and, recently, has also been adopted in building systems. The findings highlight the potential for further exploration and expansion of the HIL technique in diverse energy domains, emphasizing the need for addressing challenges such as hardware-software compatibility, real-time data acquisition, and system complexity. hardware in the loop; energy systems; electric systems; thermal systems +
Footnote †: journal: Applied sciences  
testing the performance of the system being designed under various scenarios, including extreme and rare conditions that may be difficult or impossible to replicate in a real-world environment [2,4]. The HIL technique has numerous advantages over traditional testing methods, such as analytical modelling and physical testing [2,3,7]. For example, HIL testing can save time and money by reducing the need for expensive prototypes and physical testing [2,8,9,10]. It also enables engineers to test their designs under a wide range of conditions that may not be possible to achieve in a physical environment, such as extreme temperatures or weather conditions. Moreover, HIL testing is highly accurate and repeatable, providing a source of reliable data to make informed decisions about the component under analysis [2,3]. HIL is implemented in a wide variety of sectors globally. For example, to meet sustainable development goals [11], cities are transitioning towards interconnected systems that provide essential services such as energy, transport, and water. These systems are becoming increasingly complex, with sophisticated control strategies and real-time data management. Hardware-in-the-loop (HIL) simulation offers a way to evaluate these systems in a controlled environment without the risk of disrupting city operations. In recent years, HIL simulation has gained attention as a tool for testing and optimizing smart city systems. HIL simulations are used in a variety of smart city applications, including transportation systems [12,13,14], energy management systems [15,16,17], lighting systems [18], 5G networks [13,19], and urban ecosystems [20,21]. In grid energy management systems, HIL simulation is used to evaluate the performance of microgrid systems. Testing the performance of a hybrid energy storage control strategy on an islanded microgrid system under different load conditions [15]. At the building level, HIL has gained attention as a tool for testing and optimizing buildings. Building systems, such as heating, ventilation, and air conditioning (HVAC), lighting, and energy management systems, are becoming increasingly complex as they incorporate more sophisticated control strategies and integrate with other building systems. HIL simulation offers a way to test these systems in a controlled environment without the risk of disrupting building operations [16,17,22,23]. Given the continuously growing body of information on the topic and the lack of concentrated and condensed information, it is not easy to identify in the scientific literature what are the global trends on HIL in the energy sector and what are the benefits and drawbacks of it.