HOME

TheInfoList



OR:

The Precision Time Protocol (PTP) is a protocol for
clock synchronization Clock synchronization is a topic in computer science and engineering that aims to coordinate otherwise independent clocks. Even when initially set accurately, real clocks will differ after some amount of time due to clock drift, caused by clocks ...
throughout a
computer network A computer network is a collection of communicating computers and other devices, such as printers and smart phones. In order to communicate, the computers and devices must be connected by wired media like copper cables, optical fibers, or b ...
with relatively high precision and therefore ''potentially'' high accuracy. In a
local area network A local area network (LAN) is a computer network that interconnects computers within a limited area such as a residence, campus, or building, and has its network equipment and interconnects locally managed. LANs facilitate the distribution of da ...
(LAN), accuracy can be sub-microsecond making it suitable for measurement and control systems. PTP is used to synchronize
financial transaction A financial transaction is an Contract, agreement, or communication, between a buyer and seller to exchange goods, Service (economics), services, or assets for payment. Any transaction involves a change in the status of the finances of two or mo ...
s, mobile phone tower transmissions, sub-sea acoustic arrays, and networks that require precise timing but lack access to
satellite navigation A satellite navigation or satnav system is a system that uses satellites to provide autonomous geopositioning. A satellite navigation system with global coverage is termed global navigation satellite system (GNSS). , four global systems are ope ...
signals. The first version of PTP, IEEE 1588-2002, was published in 2002. IEEE 1588-2008, also known as PTP Version 2, is not
backward compatible In telecommunications and computing, backward compatibility (or backwards compatibility) is a property of an operating system, software, real-world product, or technology that allows for interoperability with an older legacy system, or with inpu ...
with the 2002 version. IEEE 1588-2019 was published in November 2019 and includes backward-compatible improvements to the 2008 publication. IEEE 1588-2008 includes a ''profile'' concept defining PTP operating parameters and options. Several profiles have been defined for applications including
telecommunications Telecommunication, often used in its plural form or abbreviated as telecom, is the transmission of information over a distance using electronic means, typically through cables, radio waves, or other communication technologies. These means of ...
,
electric power distribution Electric power distribution is the final stage in the Power delivery, delivery of electricity. Electricity is carried from the Electric power transmission, transmission system to individual consumers. Distribution Electrical substation, substatio ...
and
audiovisual Audiovisual (AV) is electronic media possessing both a sound and a visual component, such as slide-tape presentations, films, television programs, corporate conferencing, church services, and live theater productions. Audiovisual service provide ...
uses. is an adaptation of PTP, called gPTP, for use with Audio Video Bridging (AVB) and Time-Sensitive Networking (TSN).


History

According to John Eidson, who led the IEEE 1588-2002 standardization effort, "IEEE 1588 is designed to fill a niche not well served by either of the two dominant protocols, NTP and GPS. IEEE 1588 is designed for local systems requiring accuracies beyond those attainable using NTP. It is also designed for applications that cannot bear the cost of a GPS receiver at each node, or for which GPS signals are inaccessible." PTP was originally defined in the IEEE 1588-2002 standard, officially titled ''Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems'', and published in 2002. In 2008, IEEE 1588-2008 was released as a revised standard; also known as PTP version 2 (PTPv2), it improves accuracy, precision and robustness but is not
backward compatible In telecommunications and computing, backward compatibility (or backwards compatibility) is a property of an operating system, software, real-world product, or technology that allows for interoperability with an older legacy system, or with inpu ...
with the original 2002 version. IEEE 1588-2019 was published in November 2019, is informally known as ''PTPv2.1'' and includes backwards-compatible improvements to the 2008 publication.


Architecture

