Additional Information

Site Information

 Loading... Please wait...

Industrial Ethernet Guide - IEEE 1588 Precision Time Protocol Standard

Posted by Wilfried Voss on

A Comprehensible Guide to Industrial Ethernet by Wilfried Voss

The following is part of  A Comprehensible Guide to Industrial Ethernet by Wilfried Voss.

Distributed applications in networked control environments require tight synchronization between all network nodes so that the delivery of control messages can be guaranteed within defined message cycle times. IEEE 1588, a standard providing sub-microsecond synchronization accuracy for distributed clocks over Ethernet, enjoys increasing popularity amongst real-time Ethernet developers.

In 2002 the IEEE 1588 Precision Time Protocol Standard addressed the need for deterministic responses by introducing a precision clock synchronization protocol for networked measurement and control systems. In 2008 a revised standard, IEEE 1588-2008 (also known as PTP Version 2 or PTPv2) was released to improve accuracy, precision, and robustness. However, PTP Version 2 it is not backward compatible with the original 2002 version.

The Precision Time Protocol (PTP) was developed with the following requirements in mind:

  • Replacing and advancing the features of previously applied synchronization protocols such as the Network Time Protocol (NTP) and Simple Network Time Protocol (SNTP) and also eliminating the need for costly alternatives such as GPS receivers.
  • Synchronization accuracy in the sub-microsecond (PTPv1) and even the sub-nanosecond (PTPv2) range.
  • Minimum requirements of processor performance and network bandwidth to allow implementations on simple, low-cost devices.
  • Low administration efforts.
  • Use via, but not limited to Ethernet TCP/IP networks.
  • Specification as an international standard.

The adoption of IEEE 1588, specifically the Precision Time Protocol (PTP), is implemented in various Real Time Industrial Ethernet networking protocols.

  • Ethernet/IP: CIPsync, part of the ODVA Ethernet/IP frameworks, relies greatly on PTP for motion control applications.
  • ProfiNet: ProfiNet uses PTP as a synchronization protocol.
  • Ethernet Powerlink: The Ethernet Powerlink Standardization Group (EPSG) has plans to use PTP for synchronizing real-time segments in a future version.

Note: The clock synchronization per IEEE 1588 protocol adds a certain level of determinism even to standard Ethernet TCP/IP. However, specialized hardware is required for each node in the network and also for Ethernet switches.

In IEEE 1588, all network nodes down to the device level contain an IEEE 1588 clock, synchronized with all network peers using the Precision Time Protocol (PTP).

PTP synchronizes clocks throughout a computer network, and it achieves clock accuracy in the sub-microsecond (PTPv1) and even the sub-nanosecond (PTPv2) range, thus making it suitable for industrial application requiring real-time performance. The protocol provides fault-tolerant synchronization between slave clocks and a master clock similar to the server and client mode in the Network Time Protocol (NTP), ensuring that events and timestamps in all devices use the same time base.

The Master is the provider of time, while the slave synchronizes to the Master. Messages in the protocol include Master Sync Message, Master Delay Response Message, and the Slave Clock Delay Request Message. Also, the Best Master Clock (BMC) algorithm allows multiple masters to negotiate the best clock for the network.

All masters periodically broadcast Sync messages containing an estimate of the time that the message will leave the Master. The slaves, in turn, record the precise receipt time, while the grandmaster records the sending time.

Time measurements are performed as close to the physical layer as possible to eliminate delays caused by the network stack and the operating system.

The IEEE 1588 code calculates time estimates in the application layer.

Following the Sync message, the Master releases a Follow-up message to report the precise sending time of the Sync message. Each slave in the network uses the transmission and reception times to calculate its offset and initiates synchronization when necessary.

The need for clock synchronization arose due to several factors: Differences in environmental temperature, the age of the clocks themselves, and the rate of frequency can all affect the quality of synchronization and, consequently, the network’s real-time performance. There is no guarantee that clocks throughout the network, set at the same frequency, will stay synchronized, and this circumstance initiated the call for continuous synchronization.

PTP requires very little bandwidth, processing power, and setup. It synchronizes all clocks within a network by adjusting clocks to the highest quality clock. IEEE 1588 defines value ranges for the standard set of clock characteristics.

The Best Master Clock (BMC) algorithm determines which clock is the highest quality clock within the network. The BMC (also known as the Grandmaster Clock), ideally controlled by a radio clock or GPS receiver, synchronizes all other clocks (slave clocks) in the network. If the BMC is removed from the network or is determined by the algorithm to no longer be the highest quality clock, the algorithm redefines who the new BMC is and adjusts all other clocks accordingly. No administrator input is needed for this readjustment because the algorithm is fault-tolerant.

While most IEEE 1588 implementations provide accuracy in the sub-microsecond and sub-nanosecond range, their actual performance is highly application-specific. For example, the IEEE 1588 protocol does not specify the clock frequency in the Master and slaves.

Lower-frequency clocks have more inadequate time resolution resulting in less-accurate timestamps in the PTP synchronization messages.

Clock stability is another factor. Clocks based on temperature-controlled crystal oscillators (TCXOs) and oven-controlled crystal oscillators (OCXOs) have higher stability compared with clocks using uncontrolled crystal oscillators. Clocks with lower stabilities will drift apart faster, and, as a result, require a higher rate of frequency and phase corrections.

Another factor is network topology. The simplest network topology (i.e. two devices on a single cable) causes less network jitter than many devices linked using routers and switches.

If more than one subnet is required to increase distance or number of devices, a network switch with an accurate IEEE 1588 clock, called a Boundary Clock, becomes the master clock and synchronizes the devices on the subnets.

Last, but not least, wide variations in network traffic may negatively impact clock skew as the delay correction lags current traffic conditions. Because many factors can degrade skew performance, benchmarking, and monitoring the actual skew performance over time is advisable.

netSHIELD"NSHIELD 52-RE" - Industrial Ethernet Development Platform

netSHIELD"NSHIELD 52-RE" - Industrial Ethernet Development PlatformnetSHIELD is an evaluation expansion board with Arduino compatible connectors for development purposes.

It enables the user to connect a Microcontroller based application to all market relevant Real-Time-Ethernet industrial networks with best-in-class real-time capabilities, like PROFINET, Ethernet/IP, EtherCAT, and others.

The extension board features a netX 52 system-on-chip. The netX SoC architecture is designed from the ground up for the highest demands on flexibility, determinism, and performance in terms of multi-protocol capability and low latency for short cycle times. The heterogeneous multi-core architecture features an ARM processor core, coupled with a flexible communication subsystem (xC) for varieties of industrial applications support.

More Information...