Digital Twins: Shaping the Future of Energy Systems and Smart Cities through Cybersecurity, Efficiency, and Sustainability

Modern power systems are undergoing a rapid evolution toward digitization, facilitated by emerging technologies such as the Internet of Things (IoT), Artificial Intelligence (AI), Blockchain Technology (BT), and Digital Twins (DT). DT is a promising enabling technology to transform many industries and society. DTs are sophisticated networks of linked systems to simulate the actual world in cyberspace as digital replicas. Such digital replication includes virtualizing a system’s components, operations, interactions, and software. Real-time data connections and information transfer let physical and digital systems coexist. Digital transformation in the energy sector improves technical, economic, and safety efficiency. Energy-related DT solutions in smart cities are intriguing and decision-support tools for stakeholders and decision-makers, but they need additional study and further technological advancements to be more efficient and usable. The article reviews the literature and practices of DT in energy systems in smart cities to provide new insights for future research trajectories. DTs can, among others, enhance cyber security, efficiency, sustainability, and reliability.


I. INTRODUCTION
Today's energy systems in smart cities are undergoing a significant digital transformation due to advances in renewable energy technologies, the increasing adoption of distributed energy resources (DERs), and the growing demand for an energy-efficient, sustainable, and more livable future.In this context, digital twin (DT) is regarded as a promising enabling technology with the potential to revolutionize the way that energy systems and smart cities are designed, operated, and optimized.Although the idea of a DT is almost two decades old, it is constantly evolving as it spreads to different industries and applications [1].DT has been effectively used in a variety of industrial sectors, including health, energy, education, and manufacturing.[2].This has led to a wide range of definitions, potentially diluting the concept and causing ineffective uses of the technology.According to [1], DT is defined as a virtual replica of a physical system, including its environment and processes where information is exchanged between the physical and virtual environments to keep the digital twin up to date.The definition of DT that has been accepted by the authors in this paper aligns with this definition.
Within the energy sector and smart cities, DTs offer the potential to model, simulate and analyze complex engineering systems, including power generation plants, energy storage and grid management systems, smart cities technologies and big data, as well as building energy management systems.Through the use of DTs, system operators are able to optimize performance, minimize downtime, process and visualize data, and preemptively address potential technical issues before they arise as well as detect and monitor climate risks.In spite of the benefits that DTs offer in these sectors, it is also relevant to acknowledge the fundamental challenges that confront the industry at present.The pertinent issues of security, efficiency, reliability, and sustainability are all paramount considerations that must be carefully evaluated to guarantee the successful integration of DTs into these systems.
Moreover, security is a critical concern in cyber-physical energy and smart cities sectors, which are vulnerable to cyber attacks [3].To safeguard critical data and maintain its integrity and confidentiality, DTs need to be equipped with resilient security measures.Secondly, efficiency and reliability are crucial factors in these sectors, and DTs can help to optimize energy usage, reduce downtime and anomalies, and improve system reliability [4].Finally, these sectors are facing mounting pressure to reduce carbon emissions and shift towards green energy sources, making sustainability a paramount concern.In this energy transition, DTs can prove to be instrumental by facilitating the optimization of renewable energy sources (RES) and the seamless integration of DERs into smart cities and the smart grid [5].
Therefore, this paper aims to examine the benefits of DTs in the context of energy systems and smart cities through showcase examples and use cases of DTs while assessing their potential contribution to innovating these sectors.Furthermore, this paper examines the challenges that must be overcome to ensure the successful deployment of DTs in the energy sectors.
The paper is organized as follows.Section II provides a concise overview of the key components that are crucial to comprehend DTs models for energy system applications.Section III presents a thorough insight into the various applications and use cases of DTs in the domains of energy systems and smart cities.The cyber security aspects of DTs is presented in Section IV.Section V offers a detailed discussion on the opportunities, challenges, and limitations of DTs in energy systems.Finally, section V provides a brief conclusion and outlook of further research trajectories.

