Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Precision Time Protocol

From Wikipedia, the free encyclopedia
(Redirected fromIEEE 802.1AS)
Network time synchronization protocol

Precision Time Protocol
Communication protocol
AbbreviationPTP
PurposeTime
Developer(s)IEEE
Introduction2002; 23 years ago (2002)
Port(s)udp/319, udp/320

ThePrecision Time Protocol (PTP) is aprotocol forclock synchronization throughout acomputer network with relatively highprecision and thereforepotentially high accuracy. In alocal area network (LAN), accuracy can be sub-microsecond – making it suitable for measurement and control systems.[1] PTP is used to synchronizefinancial transactions,mobile phone tower transmissions, sub-seaacoustic arrays, and networks that require precise timing but lack access tosatellite navigation signals.[citation needed]

The first version of PTP,IEEE 1588-2002, was published in 2002.IEEE 1588-2008, also known as PTP Version 2, is notbackward compatible 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 aprofile concept defining PTP operating parameters and options. Several profiles have been defined for applications includingtelecommunications,electric power distribution andaudiovisual uses.IEEE 802.1AS is an adaptation of PTP, called gPTP, for use withAudio Video Bridging (AVB) andTime-Sensitive Networking (TSN).

History

[edit]

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 andGPS. 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 aGPS receiver at each node, or for which GPS signals are inaccessible."[2]

PTP was originally defined in the IEEE 1588-2002 standard, officially titledStandard 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 notbackward compatible with the original 2002 version.[3] IEEE 1588-2019 was published in November 2019,[4] is informally known asPTPv2.1 and includes backwards-compatible improvements to the 2008 publication.[5]

Architecture

[edit]

The IEEE 1588 standards describe ahierarchicalmaster–slave architecture for clockdistribution consisting of one or morenetwork segments and one or more clocks. Anordinary 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 amaster (alternatelytimeTransmitter[6]), and a destination is called aslave (alternatelytimeReceiver[6]). Aboundary 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 thegrandmaster.[7]

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. Thetransparent clock modifies PTP messages as they pass through the device.[8]Timestamps in the messages are corrected for time spent traversing the network equipment. This scheme improves distribution accuracy by compensating fordelivery variability across the network.