The IEEE 1588 standards describe a
hierarchical A hierarchy (from Greek: , from , 'president of sacred rites') is an arrangement of items (objects, names, values, categories, etc.) that are represented as being "above", "below", or "at the same level as" one another. Hierarchy is an importan ...
master–slave architecture for clock
distribution Distribution may refer to: Mathematics *Distribution (mathematics), generalized functions used to formulate solutions of partial differential equations *Probability distribution, the probability of a particular value or value range of a varia ...
consisting of one or more
network segment A network segment is a portion of a computer network. The nature and extent of a segment depends on the nature of the network and the device or devices used to interconnect end stations. Ethernet According to the defining IEEE 802.3 standards ...
s and one or more clocks. An ''ordinary clock'' is a device with a single network connection that is either the source of or the destination for a synchronization reference. A source is called a ''master'' (alternately ''timeTransmitter''), and a destination is called a ''slave'' (alternately ''timeReceiver''). A ''boundary clock'' has multiple network connections and synchronizes one network segment to another. A single, synchronization leader is selected, a.k.a. elected, for each network segment. The root timing reference is called the ''grandmaster''. A relatively simple PTP architecture consists of ordinary clocks on a single-segment network with no boundary clocks. A grandmaster is elected and all other clocks synchronize to it. IEEE 1588-2008 introduces a clock associated with network equipment used to convey PTP messages. The ''transparent clock'' modifies PTP messages as they pass through the device. Timestamps in the messages are corrected for time spent traversing the network equipment. This scheme improves distribution accuracy by compensating for delivery variability across the network. PTP typically uses the same
epoch In chronology and periodization, an epoch or reference epoch is an instant in time chosen as the origin of a particular calendar era. The "epoch" serves as a reference point from which time is measured. The moment of epoch is usually decided b ...
as
Unix time Unix time is a date and time representation widely used in computing. It measures time by the number of non-leap seconds that have elapsed since 00:00:00 Coordinated Universal Time, UTC on 1 January 1970, the Unix Epoch (computing), epoc ...
(start of 1 January 1970). While the Unix time is based on
Coordinated Universal Time Coordinated Universal Time (UTC) is the primary time standard globally used to regulate clocks and time. It establishes a reference for the current time, forming the basis for civil time and time zones. UTC facilitates international communicat ...
(UTC) and is subject to
leap second A leap second is a one-second adjustment that is occasionally applied to Coordinated Universal Time (UTC), to accommodate the difference between precise time (International Atomic Time (TAI), as measured by atomic clocks) and imprecise solar tim ...
s, PTP is based on
International Atomic Time International Atomic Time (abbreviated TAI, from its French name ) is a high-precision atomic coordinate time standard based on the notional passage of proper time on Earth's geoid. TAI is a weighted average of the time kept by over 450 atomi ...
(TAI). The PTP grandmaster communicates the current offset between UTC and TAI, so that UTC can be computed from the received PTP time.


Protocol details

Synchronization and management of a PTP system is achieved through the exchange of messages across the communications medium. To this end, PTP uses the following message types. *''Sync'', ''Follow_Up'', ''Delay_Req'' and ''Delay_Resp'' messages are used by ''ordinary'' and ''boundary'' clocks and communicate time-related information used to synchronize clocks across the network. *''Pdelay_Req'', ''Pdelay_Resp'' and ''Pdelay_Resp_Follow_Up'' are used by ''transparent'' clocks to measure delays across the communications medium so that they can be compensated for by the system. ''Transparent'' clocks and these messages associated with them are not available in original IEEE 1588-2002 PTPv1 standard, and were added in PTPv2. *''Announce'' messages are used by the best master clock algorithm in IEEE 1588-2008 to build a clock hierarchy and select the ''grandmaster''. *''Management'' messages are used by
network management Network management is the process of administering and managing computer networks. Services provided by this discipline include fault analysis, performance management, provisioning of networks and maintaining quality of service. Network managem ...
to monitor, configure and maintain a PTP system. *''Signaling'' messages are used for non-time-critical communications between clocks. Signaling messages were introduced in IEEE 1588-2008. Messages are categorized as ''event'' and ''general'' messages. ''Event'' messages are time-critical in that accuracy in transmission and receipt timestamp accuracy directly affects clock distribution accuracy. ''Sync'', ''Delay_Req'', ''Pdelay_Req'' and ''Pdelay_resp'' are ''event'' messages. ''General'' messages are more conventional protocol data units in that the data in these messages is of importance to PTP, but their transmission and receipt timestamps are not. ''Announce'', ''Follow_Up'', ''Delay_Resp'', ''Pdelay_Resp_Follow_Up'', ''Management'' and ''Signaling'' messages are members of the ''general'' message class.


Message transport

