AN INTEROPERABLE DIGITAL TWIN TO SIMULATE SPATIO-TEMPORAL PHOTOVOLTAIC POWER OUTPUT AND GRID CONGESTION AT NEIGHBOURHOOD AND CITY LEVELS IN LUXEMBOURG

: This paper focuses on the importance of Geographical Digital Twins to increase renewable energy production in urban areas and cities for decarbonization and reduction of climate change impacts. The study demonstrates the role of interoperable geographical digital twins based on Free and Open-Source software and geospatial software technologies in the simulation, monitoring, and management of renewable-based energy systems. We simulated the potential for building-integrated and building-attached solar photovoltaic (PV) electricity generation for the use case in cities to allow at a later stage for scale up to a nationwide level. The platform provides a tool for estimating PV power generation at high resolution across entire neighbourhoods and districts. Tools for the identification of cost-efficient PV placement or integration in buildings on roof-tops and facades were implemented to allow for interactive selection of optimal PV placement. The developed platform serves multiple beneficiaries, including municipalities, urban planners, developers, citizens, investors, and energy communities. Overall, the study highlights the advantage of an interoperable geographical urban digital twin, which provides the flexibility necessary to simulate and test scenarios for rapid, integrated urban planning for decarbonization under climate change. The platform is based on open-source, open standards and APIs, using open 3D city models, and allowing seamless integration of simulation and assessment methods and tools to provide a 3D real-world environment to assess and develop energy transition approaches.


Background
Cities are home to 72% of the population in Europe and account for 70% of the energy consumption. Being particularly vulnerable to climate change impacts, urban areas play a key role in carbon mitigation and energy transition. It is, therefore, of particular importance to increase renewable energy production for urban areas and cities.
In 2007 the European Commission presented a long-term Energy Policy proposal targeting a reduction of CO2 emissions by 20%, an increase of renewable energy to 20% of the energy mix and an increase in energy efficiency of 20%, all by 2020 (European Commission, 2008). Approved by the European Council months later, these goals have been translated into plans at different scales by member states. Hence urban planning today provides a complex set of requirements to satisfy technical, political, economic, and social constraints. The designed tools are embedding ever more sophisticated technologies and offer plentiful services. They need to respond to pioneering approaches provided by cities, address social and demographic advancements, and deal with the various constraints of sustainable development (Terrin, 2009). Furthermore, new urban projects concern many stakeholders, with varying professional backgrounds and academic training (Wagner et al., 2009).
The European Commission (EC) put forward the 'Clean Energy for All Europeans' package (European Commission, 2019) in November 2016, which was finally adopted in 2018-2019, included eight legal acts, the correct and timely implementation of which would facilitate the energy system transition and would * Corresponding author contribute towards the European vision for Europe to be the first climate-neutral continent by 2050. The EC also presented in November 2018 its 2050 Long Term Strategy (European Commission, 2020) for the decarbonisation of Europe, which presents several possible pathways to achieve a deep decarbonisation of our economy.
Cities urgently require information about their potential for renewable energy production to target ultra-sustainable policies. Luxembourg has set very ambitious goals with its Plan National Intégré Énergie Climat (PNEC) (Government of Luxembourg, 2020). It describes policies and measures to achieve ambitious national targets for reducing greenhouse gas emissions (-55%) as well as pushing renewable energy production (+25%) and energy efficiency (+40-44%) by 2030.
Public authorities often lack the expertise in integrated assessment and relevant simulation tools to support scientific evidence-based decisions about energy strategies, enhance interaction with stakeholders and accelerate energy transition. The main outputs of this study are related to the demonstration of the role of interoperable geographical digital twins based on Free and Open-Source software and geospatial software technologies in the simulation, monitoring and management of the current and near future renewable-based energy systems.