II. UNDERSTANDING DIGITAL TWINS
A digital twin consists of a continuously updated digital copy of physical systems or components.It aims to monitor performance, experiment with diverse scenarios, forecast failures, and discover prospects for system operation.The widelyused and high-level 5D conceptual model of DTs is shown in Fig. 1 [6].This 5D conceptual model is adapted for use in energy systems and consists of 5 key components: Physical Entity, Virtual Entity, Data Model, Services, and Connections.
The Physical Entity represents a physical system or component that performs a specific task.It consists of sensors and actuators that facilitate the exchange and orchestration of information between the physical asset and the digital representation.Typical examples within the energy sector can be observed in the form of energy generation plants, including but not limited to solar and wind farms.
The Virtual Entity is a highly accurate digital representation of the physical entity.This involves replicating not only the geometries of the physical entity but also its properties, behaviors, and rules [7].To achieve this level of accuracy, an efficient Internet of Things (IoT) infrastructure is necessary.The Data Model is a centralized repository that accumulates and merges heterogeneous data from the physical entity, the virtual entity, services, and the domain knowledge.
In the context of digital twinning, Services play a critical role by encompassing all the necessary functions of a DT.They receive raw data from sensors and transform it into valuable insights through various processes, such as analysis, simulation, monitoring, and optimization [8].They serve as decision-support tools that empower stakeholders and public authorities to make informed decisions.Typically, they are powered by artificial intelligence (AI) and machine learning (ML) algorithms, which enable them to process complex data.Overall, services are a crucial component of digital twinning, and their effective implementation can lead to significant improvements in various industries and applications.The energy sector can benefit from a range of services that can be realized through the implementation of DTs.DTs can be leveraged to provide several key services to the energy sector, including performance monitoring, predictive maintenance, optimization, resource forecasting, and asset management.
Finally, the Connections facilitate the interconnection and information flow between the aforementioned four dimensions of DTs.This crucial element serves as the fundamental link that enables the seamless integration of diverse technological aspects, thereby enhancing the overall functionality and effectiveness of DTs.In the next section, we will delve deeper into the application of DTs in the energy sector and smart cities, focusing on the benefits they can bring and the challenges they can address.

III. APPLICATIONS OF DIGITAL TWINS IN ENERGY SYSTEMS AND SMART CITIES
The adoption of DTs technology in the energy sector and smart cities yields various advantages.DTs can effectively address challenges related to asset management, operational reliability, and environmental sustainability, leading to improved overall performance and a more livable and sustainable future [9].The various applications and the use cases of DTs in the energy sectors can be summarized into two groups as shown in Fig. 2.

