WO2014037684A1 - Methods and devices for clock synchronization - Google Patents
Methods and devices for clock synchronization Download PDFInfo
- Publication number
- WO2014037684A1 WO2014037684A1 PCT/GB2012/052166 GB2012052166W WO2014037684A1 WO 2014037684 A1 WO2014037684 A1 WO 2014037684A1 GB 2012052166 W GB2012052166 W GB 2012052166W WO 2014037684 A1 WO2014037684 A1 WO 2014037684A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- time
- clock
- messages
- client
- delay
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 59
- 230000000737 periodic effect Effects 0.000 claims description 8
- 235000008733 Citrus aurantifolia Nutrition 0.000 claims description 2
- 235000011941 Tilia x europaea Nutrition 0.000 claims description 2
- 239000004571 lime Substances 0.000 claims description 2
- 230000008569 process Effects 0.000 abstract description 10
- 230000001360 synchronised effect Effects 0.000 abstract description 9
- 238000012937 correction Methods 0.000 abstract description 2
- 238000005259 measurement Methods 0.000 description 12
- 230000001934 delay Effects 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 9
- 238000013459 approach Methods 0.000 description 6
- 230000005540 biological transmission Effects 0.000 description 6
- 238000004458 analytical method Methods 0.000 description 5
- 238000012544 monitoring process Methods 0.000 description 5
- 238000003860 storage Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 238000004519 manufacturing process Methods 0.000 description 4
- 230000007246 mechanism Effects 0.000 description 4
- 108700009949 PTP protocol Proteins 0.000 description 3
- 238000004590 computer program Methods 0.000 description 3
- 238000013500 data storage Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000012546 transfer Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000012417 linear regression Methods 0.000 description 2
- 230000004807 localization Effects 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000006855 networking Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000013508 migration Methods 0.000 description 1
- 230000005012 migration Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000007639 printing Methods 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 230000002194 synthesizing effect Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 238000011144 upstream manufacturing Methods 0.000 description 1
- 238000010200 validation analysis Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
- H04J3/0658—Clock or time synchronisation among packet nodes
- H04J3/0661—Clock or time synchronisation among packet nodes using timestamps
- H04J3/0667—Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0852—Delays
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
- H04L43/106—Active monitoring, e.g. heartbeat, ping or trace-route using time related information in packets, e.g. by adding timestamps
Definitions
- the present invention relates to methods and devices for clock synchronization. It is particularly, but not exclusively, concerned with the alignment of slave clocks to a master clock using IEEE 1588 PTP with offset and skew correction.
- IEEE 1588 PTP [1][2] is now one of the industry accepted protocols for delivering high accuracy time services in the sub-microseconds levels.
- IEEE 1588 PTP is similar in concept to the Network Time Protocol (NTP) [3]. Both protocols distribute time messages over a packet network to time clients. NTP is ubiquitous and operates at the upper layers of the protocol stack and in its current form provides no better than millisecond levels accuracy.
- IEEE 1588 PTP is a layer 2 protocol (although it can also be made to operate over higher protocol layers) with hardware timestamping capabilities to provide sub-microsecond accuracy. As a packet-based high accuracy synchronization protocol, IEEE 1588 PTP certainly has a number of advantages over GPS, which until now was the only available solution for high quality time synchronization.
- GPS based satellite receivers 16 provide sub-100 nanosecond accuracies, and are often used where precision time synchronization is mission critical: in telecommunication, military, and aerospace applications. But improved accuracy comes at a cost. GPS receivers used for telecom networks synchronization have a much higher specification (high quality oscillators, high holdover capability accuracies, etc.) than those in the average portable satellite navigation system, plus they need all the correct interfaces and cabling to communicate with the teiecoms equipment. GPS based systems require outdoor antenna installations to assure a direct view of the sky to receive the low power satellite transmissions, which are not only an added expense but which create an extra burden on the physical infrastructure of the facility. For this reason, GPS is best suited to be used in a central location as the primary reference clock (PRC) for a telecom network with other technologies utilized to distribute synchronization and timing to remote locations.
- PRC primary reference clock
- GPS-based solutions also have poor or no reception in indoor and underground
- GPS is also not suitable for devices with small footprints requiring time synchronization like wireless sensors.
- Another concern is GPS is perceived outside the USA as an American controlled technology with no service guarantees (GPS is not autonomous), as a result its use as the primary source of timing is not favored by operators in other countries.
- IEEE 1588 PTP has gained traction in the industry as the protocol of choice for high quality synchronization.
- Figure 1 shows a general view of some of the devices that require time synchronization in a packet network 12.
- the time transfer protocol could be NTP or IEEE 1588 PTP, but the latter is the protocol of choice for telecom networks.
- Synchronization is a key requirement in the telecommunications industry and this market has become a driving force in the development and evolution of synchronization solutions and standards.
- wireless technologies like GSM, WCDMA (both frequency division duplexing (FDD) and time division duplexing (TDD) technologies
- CD A2000 require frequency accuracy of 0.05 ppm (parts per million) at the air interface.
- CDMA2000 requires time synchronization at the ⁇ 3 ps level ( ⁇ 10 ps worst case) and WCDMA TTD mode requires accuracy of ⁇ 1 .25 ps between base stations.
- the accurate reference clock is typically derived from Time Division Multiplexing (TDM) interfaces (for GSM, WCDMA and other FDD based technologies) or from expensive GPS receivers located at the base station (for TDD based technologies).
- TDM Time Division Multiplexing
- the high level of synchronization provided by IEEE 1588 PTP could also be useful in time-of-arrival (TOA) and time-difference-of-arriva! (TDOA) based localization solution where one is interested in locating mobile nodes connected to a wireless network.
- A/V Residential Audio/Video (A/V) Networking: Modern consumer electronics now gather, store, and transmit audio and video data in digital form and require adequate quality of service and synchronization for live streaming.
- the 802.1 AS protocol which is based on IEEE 1588, provides timing and synchronization within bridged home A/V Ethernet LANs. The protocol allows high level timing information to be distributed to each media playback device, thus, providing them with a precise reference point for streaming multimedia. This synchronization technology, thus, enables a convergence to Ethernet as a viable consumer electronics interconnect.
- IEEE 1588 PTP was originally designed to satisfy the need for synchronization in test and measurement systems but has now become beneficial in other areas. The challenge was to synchronize networked measuring devices with each other in terms of time so that they are able to record measured values and provide them with a precise system timestamp. Based on this timestamp, the measured values can then be correlated with each other.
- WSNs have a wide range of applications including the monitoring of the status of industrial processes and equipment, environmental monitoring, infrastructure monitoring, surveillance, tracking, etc. But the efficient operation of a WSN depends on how well the various nodes are time synchronized. Time synchronization allows for the coordination among the nodes for power saving sleep/wake up modes, localization of sensor nodes and other sources, data fusion, object tracking, transmission scheduling among the nodes, and distributed communication and processing of data.
- Billing services Billing services and similar applications must know the time accurately. Time based billing as in telecom networks rely on time synchronization. Mobile user billing and maintenance functions also rely on precise timing references.
- Log file accuracy, auditing, and monitoring Tracking security breaches, network usage, or problems affecting a large number of components can be nearly impossible if timestamps in logs are inaccurate.
- ® Network fault diagnosis and recovery Every aspect of managing, securing, planning, and debugging a network involves determining when events happen. Without time synchronization, it can be difficult or impossible to correlate the time sequence of events involving multiple network components, such as outages, bugs, security breaches, service problems, or network problems. Precise timestamping of data events through each element in the backhaul network facilitates the isolation and traceability of failures and outages.
- File timestamps To reduce confusion in shared filesystems, it is crucial for the modification times to be consistent, regardless of what machine the filesystems are on. Sorting email and other network communications can also be difficult if timestamps are incorrect.
- Access security and authentication (e.g., erberos): Many security and authentication protocols require accurate time synchronization. Applications such as cyptographic key management and secure document transmission may require using accurate, encoded timestamps which match unencoded time stamps to help assure document authenticity.
- Directory services e.g., Active Directory, etc.
- Scheduled operations e.g., cron jobs, network backups
- the clock offset at a particular moment is the difference between the time reported by the time client (slave) and the "true” time as reported by the time server (master).
- Clock Skew A clock's skew at a particular moment is the frequency difference (first derivative of its offset with respect to true time) between the client clock and the server clock.
- Clock synchronization has received considerable attention over the last several years as the communication networks evolve from circuit-switched to ail-IP packet based networks. With this migration the challenge of frequency and time synchronization has surfaced.
- the techniques in the state of the art differ by the assumed model and the estimated parameters.
- the first group assumes that the two clocks differ by an offset.
- the algorithms and techniques attempt to estimate only the offset between the clocks.
- the reality is far from this model, however, and as a result the second group adopts a more realistic model where the clocks differ by an offset and a skew.
- the skew is assumed constant in the duration of the estimation process, in order to achieve robust and accurate synchronization, advanced algorithms are needed that estimate the offset and skew simultaneously.
- [8] proposes a median line-fitting technique which is a robust line-fitting technique.
- the problem with line-regression algorithms is that they are usually not robust to presence of large outliers and thus the robustness is only valid for certain PDV models (e.g. Gaussian).
- a simple skew and offset estimation method is proposed where timestamps are used to compute the average jitter and average inter-packet arrival time. Then the relative skew is computed as the ratio of the average jitter to the average inter-packet time.
- IEEE 1588 PTP was defined [1 ][2] to synchronize distributed clocks across Ethernet and other packet based networks. It allows for synchronization of distributed clocks to sub- microsecond accuracy. IEEE 1588 PTP was designed as an improvement to current time
- NTP network time protocol
- IEEE 1 588 PTP which is now the industry accepted standard for synchronization, grew out of the need for greater accuracy synchronization over so packet networks, particularly Ethernet.
- IEEE 1588 PTP relies on the use of hardware timestamped messages to synchronize one or more slave clocks (time client) to a master clock (time server). This process involves a message transaction between the master and slave where the precise moments of transmit /
- Accurate time information is distributed hierarchically, with a grandmaster clock at the root of the hierarchy.
- the grandmaster provides the time reference for one or more slave devices.
- These slave devices can, in turn, act as master devices for further hierarchical layers of slave devices.
- IEEE 1588 PTP also defines the descriptors that characterize a clock, the states of a clock and the allowed state transitions.
- the standard defines network messages, fields and semantics, the datasets maintained by each clock and the actions and timing for all IEEE 1588 network and internal events.
- the standard describes a suite of messages used for monitoring the system, specifications for an Ethernet-based implementation and conformance requirements and some implementation suggestions.
- IEEE 1588 PTP relies on the transfer of PTP messages to determine clock and system properties and to convey time information. A delay measurement process is used to determine path delays, which are then accounted for in the adjustment of local clocks.
- a master/slave hierarchy is created using the Best Master Clock (BMC) algorithm [1 ] to determine which clock has the highest quality clock (grandmaster clock) within the network.
- BMC Best Master Clock
- the BMC algorithm is then run continuously to allow clocks to adjust quickly to changes in network configuration and status. If the grandmaster clock is removed from the network or is determined by the BMC algorithm to no longer be the highest quality clock, the algorithm then redefines what the new grandmaster clock is and all other clocks are adjusted accordingly.
- FIG. 2 shows the message flow process for a strictly peer-to-peer message transaction scenario. This figure illustrates the case where the master clock in a time server 10 is directly attached (or peered) to a slave clock in a time client 4 over a packet network 12. The slave clock derives its timing from the upstream master clock and then acts as a master clock for further downstream devices.
- the main time synchronization related message types for this exchange involve the Sync, Foilow_Up, Deiay-Req, and Delay__Resp messages.
- Other more complex message flow process where message traverse intermediate nodes are described in the IEEE 1588 PTP standard.
- the master sends a Sync message to the slave and notes the time, ⁇ , at which it was sent.
- the slave receives the Sync message and notes the time of reception, T 2 .
- the master conveys to the slave the timestamp J ' , by either embedding the timestamp Ij in the
- Sync message i.e., one-step clock mode which requires some sort of hardware processing for embedding the timestamp on-the-fly for highest accuracy and precision
- embedding the timestamp ⁇ ] in a Follow_Up message i.e., two-step clock mode.
- the slave sends a Delay ... Req message to the master and notes the time, ⁇ , at which it was sent.
- the master receives the Deiay_Req message and notes the time of reception, 7 ' 4 .
- the master conveys to the slave the timestamp T 4 by embedding it in a Deiay_Resp message.
- the use of FollowJJp messages eliminates the need to timestamp transmitted messages on the fly, thereby facilitating a simpler hardware implementation.
- the slave After this message exchange the slave will have four timestamps ⁇ , , T 2 , 1 , T 4 ] from which it can determined both the network delay, d , (the time taken for messages to traverse the network link between the two nodes) and the slave offset, ⁇ , (time offset by which the slave clock leads or lags the master). Messages containing current time information are adjusted to account for their path delay, therefore providing a more accurate representation of the lime information conveyed. Under the assumption that the delays for the two paths are symmetric (the delay in one direction is the same as the delay in the opposite direction), the following relationships can be derived (see Figure 2):
- the slave computes the fixed delay d and clock offset ⁇ , as follows:
- the clock offset 0 can be used to align the local clock to the master's.
- a key assumption here is that the message exchanges occur over a period of time so small that the offset ⁇ can be assumed constant over that period.
- the accuracy of this link delay- measurement depends on both the symmetry of the one-way link delays and the accuracy of the timestamping process.
- a complete IEEE 1588-based solution at a time client includes servo algorithms, filters, PTP- Clock based on hardware timer and direct timer access.
- IEEE 1588 defines a wide range of synchronization capabilities except the clock synchronization mechanisms (servo algorithm, PLL, timers, etc.) to be used at the receiver (slave) to synchronize its local clock to the master.
- Methods of clock adjustment implementation are not specified by IEEE 1588 - it only provides a standard protocol for the exchange of messages between clocks. The benefit of not specifying clock adjustment implementations, is to allow clocks from different manufactures to be able to synchronize with each other as long as they understand the messaging protocol. There are a number of factors that can cause two supposedly identical clocks to drift apart or lose synchronization.
- An object of the present invention is to achieve accurate and robust synchronization, preferably over IEEE 1588, for critical applications that require stringent synchronization margins.
- An exemplary aspect of the present invention provides a method of synchronizing a local dock in a time client to a master clock in a time server, the method including the steps of: transmitting messages carrying tirnestamps from the time server and from the time client; receiving the messages from the time server at the time client and extracting tirnestamps from said messages; receiving the messages from the time client at the time server and extracting tirnestamps from said messages; estimating the skew and offset of the local clock compared to the master clock; and adjusting the output of the local clock using said estimated skew and offset, wherein the step of estimating the skew and offset includes the sub-steps of: estimating the clock skew from the extracted tirnestamps over a predetermined observation period; calculating a plurality of delay observations for each message exchange between the time server and the time client in the observation period; determining, from said series of delay observations, one or more representative delay values for the observation window; and estimating the clock offset from the selected representative delay values.
- a further exemplary aspect of the present invention provides a networked time system including a time server and at least one time client connected to the time server over a network, wherein: the time server includes a master ciock and a server control unit and transmits messages carrying timestamps from the master ciock; the time client includes a local clock and a client control unit and transmits messages carrying timestamps from the local clock, wherein: the server control unit is arranged to receive the messages from the time client and to extract the timestamps from said messages; and the client control unit is arranged to: receive the messages from the time server and to extract the timestamps from said messages; estimate the skew and offset of the locai clock compared to the master dock; and adjust the output of the local ciock using said estimated skew and offset, the client control unit being arranged to estimate the skew and offset of the local ciock by: estimating the clock skew from the extracted timestamps over a predetermined observation period; calculating a plurality
- the time client comprising: a local dock; and a control unit, wherein the control unit is arranged to: receive messages carrying timestamps from the time server and to extract the timestamps from said messages; estimate the skew and offset of the local clock compared to the master ciock; and adjust the output of the local clock using said estimated skew and offset, the control unit being arranged to estimate the skew and offset of the local ciock by: estimating the ciock skew from the extracted timestamps over a predetermined observation period; calculating a plurality of delay observations for each message exchange between the time server and the time client in the observation period; determining, from said series of delay observations, one or more representative dela values for the observation window; and estimating the clock offset from the selected representative delay values.
- Figure 1 shows a general view of some of the devices that require time synchronisation in a packet network and has already been described
- Figure 2 shows a genera! overview of synchronization with IEEE 1588 PTP using a series of message transactions between a master and its siave(s) and has already been described;
- Figures 3a and 3b illustrate two variants of the common linear clock models used in clock synchronization analysis
- Figure 4 shows the extension of the basic IEEE 1588 PTP protocol message exchange timing diagram to cover the case where clock offset and skew exists between the client and the server;
- Figure 5 shows a clock model derived from a combination of Figures 3 and 4;
- Figure 6 shows the architecture of a time client according to an embodiment of the present invention with a local clock and an estimation algorithm according to a further embodiment of the present invention.
- Figure 7 shows the adjustments made to a free-running local clock to produce a
- a first aspect of the present invention provides a method of synchronizing a local clock to a master clock by estimating the skew and offset of the local clock compared to the master clock and adjusting the output of the local clock accordingly,
- a first aspect of the present invention preferably provides a method of synchronizing a local clock in a time client to a master clock in a time server, the method including the steps of: transmitting messages carrying timestamps from the time server and from the time client; receiving the messages from the time server at the time client and extracting timestamps from said messages; receiving the messages from the time client at the time server and extracting timestamps from said messages; estimating the skew and offset of the local dock compared to the master clock; and adjusting the output of the local clock using said estimated skew and offset, wherein the step of estimating the skew and offset includes the sub-steps of: estimating the clock skew from the extracted timestamps over a predetermined observation period; calculating a plurality of delay observations for each message exchange between the time server and the time client in the observation period; determining, from said series of delay observations, one or more representative delay values for the observation window; and estimating the clock offset from the selected representative dela values.
- the messages are IEEE 1588 PTP messages. This allows the method to work using the timing protocol messages that are already exchanged in known format between a time server and a time client.
- the messages transmitted from the time server may include IEEE 1588 Sync messages
- the messages transmitted from the time client may include IEEE 1588 Deiay_Req messages. This allows the time server and time client to determine the delays in arrival of the messages in each direction and, on the assumption that the transmission delays in each direction are the same, estimate the effects of skew and offset of the local clock.
- the estimation of the clock skew a is calculated as:
- T 1IL are the timestamps applied by the time server to respectively the first and last Sync messages in the observation window
- T S] 1 and T 2 are the times of receipt as recorded by the local clock on receipt of respectively the first and last Sync messages in the observation window
- T 3 and T 3 are the timestamps applied by the time client to the first and last Delayford. Req messages in the observation window
- T 4 and T 4 are the times of receipt as recorded by the master clock on receipt of respectively the first and last
- Deiay_Req messages in the observation window are, over the observation window defined by ! ⁇ / ⁇ ! :
- a is the estimated clock skew
- ⁇ ⁇ is the timestamp applied by the time server to the rth Sync message in the observation window
- T ? is the time of receipt as recorded by the local clock on receipt of the ih Sync message
- T 3 is the timestamp applied by the time client to the rth Deiay___Req message
- T 4 is the time of receipt as recorded by the master clock on receipt of the rth Delalinger.
- the clock offset may be estimated as: ⁇ -— s ! .
- the method of this aspect preferably further includes repeatedly performing the steps of transmitting, receiving, estimating and adjusting on a periodic basis, for example every time a particular group of message exchanges (such as the Sync, Follow Up, Delay Req and Delay_Resp message exchange) is completed, or after a predetermined number of such message exchanges.
- a particular group of message exchanges such as the Sync, Follow Up, Delay Req and Delay_Resp message exchange
- a second aspect of the present invention provides a networked time system in which a time ciient can estimate the skew and offset of a local clock compared to a master clock in a time server and adjust the output of a local clock using that skew and offset.
- a second aspect of the present invention preferably provides a networked time system including a time server and at least one time client connected to the time server over
- the time server includes a master clock and a server control unit and transmits messages carrying tirnestamps from the master clock
- the time ciient includes a local clock and a ciient control unit and transmits messages carrying tirnestamps from the local clock
- the server control unit is arranged to receive the messages from the time client and to extract the tirnestamps from said messages
- the client control unit is
- the client control unit being arranged to estimate the skew and offset of the local clock by: estimating the clock skew from the extracted tirnestamps over a predetermined observation period;
- the messages are IEEE 1588 PTP messages. This allows the networked time system to use the timing protocol messages that are already exchanged in known format between a time server and a time client.
- the messages transmitted from the time server may include IEEE 1588 Sync messages
- the messages transmitted from the time client may include IEEE 1588 Delay_Req messages. This allows the time server and time client to determine the delays in arrival of the messages in each direction and, on the assumption that the transmission delays in each direction are the same, estimate the effects of skew and offset of the local clock. in one embodiment the estimation of the clock skew a is calculated as:
- T 1 and T L are the timesfamps applied by the time server to respectively the first and last Sync messages in the observation window;
- T 2i 1 and T ZL are the times of receipt as recorded by the local clock on receipt of respectively the first and last Sync messages in the observation window;
- T 3i 1 and T 3,L are the timestamps applied by the time client to the first and last Delay_Req messages in the observation window;
- T 4 and T 4 are the times of receipt as recorded by the master clock on receipt of respectively the first and last
- ⁇ is the esiimated clock skew
- ⁇ ⁇ is the timestamp applied by the time server to the fth Sync message in the observation window
- T 2 j is the time of receipt as recorded by the local clock on receipt of the Hh Sync message
- T 3ii is the timestamp applied by the time client to the ;lh Delay_Req message
- T 4:i is the time of receipt as recorded by the master clock on receipt of the it Delay ... Req message.
- the control unit may select the representative delay values as the minimum values of X i and I, from within the observation window, i.e. X se , - mini: , and Y s - min i? .
- the client control unit preferably adjusts the output of the local clock on a periodic basis.
- message exchanges are performed regularly between server and client.
- the server control unit and the client control unit preferably repeatedly carry out the steps of transmitting, receiving, estimating and adjusting on a periodic basis, for example every time a particular group of message exchanges (such as the Sync, Fol!owJJp, Delay ,. Req and Delay ... Resp message exchange) is completed, or after a predetermined number of such message exchanges.
- a particular group of message exchanges such as the Sync, Fol!owJJp, Delay ,. Req and Delay ... Resp message exchange
- the local clock includes a free-running oscillator which supplies pulses to a free- running counter.
- Embodiments of this second aspect may include some, ail or none of the above described optional or preferred features.
- a third aspect of the present invention provides a time client having a local clock which is arranged to estimate the offset and skew of that clock compared to a master clock in a time server and to adjust the output of the local clock using the estimated offset and skew.
- a third aspect of the present invention preferably provides a time client communicabiy coupled to a time server having a master clock over a network, the time client comprising: a local clock; and a control unit, wherein the control unit is arranged to: receive messages carrying timestamps from the time server and to extract the timestamps from said messages; estimate the skew and offset of the local clock compared to the master clock; and adjust the output of the local clock using said estimated skew and offset, the control unit being arranged to estimate the skew and offset of the local clock by: estimating the clock skew from the extracted timestamps over a predetermined observation period; calculating a plurality of delay observations for each message exchange between the time server and the time client in the observation period; determining, from said series of delay observations, one or more representative delay values for the observation window; and estimating the clock offset from the selected representative delay values.
- the messages are IEEE 1588 PTP messages.
- the time client may use the timing protocol messages that are already exchanged in known format between a time server and a time client.
- the messages transmitted from the time server may include IEEE 1588 Sync messages, and the messages transmitted from the time client may include IEEE 1588 Delay Req messages. This allows the time server and time client to determine the delays in arrival of the messages in each direction and, on the assumption that the transmission delays in each direction are the same, estimate the effects of skew and offset of the local dock.
- the estimation of the dock skew a is calculated as:
- T 1 and T are the timestamps applied by the time server to respectively the first and last Sync messages in the observation window: T 2i 1 and T 2iL are the times of receipt as recorded by the local clock on receipt of respectively the first and last Sync messages in the observation window; T 3 and T J:L are the timestamps applied by the time client to the first and last Delay_Req messages in the observation window; and T 4 and T 4:L are the times of receipt as recorded by the master clock on receipt of respectively the first and last
- the delay observations are, over the observation window defined by and ! ' 4"
- ⁇ is the estimated clock skew
- T 1tl is the timestamp applied by the time server to the fth Sync message in the observation window
- T 2 j is the time of receipt as recorded by the local clock on receipt of the in Sync message
- T 3ii is the timestamp applied by the time client to the ;lh Delay__Req message
- T 4:i is the time of receipt as recorded by the master clock on receipt of the it Delay salt.
- the control unit may select the representative delay values as the minimum values of X i and I, from within the observation window, i.e. X se , - min i: , and Y s - min i? .
- the control unit preferably adjusts the output of the local clock on a periodic basis.
- the control unit preferably repeatedly carries out the steps of transmitting, receiving, estimating and adjusting on a periodic basis, for example every time a particular group of message exchanges (such as the Sync, Foilow JJp, Delay Fleq and Deiay . choir Resp message exchange) is completed, or after a predetermined number of such message exchanges.
- the local clock includes a free-running oscillator which supplies pulses to a free- running counter.
- Embodiments of this third aspect may include some, all or none of the above described optional or preferred features.
- Figures 3a and 3b illustrate two variants of the common linear clock models used in clock synchronization analysis.
- a is a very small number expressed in parts per million (ppm) or parts per billion (ppb).
- the fractional part of ⁇ i.e. a-1
- ppm parts per million
- ppb parts per billion
- Figure 4 extends the basic IEEE 1588 PTP protocol message exchange timing diagram (e.g. as illustrated in Figure 2 and described above) to cover the case where clock offset and skew exists between the client and the server.
- Figure 4 highlights the various contributions the clock skew makes on the clock offset and system delay as shown in the lower diagram compared to the upper diagram in which the dock demonstrates offset only.
- the two figures in Figure 4 become identical when there is zero skew between the clocks.
- a free-running local clock is used at the client 14.
- the free running clock is used for timestamping and for synthesizing an image of the server clock (synchronized local clock) for the time client ( Figure 6).
- the timestamps indicated in Figure 5 at the client are with respect to this local clock. Timestamps at the client are captured according to the client's free running local oscillator as depicted in Figure 6.
- ⁇ (0 R - al , ) denotes the initial reference offset that has to be estimated so that the client can align its clock to that of the server.
- T L T 4L ⁇ T, + a(T 4L -r 4>1 )
- FIG. 6 shows a time client according to an embodiment of the present invention and which, when connected to a time server having a master clock over a network (particularly a packet network) forms a networked time system according to a further embodiment of the present invention.
- the time client is shown in schematic form with the main functional blocks of the synchronization technique according to a further embodiment of the present invention.
- Local dock 81 is made up from a local free-running oscillator 80 which feeds pulses at a rate inversely proportional to the frequency of the oscillator to a free-running counter 82 which produces the local clock time.
- the control unit 70 carries out a series of functions in conjunction with PIP messages to/from a time server (not shown) over a network (not shown). Firstly, timestamps from the local clock 81 are applied to outgoing PTP messages and timestamps from the master dock in the time server are extracted from incoming PTP messages by the timestamp detection & generation function 72.
- the free running local oscillator is used together with the estimated clock parameters to synthesize a synchronized local clock which is an estimated image of the server clock.
- a synchronized local clock which is an estimated image of the server clock.
- the estimated clock skew and offset can then be used by the client to align its clock to the server's as illustrated in Figure 7.
- Figure 7 shows how the local time C(t) produced by the local free running oscillator 80 and
- the free-running counter 82 is adjusted by the skew adjustment factor ⁇ 0 and the
- computer system includes the hardware, software and data storage devices for embodying a system or carrying out a method according to the above described
- a computer system may comprise a central processing unit (CPU), input means, output means and data storage.
- the data storage may comprise RAM, disk drives or other computer readable media.
- the computer system may include a plurality of computing devices connected by a network and able to communicate with each other over that network.
- the methods of the above embodiments may be provided as one or more computer programs or as computer program products or computer readable media carrying a computer program which is arranged, when run on a computer, to perform the method(s) described above.
- computer readable media includes, without limitation, any medium or media which can be read and accessed directly by a computer or computer system.
- the media can include, but are not limited to, magnetic storage media such as floppy discs, hard disc storage media and magnetic tape; optical storage media such as optical discs or CD-ROMs; electrical storage media such as memory, including RAM, ROM and flash memory; and hybrids and combinations of the above such as magnetic/optical storage media.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
- Electric Clocks (AREA)
Abstract
This invention relates to methods and devices for clock synchronization. The invention makes particular use of IEEE 1588 with offset and skew correction. In embodiments of the invention, the IEEE 1588 Precision Time Protocol is used to exchange time stamps between a time server and a client from which the client can estimate the clock offset and skew. In embodiments of the invention a free running clock at the client is provided with an estimation technique based on the time stamps from the IEEE 1588 PTP message exchange between the server and client clocks. The offset and skew from the estimation process can be combined with the local free running clock to give a synchronized local clock which is an accurate image of the master clock.
Description
METHODS AND DEVICES FOR CLOCK SYNCHRONIZATION
Field of the Invention
The present invention relates to methods and devices for clock synchronization. It is particularly, but not exclusively, concerned with the alignment of slave clocks to a master clock using IEEE 1588 PTP with offset and skew correction.
Background of the Invention
IEEE 1588 PTP [1][2] is now one of the industry accepted protocols for delivering high accuracy time services in the sub-microseconds levels. IEEE 1588 PTP is similar in concept to the Network Time Protocol (NTP) [3]. Both protocols distribute time messages over a packet network to time clients. NTP is ubiquitous and operates at the upper layers of the protocol stack and in its current form provides no better than millisecond levels accuracy. IEEE 1588 PTP is a layer 2 protocol (although it can also be made to operate over higher protocol layers) with hardware timestamping capabilities to provide sub-microsecond accuracy. As a packet-based high accuracy synchronization protocol, IEEE 1588 PTP certainly has a number of advantages over GPS, which until now was the only available solution for high quality time synchronization.
GPS based satellite receivers 16 provide sub-100 nanosecond accuracies, and are often used where precision time synchronization is mission critical: in telecommunication, military, and aerospace applications. But improved accuracy comes at a cost. GPS receivers used for telecom networks synchronization have a much higher specification (high quality oscillators, high holdover capability accuracies, etc.) than those in the average portable satellite navigation system, plus they need all the correct interfaces and cabling to communicate with the teiecoms equipment. GPS based systems require outdoor antenna installations to assure a direct view of the sky to receive the low power satellite transmissions, which are not only an added expense but which create an extra burden on the physical infrastructure of the facility. For this reason, GPS is best suited to be used in a central location as the primary reference clock (PRC) for a telecom network with other technologies utilized to distribute synchronization and timing to remote locations.
GPS-based solutions also have poor or no reception in indoor and underground
environments, and dense urban canyons where direct visibility of the GPS satellites 18 is poor thus making them not suitable for a good proportion of picoceil and femtoceil users. GPS is also not suitable for devices with small footprints requiring time synchronization like
wireless sensors. Another concern is GPS is perceived outside the USA as an American controlled technology with no service guarantees (GPS is not autonomous), as a result its use as the primary source of timing is not favored by operators in other countries. For the above reasons, IEEE 1588 PTP has gained traction in the industry as the protocol of choice for high quality synchronization.
Cfock Synchronization in Packet Networks
The need for synchronized time is critical for today's network environments. Figure 1 shows a general view of some of the devices that require time synchronization in a packet network 12. The time transfer protocol could be NTP or IEEE 1588 PTP, but the latter is the protocol of choice for telecom networks.
There are many applications of high precision time synchronizations, some of which are emerging applications. Some notable application areas are as follows:
* Mobile Networking: Synchronization is a key requirement in the telecommunications industry and this market has become a driving force in the development and evolution of synchronization solutions and standards. For example, wireless technologies like GSM, WCDMA (both frequency division duplexing (FDD) and time division duplexing (TDD) technologies), and CD A2000 require frequency accuracy of 0.05 ppm (parts per million) at the air interface. In addition, CDMA2000 requires time synchronization at the ± 3 ps level (± 10 ps worst case) and WCDMA TTD mode requires accuracy of ± 1 .25 ps between base stations. The accurate reference clock is typically derived from Time Division Multiplexing (TDM) interfaces (for GSM, WCDMA and other FDD based technologies) or from expensive GPS receivers located at the base station (for TDD based technologies). Without synchronization traceable to a highly accurate reference clock in the wireless network, local interference between channel frequencies, as well as mutual interference with neighboring base stations will occur. This could ultimately cause calls to be dropped and a degradation of the overall user experience. The high level of synchronization provided by IEEE 1588 PTP could also be useful in time-of-arrival (TOA) and time-difference-of-arriva! (TDOA) based localization solution where one is interested in locating mobile nodes connected to a wireless network.
* Residential Audio/Video (A/V) Networking: Modern consumer electronics now gather, store, and transmit audio and video data in digital form and require adequate quality of service and synchronization for live streaming. The 802.1 AS protocol, which is based on IEEE 1588, provides timing and synchronization within bridged home A/V Ethernet LANs. The protocol allows high level timing information to be distributed to
each media playback device, thus, providing them with a precise reference point for streaming multimedia. This synchronization technology, thus, enables a convergence to Ethernet as a viable consumer electronics interconnect.
* Test and Measurement: IEEE 1588 PTP was originally designed to satisfy the need for synchronization in test and measurement systems but has now become beneficial in other areas. The challenge was to synchronize networked measuring devices with each other in terms of time so that they are able to record measured values and provide them with a precise system timestamp. Based on this timestamp, the measured values can then be correlated with each other.
* Industrial Automation: The major uses of high precision synchronization within an industrial automation and motion-control environment are for sequencing event measurements, scheduling outputs, synchronizing actuation, timesfamping logged data and coordinating events with a GPS level accuracies. Multi-stand printing presses which operate at very high speeds require a very high level of synchronization. By distributing highly precise timing information to each subsystem, a common point of reference can be used to coordinate their activities - each manufacturing component has a precise time reference to begin or end their associated actions.
Other application areas include synchronization of sensors and sensor network, power systems, ranging, telemetry and navigation systems. Synchronization is also needed in other areas, though the level of accurate may not be as high as in the application areas cited above. Some general applications of synchronized time services are as follows:
* Wireless sensor networks (WSNs): WSNs have a wide range of applications including the monitoring of the status of industrial processes and equipment, environmental monitoring, infrastructure monitoring, surveillance, tracking, etc. But the efficient operation of a WSN depends on how well the various nodes are time synchronized. Time synchronization allows for the coordination among the nodes for power saving sleep/wake up modes, localization of sensor nodes and other sources, data fusion, object tracking, transmission scheduling among the nodes, and distributed communication and processing of data.
* Billing services: Billing services and similar applications must know the time accurately. Time based billing as in telecom networks rely on time synchronization. Mobile user billing and maintenance functions also rely on precise timing references.
* Log file accuracy, auditing, and monitoring: Tracking security breaches, network usage, or problems affecting a large number of components can be nearly impossible if timestamps in logs are inaccurate.
® Network fault diagnosis and recovery: Every aspect of managing, securing, planning, and debugging a network involves determining when events happen. Without time synchronization, it can be difficult or impossible to correlate the time sequence of events involving multiple network components, such as outages, bugs, security breaches, service problems, or network problems. Precise timestamping of data events through each element in the backhaul network facilitates the isolation and traceability of failures and outages.
* File timestamps: To reduce confusion in shared filesystems, it is crucial for the modification times to be consistent, regardless of what machine the filesystems are on. Sorting email and other network communications can also be difficult if timestamps are incorrect.
* Access security and authentication (e.g., erberos): Many security and authentication protocols require accurate time synchronization. Applications such as cyptographic key management and secure document transmission may require using accurate, encoded timestamps which match unencoded time stamps to help assure document authenticity.
® Real-world time values (e.g., correlation of events at different locations): In addition, interactions with dynamic events such as stock market trades, aviation management, and radio and TV programming, require careful synchronization of time among the various players in the system.
* Validation of e-commeree transactions (e.g., electronic payments, electronic stock transfers): Some financial services even require highly accurate timekeeping by law.
* Directory services (e.g., Active Directory, etc.)
· Distributed computing
* Scheduled operations (e.g., cron jobs, network backups)
* Network forensics
The following basic definitions will be used throughout this specification:
* Clock Offset: The clock offset at a particular moment is the difference between the time reported by the time client (slave) and the "true" time as reported by the time server (master).
* Clock Skew: A clock's skew at a particular moment is the frequency difference (first derivative of its offset with respect to true time) between the client clock and the server clock.
Clock synchronization has received considerable attention over the last several years as the communication networks evolve from circuit-switched to ail-IP packet based networks. With this migration the challenge of frequency and time synchronization has surfaced. The techniques in the state of the art differ by the assumed model and the estimated parameters. The first group assumes that the two clocks differ by an offset. As a result the algorithms and techniques attempt to estimate only the offset between the clocks. The reality is far from this model, however, and as a result the second group adopts a more realistic model where the clocks differ by an offset and a skew. The skew is assumed constant in the duration of the estimation process, in order to achieve robust and accurate synchronization, advanced algorithms are needed that estimate the offset and skew simultaneously.
Clock synchronization over packet networks (LANs) but with the offset only assumption has been proposed in [4] and [5], The former implements offset estimation using IEEE 1588 protocol which is more accurate than the latter thai uses the Network Time Protocol (NTP) - which is software-based, inaccurate time-stamping method. The importance of clock synchronization in telecommunication networks has been highlighted in [6] where a phase control loop has been proposed using the IEEE 1588 PTP protocol to estimate the offset. Another recent offset-only clock synchronization algorithm has been proposed in [7] which follows [6] in concept where the PTP algorithm is used as the time-stamp exchange mechanism and a PLL is implemented to estimate the offset. In addition the authors propose noise reduction mechanisms to deal with Packet Delay Variation (PDV) noise typically experienced in packet networks.
The problem with ali these techniques is the non-realistic assumption that the two clocks differ only by an offset. The reality however is that the slave clock, in addition to the offset, deviates in time as well due to the skew problem which is an inherent problem with most clocks. As a result in order to enable robust and accurate synchronization both the offset and the skew should be estimated.
There are several techniques that propose clock synchronization algorithms to estimate the skew through linear regression or linear programming techniques and convex hull methods.
Specifically, [8] proposes a median line-fitting technique which is a robust line-fitting technique. The problem with line-regression algorithms is that they are usually not robust to presence of large outliers and thus the robustness is only valid for certain PDV models (e.g. Gaussian).
in [9] a simple skew and offset estimation method is proposed where timestamps are used to compute the average jitter and average inter-packet arrival time. Then the relative skew is computed as the ratio of the average jitter to the average inter-packet time.
A more complicated approach is proposed in [10] [1 1 ] where a linear programming technique 5 is used to estimate the clock skew in network delay measurements. The technique shows improvement in performance compared to other existing algorithms. in [12] [13] skew estimation is achieved through the computation of convex hull from the delay measurements. The authors claim that convex-hull approach provides better insight and handling of error metrics compared to linear regression or linear programming i o techniques. Although the technique was tested using NTP, it can be implemented with any protocol {such as IEEE 1588) that captures the delay measurements.
An extension of this technique is introduced by [14] where both the offsets and skew are estimated by a lower and upper convex hull approach that relies on using forward/backward delay measurements.
15 An adaptive approach to estimating the clock skew was proposed in [15] where a recursive least squares approach is used to calculate an estimate of the clock skew.
One major drawback of these techniques is that they have been developed using NTP messaging mechanisms which does not have high accuracy. For very precise clock synchronization applications such as synchronizing TDD base stations over packet network a 20 more robust approach is required that integrates IEEE 1588 protocol.
IEEE 1588 Precision Timing Protoco! (PTP)
IEEE 1588 PTP was defined [1 ][2] to synchronize distributed clocks across Ethernet and other packet based networks. It allows for synchronization of distributed clocks to sub- microsecond accuracy. IEEE 1588 PTP was designed as an improvement to current time
25 synchronization technologies such as the network time protocol (NTP) [2]. NTP allows for synchronization of distributed clocks to a precision in the order of hundreds of microseconds or milliseconds, which for many applications such as those for personal computing purposes is a sufficient level of accuracy. IEEE 1 588 PTP, which is now the industry accepted standard for synchronization, grew out of the need for greater accuracy synchronization over so packet networks, particularly Ethernet.
IEEE 1588 PTP relies on the use of hardware timestamped messages to synchronize one or more slave clocks (time client) to a master clock (time server). This process involves a message transaction between the master and slave where the precise moments of transmit
/
and receive are measured, preferably at the hardware level. Accurate time information is distributed hierarchically, with a grandmaster clock at the root of the hierarchy. The grandmaster provides the time reference for one or more slave devices. These slave devices can, in turn, act as master devices for further hierarchical layers of slave devices.
IEEE 1588 PTP also defines the descriptors that characterize a clock, the states of a clock and the allowed state transitions. The standard defines network messages, fields and semantics, the datasets maintained by each clock and the actions and timing for all IEEE 1588 network and internal events. In addition, the standard describes a suite of messages used for monitoring the system, specifications for an Ethernet-based implementation and conformance requirements and some implementation suggestions.
IEEE 1588 PTP relies on the transfer of PTP messages to determine clock and system properties and to convey time information. A delay measurement process is used to determine path delays, which are then accounted for in the adjustment of local clocks. At system start up. a master/slave hierarchy is created using the Best Master Clock (BMC) algorithm [1 ] to determine which clock has the highest quality clock (grandmaster clock) within the network. The BMC algorithm is then run continuously to allow clocks to adjust quickly to changes in network configuration and status. If the grandmaster clock is removed from the network or is determined by the BMC algorithm to no longer be the highest quality clock, the algorithm then redefines what the new grandmaster clock is and all other clocks are adjusted accordingly.
Synchronization with IEEE 1588 PTP is achieved using a series of message transactions between a master and its slaves. Figure 2 shows the message flow process for a strictly peer-to-peer message transaction scenario. This figure illustrates the case where the master clock in a time server 10 is directly attached (or peered) to a slave clock in a time client 4 over a packet network 12. The slave clock derives its timing from the upstream master clock and then acts as a master clock for further downstream devices. The main time synchronization related message types for this exchange involve the Sync, Foilow_Up, Deiay-Req, and Delay__Resp messages. Other more complex message flow process where message traverse intermediate nodes are described in the IEEE 1588 PTP standard.
in Figure 2, the master sends a Sync message to the slave and notes the time, Ί , at which it was sent. The slave receives the Sync message and notes the time of reception, T2. The master conveys to the slave the timestamp J', by either embedding the timestamp Ij in the
Sync message (i.e., one-step clock mode which requires some sort of hardware processing for embedding the timestamp on-the-fly for highest accuracy and precision), or embedding the timestamp Ί] in a Follow_Up message (i.e., two-step clock mode). The slave sends a
Delay... Req message to the master and notes the time, Ί , at which it was sent. The master receives the Deiay_Req message and notes the time of reception, 7' 4. The master conveys to the slave the timestamp T4 by embedding it in a Deiay_Resp message. The use of FollowJJp messages eliminates the need to timestamp transmitted messages on the fly, thereby facilitating a simpler hardware implementation.
After this message exchange the slave will have four timestamps { , , T2 , 1 , T4 ] from which it can determined both the network delay, d , (the time taken for messages to traverse the network link between the two nodes) and the slave offset, θ , (time offset by which the slave clock leads or lags the master). Messages containing current time information are adjusted to account for their path delay, therefore providing a more accurate representation of the lime information conveyed. Under the assumption that the delays for the two paths are symmetric (the delay in one direction is the same as the delay in the opposite direction), the following relationships can be derived (see Figure 2):
X = T2 - Tl = 0 + d ^
Y = T4 - T3 = -0 + d (2)
From these equations, the slave computes the fixed delay d and clock offset Θ , as follows:
fj . -— (r ά? - 7 LJ ) + (7 i - rj :::: X + Y
2 (3) e = (T2 - Ti ) - (T4 - TJ = X - Y
2 " 2 (4)
The clock offset 0 can be used to align the local clock to the master's. A key assumption here is that the message exchanges occur over a period of time so small that the offset Θ can be assumed constant over that period. In addition, the accuracy of this link delay- measurement depends on both the symmetry of the one-way link delays and the accuracy of the timestamping process.
A complete IEEE 1588-based solution at a time client includes servo algorithms, filters, PTP- Clock based on hardware timer and direct timer access. IEEE 1588 defines a wide range of synchronization capabilities except the clock synchronization mechanisms (servo algorithm, PLL, timers, etc.) to be used at the receiver (slave) to synchronize its local clock to the master. Methods of clock adjustment implementation are not specified by IEEE 1588 - it only provides a standard protocol for the exchange of messages between clocks. The benefit of not specifying clock adjustment implementations, is to allow clocks from different manufactures to be able to synchronize with each other as long as they understand the messaging protocol.
There are a number of factors that can cause two supposedly identical clocks to drift apart or lose synchronization. Differences in temperature, the age of the oscillators themselves, manufacturing defects and material variations in the manufacturing process, and electric and magnetic interference, among other factors, can ail affect the quality of synchronization, Even the smallest errors in keeping time can significantly add up over a long period, if a clock frequency (skew) is off by just 10 parts per million (ppm), it will gain or lose almost a second a day (i.e., 24x80x80/10° = 0.88s/day). All of these factors create a need for clock synchronization to allow for two clocks to be aligned when differences occur. The continuous variations of the above factors also explain why the process of synchronization is continuous and not a one-time process. Clearly, having any sort of meaningful time synchronizaiion is almost impossible if clocks are allowed to run on their own without synchronization.
The above simple analysis shows that clock skew is the main reason why clocks drift apart and need to be aligned periodically. The analysis shown earlier based on Figure 2 does not explicitly consider clock skew in the system. Adjusting for the clock skew in addition to the initial clock offset guarantees the long term reliability of the synchronization process. Critical applications like those enumerated above require higher synchronization accuracy and reliability.
An object of the present invention is to achieve accurate and robust synchronization, preferably over IEEE 1588, for critical applications that require stringent synchronization margins.
Summary of the Invention
An exemplary aspect of the present invention provides a method of synchronizing a local dock in a time client to a master clock in a time server, the method including the steps of: transmitting messages carrying tirnestamps from the time server and from the time client; receiving the messages from the time server at the time client and extracting tirnestamps from said messages; receiving the messages from the time client at the time server and extracting tirnestamps from said messages; estimating the skew and offset of the local clock compared to the master clock; and adjusting the output of the local clock using said estimated skew and offset, wherein the step of estimating the skew and offset includes the sub-steps of: estimating the clock skew from the extracted tirnestamps over a predetermined observation period; calculating a plurality of delay observations for each message exchange between the time server and the time client in the observation period; determining, from said series of delay observations, one or more representative delay values for the observation window; and estimating the clock offset from the selected representative delay values.
A further exemplary aspect of the present invention provides a networked time system including a time server and at least one time client connected to the time server over a network, wherein: the time server includes a master ciock and a server control unit and transmits messages carrying timestamps from the master ciock; the time client includes a local clock and a client control unit and transmits messages carrying timestamps from the local clock, wherein: the server control unit is arranged to receive the messages from the time client and to extract the timestamps from said messages; and the client control unit is arranged to: receive the messages from the time server and to extract the timestamps from said messages; estimate the skew and offset of the locai clock compared to the master dock; and adjust the output of the local ciock using said estimated skew and offset, the client control unit being arranged to estimate the skew and offset of the local ciock by: estimating the clock skew from the extracted timestamps over a predetermined observation period; calculating a plurality of delay observations for each message exchange between the time server and the time client in the observation period; determining, from said series of delay observations, one or more representative delay values for the observation window; and estimating the clock offset from the selected representative delay values.
A further exemplary embodiment of the present invention provides a time client
communicably coupled to a time server having a master clock over a network, the time client comprising: a local dock; and a control unit, wherein the control unit is arranged to: receive messages carrying timestamps from the time server and to extract the timestamps from said messages; estimate the skew and offset of the local clock compared to the master ciock; and adjust the output of the local clock using said estimated skew and offset, the control unit being arranged to estimate the skew and offset of the local ciock by: estimating the ciock skew from the extracted timestamps over a predetermined observation period; calculating a plurality of delay observations for each message exchange between the time server and the time client in the observation period; determining, from said series of delay observations, one or more representative dela values for the observation window; and estimating the clock offset from the selected representative delay values.
Brief Description of the Drawings Embodiments of the invention will now be described by way of example with reference to the accompanying drawings in which:
Figure 1 shows a general view of some of the devices that require time synchronisation in a packet network and has already been described;
Figure 2 shows a genera! overview of synchronization with IEEE 1588 PTP using a series of message transactions between a master and its siave(s) and has already been described;
Figures 3a and 3b illustrate two variants of the common linear clock models used in clock synchronization analysis;
Figure 4 shows the extension of the basic IEEE 1588 PTP protocol message exchange timing diagram to cover the case where clock offset and skew exists between the client and the server;
Figure 5 shows a clock model derived from a combination of Figures 3 and 4;
Figure 6 shows the architecture of a time client according to an embodiment of the present invention with a local clock and an estimation algorithm according to a further embodiment of the present invention; and
Figure 7 shows the adjustments made to a free-running local clock to produce a
synchronised dock output.
Detailed Description
Accordingly, at its broadest, a first aspect of the present invention provides a method of synchronizing a local clock to a master clock by estimating the skew and offset of the local clock compared to the master clock and adjusting the output of the local clock accordingly,
A first aspect of the present invention preferably provides a method of synchronizing a local clock in a time client to a master clock in a time server, the method including the steps of: transmitting messages carrying timestamps from the time server and from the time client; receiving the messages from the time server at the time client and extracting timestamps from said messages; receiving the messages from the time client at the time server and extracting timestamps from said messages; estimating the skew and offset of the local dock compared to the master clock; and adjusting the output of the local clock using said estimated skew and offset, wherein the step of estimating the skew and offset includes the sub-steps of: estimating the clock skew from the extracted timestamps over a predetermined observation period; calculating a plurality of delay observations for each message exchange between the time server and the time client in the observation period; determining, from said series of delay observations, one or more representative delay values for the observation window; and estimating the clock offset from the selected representative dela values.
By taking into account the estimated clock skew in the adjustment of the output of the local dock, and in particular in the determination of the offset, a more accurate synchronization of the local clock to the master clock of the time server can be achieved.
Preferably the messages are IEEE 1588 PTP messages. This allows the method to work using the timing protocol messages that are already exchanged in known format between a time server and a time client.
In particular, the messages transmitted from the time server may include IEEE 1588 Sync messages, and the messages transmitted from the time client may include IEEE 1588 Deiay_Req messages. This allows the time server and time client to determine the delays in arrival of the messages in each direction and, on the assumption that the transmission delays in each direction are the same, estimate the effects of skew and offset of the local clock.
In one embodiment, the estimation of the clock skew a is calculated as:
1 + a = (^ -^) + (^ -¾) ,
L -TiX ) + c L - r4>1) ■ wherein: 7^ and T1IL are the timestamps applied by the time server to respectively the first and last Sync messages in the observation window; TS] 1 and T2, are the times of receipt as recorded by the local clock on receipt of respectively the first and last Sync messages in the observation window; T3 and T3 are the timestamps applied by the time client to the first and last Delay„.Req messages in the observation window; and T4 and T4 are the times of receipt as recorded by the master clock on receipt of respectively the first and last
Deiay_Req messages in the observation window. in one embodiment the delay observations are, over the observation window defined by ! < / < ! : and
= TU -~ (l + a)Tu ( I a if. T, wherein: a is the estimated clock skew; Τυ is the timestamp applied by the time server to the rth Sync message in the observation window; T?, is the time of receipt as recorded by the local clock on receipt of the ih Sync message; T3 is the timestamp applied by the time client to the rth Deiay___Req message; and T4:, is the time of receipt as recorded by the master clock on receipt of the rth Dela „.Req message.
Preferably the step of selecting selects the representative delay values as the minimum values of Xi and Y; from within the observation window, i.e. Xwt = rain X, and Yet = min i' , i≤i<L ' * ' i<i≤L
X - Ϋ
in this arrangement the clock offset may be estimated as: Θ -— s ! .
Under the IEEE 1 588 PTP, message exchanges are performed regularly between server and 5 ciient. The method of this aspect preferably further includes repeatedly performing the steps of transmitting, receiving, estimating and adjusting on a periodic basis, for example every time a particular group of message exchanges (such as the Sync, Follow Up, Delay Req and Delay_Resp message exchange) is completed, or after a predetermined number of such message exchanges. i o Embodiments of this first aspect may include some, ail or none of the above described
optional or preferred features.
The method of the first aspect is preferably, but not necessarily, used to control a time system according to the second aspect below or a time ciient according to the third aspect below, including some, ail or none of the optional or preferred features of those aspects. s At its broadest, a second aspect of the present invention provides a networked time system in which a time ciient can estimate the skew and offset of a local clock compared to a master clock in a time server and adjust the output of a local clock using that skew and offset.
Accordingly a second aspect of the present invention preferably provides a networked time system including a time server and at least one time client connected to the time server over
20 a network, wherein: the time server includes a master clock and a server control unit and transmits messages carrying tirnestamps from the master clock; the time ciient includes a local clock and a ciient control unit and transmits messages carrying tirnestamps from the local clock, wherein: the server control unit is arranged to receive the messages from the time client and to extract the tirnestamps from said messages; and the client control unit is
25 arranged to: receive the messages from the time server and to extract the tirnestamps from said messages; estimate the skew and offset of the local clock compared to the master clock; and adjust the output of the local clock using said estimated skew and offset, the client control unit being arranged to estimate the skew and offset of the local clock by: estimating the clock skew from the extracted tirnestamps over a predetermined observation period;
30 calculating a plurality of delay observations for each message exchange between the time
server and the time client in the observation period; determining, from said series of delay observations, one or more representative delay values for the observation window; and estimating the clock offset from the selected representative delay values.
By taking into account the clock skew in the adjustment of the output of the local clock, and in particular in the determination of the offset, a more accurate synchronization of the local clock to the master clock of the time server can be achieved.
By taking into account the clock skew in the adjustment of the output of the local clock, and in particular in the determination of the offset, a more accurate synchronization of the local dock to the master clock of the time server can be achieved.
Preferably the messages are IEEE 1588 PTP messages. This allows the networked time system to use the timing protocol messages that are already exchanged in known format between a time server and a time client.
In particular, the messages transmitted from the time server may include IEEE 1588 Sync messages, and the messages transmitted from the time client may include IEEE 1588 Delay_Req messages. This allows the time server and time client to determine the delays in arrival of the messages in each direction and, on the assumption that the transmission delays in each direction are the same, estimate the effects of skew and offset of the local clock. in one embodiment the estimation of the clock skew a is calculated as:
( 2 ~ T2A ) + (T^L ~ T31 )
1 + a -—■ : — ,
(z L -ru) + (r,tI -i , ) ' wherein: T 1 and T L are the timesfamps applied by the time server to respectively the first and last Sync messages in the observation window; T2i 1 and TZL are the times of receipt as recorded by the local clock on receipt of respectively the first and last Sync messages in the observation window; T3i 1 and T3,L are the timestamps applied by the time client to the first and last Delay_Req messages in the observation window; and T4 and T4 are the times of receipt as recorded by the master clock on receipt of respectively the first and last
Deiay__Req messages in the observation window.
In one embodiment, the delay observations are, over the observation window defined by
Χ, = Χ, - ατ ,. Y Υ · u/
and ! ' 4"
= Γ2 ι. - (1 + α)7 ι. i \ 7\ wherein: σ is the esiimated clock skew; Τυ is the timestamp applied by the time server to the fth Sync message in the observation window; T2j is the time of receipt as recorded by the local clock on receipt of the Hh Sync message; T3ii is the timestamp applied by the time client to the ;lh Delay_Req message; and T4:i is the time of receipt as recorded by the master clock on receipt of the it Delay ...Req message.
The control unit may select the representative delay values as the minimum values of Xi and I, from within the observation window, i.e. Xse, - mini: , and Ys - min i? .
X -- Y
In this arrangement the clock offset may be estimated as: Θ =— ~ ~ .
The client control unit preferably adjusts the output of the local clock on a periodic basis.
Under the IEEE 1588 PTP, message exchanges are performed regularly between server and client. The server control unit and the client control unit preferably repeatedly carry out the steps of transmitting, receiving, estimating and adjusting on a periodic basis, for example every time a particular group of message exchanges (such as the Sync, Fol!owJJp, Delay,. Req and Delay ...Resp message exchange) is completed, or after a predetermined number of such message exchanges.
Preferably the local clock includes a free-running oscillator which supplies pulses to a free- running counter.
Embodiments of this second aspect may include some, ail or none of the above described optional or preferred features.
At its broadest, a third aspect of the present invention provides a time client having a local clock which is arranged to estimate the offset and skew of that clock compared to a master clock in a time server and to adjust the output of the local clock using the estimated offset and skew.
Accordingly a third aspect of the present invention preferably provides a time client communicabiy coupled to a time server having a master clock over a network, the time client comprising: a local clock; and a control unit, wherein the control unit is arranged to: receive
messages carrying timestamps from the time server and to extract the timestamps from said messages; estimate the skew and offset of the local clock compared to the master clock; and adjust the output of the local clock using said estimated skew and offset, the control unit being arranged to estimate the skew and offset of the local clock by: estimating the clock skew from the extracted timestamps over a predetermined observation period; calculating a plurality of delay observations for each message exchange between the time server and the time client in the observation period; determining, from said series of delay observations, one or more representative delay values for the observation window; and estimating the clock offset from the selected representative delay values.
Preferably the messages are IEEE 1588 PTP messages. This allows the time client to use the timing protocol messages that are already exchanged in known format between a time server and a time client. in particular, the messages transmitted from the time server may include IEEE 1588 Sync messages, and the messages transmitted from the time client may include IEEE 1588 Delay Req messages. This allows the time server and time client to determine the delays in arrival of the messages in each direction and, on the assumption that the transmission delays in each direction are the same, estimate the effects of skew and offset of the local dock.
In one embodiment, the estimation of the dock skew a is calculated as:
(T2,L - T2TL ) + (TI - T3I )
1 a - : ,
- T ) + >L - 4>1 ) wherein: T 1 and T are the timestamps applied by the time server to respectively the first and last Sync messages in the observation window: T2i 1 and T2iL are the times of receipt as recorded by the local clock on receipt of respectively the first and last Sync messages in the observation window; T3 and TJ:L are the timestamps applied by the time client to the first and last Delay_Req messages in the observation window; and T4 and T4:L are the times of receipt as recorded by the master clock on receipt of respectively the first and last
Delay Req messages in the observation window.
In one embodiment the delay observations are, over the observation window defined by
and ! ' 4"
= rw - (l + a)rw = (1 + «)Γ4>ί -Γ3 wherein: σ is the estimated clock skew; T1tl is the timestamp applied by the time server to the fth Sync message in the observation window; T2j is the time of receipt as recorded by the local clock on receipt of the in Sync message; T3ii is the timestamp applied by the time client to the ;lh Delay__Req message; and T4:i is the time of receipt as recorded by the master clock on receipt of the it Delay„.Req message.
The control unit may select the representative delay values as the minimum values of Xi and I, from within the observation window, i.e. Xse, - min i: , and Ys - min i? .
X " Y
In this arrangement the clock offset may be estimated as: Θ =— ~ ~ .
The control unit preferably adjusts the output of the local clock on a periodic basis.
Under the IEEE 1 588 PTP, message exchanges are performed regularly between server and client. The control unit preferably repeatedly carries out the steps of transmitting, receiving, estimating and adjusting on a periodic basis, for example every time a particular group of message exchanges (such as the Sync, Foilow JJp, Delay Fleq and Deiay.„Resp message exchange) is completed, or after a predetermined number of such message exchanges.
Preferably the local clock includes a free-running oscillator which supplies pulses to a free- running counter.
Embodiments of this third aspect ma include some, all or none of the above described optional or preferred features.
Figures 3a and 3b illustrate two variants of the common linear clock models used in clock synchronization analysis. In Figure 3a, a is a very small number expressed in parts per million (ppm) or parts per billion (ppb). In Figure 3b, the fractional part of σ (i.e. a-1 ) is also a very small number expressed in ppm or ppb.
Figure 4 extends the basic IEEE 1588 PTP protocol message exchange timing diagram (e.g. as illustrated in Figure 2 and described above) to cover the case where clock offset and skew exists between the client and the server. Figure 4 highlights the various contributions the clock skew makes on the clock offset and system delay as shown in the lower diagram
compared to the upper diagram in which the dock demonstrates offset only. The two figures in Figure 4 become identical when there is zero skew between the clocks.
Using the clock models in Figure 3 and Figure 4, the model in Figure 5 can be obtained. Since no two clock oscillators will run at exactly the same frequency, there will always be a clock skew and the two clocks will have an increasing or decreasing clock offset.
The techniques proposed in the following embodiments of the present invention assume that a free-running local clock is used at the client 14. In this case, the frequency of the client's local oscillator is not adjusted, but it is allowed to free-run. The free running clock is used for timestamping and for synthesizing an image of the server clock (synchronized local clock) for the time client (Figure 6). The timestamps indicated in Figure 5 at the client are with respect to this local clock. Timestamps at the client are captured according to the client's free running local oscillator as depicted in Figure 6.
From the clock models given in Figures 3 to 5, the following relationships can be obtained from the rth Sync and Follow Up messages:
Ί ; = ( ] ; + d) + offset + a(elapse time)
= . + d) + 0R + · Δ7:_;
= 01, + d) + eR + a(T i - Tu + d)
= (T + d) + 9 + a(Tu + d)
= (l + a){T i + d) + 0 (5)
The term Θ = (0R - al , ) denotes the initial reference offset that has to be estimated so that the client can align its clock to that of the server. From the Hh De!ay_Req and Delay_Resp messages, we get the following relationships:
1 ( - d) + offset a (elapse time)
= (T4J + ¾ + α · ΔΓ4>ί
= ( 4ι! - d) + 0R + a(T4 ~ Tl ~ d)
= (T4 - ά) + θ + (J - - d)
= (l + a)(T4ti - d) + 0 (6)
Note that setting a ------- 0 in (5) and (6) (that is, for a system with no skew and offset only), we get the set of equations obtained earlier on from Figure 2.
Now let us assume that timestamp measurements are collected over a window of L complete protocol message exchanges (Figure 5). We also assume in our skew based clock model (Figures 3 to 5) that the clock difference between the client and the server is monotonically increasing (or decreasing) within the observation window. If we assume that the maximum clock difference occurs between the first and Lth protocol exchange, then we can develop
the following relationships irom the linear skew model in Figure 4 and the above set of equations. From (5), we obtain T2 , and T2 as: ,i = (71,1 + d) + θκ+ α(ΤΙΛ - ΤιΛ + d)
= (ΤΙΛ + d) + θκ+ ad
(7)
T2, iT, + d) + θκ + '·'('/: ,. -Tu + d)
(8)
From (8), we obtain 74>i and Ί , as
73,i = (T4,i - d) + 0g+ α(Τ4Λ - T - d)
(10) Ί , , = (ΤΛ L - d) + θκ + α(Γ4 L - Ti j - d)
(11)
Subtracting (10) from (11 ) we obtain
T L = T4L ~T, + a(T4L -r4>1)
(12)
Now adding (9) and (12) and solving for a we get
(T2L-Tu) + (TiL-Tl)-(TiL-Tu)- (Γ4„
a
(TlL-T ) + (T^L-T41)
(13) or
, <r2,L -T2,) + {TL-TU)
1
tfu-y;.! ) + (?,£ -r4J) (14)
- «7: ; -f (1 -f a)d + Θ
(15) or
Λ' = Xt a!
- T2 , - (i 4- a)TL
(17) or flT4 j
= (i + a)T4 - T ;
(18)
Note that Xt -- X, and = Y] when a - 0 as expected. it can be seen from (15) and (17) that
X. - Y. = (l + a)d 0 i I · a «i ■ 0
The clock synchronization algorithm with offset and skew compensation according to an embodiment of the present invention can now be summarized as follows:
1 . After L protocol message exchanges (observation window), estimate clock skew from ( 13) or ( 14).
2. Compute set of delay observations Xi and K , / L2 /. from (16) and (18), respectively.
3. Determine a representative delay value for the observation window L by applying a selection or averaging criterion to the set of delay observations (for example,
X .,el = niin Xf and Ϋ - min Y- ).
l<i<L ' " ' ] <i<L '
Figure 6 shows a time client according to an embodiment of the present invention and which, when connected to a time server having a master clock over a network (particularly a packet network) forms a networked time system according to a further embodiment of the present invention. The time client is shown in schematic form with the main functional blocks of the synchronization technique according to a further embodiment of the present invention.
Local dock 81 is made up from a local free-running oscillator 80 which feeds pulses at a rate inversely proportional to the frequency of the oscillator to a free-running counter 82 which produces the local clock time.
The control unit 70 carries out a series of functions in conjunction with PIP messages to/from a time server (not shown) over a network (not shown). Firstly, timestamps from the local clock 81 are applied to outgoing PTP messages and timestamps from the master dock in the time server are extracted from incoming PTP messages by the timestamp detection & generation function 72.
These timestamps are fed to the offset and skew estimator 74 which repeatedly and periodically estimates the offset Θ and skew a of the local clock. These values are then passed to the synchronizer 78 which appiies them to the output of the local clock 81 in order to produce a clock output 88 which is estimated to be synchronized to the master clock in the time server. The operation of the synchronizer 76 is shown in more detail in Figure 7.
The free running local oscillator is used together with the estimated clock parameters to synthesize a synchronized local clock which is an estimated image of the server clock. Using the clock model 1 in Figure 3a, that is,
C(t) - (1 + a)S(i) + θ ,
the estimated clock skew and offset can then be used by the client to align its clock to the server's as illustrated in Figure 7.
Figure 7 shows how the local time C(t) produced by the local free running oscillator 80 and
1
the free-running counter 82 is adjusted by the skew adjustment factor β0 and the
(1 - a)
— Θ
offset adjustment factor β produced by the processor 84 to produce a clock
(1 + a)
output 88 which is a synchronized time with the master clock (not shown). Implementation
The systems and methods of the above embodiments may be implemented at least partly in a computer system (in particular in computer hardware or in computer software) in addition to the structural components and user interactions described.
The term "computer system" includes the hardware, software and data storage devices for embodying a system or carrying out a method according to the above described
embodiments. For example, a computer system may comprise a central processing unit
(CPU), input means, output means and data storage. The data storage may comprise RAM, disk drives or other computer readable media. The computer system may include a plurality of computing devices connected by a network and able to communicate with each other over that network.
The methods of the above embodiments may be provided as one or more computer programs or as computer program products or computer readable media carrying a computer program which is arranged, when run on a computer, to perform the method(s) described above.
The term "computer readable media" includes, without limitation, any medium or media which can be read and accessed directly by a computer or computer system. The media can include, but are not limited to, magnetic storage media such as floppy discs, hard disc storage media and magnetic tape; optical storage media such as optical discs or CD-ROMs; electrical storage media such as memory, including RAM, ROM and flash memory; and hybrids and combinations of the above such as magnetic/optical storage media.
While the invention has been described in conjunction with the exemplary embodiments described above, many equivalent modifications and variations will be apparent to those skilled in the art when given this disclosure. Accordingly, the exemplary embodiments of the invention set forth above are considered to be illustrative and not limiting. Various changes to the described embodiments may be made without departing from the spirit and scope of the invention.
In particular, although the methods of the above embodiments have been described as being implemented on the systems of the embodiments described, the methods and systems of the present invention need not be implemented in conjunction with each other, but can be implemented on alternative systems or using alternative methods respectively.
References
IEEE Standard for a Precision Clock Synchronization Protocol for Networked
Measurement and Control Systems, iEEE 1588-2008.
IEEE Standard for a Precision Clock Synchronization Protocol for Networked
Measurement and Control Systems, iEEE 1588-2002,
Mills, D., "Network Time Protocol (Version 3) Specification, Implementation and Analysis", IETF RFC 1305, March 1992.
R. Holier, T. Saulter, N. Kero, "Embedded SynUTC and IEEE 1588 clock
synchronization for industrial Ethernet," in Proc. IEEE Emerging Technologies and Factory Automation, vol. 1 , pp. 422-426, Nov. 2003.
0. Gurewitz, I. Cidon and . Sidi, "Network time synchronization using clock offset optimization," in Proc. IEEE int'l Conf. on Network Protocols, pp. 212-221 , Nov. 2003.
R. Subrahmanyan, "Timing recover for IEEE 1588 applications in
telecommunications," IEEE Transactions on Inst And Meas., vol. 58, no. 6, pp. 1858- 1868, June 2009.
1. Hadzic, D.R. Morgan and Z. Sayeed, "A synchronization algorithm for packet MANs," IEEE Transactions on Communications, vol. 59, no. 4, pp. 1 142-1 1 53, April 201 1 .
V. Paxon, Measurements and Analysis of End-to-End Internet Dynamics, Ph.D. Thesis, University of California, Berkeley, 1997.
R. Ravikanth, Nokia Telecommunications Inc. (2001 ), Method for estimating relative skew between clocks in packet network, U.S. Pat. US8327274.
S. B. Moon, P. Skeily and D. Towsiey, "Estimation and removal of clock skew from network delay measurements," in Proc, IEEE 1NFQCOM, vol. , pp. 227-234, New York, NY, USA, Mar. 1999.
[1 1 ]. P. Skeily, S. B. Moon, D. Towsiey, Verizon Laboratories Inc. (2003), Clock skew estimation and removal, U.S. Pat. 6861810.
L. Zhang, Z. Liu and C, H. Xia, "Clock synchronization algorithms for network measurements," in Proc. IEEE INFOCOM, vol. 1 , pp. 160-169, Nov. 2002.
Z. Liu, C. H. Xia, L. Zhang. Internationa! Business Machines Corporation (2005), Clock synchronization with removal of clock skews through network measurements in derivation of a convex hull, U.S. Pat. 6957357.
S. M. Carlson, M. H. T. Hack and L. Zhang, International Business Machines Corporation (2010), Method and system for clock skew and offset estimation, U.S. Pat. US7688865.
J. Benesty, Lucent Technologies !nc.(2006). Method for estimating clock skew within a communications network. U.S. Pat. US7051246. rences referred to are hereby incorporated by reference.
Claims
1 . A method of synchronizing a local clock in a time client to a master clock in a time server, the method including the steps of:
transmitting messages carrying timestamps from the lime server and from the time client;
receiving the messages from the time server at the time client and extracting timestamps from said messages;
receiving the messages from the time client at the time server and extracting timestamps from said messages;
estimating the skew and offset of the local clock compared to the master clock; and adjusting the output of the local clock using said estimated skew and offset, wherein the step of estimating the skew and offset includes the sub-steps of:
estimating the clock skew from the extracted timestamps over a predetermined observation period;
calculating a plurality of delay observations for each message exchange between the time server and the time client in the observation period;
determining, from said series of delay observations, one or more representative delay values for the observation window: and
estimating the clock offset from the selected representative delay values.
2. A method according to claim 1 wherein the messages are IEEE 1588 PTP messages.
3. A method according to claim 2 wherein the messages transmitted from the time server include IEEE 1588 Sync messages, and the messages transmitted from the time client include IEEE 1588 Delay __Req messages.
4. A method according to claim 3 wherein the estimation of the clock skew a is calculated as:
wherein:
TV; and T are the timestamps applied by the time server to respectively the first and last Sync messages in the observation window;
T2. i and T2,L are the times of receipt as recorded by the local clock on receipt of
respectively the first and last Sync messages in the observation window;
T3: 1 and T3:L are the timestamps applied by the time client to the first and last Delay __Req messages in the observation window; and
T4,i and T4, are the times of receipt as recorded by the master clock on receipt of respectively the first and last Delay_Req messages in the observation window,
5. A method according to claim 3 or claim 4 wherein the delay observations are, over the observation window defined by 1 < < L : (■ Cii^ ;
and
= T2J - (1 + α)Τυ i \ 7 wherein:
a is the estimated dock skew;
T1:i is the timestamp applied by the time server to the ith Sync message in the observation window;
T2 is the time of receipt as recorded by the local clock on receipt of the ·ιπ Sync message;
T3 is the timestamp applied by the time client to the ith Delay__Req message; and T4 is the time of receipt as recorded by the master clock on receipt of the Λη Delay„.Req message.
6. A method according to claim 5 wherein the step of selecting selects the
representative delay values as the minimum values of X, and Ϋ, from within the observation window.
7. A method according to claim 6 wherein the clock offset is estimated as:
8. A method according to any one of the preceding claims, further including repeatedly performing the steps of transmitting, receiving, estimating and adjusting on a periodic basis.
9. A networked time system including a time server and at least one time client connected to the time server over a network, wherein:
the time server includes a master clock and a server control unit and transmits messages carrying timestamps from the master clock;
the time client includes a local clock and a client control unit and transmits messages carrying timestamps from the local clock,
wherein:
the server control unit is arranged to receive the messages from the time client and to extract the timestamps from said messages; and
the client control unit is arranged to:
receive the messages from the time server and to extract the timestamps from said messages;
estimate the skew and offset of the local clock compared to the master clock; and
adjust the output of the local clock using said estimated skew and offset, the client control unit being arranged to estimate the skew and offset of the local clock by- estimating the clock skew from the extracted timestamps over a predetermined observation period;
calculating a plurality of delay observations for each message exchange between the time server and the time client in the observation period;
determining, from said series of delay observations, one or more representative delay values for the observation window; and
estimating the clock offset from the selected representative delay values.
10. A networked time system according to claim 9 wherein the messages are IEEE 1588 PTP messages.
1 1. A networked time system according to claim 10 wherein the messages transmitted from the time server include IEEE 1588 Sync messages, and the messages transmitted from the time client include IEEE 1588 Delay.. Req messages.
12. A networked time system according to claim 1 1 wherein the estimation of the clock skew a is calculated as:
T - z ! ) + (j f - z , )
i a -— -L - — — ,
(ii.L -ru) + (2 >L -r4>1 )
wherein:
T1: 1 and T are the timestamps applied by the time server to respectively the first and last Sync messages in the observation window;
T2,i and T2,L are the times of receipt as recorded by the local clock on receipt of respectively the first and last Sync messages in the observation window;
T3: 1 and T3 are the timestamps applied by the time client to the first and last Deiay__Req messages in the observation window; and
T4 and T4 are the times of receipt as recorded by the master clock on receipt of respectively the first and last De!ay_Req messages in the observation window.
13. A networked time system according to claim 1 1 or claim 12 wherein the delay observations are, over the observation window defined by 1 < < L ; and
(1 = (1 + α)Γ4ιΙ. -Γ3>ί wherein:
e? is the estimated clock skew;
TV, is the timestamp applied by the time server to the Λη Sync message in the observation window;
TS is the time of receipt as recorded by the local clock on receipt of the Λη Sync message;
T3,i is the timestamp applied by the time client to the Λη De!ay_Req message; and T4 is the time of receipt as recorded by the master clock on receipt of the Λη
Delay.. Req message.
14. A networked time system according to claim 13 wherein the client control unit selects the representative delay values as the minimum values of X, and from within the observation window.
15. A networked time system according to claim 14 wherein the clock offset is estimated as:
16. A networked time system according to any one of claims 9 to 1 5 wherein the ioca! control unit is arranged to adjust the output of the ioca! ciock on a periodic basis.
17. A networked time system according to any one of claims S to 1 6 wherein the ioca! dock includes a free-running oscillator which supplies pulses to a free-running counter.
18. A time client communicabiy coupled to a time server having a master ciock over a network, the time client comprising:
a iocai clock; and
a control unit,
wherein the control unit is arranged to:
receive messages carrying timestamps from the time server and to extract the timestamps from said messages;
estimate the skew and offset of the !ocai ciock compared to the master clock; and
adjust the output of the iocai clock using said estimated skew and offset, the control unit being arranged to estimate the skew and offset of the iocai clock by: estimating the clock skew from the extracted timestamps over a predetermined observation period;
calculating a plurality of delay observations for each message exchange between the time server and the time client in the observation period;
determining, from said series of delay observations, one or more representative delay values for the observation window; and
estimating the ciock offset from the selected representative delay values.
19. A time client according to claim 18 wherein the messages are IEEE 1588 PTP messages.
20. A time client according to claim 19 wherein the messages transmitted from the time server include !EEE 1 588 Sync messages, and the control unit is arranged to transmit IEEE 1588 Delay„.Req messages to the time server.
21 . A time client according to claim 20 wherein the estimation of the clock skew σ is calculated as:
wherein:
T1: 1 and T are the timestamps applied by the time server to respectively the first and last Sync messages in the observation window;
T2, i and T2,L are the times of receipt as recorded by the local clock on receipt of respectively the first and last Sync messages in the observation window;
T3: 1 and T3 are the timestamps applied by the time client to the first and last Deiay__Req messages in the observation window; and
T4 and T4 are the times of receipt as recorded by the master clock on receipt of respectively the first and last Delay _Req messages in the observation window.
22, A time client according to claim 20 or claim 21 wherein the delay observations are, over the observation window defined by 1 < i≤L : and
(1 = (1 + α)Γ4ιΙ. -Γ3>ί wherein:
e? is the estimated clock skew;
TV, is the timestamp applied by the time server to the th Sync message in the observation window;
TS is the time of receipt as recorded by the local clock on receipt of the Λη Sync message;
T3,i is the timestamp applied by the time client to the th Delay._..Req message; and T4 is the time of receipt as recorded by the master clock on receipt of the /th
Delay.. Req message.
23. A time client according to claim 22 wherein the control unit selects the representative delay values as the minimum values of Xt and from within the observation window.
A time client according to claim 23 wherein the clock offset is estimated as
wherein: X , = min . and Y . ~ oiini'
25. A time client according to any one of claims 18 to 24 wherein the local control unit is arranged to adjust the output of the local clock on a periodic basis.
26. A time client according to any one of claims 18 to 25 wherein the iocal clock includes a free-running osciiiator which supplies pulses to a free-running counter.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP12758592.5A EP2893655A1 (en) | 2012-09-04 | 2012-09-04 | Methods and devices for clock synchronization |
PCT/GB2012/052166 WO2014037684A1 (en) | 2012-09-04 | 2012-09-04 | Methods and devices for clock synchronization |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/GB2012/052166 WO2014037684A1 (en) | 2012-09-04 | 2012-09-04 | Methods and devices for clock synchronization |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2014037684A1 true WO2014037684A1 (en) | 2014-03-13 |
Family
ID=46832510
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/GB2012/052166 WO2014037684A1 (en) | 2012-09-04 | 2012-09-04 | Methods and devices for clock synchronization |
Country Status (2)
Country | Link |
---|---|
EP (1) | EP2893655A1 (en) |
WO (1) | WO2014037684A1 (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016123588A1 (en) * | 2015-01-30 | 2016-08-04 | Scientific Drilling International, Inc. | Dual mode telemetry |
US10069584B2 (en) | 2016-02-01 | 2018-09-04 | Institute For Information Industry | Frequency calibration apparatus and method |
CN109005557A (en) * | 2018-09-26 | 2018-12-14 | 南京中兴新软件有限责任公司 | A kind of time delay symmetry measurement method, device and system |
CN111835449A (en) * | 2020-07-30 | 2020-10-27 | 山东超越数控电子股份有限公司 | Local area network high-precision clock synchronization method and device based on PTP (precision time protocol) |
WO2022037428A1 (en) * | 2020-08-19 | 2022-02-24 | 华为技术有限公司 | Clock synchronization method and apparatus |
CN114237020A (en) * | 2021-12-10 | 2022-03-25 | 合肥兆芯电子有限公司 | Timer calibration method and electronic device |
TWI764300B (en) * | 2019-11-25 | 2022-05-11 | 日商富士電機股份有限公司 | Programmable Controller Systems and Modules |
CN115134034A (en) * | 2022-07-06 | 2022-09-30 | 中国人民解放军国防科技大学 | Virtual-real combined simulation time synchronization method and system for cloud edge |
WO2023098683A1 (en) * | 2021-11-30 | 2023-06-08 | 广东电网有限责任公司江门供电局 | Real-time clock synchronization method and system for power distribution terminal, and power distribution terminal |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6327274B1 (en) | 1998-09-15 | 2001-12-04 | Nokia Telecommunications, Inc. | Method for estimating relative skew between clocks in packet networks |
US6661810B1 (en) | 1999-03-19 | 2003-12-09 | Verizon Laboratories Inc. | Clock skew estimation and removal |
US6957357B2 (en) | 2000-10-30 | 2005-10-18 | International Business Machines Corporation | Clock synchronization with removal of clock skews through network measurements in derivation of a convext hull |
US7051246B2 (en) | 2003-01-15 | 2006-05-23 | Lucent Technologies Inc. | Method for estimating clock skew within a communications network |
US7688865B2 (en) | 2005-09-09 | 2010-03-30 | International Business Machines Corporation | Method and system for clock skew and offset estimation |
US20100158183A1 (en) * | 2008-12-19 | 2010-06-24 | Ilija Hadzic | Frequency Synchronization Using First and Second Frequency Error Estimators |
-
2012
- 2012-09-04 WO PCT/GB2012/052166 patent/WO2014037684A1/en active Application Filing
- 2012-09-04 EP EP12758592.5A patent/EP2893655A1/en not_active Withdrawn
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6327274B1 (en) | 1998-09-15 | 2001-12-04 | Nokia Telecommunications, Inc. | Method for estimating relative skew between clocks in packet networks |
US6661810B1 (en) | 1999-03-19 | 2003-12-09 | Verizon Laboratories Inc. | Clock skew estimation and removal |
US6957357B2 (en) | 2000-10-30 | 2005-10-18 | International Business Machines Corporation | Clock synchronization with removal of clock skews through network measurements in derivation of a convext hull |
US7051246B2 (en) | 2003-01-15 | 2006-05-23 | Lucent Technologies Inc. | Method for estimating clock skew within a communications network |
US7688865B2 (en) | 2005-09-09 | 2010-03-30 | International Business Machines Corporation | Method and system for clock skew and offset estimation |
US20100158183A1 (en) * | 2008-12-19 | 2010-06-24 | Ilija Hadzic | Frequency Synchronization Using First and Second Frequency Error Estimators |
Non-Patent Citations (12)
Title |
---|
"IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems", IEEE 1588, 2002 |
"IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems", IEEE 1588, 2008 |
I. HADZIC; D.R. MORGAN; Z. SAYEED: "A synchronization algorithm for packet MANs", IEEE TRANSACTIONS ON COMMUNICATIONS, vol. 59, no. 4, April 2011 (2011-04-01), pages 1142 - 1153 |
KYOUNG-LAE NOH ET AL: "Adaptive multi-hop timings synchronization for wireless sensor networks", SIGNAL PROCESSING AND ITS APPLICATIONS, 2007. ISSPA 2007. 9TH INTERNATIONAL SYMPOSIUM ON, IEEE, PISCATAWAY, NJ, USA, 12 February 2007 (2007-02-12), pages 1 - 6, XP031280775, ISBN: 978-1-4244-0778-1 * |
L. ZHANG; Z. LIU; C. H. XIA: "Clock synchronization algorithms for network measurements", PROC. IEEE INFOCOM, vol. 1, November 2002 (2002-11-01), pages 160 - 169, XP010593573 |
MILLS, D.: "Network Time Protocol (Version 3) Specification, Implementation and Analysis", IETF RFC 1305, March 1992 (1992-03-01) |
O. GUREWITZ; I. CIDON; M. SIDI: "Network time synchronization using clock offset optimization", PROC. IEEE INT'L CONF. ON NETWORK PROTOCOLS, November 2003 (2003-11-01), pages 212 - 221, XP010671575, DOI: doi:10.1109/ICNP.2003.1249772 |
PAOLO FERRARI ET AL: "IEEE 1588-Based Synchronization System for a Displacement Sensor Network", IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, IEEE SERVICE CENTER, PISCATAWAY, NJ, US, vol. 56, no. 2, 1 February 2008 (2008-02-01), pages 254 - 260, XP011199790, ISSN: 0018-9456 * |
R. HOLLER; T. SAULTER; N. KERO: "Embedded SynUTC and IEEE 1588 clock synchronization for industrial Ethernet", PROC. IEEE EMERGING TECHNOLOGIES AND FACTORY AUTOMATION, vol. 1, November 2003 (2003-11-01), pages 422 - 426, XP010670459, DOI: doi:10.1109/ETFA.2003.1247737 |
R. SUBRAHMANYAN: "Timing recovery for IEEE 1588 applications in telecommunications", IEEE TRANSACTIONS ON INST. AND MEAS., vol. 58, no. 6, June 2009 (2009-06-01), pages 1858 - 1868, XP011253216 |
S. B. MOON; P. SKELLY; D. TOWSLEY: "Estimation and removal of clock skew from network delay measurements", PROC. IEEE INFOCOM, vol. 1, March 1999 (1999-03-01), pages 227 - 234 |
V. PAXON: "Measurements and Analysis of End-to-End Internet Dynamics", PH.D. THESIS, 1997 |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016123588A1 (en) * | 2015-01-30 | 2016-08-04 | Scientific Drilling International, Inc. | Dual mode telemetry |
US9749717B2 (en) | 2015-01-30 | 2017-08-29 | Scientific Drilling International, Inc. | Collaborative telemetry |
US10069584B2 (en) | 2016-02-01 | 2018-09-04 | Institute For Information Industry | Frequency calibration apparatus and method |
CN109005557A (en) * | 2018-09-26 | 2018-12-14 | 南京中兴新软件有限责任公司 | A kind of time delay symmetry measurement method, device and system |
TWI764300B (en) * | 2019-11-25 | 2022-05-11 | 日商富士電機股份有限公司 | Programmable Controller Systems and Modules |
CN111835449A (en) * | 2020-07-30 | 2020-10-27 | 山东超越数控电子股份有限公司 | Local area network high-precision clock synchronization method and device based on PTP (precision time protocol) |
WO2022037428A1 (en) * | 2020-08-19 | 2022-02-24 | 华为技术有限公司 | Clock synchronization method and apparatus |
WO2023098683A1 (en) * | 2021-11-30 | 2023-06-08 | 广东电网有限责任公司江门供电局 | Real-time clock synchronization method and system for power distribution terminal, and power distribution terminal |
CN114237020A (en) * | 2021-12-10 | 2022-03-25 | 合肥兆芯电子有限公司 | Timer calibration method and electronic device |
CN114237020B (en) * | 2021-12-10 | 2023-09-26 | 合肥兆芯电子有限公司 | Method for calibrating timer and electronic device |
US11803208B2 (en) | 2021-12-10 | 2023-10-31 | Hefei Core Storage Electronic Limited | Timer calibration method and electronic device |
CN115134034A (en) * | 2022-07-06 | 2022-09-30 | 中国人民解放军国防科技大学 | Virtual-real combined simulation time synchronization method and system for cloud edge |
Also Published As
Publication number | Publication date |
---|---|
EP2893655A1 (en) | 2015-07-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8873589B2 (en) | Methods and devices for clock synchronization | |
EP2893655A1 (en) | Methods and devices for clock synchronization | |
US8959381B2 (en) | Method and system for clock offset and skew estimation | |
Maggs et al. | Consensus clock synchronization for wireless sensor networks | |
US9178637B2 (en) | Method and devices for synchronization using linear programming | |
US9973292B2 (en) | Methods and systems for estimating offset and skew using linear programming | |
US9184861B2 (en) | Method and devices for synchronization | |
CN101447861B (en) | IEEE 1588 time synchronization system and implementation method thereof | |
US10979164B2 (en) | Peer-to-peer transparent clocks and methods of estimating skew in peer-to-peer transparent clocks | |
WO2018006686A1 (en) | Method, apparatus and device for optimizing time synchronization between communication network devices | |
Kim et al. | Energy-efficient time synchronization based on asynchronous source clock frequency recovery and reverse two-way message exchanges in wireless sensor networks | |
US20100115047A1 (en) | Method, system and apparatus for synchronizing signals | |
CN103563287B (en) | Synchronization device and synchronization method | |
KR20090032306A (en) | Time synchronization system and method on the network | |
EP2893656B1 (en) | Method and system for clock offset and skew estimation | |
EP3053286B1 (en) | Method and devices for synchronization | |
Ferrari et al. | Experimental characterization of uncertainty sources in a software-only synchronization system | |
Chaudhari et al. | On minimum variance unbiased estimation of clock offset in a two-way message exchange mechanism | |
US20080170592A1 (en) | Almost peer-to-peer clock synchronization | |
CN108134644B (en) | Synchronous method, device, synchronizer and system | |
EP3080933B1 (en) | Method and devices for synchronization using linear programming | |
Gore et al. | Towards robust synchronization in IoT networks | |
Kirsch et al. | Distributed Kalman filter for precise and robust clock synchronization in wireless networks | |
WO2017144108A1 (en) | Methods and systems for estimating skew | |
EP3437216B1 (en) | Methods and systems for estimating offset and skew using linear programming |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 12758592 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
REEP | Request for entry into the european phase |
Ref document number: 2012758592 Country of ref document: EP |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2012758592 Country of ref document: EP |