Skip to content

EmilyYLMa/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. On Windows only, patch the configuration:
    • Add to rwstore.properties com.bigdata.rwstore.RWStore.readBlobsAsync=false
    • Invoke jar uf blazegraph.jar RWStore.properties
  3. To start Blazegraph, invoke from a terminal java -server -Xmx4g -Dfile.encoding=UTF-8 -jar blazegraph.jar
  4. Point browser to http://localhost:9999/blazegraph
    • On-line help on Blazegraph is available from the browser
  5. Load some data from a CIM XML file, or any other XML triple-store
  6. 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 3 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 3 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

Usage and option for java gov.pnnl.goss.cim2glm.CIMImporter [options] output_root

  • -o={glm|dss} // 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 uri (if connecting over HTTP); defaults to http://localhost:9999

Circuit Validation

This is work in progress; Linux/Mac has not been tested. 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
    • 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, 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 that will solve all supported test circuits in GridLAB-D

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 81.2%
  • Python 17.9%
  • Other 0.9%