IEC 61869 Sampled Values protocol

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

Real-time only: This document is valid only for real-time simulation.

IEC 61869 Sampled Values (SV) protocol

The IEC 61869 (IEC 61869 – Communication Networks and Systems in Substations) standard defines the 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 international standard "IEC 61869-9 Instrument transformers - Part 9: Digital interface for instrument transformers" is used as a reference in implementing the IEC 61869 SV protocol.

This standard is an official extension to the IEC 61850-9 (more commonly known as IEC 61850-9-2LE), for which references can be found at this link. The SV Publisher component is a device that publishes Ethernet frames at a defined and preferred publishing rate. Current and voltage measurements represent the payload. Data values of current and voltage measurements are sampled at defined and preferred sampling rates. IEC 61869-9 standard defines three preferred sampling rates: 4800 samples per second (for general measuring and protective applications), 14400 samples per second (for quality metering applications, including instrument transformers for time-critical low bandwidth DC control applications), and 96000 samples per second (for instrument transformers for high bandwidth DC control applications). For the first two cases, the digital publishing rate of frames containing sampled values is 2400 frames per second. For the 96000 samples per second sampling variant, the publishing rate is the same as the sampling rate (96000 frames per second). Preferred variants are shown in Figure 1. Rates that are shaded in white are considered preferred rates per IEC 61869-9 standard. All preferred rates except for the rate of 96000 samples per second are supported by the Typhoon HIL toolchain at the moment.

Figure 1. Sample and publishing rates

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 in Figure 2. The field definition is presented in Table 1. SV message content remains unchanged compared to IEC 61850-9-2LE SV communication protocol.

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 priority: 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
Figure 3. Reserved 1

The structure of Reserved 1 is defined in Figure 3, with the terms defined as follows:

  • S: Simulate. This flag indicates that the SV message is sent by a test device. This flag helps the Subscriber to distinguish whether the received values are real Voltage and Current values coming from the Merging Units or simulated test values.
  • R: Reserved. These bits are reserved for future use and are set to 0 by default.
  • Reserved Security: these four bits and the Reserved 2 field form a 28-bit word defined by the security standard IEC/TS 62351-6. It is used as defined when an SV message with security is transmitted, otherwise, it is set to 0.

The APDU field contains the payload of the SV messages. Every APDU contains either 2 or 6 ASDUs (Application Specific Data Units). The number of ASDUs in a message is defined based on the sampling rate. SV Publisher with a 4800 samples per second sampling rate will publish messages with 2 ASDUs per frame, to achieve the desired and required 2400 frames per second publishing rate. SV Publisher with 14400 samples per second sampling rate will publish messages with 6 ASDUs per frame, to achieve the desired and required 2400 frames per second publishing rate.

The IEC 61869-9 standard introduces dynamic data sets. Each ASDU can contain at least one instance of current and voltage measurements in total. The maximum number of current and voltage measurement instances in an ASDU depends on the sampling rate. According to the standard, for general measuring and protection applications, the maximum is 24 quantities; for quality metering, it is 8 quantities; and for DC control applications, it is 24 quantities.

The notation combining different sampling rates, number of ASDUs per APDU, and dynamic data set dimensions is defined as a variant written in a human-readable text format: FfSsIiUu, where:
  • f is the digital output sample rate expressed in samples per second;
  • s is the number of ASDUs (samples) contained in a sampled value message;
  • i is the number of current quantities contained in each ASDU;
  • u is the number of voltage quantities contained in each ASDU.

As an example, variant F4800S2I4U4 will have a sampling rate of 4800 samples per second, each SV message will contain 2 ASDU units, and each ASDU will contain 4 current and 4 voltage measurements.

Figure 4. APDU field content
APDU contains fields as defined in the IEC 61850-9-2LE guidelines:
  • svID - Sampled Values Identifier, a 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 - Global
  • Sequence of Data - data containing current and voltage measurements. Each current and voltage measurement is followed by a quality measurement. Both data and quality measurements are each four bytes wide. In a variant with the dynamic dataset containing the IxUy dataset, each Sequence of Data should first contain x pairs of current and current quality quantities followed by y pairs of voltage and voltage quality quantities.

Figure 4 represents the APDU field content for the F14400S6 variant, containing six ASDUs.

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.

