mgrid
is a pure Python package to model power grids as multilayer
networks. All the electric devices at one voltage level compose one
layer. A directed bipartite for a pair of adjacent layers represents
transformers connecting two voltage levels. Moreover, mgrid
provides
an interface for power system analysis.
There are two kinds of edges in a multilayer network. Any intra-edge can only exist in a single layer and correspond to cables. Inter-edges connect layers, and correspond to transformers.
There are some features worth mentioning when modelling power grids as multilayer networks:
- At least one inter-edge connecting upper layer for a component
- No pair of planar nodes share the same name. That is, there is no replica of planar nodes, the setting of which is quite different from prototypical multilayer networks.
- Inter-edges exist between adjacent layers and direct towards lower layers.
- There is geographical information associated with intra-edges, but not with inter-edges.
- All the inter-edges represent transformers.
- Terminals of any inter-edges are unique. Put another way, there is no pair of inter-edges sharing a terminal.
Electric devices can be modelled using built-in classes or customised classes, then instance using supported Python packages for power system analysis can be returned. Current, supported tools are:
pandapower
: combines the data analysis library pandas and the power flow solver PYPOWER to create an easy to use network calculation program aimed at automation of analysis and optimization in power systems.PyPSA
: a free software toolbox for simulating and optimising modern power systems that include features such as conventional generators with unit commitment, variable wind and solar generation, storage units, coupling to other energy sectors, and mixed alternating and direct current networks.
and supported studies are:
- Power flow based on one-line-equivalent models for three-phase-four-wire power grids.
- Power flow for unbalanced three-phase-four-wire power grids.
In terms of:
- Power flow for unbalanced power grids with laterals (cables with less than three phases).
Following tool is to be supported:
OpenDSS
:OpenDSSDirect.py
is a cross-platform Python package implements a "direct" library interface toOpenDSS
usingdss_python
.OpenDSS
is an open-source distribution system simulator. SeeOpenDSSDirect.jl
for a similar package in Julia.pf_impedance
:pf_impedance
is a Python package to model (un)balanced power grids using impedance matrices of cables and transformers. Generally speaking, a bus impedance matrix is to be built for the whole power grid, then used to calculated power flow for given snapshot(s).
- Documentation website.
- Bianconi, G. (2018). Multilayer networks: structure and function. Oxford university press.