IEEE 1588 Time Synchronization

ieee1588

IEEE 1588 Time Synchronization

An increasing number of substation protection and control applications are beginning to use Ethernet as a communication channel. Therefore, it can be assumed that Ethernet will become the main communication medium for future substations, especially at the transmission level.

Digital substations require an optimized network architecture that fully integrates all components of the IEC 61850 automation system. This requires that all control and measurement equipment, available from a variety of vendors, be plug-and-play. Many IEC 61850 applications require high timing accuracy and fast or seamless communication redundancy to operate properly and achieve the level of reliability required in power applications.

Considering the cost and reliability of timing systems based on distributed GPS receivers, it is advisable for distribution facilities to use fewer distributed GPS receivers and use the saved capital to implement more reliable and robust centralized timing systems with different input data sources and validation algorithms to deal with intentional and natural disturbances. Assuming that a robust centralized timing source is available, reliable and accurate timing dissemination will be critical for critical control and measurement applications requiring timing accuracy of ±1 μs. 

In terms of cost, complexity, and reliability compared to various time synchronization methods, the IEEE 1588v2 PTP is a good candidate for a substation synchronization solution.

This paper provides an introduction to IEEE 1588v2 and provides sufficient background knowledge of the key issue of time synchronization.

What is IEEE1588?

The IEEE 1588-2008 standard defines the second generation of PTP, also known as PTPv2 or 1588v2. The PTP standard provides the ability to achieve highly accurate time synchronization with Ethernet devices by recording the exact time the PTP synchronization message was received. This information can compensate for the uncertainty introduced by real-time operating systems and other delays created by the synchronization process in the master device as well as in the devices that are synchronized. A great advantage of PTPv2 is that it does not affect the operation of other protocols running on the Ethernet network, making it possible for it to co-exist on a single port with 61850, 61850-8-1 GOOSE, DNP3, Sampled Values (SV) and other station automation protocols. It is important when building a station to equip Ethernet switches with native support for PTP, which is only available on the highest-end switches.

PTP supports multiple master clocks that between them select a single clock designated as Grandmaster. If the clock selected as master is downgraded, it is possible to auto-nominally select a clock in real time to act as the new Grandmaster with better accuracy than the current clock.

 

One of the main features of PTP is its flexibility, as it can be used for many time synchronization applications with an accuracy of less than 10 ns. Such accuracy could be achieved by adding special profiles for Ethernet switches in PTPv2.

The goals of the PTP are to achieve:

  • microsecond or even nanosecond timing accuracy,
  • Minimized resource requirements for network, software and hardware,
  • implementing synchronization in data networks,
  • Clock support with different capabilities such as precision, resolution, and stability.

IEEE 1588 PTPv2 is used in many areas, such as industrial automation and audio and video networks. One key advantage is that IEEE 1588 can be distributed over Ethernet: it does not require an additional time distribution network and avoids the need to install dozens of GPS receivers in substations. At the same time, it is more precise than NTP/SNTP because IEEE 1588 can provide sub-microsecond accuracy using hardware time stamping. Table 1 summarizes the characteristics of the different synchronization methods currently available in substations.

Tabel 1: Comparison of different station time synchronization methods
Method Typical accuracy at a station using a given methody Display of date and time of day Dedicated cabling not required Cost effectiveness Scales well with a large number of devices
IRIG-B (AM) 1ms +
IRIG-B (DC-shifted) 100µs +
1PPS 1µs
GPS 1µs +
NTP 1-10ms + + +
IEEE 1588 v1 1µs + + +
IEEE 1588 v2 1µs + + + +

Types of clocks

Three types of clocks are defined for the PTP standard, namely Ordinary Clock (OC), Transparent Clock (TC) and Boundary Clock (BC). These clocks work together to distribute highly accurate synchronization messages throughout the timing structure.

Ordinary clock (OC) is a single port device that supports PTP. It maintains a time scale in the PTP domain. It can be configured as a master clock or just a slave clock.

The master role means that the clock acts as a Grandmaster, sending synchronization messages to the network. As defined in PTPv2, only one master clock can be the final time source in a domain and is called a Grandmaster clock. However, PTP allows multiple clocks to act as Grandmaster if required. Therefore, even though there may be more than one clock configured in master mode, only one can become the Grandmaster and the rest remain in the passive state. A clock in the passive state does not send any messages. It is only treated as a Backup Master that listens to the state of the current Grandmaster, waiting to take over its role if its precision degrades.

A slave-only clock means that it can only receive synchronization messages from the network to synchronize its own internal oscillator to match the frequency and phase to the master clock.

Transparent Clock (TC) Information in communication systems is sent through switches and routers with some delay. The role of the TC is to accurately measure the switching delay and add this information to the PTP message.

TC switches can be configured in two ways: TC End-to-End (E2E) or TC Peer-to-Peer (P2P), depending on the delay measurement mechanism used. If the clock operates in E2E mode, only the dwell time is included in the correction field of the target PTP message. P2P, on the other hand, also communicates with the device to which it sends the message to obtain peer delay information, which is added to the correction fields along with the dwell delay.

