ElectricGrid.jl
A time domain electrical energy grid modeling and simulation tool with a focus on the control of power electronics converters
Install / Use
/learn @upb-lea/ElectricGrid.jlREADME
ElectricGrid.jl
<img align="right" width="150" height="200" src="docs/logo.png">| Reference docs | Install guide | Quickstart | Release notes
ElectricGrid.jl is a library for setting up realistic electric grid simulations with extensive support for control options. With ElectricGrid.jl you can
- create a simulation environment for an electric grid by defining its sources, loads, and cable connections,
- set detailed parameters of your electric components or let them be auto-generated,
- choose different control modes for each power electronic converter in your system and
- use the agent architecture of ReinforcementLearning.jl to either train RL agents as controllers or write your own ones.

Installation
- Installation using the Julia package manager (recommended if you want to use ElectricGrid in your project):
- In a Julia terminal run the following:
import Pkg
Pkg.add("ElectricGrid")
or press ] in the Julia Repl to enter Pkg mode and then run
add ElectricGrid
- Install from GitHub source (recommended if you want to run the example notebooks and scripts):
- Clone the git and navigate to the directory
git clone https://github.com/upb-lea/ElectricGrid.jl.git
Getting Started
To get started with ElectricGrid.jl the following interactive notebooks are useful. They show how to use the ElectricGrid.jl framework to build and simulate the dynamics of an electric power grid controlled via classic controllers or train common RL agents for different control tasks:
- Create an environment with ElectricGrid.jl
- Theory behind ElectricGrid.jl - Modelling Dynamics using Linear State-Space Systems
- Classic Controlled Electric Power Grids - State-of-the-Art
- Use RL Agents in the ElectricGrid.jl Framework
An overview of all parameters defining the experiment setting in regard to the electric grid can be found here:
To run a simple example, the following few lines of code can be executed:
using ElectricGrid
env = ElectricGridEnv(num_sources = 1, num_loads = 1)
Multi_Agent = SetupAgents(env)
hook = Simulate(Multi_Agent, env)
RenderHookResults(hook = hook)
This is a minimal example of a full ElectricGrid.jl setup.
There should also appear a plot that looks like this:

Using the GUI
The current version of ElectricGrid features a graphical user interface (GUI) that helps with setting up a simulation.
This is built on the library QML.jl, that, at the time of writing, stopped working in its current release version.
For that reason it is required to clone this codebase and install QML.jl in its GitHub main state manually if you want to use the GUI.
import Pkg
Pkg.add("QML#main")
or press ] in the Julia RPEL to enter Pkg mode and then run
add QML#main

Usage of the GUI is explained in the GUI section in the docs.
Related Skills
node-connect
339.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.9kCommit, push, and open a PR
