scieee AI-readable full text Open interactive document viewer

Simulation as a Service in Data Spaces: A Digital Twin-based Approach

Luigi Coppolino; Petruolo, Alfredo; Parreño, Adelaida; Sánchez Valverde, Juan; Skarmeta Gómez, Antonio

Abstract

The integration of Digital Twins with Data Spaces represents a significant opportunity for developing new value-added services across various domains. While both technologies are well-established individually, a comprehensive analysis of their integration potential and practical implementation guidelines remains necessary to unlock innovative service deployment scenarios. This paper addresses this gap by providing a thorough examination of available technologies, comparing Digital Twin frameworks and Data Space connectors, alongside detailed implementation guidance for service deployment. Technical specifications for connector implementation, data standardization, and policy enforcement are thoroughly detailed, offering valuable insights for industry practitioners. Through this analysis, we demonstrate how to leverage these technologies to enable real-time grid simulation as a service—a capability not yet available in current Data Space ecosystems. Our approach, built on the FIWARE platform, ensures interoperability through standardized data models and common vocabularies, providing a blueprint for practitioners to expose simulation services within Data Spaces. The framework’s effectiveness was validated in the energy domain, using the real-world infrastructure of the University of Murcia campus (Spain), where we successfully conducted Energy Demand Response assessment without compromising grid operations. This implementation, combined with our comprehensive technical guidelines and practical insights, establishes a clear pathway for operators to deploy simulation services within Data Spaces, fostering innovation across different infrastructure management scenarios.

Full text