Boundary clock (BC) in principle operation is similar to TC, which normally acts as a network switch, but is equipped with a local oscillator. The difference is that the TC transports only network packets and marks them with timestamps, while the BC acts as an intermediary clock between the Grandmaster and the Slave. It has one port in the slave state, synchronized to the master clock, while the other ports act as masters for the clocks below.

 As a result, BCs divide the entire time region into different segments or subdomains, and each segment can have different configuration settings. The overall architecture is shown in Figure 1. A BC can be part of a master clock section, and the master port can become the Grandmaster of the entire network if all current master clocks fail. This gives a huge advantage over TC by providing a consistent time source during Grandmaster failures to maintain a common time reference for network devices. One disadvantage of BCs is that while they can be cascaded similar to TCs, this topology is susceptible to higher cumulative synchronization errors.

IEEE 1588v2 operating principle

In general, the IEEE 1588v2 synchronization process consists of two steps.

– Establish a Master-Slave hierarchy: decide the role and state of each port of all Ordinary Clocks (OC) and Boundary Clocks (BC),

– Synchronization: the Grandmaster clock starts synchronizing the slave clocks.

To establish a master-slave hierarchy, it is necessary to decide which node is the grandmaster clock for the entire system, which node is the master clock, and which node is the slave clock. The Best Master Clock Algorythm can establish the Master-Slave hierarchy by determining the state of each port (Master, Slave or Passive) on the OC or BC clock. Intermediate IEEE 1588v2 TCs (e.g., switches that support the 1588v2 standard) then measure the latency of 1588 messages sent from a port in the Master state to a port in the Slave state. This delay will then be used by the port in the slave state to adjust the local clock time.

Rysunek 1. Sieć zegarów IEEE 1588v2

Best Master Clock Algorithm (BMCA)

BMCA is a decision-making algorithm applied to all Grandmaster-enabled nodes to determine the state of the clock. A port on the clock has three possible states: Master, Slave, and Passive, depending on configuration settings and BMCA decisions. Each port can be in one state at a time. TC devices only send network messages and perform timestamping, so BMCA does not apply to them. When the Master changes to a new one, it periodically distributes information about the clock properties to the network via Announce messages.

Changing the Master and initiating BMCA can be triggered by the absence of Announce messages from the existing Grandmaster for a period of time. This process can also be triggered automatically when the active Master degrades or another node with a better clock is connected to the network. The Grandmaster node is selected based on Announce messages sent from all nodes to the Grandmaster. BMCA uses the data set from Announce to decide which Master has the best performance to be selected as Grandmaster. The data for decision making is listed below, in order of priority:

Grandmaster Priority 1: This is a user-defined setting that can be configured from 0 to 255. Lower values take precedence. It is designed to bypass the rest of the BMCA comparisons to speed up execution, and to give users freedom in terms of clock settings. The PTP standard does not specify restrictions on priority settings, but is defined in specific PTP profiles.

2 Grandmaster identity: this is the setting for clockClass, which means the ability to track time or frequency, in other words the state of the clock. A lower value means better clock accuracy. clockClass 255 is used for slave clocks.

  1. clock accuracy: this is a calculated value estimated by the clock based on the time source attribute and the ability of the clock itself to hold.

4 Clock deviation (frequency stability): This is a statistical value of the logarithmic scale representing the accuracy of the timestamp when it is not synchronized by PTP based on the algorithm specified in PTPv2.

  1. Grandmaster Priority 2: This is another user-defined setting, similar to Grandmaster Priority 1. If there are two identical clocks with the Grandmaster feature, this setting can be used to select the preferred Master.

Clock Identification: the MAC address value of the clock, which is a unique value for each clock in the LAN.

The BMCA state diagram is shown in Figure 2, which illustrates the complete procedure and state change for the BMCA. The first step is for the local clock to set the port state and generate its own set of data when it powers up or restarts. It then enters a listening state where it listens for an Announce message from other clocks on the network. At this point there are three possible states: Master, Slave, and Passive, into which this clock can transition. The state decision depends on two important aspects:

  1. data set comparison: the local clock compares its own data set with the set embedded in messages from other clocks.
  2. clockClass of the local clock: this is an attribute setting of the local clock that limits the states it can enter. A smaller value means that the clock is more stable. clockClass specifies what role the clock can play.
Figure 2: BMCA principle of operation

Once a BMCA decision is made, the clock will enter the appropriate state. The Announce message is sent periodically from the Grandmaster clock, so that BMCA is continuously executed on all clocks, and the clock state will dynamically change, depending on both the network state and its own settings. In the event of a misconfiguration or failure that causes more than one Master to send PTP messages, the slave clock can use the BMCA rule to decide which Master is the best and reject information from the inferior Master.

Two step i One step

