IEC 61850 Sampled Values protocol

Description of the IEC 61850 Sampled Values (SV) protocol implementation in the Typhoon HIL toolchain.

IEC 61850 (IEC 61850 – Communication Networks and Systems in Substations) standard defines Sampled Values (SV) protocol as a publisher/subscriber type communication. This protocol is used for information exchange between Merging Units and IEDs (IED – Intelligent Electronic Device) in a Substation over the Ethernet.

The "Implementation Guidance for Digital Interface to Instrument Transformers Using IEC 61850-9-2", or IEC 61850-9-2LE (LE - Light Edition), guide is used as a reference in the implementation of the SV protocol. The guide can be found on this link IEC 61850-9-2LE.

Figure 1. SV communication inside the Substation

The concept of SV communication is that the publisher periodically sends messages with exactly defined time intervals. The time interval depends on two factors: measured signal frequency and Samples Per Periode (SPP). IEC 61850-9-2LE defines two SPP values of 80 and 256. So, for example, if the measured signal frequency is 50 Hz and SPP is 80, the sending time interval will be 1/50/80, or 250 µs.

All messages are published under a topic. The subscriber receives all messages from the system, but filters and parses only the messages sent with the subscribed topic.

Since the SV protocol is publisher/subscriber based, communication is possible only inside the local network (LAN).

The protocol defines the SV message as shown on Figure 2. The field definition is presented in Table 1.

Figure 2. SV message content
Table 1. SV message field description
Field name Value Description

Destination address

01:0c:cd:04:xx:xx

00:00 - 01:ff Destination MAC address
Source address Defined by the sending device Source MAC address
Priority tagged TPID 0x8100 Defines the 802.1Q protocol
TCI User priority 1 - 7 SV message priory: 4-7 is high priority; 1-3 is low priority
CFI 0
VID 0 - 4095 Virtual LAN ID
Ethertype 0x8ba Defines the SV protocol
APPID 0x4000 - 0x7FFF Application ID
Length Message length
Reserved 1 0x0000 Reserved field
Reserved 2 0x0000 Reserved field
APDU Application Protocol Data Unit

The APDU field contains the payload of the SV messages. Every APDU contains up to 8 ASDU (Application Specific Data Unit), where each ASDU contains one three phase current and voltage measurements and each ASDU has a unique SV identification value. The content of an APDU can be found on Figure 3.

Figure 3. APDU field content
As defined by the IEC 61850-9-2LE guide, every ASDU field must contain the following fields:
  • svID - Sampled Values IDentifier, user defined unique string identifier used for subscription.
  • smpCnt - index of the Sampled Values message
  • confRev - configuration revision
  • smpSynch - defines the synchronization mechanism of the clock used for sending the SV messages. The value can be:
    • 0 - None
    • 1 - Local
    • 2 - Remote
  • Sequence of Data - sequence of measured voltage and current values as shown on Sequence of Data encoding Figure 4.

The guide also defines the scaling factors for current and voltage measurements. Current measurements should be scaled with the factor of 1000 and the voltage with the factor of 100 and written in integer format.

Figure 4. Sequence of Data encoding

Sampled Values protocol in Typhoon HIL toolchain

As mentioned, SV protocol is implemented using IEC 6180-9-2LE guide. Whole SV protocol is defined by using following components from Schematic library: SV Setup, SV Publisher and SV Subscriber.

SV Setup

SV Setup component window is shown in Table 2.

SV Setup component is used to define SV parameters per HIL device. If SV protocol is used in the model, exactly one SV Setup component must exist on the schematic. The component is shown on Table 2.

Table 2. SV Setup component
Component Component dialog window Component properties

SV Setup

  • HIL device ID
  • Override HIL device ID for MAC address
  • Source device MAC address
  • Signal frequency
  • Samples per periode
  • Enable message quick parse
Table 3. SV Setup component properties description
Property name Description
HIL device ID Choose what HIL device to configure
Override HIL device ID for MAC address Manually specify the last digit of MAC address
Source device MAC address Set the MAC address for the device. MAC address of the HIL device is set to 34:e6:d7:7d:02:1x and only the last digit can be changed. If the Override HIL device ID is not selected, HIL device id specifies the last digit of MAC address. If the option is selected, user can manually specify the last digit.
Signal frequency Signal frequency of 16.7, 25, 50 and 60 Hz can be selected for each HIL device
Samples per period 80 and 256 samples per period resolution is defined
Enable message quick parse This option is used for SV Subscriber components. When the message is first received, the message will be parsed and checked for validity. During the parsing, the position of Sequence od Data field will be memorised and used for the later parsing of the same message, thus the parsing will be faster. If this option is not selected, the message will be parsed every time it is received. It is highly recommended to enable this option if the SV message structure is not changing during simulation.

