IEEE1588-Precise Time Protocol
The Precision Time Protocol (PTP) is a protocol used to synchronize clocks throughout a computer network. On a local area network, it achieves clock accuracy in the sub-microsecond range, making it suitable for measurement and control systems.
PTP was originally defined in the IEEE 1588-2002 standard, officially entitled "Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems" and published in 2002. In 2008 a revised standard, IEEE 1588-2008 was released. This new version, also known as PTP Version 2, improves accuracy, precision and robustness but is not backwards compatible with the original 2002 version.
"IEEE 1588 is designed to fill a niche not well served by either of the two dominant protocols, NTP and GPS. IEEE 1588 is designed for local systems requiring accuracies beyond those attainable using NTP. It is also designed for applications that cannot bear the cost of a GPS receiver at each node, or for which GPS signals are inaccessible."
Architecture
The IEEE 1588 standards describe a hierarchical master-slave architecture for clock distribution. Under this architecture, a time distribution system consists of one or more communication media (network segments), and one or more clocks. An ordinary clock is a device with a single network connection and is either the source of (master) or destination for (slave) a synchronization reference. A boundary clock has multiple network connections and can accurately bridge synchronization from one network segment to another. A synchronization master is selected for each of the network segments in the system. The root timing reference is called the grandmaster.[4] The grandmaster transmits synchronization information to the clocks residing on its network segment. The boundary clocks with a presence on that segment then relay accurate time to the other segments to which they are also connected.
A simplified PTP system frequently consists of ordinary clocks connected to a single network. No boundary clocks are used. A grandmaster is elected and all other clocks synchronize directly to it.
IEEE 1588-2008 introduces a clock associated with network equipment used to convey PTP messages. The transparent clock modifies PTP messages as they pass through the device. Timestamps in the messages are corrected for time spent traversing the network equipment. This scheme improves distribution accuracy by compensating for delivery variability across the network.
PTP typically uses the same epoch as Unix time (Midnight, 1 January 1970).[note 1] Whereas Unix time is based on Coordinated Universal Time (UTC) and is subject to leap seconds, PTP is based on International Atomic Time (TAI) and moves forward monotonically. The PTP grandmaster communicates the current offset between UTC and TAI, so that UTC can be computed from the received PTP time.
Protocol details
Synchronization and management of a PTP system is achieved through the exchange of messages across the communications medium. To this end, PTP uses the following message types
Sync, Delay_Req, Follow_Up and Delay_Resp messages are used by ordinary and boundary clocks and communicate time-related information used to synchronize clocks across the network.
Pdelay_Req, Pdelay_Resp and Pdelay_Resp_Follow_Up are used by transparent clocks to measure delays across the communications medium so that they can be compensated for by the system. Transparent clocks and these messages associated with them are not available in IEEE 1588-2002.
Announce messages are used by the best master clock algorithm in IEEE 1588-2008 to build a clock hierarchy and select the grandmaster.[note 2]
Management messages are used by network management to monitor, configure and maintain a PTP system.
Signaling messages are used for non-time-critical communications between clocks. Signaling messages were introduced in IEEE 1588-2008.
Messages are categorized as event and general messages. Event messages are time-critical in that accuracy in transmission and receipt timestamp accuracy directly affects clock distribution accuracy. Sync, Delay_Req, Pdelay_Req and Pdelay_resp are event messages. General messages are more conventional protocol data units in that the data in these messages is of importance to PTP, but their transmission and receipt timestamps are not. Announce, Follow_Up, Delay_Resp, Pdelay_Resp_Follow_Up, Management and Signaling messages are members of the general message class.
Optional features
IEEE 1588-2008 standard lists the following set of features that implementations may choose to support:
Alternate Time-Scale
Grand Master Cluster
Unicast Masters
Alternate Master
Path Trace
Related initiatives
The International IEEE Symposium on Precision Clock Synchronization for Measurement, Control and Communication is an IEEE organized annual event that includes a plugfest and a conference program with paper and poster presentations, tutorials and discussions covering several aspects of PTP.[8]
The Institute of Embedded Systems (InES) of the University of Winterthur is addressing the practical implementation and application of PTP.
IEEE 1588 is a key technology in the LXI Standard for Test and Measurement communication and control.
IEEE 802.1AS-2011 is part of the IEEE Audio Video Bridging (AVB) group of standards. It specifies a profile for use of IEEE 1588-2008 for time synchronization over a virtual bridged local area network (as defined by IEEE 802.1Q). In particular, 802.1AS defines how IEEE 802.3 (Ethernet), IEEE 802.11 (Wi-Fi), and coordinated shared networks like MoCA can all be parts of the same timing domain.
The Society of Motion Picture and Television Engineers is developing a new broadcast synchronization standard based on IEEE 1588.[9]