PTP messages may use the
User Datagram Protocol In computer networking, the User Datagram Protocol (UDP) is one of the core communication protocols of the Internet protocol suite used to send messages (transported as datagrams in Network packet, packets) to other hosts on an Internet Protoco ...
over
Internet Protocol The Internet Protocol (IP) is the network layer communications protocol in the Internet protocol suite for relaying datagrams across network boundaries. Its routing function enables internetworking, and essentially establishes the Internet. IP ...
(UDP/IP) for transport. IEEE 1588-2002 uses only
IPv4 Internet Protocol version 4 (IPv4) is the first version of the Internet Protocol (IP) as a standalone specification. It is one of the core protocols of standards-based internetworking methods in the Internet and other packet-switched networks. ...
transports, but this has been extended to include
IPv6 Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP), the communication protocol, communications protocol that provides an identification and location system for computers on networks and routes traffic ...
in IEEE 1588-2008. In IEEE 1588-2002, all PTP messages are sent using
multicast In computer networking, multicast is a type of group communication where data transmission is addressed to a group of destination computers simultaneously. Multicast can be one-to-many or many-to-many distribution. Multicast differs from ph ...
messaging, while IEEE 1588-2008 introduced an option for devices to negotiate
unicast Unicast is data transmission from a single sender (red) to a single receiver (green). Other devices on the network (yellow) do not participate in the communication. In computer networking, unicast is a one-to-one transmission from one point in ...
transmission on a port-by-port basis. Multicast transmissions use
IP multicast IP multicast is a method of sending Internet Protocol (IP) datagrams to a group of interested receivers in a single transmission. It is the IP-specific form of multicast and is used for streaming media and other network applications. It uses speci ...
addressing, for which multicast group addresses are defined for IPv4 and IPv6 (see table). Time-critical ''event'' messages (Sync, Delay_req, Pdelay_Req and Pdelay_Resp) are sent to
port number In computer networking, a port is a communication endpoint. At the software level within an operating system, a port is a logical construct that identifies a specific process or a type of network service. A port is uniquely identified by a numbe ...
319. ''General'' messages (Announce, Follow_Up, Delay_Resp, Pdelay_Resp_Follow_Up, management and signaling) use port number 320. In IEEE 1588-2008, encapsulation is also defined for
DeviceNet DeviceNet is a network protocol used in the automation industry to interconnect control devices for data exchange. It utilizes the Common Industrial Protocol over a Controller Area Network media layer and defines an application layer to cover a ra ...
,
ControlNet ControlNet is an open industrial network protocol for industrial automation applications, also known as a fieldbus. ControlNet was earlier supported by ControlNet International, but in 2008 support and management of ControlNet was transferred t ...
and
PROFINET Profinet (usually styled as PROFINET, as a portmanteau for Process Field Network) is an industry technical standard for data communication over Industrial Ethernet, designed for collecting data from, and controlling equipment in Automation#Indus ...
.


Domains

A domain is an interacting set of clocks that synchronize to one another using PTP. Clocks are assigned to a domain by virtue of the contents of the ''Subdomain name'' (IEEE 1588-2002) or the ''domainNumber'' (IEEE 1588-2008) fields in PTP messages they receive or generate. Domains allow multiple clock distribution systems to share the same communications medium.


Best master clock algorithm

The ''best master clock algorithm'' (BMCA) performs a distributed selection of the best clock to act as leader based on the following clock properties: * IdentifierA universally unique numeric identifier for the clock. This is typically constructed based on a device's
MAC address A MAC address (short for medium access control address or media access control address) is a unique identifier assigned to a network interface controller (NIC) for use as a network address in communications within a network segment. This use i ...
. * QualityBoth versions of IEEE 1588 attempt to quantify clock quality based on expected timing deviation, technology used to implement the clock or location in a clock stratum schema, although only V1 (IEEE 1588-2002) knows a data field ''stratum''. PTP V2 (IEEE 1588-2008) defines the overall quality of a clock by using the data fields ''clockAccuracy'' and ''clockClass''. * PriorityAn administratively assigned precedence hint used by the BMCA to help select a ''grandmaster'' for the PTP domain. IEEE 1588-2002 used a single Boolean variable to indicate precedence. IEEE 1588-2008 features two 8-bit priority fields. * VarianceA clock's estimate of its stability based on observation of its performance against the PTP reference. IEEE 1588-2008 uses a hierarchical selection algorithm based on the following properties, in the indicated order: # Priority 1the user can assign a specific static-designed priority to each clock, preemptively defining a priority among them. Smaller numeric values indicate higher priority. # Classeach clock is a member of a given class, each class getting its own priority. # Accuracyprecision between clock and UTC, in nanoseconds (ns) # Variancevariability of the clock # Priority 2final-defined priority, defining backup order in case the other criteria were not sufficient. Smaller numeric values indicate higher priority. # Unique identifierMAC address-based selection is used as a tiebreaker when all other properties are equal. IEEE 1588-2002 uses a selection algorithm based on similar properties. Clock properties are advertised in IEEE 1588-2002 ''Sync'' messages and in IEEE 1588-2008 ''Announce'' messages. The current leader transmits this information at regular interval. A clock that considers itself a better leader will transmit this information in order to invoke a change of leader. Once the current leader recognizes the better clock, the current leader stops transmitting ''Sync'' messages and associated clock properties (''Announce'' messages in the case of IEEE 1588-2008) and the better clock takes over as leader. The BMCA only considers the self-declared quality of clocks and does not take network link quality into consideration.