Approach and Concept
Cities face a new level of urban planning decisions requiring different data sources and modeling techniques. In recent years there have been several efforts towards integrated analysis and decision support tools in the urban environment (Arciniegas, 2013), but these do not present out of the box solutions directly applicable to different geographical planning scenarios. The aim was to have these decision support tools gathered in a single platform to be used by cities, providing both the means for planners to explore e.g., energy planning scenarios and to synthesize the results for general stakeholders. As such, iGuess ® was envisioned as an integrated geospatial software framework and requires not only decision support tools but also data used to feed them be accessible to actors across the web.
iGuess ® addresses the challenge of integrating diverse tools with different data sources, provided in non-standardized formats, into a single platform. It leverages a service-oriented approach to the web-based concept. Such design is achieved taking full advantage of the data, meta data and process web service standards issued by the Open Geospatial Consortium. The result is a lightweight, decentralized set up, combining spatial information with domain independent models and decision support tools. One of its major challenges is to offer an easy-touse and approachable interface for stakeholders to complex distributed space-time models for various fields of domains and visualize the results in interactive 3D tools. Relying exclusively on open-source software, this system intends to demonstrate that answering the needs of different stakeholders in diverse contexts is possible using open standards and open data, producing an interoperable system that is independent of technologies and methods.
The topic of the interoperable Digital Twin is aligned with some of the challenges addressed in the national PNEC. The main concern is to assess and describe the state of the grid when affected by high penetration of PV generation and additional demand from electromobility. The most stressful situations for the Luxembourg grid will occur when the greatest imbalances between generation and demand happen. These situations occur at: i) times of high-power demand and low electricity generation, which results in power import peaks, mainly from the German grid operated, and ii) times of low-power demand and high levels of renewable generation, which makes it necessary to export power to neighboring countries. According to estimations from the local energy supplier, the peak imports may reach 900MW (2025), 1200MW (2030) and 1700MW (2040), while excess generation may reach 350MW (2025), 800MW (2030) and 1500MW (2040), which are very challenging values for a system that currently has a generation capacity of 1.77 GW in 2019, growing at an average annual rate of 2.3%. It is interesting to note that the situation of excess generation will be more relevant in the coming years, when the current wind generation capacity is aimed to be multiplied by almost 3, and the solar generation capacity is aimed to be multiplied by around 6 by 2030 (147 MW@2020 to 400MW@2030 for Wind, 167MW@2020 to 984 MW@2030 for PV, according to PNEC).
The local generation of the Luxembourg system is based on cogeneration plants, small hydroelectric power plants, wind powered generators, nationwide PV installations, biogas installations and one waste incineration plant. For modelling the non-PV generation facilities, standard plant models will be used, and producers will be asked for significant data about their generation profile.
The demonstrator includes support to advanced simulation and assessment tools using high resolution building information to enable the planning of PV electricity generation from the local to the national scale. This will help to accelerate the development of sustainable energy and climate action plans (SECAPs) for all municipalities in Luxembourg and the entire nation.
The gradual increase of this local PV production and its reinjection leads to constraints on the grid. For these reasons, there is a willingness on the part of the local governments to encourage local consumption (including self-consumption) of PV-generated electricity, thus limiting the impact on the local electricity substation power grid. The inclusion of self-consumption concepts (in conjunction with energy storage) and energy communities will play a new, specific role in the PV sector. The development of electromobility for public transport and private vehicles is a clear priority as well. This is particularly in relation to the 2030 goal to have a 49% Electric Vehicle (EV). This requires additional electricity generation and to adapt support to EVs and charging infrastructure to ensure a high EV adoption rate.
The scope of the presented work is to demonstrate the role of a 3D geographical digital twin in the context of a high penetration and optimised installation of PV and the impact of its power generation on the grid. Free and Open-Source software technologies build the basis of a web platform which implements a geographical digital twin based on open data and OGC standards to build a fully interoperable Digital Twin. This allows the integration of open 3D CityGML data with simulation algorithms of renewable potentials and the energy grid system all into one technical interoperable architecture.
The objective of this study is to simulate the potential for building integrated and building attached solar photovoltaic (PV) electricity generation in cities, and later to scale up the results to a nationwide level. The taken approach involves several key steps: 1. Estimation of electricity consumption of the building stock at local level, to understand the demand for electricity and the potential for PV generation. 2. Simulation of the electricity generation potential of building-integrated and building-attached PV systems, considering factors such as rooftop and facade orientation and shading effects. 3. Development and analysis of scenarios for different PV technologies, including consideration of techno-economic parameters such as feed-in-tariffs, lifetime of installation, efficiency, and power consumption. 4. Selection of optimal locations for PV placement across the city, based on a combination of rooftop and facade suitability, electricity demand, and electricity grid nodes. 5. Implement all steps into an interoperable web-based decision support platform providing advanced simulation and assessment tools using high resolution open building information.

