Precision Time Protocol
   HOME

TheInfoList



OR:

The Precision Time Protocol (PTP) is a
protocol Protocol may refer to: Sociology and politics * Protocol (politics), a formal agreement between nation states * Protocol (diplomacy), the etiquette of diplomacy and affairs of state * Etiquette, a code of personal behavior Science and technology ...
used to synchronize clocks throughout a
computer network A computer network is a set of computers sharing resources located on or provided by network nodes. The computers use common communication protocols over digital interconnections to communicate with each other. These interconnections are ...
. On a
local area network A local area network (LAN) is a computer network that interconnects computers within a limited area such as a residence, school, laboratory, university campus or office building. By contrast, a wide area network (WAN) not only covers a large ...
, it achieves clock accuracy in the sub-microsecond range, making it suitable for measurement and control systems. PTP is employed 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 Asset, assets for payment. Any transaction involves a change in the status of the finances of two ...
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 geo-spatial positioning. It allows satellite navigation devices to determine their location ( longitude, latitude, and altitude/ elevation) to hig ...
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 Backward compatibility (sometimes known as backwards compatibility) is a property of an operating system, product, or technology that allows for interoperability with an older legacy system, or with input designed for such a system, especially in ...
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 is the transmission of information by various types of technologies over wire, radio, optical, or other electromagnetic systems. It has its origin in the desire of humans for communication over a distance greater than that ...
,
electric power distribution Electric power distribution is the final stage in the delivery of electric power; it carries electricity from the transmission system to individual consumers. Distribution substations connect to the transmission system and lower the transmissi ...
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 ...
. is an adaptation of PTP for use with
Audio Video Bridging Audio Video Bridging (AVB) is a common name for the set of technical standards which provide improved synchronization, low-latency, and reliability for switched Ethernet networks. AVB embodies the following technologies and standards: * IEEE ...
and
Time-Sensitive Networking Time-Sensitive Networking (TSN) is a set of standards under development by the Time-Sensitive Networking task group of the IEEE 802.1 working group. The TSN task group was formed in November 2012 by renaming the existing Audio Video Bridging T ...
.


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 entitled ''"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 Backward compatibility (sometimes known as backwards compatibility) is a property of an operating system, product, or technology that allows for interoperability with an older legacy system, or with input designed for such a system, especially in ...
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 master-slave architecture for clock distribution. Under this architecture, a time distribution system consists of one or more communication media (network segments), and one or more clocks. An ''ordinary clock'' is a device with a single network connection and is either the source of (master or leader) or destination for (slave or follower) a synchronization reference. A ''boundary clock'' has multiple network connections and can accurately synchronize one
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 ...
to another. A synchronization ''master'' is selected for each of the network segments in the system. The root timing reference is called the ''grandmaster''. The grandmaster transmits synchronization information to the clocks residing on its network segment. The boundary clocks with a presence on that segment then relay accurate time to the other segments to which they are also connected. A simplified PTP system frequently consists of ordinary clocks connected to a single network, and no boundary clocks are used. A grandmaster is elected and all other clocks synchronize directly 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 ...
as
Unix time Current Unix time () Unix time is a date and time representation widely used in computing. It measures time by the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970, the beginning of the Unix epoch, less adjustments m ...
(start of 1 January 1970). While the Unix time is based on
Coordinated Universal Time Coordinated Universal Time or UTC is the primary time standard by which the world regulates clocks and time. It is within about one second of Solar time#Mean solar time, mean solar time (such as Universal Time, UT1) at 0° longitude (at the I ...
(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 obser ...
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 ato ...
(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 Best or The Best may refer to: People * Best (surname), people with the surname Best * Best (footballer, born 1968), retired Portuguese footballer Companies and organizations * Best & Co., an 1879–1971 clothing chain * Best Lock Corporation, ...
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 telecommunications, a protocol data unit (PDU) is a single unit of information transmitted among peer entities of a computer network. It is composed of protocol-specific control information and user data. In the layered architectures of ...
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 packets) to other hosts on an Internet Protocol (IP) netwo ...
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. ...
(UDP/IP) for transport. IEEE 1588-2002 uses only
IPv4 Internet Protocol version 4 (IPv4) is the fourth version of the Internet Protocol (IP). It is one of the core protocols of standards-based internetworking methods in the Internet and other packet-switched networks. IPv4 was the first version d ...
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 communications protocol that provides an identification and location system for computers on networks and routes traffic across the Internet. I ...
in IEEE 1588-2008. In IEEE 1588-2002, all PTP messages are sent using
multicast In computer networking, multicast is 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 should not be confused wi ...
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 number assigned to uniquely identify a connection endpoint and to direct data to a specific service. At the software level, within an operating system, a port is a logical construct that identifies a specific ...
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 ran ...
, ControlNet and PROFINET.


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'' (BMC) algorithm performs a distributed selection of the best candidate clock 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 media access control address (MAC 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 is common in most IEEE 802 networking te ...
. * 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 BMC to help select a ''grandmaster'' for the PTP domain. IEEE 1588-2002 used a single
boolean variable In computer science, the Boolean (sometimes shortened to Bool) is a data type that has one of two possible values (usually denoted ''true'' and ''false'') which is intended to represent the two truth values of logic and Boolean algebra. It is nam ...
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 clock master transmits this information at regular interval. A clock which considers itself a better master clock will transmit this information in order to invoke a change of master clock. Once the current master recognises the better clock, the current master stops transmitting ''Sync'' messages and associated clock properties (''Announce'' messages in the case of IEEE 1588-2008) and the better clock takes over as master. The BMC algorithm only considers the self-declared quality of clocks and does not take network link quality into consideration.


Synchronization

Through use of the BMC algorithm, PTP selects a master source of time for an IEEE 1588 domain and for each network segment in the domain. Clocks determine the offset between themselves and their master.
International standard international standard is a technical standard developed by one or more international standards organization, standards organizations. International standards are available for consideration and use worldwide. The most prominent such organization ...
IEC The International Electrotechnical Commission (IEC; in French: ''Commission électrotechnique internationale'') is an international standards organization that prepares and publishes international standards for all electrical, electronic and r ...
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 master clock at physical time t. The master 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 master 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 master may subsequently send a multicast ''Follow_Up'' with accurate T_1 timestamp. Not all masters 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. Masters with this limitation use the ''Follow_Up'' message to convey T_1. Masters 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 master, 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 master. The clocks initiate an exchange with their master designed to measure the transit time d. The exchange begins with a clock sending a ''Delay_Req'' message at time T_2 to the master. The master receives and timestamps the ''Delay_Req'' at time T_2' and responds with a ''Delay_Resp'' message. The master 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 master 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 master. 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 master to a follower is equal to the transit time of a message going from the follower to the master. Finally, it is assumed that both the master 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 Synchronous Ethernet, also referred as SyncE, is an ITU-T standard for computer networking that facilitates the transference of clock signals over the Ethernet physical layer. This signal can then be made traceable to an external clock. Overview ...
) *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 A plugtest or plugfest is an event based on a certain technical standard where the designers of electronic equipment or software test the interoperability of their products or designs with those of other manufacturers. It could be literally plugging ...
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 Audio Video Bridging (AVB) is a common name for the set of technical standards which provide improved synchronization, low-latency, and reliability for switched Ethernet networks. AVB embodies the following technologies and standards: * IEEE ...
(AVB) group of standards, further extended by the IEEE 802.1
Time-Sensitive Networking Time-Sensitive Networking (TSN) is a set of standards under development by the Time-Sensitive Networking task group of the IEEE 802.1 working group. The TSN task group was formed in November 2012 by renaming the existing Audio Video Bridging T ...
(TSN) Task Group. 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 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 Institute of Electrical and Electronics ...
(
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 1 ...
), IEEE 802.11 (
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 local area networking of devices and Internet access, allowing nearby digital devices to exchange data by radio waves ...
), 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 AES67 is a technical standard for audio over IP and audio over Ethernet (AoE) interoperability. The standard was developed by the Audio Engineering Society and first published in September 2013. It is a layer 3 protocol suite based on existing ...
audio networking interoperability standard includes a PTPv2 profile compatible with SMPTE ST2059-2. *
Dante Dante Alighieri (; – 14 September 1321), probably baptized Durante di Alighiero degli Alighieri and often referred to as Dante (, ), was an Italian poet, writer and philosopher. His ''Divine Comedy'', originally called (modern Italian: ' ...
uses PTPv1 for synchronization.https://www.smpte.org/sites/default/files/users/user27446/AES67%20for%20Audio%20Production-Background%20Applications%20and%20Challenges.pdf *
Q-LAN Q-LAN is the audio over IP audio networking technology component of the Q-Sys platform from QSC Audio Products QSC is an American manufacturer of audio products including power amplifiers, loudspeakers, digital mixers and digital signal proces ...
and
RAVENNA Ravenna ( , , also ; rgn, Ravèna) 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 from 408 until its collapse in 476. It then served as the c ...
uses PTPv2 for time synchronization. * The White Rabbit Project combines
Synchronous Ethernet Synchronous Ethernet, also referred as SyncE, is an ITU-T standard for computer networking that facilitates the transference of clock signals over the Ethernet physical layer. This signal can then be made traceable to an external clock. Overview ...
and PTP *
Precision Time Protocol Industry Profile Industrial automation systems consisting of several distributed controllers need a precise synchronization for commands, events and process data. For instance, motors for newspaper printing are synchronized within some 5 microseconds to ensure th ...
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

* List of PTP implementations *
Real-time communication Real-time communication (RTC) is a category of software protocols and communication hardware media that gives real-time guarantees, which is necessary to support real-time guarantees of real-time computing.Sharad Sundaresan; Riccardo Bettati"Distr ...


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]
Tutorial on the fault-tolerant precision time protocol profiles in IEC 62439-3

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