Enhancing PowerFactory Dynamic Models with Python for Rapid Prototyping
Claudio David López (TU Delft - Intelligent Electrical Power Grids)
Milos Cvetković (TU Delft - Intelligent Electrical Power Grids)
Peter Palensky (TU Delft - Intelligent Electrical Power Grids)
More Info
expand_more
Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.
Abstract
DIgSILENT PowerFactory is among the most widely adopted power system analysis tools in research and industry. It provides a comprehensive library of device models and it allows users to define their own. Models for dynamic simulation can be defined in the DIgSILENT Simulation Language (DSL). When the functionality of DSL is insufficient, new DSL functions can be defined in C or C++. However, C and C++ can be challenging for inexperienced programmers. Furthermore, every time the C or C++ code is modified, it needs to be recompiled and PowerFactory needs to be restarted for the changes to take effect, which slows down the workflow, model development, and inhibits rapid prototyping. In this paper we present an open source library that allows users to call Python functions and methods from DSL with minimal effort. Python is a powerful and much easier to use language than C or C++. Additionally, Python programs do not need to be compiled. Furthermore, with this library PowerFactory does not need to be restarted every time the Python code is changed. To illustrate what can be accomplished with our library we present three example use cases related to load modeling, co-simulation, and fault detection based on machine learning. The examples show that it becomes straightforward to enhance DSL with Python and that sophisticated models can be produced with reduced effort using popular open source Python libraries. As a consequence, PowerFactory users gain access to enhanced modeling capabilities and user-friendliness, and a more speedy workflow, which is beneficial for rapid prototyping.