Skip to main content

Power System Long-Term Dynamic Simulator

Project description

PSLTDSim = Power System Long-Term Dynamic Simulator

Purpose: Use Python and PSLF to simulate long-term power system dynamics.

Examples of long-term dynamics:

  1. A 20 minute wind ramp that forces a governor action response that in turn affects the area control error (ACE) which is later corrected by automatic generator control (AGC [a.k.a. load frequency control or LFC]).
  2. A Generator is tripped in an area that is importing power. Governor action from other areas will respond before AGC works to restore tie-line balance.
  3. A multi-hour simulation of a daily load cycle and forcast used to assure AGC algorithm operates within NERC mandates.

Warning: Work in progress - everything may be broken. Nothing guaranteed.

To install package from git repository: "pip install -e ." from this directory with administrative privleges. If python 3 32 bit is not default python: "py -3-32 -m pip install -e ." Requires IronPython (32 bit) to be on system path.

What this code does:

-Uses an agent-based approach to power system modeling.

-Creates a time sequence of power flows while accounting for combined system frequency, all generator mechanical powers and associated staes along with balancing authority states.

-Uses the PSLF system model format and power flow solver.

-Communicates with PSLF via Ironpython.

-Python 3 communicates with Ironpython via AMQP.

-Reads PSLF dyd files and creates python equivalents of one governor (tgov1).

-Implements a generic governor for models that are not fully created in Python (i.e. anything besides tgov1).

-Allows for noise, step, and ramp type perturbances

What this code doesn't do:

-Use definite time controllers to change the status of agents in the system according to user programmable logic.

-Handle tripping of any generator (power-flow solution mysteriously diverges).

Notes:

  • Requires GE PSLF Python API and valid PSLF licencse. (sorry)
  • To workaround GE API issues: Erlang, RabbitMQ, and Ironpython are required.
  • Additional Python packages include:
    • Python 3: Scipy ( for Numpy and Matplotlib) and Pika (for AMQP)
    • Ironpython 2.7 32 bit: Pika (Note: Ironpython must be 32 bit to work with GE PSLF middleware)

Recent Progress:

  • Code refactored to:
    • Utilize Py3<->AMQP<->IPY<-> PSLF workarounds
    • Allow for generic automation using agent current value dictionaries
    • Enable easier code packaging
    • Clarify code structure
  • Code creates python mirror of PSLF areas, buses, generators, loads, branch sections, and shunts.
  • Code has been written to:
    • Check accuracy of mirror
    • Ignore islanded objects
    • Allow for optional Vsched or Vinit of bus Voltage setting
    • Parse .dyd files (more than one)
    • Parse .ltd files
    • Handle H (inertia)
    • Add noise, step, and ramp perturbances to most any agent value
    • Set area wide governor deadbands
    • Incorporate balancing authority actions into simulation
    • Parse EIA data for multi-hour demand/forcast simulation
    • Distribute changes in Pacc according to inertia
    • Exectute Combined Swing equation
    • Step dynamic modles (tgov1 and genericGov)
    • Log values of interest
    • Generate data dictionary
    • Import/Export Mirror or data data dictionary via shelve
    • Export Model or data data dictionary from Python 3.x to MATLAB .mat file
    • Generate terminal output
    • Generate plots via matplotlib
    • Run multiple simulations in a batch style and handle errors in a non-show stopping way
  • MATLAB scripts created to verify and validate simulation outputs
    • Frequency, Pe, Pm, Q, and Voltage Magnitude and Angle compared to PSDS.
    • Branch power flow of P, Q, and I.
    • Accounts for loss of system inertia and change in system losses.

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

PSLTDSim-0.1.0.tar.gz (65.7 kB view details)

Uploaded Source

Built Distribution

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

PSLTDSim-0.1.0-py3-none-any.whl (128.4 kB view details)

Uploaded Python 3

File details

Details for the file PSLTDSim-0.1.0.tar.gz.

File metadata

  • Download URL: PSLTDSim-0.1.0.tar.gz
  • Upload date:
  • Size: 65.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.8

File hashes

Hashes for PSLTDSim-0.1.0.tar.gz
Algorithm Hash digest
SHA256 32ba05d6ccaa31e1b557932765dbe224f15a0025eb805c026d55d1c987eb5a5c
MD5 fcd320c1a55b03bfde22cbb37512dd23
BLAKE2b-256 fd8f426791fa69fa1772df5d8e09b45d5aed7acf9aed086c5814dc0151ab8232

See more details on using hashes here.

File details

Details for the file PSLTDSim-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: PSLTDSim-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 128.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.8

File hashes

Hashes for PSLTDSim-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 deb4f6596b0ef19ef53fbfb3563eda1c0e391a3829772405af912fba868a2ad7
MD5 72cfba27e5b883c0fd2d84f667c35114
BLAKE2b-256 491e7b6b93893f368ab6d651764e050ed56c6209c305ad7de1087ab84e1ff623

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