PNRG – A Library for Modeling Variable Structure Energy Grids in Modelica using Energetic Petri Nets


  • Christian Gutsche
  • Zizhe Wang
  • Sebastian Götz
  • Volodymyr Prokopets
  • Uwe Aßmann



Energy Grids, Sector Coupling, Variable Structure Systems, Context-oriented Programming, Petri Nets


Operating energy grids with a high share of renewable energy sources (RES) requires system reconfiguration as a response to environmental condition changes. To understand them better, simulations are needed and Modelica is an excellent choice for that. Energy grids with event-based reconfigurations are an instance of variable structure systems (VSS). However, the full support of VSS in Modelica is challenging and topic of ongoing research. Petri nets (PNs) offer a formalism for modeling VSS. The capability to simulate PNs in Modelica gives an opportunity to model VSS in Modelica. This paper presents an approach to utilize PNs in Modelica for modeling variable structure energy grids. Therefore, we introduce energetic Petri nets, a special type of PNs and an experimental library called PNRG for PN-based energy system modeling is presented. Furthermore, possibilities and limits of modeling VSS energy grids are discussed and an outlook how to develop this technique is provided.