Sunday, March 10, 2024

IEC 101 protocol in detail Information

IEC 101 is a communication protocol used for transmitting data between devices in the electrical power system, such as remote terminal units (RTUs), protection relays, and control systems. The protocol was developed by the International Electrotechnical Commission (IEC) and is widely used in substation automation systems.

IEC 101 is a binary protocol, meaning that the data is transmitted in the form of 0s and 1s. It uses a master-slave architecture, where a master device initiates communication with one or more slave devices. The master device is typically a control centre or a supervisory system, while the slave devices are located in the field and perform various functions such as measuring electrical quantities, controlling switches, or protecting equipment.

The structure of IEC 101 protocol consists of several layers, each responsible for a specific set of functions.

Physical Layer

The physical layer defines the electrical and mechanical characteristics of the communication channel. It specifies the type of cable, connector, and signal levels used for communication. In IEC 101, the physical layer uses serial communication over RS-232, RS-422, or RS-485 interfaces.

Data Link Layer

The data link layer is responsible for error detection and correction, as well as framing and synchronization of the data. It uses HDLC (High-Level Data Link Control) protocol for framing and bit stuffing to ensure data integrity. The data link layer also includes the addressing mechanism used to identify the slave devices.

Application Layer

The application layer is the topmost layer in the protocol stack and is responsible for the actual exchange of data between the master and slave devices. It defines the format of the data and the commands used for controlling the devices. The application layer also specifies the various types of data objects that can be exchanged, such as analog input values, digital input/output status, and alarm status.

The application layer of IEC 101 is divided into several functional groups:

a. Group 1: General Interrogation and Control Function

b. Group 2: Parameter Interrogation Function

c. Group 3: Control Function

d. Group 4: Reset Process Command

e. Group 5: File Transfer Function

f. Group 6: Event Report Function

The protocol defines the format and content of the messages that are exchanged between the master and the slave devices. A typical message consists of a header, a data field, and a checksum. The header contains information about the message type, the source and destination addresses, and the length of the message. The data field contains the actual data that is being transmitted, such as analog or digital values, status information, or control commands. The checksum is used for error detection and ensures that the message has been transmitted correctly.

IEC 101 protocol coding involves the use of specific data structures and functions to exchange information between the SCADA system and the RTUs. The coding of IEC 101 protocol is based on the binary format, where each message is encoded as a series of bits.

The following are the basic steps involved in coding an IEC 101 message:

  • Start Character: The message starts with a special start character, which is usually the ASCII code for the character 'D' (hexadecimal 44).
  • Message Length: The next two bytes of the message represent the length of the message, including the start character and the length bytes.
  • Control Field: The control field is used to indicate the type of message and the function code. It is one byte long and consists of four bits for the message type and four bits for the function code.
  • Address Field: The address field identifies the RTU to which the message is addressed. It is one byte long and can be either a single address or a group address.
  • Information Field: The information field contains the data to be transmitted between the SCADA system and the RTUs. The size of the information field can vary depending on the type of message and the function code.
  • Checksum: The last two bytes of the message represent the checksum, which is used to check the integrity of the message during transmission.


The IEC 101 protocol message consists of three main parts: the start character, the message body, and the end character. The start character is a single byte value of 0x10, which indicates the start of the message. The end character is also a single byte value of 0x16, which indicates the end of the message. The message body contains the actual data being transmitted and is made up of different fields that convey different types of information.

The different fields in an IEC 101 protocol message are as follows:

  • Start Frame (SF): A one-byte value that identifies the start of a new message.
  • Frame Length (L): A two-byte value that indicates the length of the entire message, including the start and end characters.
  • Control Field (C): A one-byte value that contains information about the type of message being transmitted and the addressing mode used.
  • Address Field (A): A one- or two-byte value that identifies the originator and/or recipient of the message.
  • Information Field (I): The actual data being transmitted, which can be up to 248 bytes in length.
  • Checksum (CS): A one-byte value that is used to verify the integrity of the message.
  • The control field (C) is further divided into different subfields that convey additional information. These subfields include:
  • Function Code (FC): A four-bit value that specifies the type of message being transmitted, such as a request or a response.
  • Transmission Mode (TM): A two-bit value that indicates the addressing mode used, such as unicast or broadcast.
  • Cause of Transmission (COT): A six-bit value that specifies the reason for the message transmission, such as a data update or a system event.



