This repository contains distribution feeder model converters and validation tools for the GridAPPS-D project. It is also a standalone source of models in these formats:
from these sources:
- IEEE Distribution Test Cases
- PNNL Taxonomy of North American Feeders
- EPRI Large OpenDSS Test Feeders
- EPRI Distributed Photovoltaic (DPV) Test Feeders
The original taxonomy feeders have been updated as follows:
- more realistic transformer impedance and core parameters
- use only standard single-phase and three-phase transformer sizes
- more appropriate secondary and load voltages, based on the size and type of load
- alleviate line, cable and transformer overloads
- choose fuse current limits from standard fuse, recloser and breaker sizes
- add margin to fuse current limits so they don't blow during steady state. Note: This had to be redone because the new load voltage levels increased many of the component currents.
- assign capacitor nominal voltages based on the nominal primary voltage
- incorporate the xy coordinates from Michael A. Cohen Note: The xy coordinates are used in GridAPPS-D, CIM and OpenDSS, but not standalone GridLAB-D
- remove assertion statements
The solution results change, so GridLAB-D regression tests may continue using the original taxonomy feeders from the GridLAB-D repository. The updated taxonomy feeders are recommended for research projects, as the updates produce more realistic results, especially for voltage and overload questions.
In order to update the taxonomy feeders:
- Python 3.x and the NetworkX package are required.
- From a command prompt in the
taxonomy
subdirectory, invokepython FixTransformers.py
- Based on
./base_taxonomy/orig*.glm
, this creates the updated taxonomy feeders in./base_taxonomy/new*.glm
- From a command prompt in
taxonomy/base_taxonomy
, invokerun_all_new
(on Windows)chmod +x *.sh
and thenrun_all_new.sh
(on Linux or Mac OS X)
- Twenty-four GridLAB-D simulations should run without errors or significant warnings
After processing the taxonomy updates, OpenDSS conversion proceeds as follows:
- From a command prompt in the
taxonomy
subdirectory, invokepython converter_gld_dss.py
- This will create twenty-four directories like ./new_GC_12_47_1 with an OpenDSS model and bus coordinates in several files
- From a command prompt in one of those subdirectories, invoke
opendsscmd Master.dss
to run the simulation- opendsscmd is the cross-platform solver used in GridAPPS-D.
- You may also use the Windows GUI version, OpenDSS.exe, to open and solve Master.dss
The blazegraph subdirectory contains a Java program and script files to manage the feeder model conversions to and from CIM. Maven and Java are required.
To set up and test the converter:
- Download the Blazegraph jar file
- Make sure to run Java 8. There have been reports that Blazegraph isn't compatible with Java 9 yet.
- On Windows only, patch the configuration:
- Add to rwstore.properties
com.bigdata.rwstore.RWStore.readBlobsAsync=false
- Invoke
jar uf blazegraph.jar RWStore.properties
- Add to rwstore.properties
- To start Blazegraph, invoke from a terminal
java -server -Xmx4g -Dfile.encoding=UTF-8 -jar blazegraph.jar
- Point a web browser to http://localhost:9999/blazegraph
- On-line help on Blazegraph is available from the browser
- Create the Blazegraph namespace kb and use that for the rest of these examples
- You can use a different namespace, but you'll have to specify that using the -u option for the CIMImporter, handediting the default -u=http://localhost:9999/blazegraph/namespace/kb/sparql
- You can use a different namespace, but you may have to hand-edit some of the Python files (e.g. under the Meas directory)
- The GridAPPS-D platform itself may use a different namespace
- Load some data from a CIM XML file, or any other XML triple-store
- Run a query in the browser
- the file queries.txt contains sample SPARQL that can be pasted into the Blazegraph browser window
Helper scripts on Windows:
- go.bat starts Blazegraph, like item 4 above
- compile.bat recompiles the Java CIM Importer; this step can't be included within import.bat on Windows
- drop_all.bat empties the triple-store
- import.bat will run the Java importer against the triple-store. Within this file:
- the
-o=dss
option creates an OpenDSS model from CIM - the
-o=glm
option creates a GridLAB-D model from CIM
- the
Helper scripts for Linux/Mac OS X:
- start_server.sh starts Blazegraph, like item 4 above
- import.sh will compile and run the Java importer against the triple-store. Within this file:
- the
-o=dss
option creates an OpenDSS model from CIM - the
-o=glm
option creates a GridLAB-D model from CIM - the
-o=idx
option creates a JSON index of all Feeders in the triple-store. Use this to obtain valid mRID values for the -s option
- the
Usage and options for java gov.pnnl.goss.cim2glm.CIMImporter [options] output_root
-s={mRID} // select one feeder by CIM mRID; selects all feeders if not specified
-o={glm|dss|idx} // output format; defaults to glm
-l={0..1} // load scaling factor; defaults to 1
-f={50|60} // system frequency; defaults to 60
-n={schedule_name} // root filename for scheduled ZIP loads (defaults to none), valid only for -o=glm
-z={0..1} // constant Z portion (defaults to 0 for CIM-defined LoadResponseCharacteristic)
-i={0..1} // constant I portion (defaults to 0 for CIM-defined LoadResponseCharacteristic)
-p={0..1} // constant P portion (defaults to 0 for CIM-defined LoadResponseCharacteristic)
-u={http://localhost:9999/blazegraph/namespace/kb/sparql} // blazegraph uri (if connecting over HTTP); defaults to http://localhost:9999/blazegraph/namespace/kb/sparql
This is work in progress; essential changes to DPV J1 are not yet under version control. The goal is to verify round-trip model translation and solution between the supported model formats. There are currently four supporting Python files in the blazegraph subdirectory:
- MakeConversionScript.py creates ConvertCDPSM.dss that will batch-load all supported test circuits into OpenDSS, and export CIM XML
- Use this first
- Assumes the OpenDSS source tree has been checked out to c:\opendss
- Assumes the EPRI DPV models have been downloaded to directories like c:\epri_dpv|J1 or ~/src/epri_dpv/J1
- After
python MakeConversionScript.py
invokeopendsscmd ConvertCDPSM.dss
- MakeLoopScript.py loads the CIM XML files one at a time into Blazegraph, and then extracts a feeder model
- Use this after MakeConversionScript.py
- Blazegraph must be set up
- Invoke
python MakeLoopScript.py -b
to make convert_xml.bat or convert_xml.sh, which converts all CIM XML into DSS and GLM files - Invoke
python MakeLoopScript.py -d
to make check.dss, after which invokeopendsscmd check.dss
to batch-solve all converted DSS files
- MakeTable.py gathers OpenDSS solution summary information from CSV files into table.txt
- MakeGlmTestScript.py creates check_glm.bat or check_glm.sh that will solve all supported test circuits in GridLAB-D