Synchronization

Via BMCA, PTP selects a source of time for an IEEE 1588 domain and for each network segment in the domain. Clocks determine the offset between themselves and their leader.
International standard An international standard is a technical standard developed by one or more international standards organizations. International standards are available for consideration and use worldwide. The most prominent such organization is the International O ...
IEC 61588: Precision clock synchronization protocol for networked measurement and control systems. 2004.
Let the variable t represent physical time. For a given follower device, the offset o(t) at time t is defined by: :\ o(t) = s(t) - m(t) where s(t) represents the time measured by the follower clock at physical time t, and m(t) represents the time measured by the leader clock at physical time t. The leader periodically broadcasts the current time as a message to the other clocks. Under IEEE 1588-2002 broadcasts are up to once per second. Under IEEE 1588-2008, up to 10 per second are permitted. Each broadcast begins at time T_1 with a ''Sync'' message sent by the leader to all the clocks in the domain. A clock receiving this message takes note of the local time T_1' when this message is received. The leader may subsequently send a multicast ''Follow_Up'' with accurate T_1 timestamp. Not all leaders have the ability to present an accurate timestamp in the ''Sync'' message. It is only after the transmission is complete that they are able to retrieve an accurate timestamp for the ''Sync'' transmission from their network hardware. Leaders with this limitation use the ''Follow_Up'' message to convey T_1. Leaders with PTP capabilities built into their network hardware are able to present an accurate timestamp in the ''Sync'' message and do not need to send Follow_Up messages. In order to accurately synchronize to their leader, clocks must individually determine the network transit time of the ''Sync'' messages. The transit time is determined indirectly by measuring round-trip time from each clock to its leader. The clocks initiate an exchange with their leader designed to measure the transit time d. The exchange begins with a clock sending a ''Delay_Req'' message at time T_2 to the leader. The leader receives and timestamps the ''Delay_Req'' at time T_2' and responds with a ''Delay_Resp'' message. The leader includes the timestamp T_2' in the ''Delay_Resp'' message. Through these exchanges a clock learns T_1, T_1', T_2 and T_2'. If d is the transit time for the ''Sync'' message, and \tilde is the constant offset between leader and follower clocks, then :\ T_1' - T_1 = \tilde + d \text \ T_2' - T_2 = - \tilde + d Combining the above two equations, we find that :\tilde = \frac 1 2 (T_1'-T_1-T_2'+T_2) The clock now knows the offset \tilde during this transaction and can correct itself by this amount to bring it into agreement with their leader. One assumption is that this exchange of messages happens over a period of time so small that this offset can safely be considered constant over that period. Another assumption is that the transit time of a message going from the leader to a follower is equal to the transit time of a message going from the follower to the leader. Finally, it is assumed that both the leader and follower can accurately measure the time they send or receive a message. The degree to which these assumptions hold true determines the accuracy of the clock at the follower device.


Optional features

IEEE 1588-2008 standard lists the following set of features that implementations may choose to support: *Alternate Time-Scale *Grand Master Cluster *Unicast Masters *Alternate Master *Path Trace IEEE 1588-2019 adds additional optional and backward-compatible features: *Modular transparent clocks *Special PTP ports to interface with transports with built-in time distribution *Unicast ''Delay_Req'' and ''Delay_Resp'' messages *Manual port configuration overriding BMCA *Asymmetry calibration *Ability to utilize a physical layer frequency reference (e.g. Synchronous Ethernet) *Profile isolation *Inter-domain interactions *Security TLV for integrity checking *Standard performance reporting metrics *Slave port monitoring


