- download open-c37.118
- in your local open-c37.118 directory:
$> autogen.sh
$> make
$> sudo make install
on my computer, the libopenc37118-1.0.so is installed in /usr/local/lib
and the include files are located in /usr/local/include/openc37118-1.0
Change your CMakeList.txt according to your own install result (or propose improvements of the CMakeLists.txt
).
the library does implement IEEE Std C37.118.2™-2011 and compatibility with IEEE Std C37.118™-2005 is probably not supported.
in your local fledge-south-c37118 directory :
mkdir build
cd build
cmake
make
sudo cp mobc37118.so /usr/local/fledge/plugins/south/c37118
The plugin is configurable.
C37.118 enables to retrieve the configuration of the sender, that's the easiest and most obvious way of doing it. It's done by setting the attribute REQUEST_CONFIG_TO_SENDER : true
. If you prefere a "hard" configuration you can set it to false
and configure the fields under SENDER_HARD_CONFIG
- which are ignored otherwise. Please note that in the case of hard configuration, if the configuration does not fit to the one of the sender, the plugin behavior can be weird, and could crash.
SPLIT_STATIONS
: From one stream source, C37.118 allow to have multiple data sources. You can decide wether
true
the plugin desagregate the sources into individual readingsfalse
the plugin keeps the multiple sources into one reading.
You can filter on the IDCODE of the stations by filling in STATION_IDCODES_FILTER
. If empty, no filtering is implemented.
-
The
TimeStamp.FRACSEC
first byte indicators is implemented but not tested aspypmu.send_data()
does not implement it (yet) -
Filter to FledgePower pivot format is to be developed.
-
Implement UDP, and TLS
-
not a priority: C37118 CFG-3 implementation
-
Open-c37.118 library
- One bug is identified in the in
PMU_Station *CONFIG_Frame::PMUSTATION_GETbyIDCODE(unsigned short idcode)
which will always get aPMU_station
even if the givenID_CODE
is not affected to any PMU_station. - There are also some minor memory leaks, but that only occurs in during command exchanges, with no impact during real time data stream. Some are already identified by the community issue #2 and PR#3.
- One bug is identified in the in
The plugin was first tested using randomPMU.py example in pypmu.
For multiple PMUs,
- a bug is identified in
pypmu
and a fix is proposed here randomPMU.py
was tweaked as follow:cfg = ConfigFrame2(15, # PMU_ID 1000000, # TIME_BASE 2, # Number of PMUs included in data frame ["Random Station 1", "Random Station 2"], # Station name [6, 7], # Data-stream ID(s) # Data format - POLAR; PH - REAL; AN - REAL; FREQ - REAL; [(True, True, True, True), (True, True, True, True)], [3, 3], # Number of phasors [1, 1], # Number of analog values [1, 1], # Number of digital status words [["VA", "VB", "VC", "ANALOG1", "BREAKER 1 STATUS", "BREAKER 2 STATUS", "BREAKER 3 STATUS", "BREAKER 4 STATUS", "BREAKER 5 STATUS", "BREAKER 6 STATUS", "BREAKER 7 STATUS", "BREAKER 8 STATUS", "BREAKER 9 STATUS", "BREAKER A STATUS", "BREAKER B STATUS", "BREAKER C STATUS", "BREAKER D STATUS", "BREAKER E STATUS", "BREAKER F STATUS", "BREAKER G STATUS"], ["va", "vb", "vc", "analog1", "breaker 1 status", "breaker 2 status", "breaker 3 status", "breaker 4 status", "breaker 5 status", "breaker 6 status", "breaker 7 status", "breaker 8 status", "breaker 9 status", "breaker A status", "breaker B status", "breaker C status", "breaker D status", "breaker E status", "breaker F status", "breaker G status"]], # Channel Names [[(0, "v"), (0, "v"), (0, "v")], [(0, "v"), (0, "v"), (0, "v")]], # Conversion factor for phasor channels - (float representation, not important) # Conversion factor for analog channels [[(1, "pow")], [(1, "pow")]], # Mask words for digital status words [[(0x0000, 0xffff)], [(0x0000, 0xffff)]], [50, 50], # Nominal frequency [1, 1], # Configuration change count 500) # Rate of phasor data transmission) ... pmu.send_data(phasors=[[(random.uniform(215.0, 240.0), random.uniform(-0.1, 0.3)), (random.uniform(215.0, 240.0), random.uniform(1.9, 2.2)), (random.uniform(215.0, 240.0), random.uniform(3.0, 3.14))], [(random.uniform(215.0, 240.0), random.uniform(-0.1, 0.3)), (random.uniform(215.0, 240.0), random.uniform(1.9, 2.2)), (random.uniform(215.0, 240.0), random.uniform(3.0, 3.14))]], analog=[[9.91], [9.91]], digital=[[0x0001], [0x0001]], freq=[random.uniform(-10, 10), random.uniform(-10, 10)], dfreq=[random.uniform(-10, 10), random.uniform(-10, 10)], stat=[("ok", True, "timestamp", False, False, False, 0, "<10", 0), ("error", True, "timestamp", False, False, False, 0, "<10", 0)])