Skip to content

CIM interfaces for GridLAB-D and OpenDSS; data and test scripts for the PNNL taxonomy feeders, EPRI large-circuit and DPV test feeders, and some IEEE test feeders.

therahuljha/Powergrid-Models

 
 

Repository files navigation

GridAPPS-D Feeder Models

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:

Taxonomy 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:

  1. Python 3.x and the NetworkX package are required.
  2. From a command prompt in the taxonomy subdirectory, invoke python FixTransformers.py
  3. Based on ./base_taxonomy/orig*.glm, this creates the updated taxonomy feeders in ./base_taxonomy/new*.glm
  4. From a command prompt in taxonomy/base_taxonomy, invoke
    • run_all_new (on Windows)
    • chmod +x *.sh and then run_all_new.sh (on Linux or Mac OS X)
  5. Twenty-four GridLAB-D simulations should run without errors or significant warnings

GridLAB-D to OpenDSS Conversion

After processing the taxonomy updates, OpenDSS conversion proceeds as follows:

  1. From a command prompt in the taxonomy subdirectory, invoke python converter_gld_dss.py
  2. This will create twenty-four directories like ./new_GC_12_47_1 with an OpenDSS model and bus coordinates in several files
  3. 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

CIM Translations

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:

  1. Download the Blazegraph jar file
  2. Make sure to run Java 8. There have been reports that Blazegraph isn't compatible with Java 9 yet.
  3. On Windows only, patch the configuration:
    • Add to rwstore.properties com.bigdata.rwstore.RWStore.readBlobsAsync=false
    • Invoke jar uf blazegraph.jar RWStore.properties
  4. To start Blazegraph, invoke from a terminal java -server -Xmx4g -Dfile.encoding=UTF-8 -jar blazegraph.jar
  5. Point a web browser to http://localhost:9999/blazegraph
    • On-line help on Blazegraph is available from the browser
  6. 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
  7. Load some data from a CIM XML file, or any other XML triple-store
  8. 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

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

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)
  • -r={0..1} // determine ZIP load fraction based on given xml file or randomized fractions
  • -h={0..1} // determine if house load objects should be added to supplement EnergyConsumers
  • -u={http://localhost:9999/blazegraph/namespace/kb/sparql} // blazegraph uri (if connecting over HTTP); defaults to http://localhost:9999/blazegraph/namespace/kb/sparql

Circuit Validation

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 invoke opendsscmd 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 invoke opendsscmd 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

About

CIM interfaces for GridLAB-D and OpenDSS; data and test scripts for the PNNL taxonomy feeders, EPRI large-circuit and DPV test feeders, and some IEEE test feeders.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 69.1%
  • Python 28.7%
  • Shell 1.7%
  • Other 0.5%