Coder Social home page Coder Social logo

pfpy's Introduction

PFPy - PowerFactory with Python

Documentation Status

PFPy provides a wrapper around PowerFactory's Python API with additional features in pfpy.pf. Furthermore, pfpy.models provides a high-level access to PowerFactory models, e.g. via:

  • model.simulate()
  • model.linearize()
  • model.set_params()

It has been developed at the Division of Electric Power and Energy Systems, KTH Royal Institute of Technology.

The code has been tested with PowerFactory 2019 and PowerFactory 2020.

Installation

The module can be installed using pip as follows:

pip install pfpy

All the requirements except powerfactory API should be installed. Note that $PYTHONPATH needs to point to the PowerFactory Python API to be able to use it. It is located in %POWERFACTORYPATH/Python/%version. The code has been tested with Python 3.7 and 3.8.

Examples

The PowerFactory model used in all of the examples is located in ./examples/data/models/PFPY_DEMO.pfd

Simulation Example

The simulation of the aforementioned model is demonstrated in the simulation example. The model contains a controllable voltage source at the PCC. CSV files are generated that are replayed at the PCC, simulation is executed and the results are plotted.

Linearization Examples

The same model is linearized as seen from the PCC in the following Jupyter notebook. When compared to the linearization in PowerFacory, this code, in addition to the A matrix, provides also B,C, and D matrices.

Documentation

Automatically generated documentation from docstrings can be found here.

Acknowledgments

Parts of this code were inspired by the following book: Francisco Gonzalez-Longatt, José Luis Rueda Torres, Advanced Smart Grid Functionalities Based on PowerFactory, Springer, 2017

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.