Skip to main content

Utility for simulating PV-DER

Project description

Status: Expect regular updates and bug fixes.

Tool for simulating dynamics of PV-DER

Build Status PyPI - Downloads CodeFactor

Solar photovoltaic distributed energy resources (PV-DER) are power electronic inverter based generation (IBG) connected to the electric power distribution system (eg. roof top solar PV systems). This tool can be used to simulate the dynamics of a single DER connected to a stiff voltage source as shown in the following schematic:

schematic of PV-DER

Basics

The dynamics of the DER are modelled using dynamic phasors. Detailed description of the concepts behind this tool can be found in the IEEE publication Dynamic Modeling of Solar PV Systems for Distribution System Stability Analysis and detailed list of equations can be found in the Model specification document.

Features

The following features are available currently:

  1. Single phase, three phase balanced, and three phase unbalanced (phase voltages may be unbalanced) DER models.
  2. Run simulation in stand alone mode with internal grid voltage source (stiff) model.
  3. Run simulation in loop mode where grid voltage is supplied every time step by a third party program.
  4. Customize all aspects of the model through a JSON file which provides access to parameters in all the model components.
  5. Visualize or retrieve simulation results for voltages, current, active, and reactive power.
  6. Introduce solar insolation events (in all modes), grid voltage, and frequency change events (in stand alone mode).
  7. Retrieve and modify model parameters from a third party program.
  8. Following smart inverter features are available: Low/High voltage ride through (LVRT/HVRT), Low frequency ride through (LFRT), and Volt-VAR control logic.

Links

Installation

Dependencies:

  • SciPy >= 1.2.1
  • Numpy >= 1.16.2
  • Matlplotlib >= 3.0.3

Install latest release:

pip install pvder

Install from source:

git clone https://github.com/tdcosim/SolarPV-DER-simulation-tool.git
cd SolarPV-DER-simulation-tool
pip install -e .

Use cases

Following projects are using Solar PV-DER simulation tool:

  1. Argonne Transmission and Distribution systems Co-Simulation tool (TDcoSim)
  2. OpenAI Gym Distributed Energy Resource Environment (Gym-DER)

Using the tool

This tool can be imported as a normal python module:

import pvder

Using the stand alone single phase DER model with 10 kW power rating

The following steps are required. Additional documentation on attributes and methods are available here.

  1. First import the following classes:
from pvder.DER_components_single_phase import SolarPV_DER_SinglePhase
from pvder.grid_components import Grid
from pvder.dynamic_simulation import DynamicSimulation
from pvder.simulation_events import SimulationEvents
from pvder.simulation_utilities import SimulationResults
  1. Create a SimulationEvents object: This object is used to add or remove disturbance events occurs during the simulation.
events = SimulationEvents()
  1. Create a Grid object: This object describes the steady state model for the grid voltage source. It needs to be supplied with an SimulationEvents object.
grid = Grid(events=events)
  1. Create a SolarPV_DER_SinglePhase or SolarPV_DER_ThreePhase object: This object describes the dynamic DER model. It needs both an SimulationEvents object, and a path name for JSON file containing the DER configuration parameters. It also needs a Grid object in stand alone mode). Additionaly either the power rating of the DER or the id for the parameter dictionary should be provided.
PV_DER = SolarPV_DER_SinglePhase(events=events,configFile=r'config_der.json',gridModel=grid,derId= '10',standAlone = True)
  1. Create a DynamicSimulation object: This object runs the simulation and stores the solution. It takes SimulationEvents, Grid and, SolarPV_DER_SinglePhase objects as arguments.
sim = DynamicSimulation(grid_model=grid,PV_model=PV_DER,events = events)
  1. Create a SimulationResults object: This object is used to visualize the simulation results.
results = SimulationResults(simulation = sim)
  1. Add an event (for e.g. solar insolation change at 10.0 s):
events.add_solar_event(10,90)
  1. Specify simulation flags (for e.g. set the DEBUG_SIMULATION and DEBUG_POWER flag to true to observe the power at each time step.):
sim.DEBUG_SIMULATION = False
sim.DEBUG_POWER = False
  1. Specify simulation stop time (for e.g. 20.0 s):
sim.tStop = 20.0
  1. Run the simulation:
sim.run_simulation()
  1. Visualize the results (for e.g. the power output at PCC-LV side):
results.PER_UNIT = False
results.plot_DER_simulation(plot_type='active_power_Ppv_Pac_PCC')

Examples

Try out Jupyter notebooks with usage examples in Google Colab:

Basic usage: Basic usage

Running simulation in loop mode: Updating model parameters

Updating model parameters: Updating model parameters

Voltage anomaly, ride through, and momentary cessation: Voltage anomaly

Frequency anomaly, ride through, and trip: Frequency anomaly

Module details

A schematic of the relationship between differen classes in the module is shown in the figure below: schematic of software architecture

Issues

Please feel free to raise an issue for bugs or feature requests.

Who is responsible?

Core developer:

Contributor:

Acknowledgement

This project was supported by Kemal Celik, U.S. DOE Office of Electricity, Solar Energy Technology Office through the SuNLaMP program.

The authors would like to acknowledge Shrirang Abhyankar and Puspal Hazra for their contribution.

Citation

If you use this code please cite it as:

@misc{pvder,
  title = {{SolarPV-DER-simulation-tool}: A simulation tool for or solar photovoltaic distributed energy resources},
  author = "{Siby Jose Plathottam,Karthikeyan Balasubramaniam}",
  howpublished = {\url{https://github.com/sibyjackgrove/SolarPV-DER-simulation-tool}},
  url = "https://github.com/sibyjackgrove/SolarPV-DER-simulation-tool",
  year = 2019,
  note = "[Online; accessed 19-March-2019]"
}

Copyright and License

Copyright © 2019, UChicago Argonne, LLC

Photovoltaic Distributed Energy Resource (PV-DER) Simulation tool is distributed under the terms of BSD-3 OSS License.

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

pvder-0.6.0.tar.gz (97.1 kB view details)

Uploaded Source

Built Distribution

pvder-0.6.0-py3-none-any.whl (108.2 kB view details)

Uploaded Python 3

File details

Details for the file pvder-0.6.0.tar.gz.

File metadata

  • Download URL: pvder-0.6.0.tar.gz
  • Upload date:
  • Size: 97.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for pvder-0.6.0.tar.gz
Algorithm Hash digest
SHA256 483e10142c20c5d2ce0a0d39af7c3150adfb273f02b85106399214adfe70f848
MD5 4a2b5b0fcf42e437eca00150015ed0aa
BLAKE2b-256 312dc4e247c118ef0cc97c9a730ff57f583109c6b3944b49012c211d36a2a28a

See more details on using hashes here.

File details

Details for the file pvder-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: pvder-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 108.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for pvder-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa0d01470c8bf2807a75004cd915a54864ae93224c43e784d8e0a101b16ae26e
MD5 fd2394fee6602a7de1a3e645ce4e029b
BLAKE2b-256 58ebaca7f5b7fae9020b43cd2c705025e8701c1b29a6ed5328f7248f619b2eab

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 Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page