Skip to content

OpenDSS

ce_as_ar edited this page Jul 19, 2017 · 5 revisions

System Requirements

  • Python 2.5.X or higher.
  • Windows 7 or higher OS on PC / Virtual machine. (OpenDSS Application is only available for Windows).

Configuration Options

  • On the DGI, in the config/adapter.xml file. An adapter has to be added with the type = "opendss". here is an example.

    <adapter name = "simulation" type = "opendss"> <info> <host>localhost</host> <port>1888</port> </info> <state> <entry index = "1"> <type>Sst</type> <device>SST</device> <signal>gateway</signal> </entry> </state> <command> <entry index = "1"> <type>Sst</type> <device>SST</device> <signal>gateway</signal> </entry> </command> </adapter>

  • On the Device Server, in the config/rtds.xml file an adapter for both the DGI and opendss application have to be added with the respective types and ports. Here is an example.

    • For the DGI

    <adapter type = "dgi" port = "1888"> <state> <entry index = "1"> <device>SST1</device> <signal>gateway</signal> </entry> </state> <command> <entry index = "1"> <device>SST1</device> <signal>gateway</signal> </entry> </command> </adapter>

    • For the OpenDSS app.

    <adapter type = "opendss" port = "1887"> <state> <entry index = "1"> <device>SST1</device> <signal>gateway</signal> </entry> </state> <command> <entry index = "1"> <device>SST1</device> <signal>gateway</signal> </entry> </command> </adapter>

  • Lastly, For the OpenDSS, an edit to the HI:7NodesSystem.dss script is required to call the command prompt and run the python script. Here is what the edit to the script looks like. Export Voltages DOScmd /k FilePath (file path is the path to the python.py script typically this is opendss-interface/scripts/python.py)

How to Run

  1. After all the configurations are set, Run the opendss-interface (Device server).
  2. Run the OpenDSS application in Windows to generate CSV data and call the python script.
  3. Run the DGI.

The current code is only a template written to be edited according to your opendss needs. All commands are just test cases to simulate the process.

Implementation Details

OpenDss Arch

On The DGI. The OpenDss adapter handles all communication with the opendss-interface (device server). The OpenDss adapter expects CSV data to be sent from the opendss-interface on start. Using this data the DGI can set up openDSS devices and then send commands to the opendss-interface. More functionality can be added to the DGI opendss module but due to lack of a good understanding of OpenDSS as an application, this is all the functionality available so far.

On the Device Server/ opendss-interface This acts as a relay of messages between the openDSS application and DGI. The opendsss-interface uses the DGI adapter to communicate with the DGI and the OpenDSS adapter to communicate with the OpenDSS python script.

On the OpenDSS application side Here, after the application runs, a script is used to generate CSV data and also launch the command prompt that runs the python script that gets the CSV data and send it to the open-dss interface, then waits for commands from the DGI.

When commands are received, the script sets up an OpenDSS com server in the windows registry and sets settings for the openDSS application. Which settings are loaded when the application is run again.

That is the opendss implementation.

Again this process can be enhanced to fit your needs for the openDSS application. We used a rather easy implementation to make customization easy.

Clone this wiki locally