Each current and voltage measurement in a dataset is followed by a quality bit vector. The length of this vector in an SV message is 4 bytes or 32 bits. The vector is in a big-endian format, meaning that the least significant bit (indexed 0) is the most right bit. The first 14 bits of this vector represent different quality attributes of the current or voltage signal measurement the bit vector follows.
  • Validity - formed by concatenating bits 1 and 0 (in that order, with bit 1 as the more significant bit).
    • Good - Value 00 (bit1:bit0)
    • Invalid - Value 01
    • Reserved - Value 10
    • Questionable - Value 11
  • Overflow (bit 2)
    • False - Value 0
    • True - Value 1
  • Out of range (bit 3)
    • False - Value 0
    • True - Value 1
  • Bad reference (bit 4)
    • False - Value 0
    • True - Value 1
  • Oscillatory (bit 5)
    • False - Value 0
    • True - Value 1
  • Failure (bit 6)
    • False - Value 0
    • True - Value 1
  • Old data (bit 7)
    • False - Value 0
    • True - Value 1
  • Inconsistent (bit 8)
    • False - Value 0
    • True - Value 1
  • Inaccurate (bit 9)
    • False - Value 0
    • True - Value 1
  • Source (bit 10)
    • Process - Value 0
    • Substituted - Value 1
  • Test (bit 11)
    • False - Value 0
    • True - Value 1
  • Operator blocked (bit 12)
    • False - Value 0
    • True - Value 1
  • Derived (bit 13)
    • False - Value 0
    • True - Value 1
Note: In the SV protocol implementation within the Typhoon HIL toolchain, the minimum length of the svID parameter is set to 2, instead of the 10 characters (see Figure 4).

IEC 61869 Sampled Values protocol in Typhoon HIL toolchain

Note: IEC 61869 Sampled Value protocol is available through an Experimental Toolbox. If you are interested in using this protocol, please contact us via the ticketing system.

As mentioned, SV protocol is implemented using IEC 61869-9. It is supported by the following Typhoon HIL devices: HIL101, HIL404, HIL506, and HIL606.

The whole SV protocol is defined by using the following components from the Schematic Editor Library Explorer: IEC 61869 SV Setup, IEC 61869 SV Publisher, and IEC 61869 SV Subscriber.

Note: Currently, only one IEC 61869 SV Publisher and only one IEC 61869 SV Subscriber are allowed per one HIL device.

IEC 61869 SV Setup

Component Ignored: This component is ignored in TyphoonSim. Inputs to this component will be discarded and outputs from the component will be zeroed during TyphoonSim simulation.

The IEC 61869 SV Setup component is used to define IEC 61869 SV parameters. If IEC 61869 SV protocol is used in the model, there must be exactly one IEC 61869 SV Setup component for each HIL device that uses IEC 61869 SV protocol.

IEC 61869 SV Setup component properties

  • Ethernet port
    • Choose which Ethernet port will be used for IEC 61869 SV protocol.
  • Override last digit in MAC address
    • Manually specify the last digit of the MAC address.
  • Source device MAC address
    • Modify the MAC address of the device. The MAC address of the HIL device is set to 78:72:64:Ax:xx:xy, where 78:72:64:A refers to Typhoon HIL products, x:xx:x is derived by the device's serial number, and y is defined by the selected port value. If the Override HIL device ID is selected, you can manually specify the last digit.
  • Enable message quick parse
    • This option is used for IEC 61869 SV Subscriber components. When the message is first received, the message will be parsed and checked for validity. During parsing, the position of the Sequence of Data field will be saved and used later for faster parsing of the message. 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 does not change during simulation.
  • Execution rate
    • Signal processing execution rate. The execution rate must match the other components used in the model. It is highly recommended to set up the execution rate according to the variant being used on either IEC 61869 SV Publisher or IEC 61869 SV Subscriber used on the same HIL device to prevent signal jitter. For example, if variant F4800S2 is used, it is recommended to set up the execution rate to "1/4800" or to a value that expression is the multiple of.

IEC 61869 SV Publisher

Component Ignored: This component is ignored in TyphoonSim. Inputs to this component will be discarded and outputs from the component will be zeroed during TyphoonSim simulation.

The IEC 61869 SV Publisher component is used for specifying parameters for all ASDU fields inside the APDU of the publishing message (Figure 4). With each IEC 61869 SV Publisher component it is possible to choose which variant will be supported by the component. There are two available variants: F4800S2 and F14400S6. Both variants have a digital output of 2400 frames per second, where the first variant samples the inputs at 4800 samples per second and produces an APDU field containing two ASDUs and the the second variant samples the inputs at 14400 samples per second and produces an APDU field containing six ASDUs.

