- Precision Time Protocol
The Precision Time Protocol (PTP) is a time-transfer protocol defined in the
IEEE 1588-2002 standard that allows precise synchronization of networks (e.g.,Ethernet ). Accuracy within the nanosecond range can be achieved with this protocol when using hardware generatedtimestamp s.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 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."cite book |last= Eidson |first= John C. |title= Measurement, Control and Communication Using IEEE 1588 |publisher= Springer |year= 2006 |month= April |isbn= 1-8462-8250-0]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: [http://ieee1588.nist.gov/2006%20IEEE1588%20Agenda/Eidson_1588_Version%202.pdf]
* Transparent clocks through 1588-aware network equipment for improved accuracy
* Reduced size sync messages
* Protocol support for improved precision
* Layer 2 transport option
* Unicast transport option
* Fault tolerance support
* Rapid reconfiguration in response to network changes
* Varied (faster) update ratesThis new version of the standard is not directly interoperable with the previous version.Details
The goal of this protocol is to have a set of "slave" devices determine the "offset" between time measurements on their clocks and time measurements on a "master" device.
International standard IEC 61588: Precision clock synchronization protocol for networked measurement and control systems. 2004.] Let the variable represent physical time. For a given slave device, the offset at time is defined by::
where represents the time measured on the slave device's clock at physical time , and represents the time measured on the master device's clock at physical time .
In the protocol, the master device periodically launches an exchange of messages with slave devices to help each slave clock recompute 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. 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 measure the time they send or receive a message. The degree to which these assumptions are enforced in an application regulate the accuracy of the offset measured at a slave device.
Each message exchange begins with a multicast SYNC message sent by the master clock to all the slaves listening on the PTP multicast group. The master time stamps the time measured on its clock when it sends this message. A slave receiving this message takes note of the time measured on its clock when it receives this message. If is the transit time of this message, and is the constant offset during this transaction, then
:
The master next sends a multicast TIME T1 message to notify the slaves of which time it measured when it sent the SYNC message. Each slave now knows and . Each slave now sends a RESPONSE message back to the master. For implementation reasons, this message is implemented as a multicast message, but it is a "directed multicast" message in that the packet containing this message includes information about the master it is being sent to. The slave measures the time that it sends this message, and the master measures the time that it receives this message. The master then sends a directed multicast TIME T4 message back to the slave to notify the slave what time it received the RESPONSE message. Note that
:
The slave now knows times , , , and . Combining the above two equations, we find that
The slave now knows the offset during this transaction. While this offset will drift with time, it will be corrected the next time this exchange of transactions is launched.
ee also
*
Clock synchronization
*Synchronization References
External links
* [http://www.engineering.zhaw.ch/en/engineering/ines/ieee-1588/documents.html PTP documentation at InES]
* [http://ieee1588.nist.gov/terms.htm Meanings of common terms used in IEEE 1588] from [http://ieee1588.nist.gov/ NIST IEEE1588 page]
* [http://ptpd.sourceforge.net/ PTPd is a complete implementation of the IEEE 1588 specification for a standard (non-boundary) clock] An open source implementation of PTP.
Wikimedia Foundation. 2010.