A. Power Value Chain
Among the various challenges that can be addressed by the DTs in energy systems field, there is forecasting energy demand for consumers using ML models, improving management and distribution of the energy grid using real-time databased simulation models, and identifying abnormal behavior of renewable energy systems to enhance maintenance and support service teams [10]. 1) Power Generation: DT is also widely used in the energy generation sector, from wind farms to nuclear plants.The unpredictable nature of RES leads to uncertainty in power networks and energy systems.DTs can address this uncertainty through real-time monitoring and control systems, allowing for online analysis of physical entities [10].For example, General Electronics (GE) has developed a DT for an entire wind farm that improves energy production, maintenance strategies, and reliability by collecting real-time data [11].DNV GL has also developed a DT analytics tool for wind turbines, called WindGEMINI, which improves performance through predictive maintenance [12].DTs have emerged as a promising technology for wind farm monitoring and operational purposes.In addition to tracking the conditions of wind farms, DTs offer the ability to simulate various scenarios.To this end, authors in [13] have developed an interactive DT platform for offshore wind farms that encompasses these functionalities.Similarly, DTs have been leveraged in other power generation processes to address several challenges.For instance, in solar farms, DTs have been employed to achieve maximum power point tracking [14] and fault diagnosis [15].In nuclear power plants, DTs have been used for online condition monitoring and to enhance operational resiliency [16].Also in hydropower plants, DTs have found significant importance in the area of fault diagnosis [17].With the rapidly increasing adoption of DT technology in the energy sector, it is expected that these applications will continue to expand and evolve in the short and long-term future.
2) Power Distribution and Transmission: The DT technology also enables efficient use of data for new applications, improved decision-making using big data, and easier data usage in power distribution and transmission.Siemens has developed a single digital grid using DTs for planning, operating, and maintaining the Finnish power grid, which offers improved safety, reliability, and resource-saving by automating simulations [18].Norway is also planning to implement DT for optimizing power network operations to manage the complexities of intermittent RES and distributed energy resources [19].
3) Grid optimization and load balancing: The DT of micro-grids can support real-time forecasting and analysis issues with high accuracy and efficiency to predict grid conditions, balance grids, and prevent blackouts [10].DTs have the potential to optimize electricity production and distribution, as well as asset maintenance, which is crucial to mitigate the effects of climate change [19].
4) Energy storage systems: Integrating DT with ML can significantly improve energy storage system (ESS) management, leading to cost, energy, and emission savings.An energy management system (EMS) improves the functionality of ESS by effectively controlling the amount and timing of charging and discharging, as well as managing the flow of power [20].
5) E-Mobility: The development of a DT for electric vehicle (EV) propulsion systems can detect and monitor critical spots or hotspots, allowing for effective and safe operation.The DT can recommend approaches for control and feedback arrangements and can be used for driver assistance systems and autonomous vehicle development [21].Additionally, DTs can optimize charging programs for EVs by modeling energy consumption parameters and considering charge capacity and frequency [10].
B. Smart Cities and Energy Aspects: Energy efficiency and demand-side management 1) Smart and connected cities: There are several similar definitions for a smart city, including the one provided by the European Commission [22]: "A smart city is a place where traditional networks and services are made more efficient using digital and telecommunication technologies for the benefit of its inhabitants and business.A smart city goes beyond the use of Information and communication technologies (ICT) for better resource use and fewer emissions".One of the primary challenges facing smart cities pertains to the transition towards interconnected urban energy landscapes.The deployment of an energy management tool is deemed essential to effectively control and coordinate the numerous interconnected energy assets within smart cities.The use of DTs allows to significantly enhance the capabilities of cities with respect to energy assets and services by enabling their integration with more efficient management processes and policies.Additionally, the IoT provides a means of facilitating interaction between all components of smart cities through the utilization of DT technologies [23].
2) Building energy management systems: Building energy management systems (BEMSs) aim to optimize energy consumption in buildings by monitoring and controlling energy use and can significantly reduce energy consumption, costs, and emission in the atmosphere [24].However, challenges related to security and privacy must be addressed for their widespread adoption.Minoli et.al. have discussed the potential future of BEMSs and the role of the IoT in energy management for smart buildings.The DT applications on the smart city can have a significant impact on the long-term planning of microgrid development and enabling optimal and efficient decision-making for energy management, distribution and monitoring.In that regard, it can improve stability, reliability, and resilience by detecting faults in time [25].
3) Industrial and commercial energy optimization: Industrial demand management can provide flexibility to power systems with high intermittent power penetration.Heavy industries, such as cement and aluminum factories, can regulate energy consumption, lowering costs, demand, and emissions.Incentives and third-party aggregators can motivate industries to participate in demand response programs, benefiting power frequency regulation, RES integration, and local congestion mitigation [26].DT technology can aid various industries, from design to disposal, including aeronautics, maritime, manufacturing, and retail.Despite progress being made since the inception of DT technology, there are still uncharted territories for practical applications and implementations of DT technology in the industry.Manufacturing is among the industries that has made significant progress in leveraging DTs to improve products through data collection and analysis during the whole product's lifecycle [19].

IV. CYBERSECURITY ASPECTS OF DTS
DTs cybersecurity for energy systems should be evaluated from two perspectives: 1) cybersecurity and cyber-resiliency benefits offered by using the DTs technology; 2) impact on the DT integrated physical and digital network.In both cases, the use-case should begin with establishing the scope of the DT design i.e., the scope to design the twin of the system vs. the twin of the network.Often, the DT of the energy network (or a portion of it) would focus on systemto-system interactions and may require granular modeling of the protocols and the network.However, the DT of a system (e.g., a turbine in a hydropower generation facility) will require granular modeling of the system sub-components, sub-system level physics-based modeling, and other system parameters).This section discusses the two aforementioned perspectives while avoiding core technical and engineering specifications that are out of the scope of the paper.

