IEEE 1588 PTP v1 and v2

  • Home
  • >
  • PTP/IEEE-1588 Solutions
Our Solutions

PTP Synchronization Basics

The protocol defines synchronization messages used between a Master and Slave clock similar to the Server and Client mode used in the Network Time Protocol (NTP).

The Master is the provider of time, and the Slave synchronizes to the Master. A Grandmaster is a Master that is synchronized to a time reference such as GPS.

Messages in the protocol include Master sync message, Master delay response message, and the Slave clock delay request messages.

In addition to the messages, the Best Master Clock (BMC) algorithm allows multiple Masters to negotiate the best clock for the network.

Clock synchronization on the LAN requires at least one Master and one Slave. Multiple Slaves can synchronize to a single Master.

The Master clock provides synchronization messages that the Slaves use to correct their local clocks. Precise timestamps are captured at the Master and Slave clocks. These timestamps are used to determine the network latency which is required to synchronize the Slave to the Master.

There is a sync message transmitted typically every two seconds from the Master, and a delay request message from the Slave less frequently, about one request per minute.

How it works

Four timestamps are captured between the Master and Slave clock. The timestamps are required for the Slave offset calculation. The timestamps are commonly referred to as T1, T2, T3, and T4.

Two delay paths must be calculated, the Master to Slave and the Slave to Master.

First find the Master to Slave difference:

Second, find the Slave to Master difference:

The one-way delay can be calculated once the Master to Slave and Slave to Master difference is available at the Slave:

  • One way delay = (Master to Slave difference + Slave to Master difference) / 2

The offset is used to correct the Slave clock:

Offset = Master to Slave difference – One way delay

or

Offset = ((T2 – T1) – (T4 – T3)) / 2

Therefore, the following statements are true with respect to this algorithm, assuming constant network propagation delays and gradually changing operating conditions such as temperature:

The Slave clock utilizes the offset to adjust the time to agree with the Master clock. Typically, the Slave clock will use a clock tuning algorithm that can account for network propagation delays affecting the offset and the Slave clock crystal temperature and aging effect on its stability.