Standards/Ethernet PTP

(Difference between revisions)
Jump to: navigation, search
Line 12: Line 12:
  
 
First the slaves corrects the offset depending on a messages received from the master. This message called ''Sync'' contains the current time of the master.
 
First the slaves corrects the offset depending on a messages received from the master. This message called ''Sync'' contains the current time of the master.
To include the exact time of transmission in a message, special hardware is required. Therefore the ''Sync'' message can also be empty and is then chased by a ''Follow_Up'' message containing the transmission time of the ''Sync'' message.
+
To include the exact time of transmission in a message, special hardware (like the [[NS DP83640 Precision PHYTER]]) is required. Therefore the ''Sync'' message can also be empty and is then chased by a ''Follow_Up'' message containing the transmission time of the ''Sync'' message.
  
 
=== Delay ===
 
=== Delay ===

Revision as of 13:56, 16 May 2012

Contents

IEEE Std 1588-2008 Precision Time Protocol (PTP)

The Precision Time Protocol allows to synchronize clocks over a distributed network with a precision range below the microsecond. For this a reference clock is defined (the grandmaster clock) and all other clocks (slaves) adjust their time to it. Timing messages exchanged between a master and a slave enable the slave to determine and correct the clock offset as well as the network delay.

Synchronization

PTP Synchronization

The synchronization is a two-step process: offset and delay

Offset

First the slaves corrects the offset depending on a messages received from the master. This message called Sync contains the current time of the master. To include the exact time of transmission in a message, special hardware (like the NS DP83640 Precision PHYTER) is required. Therefore the Sync message can also be empty and is then chased by a Follow_Up message containing the transmission time of the Sync message.

Delay

In a second step the network delay is calculated. The slave sends a Delay_Req message to the master. The master then responds with a Delay_Resp message containing the reception time of the Delay_Req message. The slave then determines the delay of the network by calculating the difference of the transmission time of the Delay_Resp message and the reported reception time.

Boundary conditions

  • The PTP assumes that the network delay from master to slave is the same as from slave to master. If this is not the case, the delay calculation will be wrong.
  • PTP can endure missing, duplicated or disordered messages, as long as they arrive relatively seldom.

Ethernet protocol

The PTP frames are sent on UDP ports 319 (ptp-event) and 320 (ptp-general).

The PTP master Sync message is a multicast sent to address 01:00:5E:00:01:81 / 224.0.1.129, port 319. It can be follwed by a Follow-up message, wich is also a multicast to the same address but to port 320. The Delay_Request message is sent back to the master as a unicast on port 319. The Delay_Response answer comes back as unicast on port 320.

References

  1. NIST IEEE 1588
  2. "IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems," IEEE Std 1588-2008 (Revision of IEEE Std 1588-2002) , vol., no., pp.c1-269, July 24 2008
    doi: 10.1109/IEEESTD.2008.4579760
    URL: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=4579760&isnumber=4579759
  3. Wikipedia article
Personal tools
Namespaces
Variants
Actions
Navigation
Browse
Toolbox