Vol.:(0123456789) Data Science and Engineering https://doi.org/10.1007/s41019-025-00305-x RESEARCH PAPERS Simulation asaService inData Spaces: ADigital Twin‑based Approach LuigiCoppolino1· AdelaidaParreño‑Rodríguez2 · AlfredoPetruolo1· JuanSánchez‑Valverde2· AntonioF.Skarmeta‑Gómez2 Received: 30 December 2024 / Revised: 15 June 2025 / Accepted: 23 June 2025 © The Author(s) 2025 Abstract The integration of Digital Twins with Data Spaces represents a significant opportunity for developing new value-added services across various domains. While both technologies are well-established individually, a comprehensive analysis of their integration potential and practical implementation guidelines remains necessary to unlock innovative service deployment scenarios. This paper addresses this gap by providing a thorough examination of available technologies, comparing Digital Twin frameworks and Data Space connectors, alongside detailed implementation guidance for service deployment. Technical specifications for connector implementation, data standardization, and policy enforcement are thoroughly detailed, offering valuable insights for industry practitioners. Through this analysis, we demonstrate how to leverage these technologies to enable real-time grid simulation as a service—a capability not yet available in current Data Space ecosystems. Our approach, built on the FIWARE platform, ensures interoperability through standardized data models and common vocabularies, providing a blueprint for practitioners to expose simulation services within Data Spaces. The framework’s effectiveness was validated in the energy domain, using the real-world infrastructure of the University of Murcia campus (Spain), where we successfully conducted Energy Demand Response assessment without compromising grid operations. This implementation, combined with our comprehensive technical guidelines and practical insights, establishes a clear pathway for operators to deploy simulation services within Data Spaces, fostering innovation across different infrastructure management scenarios. Keywords Digital twin· Data spaces· Simulation· Demand response· Smart grid 1 Rationale andMotivation Data has become a critical asset in modern systems, driving innovation and transformation across industries. The integration of Digital Twins with Data Spaces builds on this foundation, enabling the creation of advanced services and applications. Exploring how these technologies complement each other can uncover new pathways for value generation and catalyze a technological revolution. This revolution involves the creation of new platforms that utilize data from a wide range of devices in the field. One of the technological solutions most involved in this revolution is thedigital twin [1, 2]. Digital twins offer virtual replicas of the devices in the field, enabling the creation of new services that can benefit various stakeholders [3]. This data-centric system underlies the creation of new data ecosystems—Data Spaces—which represent a generalized, regulated, and policy-based sharing point [4]. Institutions at various levels are preparing for this revolution by laying the foundations for a data market at multiple levels. While Data Spaces offer a novel vision for a unified and trusted data ecosystem, it is important to acknowledge that this is not the first attempt to facilitate widespread data sharing. Historically, and indeed contemporaneously, various alternative strategies have been employed, each with inherent limitations. Open Data Platforms and Government * Adelaida Parreño-Rodríguez adelaida.par[email protected] Luigi Coppolino [email protected] Alfredo Petruolo [email protected]thenope.it Juan Sánchez-Valverde [email protected] Antonio F. Skarmeta-Gómez skar[email protected] 1 Università degli Studi di Napoli Parthenope, Naples, Italy 2 Universidad de Murcia, 30100Murcia, Spain L.Coppolino et al. Portals, such as The official portal for European data,1 have been instrumental in making public sector information accessible for reuse. While vital for transparency and fostering innovation based on public data, their scope is typically limited to open data, rather than the controlled and regulated sharing of private or sensitive data that is central to Data Spaces. The implicit assumption of universal accessibility often does not align with the need for data sovereignty and fine-grained access control required in many commercial or sensitive contexts. Furthermore, sector-specific initiatives and data consortia have emerged to address particular industry needs. In the healthcare sector, for instance, initiatives like OpenNCP [5] (Open National Contact Point) have aimed to facilitate cross-border exchange of patient health data. While these efforts are valuable for targeted data sharing within defined domains, they often operate in isolated silos, lacking the cross-sectoral interoperability and generalized governance frameworks envisioned by Data Spaces. This inherent fragmentation and the limitations of previous approaches are particularly evident in critical sectors such as energy. While the energy sector has seen the emergence of smart platforms and the development of digital twins to support grid management and renewable integration [6], the underlying data exchange often remains reliant on traditional, bilateral agreements. The current delivery model for services, even those leveraging advanced simulations, primarily depends on point-to-point connections, which stifles the broader collaborative potential. This is where the data-centric vision of Data Spaces offers a significant leap forward [7]. Leveraging Data Spaces to offer services represents a significant step forward in generating added value. In particular, Simulation as a Service (SMaaS) could greatly benefit from being delivered through Data Spaces [8]. This approach would enable the sharing of simulation results with other stakeholders in the same sector, fostering a virtuous cycle of collaboration and mutual benefit. Despite this advantage, the integration of SMaaS through spaces remains unrealised, especially in the energy sector. By leveraging the Data Space-Based SMaaS Paradigm, energy operators, researchers, and other stakeholders could experiment with different configurations, analyze potential impacts, and optimize their systems and processes. Acknowledging this gap, in this paper, we have developed a solution that seamlessly integrates digital twins with simulation services using a Data Space-compliant approach. The core contributions of our work are as follows: • It provides a guideline for DS-Based service implementation The paper presents a selection of enabling technologies, with a focus on two primary areas: digital twin solutions that integrate data semantics to enable precise and effective modeling, and an evaluation of existing Data Space connectors to ensure optimal integration. Moreover, the implementation of the proposed framework for simulation is detailed, highlighting critical factors such as interoperability and standardization to achieve full Data Space compliance. • It discusses how to enable simulation as a data space service This paper defines the requirements for implementing simulation as a service within a Data Space ecosystem. It explores the methodological considerations essential for designing and delivering such services, emphasizing key aspects such as value, accessibility (ensuring seamless access to both data and services), and scalability. Furthermore, a reference architecture is presented to guide the development of Data Space-compliant services that fully exploit digital twins’ capabilities. • It reports a real-world use case We tested our approach using the smart platform provided by the University of Murcia, leveraging real-world data to develop demand response (DR) strategy assessment services. Understanding DR strategy as the plan to balance energy demand and supply by modifying the energy consumption, triggered by different situations like grid stress, peak demand or low renewable energy generation. This demonstration highlights the practical applicability and effectiveness of the solution in supporting decision-making and optimizing energy management strategies. Additionally, we analyzed a scenario where sharing simulation results among stakeholders within the Data Space creates added value, enabling more informed, sector-wide, strategies. The remainder of the paper is organized as follows: Sect.2 presents the background necessary to understand digital twins and Data Space technology. Section3 provides a description of the proposed architecture that enables our solution, with its requirements outlined in Sect.4 and its implementation detailed in Sect.5. In Sect.6, we validate our approach and evaluate the results. Finally, a review of existing work aligned with our vision is provided in Sect.7, and conclusions are presented in Sect.8. 2 Digital Twin andData Spaces To effectively harness the transformative potential of data in the energy sector, it is crucial to examine the foundational technologies that enable advanced data utilisation. This section introduces Digital Twins and Data Spaces, exploring how they contribute to real-time system representation and secure, interoperable data sharing, respectively. 1 https://data.europa.eu/en. Simulation asaService inData Spaces: ADigital Twin-based Approach 2.1 Digital Twin The term “Digital Twin” refers to a concept that has gained importance across many sectors that need a digital representation of physical assets, processes, tasks, or systems. Despite its widespread use, the term “Digital Twin” has been defined in different ways depending on the specific use case, and there is no single widely accepted definition. To address this, various organizations have worked to create a common understanding. For example, the Industrial Internet Consortium defines a Digital Twin as “a formal digital representation of some asset, process, or system that captures attributes and behaviors suitable for communication, storage, interpretation, or processing within a certain context” [9]. This definition focuses on using digital twins to collect and process data, providing value through analysis and interpretation. The Digital Twin Consortium offers another definition: “a virtual representation of real-world entities and processes, synchronized at a specified frequency and fidelity” [10], emphasizing real-time synchronization and data accuracy. The concept of Digital Twin has evolved from a simple virtual model of a physical product to a multi-scale simulation that reflects a system’s real-time status using historical and sensor data. Today, it is considered an integrated digital representation that can simulate behavior, perform complex analysis, and update continuously throughout its lifecycle. A Digital Twin offers capabilities for monitoring, predicting, and optimizing processes [11–15]. These can be classified into five types: Descriptive, providing current and historical data; Predictive, forecasting future states; Prospective, simulating hypothetical scenarios; Prescriptive, recommending or automating actions; and Diagnostic, identifying issues or deviations in performance. These capabilities, also shown in Fig.1, allow the Digital Twin not only to monitor the current state of an asset but also to anticipate issues, optimize processes, and support decision-making decision-making [16]. Considering the capabilities surrounding the DT considered in this work, important technical considerations must be taken into account for its implementation. From a descriptive standpoint, a DT constitutes a structured digital representation of physical or logical entities, modeled as objects with defined attributes, relationships and observable behaviors. This digital abstraction requires a coherent data model capable of semantically representing both static properties (e.g. geometry, technical characteristics, etc.) and dynamic states (e.g. temperature, humidity, energy consumption) in a bidirectional manner. Interaction with these entities is usually facilitated through standardized interfaces - such as RESTful APIs or GraphQL. One of the main challenges in this phase is the integration and harmonisation of heterogeneous data sources, such as SCADA systems, IoT sensor networks and BIM models. This process goes beyond format unification and requires resolution of semantic inconsistencies, temporal mismatches, and discrepancies in data granularity. In its predictive and prospective dimensions, the DT integrates analytical and simulation models designed to forecast system behavior and explore hypothetical scenarios. These models encompass physical simulations (e.g., thermodynamic or electrical systems), statistical methods, and artificial intelligence techniques that operate based on the contextual state of the twin. This level introduces significant technical challenges, notably the standardization of model representations, the interoperability of diverse simulation engines, and the temporal synchronization of model outputs with real-time data streams. At the prescriptive and diagnostic level, digital twins enable the automation of operational decision-making processes through the application of control rules or logic engines. These systems may directly actuate physical processes via bidirectional data exchanges. Moreover, features such as contextual visualization, real-time alerting, and recommendation engines play a pivotal role in supporting human decision-making. This work addresses the key technical challenges of integrating simulation models within digital twins, including the standardization of information models, interoperability between simulation engines, and temporal synchronization with real-time data streams. 2.1.1 Existing Digital Twins Frameworks A variety of digital twin frameworks are available, each offering distinct technical features that support the development of complex, intelligent platforms. These frameworks differ in key aspects such as open-source availability, API standardization, data modeling methodologies, and resource Fig. 1 High-level architecture of a Digital Twin L.Coppolino et al. support. Table1 presents a comparative analysis of several notable digital twin frameworks. While many frameworks provide advanced capabilities for implementation, only a few align with the technical and operational requirements of Data Spaces. For our solution, the evaluation criteria prioritized open-source availability and robust support for standardized data modeling. Based on these factors, FIWARE and Eclipse Ditto were identified as the most technically suitable candidates. FIWARE was ultimately selected due to its support for a shared vocabulary, which is essential in a multi-stakeholder environment. The NGSI-LD API standardization enables uniform access to data, fostering interoperability. Furthermore, the availability of Smart Data Models allows the development of interconnected solutions that are critical for creating value-added services within a Data Space ecosystem. This combination of standardized access and extensible modeling ensures that FIWARE is well-suited for deployment in a data-centric, collaborative environment. Lastly, FIWARE provides full compatibility with an existing and ready-to-use Data Space connector. This compatibility significantly simplifies the integration process within Data Spaces by enabling seamless communication and data exchange between stakeholders. The availability of this connector further strengthens the framework’s suitability for our solution, as it ensures compliance with Data Space principles and accelerates the deployment of interconnected services. The details and functionalities of this Data Space connector will be examined in the following paragraph. 2.2 Data Spaces A Data Space is an open ecosystem designed to facilitate data sharing and accessibility among diverse entities. The shift towards Data Spaces is governed by principles of transparency and trust. Traditional data exchange methods often face significant challenges, such as establishing legal frameworks for collaboration and ensuring data governance. Data Spaces address these issues by providing a trusted environment where stakeholders can share data with full control over its usage, thus ensuring data sovereignty. Creating an effective Data Space requires developing an ecosystem where each participant is recognised, has specific roles, and is authorised for data-related activities. To introduce the Data Space requirements, we refer to Fig.2, which represents the reference ecosystem proposed by GAIA-X [27]. To effectively build this secure and trusted ecosystem, various roles and participants need to be identified within two layers: the data layer and the infrastructure layer. Starting with the infrastructure layer, each operational node in the Data Space must be recognised and certified. This process is critical for ensuring data sovereignty. Each node must communicate its locations and type of operating machines to the federator, along with the applied security standards. This communication helps define the virtual boundaries within which data is shared in this ecosystem. The data layer forms the core of the Data Space approach. In this layer, services and data are exposed, allowing participants to utilise them on a pay-as-you-go basis. The primary roles within this layer include providers, who offer services or data to the ecosystem, ensuring the availability and quality of their offerings; consumers, who utilise the services or data provided by others within the Data Space, accessing resources based on their specific needs; hybrid participants, who act as both providers and consumers, contributing data or services while also using others’ offerings; and the federator, the central authority that oversees the certification and coordination of all participants, ensuring compliance with security standards and managing the overall integrity of the Data Space. 2.2.1 Available Data Space Connectors A Data Space connector is a key component in the architecture of a Data Space ecosystem, acting as an intermediary to facilitate secure, interoperable, and policy-driven data sharing among participants. Its fundamental role is to enable seamless integration and communication between data providers and consumers while ensuring data sovereignty and compliance with predefined usage agreements. One of the core functions of a Data Space connector is its ability to act as a policy-based access point. This capability allows it to enforce various data sharing and data sovereignty policies tailored to specific needs. For example, a policy might restrict data access to particular participants during a predefined time interval or limit the number of times a dataset can be accessed, ensuring that Table 1 Comparison of Selected Digital Twin Frameworks: (P) Proprietary, (C) Custom, (DTDL) Digital Twins Definition Language, (SDM) Smart Data Models Framework Open source API Data modeling References FIWARE Yes NGSI-LD SDM [17, 18] Eclipse Ditto Yes P P/C [19, 20] AWS IoT TwinMaker No P P [21, 22] Azure Digital Twins No P DTDL [23, 24] Bosch IoT Things Yes P P [25, 26] Simulation asaService inData Spaces: ADigital Twin-based Approach the provider retains control over its data. Additionally, policies can specify that data must only be processed within a particular geographical region or by systems certified under specific standards, further guaranteeing data sovereignty. These mechanisms ensure that data usage adheres to agreed-upon rules while fostering trust and compliance in Data Spaces. The pace of developing Data Space connectors has accelerated significantly in recent years. Various organizations and companies are investing in creating connectors tailored to specific domain applications. This trend reflects the growing demand for domain-specific solutions that address unique requirements while leveraging standard Data Space principles. Table2 provides a comparative overview of several prominent Data Space connectors, highlighting their open-source availability, deployment options, supported vocabularies, and additional resources. 3 An Architectural view ofDT‑based Service Provisioning inData Spaces Realizing DT-based simulation as a service requires a robust integration of Digital Twins and Data Spaces. For this reason, we proposed a multi-layered architecture illustrated in Fig.3, explaining how the synergy between these paradigms can generate new value-added services. We will explore the roles of each layer, the axes of Value, Accessibility, and Scalability, and discuss the implications of developing solutions at various points within this architecture. Fig. 2 GAIA-X Ecosystem Visualization [27] Table 2 Comparison of Selected Data Space Connectors Connector Open source Deployment options Vocabulary References Advaneo Open-Source EDC Connector Yes On-premises, Cloud / [28] FIWARE Data Space Connector Yes On-premises, Cloud Smart Data Models [29] Eclipse Data Space Components (EDC) Yes Customizable environments / [30] EONA-X EDC Connector Yes On-premises, Cloud / [31] EGI DataHub Connector Yes On-premises, Cloud Self-developed [32] L.Coppolino et al. The architecture comprises four primary layers: the Field Layer, the Digital Twin Layer, the Application Layer, and the Data Space Layer. Each layer interacts with the others, and progression through the layers is influenced by three key axes: Value, Accessibility, and Scalability. The Value Axis The Value Axis represents the enhancement of services and capabilities as we move through the layers. In the Field Layer, value increases from utilizing a Single Source (SS) to Multiple Sources (MS), and further to Contextual Multiple Sources (CMS). The incorporation of CMS adds significant value by enabling the extraction of richer, context-aware information that isolated sources cannot provide. In the Digital Twin Layer, progression occurs from a basic Digital Model (DM) to a Digital Shadow (DS), then to a full-fledged Digital Twin (DT), and ultimately to a Digital Twin Predictive (DTP). Each stage signifies an increase in complexity and capability, allowing for more sophisticated simulations and analyzes. The Application Layer encompasses services ranging from simple visualization to advanced prediction capabilities, with the latter requiring more complex underlying technologies and offering greater value to end-users. The Data Space Layer evolves from simple data sharing to enabling advanced services, fostering collaboration across sectors within a data ecosystem. The Accesibility Axis The Accessibility Axis highlights the importance of standardization at various interfaces to enhance accessibility. Between the Field Layer and the Digital Twin Layer, data standardization is crucial. Standardizing and enriching field data ensures interoperability and lays the groundwork for maximum data accessibility. Between the Digital Twin Layer and the Application Layer, API standardization is essential. Standardized APIs provide developers with formalized and direct access to resources, enhancing overall accessibility and enabling seamless application integration. Between the Application Layer and the Data Space Layer, aconnector specification is necessary. This defines standard methods for accessing data and services within a Data Space, further improving accessibility and opening the system to a broader ecosystem. The Scalability Axis The Scalability Axis refers to the system’s ability to handle increasing amounts of work or to accommodate growth. Scalability increases as we incorporate standardization at each interface. Standardization reduces complexity and duplication of effort, allowing solutions to be more easily scaled across different contexts and domains. At the Field Layer, standardizing data collection methods enhances the ability to integrate additional data sources with minimal effort. At the Digital Twin Layer, scalable architectures allow for the expansion of simulation capabilities without overhauling existing systems. At the Application and Data Space Layers, adherence to standardized APIs and connector specifications enables the solution to scale across sectors and geographies, integrating with other systems and services. 3.1 Architectural Positioning Trade‑off Analysis Developing a solution within this architecture involves selecting the appropriate layers and positions along the Value, Accessibility, and Scalability axes. Our solution is positioned at the point of maximum integration between digital twins and Data Spaces–the DT-DS Max Integration point (represented by the red circle in Fig.3). This position signifies the highest levels of value, accessibility, and scalability. 3.1.1 DT‑DS Max Integration Point Requirements Developing solutions at the DT-DS Max Integration point requires significant effort in several areas. Firstly, data standardization is essential to ensure all data sources conform to common standards, which may involve transforming or enriching data from legacy systems. Secondly, advanced digital twin development is necessary, building Fig. 3 Multi-Layer Architecture Integrating Digital Twins and Data Spaces Simulation asaService inData Spaces: ADigital Twin-based Approach sophisticated digital twins with predictive capabilities that demand expertise in modeling, simulation, and analytics. Thirdly, API and connector standardization is required, developing and adhering to standardized APIs and connectors to facilitate interoperability, which requires careful planning and implementation. Finally, compliance with Data Space policies is crucial, ensuring the solution meets all Data Space requirements for security, interoperability, and data sovereignty, involving legal, technical, and organizational considerations. Integration approaches vary based on the level of implementation, balancing ease of deployment with the potential for value creation. Lower layers, like the Field and Digital Twin Layers, are simpler and faster to deploy, ideal for small to medium-sized enterprises but limited in scalability, accessibility, and cross-sector collaboration. Intermediate layers, such as the Application Layer with standardized APIs, improve interoperability and enable predictive applications but require more effort and have moderate scalability. At the highest level, Data Space integration maximizes value through advanced capabilities, broad accessibility, and cross-sector innovation, but demands higher investment, complexity, and robust governance. In Table3 there is a summary of the requirements and integration approaches for the DT-DS Max Integration point. 4 Building Blocks forDS‑Integrated Digital Twin Services To deliver a service within a dataspace that fully exploits the digital twin paradigm, it is necessary to implement core components that guarantee security, interoperability, and reliability. This can be achieved by leveraging established technologies that address each requirement, summarised in Table4. First, secure access to the dataspace by configuring robust Identity and Access Management (IAM) systems, such as Keycloak or OpenID Connect, to manage user authentication, authorisation, and role-based permissions effectively. For data exchange, adopt semantic standards like JSON-LD or W3C Web Ontology Language (OWL) to harmonise data formats and ensure consistent interpretation across diverse systems. These standards are essential for achieving interoperability within the dataspace. To maintain data sovereignty and enforce usage control, define explicit usage policies and deploy automated enforcement solutions. Technologies such as Open Policy Agent (OPA) or IDS-compatible Policy Enforcement Points (PEPs) allow fine-grained policy management, ensuring compliance with access and usage rules. For data handling, implement secure storage and scalable processing solutions. Tools such as MinIO for object storage, or distributed frameworks like Apache Hadoop Table 3 DT-DS Max Integration Point: Requirements and Integration Approaches Category Requirement areas Implementation aspects Value-effort characteristics Data standardization Unified formats, Semantic models Schema mapping, ETL processes Foundational enabler, High ROI Digital twin development Predictive capabilities, Real-time sync AI/ML models, Sensor fusion Core value generator, Expertiseintensive API standardization Interface consistency, Documentation OpenAPI specs, Service architectures Interoperability enabler, Moderate effort Field & DT layers Data acquisition, Basic representation Edge computing, Sensor networks Quick insights, Limited ecosystem value Application layer Service orchestration, Domain analytics Microservices, Vertical algorithms Direct business value, Moderate complexity Data space integration Federated exchange, Cross-domain protocols Connectors, Policy engines Maximum ecosystem value, Highest complexity Table 4 Core Components for Dataspace-Integrated Digital Twin Services Component Requirement Technologies Functions IAM Security Keycloak, OpenID Connect Authentication, authorisation Data exchange Interoperability JSON-LD, OWL Format harmonisation Usage control Data Sovereignty OPA, PEPs Policy enforcement Data processing Scalability MinIO, Hadoop, Spark Storage, computation Observability Reliability Prometheus, Grafana Monitoring, logging Communication Data Protection TLS/SSL Secure transmission Traceability Trust Digital signatures, blockchain Data provenance L.Coppolino et al. and Apache Spark enable efficient storage and computation of large datasets while preserving confidentiality and integrity through encryption and access controls. Observability is critical for ensuring system reliability. Deploy monitoring, logging, and auditing solutions, such as Prometheus for collecting system metrics, Grafana for visualization, and Elasticsearch for centralized logging and traceability. These tools provide real-time insights, enabling performance analysis and issue detection. To protect data transmission, usesecure communication channels that utilize TLS/SSL protocols, ensuring confidentiality and integrity. Additionally, validate data origin and traceability with cryptographic techniques like digital signatures and hashing, or use blockchain-based registries to establish tamper-proof and verifiable records of exchanged data. Among the various options available, we selected the FIWARE Data Space Connector due to its compatibility with our solution’s development requirements and its seamless integration with the smart platform provided by the FIWARE ecosystem. A key feature of this connector is its robust policy enforcement mechanism, which relies on Policy Enforcement Points (PEP), Policy Administration Points (PAP), and Policy Decision Points (PDP) to manage and enforce access control policies effectively. This ensures secure and adaptable interactions within the Data Space while supporting flexible integration with various systems and services. 5 Enabling Simulation asaService: The solution When describing our solution, it is essential to detail the foundational architecture of the FIWARE platform. At the core of the FIWARE solution is the Orion-LD Context Broker, which manages context information and facilitates the creation of digital twins for infrastructure. The integration of context data from various sources and devices is achieved through a series of adapters that provide an NGSI-LD interface to integrate heterogeneous data sources into an NGSILD context. These agents enable communication with the smart platform, ensuring consistent and semantically correct data storage and retrieval. This capability is supported by the Smart Data Models repository, which maintains the semantic integrity of data throughout its collection and processing lifecycle. The proposed framework aims to provide network infrastructure simulation functionality in NGSI-LD environments as detailed. This enriches the insights stored in the NGSI-LD platform, which can be leveraged by existing services, from simple monitoring to smart services such as energy management, comfort optimization, security, and more. Figure4 shows the architecture of the proposed framework and its connection with the NGSI-LD platform to provide simulations. 5.1 Digital Twin Platform–Implementation Details As shown on the left-hand side of the architecture in Fig.4, the DT was developed using the FIWARE framework and Fig. 4 Proposed Functional Architecture and Integration with the NGSI-LD Smart Platform Simulation asaService inData Spaces: ADigital Twin-based Approach organized in a layered architecture that facilitates data acquisition, integration, and simulation. Each layer supports a specific role in maintaining an accurate and dynamic representation of the physical system. The physical layer represents the actual environment, including assets, devices, and physical infrastructure. It includes the buildings, electrical systems, and metering devices such as smart power meters. These devices provide real-time measurements of energy usage and system status, forming the basis for both monitoring and analysis. The integration layer manages the flow of data from heterogeneous sources. IoT Agents2 are used to interface with devices and protocols such as MQTT, enabling seamless communication with the power meters and other field-level equipment. In addition, custom-built adapters have been developed to integrate data from external providers, ensuring compatibility with third-party systems, Building Management System (BMS) and proprietary data formats. The context information layer forms the core of the Digital Twin. It is based on NGSI-LD, a semantic and linkeddata standard that enables structured, interoperable context representation. Orion-LD3 serves as the context broker, maintaining up-to-date information about all entities in the system. Historical data is managed through Mintaka,4 enabling time-series analysis and supporting simulation inputs. This layer is responsible for ensuring that all modules operate with consistent and synchronized data. On top of this foundation, the vertical services leverage the contextual data to run simulations, perform optimizations, and support decision-making. These services transform the static model into a dynamic environment capable of representing, predicting, and improving real-world performance. 5.2 Simulation asaService Framework– Implementation Details The following section describes the proposed framework that enables the execution of simulations in a flexible manner, fully compatible with the NGSI-LD ecosystem. This design facilitates seamless integration with context-aware architectures. As depicted on the right side of Fig.4, the framework is composed of modular components that interact to support decoupled, reusable, and traceable simulation workflows. 5.2.1 Module‑based Decomposition andAnalysis The proposed simulation framework exhibits a modular architecture wherein specialized components operate with discrete functionalities yet maintain cohesive interaction patterns. This section presents a systematic decomposition and analytical examination of these constituent modules to specify their functions and interconnection. Simulation RunTime CLI This is a command-line interface that allows interaction with the framework. It handles the configuration steps before the simulation and the execution orders of simulations. Essentially, it is the entry point for the management and configuration and has a direct connection with the SIM Control Unit. SIM Control Unit This component is central to our approach. It houses the logic of the system, allowing configuration among different presets, modes, and settings. It is the orchestrator responsible for the workflow required for the design, configuration, and execution of a simulation. It has a bidirectional connection with the Data Processing Unit for processing both input and output data. It is responsible for the injection of processed data and the execution order of the simulation to the Simulation Run-Time component. The simulation results are sent back and redirected to the Data Processing Unit for subsequent storage in the NGSILD platform. To support these functionalities, it houses two databases: one for time series and another for configuration (MongoDB). Data Processing Unit This component is responsible for the collection, processing, filtering, and semantic enrichment of data. It features two interfaces for the allowed data sources: NGSI-LD and static data. The Data Processing Unit prepares data for simulation by collecting relevant information from various sources, filtering out errors or unnecessary elements, processing and standardizing it into a simulationready format, enriching it with semantic context, and integrating diverse datasets into a cohesive whole. Simulation Run-time This component is responsible for executing the simulation. It can be treated as an execution cluster with modules for different simulators. In this work, a module for execution using pandapower5 has been developed. The solution’s modularity allows it to be extended to other simulators. One of the required inputs for this component is the electrical scheme of the infrastructure to be simulated. Figure5 depicts the workflow between the Digital Twin and the various modules of the solution, which have been detailed above, during the execution of a simulation. The developed simulation framework is fully NGSI-LD compliant, enabling seamless integration with Digital Twins 2 https:// github. com/ telef onica id/ iotag entjson 3 https:// github. com/ FIWARE/ conte xt. OrionLD 4 https:// github. com/ FIWARE/ minta ka 5 https:// github. com/ e2nIEE/ panda power L.Coppolino et al. negotiations on data access. Once a participant identifies data of interest, they can initiate a negotiation process under the policies and terms described in Sect.4. After successfully reaching an agreement, the data is securely shared according to the negotiated policies, ensuring data sovereignty and compliance with usage restrictions. Three main opportunities emerge from this approach: Sharing Device-Specific Data Suppose a participant needs historical data from a specific HVAC unit–perhaps its past year of operational measurements. The catalogue entry would describe what historical datasets are available, including their temporal resolution and format. Interested parties, such as an external facility manager, can then request access under predefined policies. If the negotiation succeeds, the data is delivered under the agreed conditions. This allows, for example, the facility manager to analyze patterns of energy use, plan maintenance, and improve operational efficiency without direct human intervention or ad-hoc data extraction. Accessing Simulation Results In a similar manner, the simulation results–already recorded using the FIWARE standardized vocabulary–are also described in the catalogue. An energy operator looking to understand how certain demand response strategies affect load profiles can identify relevant simulation datasets. They might be interested in data from a scenario that tested staggered load shedding over a given period. By negotiating access, the operator can obtain these results and apply them to evaluate potential strategies in their own network, inform policy adjustments, or justify investments in specific technologies, while still adhering to data sovereignty and usage terms as defined. Requesting Simulations on Provided Data Another scenario arises when a participant wants to evaluate specific demand response actions using their own device data. For instance, a building owner may be considering a new load management strategy and seeks a simulation outcome before implementation. By describing their available device datasets and desired simulation parameters through the catalogue, they can negotiate to have the simulation run using their data. Once agreed upon, the simulation is executed, and the resulting scenarios are shared back to the participant under the negotiated policies. This process helps stakeholders anticipate potential outcomes, reduce risk, and refine their plans without directly exposing internal infrastructure to external testing or guesswork. Overall, this approach supports a controlled and policydriven exchange of both raw device-level data and processed simulation outcomes. Participants can reliably discover, negotiate, and access valuable data assets, while the data owners maintain full control over their information and ensure that terms of use are respected. 7 Related Work With the significant increase in data volume and the pervasive nature of IoT in critical sectors, the adoption of new technologies to offer enhanced citizen services is becoming increasingly important. In various sectors, continuous data analysis enables the creation of services that ensure the stability and resilience of the systems involved. While there is a pressing need to analyse data, there is also a stringent requirement to preserve privacy, necessitating the adoption of privacy-preserving systems that ensure compliance with relevant regulations. For this reason, the emergence of Data Spaces could represent a solution for developing services aligned with this vision. In this context, our work aims to propose a framework that facilitates the creation of services, particularly those related to the simulation of energy infrastructures. Enabling Simulation as a Service in compliance with the Data Space paradigm is a relatively novel concept. The stateof-the-art analysis has presented various solutions for simulation through digital twins; however, enabling this service within a federated data ecosystem has, to our knowledge, been underexplored. An intriguing approach towards a unified digital twin model, that can be considered the first milestone to achieve the creation of services through DT, is presented by Robles etal. In their work, “OpenTwins” [33]. The authors emphasise the importance of an open framework for building digital twin solutions, enabling knowledge sharing and data relationships. They highlight the necessity of integrating diverse data sources due to the heterogeneity present in various domains. To achieve this, they propose a framework based on Eclipse Ditto, an open-source solution offered by Eclipse. While this solution appears promising, it has several limitations in our view. Eclipse Ditto struggles to maintain external context information and does not provide the best means for integrating different types of solutions. The APIs of Ditto, developed by Eclipse, lack standardization, hindering easy data access and modeling perspectives. Additionally, the scalability of the Ditto platform is quite limited, as it is designed for modeling digital twins in a very closed context, making the development of a distributed platform impractical. We address these issues by proposing a framework fully compliant with the NGSI standard and proposing an architecture based on a general context broker, which is designed for open environments. This approach is more oriented towards retrieving external sources and fostering an open environment. Simulation asaService inData Spaces: ADigital Twin-based Approach Another noteworthy approach is presented by RodaSanchez etal. [34]. This research, conducted on the same infrastructure, provides valuable insights into integrating different context sources, particularly the integration of OSINT (Open Source Intelligence) into digital twin platforms. The authors emphasise the use of the NGSI standard to create a unified API for developing services within an open architecture. However, as stated by the authors, the current state of OSINT integration requires significant human effort to be utilised effectively in exposed services. We believe that OSINT and other external information can contribute to a broader picture. The Data Space approach can address the data processing challenges highlighted by the authors, particularly due to the heterogeneity of available information. Our framework, being compliant with the Data Space paradigm, offers the potential to integrate a dedicated service that, combined with others, enriches the overall proposal and enhances its usability. This comprehensive approach ensures a more efficient and scalable solution for managing diverse data sources in digital twin platforms. Lastly, Moreno etal. [35] focus on developing services within the core interaction between Digital Twins and Data Spaces. The authors emphasise the importance of compliance with Data Space requirements and propose an architecture to achieve this objective, similar to our work. They present two case studies related to Industry 4.0, highlighting the need to consider the creation of added-value services through connector-based communication when using datadriven technology. The authors state that there is a pressing need for service standardization to achieve a common understanding in terms of data deployment. We believe this is true across all domains, especially for services beneficial to cross-domain applications. Our work also provides a technical specification of how a service can be exposed and suggests technological solutions for creating easy access to data and enabling new addedvalue services while addressing the issue of data standardization. In our approach, we utilise Smart Data Models to create a less heterogeneous environment where data representation is defined and accessible to all participants in the Data Space. 8 Summary andConclusion The rapid transformation of the energy sector, driven by the adoption of advanced technologies, has introduced new challenges in improving system efficiency, security, and reliability. Access to high-quality, real-time data is essential for analysing infrastructure performance and enabling predictive maintenance strategies. Among the technologies facilitating this shift, Digital Twins play a central role by providing virtual representations of physical systems. This capability enhances the design, monitoring, and analysis of energy infrastructures. Despite significant advancements in opensource tools for building Digital Twins, solutions that support real-time simulation of grid conditions while adhering to the principles of Data Spaces remain largely unexplored. Data Spaces have emerged as a solution to enable secure, interoperable, and sovereign data exchange between participants, ensuring that data sharing can occur in a trusted and controlled environment. In this paper, we addressed these challenges by proposing an architectural approach for delivering DT-based services within a Data Space framework. We focused on Simulation as a Service and demonstrated its implementation through a practical case study conducted on the critical infrastructure of the University of Murcia campus in Spain. The proposed solution enabled stakeholders to test and evaluate various demand response strategies through simulation, offering a risk-free alternative to direct interventions on the operational infrastructure. The results of the case study confirmed the effectiveness of the proposed framework, providing energy operators and stakeholders with actionable insights while ensuring data sovereignty and compliance with the principles of secure and controlled data sharing. This work also explored the potential for generating added value through simulation within the Data Space ecosystem. In doing so, it contributed not only to the development of Data Spaces but also to the understanding of their future potential. Acknowledgements This manuscript was supported by the European Union’s Horizon CL3 Increased Cybersecurity 2021 under CERTIFY project (grant agreement number 101069471), from the Swiss State Secretariat for Education, Research and Innovation (SERI) under GAs 22.00165 and 22.00191 and Horizon Europe Project MASTERPIECE (GA: 101096836). Author Contributions Luigi Coppolino was responsible for conceptualization, data analysis and writing of the manuscript. Adelaida Parreño was responsible for the conceptualization, methodology, data collection, analysis, writing and editing of the manuscript. Alfredo Petruolo was responsible for the conceptualization, methodology, data collection, analysis, writing and editing of the manuscript. Juan Sánchez was responsible for the conceptualization, methodology, data collection, analysis, writing and editing of the manuscript. Antonio F. Skarmeta was responsible for conceptualization, data analysis and writing of the manuscript. Funding This work received funding from the European Union’s Horizon CL3 Increased Cybersecurity 2021 under grant agreement number 101069471 (CERTIFY - aCtive sEcurity foR connecTed devIces liFecYcle), from the Swiss State Secretariat for Education, Research and Innovation (SERI) under grant agreement numbers 22.00165 and 22.00191 and from the European Commission under the Horizon Europe Project MASTERPIECE (GA: 101096836). Data Availability The experimental data used in this study can not be made publicly available due to non-disclosure agreement constraints. However, we have included comprehensive implementation details and references to all open-source tools employed, in order to support transparency and ensure the reproducibility of our work. L.Coppolino et al. Declarations Conflict of interest The authors declare that they have no Conflict of interest. Ethics approval and consent to participate No ethical approval was required because the study did not involve human participants or animals. Consent for publication All authors have agreed to submit this manuscript for publication. Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/. References 1. Minerva R, Lee GM, Crespi N (2020) Digital twin in the IoT context: a survey on technical features, scenarios, and architectural models. Proc IEEE 108(10):1785–1824 2. Crespi N, Drobot AT, Minerva R (2023) The Digital Twin: What and Why?, In the Digital Twin, Springer, pp 3–20 3. Tao F, Zhang H, Liu A, Nee A (2019) Digital twin in industry: state-of-the-art. IEEE Trans Ind Inf 15(4):2405–2415 4. Otto B (2022) The evolution of data spaces, In: Designing data spaces: the ecosystem approach to competitive advantage, Springer, pp 3–15 5. Fonseca M, Karkaletsis K, Cruz IA, Berler A, Oliveira IC (2015) OpenNCP: a novel framework to foster cross-border e-Health services, In: Digital healthcare empowering Europeans, IOS Press, pp 617–621 6. Zhou M, Yan J, Feng D (2019) Digital twin framework and its application to power grid online analysis. CSEE J Power Energy Syst 5(3):391–398 7. European Commission. A European strategy for data, (2023) [Online]. Available: https:// digit alstrat egy. ec. europa. eu/ en/ polic ies/ strat egydata 8. Procházka D, Hodický J (2017) Modeling and simulation as a service and concept development and experimentation, In: 2017 international conference on military technologies (ICMT), pp 721–727, https:// doi. org/ 10. 1109/ MILTE CHS. 2017. 79888 51 9. Industrial Internet Consortium and Plattform Industrie 4.0, Digital Twin and asset administration shell concepts and application in the industrial internet and Industrie 4.0,” [Online]. Available: https:// www. iicon sorti um. org/ pdf/ Digit alTwinandAssetAdmin istra tionShellConce ptsandAppli cationJointWhite paper. pdf 10. Digital Twin Consortium, The definition of a digital twin, (2023). [Online]. Available: https:// www. digit altwi ncons ortium. org/ initi atives/ thedefin itionof-adigit altwin/ 11. Barricelli BR, Casiraghi E, Fogli D (2019) A survey on digital twin: definitions, characteristics, applications, and design implications. IEEE Access 7:167653–167671. https:// doi. org/ 10. 1109/ ACCESS. 2019. 29534 99 12. Tao F, Xiao B, Qi Q, Cheng J, Ji P (2022) Digital twin modeling. J Manuf Syst 64:372–389. https:// doi. org/ 10. 1016/j. jmsy. 2022. 06. 015 13. Stadtmann F, Wassertheurer H, Rasheed A (2023) Demonstration of a standalone, descriptive, and predictive digital twin of a floating offshore wind turbine, in Vol 8: Ocean Renewable Energy, American Society of Mechanical Engineers https:// doi. org/ 10. 1115/ OMAE2 023103112 14. Kenett RS, Bortman J (2022) The digital twin in Industry 4.0: a wide-angle perspective. Qual Reliab Eng Int 38(3):1357–1366. https:// doi. org/ 10. 1002/ qre. 2948 15. Cim, GR CIM 017 - V1.1.1 - Context Information Management (CIM); Feasibility of NGSI-LD for Digital Twins, (2022). [Online]. Available: https:// www. etsi. org/ deliv er/ etsi_ gr/ CIM/ 001_ 099/ 017/ 01. 01. 01_ 60/ gr_ CIM01 7v010 101p. pdf 16. Coppolino L, Nardone R, Petruolo A, Romano L, Souvent A (2023) Exploiting digital twin technology for cybersecurity monitoring in smart grids, In: Proceedings of the 18th international conference on availability, reliability and security 17. Storek T, Du J, Blechmann S, Streblow R, Müller D (2024) FiLiP: a python software development kit (SDK) for accelerating the development of services based on fiware IoT platform. J Open Source Softw 9(101):6953 18. FIWARE (2024) FIWARE GitHub repository. Retrieved from https:// github. com/ fiware 19. Kherbache M, Maimour M, Rondeau E (2022) Digital twin network for the IIoT using eclipse ditto and Hono. IFAC-PapersOnLine 55(8):37–42 (Elsevier) 20. Eclipse Ditto (2022) Retrieved from https:// github. com/ eclip seditto/ ditto 21. Ramesh K, Sasirekha GVK, Rao M, Bapat J, Das D (2024) Digital twin based what-if simulation of security attacks in smart irrigation systems. In: 2024 IEEE international conference on electronics, computing and communication technologies (CONECCT), IEEE, pp 1–6 22. AWS IoT TwinMaker (2024) Retrieved from https:// aws. amazon. com/ it/ iottwinm aker/ 23. Nath SV, Van Schalkwyk P, Isaacs D (2021) Building industrial digital twins: design, develop, and deploy digital twin solutions for real-world industries using Azure digital twins. Packt Publishing Ltd 24. Microsoft Azure Digital Twins (2024) Retrieved from https:// learn. micro soft. com/ enus/ azure/ digit altwins/ 25. Jung S, Ferber S, Cramer I, Bronner W, Wortmann F (2021) Bosch IoT suite: exploiting the potential of smart connected products. In: Connected Business: create value in a networked economy. Springer, pp 267–282 26. Bosch IoT Suite (2024) Retrieved from https:// boschiotsuite. com/ 27. Wehrmeister KA, Bothos E, Marinakis V, Magoutas B, Pastor A, Carreras L, Monti A (2022) The BD4NRG reference architecture for big data driven energy applications, In: 2022 13th international conference on information, intelligence, systems and applications (IISA), pp 1–8, https:// doi. org/ 10. 1109/ IISA5 6318. 2022. 99044 24 28. Advaneo Data Marketplace (2024) IDS connector: secure, automatable data exchange according to ids standard. Retrieved from https:// www. advan eodatam arket place. de/ en/ idsconne ctorsecureautom atabledataexcha ngeaccor dingtoidsstand ard/# 29. FIWARE Data Space Connector (2024) Retrieved from https:// github. com/ FIWARE/ dataspaceconne ctor 30. Eclipse EDC Connector (2024) Retrieved from https:// github. com/ eclip seedc/ Conne ctor 31. Eclipse EDC Project (2024) Retrieved from https:// proje cts. eclip se. org/ proje cts/ techn ology. edc 32. EGI DataHub Connector (2024) Retrieved from https:// egitl ab. iti. es/ euhub s4data/ egidatah ubconne ctor Simulation asaService inData Spaces: ADigital Twin-based Approach 33. Robles J, Martín C, Díaz M (2023) OpenTwins: an open-source framework for the development of next-gen compositional digital twins. Comput Ind 152:104007 34. Roda-Sanchez L etal (2024) Building a smart campus digital twin: system, analytics, and lessons learned from a real-world project. IEEE Internet Things J 11(3):4614–4627 35. Moreno T, Almeida A, Toscano C, Ferreira F, Azevedo A (2023) Scalable digital twins for industry 4.0 digital services: a data spaces approach. Product Manuf Res 11(1):2173680 36. Grasselli C, Melis A, Rinieri L, Berardi D, Gori G, Al Sadi A (2022) An industrial network digital twin for enhanced security of cyber-physical systems, In: 2022 international symposium on networks, computers and communications (ISNCC), pp 1–7