1807hrs V1.1 PowerLine Coordinator V2 FRS
1807hrs V1.1 PowerLine Coordinator V2 FRS
0 Firmware
Requirements Specifications
Update Date: June 27, 2022
The information and methodologies outlined herein are proprietary, trade secret, and copyrighted, with all rights reserved
to Smart Wires. Copying or distributing this material without prior permission is strictly prohibited.
PowerLine Coordinator V2.0 Firmware Requirements Specifications
Revision: 1.1
Revision History
Revision Description Signature Date
Author Asfa Mehmood 30-May-22
Initial PowerLine Coordinator V2.0
1.0 Verified
Requirement Document
Approved
Author Asfa Mehmood 27-June-22
Interphase Balancing
1.1 Verified
Communication Protocol
Approved
Table of Contents
1. Introduction.................................................................................................................................................
1.1. Purpose................................................................................................................................................6
1.2. Scope....................................................................................................................................................6
1.3. Standards and Directives......................................................................................................................8
1.4. Smart Wires PLC V2 Control Board Requirement IDs Structure...........................................................8
1.5. Non-Functional Requirements Specification........................................................................................8
1.6. Quality..................................................................................................................................................8
1.7. PLC V2 Functionality Overview.............................................................................................................9
2. Communication Architecture......................................................................................................................
2.1. Ethernet Communication...................................................................................................................10
2.2. Packet Header....................................................................................................................................10
2.3. Protocol Header.................................................................................................................................11
2.4. Fiber Optics Schedular.......................................................................................................................13
2.5. Network Packets................................................................................................................................14
2.6. Application Data Unit (APDU) Packets...............................................................................................16
2.7. Interphase Balancing (IPB) Communication Protocol.........................................................................23
3. Cyber Security............................................................................................................................................
3.1. Fibre-Optic Network Security.............................................................................................................28
4. References.................................................................................................................................................
List of Figures
Figure 1-1: E2E System Diagram with FO Communications---------------------------------------------------------------------7
Figure 1-2: FO Communications Ring-------------------------------------------------------------------------------------------------8
Figure 1-3: PLC V2 Architecture-------------------------------------------------------------------------------------------------------10
Figure 1-4: PLC V2 Front View---------------------------------------------------------------------------------------------------------10
Figure 1-5: PLC V2 Rear View----------------------------------------------------------------------------------------------------------10
Figure 2-1: Ethernet Packet------------------------------------------------------------------------------------------------------------11
Figure 2-2: Ethernet Type--------------------------------------------------------------------------------------------------------------11
Figure 2-3:Protocol Header------------------------------------------------------------------------------------------------------------12
Figure 2-4: Cmd Type--------------------------------------------------------------------------------------------------------------------12
Figure 2-5: MAC Flags-------------------------------------------------------------------------------------------------------------------13
Figure 2-6: MAC Hash Validation-----------------------------------------------------------------------------------------------------13
Figure 2-7 Protocol Schedular---------------------------------------------------------------------------------------------------------14
Figure 2-8 Unicast Address-------------------------------------------------------------------------------------------------------------15
Figure 2-9 Group Address--------------------------------------------------------------------------------------------------------------15
Figure 2-10 : Application Data Unit Packet Field---------------------------------------------------------------------------------18
Figure 2-11 : Application Data Unit Packet Header for Request Packet----------------------------------------------------18
Figure 2-12 : Application Data Unit Packet Header for Response Packet--------------------------------------------------18
Figure 2-13 Telemetry Commands Scheduling------------------------------------------------------------------------------------21
Figure 2-14 Commands Passes--------------------------------------------------------------------------------------------------------22
Figure 2-15 Interphase Request Packet---------------------------------------------------------------------------------------------24
Figure 2-16 Interphase Request Packet Header----------------------------------------------------------------------------------24
Figure 2-17 Interphase Response Packet-------------------------------------------------------------------------------------------25
Figure 3-1: Device Initialization and Authentication-----------------------------------------------------------------------------31
List of Tables
Table 0-1 Acronyms-----------------------------------------------------------------------------------------------------------------------5
Table 1-1: Requirement IDs Structure------------------------------------------------------------------------------------------------8
Table 1-2: Quality--------------------------------------------------------------------------------------------------------------------------8
Table 1-3: LEDs and their functionalities--------------------------------------------------------------------------------------------9
Table 2-1: APDU Commands-----------------------------------------------------------------------------------------------------------16
Table 2-2: App command sub-type-------------------------------------------------------------------------------------------------17
Table 2-3: Command Target Type--------------------------------------------------------------------------------------------------18
Table 2-4: Scope of packet under various field settings-----------------------------------------------------------------------19
Note
Acronyms
Terms Definition
PLM PowerLine Manager
SWGF Smart Wires Guardian Family
SWFD Smart Wires Field Devices
iFOD i-series Fiber-Optic Driver Board
SV SmartValve
EIU Electrical Injection Unit
EIUC Electrical Injection Unit Controller
SB SmartBypass
FCC Fast Critical Communication
PLC PowerLine Coordinator
NC Network Coordinator
SWAM Smart Wires Data Access and Management Protocol
SWIM Smart Wires ISM Mesh Protocol
PRD Product Requirement Document
MCU Microprocessor Control Unit
OTA Over-the-Air
RSSI Received Signal Strength Indicator
CRC Cyclic redundancy check
NIB Network Interface Bridge
SCR Silicon-Controlled Rectifier
AES Advanced Encryption Standard
FHSS Frequency Hopping Spread Spectrum
TCP/IP Transmission Control Protocol/Internet Protocol
UDP User Datagram Protocol
IEEE Institute of Electrical and Electronics Engineers
DC Direct Current
RMS Root Mean Square
PSU Power Supply Unit
CTP Current Transformer for Power
V&V Verification and Validation
VI Vacuum Interrupter
µp Microprocessors
Desat Desaturation
NTC Negative Temperature Coefficient
VSL Vacuum Switch Link
PLL Phase Lock Loop
FCS Fault Current Sensor
PI Proportional Integral Gains
SWG Smart Wire Grid
Table 0-1 Acronyms
1. Introduction
1.1. Purpose
The purpose of this document is to provide functional requirement specifications for PowerLine Coordinator
V2. The document provides specifications of different functionalities performed by PLC V2. It includes
communications, cybersecurity interphase balancing, and redundancy related information. time
synchronization
1.2. Scope
The PowerLine Coordinator v2 is intended to be a rugged and reliable communication device to serve as an
intermediary between the SmartValves and the PowerLine Gateway™. It is intended to be responsible for
managing the FO communication links between itself and the SmartValves. It will also be responsible for
communicating with the PowerLine Gateway for control and status reporting. The communication with the
PowerLine Gateway will be via a proprietary and secure authenticated protocol over TCP/IP. The PowerLine
Coordinator v2 will be a robust and reliable communication device that acts on behalf of PowerLine Gateway
to:
• Establish a ring-based secure authenticated FO communication link with SmartValves
• Establish a proprietary/authenticated communication link with the SmartValves
• Commission the SmartValves
• Aggregate data and control multiple SmartValves
• Cache and reliably transfer firmware image to the SmartValve devices as part of the Smart Wires’
proprietary firmware upgrade protocol
The PowerLine Coordinator v2 will be an important component of the Smart Wires End-to-End (E2E)
Communication and Control System that enables the utility to seamlessly commission, observe, control, and
maintain the overall Smart Wires solution. Figure 1-1 shows the communication architecture with PowerLine
Coordinator v2 when using the FO communication option.
This document specifies the high-level requirements the PowerLine Coordinator v2 must fulfill.
1.6. Quality
This requirement applies to PLC V2 Bypass Control Board.
Sub-ID Description
The applicable design and regulations for the project must comply with coding and design
1.
guidelines.
The following attributes of the firmware must be taken into consideration:
1. Adaptability
2. Availability/robustness
2. 3. Correctness
4. Maintainability
5. Reusability
6. Testability
Table 1-3: Quality
Description Purpose
POWER 1 System Power
POWER 2 System Power
SYSTEM HEALTH System Health
TIME SYNC Time Synchronization
COMMS Communication Status
2. Communication Architecture
2.1. Ethernet Communication
The communication loop that starts from the primary PLC goes through all field devices A1, B1, and C1
all the way to An, Bn, Cn and terminates at secondary PLC (see Figure 1-2). This communication loop
operates at 1 Gbps (Gigabit per second) which is 125 MBps (Megabytes per second). The maximum
ethernet packet size inclusive of the protocol header and payload can be 1500 bytes.
2.3.6. Cmd Id
Not used currently
2.3.7. MAC Flags
Single byte Mac Flags field is further split into 8 bits. Currently only 2 bits are in use. Rest of the 6 bits
are reserved for future modifications
Mac Security bit is set to indicate that packet has mac security attached in the end of packet. This security
is attained through 4-byte hash value. Hash calculation uses HMAC SHA-256 algorithm with inputs: MAC
header and network key. This hash is calculated on mac layer.
App Security bit has a similar use as that of Mac security bit. It appends hash for application layer payload
and indicates that security needs to be validated. Hash calculation uses HMAC SHA-256 algorithm.
6. Nodes which have not joined the network will listen for Network Membership messages. When an
NM is received, the node will scan this message looking for its address. If its address is not included in
the message, it will reset its addresses and configuration.
7. NM is scheduled periodically with intervals of 375 milli-seconds
2.5.4. Network Challenge Message
1. The Network Challenge message supplements the information in the Network Management message
in order to facilitate a node to join the network. The Network Membership message is only used to let
a node know that it is part of a network. Information presented in the Network Challenge message is
necessary for it to actually join the network.
2. Unlike SWIM, network challenge message in fibre-optic communication is unicast packet.
3. The following information is available in the Network Challenge message.
a. Network Packet Frame Type (0x03)
b. Single byte Nonce length followed by NonceNC. The NonceNC is the authentication challenge
sent out by the PowerLine Coordinator to invite response from targeted SmartBypass device
who want to exchange authentication information with it.
c. PowerLine Coordinator’s address
d. The challenge message will also contain the latest configuration version.
4. The challenge messages are sent only if there are any node addresses left to be authenticated.
5. Challenge messages are scheduled to be sent at an interval of 75 milli-seconds for four passes. In
every fifth slot, membership message is scheduled.
Figure 2-16 : Application Data Unit Packet Header for Request Packet
Figure 2-17 : Application Data Unit Packet Header for Response Packet
1. App Header Length – This parameter contains the header length of the packet. It denotes the index
where payload starts. Application packet header length varies with command type and target type.
2. App Command Type – Defines type of command on a broader level e.g. telemetry, E2E EDR, Firmware
OTA command.
3. App Command Minor Type – Command minor type defines the particular action under app command
type. This parameter is kept zero for app commands which do not need minor command type.
4. App Command Sub Type – Nodes do not respond on all types of commands received from PLC. They
decide on whether to send a response based on this parameter.
Mac Packet
App Command Source Destination
Destination Description
Sub Type Value Device Device
Address
Packet for single node. Node sends
Node address
response. No APP_CMD_FOR_RESP
(0xABCDEF98)
required in this case.
0 PLC Bypass
APP_CMD Nodes do not send response and wait
Broadcast
for APP_CMD_FOR_RESP
(0xFFFFFFFF)
packet from PLC to send response.
Command
Value Packet Scope
Target Type
TARGET_CNV 1 When a single converter is targeted, this value is set in target type field.
This value says a whole unit including bypass and its underlying
TARGET_BYPASS_CNV 2
converters should be targeted.
7. Apply Selection – When a packet is broadcasted, all nodes check if selection is applied. If this field is
marked true, devices only process the command after applying selection filter.
8. Number of Nodes – It is the number of nodes the command is targeted for.
9. Selected IDs – It contains unique Node IDs of nodes which the command is targeting. All nodes look for
their IDs in the list in order to process the packet. Selected IDs list size varies with number of nodes. It
can be of one byte for single unit and maximum 30 bytes for all units in network.
Parameter 9 and 10 i.e. Number of Nodes and Selection IDs are appended only if ‘Apply Selection’ parameter is
marked and ‘Target Type’ is not set as TARGET_CNV.
10. Diagnostics TX Count – Transmission count so far.
11. Diagnostics RX Count – Reception count so far.
12. Reset Diagnostics Cmd – Field to indicate diagnostics count need to be reset.
13. Reserved – This field is kept reserved for future modifications.
Telemetry requests are unicast. Target node address is populated in the packet for the respective
node. The node that is addressed, responds with the telemetry data within the same 5 milliseconds.
There can be a maximum of 10 nodes/devices connected per phase. Which makes a total of 30
devices (max) on all phases. Assuming it takes 5 milliseconds to fetch telemetry data from each device
at alternate schedular pass, it will take a maximum of 2 x 5ms x 30 = 300 milliseconds to get telemetry
data from all devices.
This delay assumes that the communication between PLCs and the devices is based on fiber optic
cable.
If the PLC does not receive telemetry data from a particular device for 6 consecutive cycles
(approximately 2 seconds) then the device will be marked as off-line and this status will be
communicated to the gateway.
If a device is authenticated to be in network with PLC and is marked offline, PLC marks that
node/device as online on receiving telemetry data from this node, and sends this data to the
Gateway.
The telemetry data is sent to the Gateway every 10 seconds.
Telemetry generally comprises of statuses required to monitor PLC and SmartValve devices.
Complete list of telemetry parameters can be seen in the telemetry sheet.
4. If response of a unicast other command is not received to PLC in the same slot, two retries can be made
before clearing this command from FIFO.
5. For multicast and broadcast packet transmission, node address field is set to 0xFF i.e. Broadcast, and
target node IDs are populated in the packet. Nodes, on reception of this packet, will check for their unique
node ID in the packet to decide whether to process the packet or discard it.
6. When nodes receive multicast or broadcast command from PLC, each node waits for a proceeding unicast
command for response of the same type, to send response to PLC. PLC then transmits a unicast command
to all nodes in order to receive response.
7. This unicast command for response has two retries before PLC moves to next unit in network.
8. If all node responses are received, PLC marks command as complete and clears the Tx FIFO.
9. If response from any of the nodes is not received and retries have expired, PLC retries whole command
cycle four times.
10. When all retries have expired, command is discarded and cleared from TX FIFO.
For a 10 units per phase network, the worst-case time to mark a unit offline is around 2 Sec.
One complete cycle of Units = 60 Passes = 300 mSec
6 complete cycles of Units = 6 * 300 mSec ~ 2 Sec
Interphase packets are shared with devices within a group. A group is a set of three Smart Valve devices
connected on each phase. In Figure 1 for example A1, B1 and C1 form a group, A2, B2 and C2 form another
group, and so on. A maximum of 30 devices can be connected in a network, therefore, maximum 10 groups
can be formed. If one device from within a group fails to remain in injection mode due to any external or
internal fault and goes in bypass/monitoring mode, it needs to inform the other two devices in the group so
that they can also stop injecting. If this is not done the phases will become unbalanced. This feature requires
real-time communication between the devices within a group where each device needs to communicate with
the other two to confirm its current mode of operation (injection or monitoring). These devices communicate
through PLC. PLC requests data from nodes and sends this data back to the group.
2.7.1. Packet Type List
There are two types of packets for IPB communication as:
1. Interphase Request Packet, sent from PLC to devices.
2. Interphase Response Packet, sent to PLC from device.
2.7.2. Interphase Request Packet
In each slot two interphase request packets are scheduled from PLC if number of configured groups are
more than 1. If configured group is 1 then just 1 interphase packet will be sent in each slot. Interphase request
packet contains 80-byte packet header. Interphase header field is described in figure 2-15. After the interphase
request header, packet contains 1350 bytes of payload belonging to three phases (450 bytes each phase) of
the group pointed by field “Data Group” in the header. Therefore, in MAC header field, the MAC payload
length is 80+(3*450) = 1430 bytes.
2. Header Length – This field marks the header length. It is also the index at which the payload starts. It has
a fixed value i.e. 80 bytes.
3. Command Type – In case of Interphase packets, currently only one command type is available i.e. Bulk
data request command.
4. Requested Group – It represents the group for which data is requested.
5. Data group – It represents the group whose data is being shared in the payload. In first slot, when no
previous data has been gathered yet, this field is set as 0xFF.
As interphase packet is a broadcast packet so the information of “Data Group” is received by every other
group. Only the group mentioned in ‘Data group field’ will process this packet. Similarly, only “Requested
Group” sends response in return though all groups receive packet.
6. Payload Length – This two-byte field represents the length of attached payload. It is a fixed value i.e. 450
bytes. It is the maximum supported IPB payload length. Currently, only 60 bytes are populated out of
450. Rest of the bytes are set as zero.
7. Configured Group – Total configured groups count is sent in packet in this field. At device end, it is used
for calculating the communication break timeout value.
8. Schedule Time – This is the slot time of schedular. Currently set as 5ms. This value also plays role in
calculating the communication break timeout value.
9. ASN – This field contains the absolute slot number. It is used to keep check of slot in which packet is
received.
10. Data Sync – Data sync is 20 bytes data calculated at PLC using bypass telemetry parameters. It contains
group specific parameters including number of phases, bypass count, cnv. count etc. This field is used by
nodes for syncing purpose.
11. Reserved – These 42 bytes are reserved for future modifications.
12. Interphase Request Hash – Last 4 bytes of interphase request packet header contain the hash which is
calculated over the first 76 bytes of the interphase request packet header. Network group key is used to
calculate this hash.
2.7.3. Interphase Request Packet Security
Header hash and Payload hash, appended at the end of header and payload respectively, are used to check
packet corruption. All three devices with group ID as that of ‘data group’ field in request packet header will
process this packet. When interphase request packet is received by the node it verifies the following before
processing the packet:
MAC header hash
Interphase request header hash
Interphase request payload hash of other two phases’ device data.
5. Phase ID – All groups have three devices each on three phases. Each node appends its own phase ID in
this field.
6. Payload – A 48-byte payload is appended in the response packet. This field is the actual data needed to
keep phase balance.
7. Interphase Response Hash – Packet contains 4-byte hash value at the end of the packet. It is
cumulatively calculated over header and payload. Every unit uses interphase seed key to calculate packet
hash. Hash is essential to mark packet authenticity.
Interphase response hash is not verified at this step and packet is copied as it is. The packet is sent in
interphase request packet as a part of payload. Interphase response hash is only processed and verified at the
node.
2.7.6. IPB Packet scheduling
IPB packets contain data that needs to be shared between three devices of a group. This sharing of data is
possible through PLC. PLC requests data from all three devices of a group and share it back to the same group
in next slot. This packet contains data of all three devices. Devices, on reception, copy and process the data of
other two devices and drop its own data from packet.
1. Interphase packets from PLC request data from a group whose group ID is specified in ‘Requested Group
Field’ of the packet header. Devices match their own group id with this field and send their data in
response. Three response packets from each phase of a group will be received by PLC in the same slot.
2. This received data of all three nodes of a group will be sent back to the group in following slot. PLC
appends this data in the request command as payload. Thus, payload field of request command contains
data of three nodes with payload size three times of data of one node.
3. The group whose data is present in payload is marked in request packet header. The group ID mentioned
in ‘Data Group’ field of request packet header in following slot is same as that of the ‘Requested Group’
field of previous slot’s request packet header. If no data has been collected yet, in case of first
interphase request packet, data group field is set 0xFF and data field is set as zero.
4. Interphase request packet is sent as broadcast i.e. 0xFF…FF, therefore, all devices connected in network
receive the packet. Data group and Requested group fields in packet header help devices decide
whether to send response, process the packet or discard it.
5. Two request type packets for IPB are sent by PLC in one slot. In response to these two packets, six
devices respond to share their data and six devices receive data of their group members.
6. When devices receive request packet, if their group id matches the data group id, devices only copy the
data of other two phases’ devices. Devices further process the data for phase balance.
7. PLC also sends data to devices for synchronization of phase currents. This data is calculated using device
telemetry parameters and appended in request packet header.
1. Gateway sends group IDs and node IDs of groups to PLC. This information is according to the SI
configuration. On the other hand, all nodes continuously send their group IDs to PLC in their telemetry
data.
2. PLC uses this information to compare gateway information with each node’s group ID. Whenever a
mismatch in both group IDs is detected, regrouping command is triggered on PLC.
3. Cyber Security
2.8. Fibre-Optic Network Security
The Smart Wires Fibre-Optic Network relies on two security mechanisms. To ensure integrity of these
messages, they will be protected by a keyed HMAC, based on a group key. Any node receiving a secured
message which cannot be validated will drop the message. This type of security is implemented at the MAC
layer.
To ensure end-to-end protection, the application layer messages between the PowerLine Coordinator
and the node are also protected by a keyed HMAC. End-to-end security uses a unique key negotiated between
the particular node and the PowerLine Coordinator. For broadcast application layer commands group key is
used for End-to-end security.
the appropriate seed key, and thus the system can be assured of its identity. The PowerLine
Coordinator will mark that node as authenticated in its internal security table.
4. PLC will then send the node a keying message. The PowerLine Coordinator will generate and share
the new 16-byte random key for the SmartValve, along with the group key for the network and
interphase group key. To securely transfer the key material, the PowerLine Coordinator will encrypt
the material, using AES-CTR mode. The IV for the AES-CTR algorithm is the current 4-byte ASN
repeated twice. The ASN is also transmitted inside the packet. The Key for the AES-CTR algorithm is
the HMAC of NonceNC and NonceD using the seed of the SmartValve. This information is sent to the
SmartValve, along with an authenticator. The information will travel in the Cryptography block of the
Network Join message with step set to one.
5. Upon receiving this message, the Node will respond by sending back an acknowledgement consisting
of the original nonce sent in the first challenge (NonceNC), authenticated with the new SmartValve
key it received in the last step. The PowerLine Coordinator will validate that the NonceNC matches
the one originally sent, and that the authenticator is correct. This confirms to the PowerLine
Coordinator that the device in question has successfully received the new keys. The information will
travel in the Network Join message step 2 packet.
The cryptographic message exchange is as follows:
Challenge(PLC → SmartBypass): NonceNC
where NonceNC=Concatenate(ASN of Challenge Message, 12 cryptographically random bytes)
Response(PLC ← SmartBypass): NonceD, Authenticator
where NonceD=Concatenate(ASN of Response Message, 12 cryptographically random bytes)
Authenticator=HMAC(Concatenate(MAC AddressNC, MAC AddressD, NonceNC, NonceD), Seed)
Uninitialized Loaded
[GW Pushes Node List to NC]
Initial
Authenticated
[Node fails to acknowledge key]
Keyed
Joined
Challenge X X
Network
X X
Membership
Unicast 🗸 🗸 (Private Key)
Application Layer Packet
Table 3-1
* Devices validate the Interphase request header hash with network key. Whereas the 60 bytes
payload of each device is validated with the interphase group key.
** PLC does not validate the IPB response Payload hash due to timing constraints. Only MAC header
hash is validated and data is buffered. The IPB packet payload hash is validate by the group devices.
*** There is no application layer payload in Fault packet type.
4. References