IEC 101 trace logs are used to diagnose communication issues and provide insights into the behaviour of the protocol

Here is an example of how to read an IEC 101 trace log:

<10:10:00.000> : TX: 10 02 01 00 00 00 14 68 00 00 64 00 01 01 00 01 03 00 00 00 14 10 0a

<10:10:00.100> : RX: 10 02 81 00 00 00 06 68 00 00 64 01 03 10 0a

<10:10:00.100> : TX: 10 02 01 00 00 00 14 68 00 00 64 00 01 01 00 02 03 00 00 00 14 10 0a

<10:10:00.200> : RX: 10 02 81 00 00 00 06 68 00 00 64 02 03 10 0a

 

The trace log shows the communication between the RTU and the SCADA system. Each line represents a message that is either transmitted (TX) or received (RX) by the device. The time stamp indicates the exact time the message was sent or received.

In this example, the first message sent (TX) is:

10 02 01 00 00 00 14 68 00 00 64 00 01 01 00 01 03 00 00 00 14 10 0a

This message is in hexadecimal format and represents the IEC 101 frame. The first byte (10) indicates the start of the frame, followed by the length (02) and the control field (01) which indicates that it is a data frame.

This message is in hexadecimal format and represents the IEC 101 frame. The first byte (10) indicates the start of the frame, followed by the length (02) and the control field (01) which indicates that it is a data frame.

The second message received (RX) is:

10 02 81 00 00 00 06 68 00 00 64 01 03 10 0a

This message is a response to the previous message and indicates that the SCADA system has received the data. The control field (81) indicates that it is an acknowledgment frame.

The remaining bytes represent the sequence number (00) and the confirmation of received data (06). The confirmation of received data (68 00 00 64) indicates that the RTU has successfully sent the data.

The next message sent (TX) is similar to the first message, but with a different IO type identifier (2) and value (30). The following message received (RX) is similar to the second message, but with a different sequence number and confirmation of received data.

Debugging the IEC 101 protocol can be a challenging task, but there are several steps you can take to identify and resolve issues:

  • Verify the physical layer: The IEC 101 protocol uses a physical layer based on serial communication, typically RS-232 or RS-485. Ensure that the physical layer is properly connected and configured.
  • Check for communication errors: Use a protocol analyzer to monitor the communication between the devices and look for any communication errors, such as incorrect message framing, missing or extra bytes, or incorrect checksums.
  • Verify the configuration: Ensure that the configuration settings, such as the device address, baud rate, and parity, are set correctly on both devices.
  • Analyze the protocol: Study the IEC 101 protocol specification and compare it to the actual communication messages to identify any inconsistencies or errors.
  • Monitor the system: Use a monitoring tool to track the system behaviour and identify any abnormal patterns, such as excessive retries or message timeouts.
  • Use simulation tools: Use a simulation tool to emulate the IEC 101 protocol and generate test messages to verify the system's behaviour.
  • Collaborate with the vendor: Contact the vendor of the IEC 101 devices to obtain technical support and assistance with debugging the protocol.

IEC 101 supports various transmission modes, such as balanced or unbalanced transmission, and can operate over different physical media, such as RS-232, RS-485, or Ethernet. The protocol also defines different types of communication services, such as interrogation, control, or monitoring, which allow the master device to request or send information to the slave devices.

Overall, IEC 101 remains an important communication protocol in the power system industry, particularly in legacy systems and in applications where low data rates and simple functionality are sufficient.