arXiv:2609.03118cs.NISep 2026

Manuscript Offprint

arXiv:2609.03118

Efficient Co-simulator Integration with Application to Smart Grids

Talha Ibn Aziz, Jihoon Og, Ioanis Nikolaidis, Omid Ardakanian

Talha Ibn Aziz, Jihoon Og, Ioanis Nikolaidis, Omid Ardakanian

University of Alberta, Edmonton, AB, Canada

{taziz, og, nikolaidis, ordakan}@ualberta.ca

Abstract—The evolution of the electric power grid towards a “smart grid” is an example of an emerging large-scale cyber-physical system. To study the potential of cyberattacks or other sources of extreme events, high-fidelity co-simulation is the only realistic strategy. In this work, we demonstrate a practical and high-performance co-simulation strategy for smart grids, which provides lessons about co-simulation integration that can be carried over to other cyber-physical systems. Specifically, we present a co-simulation platform based on the Mosaik framework that integrates several federates including OpenDSS for power flow, a refined NS-3 for communication networks, and custom Python-based simulators for on-load tap changer control, distributed state estimation, and data collection. We compare synchronization strategies – exhaustive lock-step time advancement versus an optimized event-driven approach that exploits lower-bound time stamps (LBTS) and next-event prediction – and introduce targeted refinements to NS-3 event handling and relevance filtering of internal events.

Performance is evaluated on two standard IEEE benchmark systems: the 13-node test feeder with tap-changer voltage regulation and a large-scale 33-bus system augmented with 32 European low-voltage feeders (1,793 nodes total) performing distributed state estimation with thousands of phasors and smart meters. Experimental results demonstrate that the refined event-based synchronization that uses LBTS-based NS-3 event filtering reduces execution time by up to 50% (and more than 4× in smaller scenarios) compared to naïve lock-step methods, while strictly preserving temporal correctness and simulation accuracy. We additionally summarize a domain ontology that standardizes multi-simulator configuration and entity mapping across power, communication, and control domains.

Index Terms—Co-simulation, cyber-physical systems, Mosaik, NS-3, ontology, power system simulation, smart grid, distributed state estimation.

I. INTRODUCTION

THE electric power grid is undergoing a rapid transformation driven by the large-scale deployment of disruptive technologies such as distributed energy resources, advanced sensing infrastructure, and intelligent control systems. While these innovations promise higher efficiency and flexibility, they also introduce new sources of complexity and uncertainty that can threaten reliable grid operation, potentially leading to costly failures and blackouts if not properly understood and managed. Beyond the integration of new technologies, it is increasingly critical to assess the robustness of existing monitoring, protection, and control mechanisms against cyber threats, extreme weather events, and unforeseen interactions across cyber and physical layers [1], [2] (e.g. voltage limit violations caused by increased packet delay in phasor-based control). Studying these phenomena directly on operational power systems is impractical due to safety, cost, and regulatory constraints, underscoring the need for high-fidelity, flexible, and scalable smart grid simulation environments that enable systematic evaluation of grid behavior.

Co-simulation refers to the integration of multiple simulators, often originating from different domains, to model complex systems or phenomena that cannot be accurately captured by a single simulation tool. Each simulator typically runs as an independent process, while the co-simulation framework orchestrates their interaction and data exchange. Despite its clear advantages, co-simulation introduces several technical challenges [3]. A primary challenge lies in ensuring compatibility among heterogeneous simulators and enabling reliable, efficient communication between them. Addressing this challenge requires carefully designed interfaces and well-defined data exchange protocols that preserve a consistent global system state across all simulators. However, most existing simulators lack such interfaces, as they are commonly developed as monolithic tools by domain experts to address narrowly scoped problems, with interoperability and cross-domain interaction treated as secondary concerns. Another challenge is managing the overall complexity of the co-simulated system. As the number of simulators and inter-simulator interactions increases, system configuration, coordination, and maintenance become significantly more complex. For instance, simulator initialization based on configuration specifications must be performed consistently across all tools, ensuring that entities defined in multiple domains, perhaps with different names, are correctly mapped and initialized. Furthermore, co-simulation can impose substantial computational overhead, often resulting in high CPU and memory usage due to the concurrent execution of multiple simulators.

To address co-simulation’s challenges, several co-simulation frameworks have been developed ([4], [5], [6]). A framework provides a standard dictating how the participating simulators will be managed, coordinated, and how they will communicate with each other through the framework - i.e., a generalized simulator-framework interface. Following such standards, a co-simulation platform (an implementation of such a standard) may be able to integrate multiple simulators and simulate events spanning several of these constituent simulators (known also as federates) by facilitating data exchange between them. By way of this communication, the framework manages simulator execution to ensure temporal correctness, i.e., to ensure that the simulated events do not break causal order.

Temporal correctness is essential to simulation accuracy. In the context of a co-simulation, a simulator can either be dependent - i.e., the internal events need input from events

The funding for this work has been provided by Future Energy Systems (FES) of the University of Alberta and the Natural Sciences and Engineering Research Council of Canada (NSERC).

external to the simulator to execute, or it can be independent. If all the simulators in a co-simulation are independent, they can be executed in any order without affecting temporal correctness. However, a plethora of interesting systems, e.g., systems involving feedback, depend on circular interactions among the federates, with simulator events depending on other events from other simulators. Thus, a global order of event execution must be maintained for the sake of consistency. A simplistic approach is to execute small time-steps across all federates, where the "step" is determined by the simulator with the finest temporal resolution. The framework decides, for every step, which simulators are to be stepped before any other simulators.

While the above approach requires minimal modification of the federates, the co-simulation itself is computationally inefficient due to the overhead of potential context switches at every time step. The simulator that requires the finest time step dictates how frequently all the other simulators need to be stepped. This results in wasted context switches and computation because most of the federates will have, typically, nothing new to do, i.e., no new events to execute and update their internal state, hence stepping them is effectively a no-op. An improved approach is to execute all simulators until there is an event, propagate the necessary data of the event to the dependent simulators (at the appropriate timestamp), and continue simulation again until the next event. The resultant co-simulation would achieve both temporal correctness and computational efficiency. However, further modification of the simulators becomes necessary to extract the timestamp of the next event in their corresponding internal event dispatch logic.

In this work, we compare the performance of the two integration approaches described above in terms of computational complexity, execution time, and temporal correctness. Our major contributions can be summarized as follows:

  1. We demonstrate our approach by implementing the optimized synchronization technique while integrating several component simulators, including state-of-the-art simulators from multiple domains, and using well-established co-simulation frameworks.

  2. We simulate multiple standard co-simulation scenarios containing adequate inter-simulator interactions and feedback mechanisms. Our experimental results show performance tradeoffs at different synchronization levels without sacrificing temporal correctness.

The paper is organized as follows: Section II discusses related work. Section III describes our integration strategy. Section IV presents the benchmark network topologies used in our simulations and the ontology used to generate the federate configurations. Section V discusses the experimental results and Section VI concludes the paper. An appendix provides the example ontology used in the evaluation section.

References (33)