Skip to main content

A dynamic estimator for power systems

Project description

PowerDynamicEstimator

a Dynamic State Estimator for Power Systems

View Documentation View Paper


About

PowerDynamicEstimator is a dynamic state estimation (DSE) tool for power systems modeled by nonlinear Differential-Algebraic Equations (DAEs). It is based on the Iterated Extended Kalman Filter (IEKF) and combines dynamic evolution equations, algebraic network equations, and phasor measurements to recursively estimate dynamic and algebraic states. It is especially suitable for centralized power systems DSE, when some component models are missing or unknown.

Features

  • Simultaneous dynamic and algebraic (nodal voltage) states estimation
  • Supports nonlinear DAE power system models
  • Works with missing or unknown component models (unknown injectors)
  • Supports bounds (limits) on differential states
  • Supports explicit (forward Euler) and implicit (backward Euler and trapezoidal rule) integration schemes
  • Supports 50 Hz and 60 Hz systems
  • Configurable as Extended Kalman Filter (EKF) for fast execution or Iterated Extended Kalman Filter (IEKF) for more accurate estimation
  • Possible to simulate any power system topology
  • Easy to configure Kalman filter settings
  • User-defined dynamic and static models can be integrated.

Installation

To get started with PowerDynamicEstimator, follow these steps:

Option 1: Install from Source (with venv)

  1. Clone the repository:
git clone https://gitlab.nccr-automation.ch/mkatanic/powerdynamicestimator
cd PowerDynamicEstimator
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate 
  1. Install Dependencies:
pip install -r requirements.txt

Option 2: Install from Source (with conda)

  1. Clone the repository:
git clone https://gitlab.nccr-automation.ch/mkatanic/powerdynamicestimator
cd PowerDynamicEstimator
  1. Create the conda environment:
conda env create -f environment.yaml
conda activate pydynamicestimator

Option 3: Install from PyPI

pip install pydynamicestimator

Documentation

Full documentation is available online at:

👉 https://powerdynamicestimator-34b372.pages.nccr-automation.ch/

Alternatively, the documentation following the Sphinx standard and can be found locally by opening ./docs/build/html/index.html from the root folder:

Windows:

start docs/build/html/index.html

Linux:

xdg-open docs/build/html/index.html

macOS:

open docs/build/html/index.html

Usage

Running the Estimator

  1. Navigate to the root directory:
cd pydynamicestimator
  1. Run the main script:
python -m main

Examples

You can check out the available examples in ./examples directory and get started with the estimator. See the docu for more details about the test cases.

Basic Usage

An interactive demo showcasing how to use the PowerDynamicEstimator package is available on Kaggle:

Kaggle

IEEE 39 bus with renewables

The test case includes grid-forming and grid-following converters.

Kaggle

Important Notes

  • Injector Limitation: Currently, the system supports only one injector per node due to initialization ambiguity. To handle multiple injectors per node, you can create a new node connected via a branch with very small impedance to simulate this behavior.

Parameters

System dynamic and static parameters, including the topology, are specified in the ./data subfolder. You can define the loads, generators, and their characteristics at specific nodes in the power system. Refer to the documentation for additional details.

Phasor Measurement Units (PMUs) used for estimation and their associated characteristics are defined in the file: ./data/.../est_param.txt.

Kalman Filter Settings

Adjust parameters related to the recursive state estimation process (e.g., noise covariance, initial error) in the ./config.py file. Refer to the documentation for additional details.

Acknowledgments

PowerDynamicEstimator was developed at Power Systems Laboratory at ETH Zurich. This work was supported as a part of NCCR Automation, a National Centre of Competence in Research, funded by the Swiss National Science Foundation (grant number 51NF40_225155).

If you use PowerDynamicEstimator in your research, please cite the following paper:

  • Katanic, Milos, Lygeros, John, Hug, Gabriela. "Recursive dynamic state estimation for power systems with an incomplete nonlinear DAE model." IET Generation, Transmission & Distribution, 18(22), 3657-3668, 2024.
    DOI: https://doi.org/10.1049/gtd2.13308
@article{powerdynamicestimator,
  author = {Katanic, Milos and Lygeros, John and Hug, Gabriela},
  title = {Recursive dynamic state estimation for power systems with an incomplete nonlinear DAE model},
  journal = {IET Generation, Transmission \& Distribution},
  volume = {18},
  number = {22},
  pages = {3657-3668},
  keywords = {differential algebraic equations, Kalman filters, state estimation},
  doi = {https://doi.org/10.1049/gtd2.13308}, 
  url = {https://ietresearch.onlinelibrary.wiley.com/doi/abs/10.1049/gtd2.13308},
  eprint = {https://ietresearch.onlinelibrary.wiley.com/doi/pdf/10.1049/gtd2.13308},
  year = {2024}
}

Some proofs were omitted due to page limitation. Full version of the paper is available on ArXiv.

Version

Version 0.4.1 released on 13.05.2025
DOI: 10.5905/ethz-1007-842

License

This software is licensed under the GNU General Public License v3.0 (GPL-3.0).

Contact

For any questions or if you desired to contribute to this project, please contact me at mkatanic@ethz.ch.

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

pydynamicestimator-0.4.1.tar.gz (6.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydynamicestimator-0.4.1-py3-none-any.whl (5.9 MB view details)

Uploaded Python 3

File details

Details for the file pydynamicestimator-0.4.1.tar.gz.

File metadata

  • Download URL: pydynamicestimator-0.4.1.tar.gz
  • Upload date:
  • Size: 6.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.8.2 Windows/10

File hashes

Hashes for pydynamicestimator-0.4.1.tar.gz
Algorithm Hash digest
SHA256 63e2097f73cc0ebf334012d709618e29850e44d7131ac6a28ca78251092559b4
MD5 92206021ffd4464c7539abafcfb7ddec
BLAKE2b-256 f150e162ab6ffcb2624a3a42f448135f653f22c80b3db68efe778ab6abbc3d66

See more details on using hashes here.

File details

Details for the file pydynamicestimator-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pydynamicestimator-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f0237ee16c9177269eb6da46a2ec5d8cb1eeb7a45a8ee812ffd81ece0b24f2b4
MD5 1102a20b35f21c074f8be9d4a0c69a52
BLAKE2b-256 bd96939485fbc9ce6f20a5a3b40e1dbb5686043001e9cb20e8f6ac9e65ce05d1

See more details on using hashes here.

Supported by

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