Skip to content
forked from cuihantao/ltbnet

Large Scale Test Bed Network Emulator (CURENT @ UTK)

License

Notifications You must be signed in to change notification settings

yuanzy97/ltbnet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LTBNet - Network Emulation and PMU Streaming

Introduction

LTBNet is communication network emulator for power system applications. It can be used to a) define the topology of a communication network, b)stream measurement data between hosts, and c) stream power system control commands.

The LTBNet configuration links the communication network components with the power system measurement devices. Components in the communication network, including hosts, links, switches and routers define the network topology, while the PMU and PDC hosts define the measurement data streaming hierarchy.

Installation

Recommended Environment:

LTBNet is built on top of Mininet and PyPMU. It is recommended to install the provided forks. Note that the earlier versions of Mininet without Python 3 support will not work. The PyPMU fork also have some important changes.

Mininet can only run on Linux systems. We recommend Ubuntu 16.04.5 LTS. Follow the instructions here (Option 2) to install Mininet on a fresh environment. You will need superuser access to install and run Mininet.

PyPMU can be installed by running pip install . in the PyPMU project directory. PyPMU only works in Python 3.

Finally, LTBNet can be installed with pip install . in the LTBNet project directory. The installation will attempt to create two console entry points: ltbnet and minipmu.

ltbnet is the main program to create a communication network topology and instantiate PMU instances. minipmu is an independent program to create a PMU instance that a) receives data from ANDES through DiME, and b) implements the IEEE C37.118-2011 protocol for data streaming over TCP/IP.

Configuration Files

Example configuration files can be found in the folder data. A configuration file defines how the network should be created.

File format

Two formats are currently supported: CSV and JSON. We are migrating from CSV to JSON as the latter offers more flexibility.

The fields in the CSV or the JSON file annotates the components. For each component, Type is an identifier of the type of the device. Supported values for Type and their meaning are the follows:

  • Region: power system region, which generally contains one PDC and multiple PMUs
  • Switch: network switch
  • Router: network router
  • PDC: phasor data concentrator. A PDC concentrates data within the region and sends data to other PDCs when requested
  • PMU: phasor measurement unit. A PMU measures the bus voltage, frequency (and possibly but not implemented, current)at the given bus (es). It is a host in the communication network
  • Link: communication link between any two communication network elements
  • HwIntf: hardware interface. Allow to attach hardware interface to the emulated network

A complete table of the supported fields for each type of component is listed below.

Region Switch Router PMU PDC Link HwIntf
Idx unique identifier < < < < < <
Region region name < < < < - <
Name instance name < < < < < ifconfig NIC name
Longitude longitude value < < < < - <
Latitude Latitude value < < < < - <
MAC - MAC address < < < - -
IP - IP address < < < - -
PMU_IDX - - - idx of the ANDES PMU - - -
From - - - - - From Idx -
To - - - - - To Idx -
Delay - - - - - delay (with unit) <
BW - - - - - bandwidth (Mbps) <
Loss - - - - - data loss rate (%) <
Jitter - - - - - jitter rate (%) <

Note:

  • < means the same as the left
  • - means not applicable. In CSV files, the field should be filled with literal None
  • The fields Delay, BW, Loss and Jitter apply to Link only.
  • Delay is a string with a value and a unit. For example, a 5 millisecond delay is represented as 5ms

Using the config file

The config file is to be used by the ltbnet command-line program. To start a network using config file config_9pmu.json, run the following:

sudo ltbnet config_5pmu.json -v

This enables the verbose mode of LTBNet.

$ sudo ltbnet config_9pmu.csv -v

*** Creating network

*** Adding controller

*** Adding hosts:

C_AESO C_BCTC DEVERS1 DEVERS2 DEVERS3 DEVERS4 DEVERS5 DEVERS6 DEVERS7 DEVERS8 DEVERS9

*** Adding switches:

s0 s1

*** Adding links:

(C_AESO, s0) (C_BCTC, s1) (DEVERS1, s0) (DEVERS2, s0) (DEVERS3, s0) (DEVERS4, s0) (DEVERS5, s0) (DEVERS6, s0) (DEVERS7, s0) (DEVERS8, s0) (DEVERS9, s0) (10.00Mbit) (10.00Mbit) (s1, s0)

*** Configuring hosts

C_AESO C_BCTC DEVERS1 DEVERS2 DEVERS3 DEVERS4 DEVERS5 DEVERS6 DEVERS7 DEVERS8 DEVERS9

*** Adding hardware interface enp4s0f0 to switch S_BCTC

*** Starting controller

c0

*** Starting 2 switches

s0 s1 ...(10.00Mbit) (10.00Mbit)

LTBNet Ready

['DEVERS1', 'DEVERS2', 'DEVERS3', 'DEVERS4', 'DEVERS5', 'DEVERS6', 'DEVERS7', 'DEVERS8', 'DEVERS9']

*** Starting CLI:

To exit, run exit() in the Mininet command line window:

mininet> exit()

*** Stopping 1 controllers

c0

*** Stopping 12 links

............

*** Stopping 2 switches

s0 s1

*** Stopping 11 hosts

C_AESO C_BCTC DEVERS1 DEVERS2 DEVERS3 DEVERS4 DEVERS5 DEVERS6 DEVERS7 DEVERS8 DEVERS9

*** Done

To run a MiniPMU in standalone mode, please refer to minipmu -h.

Package Structure

The LTBNet package is structured as follows:

License, Authors, Contributors and Acknowledgement

LTBNet is released under GNU General Public License 3. See LICENSE.

Author: Hantao Cui (hcui7@utk.edu)

Contributors: Kellen Oleksak

This work was supported in part by the Engineering Research Center Program of the National Science Foundation and the Department of Energy under NSF Award Number EEC-1041877 and the CURENT Industry Partnership Program.

About

Large Scale Test Bed Network Emulator (CURENT @ UTK)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.9%
  • Shell 0.1%