Manual
ibaClock
52
Issue 1.4
15
PTP
15.1
Functional principle
Similar to NTP, PTP synchronization messages can also be exchanged between the
nodes involved. PTP defines the nodes involved as masters or slaves. NTP, on the other
hand, defines the nodes as servers and clients.
These messages consist of master sync, master follow-up, master delay response and
slave delay request. In addition, an algorithm is used to determine the best master in the
network, the so-
called “Best Master Clock Algorithm” (BMCA). The clock determined by
the BMCA is also called a grandmaster clock and serves as a reference clock.
Several slaves can synchronize with a master in the network. For this purpose, the mas-
ter sends synchronization messages that the slaves use to correct their local clock. The
master and slave generate exact time stamps in order to determine the network latency,
which is required for the synchronization.
To calculate the slave offset, four time stamps are recorded between the master and
slave. These are usually called t
1
to t
4
; see Figure 17: PTP time stamp (t
Figure 17: PTP time stamp (t
1
- t
4
)
Two run-times are then calculated with these four time stamps. From the master to the
slave and from the slave to the master.
𝑀𝑎𝑠𝑡𝑒𝑟𝑆𝑙𝑎𝑣𝑒 𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 = 𝑡
2
− 𝑡
1
𝑆𝑙𝑎𝑣𝑒𝑀𝑎𝑠𝑡𝑒𝑟 𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 = 𝑡
4
− 𝑡
3
𝑟𝑢𝑛 − 𝑡𝑖𝑚𝑒 =
MasterSlave difference + SlaveMaster difference
2