Simulation of Communication Networks in a Co-Simulation Environment

Introduction

Co-simulation is a computational technique where the global simulation of a system of coupled, heterogeneous components is done by composing local simulations of the individual components. Each simulation unit encapsulates the behavior and characteristics of a specific component and may be developed independently by different software teams. The simulation units can be thought of independently as “black boxes.” Moreover, the simulation units themselves may be executed on different machines, operating systems, and networks. The coupling is performed by an orchestrator that initializes each simulation unit, controls how simulated time progresses for each simulation unit, and manages communication and the transfer of data between simulation units according to the co-simulation scenario that is being computed.

The key advantage of co-simulation is that it enables the global simulation of arbitrarily complex, designed, but not yet built, systems by composing preexisting local simulations in novel ways. A comprehensive survey of co-simulation approaches that have been applied to various domains of discourse is given by [1].

Simulation of Communication Networks

The future implementation of smart power grids will rely upon the successful development and large-scale deployment of heterogeneous, connected devices, including appliances and meters at the customer’s site and sensors in the transmission and distribution grids, enabling networked control and demand response. Co-simulation approaches can be used to evaluate the efficacy of these networked devices, including their responsiveness to market conditions and dynamics such as instantaneous energy cost, and the robustness of the communication networks themselves in the presence of lossy communication channels, faults, and other quality-of-service disruptions.

Power system dynamic simulation is typically done as a continuous time simulation where the communication networks are modeled as discrete event systems that account for the randomness of packet generation and transmission. This approach was pioneered by [2] with their contribution of Electrical Power and Communication Synchronizing Simulator (EPOCHS). Later proposals by other groups contributed in 3 research directions: exploration of different combinations of power system and communication network simulation units, improvement of time synchronization mechanisms, and improvement and standardization of software engineering techniques and programming frameworks.

In continuous time systems, the state variables for the system vary continuously with respect to time. The systems may be represented as sets of coupled differential equations that codify the relationships between the state variables and their rates of change. In the simplest cases, the differential equations may be solved analytically, obtaining closed form solutions. However, for most real-world cases closed forms tend to not be available, and instead, numerical solutions may be obtained by discretizing the differential equations and integrating over small changes to the state variables, approximating the system’s trajectory.

In discrete event systems, the state variables for the system are subject to change due to discrete events whose occurrences are irregular with respect to time. Hence, time discretization into regular intervals, as would be done for a continuous system, is not possible, as an appropriate time step cannot always be determined a priori. If the time step is too large, then some events may not be observed, whereas if the time step is too small, then computational performance will suffer because there will be many time steps with no events. Instead, in event-driven simulations, a scheduler manages the current simulation time and maintains a list of events. Simulation units may add events to the list, which are then managed by the scheduler. The global simulation concludes when the simulation time reaches a predetermined stopping time and/or when the system enters a predetermined state.

In [3], the authors propose PowerNet, a communication network for smart power grids, and evaluate it with respect to network metrics, including measured delay and jitter, control metrics, including stability, and operational metrics, including scalability, security, safety, and performance. The communication network is simulated at the packet-level using the ns-2 discrete event network simulator [4] and the power grid and connected devices are simulated using Modelica [5]. Modelica and ns-2 are executed as 2 separate processes, managed and scheduled by the operating system, and the communication between processes is done via UNIX pipes that are orchestrated by ns-2. A key disadvantage of this approach to time synchronization is that ns-2 effectively determines when communication can occur between the simulation units, precluding the ability to simulate control and/or alarm signals that emanate from the connected devices.

In [6], the authors propose FNCS, which utilizes GridLAB-D [7], PowerFlow (developed as a component of FNCS), and ns-3 [8]. To mitigate is overhead of time synchronization between simulation units, FNCS uses a speculative execution that attempts to predict when simulation units are going to exchange data. A similar approach for power system and network communication co-simulation is advanced by [9], which describes a combination of ns-2 and Positive Sequence Load Flow (PSLF) software package by GE. However, as with the previously described approaches, the overhead of time synchronization remains a prevailing issue.

More recently, in [10], the authors present the DecompositionJ framework that demonstrates how source code compiler extensions can be used to automatically transform multi-threaded co-simulations into direct-execution simulations where the original source code for the target program is modified to emulate its own behavior. The key advantage of this approach is that it enables the system to model and account for computation delays, which may result in timing and synchronization issues. Control code is automatically injected into the original source code to manage the target program’s interactions with real-world systems such as I/O and the machine’s clock, to account for computation delays, and to synchronize events across simulation units.

Considerations for future research and development of smart power grid co-simulations are articulated in [11], where the authors identify the need for combining the advantages of hybrid coupling between simulation units and programming framework usability, e.g., standardized application programming interfaces, automatic validation of simulation scenarios, and the development of graphical user interfaces).

Conclusion

This article introduces the co-simulation computational technique and discusses how it has been applied to model the behavior of power grids using a combination of continuous time simulations and discrete event systems. The core research and development challenges and opportunities are to identify suitable software packages for the various simulation units, reducing the overhead of time synchronization between simulation units, and improving and standardizing the available software engineering techniques and programming frameworks.

[1]

Cláudio Gomes, Casper Thule, David Broman, Peter Gorm Larsen, and Hans Vangheluwe. Co-simulation: a survey. ACM Computing Surveys (CSUR), 51(3):1–33, 2018.

[2]

Kenneth M Hopkinson, Kenneth P Birman, Renan Giovanini, Denis V Coury, Xiaoru Wang, and James S Thorp. Distributed simulation in manufacturing: epochs: integrated commercial off-the-shelf software for agent-based electric power and communication simulation. In Proceedings of the 35th conference on Winter simulation: driving innovation, 1158–1166. 2003.

[3]

Vincenzo Liberatore and Ahmad Al-Hammouri. Smart grid communication and co-simulation. IEEE 2011 EnergyTech, pages 1–5, 2011.

[4]

Lee Breslau, Deborah Estrin, Kevin Fall, Sally Floyd, John Heidemann, Ahmed Helmy, Polly Huang, Steven McCanne, Kannan Varadhan, Ya Xu, and others. Advances in network simulation. Computer, 33(5):59–67, 2000.

[5]

Peter Fritzson and Vadim Engelson. Modelica—a unified object-oriented language for system modeling and simulation. In ECOOP’98—Object-Oriented Programming: 12th European Conference Brussels, Belgium, July 20–24, 1998 Proceedings 12, 67–90. Springer, 1998.

[6]

Selim Ciraci, Jeff Daily, Jason Fuller, Andrew Fisher, Laurentiu Marinovici, and Khushbu Agarwal. Fncs: a framework for power system and communication networks co-simulation. In Proceedings of the symposium on theory of modeling & simulation-DEVS integrative, 1–8. 2014.

[7]

David P Chassin, Kevin Schneider, and Clint Gerkensmeyer. Gridlab-d: an open-source power systems modeling and simulation environment. In 2008 IEEE/PES Transmission and Distribution Conference and Exposition, 1–5. IEEE, 2008.

[8]

George F Riley and Thomas R Henderson. The ns-3 network simulator. In Modeling and tools for network simulation, pages 15–34. Springer, 2010.

[9]

Hua Lin, Santhoshkumar Sambamoorthy, Sandeep Shukla, James Thorp, and Lamine Mili. Power system and communication network co-simulation for smart grid applications. In ISGT 2011, 1–6. IEEE, 2011.

[10]

Chong Shum, Wing-Hong Lau, Tian Mao, Henry Shu-Hung Chung, Kim-Fung Tsang, Norman Chung-Fai Tse, and Loi Lei Lai. Co-simulation of distributed smart grid software using direct-execution simulation. IEEE Access, 6:20531–20544, 2018.

[11]

Cornelius Steinbrink, Florian Schlögl, Davood Babazadeh, Sebastian Lehnhoff, Sebastian Rohjans, and Anand Narayan. Future perspectives of co-simulation in the smart grid domain. In 2018 IEEE International Energy Conference (ENERGYCON), 1–6. IEEE, 2018.