Open Data in Luxembourg
The Open Data Portal (data.public.lu) in Luxembourg is an online platform that provides access to various types of data and information related to the Grand Duchy of Luxembourg. It offers a vast array of open data sets to its users and is a central platform that provides access to data on various topics such as economy, transport, environment, public services, and demographics.
Amongst the data sets there is also a nation-wide 3D city model. It is a highly detailed, digital representation of the countries urban and built environment. The 3D buildings correspond to LOD (Level of Detail) 2.2 classification and are grouped in a compressed file (zip) per municipality, including the building textures in JPEG and a CityGML file composed of the objects "building", "roof(s)", "wall(s)" and "ground surface". The structure of CityGML complies with spatio-semantically coherent objects which ensures that the geometry and semantics of the objects within a city model align properly (Stadler and Kolbe, 2007). This means that the geometric representations, such as buildings, roads, and vegetation, accurately reflect their real-world counterparts. Additionally, the semantic information associated with these objects, such as their function, usage, or attributes, is well defined and consistent throughout the model (Figure 1).
Achieving spatio-semantically coherent CityGML objects involves various considerations. It requires accurate positioning of objects in geographic space, ensuring that their coordinates align with real-world locations. The geometric shapes and boundaries of the objects should also match their physical counterparts as closely as possible. By maintaining spatiosemantically coherent CityGML objects, urban planners, architects, and researchers can effectively analyse and simulate urban environments, perform spatial queries, and exchange data between different systems or applications. It enhances interoperability and facilitates the integration of urban data sources for a comprehensive understanding and management of cities.
The 3D city model is available in CityGML format and released under Creative Commons Zero (CC0) license (Administration du cadastre et de la topographie, 2022). The 3D buildings were realized based on high-resolution LiDAR scanning technology and aerial photographs taken in summer 2020 (flight period: late July, early August and mid-September 2020; flight height: +/-3500m above ground) by photogrammetric restitution of the roofs (RMSE for x, y, z ≤ 3.9 cm), followed by downward extrusion and texturing of the resulting 3D models with the oblique image shots. Only roofs of buildings with a footprint larger than 20m 2 were captured, considering superstructures (e.g., dormers) with the longest side exceeding 50cm and with a volumetry greater than 1m 3 (Figure 2).
The model is designed to be used with a variety of software tools and applications, making it a versatile resource for a wide range of users. It is made available for free to everyone, allowing to explore and visualize the countries urban fabric covering an area of approximately 2500 square kilometres.
The benefits of the 3D city model are numerous. It can be used for urban planning and development, environmental analysis, disaster management, and tourism promotion. For example, urban planners can use the model to test different scenarios for development and evaluate their impact on the urban fabric.

RESULTS
Geospatial software technologies and 3D and 4D algorithms are building the core of the platform (based on iGuess®) to enable the planning of PV electricity generation from the local to the national scale.

PV algorithms
We developed an approach to assess global solar irradiation for each roof-top and façade at a very high resolution, taking into account 3D shading effects of the surroundings in the urban environment. The processing is based on a city model in the former described CityGML format using the 3DCityDB database and the spatial processing functionalities of PostGIS. A set of Python scripts was developed as a central control instance managing parallel processing of queries against the database to achieve scalability and improved performance. Each element of roof and façade can be analysed individually, having a regular grid of 3D hyper-points (1-meter spacing). The overall result is a city-wide PV suitability and economic potential map of every building surface for roof-tops and façades. The case study with approximately 12000 single roof and façade elements and about 4 million hyper-points points is computed efficiently due to parallel and distributed execution on several database clusters. The chosen approach is highly scalable, robust and can be easily adapted to other regions in the world. It is described in detail for façade elements in (Braun, 2019) and got extended recently for roof structures, overall performance, and computational efficiency.  Scenarios for different PV technologies, feed-in tariffs and cost efficiencies and amounts of PV installations are computed to demonstrate impacts of spatio-temporal varying PV electricity yields. This simulates the large increase of PV installations required to accelerate the development of sustainable energy and climate action plans (SECAPs) for all municipalities in Luxembourg and the entire nation.

