ElectricGrid.jl - A Julia-based modeling and simulation tool for power electronics-driven electric energy grids

Oliver Wallscheid, Sebastian Peitz, Jan Stenner, Daniel Weber, Septimus Boshoff, Marvin Meyer, Vikas Chidananda, Oliver SchweinsJ. Open Source Softw 2023 · DOI · DBLP

Introduction

The transition toward decentralized energy networks, powered by renewable sources like solar and wind, is fundamentally changing the nature of the electrical grid. Control is shifting from large-scale spinning turbines to thousands of distributed power electronic converters. ElectricGrid.jl is a high-performance Julia toolbox designed to address the challenges of simulating these modern, power electronics-dominated grids. It provides a component-level simulation environment that bridges the gap between traditional power systems engineering and modern artificial intelligence.

The Challenge of Transient Simulation

While existing open-source tools such as PyPSA or pandapower are effective for steady-state analysis—calculating power flows across large networks—they often overlook "transients." These are the split-second fluctuations that occur at the component level when loads change or switches flip. In a grid dominated by volatile, stochastic renewable sources, understanding these transients is critical for stability.

Furthermore, AI researchers attempting to apply Reinforcement Learning (RL) to grid control often face a high barrier to entry, requiring specialized electrical engineering knowledge to build suitable simulation environments. ElectricGrid.jl addresses this by offering a "bottom-up" modeling approach accessible to both engineers and data scientists.

The ElectricGrid.jl Framework

The toolbox leverages Julia’s high performance for scientific computing to implement a robust modeling framework.

State-Space Modeling and Automation

The grid is represented as a set of first-order ordinary differential equations (ODEs) using state-space modeling. This approach enables fast and accurate time-domain simulations of dynamic behavior. To simplify the user experience, the tool includes automated parameterization. Users can initialize complex grid models with minimal code; if specific hardware details are missing, the tool generates physically meaningful parameters based on verified design principles.

Bottom-up modeling of physical grid components as equivalent electrical circuits.

AI-Ready Architecture

A core innovation of ElectricGrid.jl is its integration with the Reinforcement Learning ecosystem. By implementing a Gymnasium-standard API, the toolbox allows RL agents to interact with the simulated grid as an "environment," receiving states and rewards while taking actions.

The ElectricGrid Ecosystem

The software is structured as a comprehensive ecosystem designed for modularity and performance.

The ElectricGrid.jl ecosystem architecture, showing the interaction between the environment, controllers, and GUI.

Key components include:

  • NodeConstructor: A tool for defining the physical layout of the grid.
  • Environment: A management layer for simulation steps and the RL interface.
  • MultiController: A hybrid control architecture where classic industrial controllers (like PI controllers) can operate alongside modern RL agents.
  • Predefined Library: A collection of industry-standard controllers and coordinate transformations (e.g., DQ0) available out of the box.

Performance and Versatility

By utilizing Julia and state-space models, ElectricGrid.jl achieves the high simulation speeds necessary for training deep RL agents, which often require thousands of episodes. The tool is highly versatile, supporting single-phase, multi-phase, and DC operations with arbitrary waveforms, moving beyond the limitations of standard AC grid models.

Conclusion and Future Work

ElectricGrid.jl provides a vital link between power electronics and data-driven control. While it excels at component-level transient simulation, scaling these high-fidelity models to national-level grids remains a computational challenge. Future development will focus on "safe RL" methods to ensure grid stability and the expansion of data-driven meta-modeling use cases. By lowering the barrier to entry for AI researchers, ElectricGrid.jl paves the way for more resilient, intelligent energy networks.

Summary updated

BibTeX
@article{wallscheid2023electricgrid,
  author = {Oliver Wallscheid and Sebastian Peitz and Jan Stenner and Daniel Weber and Septimus Boshoff and Marvin Meyer and Vikas Chidananda and Oliver Schweins and S. Boshoff and Marvin W. Meyer},
  title = {{ElectricGrid.jl - A Julia-based modeling and simulation tool for power electronics-driven electric energy grids}},
  journal = {J. Open Source Softw},
  year = {2023},
  doi = {10.21105/joss.05616},
}
Figure