PTP typically uses the sameepoch asUnix time (start of 1 January 1970).[a] While the Unix time is based onCoordinated Universal Time (UTC) and is subject toleap seconds, PTP is based onInternational Atomic Time (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

[edit]

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 andDelay_Resp messages are used byordinary andboundary clocks and communicate time-related information used to synchronize clocks across the network.
  • Pdelay_Req,Pdelay_Resp andPdelay_Resp_Follow_Up are used bytransparent 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 thebest master clock algorithm in IEEE 1588-2008 to build a clock hierarchy and select thegrandmaster.[b]
  • Management messages are used bynetwork management 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 asevent andgeneral 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 andPdelay_resp areevent messages.General messages are more conventionalprotocol 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 andSignaling messages are members of thegeneral message class.[9]: Clause 6.4 

Message transport

[edit]

PTP messages may use theUser Datagram Protocol overInternet Protocol (UDP/IP) for transport. IEEE 1588-2002 uses onlyIPv4 transports,[10]: Annex D  but this has been extended to includeIPv6 in IEEE 1588-2008.[9]: Annex F  In IEEE 1588-2002, all PTP messages are sent usingmulticast messaging, while IEEE 1588-2008 introduced an option for devices to negotiateunicast transmission on a port-by-port basis.[9]: Clause 16.1  Multicast transmissions useIP multicast addressing, for which multicast group addresses are defined for IPv4 and IPv6 (see table).[9]: Annex D and E  Time-criticalevent messages (Sync, Delay_req, Pdelay_Req and Pdelay_Resp) are sent toport number 319.General messages (Announce, Follow_Up, Delay_Resp, Pdelay_Resp_Follow_Up, management and signaling) use port number 320.[9]: Clause 6.4 

Multicast group addresses
MessagesIPv4IPv6IEEE 802.3 Ethernet[9]: Annex F [c]Type
All except peer delay messages224.0.1.129[d]FF0x::181[e]01-1B-19-00-00-00[f]Forwardable
Peer delay messages:Pdelay_Req,Pdelay_Resp andPdelay_Resp_Follow_Up[g]224.0.0.107[h]FF02::6B01-80-C2-00-00-0ENon-forwardable

In IEEE 1588-2008, encapsulation is also defined forDeviceNet,[9]: Annex G ControlNet[9]: Annex H  andPROFINET.[9]: Annex I 

Domains

[edit]

A domain[i] 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 theSubdomain name (IEEE 1588-2002) or thedomainNumber (IEEE 1588-2008) fields in PTP messages they receive or generate. Domains allow multiple clock distribution systems to share the same communications medium.

Subdomain name field contents (IEEE1588-2002)IPv4 multicast address
(IEEE1588-2002)[j]
domainNumber
(IEEE1588-2008)
Notes
_DFLT224.0.1.1290Default domain
_ALT1224.0.1.1301Alternate domain 1
_ALT2224.0.1.1312Alternate domain 2
_ALT3224.0.1.1323Alternate domain 3
Application specific up to 15 octets[10]: Clause 6.2.5.1 224.0.1.130, 131 or 132 as perhash function onSubdomain name[10]: Annex C 4 through 127User-defined domains

Best master clock algorithm

[edit]

Thebest master clock algorithm (BMCA) performs a distributed selection of the best clock to act as leader based on the following clock properties:

  • Identifier – A universally unique numeric identifier for the clock. This is typically constructed based on a device'sMAC address.
  • Quality – Both versions of IEEE 1588 attempt to quantify clock quality based on expected timing deviation, technology used to implement the clock or location in aclock stratum schema, although only V1 (IEEE 1588-2002) knows a data fieldstratum. PTP V2 (IEEE 1588-2008) defines the overall quality of a clock by using the data fieldsclockAccuracy andclockClass.
  • Priority – An administratively assigned precedence hint used by the BMCA to help select agrandmaster for the PTP domain. IEEE 1588-2002 used a singleBoolean variable to indicate precedence. IEEE 1588-2008 features two 8-bit priority fields.
  • Variance – A 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:[9]: Figure 27 

  1. Priority 1 – the user can assign a specific static-designed priority to each clock, preemptively defining a priority among them. Smaller numeric values indicate higher priority.
  2. Class – each clock is a member of a given class, each class getting its own priority.
  3. Accuracy – precision between clock and UTC, in nanoseconds (ns)
  4. Variance – variability of the clock
  5. Priority 2 – final-defined priority, defining backup order in case the other criteria were not sufficient. Smaller numeric values indicate higher priority.
  6. Unique identifier – MAC 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-2002Sync messages and in IEEE 1588-2008Announce 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 transmittingSync messages and associated clock properties (Announce messages in the case of IEEE 1588-2008) and the better clock takes over as leader.[11] The BMCA only considers the self-declared quality of clocks and does not take network link quality into consideration.[12]

Synchronization

[edit]

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.[13] Let the variablet{\displaystyle t} represent physical time. For a given follower device, the offseto(t){\displaystyle o(t)} at timet{\displaystyle t} is defined by:

 o(t)=s(t)m(t){\displaystyle \ o(t)=s(t)-m(t)}

wheres(t){\displaystyle s(t)} represents the time measured by the follower clock at physical timet{\displaystyle t}, andm(t){\displaystyle m(t)} represents the time measured by the leader clock at physical timet{\displaystyle 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.

IEEE 1588 synchronization mechanism and delay calculation

Each broadcast begins at timeT1{\displaystyle T_{1}} with aSync message sent by the leader to all the clocks in the domain. A clock receiving this message takes note of the local timeT1{\displaystyle T_{1}'} when this message is received.

The leader may subsequently send a multicastFollow_Up with accurateT1{\displaystyle T_{1}} timestamp. Not all leaders have the ability to present an accurate timestamp in theSync message. It is only after the transmission is complete that they are able to retrieve an accurate timestamp for theSync transmission from their network hardware. Leaders with this limitation use theFollow_Up message to conveyT1{\displaystyle T_{1}}. Leaders with PTP capabilities built into their network hardware are able to present an accurate timestamp in theSync 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 theSync 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 timed{\displaystyle d}. The exchange begins with a clock sending aDelay_Req message at timeT2{\displaystyle T_{2}} to the leader. The leader receives and timestamps theDelay_Req at timeT2{\displaystyle T_{2}'} and responds with aDelay_Resp message. The leader includes the timestampT2{\displaystyle T_{2}'} in theDelay_Resp message.

Through these exchanges a clock learnsT1{\displaystyle T_{1}},T1{\displaystyle T_{1}'},T2{\displaystyle T_{2}} andT2{\displaystyle T_{2}'}.

Ifd{\displaystyle d} is the transit time for theSync message, ando~{\displaystyle {\tilde {o}}} is the constant offset between leader and follower clocks, then

 T1T1=o~+d and  T2T2=o~+d{\displaystyle \ T_{1}'-T_{1}={\tilde {o}}+d{\text{ and }}\ T_{2}'-T_{2}=-{\tilde {o}}+d}

Combining the above two equations, we find that

o~=12(T1T1T2+T2){\displaystyle {\tilde {o}}={\frac {1}{2}}(T_{1}'-T_{1}-T_{2}'+T_{2})}

The clock now knows the offseto~{\displaystyle {\tilde {o}}} 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.[9]: Clause 6.2 

Optional features

[edit]

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:[5]

  • Modular transparent clocks
  • Special PTP ports to interface with transports with built-in time distribution
  • UnicastDelay_Req andDelay_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

[edit]
  • TheInternational IEEE Symposium on Precision Clock Synchronization for Measurement, Control and Communication (ISPCS) is an IEEE-organized annual event that includes aplugtest and a conference program with paper and poster presentations, tutorials and discussions covering several aspects of PTP.[14]
  • The Institute of Embedded Systems (InES) of theZurich University of Applied Sciences/ZHAW is addressing the practical implementation and application of PTP.
  • IEEE 1588 is a key technology in theLXI Standard for Test and Measurement communication and control.
  • IEEE 802.1AS-2011 is part of the IEEEAudio Video Bridging (AVB) group of standards.[k] It specifies a profile for use of IEEE 1588-2008 for time synchronization over a virtual bridged local area network as defined byIEEE 802.1Q. In particular, 802.1AS defines howIEEE 802.3 (Ethernet),IEEE 802.11 (Wi-Fi), andMoCA can all be parts of the same PTP timing domain.[15]
  • SMPTE 2059-2 is a PTP profile for use in synchronization of broadcast media systems.[16]
  • TheAES67 audio networking interoperability standard includes a PTPv2 profile compatible with SMPTE ST2059-2.[17]
  • Dante uses PTPv1 for synchronization.[18]
  • Q-LAN[19] andRAVENNA[18] use PTPv2 for time synchronization.
  • The White Rabbit Project combinesSynchronous 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[20]

See also

[edit]

Notes

[edit]
  1. ^The profile capability under IEEE 1588-2008 allows the use of application-specific epochs.[9]: Annex B 
  2. ^In IEEE 1588-2002, information carried byAnnounce messages is carried in theSync messages. In IEEE 1588-2008, theSync message has been optimized and this information is no longer carried here.
  3. ^PTP over bare IEEE 802.3 Ethernet usingEthertype 0x88F7
  4. ^IEEE 1588-2002 non-default domains use destination addresses 224.0.1.130 through 224.0.1.132 (see#Domains).
  5. ^Wherex is the address scope (2 for link-local) as per RFC 2373 (seeIPv6 multicast address)
  6. ^In some PTP applications it is permissible to send all PTP messages to 01-1B-19-00-00-00
  7. ^Peer delay messages are intended to propagate to the immediately connected neighbor. The multicast addresses for these messages are designed to be link-local in scope and are not passed through arouter. IEEE 1588-2008 also recommends settingtime to live to 1 (IPv4) or hop limit to 0 (IPv6) as further insurance that the messages will not be routed.
  8. ^Peer delay messaging is not present in IEEE 1588-2002
  9. ^IEEE 1588-2002 defines adomain as any interconnected set of clocks (regardless of whether they synchronized to one another) and usessubdomain to refer to what is known as adomain in IEEE 1588-2008.
  10. ^IEEE 1588-2008 uses 224.0.1.129 as the address for all multicast messages.
  11. ^AVB is further extended by the IEEE 802.1Time-Sensitive Networking (TSN) Task Group.

References

[edit]
  1. ^Eidson, John (10 October 2005)."IEEE-1588 Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems, a Tutorial". National Institute of Standards and Technology (NIST).
  2. ^Eidson, John C. (April 2006).Measurement, Control and Communication Using IEEE 1588.Springer.ISBN 978-1-84628-250-8.
  3. ^Eidson, John (2 October 2006)."IEEE 1588 Standard Version 2 - A Tutorial"(PDF). Archived fromthe original(PDF) on 31 March 2010. Retrieved12 June 2008.
  4. ^"1588-2019 - IEEE Approved Draft Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems". IEEE. Retrieved15 February 2020.
  5. ^abDouglas Arnold (24 September 2017)."What's coming In the Next Edition of IEEE 1588?". Retrieved15 February 2020.
  6. ^abIEEE 1588g-2022 Amendment 2: Master-Slave Optional Alternative Terminology,IEEE, 3 December 2022
  7. ^"Meanings of common terms used in IEEE 1588". National Institute of Standards and Technology. Archived fromthe original on 27 May 2010. Retrieved19 May 2006.
  8. ^"AN-1838 IEEE 1588 Boundary Clock and Transparent Clock Implementation Using the DP83640"(PDF).ti.com. Texas Instruments. Retrieved17 July 2019.
  9. ^abcdefghijklIEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems,IEEE, 24 July 2008,doi:10.1109/IEEESTD.2008.4579760,ISBN 978-0-7381-5400-8
  10. ^abcIEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems,IEEE, 8 November 2002,doi:10.1109/IEEESTD.2002.94144,ISBN 978-0-7381-3369-0
  11. ^Watt, Steve T.; Achanta, Shankar; Abubakari, Hamza; Sagen, Eric (March 2014),Understanding and Applying Precision Time Protocol(PDF), retrieved9 September 2017
  12. ^FSMLabs Technical Staff (September 2015),Smart and Dumb PTP Client and the "so-called"Best Master Clock Algorithm, retrieved17 May 2018
  13. ^International standardIEC 61588: Precision clock synchronization protocol for networked measurement and control systems. 2004.
  14. ^ISPCS website
  15. ^Geoffrey M. Garner (28 May 2010),IEEE 802.1AS and IEEE 1588(PDF)
  16. ^SMPTE Publishes First Two Parts of Standard Enabling Deployment of PTP-Timed Equipment in Existing SDI Plants,Society of Motion Picture and Television Engineers, 13 April 2015, retrieved21 May 2015
  17. ^AES-R16-2016: AES Standards Report - PTP parameters for AES67 and SMPTE ST 2059-2 interoperability,Audio Engineering Society, 2 May 2016
  18. ^abhttps://www.smpte.org/sites/default/files/users/user27446/AES67%20for%20Audio%20Production-Background%20Applications%20and%20Challenges.pdf[dead link]
  19. ^Oyen, Seppe (6 June 2017)."PTPv2 Timing protocol in AV networks".Luminex.Q-LAN updated to PTPv2 approximately two years ago.
  20. ^Pepiciello, Antonio; Vaccaro, Alfredo (17 December 2018), "A reliable architecture based on Precision Time Protocol for WAMPAC synchronization",2018 AEIT International Annual Conference,IEEE, pp. 1–5,doi:10.23919/AEIT.2018.8577414,ISBN 978-8-8872-3740-5,S2CID 58819556

External links

[edit]
Current
802 series
802
802.1
802.3
(Ethernet)
802.11
(Wi-Fi)
802.15
Proposed
Superseded
Retrieved from "https://en.wikipedia.org/w/index.php?title=Precision_Time_Protocol&oldid=1310589185"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp