SolarPV-DER-simulation-utility
Allows user to run dynamics simulations for solar photovoltaic distributed energy resource connected to a stiff voltage source or to an external program.
https://github.com/tdcosim/SolarPV-DER-simulation-tool
Category: Renewable Energy
Sub Category: Photovoltaics and Solar Energy
Last synced: about 19 hours ago
JSON representation
Repository metadata
Allows user to run dynamics simulations for solar photovoltaic distributed energy resource connected to a stiff voltage source or to an external program. It allows modifying DER parameters, introducing external disturbance events, and visualizing the simulation results. The PV-DER (inverter) is modeled using dynamic phasor concept.
- Host: GitHub
- URL: https://github.com/tdcosim/SolarPV-DER-simulation-tool
- Owner: tdcosim
- License: other
- Created: 2019-03-19T21:59:40.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-09-29T01:26:45.000Z (over 1 year ago)
- Last Synced: 2025-04-17T22:43:28.333Z (10 days ago)
- Language: Python
- Homepage:
- Size: 3.13 MB
- Stars: 39
- Watchers: 6
- Forks: 6
- Open Issues: 2
- Releases: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
README.md
Status: Expect regular updates and bug fixes.
Tool for simulating dynamics of PV-DER
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:
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:
- Single phase, three phase balanced, and three phase unbalanced (phase voltages may be unbalanced) DER models.
- Run simulation in stand alone mode with internal grid voltage source (stiff) model.
- Run simulation in loop mode where grid voltage is supplied every time step by a third party program.
- Customize all aspects of the model through a JSON file which provides access to parameters in all the model components.
- Visualize or retrieve simulation results for voltages, current, active, and reactive power.
- Introduce solar insolation events (in all modes), grid voltage, and frequency change events (in stand alone mode).
- Retrieve and modify model parameters from a third party program.
- Following smart inverter features are available: Low/High voltage ride through (LVRT/HVRT), Low frequency ride through (LFRT), and Volt-VAR control logic.
Links
- Source code repository: https://github.com/sibyjackgrove/SolarPV-DER-simulation-tool
- API Documentation: https://solarpv-der-simulation-utility.readthedocs.io/en/latest/
- Additional documentation: Description of attributes and methods
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:
- Argonne Transmission and Distribution systems Co-Simulation tool (TDcoSim)
- 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.
- 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
- Create a SimulationEvents object: This object is used to add or remove disturbance events occurs during the simulation.
events = SimulationEvents()
- 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)
- 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)
- 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)
- Create a SimulationResults object: This object is used to visualize the simulation results.
results = SimulationResults(simulation = sim)
- Add an event (for e.g. solar insolation change at 10.0 s):
events.add_solar_event(10,90)
- 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
- Specify simulation stop time (for e.g. 20.0 s):
sim.tStop = 20.0
- Run the simulation:
sim.run_simulation()
- 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:
Running simulation in loop mode:
Voltage anomaly, ride through, and momentary cessation:
Frequency anomaly, ride through, and trip:
Module details
A schematic of the relationship between differen classes in the module is shown in the figure below:
Issues
Please feel free to raise an issue for bugs or feature requests.
Who is responsible?
Core developer:
- Siby Jose Plathottam [email protected]
Contributor:
- Karthikeyan Balasubramaniam [email protected]
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.
Owner metadata
- Name: TDcoSim Team
- Login: tdcosim
- Email: [email protected]
- Kind: organization
- Description: PSSE + OpenDSS + DER co-simulation project
- Website:
- Location: Chicago
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/52003368?v=4
- Repositories: 2
- Last ynced at: 2023-03-09T23:40:42.826Z
- Profile URL: https://github.com/tdcosim
GitHub Events
Total
- Watch event: 4
Last Year
- Watch event: 4
Committers metadata
Last synced: 8 days ago
Total Commits: 200
Total Committers: 4
Avg Commits per committer: 50.0
Development Distribution Score (DDS): 0.255
Commits in past year: 8
Committers in past year: 1
Avg Commits per committer in past year: 8.0
Development Distribution Score (DDS) in past year: 0.0
Name | Commits | |
---|---|---|
Siby Jose Plathottam | s****e@g****m | 149 |
Plathottam | s****m@a****v | 48 |
Karthik | k****m@a****v | 2 |
Yim | y****m@a****v | 1 |
Committer domains:
- anl.gov: 3
Issue and Pull Request metadata
Last synced: 2 days ago
Total issues: 16
Total pull requests: 21
Average time to close issues: about 1 month
Average time to close pull requests: about 3 hours
Total issue authors: 4
Total pull request authors: 2
Average comments per issue: 1.81
Average comments per pull request: 0.19
Merged pull request: 19
Bot issues: 0
Bot pull requests: 0
Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- sibyjackgrove (9)
- AadilLatif (4)
- faezahafiz (2)
- Inalvis (1)
Top Pull Request Authors
- sibyjackgrove (19)
- Khanyisa-Ngejane (2)
Top Issue Labels
- enhancement (11)
- bug (5)
- question (1)
- good first issue (1)
Top Pull Request Labels
- enhancement (14)
- bug (4)
Package metadata
- Total packages: 1
-
Total downloads:
- pypi: 415 last-month
- Total dependent packages: 2
- Total dependent repositories: 1
- Total versions: 9
- Total maintainers: 2
pypi.org: pvder
Utility for simulating PV-DER
- Homepage: https://github.com/tdcosim/SolarPV-DER-simulation-tool
- Documentation: https://pvder.readthedocs.io/
- Licenses: LICENSE.txt
- Latest release: 0.6.0 (published over 1 year ago)
- Last Synced: 2025-04-26T13:32:37.277Z (2 days ago)
- Versions: 9
- Dependent Packages: 2
- Dependent Repositories: 1
- Downloads: 415 Last month
-
Rankings:
- Dependent packages count: 7.31%
- Stargazers count: 11.284%
- Downloads: 11.693%
- Average: 13.33%
- Forks count: 14.274%
- Dependent repos count: 22.088%
- Maintainers (2)
Dependencies
- ipykernel *
- nbsphinx *
- nbsphinx-link *
- sphinx >=1.4
- sphinx-rtd-theme *
- matplotlib >=2.2.2
- numpy >=1.15.1
- scipy >=1.0.0
- xlsxwriter >=1.1.5
- matplotlib >=2.0.2
- numpy >=1.15.1
- scipy >=1.0.0
Score: 11.140121139101613