Time synchronization

Every slave synchronizes to its master's clock by exchanging synchronization messages with the master clock.

The synchronization process is divided into two phases. First the time difference between master and slave is corrected; this is the offset measurement.

During this offset correction, the master cyclically transmits a unique synchronization (SYNC) message to the related slave clocks at defined intervals (by default every 2 seconds). This sync message contains an estimated value for the exact time the message was transmitted.

For highly accurate synchronization a mechanism is now provided that determines the time of transmission and reception of PTP messages as precisely and as closely as possible to the hardware, best of all directly on the medium.

The master clock measures the exact time of transmission TM1 and the slave clocks measure the exact times of reception TS1. The master then sends in a second message, the follow-up message, the exact time of transmission TM1 of the corresponding sync message to the slave clocks.

On reception of the sync message and, for increased accuracy, on reception of the corresponding follow-up message, the slave clock calculates the correction (offset) in relation to the master clock taking into account the reception time stamp of the sync message. The slave clock Ts must then be corrected by this offset. If there were to be no delay over the transmission path, both clocks would now be synchronous.

The second phase of the synchronization process, the delay measurement, determines the delay or latency between slave and master. For this purpose the slave clock sends a so-called "delay request" packet to the master and during this process determines the exact time of transmission of the message TS3. The master generates a time stamp on reception of the packet and sends the time of reception TM3 back to the slave in a "delay response" packet.

From the local time stamp for transmission TS3 and the time stamp for reception provided by the master TM3, the slave calculates the delay time between slave and master.

The delay measurement is performed irregularly and at larger time intervals (random value between 4 and 60 seconds by default) than the offset measurement. In this way, the network, and particularly the terminal devices, are not too heavily loaded. However, a symmetrical delay between master and slave is crucial for the delay measurement and its precision, i.e. same value for both directions.

Using this synchronization process, timing fluctuations in the PTP elements especially the protocol stack and the latency time between the master and slave are eliminated.

 

Index
Next>