Skip to content

Models ~ cyberInverters

Jenny edited this page Mar 7, 2023 · 5 revisions

Introduction

The cyberInverters model shows the impacts of inverter hacks on a feeder including system voltages, regulator actions, and capacitor responses. It leverages PyCIGAR, which is a computational framework for deep Reinforcement Learning and control experiments for the distributed grid, developed by LBNL.

Installation of pycigar for local OMF instances

Install pycigar module by following these instructions. You may need to do the following:
pip install ray
pip install dataclasses
pip install ray[tune]
pip install gym
pip install dm-tree
You may also need to ensure the following pycigar version restrictions are satisfied:
pyglet<=1.5.0,>=1.4.0
setuptools>=41.0.0
ray==1.0.0
numpy<1.19.0
scipy==1.4.1
six>=1.12.0
cloudpickle<1.4.0,>=1.2.0

if you receive an error indicating "no module named 'tree' ", try
pip uninstall tree
pip uninstall dm-tree
pip install --upgrade ray (optional)
pip install dm-tree

Walkthrough

Inputs: Simulation start date: The date and time at which the simulation begins, in ISO (?) format YYYY-MM-DDTHH:mm:SSZ
Simulation length: The duration of the simulation, in the units indicated by the Simulation Units input field. Note that the model applies a warm-up period of 100 to this number, making the full simulation time equal to this number plus 100.
Simulation length units: The measurement units that are to be applied to the Simulation Length input field.
Feeder: Click the button to visualize and modify the loaded circuit. ieee 37 is supplied by default. Users may also load a new .dss circuit definition file into the model by choosing File>OpenDSS Conversion... Note that certain syntax restrictions apply (link to a document of syntax requirements?)
OpenDSS Editor: Click the button to edit the circuit elements in a text-based format using opendss syntax. Note that certain syntax restrictions apply (link to a document of syntax requirements?)
Load and PV Output
Brakpoints File Input:
Miscellaneous File Input:
Storage File Input:
Attack Agent Variable:
Hack Percetnage:
Defense Agent Variable:
Train:

energyStorageInput

Load and PV Output CSV file format

This demand file must be a comma-separated value file (.csv). Microsoft Excel can output this format. It must have at minimum 2 columns, each with a header. One column must represent the demand from a single load, with the load name indicated in the column header. This load is assumed to be co-located with a PV system. A second column represents the amount of power generated by the PV system, where the column header contains the name of the associated load appended with "_pv". The power values within this file may be integer or floating-point demand measurements in watts (W) for every second over the simulation period. Because the model applies a warm-up period, this means that the file must contain at least 100 more rows than the value indicated by the Simulation Length input field (in addition to the header row).

An example of a valid .csv:

s701a,s701a_pv
153.4980952,123.8209212
153.8888622,123.437081
154.2969074,123.6283158
...
154.4709499,123.9691373
154.4376654,124.2434502
154.8067421,124.308612

If you would like to just try out the model, an example demand file is available here.(TODO: Replace this link with a valid .csv file

Breakpoints File format
Miscellaneous File format
Storage File format

Outputs:

Clone this wiki locally