In PTP, the most critical issue is determining the exact time at which a PTP Sync message is sent and received by the Ethernet interfaces of the slave clocks. It is not possible to determine the time a message is sent until the time the message is sent. The time is tagged on the Ethernet interface that supports PTP and then shares this information with the Grandmaster. The next step is to send a Follow Up message, which relays this exact time to the nearest device and end devices. The slave clocks for maximum accuracy add their estimated delay in the Follow Up message. The combination of Sync and Follow Up messages is called a “Two Steps” operation.

By using more advanced Ethernet switches, it is possible to modify PTPv2 messages in real time, updating the exact timestamp during transmission. This avoids the need to send Follow Up messages and is called One Step operation. Grandmaster distributes the timestamp in the Sync message, and transparent clocks provide an estimate of network latency in the Sync message correction rather than in the Follow Up message, significantly reducing network traffic.

A system architecture with PTPv2 precise synchronization can be built using One step and Two step in one network. The switches will then need to take into account the correction information that has been inserted into the Sync messages of the One step transparent clocks and the updated information sent in the Follow Up messages of the Two step transparent clocks.

Figure 3: Clock synchronization via PTP mechanism

IEEE 1588 Power Profile

The PTPv2 standard introduces profiles that allow a number of options when it comes to configuring them. Profiles define certain functions, indicating their specific use.

For the power industry, an IEEE Std C37.238-2011/2017 profile has been developed that, with optimized parameters and minimal user-side configuration, allows synchronization accuracy of less than 1 µs to be achieved with network topologies typical of substation automation systems.

Management Information Base (MIB) for Simple Network Management Protocol (SNMP) is also defined in the Power Profile and allows key device parameters to be monitored using standard network management tools. The performance of the time synchronization system is monitored in real time, and alerts are raised to the administrator when problems or anomalies occur.

The Power Profile defines requirements for Ethernet switches that can introduce an inaccuracy of no more than 50ns. According to the standard, the imprecision for Power profile cannot exceed the 1 µs level, hence the limitation to 16 Ethernet switches in a ring network topology. In the inaccuracy, we must also include the delay contributed by the clock from the GPS up to 200 ns (as per the standard).

The profile requires that Peer-to-Peer switches be used to switch all PTPv2 messages on an Ethernet network, with all messages transmitted using Ethernet layer 2 frames. Peer-to-Peer means that each PTP device exchanges messages with a neighboring device on the network to measure the path delay between them-thus avoiding each Slave from communicating with the Master. The total network latency is calculated by summing the path latency and switch dwell times between the Grandmaster clock and each Slave clock. This has two advantages:

  • The traffic and load that is directed to the master clock on the network does not crash as more devices are added. The Grandmaster communicates only with the Ethernet switch to which it is connected.
  • The PTP system automatically compensates when a network link fails and an alternate path is used. Path delays are measured on all network links, even those that are blocked to normal traffic by SpanningTree protocols.

PTP Messages

For messaging using Power Profile, four classes have been defined for time synchronization:

  • Follow Up message that contains the exact time stamp of the previous Sync message, adding delay information. The delay is the sum of the clock delay times due to the distance traveled and the propagation delays due to the slave clock.
  • Sync Messages, which contains the master clock time information in terms of the number of nanoseconds and seconds since midnight on January 1, 1970.
  • Peer Delay messages that are exchanged between adjacent devices to determine the delay of each path between devices.
  • An Announce message is an information message sent by Grandmaster that contains details about the accuracy of the time from, for example, a GPS receiver and other information about the PTPv2 protocol.

Advantages of PTP

  • Ethernet traffic has no effect on synchronization accuracy. Only if the network is overloaded, PTP messages will be lost. This situation can be avoided by using Ethernet switches equipped with 10Gbit/s interface in the architecture. This saves the budget, and the network with precise synchronization can be used for data transmission from synchrophasors, for data transmission from IEC 61850 process bus (MMS, GOOSE).
  • PTP provides the ability to use redundant Grandmaster clocks with automatic failover if the active Grandmaster loses network connectivity or clock quality degrades.
  • The network can be expanded without putting undue strain on Grandmaster.
  • Propagation delays due to long cable runs are automatically compensated. Tuning of link units and phasor measurement units in the field does not have to be done manually.
  • In PTP, the rate at which messages are sent has been optimized to meet latency requirements of less than 1 µs without also causing excessive traffic on the shared network.
  • There are no configuration issues regarding UTC or local time. A single time reference is used so that all Power Profile devices use TAI international atomic time, avoiding time change issues, among other things.
  • Both fiber and twisted pair Ethernet can be used for PTPv2 transmission.
  • Power Profile transmits a local time offset, so there is no need to configure a local time zone on the protection relays.
  • Any changes to daylight saving time operation dates must be made only to Grandmaster, not to every device in the network. The mechanism used is defined in IEEE C37.238-2011/2017.
  • To increase the reliability of network connections between PTP devices, protocols can be used to enable redundant Ethernet connections, such as the RSTP protocol, the parallel redundancy protocol PRP, and the lossless ring HSR.
  •