SV Publisher

SV Publisher component is used for specifying parameters for one ASDU field inside the APDU (Figure 3). With each SV Publisher component, user can specify if the component creates new SV message or will it add an ASDU in an existing SV message. If the component creates new SV message, the user can specify destination address, user priority, VLAN ID and APP ID values.

Table 4. SV Publisher componet
Component Component dialog window Component properties

SV Publisher

  • General:
    • Create
    • Destination MAC address
    • User priority
    • VLAN ID
    • APP ID
    • ASDU index
  • ASDU:
    • svID
    • confRev
    • Synchronization
    • I scaling factor
    • I type
    • V scaling factor
    • V type
  • Signal Quality
    • Generate quality
    • Current signal quality
    • Voltage signal quality
    • Va quality
    • Vb quality
    • Vc quality
    • Vn quality
Table 5. SV Publisher component propertes description
Property name Descriprion
Create Choose if the SV Publisher component creates new SV message with New SV message or does it add an ASDU to an existing SV message with Sequence ASDU
Destination MAC address Specify the destination MAC address
User priority Specify the user priority of SV message
VLAN ID Specify the VLAN identifier of SV message
APP ID Specify the APP identifier of SV message
ASDU index Lets you specify the index of the ASDU index inside the APDU field of SV message. If the New SV message option is selected, ASDU index is fixed to 1. If the Sequence ASDU option is selected, user can specify the index from 2 - 8.
svID Specify the unique SV identifier for ASDU
confRev Specify the configuration revision number for ASDU
Synchronization Specify the synchronization method for ASDU
I scaling factor Specify the scaling factor for input current signals. Default scaling for currents is 1000.
I type Define the type that is writen in SV message. For example, if input current is 1 A and int type is selected, the value of 0x0000 0001 will be written in message. If the real type is selected, the value 0x03f8 0000 will be writen.
V scaling factor Specify the scaling factor for input voltage signals. Default scaling for voltages is 100.
V type Same as I type
Generate quality (button) Opens a new dialog where you can graphically define the signal quality values. Useful if the signal quality is set to Fixed
Current signal quality Choose if the signal quality is specified by signal from the model or is fixed and user defined. If the Variable option is chosen, a port IQ will appear on the component to connect the signal.
Ix quality If the Fixed option is selected for Current signal quality, the user can manually define signal quality for each current in binary form.
Voltage signal quality Same as Current signal quality
Vx quality Same as Ix quality

The example of using SV Publisher components is illustrated on Figure 5. Only one SV Publisher component exists in the model with the parametes defined as on the right picture. The component creates new SV message with one ASDU entry where the values are not scaled and are written in real format. The signal quality is fixed and predefined.

All input signal to SV Publisher component must be vectors of length 4. The vector should be encoded as [Ia, Ib, Ic, In], [IQa, IQb, IQc, IQn], [Va, Vb, Vc, Vn] and [VQa, VQb, VQc, VQn]

The Figure 6 illustrates the message captured with the network sniffing tool.

Figure 5. SV Publisher component example
Figure 6. SV message capture

To add an extra ASDU in the existing SV message, just add another SV Publisher component and choose Create: Sequence ASDU option. This is illustrated on Figure 7. The SV Publisher component is the same as in the example above and creates a new SV message. The SV Publisher1 component is defined to add an ASDU to the message with APP ID 0x4000 as shown on the right picture.

The capture of the new created message is illustrated on Figure 8.

Figure 7. SV Publisher component example (adding ASDU)
Figure 8. SV message capture (added ASDU)

SV Subscriber

SV Subscriber component is used for subscribing to a certain ASDU field from a certain SV message on the network. To subscribe to an SV message, user must specify the APP ID and SV ID for message filtering. APP ID value is used to filter the SV message from the network, and SV ID is used to extract the corresponding ASDU from the message.

All output terminals of SV Subscriber component are vectors of length 4. The vectors are encoded as [Ia, Ib, Ic, In], [IQa, IQb, IQc, IQn], [Va, Vb, Vc, Vn] and [VQa, VQb, VQc, VQn].

Table 6. SV Subscriber component
Component Component dialog window Component properties

SV Subscriber

  • APP ID
  • SV ID
  • I scaling factor
  • I out type
  • V scaling factor
  • V out type
Table 7. SV Subscriber component properties description
Property name Description
APP ID APP ID value for message filtering
SV ID SV ID for ASDU filtering
I scaling factor Scaling factor to be applied to current values
I out type Define the current value type which is writen in SV message
V scaling factor Same as I scaling factor
V out type Same as I out type

Virtual HIL support

Virtual HIL currently does not support this protocol. When using a Virtual HIL environment (e.g. when running the model on a local computer), inputs to this component will be discarded and outputs from this component will be zeroed.