Skip to main content

Implementation of IEC 61850 Fast Message Transmission Services in VxWorks

·1424 words·7 mins
IEC 61850 VxWorks RTOS Embedded Systems Substation Automation
Table of Contents

Implementation of IEC 61850 Fast Message Transmission Services in VxWorks

📘 Abstract
#

Sampled Values (SV) and Generic Object-Oriented Substation Events (GOOSE) are the two communication services with the most stringent real-time requirements in the IEC 61850 standard. These services—collectively referred to as fast message transmission services (FMTS)—bypass the conventional TCP/IP protocol stack and map directly from the application or presentation layer to the data link layer.

Since the default VxWorks communication model is socket-based and built on TCP/IP, it does not natively support this direct mapping. To address this limitation, this paper analyzes the Abstract Communication Service Interface (ACSI) and the Specific Communication Service Mapping (SCSM) for FMTS and proposes a VxWorks-based implementation strategy. A fast communication interface (FCI), dedicated application tasks, and real-time processing mechanisms are designed to support FMTS. Finally, a test environment is constructed to verify both the correctness and real-time performance of the GOOSE implementation.

Keywords: IEC 61850, VxWorks, sampled values, GOOSE, real-time performance

🧭 Introduction
#

VxWorks is a commercial embedded real-time operating system (RTOS) developed by Wind River Systems. It is characterized by low interrupt latency, fast task context switching, scalable components, and a priority-preemptive scheduling model combined with round-robin execution among tasks of equal priority. Owing to its excellent real-time performance and reliability, VxWorks is widely deployed in intelligent electronic devices (IEDs) within power systems.

By default, VxWorks applications access communication services through the TCP/IP protocol stack, and lower protocol layers are not directly exposed. However, IEC 61850 defines seven communication services that map directly from the application or presentation layer to the data link layer, bypassing TCP/IP. These include multicast and unicast sampled value messages, GOOSE message transmission and management services, and GSSE-related services.

Among these, multicast sampled value messages (SMM) and sending GOOSE messages (SGM) impose the highest real-time requirements. Due to their similar mapping principles, this paper focuses on SMM and SGM as representative examples to illustrate the implementation of all seven services in VxWorks.

Compared with traditional foreground–background architectures, designing real-time communication tasks in an RTOS environment is significantly more complex. Therefore, this paper further investigates the real-time processing strategies required to meet FMTS performance constraints in VxWorks.

🔍 FMTS Analysis
#

Abstract Communication Service Interface (ACSI)
#

ACSI defines communication services in IEC 61850 at an abstract level, specifying service behaviors, parameters, and data models independently of underlying protocols, operating systems, or hardware platforms.

Both SMM and SGM adopt a publisher/subscriber communication model. This model is particularly well suited for scenarios where one or more publishers distribute data to multiple subscribers under high data throughput and stringent real-time constraints.

The main differences between SMM and SGM are as follows:

Dataset content
SMM datasets are limited to sampled values and are indexed by functional constraint data attributes. In contrast, SGM datasets are more flexible and may include various data objects or attributes.

Transmission behavior
SMM transmission is driven by periodic sampling events, typically at a fixed multiple of the sampling interval, and does not support retransmission. SGM operates periodically under normal conditions but supports rapid retransmission in response to events such as protection trips or blocking signals.

As a result, SGM involves more control block parameters, a more complex state machine, and higher implementation complexity compared to SMM.

Specific Communication Service Mapping (SCSM)
#

SCSM defines how ACSI services are mapped onto concrete protocol stacks. For FMTS, SCSM specifies:

  • Implementation of the publisher/subscriber model
  • Message encoding and decoding
  • Coordination between communication services and application data updates

FMTS maps directly to the data link layer, using multicast or broadcast Ethernet frames. Multicast enables dynamic subscription management, while broadcast requires VLAN configuration to limit traffic scope.

SMM and SGM correspond to Sampled Value (SAV) and GOOSE messages, respectively. Their organization includes:

Ethernet frame fields
Destination and source MAC addresses, priority tags, and EtherType values are assigned in accordance with IEEE 802.3 and IEC 61850 specifications.

Data segments
Application Protocol Data Units (APDUs) and Application Service Data Units (ASDUs) are encoded using ASN.1 Basic Encoding Rules (BER). For forward compatibility, IEC 61850-9-1 defines a simplified mapping for SMM, using double-byte encoding for sampled values and bit-level encoding for status data.

The send and receive processes of SAV and GOOSE messages must strictly follow the ACSI definitions of SMM and SGM.

🛠️ FMTS Implementation in VxWorks
#

VxWorks Network Protocol Stack
#

The VxWorks network stack follows the OSI model and introduces a multiplexer (MUX) layer above the data link layer. MUX does not process data itself but forwards frames between enhanced network drivers (ENDs) and upper-layer protocols, providing a unified interface and isolating protocol stacks from hardware drivers.