IEC 61869 SV Publisher component properties

  • Variant
    • Choose which variant will be implemented by IEC 61869 SV Publisher.
    • Available variants are F4800S2 and F14400S6.
  • Destination MAC address
    • Specify the destination MAC address.
  • User priority
    • Specify the user priority of the SV message.
  • VLAN ID
    • Specify the VLAN identifier of the SV message.
  • APP ID
    • Specify the APP identifier of the SV message.
  • Simulate
    • Define if the Simulate bit in the Reserved 1 field will be True or False as defined in Figure 3.
  • source
    • The Simulate value can be defined either through the Dialog window, a signal from the model, or through the SCADA window. If the Dialog option is selected, the Simulate value is fixed and defined through the Simulate property value. If the Model value is selected, an additional terminal will be created on the component that allows you to connect any signal from the model and dynamically change the Simulate value. The SCADA option allows you to define the Simulate value through the IEC 61869 SV Publisher. Simulate widget is located in the SCADA window.
  • svID
    • Specify the unique SV identifier for ASDU.
  • confRev
    • Specify the configuration revision number for ASDU.
  • Synchronization
    • The synchronization value informs the receiver whether the Current/Voltage sampling time is synchronized with the global clock value. Typically, SV senders are synchronized to a global (master) clock in order to relay the exact time the Current/Voltage values are sampled. In this way the the receiver knows if the values are old or up to date, so they can decide whether to accept, discard, or modify the values.

    • Available values are None, Local, and Global
    • If the SV sender is synchronized to a master clock (usually using GPS or PTP protocol), the value should be specified as Global.

    • If the SV sender does not have a connection to a master clock but still has a way to synchronize, the value is specified as Local.

    • If the SV sender does not have any means of clock synchronization, the value is specified as None.

  • value is
    • Defines if the Synchronization value is fixed and defined using the Synchronization property or if it is dynamically assigned during the simulation. The dynamic value corresponds to the status of the PTP slave running alongside the SV protocol (through the same ethernet port) or the IRIG-B signal received through the dedicated port of that HIL device.

    • Available values are dynamic and static.
    • If the PTP Slave is synchronized to the PTP Master clock, the Synchronization value will be either Local or Global depending on the time traceability of the PTP Master's clock. If the PTP Slave is not synchronized, the value will be None.

    • If IRIG-B is used the Synchronization value will be either Global or Local depending on whether the IRIG-B source is locked onto a GPS signal or not.

  • Use specific local area clock ID as smpSynch value
    • When the Synchronization property value is local and the value is static, it is possible to configure the SV message to use the unique specific local area clock ID as the smpSynch field value in a message.
    • If Synchronization property value is local and value is static and this checkbox is checked as True, property value is is enabled which specify unique specific local area clock ID to be used as smpSynch value in a message. The allowed value for this property is an integer in the range [5, 254].

  • gmIdentity
    • Specify the grandmaster identity field value in a publishing SV message. This property is enabled when the value for gmIdentity is set as static.
    • Available values are static, dynamic, and none.
    • The value must be a hexadecimal number of length 16, specified without the "0x" prefix.
  • value is
    • Specify the source for the gmIdentity field. When static is selected, all publishing messages will contain the gmIdentity field as specified by the property gmIdentity. When dynamic is selected, all publishing SV messages will contain the value identity value of synchronizing the PTP grandmaster clock. When none is selected, publishing SV messages will have no gmIdentity field.
  • I scaling factor
    • Specify the scaling factor for input current signals. The default scaling for currents is 1000.
  • I type
    • Defines the current type that is written in the SV message.
    • Available values are int, uint, and real.
    • For example, if the input current is 1 A and int type is selected, the value 0x0000 0001 will be written in the message. If the real type is selected, the value 0x03f8 0000 will be written.
  • V scaling factor
    • Specifies the scaling factor for input voltage signals. The default scaling for voltages is 100.
  • V type
    • Defines the voltage type that is written in the SV message.
    • Available values are int, uint, and real.
    • For example, if the input voltage is 1 V and int type is selected, the value 0x0000 0001 will be written in the message. If the real type is selected, the value 0x03f8 0000 will be written.
  • Generate quality (button)
    • Opens a new dialog where you can graphically define the signal quality values. All configurable signal attributes are described here. Useful if the signal quality is set to Fixed
  • Current signal quality
    • Choose if the signal quality is specified by a 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.
    • Available values are Fixed and Variable.
  • Voltage signal quality
    • Same as Current signal quality.
  • Vx quality
    • Same as Ix quality.
  • Number of currents (I) in the dataset
    • Specify the number of current quantities in an ASDU field. If the value is zero, the IEC 61869 SV Publisher component will have no I and IQ ports. If the value is greater than zero, then I and IQ ports will be vectors of the length of the chosen value.
    • Available values are in the range [0, 24].

    • By default, the value of this property is 4.
  • Number of voltages (V) in the dataset
    • Same as Number of currents (I) in the dataset.