A. Perspective-1: Cybersecurity and cyber-resiliency benefits offered by using DTs technology
Performing proactive cybersecurity studies on production systems and DER-rich grid with a combination of utilityowned and non-utility-owned DERs.Despite the limitations of the system accessibility, it is critical to understand the cybersecurity gaps, perform attack surface analysis, and analyze the overall risks to the feeder or the entire ecosystem.Creating the DT of the operating grid model including DER integration and their system control through DERMs, etc. makes it viable to perform proactive cybersecurity analysis.For instance, on such granular feeder DT models, principles from Chaos engineering can be leveraged to build NESCOR failure scenarios.These scenarios can be aggregated to test the DT.Such a study will lead to forecasting failures, performing predictive studies, identifying the needs for data and model generation for physics-based AI/ML tools and algorithms, workforce advancements through tabletop exercises, etc.Furthermore, aggressive cybersecurity vulnerability analysis methods such as penetration testing that involves active scanning are unacceptable on production physical systems.If the DT of the production network can be highly correlated to the physical systems (including mimicking the network protocols in the digital world), intrusive cybersecurity analysis such as pen testing can be performed on the DT.The results from such tests can be used to identify the security gaps in a physical network and mitigate the gaps to avoid the disruption risk to the grid.

B. Perspective-2: Impact on the digital-twin integrated physical and digital network
DT models and the platforms used to build them are susceptible to cyber attacks.These models and platforms are essentially a series of computer programs and codes at their core.Therefore, the attackers can use commonly used TTPs to compromise the models and platforms, provided they are not built with security-in-mind [27].Furthermore, the models and platforms are deployed on-premises (e.g., physical servers or virtualization such as ESXi, Vxrail, etc.) or on-cloud (e.g., AWS, Azure, GCP).This infrastructure combined with the network backbone (such as firewall and routing, internet links, etc.) is all prone to cyber-attacks.A highly matured DT expects real-time integration with the physical system, subsystems, and pertinent software/firmware.The software and firmware level integration will require using APIs that will lead to compromising the DT model and processes.In summary, there are many commonly used TTPs to compromise DTs and platforms.The consequences of a such compromise can be severely detrimental depending on how reliant a use-case owner is on the DTs.For instance, if an energy utility decides to make optimization and security decisions on their feeders based on the DT modeling, compromising the twin will lead to direct impacts on the physical network.To perform such compromises, the cyber adversaries may compromise: 1) digital representation of the network protocol models (e.g., DNP3, Modbus, ICCP, IEC 62443) that are used to accurately mimic physical interactions; 2) data pipelines and any enclaves that facilitate data/measurement flow from the physical systems to the digital models.
Finally, a DT may need high observability for high granularity.However, increasing observability could increase the attack surface.Therefore, it is crucial to optimize the observability needs and the overall attack surface.It is prudent to evaluate the value of DTs vs. observability needs: can DTs integrated with state and parameter estimator reduce the need for large sensor networks risking the increase in attack surface?Considering the potential cybersecurity benefits and challenges discussed above, the energy utility use-case owners could use existing security evaluation frameworks and standards [28], [29].According to the work of S.N.G.Gourisetti et.al. currently under review, in order to ensure the scalability of the DTs without compromising cybersecurity, reference framework and object modeling should be used to architect all levels of deployment.