While standard applications access MUX via sockets and TCP/IP, FMTS requires direct access to MUX. To achieve this, a fast communication interface (FCI) is implemented above MUX.

Fast Communication Interface (FCI)
#

FCI provides a lightweight communication path between applications and the data link layer. It exposes six application interfaces and four MUX callback functions. The callbacks perform minimal data copying and validation before notifying applications through semaphores.

Key FCI functions include:

  • fciOpen / fciClose: Register or unregister FCI with MUX.
  • fciMCastAddrSet: Configure multicast addresses for SAV and GOOSE messages.
  • fciSend: Encapsulate APDUs into Ethernet frames and forward them to END drivers via MUX.
  • fciPollSend / fciPollReceive: Polling-based debug interfaces.
  • fciRcvRtn: Receive callback that filters SAV and GOOSE frames and delivers valid APDUs to applications.
  • fciError / fciTxRestartRtn: Notify applications of communication failures and recovery.

FCI does not implement APDU encoding/decoding or service state machines. These functions are handled by dedicated application tasks.

Application Task Design
#

FMTS functionality is implemented using the following application tasks:

  • SRT (tSavReceiveTask): Implements SMM subscriber processing
  • GRT (tGooseReceiveTask): Implements SGM subscriber processing
  • GST (tGooseSendTask) and GSF (fGooseSend): Implement SGM publisher processing

These tasks cooperate with FCI and other system components via shared memory and semaphores.

Sampled Value Receive Task (SRT)
#

SRT parses SAV APDUs and delivers sampled values to applications such as digital filtering modules.

SRT first identifies whether the message uses IEC 61850-9-1 or 9-2 encoding. For 9-1 frames, fixed-length fields are decoded, counters are verified, and sampled values are converted into engineering units. For 9-2 frames, ASDUs are located dynamically, identifiers are validated against the CID file, and samples are decoded accordingly.

Parsed data and counters are written to shared memory, and semaphores are released to notify downstream applications.

GOOSE Receive Task (GRT)
#

GRT decodes GOOSE APDUs and supplies status information to protection and control applications.

After decoding control block parameters such as GoCBRef, StNum, SqNum, and TAL, GRT evaluates message validity based on dataset existence, test flags, sequence correctness, and timeout conditions. Depending on the result, GRT either updates shared memory and notifies applications or logs communication status events.

GOOSE Send Task and Function (GST and GSF)
#

GST handles periodic GOOSE transmission, while GSF manages event-triggered rapid retransmission. Each GOOSE control block has dedicated GST and GSF instances to support independent timing requirements.

To reduce latency, static APDU fields are pre-encoded. On events, GSF immediately sends a new GOOSE message and schedules exponential backoff retransmissions, after which control returns to GST for periodic transmission.

⚡ Real-Time Processing of FMTS
#

Real-Time Optimization Strategies
#

To ensure FMTS real-time performance in VxWorks, the following measures are applied:

  1. Register FCI with MUX using the PROTO_SNARF flag to prioritize frame reception.
  2. Assign higher priorities to FMTS tasks than to standard network and application tasks.
  3. Use shared memory and binary semaphores for high-frequency data exchange.
  4. Pre-encode static APDU fields to reduce runtime encoding overhead.
  5. Enable DMA mode in END drivers to minimize CPU load.

Real-Time Performance Testing
#

A test setup consisting of three ARM9-based VxWorks devices simulating protection, switchgear, and merging units is constructed. Sampled values are transmitted at 2400 Hz, while GOOSE trip and position messages are exchanged under various load conditions.

Measured end-to-end delays consistently remain below 2 ms, satisfying the IEC 61850 FMTS requirement of less than 3 ms. Test results also demonstrate that higher task priorities significantly improve GOOSE real-time performance under heavy network load.

✅ Conclusion
#

This paper presents a practical approach to implementing IEC 61850 fast message transmission services in VxWorks. By introducing a fast communication interface, carefully designed application tasks, and targeted real-time optimizations, both SAV and GOOSE services can meet stringent real-time requirements.

The implementation has been validated through real-time performance testing and provides a solid reference for IEC 61850 engineering applications on VxWorks platforms. Future work will focus on unifying data structures across SMM, SGM, and MMS services and evaluating system-level response times under more realistic substation scenarios.

Related

Research on Troubleshooting Methods for Abnormal Restarts in VxWorks Systems
·1167 words·6 mins
VxWorks RTOS Embedded Systems Debugging Reliability
Driving and Control Techniques for CompactPCI Bus under VxWorks
·1137 words·6 mins
VxWorks CompactPCI PCI RTOS Embedded Systems
Universal Method for Booting and Loading Applications in VxWorks
·757 words·4 mins
VxWorks Embedded Systems RTOS Bootloader