Note: The maximum allowed number of current and voltage quantities in total per IEC 61869 SV Publisher is 24.

PTP synchronization

The PTP synchronization mechanism ensures that all devices on the network have the same time reference. This time reference is dictated by the Master device on the network, usually called the Grandmaster clock.

Time synchronization of the SV Publishers ensures that they all start counting samples from the same moment in time. In other words, the SV Publishers reset their sample count (smpCnt) value to 0 each time the seconds value is changed (i.e. seconds rollover). This way, an SV Receiver that receives two SV data streams can easily compare the current/voltage values and detect phase shifts.

SV application synchronization using PTP can be achieved by configuring the Time Synchronization component in the following way:

  • Select PTP as the synchronization source
  • Select the ethernet port used by the SV application
  • Select the IEC61850-9-3 predefined PTP configuration

IRIG-B synchronization

The use of this synchronization method is limited to devices with an IRIG-B port. Information regarding the available ports for each HIL device model is documented in each device's General Specifications section in the Hardware Manual. In order to use IRIG-B synchronization, it is necessary to select "IRIG-B" as the synchronization source in the Time Synchronization component.

Each time the IRIG-B signal is received it resets the sample count (smpCnt) value and updates the internal clock of the HIL device which allows for accurate timestamps in SV Publisher messages.

More information about the IRIG-B signal can be found in the Time synchronization page.

IEC 61869 SV Subscriber

Component Ignored: This component is ignored in TyphoonSim. Inputs to this component will be discarded and outputs from the component will be zeroed during TyphoonSim simulation.

The IEC 61869 SV Subscriber component is used for subscribing to an APDU field from a certain SV message on the network. To subscribe to an SV message, the APP ID and SV ID must be specified for message filtering. The APP ID value is used to filter the SV message from the network.

All outputs of the IEC 61869 SV Subscriber component are implemented as time series outputs. The receiving message is parsed based on the chosen variant as the value of the property Variant. Outputs of the component will output the data at the same rate as it was sampled. This means that if the variant F4800S2 is chosen, outputs will also output data at the rate of 4800 samples per second. Data is parsed based on the number of ASDUs in a receiving SV message and the component will output the data in the order it is received: data contained in the first ASDU of the SV message will be outputted first, followed by data contained by the second ASDU in a received SV message. For this reason, it is important to set the execution rate of the components to be a multiple of the sampling period to prevent signal jitter; For example, if variant F4800S2 is used it is recommended to set up the execution rate to "1/4800" or to a value that expression is a multiple of.

Outputs I, IQ, V, and VQ are vectors of the length of the chosen dataset dimension. Output smpCnt is an unsigned integer containing a value parsed as a smpCnt attribute in the receiving SV message.

IEC 61869 SV Subscriber component properties

  • Variant
    • Choose a variant of the receiving SV message.
    • Available variants are F4800S2 and F14400S6.
  • 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 type
    • Define the current value type which is written in the SV message.
    • Available values are int, uint, and real.
  • V scaling factor
    • Scaling factor to be applied to voltage values.
  • V type
    • Define the voltage value type which is written in the SV message.
    • Available values are int, uint, and real.
  • Number of currents (I) in the dataset
    • Specify the number of current quantities in an ASDU field of the receiving SV message. If the value is zero, the IEC 61869 SV Subscriber component will have no I and IQ ports. If the value is greater than zero, then I and IQ ports will be vectors of the length of the chosen value.
    • Available values are in the range [0, 24].

    • By default, the value of this property is 4.
  • Number of voltages (V) in the dataset
    • Same as Number of currents (I) in the dataset.
Note: The maximum allowed number of current and voltage quantities in total per IEC 61869 SV Subscriber is 24.

Virtual HIL support

Virtual HIL currently does not support this protocol. When using a non-real-time 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.