V. DISCUSSIONS: OPPORTUNITIES, CHALLENGES, AND LIMITATIONS OF DIGITAL TWINS IN ENERGY SYSTEMS
DTs technologies are becoming increasingly important in the energy sector and smart cities for optimizing energy system consumption and performance, while also ensuring their reliability, sustainability, and efficiency.In the following section, we provide a concise summary of the most relevant opportunities, challenges, and limitations associated with the use of DTs in energy systems.
A. Opportunities 1) Improved Performance, Efficiency, and Reliability: DTs play a pivotal role in optimizing the performance of energy systems, leading to enhanced efficiency and cost savings.They facilitate real-time management of energy consumption and production patterns, thus minimizing energy waste and improving efficiency.Moreover, DTs offer predictive capabilities, enabling accurate forecasting of maintenance requirements, resulting in reduced downtime and maintenance costs, thereby enhancing the reliability of energy systems.
2) Sustainability and Energy Transition: DTs have the potential to optimize the environmental impact of energy systems in smart cities by enabling efficient energy generation and consumption.They play a crucial role in the rapid adoption and seamless integration of RES, leading to a reduction in carbon emissions and ensuring sustainability, in line with the United Nations' Sustainable Development Goals.DTs facilitate effective management of RES, such as solar and wind power, by predicting their energy output and performance under different operating conditions.This enables utilities to optimize the use of RES, minimizing reliance on fossil fuels, and reducing the overall carbon footprint of energy systems.In this way, DTs are a valuable tool to promote sustainable development and mitigate climate change in smart cities.
3) Advancements in AI and ML: Advancements in AI and ML have been instrumental in facilitating the development of DT use-cases in the energy sector and smart cities.With the ability to process large and heterogeneous data from sensors in real-time, AI and ML algorithms enable the DT to perform accurate monitoring and control of the system, leading to online optimization, enhanced forecasting, and improved simulation capabilities.

B. Challenges 1) Integration Issues with other technologies:
The integration of DTs with other digital technologies in the context of energy applications presents huge challenges that must be addressed.The two key challenges that emerge in this context are data interoperability and increased system complexity.These challenges arise due to the existence of diverse data formats and protocols across multiple technologies.Such diversity can also restrict the scalability of the system, thereby inhibiting the consideration of system expansion and growth.
2) Cost: DTs have the potential to offer significant benefits in the energy sector, however, their implementation poses a critical challenge due to cost considerations.The implementation of DTs requires substantial investments in hardware, software, and expertise.The cost of implementing DTs is, therefore, a crucial factor that must be taken into account.As such, it is essential to evaluate the costs of implementing DTs against their potential benefits in order to make informed decisions regarding their use in the energy sector.

C. Limitations:
1) Standardization: One key limitation related to implementing DTs in the energy sector and smart cities can be the establishment of common technical specifications and protocols to ensure interoperability and compatibility among different systems and processes.Without standardized DT components and protocols, DTs may not reach their full potential in terms of improving efficiency and optimizing the performance of energy systems.
2) Security Concern: The implementation of DTs in the energy sector raises significant concerns regarding security, as the technology's operation is susceptible to cyberattacks, data privacy violations, and physical security breaches.The security implications in the energy sector are multi-dimensional, necessitating a comprehensive approach to address these concerns.Such an approach must comprise a multi-layered framework that encompasses best cybersecurity practices, regulatory compliance with data privacy guidelines, and physical security measures.

VI. CONCLUSION AND OUTLOOK
Modern energy systems are rapidly transforming with the impact of decarbonization and digitalization trends and advancements.DTs are emerging as one of the most promising digitalization ecosystems for energy systems, accommodating other emerging technologies such as 5G, IoT, AI, Metaverse, and DLT..In this article, the use of DTs within the scope of energy systems and energy aspects of cities has been reviewed to demystify the real potential of this emerging technology.It is evident that DTs can improve the energy safety, efficiency, reliability, and cyber-physical resilience of the system.DTs integrate physical and digital systems in real-time, making energy infrastructure safer, more efficient, and simpler.
Despite the challenges and limitations of the technology, DTs present significant opportunities for optimizing the performance of energy systems and promoting sustainability in smart cities. DTs facilitate efficient energy generation and consumption, minimize energy waste, and enhance reliability.They offer predictive capabilities, enabling accurate forecasting of maintenance requirements, and reducing downtime and maintenance costs.
To expand energy research and use, it is crucial to promote DT-based systems and projects that require creativity and investment until they reach the highest levels of technology and market maturity.To maximize benefits, DTs must address security, efficiency, reliability, and sustainability.By doing so, we can ensure that DTs are a research subject and a viable solution for numerous energy sector issues in the 21st century.Overall, DT technology has the potential to efficiently support, optimize and control energy systems in smart cities, making them more sustainable and livable places.

Fig. 2 .
Fig. 2. Applications of DTs in Energy Systems and Smart Cities