Related initiatives

*The ''International IEEE Symposium on Precision Clock Synchronization for Measurement, Control and Communication'' (ISPCS) is an IEEE-organized annual event that includes a plugtest and a conference program with paper and poster presentations, tutorials and discussions covering several aspects of PTP. *The Institute of Embedded Systems (InES) of the Zurich University of Applied Sciences/ZHAW is addressing the practical implementation and application of PTP. *IEEE 1588 is a key technology in the LXI Standard for Test and Measurement communication and control. *IEEE 802.1AS-2011 is part of the IEEE Audio Video Bridging (AVB) group of standards. It specifies a profile for use of IEEE 1588-2008 for time synchronization over a virtual bridged local area network as defined by IEEE 802.1Q. In particular, 802.1AS defines how
IEEE 802.3 IEEE 802.3 is a working group and a collection of standards defining the physical layer and data link layer's media access control (MAC) of wired Ethernet. The standards are produced by the working group of the Institute of Electrical and Electro ...
(
Ethernet Ethernet ( ) is a family of wired computer networking technologies commonly used in local area networks (LAN), metropolitan area networks (MAN) and wide area networks (WAN). It was commercially introduced in 1980 and first standardized in 198 ...
),
IEEE 802.11 IEEE 802.11 is part of the IEEE 802 set of local area network (LAN) technical standards, and specifies the set of medium access control (MAC) and physical layer (PHY) protocols for implementing wireless local area network (WLAN) computer com ...
(
Wi-Fi Wi-Fi () is a family of wireless network protocols based on the IEEE 802.11 family of standards, which are commonly used for Wireless LAN, local area networking of devices and Internet access, allowing nearby digital devices to exchange data by ...
), and MoCA can all be parts of the same PTP timing domain. * SMPTE 2059-2 is a PTP profile for use in synchronization of broadcast media systems. *The AES67 audio networking interoperability standard includes a PTPv2 profile compatible with SMPTE ST2059-2. *
Dante Dante Alighieri (; most likely baptized Durante di Alighiero degli Alighieri; – September 14, 1321), widely known mononymously as Dante, was an Italian Italian poetry, poet, writer, and philosopher. His ''Divine Comedy'', originally called ...
uses PTPv1 for synchronization.https://www.smpte.org/sites/default/files/users/user27446/AES67%20for%20Audio%20Production-Background%20Applications%20and%20Challenges.pdf * Q-LAN and
RAVENNA Ravenna ( ; , also ; ) is the capital city of the Province of Ravenna, in the Emilia-Romagna region of Northern Italy. It was the capital city of the Western Roman Empire during the 5th century until its Fall of Rome, collapse in 476, after which ...
use PTPv2 for time synchronization. * The White Rabbit Project combines Synchronous Ethernet and PTP. * Precision Time Protocol Industry Profile PTP profiles (L2P2P and L3E2E) for industrial automation in IEC 62439-3 * IEC/IEEE 61850-9-3 PTP profile for substation automation adopted by IEC 61850 * Parallel Redundancy Protocol use of PTP profiles (L2P2P and L3E2E) for industrial automation in parallel networks *PTP is being studied to be applied as a secure time synchronization protocol in power systems' Wide Area Monitoring


See also

* *


Notes


References


External links


NIST IEEE 1588 site



PTP and Synchronization of LTE mobile networks

PTP explained under the installation / maintenance point of view

Hirschmann PTP Whitepaper


* ttps://web.archive.org/web/20160304192052/http://www.bcit.ca/files/appliedresearch/pdf/ruggedcom_industry.pdf Perspectives and priorities on RuggedCom Smart Grid Research IEC 61850 Technologies
Projects with Smart Substation Solution
* *
The White Rabbit Project PTP

IEC&IEEE Precision Time Protocol
', Pacworld, September 2016''
IEC 62439-3 Annexes A-E Redundant attachment of clocks and network managementPTPv2 Timing protocol in AV networks
{{IEEE standards Synchronization IEEE standards Network time-related software Network protocols Application layer protocols