Wikipedia Forever Our shared knowledge. Our shared treasure. Help us protect it.
Wikipedia Forever Our shared knowledge. Our shared treasure. Help us protect it.

Precision Time Protocol

From Wikipedia, the free encyclopedia

Jump to: navigation, search
The Internet Protocol Suite
Application Layer
BGP · DHCP · DNS · FTP · GTP · HTTP · IMAP · IRC · Megaco · MGCP · NNTP · NTP · POP · RIP · RPC · RTP · RTSP · SDP · SIP · SMTP · SNMP · SOAP · SSH · Telnet · TLS/SSL · XMPP · (more)
Transport Layer
TCP · UDP · DCCP · SCTP · RSVP · ECN · (more)
Internet Layer
IP (IPv4, IPv6) · ICMP · ICMPv6 · IGMP · IPsec · (more)
Link Layer
ARP/InARP · NDP · OSPF · Tunnels (L2TP) · PPP · Media Access Control (Ethernet, DSL, ISDN, FDDI) · (more)

The Precision Time Protocol (PTP) is a high precision time synchronization protocol for networked measurement and control systems. Accuracy in the sub-microsecond range may be achieved with low-cost implementations.[1] It is defined in the IEEE 1588-2002 and 1588-2008 standards, officially entitled "Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems".

"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 very high 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."[2]

Contents

[hide]

[edit] Details

PTP establishes a Master Slave relationship in the network to make synchronization more accurate for the device that qualifies for master if it satisfies certain qualities. The master election takes place with the help of announce messages.

A master periodically broadcasts the current time to one or more slave devices. Slave devices determine the offset between time measurements on their clocks and time measurements on a master device. [3] Let the variable t represent physical time. For a given slave device, the offset o(t) at time t is defined by:

\ o(t) = s(t) - m(t)

where s(t) represents the time measured on the slave device's clock at physical time t, and m(t) represents the time measured on the master device's clock at physical time t.

In the protocol, both the slave and master periodically launch an exchange of messages with the other. Through this exchange the slave determines the offset between its clock and the master's clock. This offset will drift with time, and so these periodic exchanges mitigate the impact of this drift on clock synchronization. One assumption is that this exchange of messages happens over a period of time so small that this offset can safely be considered constant over that period. Another assumption is that the transit time of a message going from the master to a slave is equal to the transit time of a message going from the slave to the master. Finally, it is assumed that both the master and slave can accurately measure the time they send or receive a message. The degree to which these assumptions hold true determines the accuracy of the clock at the slave device.

IEEE 1588 Synchronisation Mechanism, Delay Calculation

Each message exchange begins at time T1 with a multicast Sync message sent by the master clock to all the slaves listening on the PTP multicast group. A slave receiving this message takes note of the time T1' measured on its clock when it receives this message.

Optionally, the master sends a multicast Follow_Up message to notify the slaves of time T1 when it sent the Sync message. The time T1 is conveyed in the Sync or Follow_up message if present. Not all masters have ability to present an accurate time stamp in the Sync message. It is only after the transmission is complete that they are able to retrieve an accurate time stamp for the Sync transmission from their network hardware. Masters with this limitation use the Follow_up message to convey T1. Masters with PTP capabilities built into their network hardware are able to present an accurate time stamp in the Sync message and do not need to send Follow_up messages.

On a less frequent schedule, the slave initiates an exchange with the master designed to measure the transit time d. The exchange begins with the slave sending a unicast Delay_Req message at time T2 to the master. The master receives and time stamps the Delay_req at time T2' and responds at time T3 with a unicast Delay_Resp message. The master includes the time stamp T2' in the Delay_Resp message. The Delay_Resp message is received at the slave at time T3'.

Through these exchanges each slave now knows T1, T1', T2 and T2'

If d is the transit time for the Sync message, and \tilde{o} is the constant offset between master and slave clocks, then

\ T1' - T1 = \tilde{o} + d and \ T2' - T2 = - \tilde{o} + d

Combining the above two equations, we find that

\tilde{o} = (T1'-T1-T2'+T2)/2

The slave now knows the offset \tilde{o} during this transaction and can correct its local clock by this amount to bring it into agreement with the master's clock.

[edit] IEEE 1588-2008

Also known as IEEE 1588 Version 2, an updated version of the standard was approved in March 2008. The new version adds the following enhancements:[4]

  • Transparent clocks through 1588-aware network equipment for improved accuracy
  • Reduced size sync messages
  • Protocol support for improved precision
  • Layer 2 transport option (0x88F7 is used as EtherType for PTP over Ethernet)
  • Unicast transport option
  • Fault tolerance support
  • Rapid reconfiguration in response to network changes
  • Varied (faster) update rates

This new version of the standard is not directly interoperable with the previous version.

[edit] Related initiatives

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.

802.1AS is a standard under development that uses a compatible subset 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 Ethernet, WiFi, and "coordinated shared networks" like MoCA can all be parts of the same timing domain.

[edit] See also

[edit] References

  1. ^ "IEEE 1588 Systems". http://ieee1588.nist.gov/. 
  2. ^ Eidson, John C. (April 2006). Measurement, Control and Communication Using IEEE 1588. Springer. ISBN 1-8462-8250-0. 
  3. ^ International standard IEC 61588: Precision clock synchronization protocol for networked measurement and control systems. 2004.
  4. ^ IEEE 1588 Standard Version 2 - A Tutorial

[edit] External links