Skip to main content

Power Factory with Python

Project description

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. Note that $PYTHONPATH needs to point to the PowerFactory Python API.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pfpy-0.0.2.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

pfpy-0.0.2-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file pfpy-0.0.2.tar.gz.

File metadata

  • Download URL: pfpy-0.0.2.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.9

File hashes

Hashes for pfpy-0.0.2.tar.gz
Algorithm Hash digest
SHA256 fab7cf9954ff0d3743a72a10006d6fc5359358d15079b5b1697a95a2c712842d
MD5 0e6094989952592feb2887b467b3d147
BLAKE2b-256 4d2e048c8ce10c0f6f3f872f717deeb37d09a3b22ea03461a687f7cf3651644a

See more details on using hashes here.

File details

Details for the file pfpy-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pfpy-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.9

File hashes

Hashes for pfpy-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 82bf38490e87a7315d97c9db4ff9c157208f12591981ca1f67511321e35d6104
MD5 3a43470c81eb2a01f344da5c8058531b
BLAKE2b-256 69ef6f93495162dc2218e20feef58e7d01602c3f6c3f2dc22f82217fd9291e4c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page