Package: pvder
Status:Expect regular updates and bug fixes.Tool for simulating dynamics of PV-DERSolar 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:BasicsThe dynamics of the DER are modelled using dynamic phasors. Detailed description of the concepts behind this tool can be found in the IEEE publicationDynamic Modeling of Solar PV Systems for Distribution System Stability Analysisand detailed list of equations can be found in theModel specification document.FeaturesThe 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 aJSONfile 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.LinksSource code repository:https://github.com/sibyjackgrove/SolarPV-DER-simulation-toolAPI Documentation:https://solarpv-der-simulation-utility.readthedocs.io/en/latest/Additional documentation:Description of attributes and methodsInstallationDependencies:SciPy >= 1.2.1Numpy >= 1.16.2Matlplotlib >= 3.0.3Install latest release:pip install pvderInstall from source:git clone https://github.com/tdcosim/SolarPV-DER-simulation-tool.git
cd SolarPV-DER-simulation-tool
pip install -e .Use casesFollowing 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 toolThis tool can be imported as a normal python module:importpvderUsing the stand alone single phase DER model with 10 kW power ratingThe following steps are required. Additional documentation on attributes and methods are availablehere.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 SimulationResultsCreate aSimulationEventsobject: This object is used to add or remove disturbance events occurs during the simulation.events = SimulationEvents()Create aGridobject: This object describes the steady state model for the grid voltage source. It needs to be supplied with anSimulationEventsobject.grid = Grid(events=events)Create aSolarPV_DER_SinglePhaseorSolarPV_DER_ThreePhaseobject: This object describes the dynamic DER model. It needs both anSimulationEventsobject, and a path name for JSON file containing the DER configuration parameters.  It also needs aGridobject 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 aDynamicSimulationobject: This object runs the simulation and stores the solution. It takesSimulationEvents,Gridand,SolarPV_DER_SinglePhaseobjects as arguments.sim = DynamicSimulation(grid_model=grid,PV_model=PV_DER,events = events)Create aSimulationResultsobject: 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 = FalseSpecify simulation stop time (for e.g. 20.0 s):sim.tStop = 20.0Run 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')ExamplesTry out Jupyter notebooks with usage examples in Google Colab:Basic usage:Running simulation in loop mode:Updating model parameters:Voltage anomaly, ride through, and momentary cessation:Frequency anomaly, ride through, and trip:Module detailsA schematic of the relationship between differen classes in the module is shown in the figure below:IssuesPlease feel free to raise an issue for bugs or feature requests.Who is responsible?Core developer:Siby Jose Plathottamsplathottam@anl.govContributor:Karthikeyan Balasubramaniamkbalasubramaniam@anl.govAcknowledgementThis project was supported by Kemal Celik,U.S. DOE Office of Electricity, Solar Energy Technology Officethrough theSuNLaMPprogram.The authors would like to acknowledgeShrirang Abhyankarand Puspal Hazra for their contribution.CitationIf 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 LicenseCopyright Â© 2019, UChicago Argonne, LLCPhotovoltaic Distributed Energy Resource (PV-DER) Simulation tool is distributed under the terms ofBSD-3 OSS License.