Precision Time Protocol (PTP) New Version
Precision Time Protocol (PTP) New Version
IEEE 1588
AGENDA
1. INTRODUCTION
2. OBJECTIVES
3. ARCHITECTURE
4. CLOCK SYNCHRONIZATION
5. MESSAGE TYPES
6. PTP SYNCHRONIZATION
7. SELECTION OF MASTER
INTRODUCTION
IEEE 1588 is a protocol designed to synchronize real-time clocks in the nodes of a distributed system
that communicate using a network.
Target is groups of relatively stable components, locally networked (a few subnets), cooperating on a set
of well defined tasks.
Approved by the IEEE-SA Review Committee on September 12, 2002.
Products: Microprocessors, GPS Linked Clocks, Boundary Clocks, NIC Cards, Protocol Stacks, RF
Instrumentation, Aircraft Flight Monitoring Instruments, etc.
The IEEE 1588-2002 standard was later revised and became the IEEE 1588-2008 standard, many in
industry refers to it as the IEEE 1588 version 2 standard.
OBJECTIVES
This standard defines a network protocol enabling accurate and precise synchronization of the real-time
clocks of devices in networked distributed systems.
The protocol supports synchronization in the sub-microsecond range with minimal network bandwidth and
local clock computing resources.
Support heterogeneous systems of clocks with varying precision, resolution and stability
Applicable to local area networks supporting multicast communications for PTP version 1 and unicast for PTP
version 2.
The standard defines all needed data types, message formats, required computations, internal states, the
behavior of devices with respect to transmitting, receiving, and processing protocol communications.
ARCHITECTURE
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 or CDMA.
Clock synchronization on the LAN requires at least one Master and one Slave. Multiple Slaves can
synchronize to a single 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
PTP SYNCHRONIZATION
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.
a. Let t represent physical time, given slave device, the offset o(t) at
time t is : o(t) = s(t) - m(t).
m(t) is measured time at master at time t, and
s(t) is measured time at local clock at time t.
1-step clock updates accurate timestamp (t1) in Sync message
The algorithm runs independently on each clock in a domain. In other words, clocks
do not negotiate which should be master and which should be slaveinstead, each
computes only the state of its own ports.
The algorithm avoids configurations with two masters, or none, or ones that thrash.
Basically, The best master clock algorithm, BMC, consists of two parts:
State Decision Algorithm
Data Set Comparison Algorithm.
STATE DECISION ALGORITHIM
The state decision algorithm used in the best master clock algorithm shall be as defined by
given Figure. After a decision is reached by use of this algorithm, the data sets of the local
clock shall be updated as specified.
Algorithms follows the following steps to be completed for complete process:
STATE DECISION ALGORITHIM
DATA SET COMPARISION ALGORITHIM
The best master clock algorithm compares one clock with another by comparing data sets that represent those clocks.
The data sets are indicated in these figures as set A and set B. The sources for data set values are given in Table.
If in comparing any two of the data sets D0, Ebest, or Erbest, one of the data sets is the empty set, then the nonempty set is
deemed the better set. D0 is never the empty set; however, Ebest or Erbest or both may be the empty set.
Here (i). Erbest: Denotes the announce messages that have arrived at port r , only qualifies announce messages are considered.
(ii). Ebest: It is the best announce message which is to be considered from all Erbest.
DATA SET COMPARISION ALGORITHIM