The Linux Foundation Projects
Skip to main content
By | April 15, 2025

Empowering the Energy Transition Through Fast and Flexible Network Simulation

This post was contributed by Jaap Schouten of Alliander

The energy transition is not just a shift from fossil fuels to renewable sources; it’s a revolution that demands innovation, optimisation, and collaboration. As we strive to build a sustainable future, the integration of renewable energy into our power grids becomes a critical challenge. This is where advanced network simulation tools, like the Power Grid Model Data Science Toolkit (PGM-DS), step in to transform the way we manage and optimize our energy infrastructure.

The project

Data-driven smart software solutions play a crucial role in devising effective strategies for our energy systems. The Power Grid Model (PGM) is an open-source initiative by Alliander which allows us to monitor and simulate complex scenarios on the energy grid. It has already supported many projects within Alliander by fostering better insights and collaboration. Examples of use cases are in automated customer integration, network investment optimization, and strategic simulation.

Thus, we are excited to introduce the Power Grid Model Data Science Toolkit (PGM-DS) as the latest enhancement to our open-source PGM suite. It has empowered software engineers at Alliander to develop robust solutions, enjoy the development process, and effectively investigate and debug their products. We are now thrilled to make it available to the open-source community.

The Power Grid Model Data Science Toolkit (PGM-DS)

Built upon the PGM Suite, PGM-DS integrates data science into power grid analysis, empowering operators, researchers, and scientists to simulate, analyze, and optimize power grids more effectively.

Key Features of PGM-DS

The project focusses on integrating the PGM calculation core within broader Python projects. To do this it provides an object oriented grid representation with a easy-to-use Python API. Here are some of the highlights of using it.

1. Graph and Array Representations:
PGM-DS manages both graph and array representations of the power grid, allowing for detailed analysis of network topology and component interactions. This dual representation helps in identifying cycles, paths, and connected components within the grid.


1 # Given a grid object it easy to manage and modify both representation
2 new_line = LineArray(from_node=4, to_node=12, ...)
3 grid.add_branch(branch=new_line)
4
5 old_line = grid.line.get(13)
6 grid.make_inactive(branch=old_line)

📘 See the quick start guide: Quick Start — power-grid-model-ds documentation

2. High-Performance Simulation:
The toolkit uses the high-performance PGM C++ core for essential power system analyses like state estimation, power flow, and short-circuit calculations, which are vital for grid planning, expansion, and reliability studies.

1 calculation_core_interface = PowerGridModelInterface(grid=grid)
2
3 calculation_core_interface.calculate_power_flow() # Perform a power flow calculation
4 calculation_core_interface.update_grid() # Save the relevant results for further analysis

📘 Quick Start — power-grid-model-ds documentation

3. Data Science Integration:
The toolkit allows for the integration of advanced data science techniques, enabling more sophisticated analyses and predictions. With PGM-DS, you can perform millions of power flow simulations to plan maintenance, determine the impact of future customers, and make strategic decisions for the next 40 years.

1 # Example of a simplified DS integration
2 for _ in range(10):
3 new_consumer, new_consumer_load = create_new_consumer_arrays(
4 ... # provide consumer properties
5 )
6 connect_new_consumer(grid, new_consumer, new_consumer_load)
7 update_grid(grid)
8
9 print(f"Overloaded nodes: {grid.node[grid.node.is_overloaded].id}")
10 print(f"Overloaded lines: {grid.line[grid.line.is_overloaded].id}")
11
12 Overloaded nodes: [] 13 Overloaded lines: [63 64 66 68 72]

📘 Full example: Connecting a new consumer — power-grid-model-ds documentation

4. Ease of Use:
Designed to be user-friendly, PGM-DS features a lightweight and fast Python wrapper around the Power Grid Model power flow core. This makes it accessible and easy to work with for developers.

Applications of PGM-DS

These are some applications we have for the PGM-DS within Alliander.

1. Grid Planning and Expansion:
PGM-DS simulates the impacts of growth and new renewable sources on the grid, facilitating proactive infrastructure planning and investment. This ensures that the grid can handle the increased load in addition to aiding effective investment decision making.

2. Reliability and Congestion Studies:
The toolkit enables the analysis of grid reliability and congestion, helping operators identify potential issues and develop strategies to mitigate them. This is crucial for maintaining a stable and reliable power supply. This way the grid can be constantly monitored with current and future customers being helped optimally.

3. Strategic Decision Making:
By simulating future scenarios, PGM-DS helps in making informed strategic decisions. This includes planning for future demand, integrating new technologies, and ensuring the long-term sustainability of the grid. An example of this is simulating the impact of allowing higher cable loading on aging and cable failure in comparison to short term capacity gain.

Conclusion

The Power Grid Model Data Science Toolkit (PGM-DS) is an important tool for the energy transition. By making the advanced simulation and analysis capabilities of PGM more accessible, it helps in the integration of renewable energy sources, ensures grid reliability, and supports strategic decision-making. As the energy landscape continues to evolve, tools like PGM-DS will be instrumental in shaping the future of the power grid.

Want to transform your power grid analysis? Explore PGM and PGM-DS on the LF Energy website and browse the GitHub repositories to see what it can do. Stay in the loop by subscribing to the Power Grid Model mailing list – just send an empty email to:
📧 powergridmodel+subscribe@lists.lfenergy.org

This May we’ll host our annual Power Grid Model meetup, where we will also organise an interactive workshop to get a first introduction into PGM-DS.
Want to join? Sign up here: 6th Power Grid Model Meetup 2025

Your path to smarter grid management begins here!