Technical architecture
Geospatial software technologies, open APIs and standards as well as geospatial algorithms are building the core of the Digital Twin platform (based on LIST's iGuess ® software framework) to enable the planning of PV electricity generation from the local to the national scale. This can support the acceleration of the development of Sustainable Energy and Climate Action plans (SECAPs) for all municipalities in Luxembourg and the entire nation. Businesses and investors can be stimulated to invest into new energy services and energy technologies to harvest the full potential of renewable solar energy electricity potentials. Figure 3 shows the conceptual architecture of the Digital Twin based on iGuess ® which requires the coordination of several distributed resources, each dedicated to a specific function. They are: (i) a database management system, (ii) a web map server, (iii) a web page server and (iv) a web processing server.
In Figure 4 the top layer shows the iGuess ® frontend, typically seen by the user. The middle layer shows the iGuess ® backend managing all connections and the platform database. Data and processing services (internal and external) can be integrated through the different OGC standards (WMS, WPS, …) as interoperable web services. The bottom layer shows the different data sources iGuess® can connect to. At the same time, iGuess® can also serve results as web services, allowing true interoperability and exchange of input, output, and result data.
The cornerstone of the infrastructure supporting iGuess ® is the database management system (DBMS). It hosts the iGuess ® database where all datasets and corresponding metadata are stored. The metadata not only describes the datasets but also the processing modules and their associated configurations. PostgreSQL was chosen as DBMS, in combination with its geospatial extension PostGIS. The database also serves PyCSW, the CSW server selected to support iGuess®.
The map server provides spatial data over the world wide web (WWW) using the OGC standards previously mentioned: WMS, WFS and WCS. All spatial datasets generated from module configurations run from iGuess® are stored in this server and provided through MapServer in compliance to these OGC standards. The iGuess ® front end relies on a popular rapid application development framework, AngularJs. AngularJs facilitated access to a range of modern HTML 5 interface tools. Web mapping has been leveraged on dedicated libraries: OpenLayers for the client-side interaction with WMS, WCS and WFS, plus Cesium for 3D visualisation and WebGIS usage. The web interface functions as a remote client to the Javascript based backend in node.js and its registered services in iGuess ® . From their web browsers, users can create maps combining data provided by remote servers with the datasets produced by the various processing modules.
Modules developed ad hoc for the various applications powered by iGuess ® rely on PyWPS, an open source WPS implementation based on the Python programming language. The option for this versatile scripting language facilitated the development of modules by less experienced programmers. Various external third-party components are being used by these modules, such as R or GRASS GIS for space-time statistical analysis, PROJ for geo-spatial data reprojection, and GDAL/OGR for data format conversion. PyWPS facilitates the interoperability with all these libraries.
iGuess ® was conceived with the intent of providing a common approach to urban energy planning. It had to consider the existence of input data from multiple sources under the control of different institutions. Beyond data, the system also had to contemplate different processing sources, providing geo-spatial analysis algorithms relevant in the urban context. Regarding these requirements, iGuess ® was developed as a web-based spatial decision support system, relying on a distributed, serviceoriented architecture. Under this paradigm, the system provides a web-based interface to a series of distributed data and processing services. This architecture was achieved through the systematic adoption of open standards that focus on integration and interoperability, making the system independent of methods or technologies. iGuess ® was implemented fully on open-source technologies supporting the chosen OGC standards. Beyond creating urban planning scenarios, iGuess ® also provides a set of  functionalities to explore their results. Starting with spatial potentials, iGuess ® provides modelling tools to assess the impacts of mitigation actions in space, subject to objectives and constraints. iGuess® thus offers an integrated interface and approach to the urban energy planning process: data collection, data processing, modelling, decision assessment and presentation of results. iGuess ® is a modular framework independent from the underlying models it accesses. Since it was developed in a distributed context, and is based on open standards, it is relatively easy to extend to further geographic spaces, scales or domains. While iGuess ® was built with simulation models related to urban energy, other models can be seamlessly added to the system using the WPS standard. The application of the system to other domains such as logistics, ecosystem or hydrological catchment monitoring was successfully applied already.
The developed platform serves multiple beneficiaries, e.g., municipalities, urban planners, developers, investors etc. to support 3D based realistic urban energy and city planning. Citizens and energy communities can use the platform and tools to shape their city and get access to high resolution information. This platform provides a tool for estimating long-as well as short-and mid-term PV power generation at high resolution across entire neighbourhoods and districts generating time-series data.

User interface
Furthermore, we implemented tools for the identification of costefficient PV placement and integration in buildings on roof-tops and facades to test the different scenarios and allow for interactive selection for optimal PV placement identification across the study area.
iGuess ® 3D visualisation tool is based on the use of CesiumJS, an opensource JavaScript library for displaying 3D maps. It uses the OGC standard 3D Tiles (3D Tiles) for tiling and exchanging 3D data and improving the overall performance of web application displaying 3D maps. This standard was designed for streaming and rendering massive 3D geospatial content such as Photogrammetry, 3D Buildings, BIM/CAD, Instanced Features, and Point Clouds. It defines a hierarchical data structure and a set of tile formats to render content.
For this project, we used a commercial tool to convert the CityGML model of Luxembourg into Cesium 3D Tiles. Future implementations will make use of tools based on open-source software. The 3D Tile standard improved the loading and visualisation performances drastically, compared to previous solutions based on the usage of KML/COLLADA Tiles, a format used by 3DCityDB Web Map Client, an opensource 3D viewer developed for displaying data from 3D City DB and based on a Cesium viewer using Web workers for increasing the loading and display performances.
The other advantage of using Cesium 3D Tiles is the possibility to include metadata and to perform live styling of elements composing a tile. This allows linking, styling and storage of 3D element metadata. In the case of solar PV production, we used this feature to add an HTML slider to dynamically change the colour of building surfaces (roof-tops and facades) depending on the slider value. For example, we used it to colorize building surfaces which had a yearly PV production above a selected threshold of the HTML slider. Figure 5 shows results of the solar irradiation computations at 1m spatial and 15min temporal resolution over an entire year under real-sky conditions including shading effects for each roof-top and façade surface of the entire building stock of a quarter in Esch-sur-Alzette. A slider tool (top left provides an interactive dynamic selection of most potential PV locations, ranked according to cost-efficiency. We also used a different type of HTML slider for simulating the installation of solar PV panel patches on building surfaces (roof and facade use different sliders). The user can directly select the number of patches to install, or the amount of money invested that is converted into several solar PV patches. The tool will automatically identify the most suitable building surfaces and show the installed PV panels coloured, based on the potential PV production as hourly, daily, or yearly values, shown in Figure 6.
We chose this type of selection to display potential solar PV production as daily charts, we could also use it to forecast or simulate future potential solar PV installation, compute their average hourly production, and then perform simulations to evaluate the impact on the power grid, e.g., to see if the current infrastructure is able to support the load and detect weak points.

CONCLUSIONS
This paper presents the importance and role of interoperable geographical digital twins as core platform for the current energy transition and decarbonization from fossil fuels to renewable  energy sources. The advantage of an interoperable geographical digital twin, as proposed here, provides the flexibility, necessary to simulate and test scenarios for rapid decarbonization, integrated into urban planning under climate change. Based on open-source, open standards and APIs, open data, simulation and assessment methods and tools can be seamlessly integrated to provide a 3D real-world environment to assess and develop energy transition approaches. Future impacts of PV-generated electricity on the power grid can be assessed, stimulating flexibility approaches for supply and demand and optimise for storage, self-consumption, and feed-in.
Stakeholders can act and be stimulated to enable a faster transition to renewable energy and harvest the full potential of improved urban planning, based on geographical Digital Twin technologies. Additionally, different services can be developed on top of such Digital Twin technologies to get a holistic view about progress and interaction and sustainability of measures in urban planning. Overall, this will serve a variety of stakeholders, such as citizens, municipalities, investors, energy communities, energy service providers, grid operators and other businesses.