[go: up one dir, main page]

WO2005002100A1 - High accuracy network clock synchronization - Google Patents

High accuracy network clock synchronization Download PDF

Info

Publication number
WO2005002100A1
WO2005002100A1 PCT/IB2004/051057 IB2004051057W WO2005002100A1 WO 2005002100 A1 WO2005002100 A1 WO 2005002100A1 IB 2004051057 W IB2004051057 W IB 2004051057W WO 2005002100 A1 WO2005002100 A1 WO 2005002100A1
Authority
WO
WIPO (PCT)
Prior art keywords
clock
node
offset
skew
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/IB2004/051057
Other languages
French (fr)
Inventor
Laurent P. F. Bousis
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Koninklijke Philips NV
Original Assignee
Koninklijke Philips Electronics NV
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Koninklijke Philips Electronics NV filed Critical Koninklijke Philips Electronics NV
Publication of WO2005002100A1 publication Critical patent/WO2005002100A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays

Definitions

  • This invention relates to methods and apparatus for estimating clock offset and clock skew, and for synchronizing clocks in remote devices, for application to internet coupled devices and to synchronization of time sensitive streams of data such as digital bit streams especially video or audio streams.
  • Clock synchronization between different devices on networks such as Personal Area Networks (PAN), Controller Area Networks (CAN), Local Area Networks (LAN), Wide Area Networks (WAN), Metropolitan Area Networks (MAN), wireless or satellite networks or the internet for example is becoming more important.
  • Applications include providing time information or time interval information, or determining an order of events at distributed locations. This can be useful for a wide variety of advanced applications on distributed hosts or distributed clients.
  • clocks of internet hosts and clients can be synchronized using the Network Time Protocol NTP, (RFC-1305), to within a few milliseconds. This involves exchanging timestamps, computing delays and offsets and selecting and filtering the values from different sources. Higher accuracy synchronization can be achieved in more strictly controlled environments such as telephone networks or the Global Positioning System GPS.
  • NTP Network Time Protocol
  • a network may be provided with a reference clock.
  • One way of implementing a reference clock is to provide a master device and the time reported by a clock of the master device is considered to be the reference clock for that network. This often makes sense since the content streamed by the master device will most likely contain timestamps issued by that clock.
  • the present invention is not limited to this definition of how a reference clock is provided.
  • the offset of the clock of a client device is defined as the difference at a particular moment in time between the time reported by that clock and the time reported by the reference clock.
  • the skew of the clock of a client device is defined as the difference at a particular moment in time between the frequency of that clock and a frequency of the reference clock.
  • the skew of the clock of a client device is in fact the first derivative of its offset with respect to the time of the reference clock.
  • "Estimation of clock offset from one-way delay measurement on asymmetric paths" by Masato Tsuru, Tetsuya Takine and Yuji Oie (Saint 2002 Workshop, Feb 1 2002, Nara) acknowledges that it was known to estimate the clock offset, clock skew and bandwidth separately.
  • the clock skew could be estimated from one-way delay measurements with fixed size packets in one direction.
  • the clock offset could be estimated from one-way delay measurements with fixed size packets in both directions (like NTP) when delay is symmetric.
  • Prograrnrning It involves finding a minimum of a function Qi ( ⁇ , ⁇ , ⁇ ) where 1/ ⁇ is the skew, ⁇ is a function of transmission delays, and ⁇ is a function of propagation delays, over many timestamped messages. It is known from International patent publication WO 00/16509 to estimate relative skew between clocks in packet networks from timestamps in received packets and the local time of receipt. The delay in receipt is calculated, then compared to a previous delay to determine jitter. Average jitter is then used to determine skew. It is known from "Improved Algorithms for synchronizing computer network clocks" Mills, JJEEE/ACM transactions on networking Vol.
  • the invention provides apparatus for estimating skew and offset of a first clock at a first node of a network relative to a second clock at a second node of the network, the apparatus having means for: - . recording times of transmission and receipt of a series of messages exchanged between the nodes, dete ⁇ nining a series of instantaneous offsets at a series of time instants, from the recorded times of transmission and receipt, and determining an estimated offset, and an estimated skew from the series using a statistical method.
  • statistical method is meant a method used to find relationships between the measurements in order to predict future values.
  • a suitable statistical method is regression analysis, especially linear regression.
  • the combination of the series of instantaneous offsets and applying a statistical method to the series to estimate the skew and offset can produce more accurate results than other methods such as the Network Time Protocol [NTP] using other variables as set out above. Accuracy still depends on the skew being fairly constant, the measurements being accurate and well defined, an appropriate number of measurements, and the delays in each direction tending to be symmetric on average, and other practical factors.
  • NTP Network Time Protocol
  • the statistical method is regression, especially linear regression. This is one suitable way of fitting a line to the points in the series.
  • the linear regression is determined using a least squares algorithm. This is one suitable and efficient way of fitting a line to the series.
  • the steps are repeated to update the set and determine an updated estimated offset and an updated estimated skew. This enables the estimates to be continuously updated to maintain accuracy and adapt to changing conditions.
  • the instantaneous offset is determined from the relation
  • the apparatus is located at the first node.
  • the network is an IP network.
  • the messages comprise ICMP (Internet Control Message Protocol) timestamp request and reply messages.
  • the apparatus further comprises means for correcting the first clock to match the second clock.
  • the apparatus is arranged to carry out the recording of times of transmission and receipt during transmission of user data between the nodes.
  • the apparatus is arranged to delay user data passing through the first node on the basis of the estimated offset and skew. This is another way of reducing errors or distortion caused by the offset and skew.
  • the user data is video or audio or multimedia data for presentation to a user from a number of network nodes synchronously, or for recording from a number of network nodes synchronously.
  • Another aspect of the invention provides consumer equipment having an interface for coupling to a network, a first clock, and means for estimating skew and offset of the first clock relative to a second clock at a second node of the network by determining a series of instantaneous offsets at a series of time instants, from the recorded times of transmission and receipt, and determining an estimated offset, and an estimated skew from the series using a statistical method.
  • Other aspects of the invention include methods of estimating the skew and offset, methods of using the skew and offset estimated by this method, methods of synchronizing consumer equipment using the estimated skew and offset, and signals synchronized using the estimated skew and offset. How the present invention may be put into effect will now be described with reference to the appended schematic drawings. Obviously, numerous variations and modifications can be made without departing from the scope of the claims of the present invention. Therefore, it should be clearly understood that the form of the present invention is illustrative only and is not intended to limit the scope of the claims.
  • Fig. 1 shows an example of an ICMP timestamp request/reply
  • Fig. 2 shows an example of the time flow of an exchange of messages between a client-master pair of nodes
  • Fig. 3 shows a graph of a normal distribution of values of the difference of delay between the two directions of transmission
  • Fig. 4 shows a graph of a series of offsets for a series of messages at different times
  • Fig. 5 shows a flow chart of estimating skew and offset according to an embodiment of the invention
  • Fig. 6 shows an application of the estimated skew and offset, for synchronization, according to another embodiment.
  • any such terms as top, bottom, over, under and the like in the description and the claims are used for descriptive purposes and not necessarily for describing relative positions. It is to be understood that the terms so used are interchangeable under appropriate circumstances and that the embodiments of the invention described herein are capable of operation in other orientations than described or illustrated herein.
  • Embodiments of this invention are preferred that concern clock synchronization of devices in an IP based network where the difference between the network reception delay and the network transmission delay is non-negligible but the present invention is not limited thereto. Rather, the present invention can have advantage use in a wide variety of networks comprising nodes linked by communications paths.
  • Fig. 1 shows the format of an ICMP Timestamp Request/Reply as specified in RFC792.
  • the time is recorded as a 32bit value with the higher order bit set to one to "indicate this non-standard value"
  • Fig. 2 illustrates the time flow for the exchange of these messages between the client-master pair.
  • a subscript of C on time values indicates the time has been reported by the clock of the client device; a subscript of M on time values indicates the time has been reported by the clock of the master device.
  • OT c is the time of the client sending the first message
  • RT M is the time of receipt of the first message at the master
  • TT M is the time of transmission of the second message from the master.
  • the completion timestamp CT is defined as the time the sender of the ICMP Timestamp request first touched the ICMP Timestamp reply on receipt and the offset O is defined as the offset between the clock of the client device and the clock of the master device.
  • TD is the transmission delay of the first message
  • RD is the transmission delay in the other direction of the second message
  • PD is the processing delay at the master between the first and second messages.
  • the network reception delay RD can be approximated by the network transmission delay TD, where e is the difference between the delays:
  • the instantaneous offset O can thus be found by the following equation: 2 -, ⁇ -c e 2 TTM +RTM 2 ⁇ 0TC ⁇ CTC
  • the skew was zero or negligible, it would have been sufficient to make a large number of measurements to find the average value of O' and use that value as the estimated offset O between the client device and the master device. However, since the skew is non-negligible compared to the desired accuracy, the estimate based on the average value of O' will no longer be representative of the offset O between the client device and the master device. Indeed, the effect of the skew will start to show during the measurements and if it is assumed the drift is negligible (meaning the skew will be constant) the measurements will trend towards a non-horizontal (non-horizontal if the skew is non-zero) straight line over time. Fig.
  • the line can be derived by various statistical methods, one preferred method involves applying linear regression to the set of samples (0 OTa). A filter could optionally be applied on the values O'i of the collected samples in order to reduce or eliminate noise in the samples.
  • n the number of measurements
  • n the number of measurements
  • the client at the first node sends the first message with a timestamp request to the second node.
  • the client receives the reply, the second message, records the time of receipt, and extracts from it a time of receipt of the first message and a time of transmission of the second message.
  • step 115 uses these measurements at step 115 to calculate the instantaneous offset O'j. These measurements are repeated by sending more messages, to build up a list at step 120 of instantaneous values.
  • step 130 the linear regression is carried out as discussed above, to derive the estimated values of skew and offset.
  • step 140 more measurements are taken and the estimated values are updated using the more recent measurements. There are a number of different uses for the estimated values. Once the value of the offset O and the skew S have been estimated, the client has enough information (in combination with the originate timestamp OTco of the first measurement) to know with high accuracy how its clock T c relates to the clock of the master T M at every moment in time i:
  • Fig. 6 shows an embodiment in which a first node (the client) is household consumer equipment such as an audio speaker 200. It is connected to receive an audio signal in the form of packets over a household LAN 210 from a second node (the master) which is a Personal Computer PC 220.
  • the LAN can use the household power supply wiring or be a wireless LAN, to overcome the inconvenience of conventional speaker cables.
  • the speaker is accurately synchronized to the PC to avoid the problems described above.
  • the speaker includes a network interface card or chip 230, a packet processing part 240 for recording time of receipt and transmission, and for extracting information from received measurement packets.
  • An estimation part 250 uses the measured times to create the set of offsets and derive the estimated skew and offset, using a statistical method. This can be implemented as discussed above, or in other ways.
  • An audio generator part 260 recreates the audio signal from the received streamed packets, with a clock variation according to the estimated skew and offset.
  • the clock to be synchronized is the first clock 280 used by the audio generator part 260 to produce sound. This will for example typically be 44100 Hz for CD quality sound.
  • This clock is adapted to speed up or slow down the clock time based on the estimated skew and offset of that clock with regards to the master clock.
  • the speeding up or slowing down is a typically small change.
  • the link between the first clock 280 and the audio generator part 260 is provided through estimation part 250.
  • These parts can be implemented in various conventional types of hardware and software depending on the application, following established principles.
  • a single general purpose microprocessor or Application Specific Integrated Circuit can be used to implement the NIC, the packet processing part and the estimation part for example. In order to produce better estimations of the offset O and skew S with fewer measurements, the measurements can be carried out on an idle network right before the content is being streamed.
  • the measurements could be done continuously during the streaming thereby producing updated values of the offset O and skew S at fixed time intervals.
  • the present invention provides several advantages. Being able to accurately synchronize the clocks of devices inside home or other networks is of importance if content is to be streamed in separate channels to separate devices. Not only synchronization between audio channels, but also synchronization between audio and video channels has to be achieved with accuracies that are orders of magnitude higher than that achieved by traditional network synchronization protocols used in the PC environment.
  • the embodiments of the invention described here are able to achieve better accuracies and could therefore be implemented in any consumer electronic devices (and PCs) that stream and receive content inside home networks for example.
  • Network clock synchronization can be implemented with an accuracy that is orders of magnitudes better than traditional network synchronization protocols like NTP by applying a well-defined statistical analysis to a well-defined series of measurements to precisely estimate the skew and offset of the clock of the client.
  • skew and offset of a clock at a first node of a network relative to a second clock at a second node is estimated by recording times of transmission and receipt of a series of messages exchanged between the nodes, determining a series of instantaneous offsets at a series of time instants, from the recorded times and deriving offset and skew from the series using a statistical method such as regression, especially linear regression.
  • Accuracy still depends on the skew being fairly constant, the measurements being accurate and well defined, an appropriate number of measurements, and the delays in each direction tending to be symmetric on average.
  • the measurements can be repeated periodically to update the estimates. Apphcations include audio or visual packet data streamed to multiple nodes to enable them to be synchronized so that a user does not perceive distortion from relative delays or delay variation.
  • Other variations can be envisaged by those skilled in the art and are intended to be encompassed by the claims.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

Skew and offset of a first clock (280) at a first node (200) of a network relative to a second clock (270) at a second node (220) is estimated by recording times of transmission and receipt of a series of messages exchanged (100, 110) between the nodes, determining (115) a series of instantaneous offsets at a series of time instants, from the recorded times and deriving offset and skew from the series using a linear regression (130). Accuracy still depends on the skew being fairly constant, the measurements being accurate and well defined, an appropriate number of measurements, and the delays in each direction tending to be symmetric on average. The measurements can be repeated periodically (120) to update the estimates. Applications include audio or visual packet data steamed to multiple nodes to enable them to be synchronized so that a user does not perceive distortion from relative delays or delay variation.

Description

High accuracy network clock synchronization
This invention relates to methods and apparatus for estimating clock offset and clock skew, and for synchronizing clocks in remote devices, for application to internet coupled devices and to synchronization of time sensitive streams of data such as digital bit streams especially video or audio streams.
Clock synchronization between different devices on networks such as Personal Area Networks (PAN), Controller Area Networks (CAN), Local Area Networks (LAN), Wide Area Networks (WAN), Metropolitan Area Networks (MAN), wireless or satellite networks or the internet for example is becoming more important. Applications include providing time information or time interval information, or determining an order of events at distributed locations. This can be useful for a wide variety of advanced applications on distributed hosts or distributed clients. Currently clocks of internet hosts and clients can be synchronized using the Network Time Protocol NTP, (RFC-1305), to within a few milliseconds. This involves exchanging timestamps, computing delays and offsets and selecting and filtering the values from different sources. Higher accuracy synchronization can be achieved in more strictly controlled environments such as telephone networks or the Global Positioning System GPS. For example, a network may be provided with a reference clock. One way of implementing a reference clock is to provide a master device and the time reported by a clock of the master device is considered to be the reference clock for that network. This often makes sense since the content streamed by the master device will most likely contain timestamps issued by that clock. However, the present invention is not limited to this definition of how a reference clock is provided. The offset of the clock of a client device is defined as the difference at a particular moment in time between the time reported by that clock and the time reported by the reference clock. The skew of the clock of a client device is defined as the difference at a particular moment in time between the frequency of that clock and a frequency of the reference clock. Note that in this definition the skew of the clock of a client device is in fact the first derivative of its offset with respect to the time of the reference clock. "Estimation of clock offset from one-way delay measurement on asymmetric paths" by Masato Tsuru, Tetsuya Takine and Yuji Oie (Saint 2002 Workshop, Feb 1 2002, Nara) acknowledges that it was known to estimate the clock offset, clock skew and bandwidth separately. The clock skew could be estimated from one-way delay measurements with fixed size packets in one direction. Alternatively, the clock offset could be estimated from one-way delay measurements with fixed size packets in both directions (like NTP) when delay is symmetric. Yet another alternative was to estimate the bandwidth information in one direction from one-way delay measurement with variable size packets in one direction when skew is negligible. To improve on these, a method is proposed which estimates the clock offset and skew from one-way delay measurements with variable size packets in both directions, even in case of asymmetric bandwidths, but still needing the assumption of symmetric propagation delays. It can be regarded as a three-variable Linear Programming which is an extension of skew estimation method based on a two-variable Linear
Prograrnrning. It involves finding a minimum of a function Qi (α, λ, μ) where 1/α is the skew, λis a function of transmission delays, and μ is a function of propagation delays, over many timestamped messages. It is known from International patent publication WO 00/16509 to estimate relative skew between clocks in packet networks from timestamps in received packets and the local time of receipt. The delay in receipt is calculated, then compared to a previous delay to determine jitter. Average jitter is then used to determine skew. It is known from "Improved Algorithms for synchronizing computer network clocks" Mills, JJEEE/ACM transactions on networking Vol. 3 no 3, June 1995, to provide improvements to the NTP protocol. The improvements include refining the calculation of offsets, and how the local clock is controlled and adjusted, and adaptation to prevailing network conditions. "On Calibrating Measurements of Packet Transit Times" by Paxson, Sigmetrics 1998, suggests that using "echo" techniques involving sending packets and receiving replies is inaccurate as return paths over the internet often have different delays. Hence it is suggested to use "receiver based" measurements and compare time stamps with the local clock. Short term synchronization is improved by detecting clock adjustments and skew. One advanced example calling for higher accuracy is a household network for sending content such as audio or video streams in separate channels to or from separate devices on the network. This needs network clock synchronization with an accuracy that is several orders of magnitudes better than that achieved with traditional network synchronization protocols like NTP. When sfreaming separate audio channels over a network to several client devices, special care needs to be taken to maintain synchronization between those devices during playback. Consider for example the sfreaming of left and right audio channels in the form of Internet Protocol (IP) data packets to two separate speakers respectively in the same room, where the packets are used to drive the speakers. Audio travels at 343 m/s (at a normal atmospheric pressure and at 20 deg. Celsius). This means that a delay of 1ms between the left and right audio channels will be perceived by a listener as a distance difference from the listening position of 34.3 cm for one of the two speakers. Worse, variations of that delay during playback will be perceived as a movement of the speakers or of the perceived noise source.
According to a first aspect, the invention provides apparatus for estimating skew and offset of a first clock at a first node of a network relative to a second clock at a second node of the network, the apparatus having means for: - . recording times of transmission and receipt of a series of messages exchanged between the nodes, deteπnining a series of instantaneous offsets at a series of time instants, from the recorded times of transmission and receipt, and determining an estimated offset, and an estimated skew from the series using a statistical method. By statistical method is meant a method used to find relationships between the measurements in order to predict future values. A suitable statistical method is regression analysis, especially linear regression. The combination of the series of instantaneous offsets and applying a statistical method to the series to estimate the skew and offset can produce more accurate results than other methods such as the Network Time Protocol [NTP] using other variables as set out above. Accuracy still depends on the skew being fairly constant, the measurements being accurate and well defined, an appropriate number of measurements, and the delays in each direction tending to be symmetric on average, and other practical factors. By applying a well-defined statistical analysis to a well-defined series of measurements the skew and offset of the clock of the client can be precisely estimated. As a preferred additional feature, the statistical method is regression, especially linear regression. This is one suitable way of fitting a line to the points in the series. It assumes the skew is constant, otherwise a non-linear regression might be more appropriate. As a preferred additional feature, the linear regression is determined using a least squares algorithm. This is one suitable and efficient way of fitting a line to the series. As a preferred additional feature, the steps are repeated to update the set and determine an updated estimated offset and an updated estimated skew. This enables the estimates to be continuously updated to maintain accuracy and adapt to changing conditions. As a preferred additional feature, the instantaneous offset is determined from the relation
0 ^ TTM + RTu -OTc - CTc + e 2 where OTc is the time of the client sending the first message, RTM is the time of receipt of the first message at the master, and TTM is the time of transmission of the second message from the master, CTc is defined as the time the second message is received, and the offset O is defined as the offset between the clock of the client device and the clock of the master device, and e is the difference between TD, the transmission delay of the first message, and RD, the transmission delay in the other direction of the second message. As a preferred additional feature, the apparatus is located at the first node. As a preferred additional feature, the network is an IP network. As a preferred additional feature, the messages comprise ICMP (Internet Control Message Protocol) timestamp request and reply messages. As a preferred additional feature, the apparatus further comprises means for correcting the first clock to match the second clock. As a preferred additional feature, the apparatus is arranged to carry out the recording of times of transmission and receipt during transmission of user data between the nodes. As a preferred additional feature, the apparatus is arranged to delay user data passing through the first node on the basis of the estimated offset and skew. This is another way of reducing errors or distortion caused by the offset and skew. As a preferred additional feature, the user data is video or audio or multimedia data for presentation to a user from a number of network nodes synchronously, or for recording from a number of network nodes synchronously. Another aspect of the invention provides consumer equipment having an interface for coupling to a network, a first clock, and means for estimating skew and offset of the first clock relative to a second clock at a second node of the network by determining a series of instantaneous offsets at a series of time instants, from the recorded times of transmission and receipt, and determining an estimated offset, and an estimated skew from the series using a statistical method. Other aspects of the invention include methods of estimating the skew and offset, methods of using the skew and offset estimated by this method, methods of synchronizing consumer equipment using the estimated skew and offset, and signals synchronized using the estimated skew and offset. How the present invention may be put into effect will now be described with reference to the appended schematic drawings. Obviously, numerous variations and modifications can be made without departing from the scope of the claims of the present invention. Therefore, it should be clearly understood that the form of the present invention is illustrative only and is not intended to limit the scope of the claims.
The features of the invention will be better understood by reference to the accompanying drawings, which illustrate preferred embodiments of the invention. In the drawings: Fig. 1 shows an example of an ICMP timestamp request/reply, Fig. 2 shows an example of the time flow of an exchange of messages between a client-master pair of nodes, Fig. 3 shows a graph of a normal distribution of values of the difference of delay between the two directions of transmission, Fig. 4 shows a graph of a series of offsets for a series of messages at different times, Fig. 5 shows a flow chart of estimating skew and offset according to an embodiment of the invention, and Fig. 6 shows an application of the estimated skew and offset, for synchronization, according to another embodiment. The present invention will be described with respect to particular embodiments and with reference to certain drawings but the invention is not limited thereto but only by the claims. The drawings described are only schematic and are non-limiting. In the drawings, the size of some of the elements may be exaggerated and not drawn on scale for illustrative purposes. Where the term "comprising" is used in the present description and claims, it does not exclude other elements or steps. Furthermore, the terms first, second, third and the like in the description and in the claims, are used for distinguishing between similar elements and not necessarily for describing a sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances and that the embodiments of the invention described herein are capable of operation in other sequences than described or illustrated herein. Moreover, any such terms as top, bottom, over, under and the like in the description and the claims are used for descriptive purposes and not necessarily for describing relative positions. It is to be understood that the terms so used are interchangeable under appropriate circumstances and that the embodiments of the invention described herein are capable of operation in other orientations than described or illustrated herein. Embodiments of this invention are preferred that concern clock synchronization of devices in an IP based network where the difference between the network reception delay and the network transmission delay is non-negligible but the present invention is not limited thereto. Rather, the present invention can have advantage use in a wide variety of networks comprising nodes linked by communications paths. Having a difference between the network reception delay and the network transmission delay that is non-negligible contrasts with the known Network Time Protocol (RFC 1305) that has traditionally been used to synchronize the clocks of workstations and servers on the Internet, where this difference is assumed to be negligible compared to the accuracy that is aimed for. The estimation of skew and offset starts with measurements of times of transmission and receipt of messages sent between nodes. A client device at a first node of the network sends an ICMP Timestamp Request to a master device at a second node. The master device answers the request and sends an ICMP Timestamp Reply to the client device. Fig. 1 shows the format of an ICMP Timestamp Request/Reply as specified in RFC792. Of interest here is the originate timestamp which is "the time the sender last touched the message before sending it" [RFC792], the receive timestamp which is "the time the echoer first touched it on receipt" [RFC792] and the transmit timestamp which is "the time the echoer last touched the message on sending it" [RFC792]. The time is recorded as a 32bit value with the higher order bit set to one to "indicate this non-standard value"
[RFC792]. The precision of this time value should be equal to that of the most precise clock in this client- master pair. Fig. 2 illustrates the time flow for the exchange of these messages between the client-master pair. A subscript of C on time values indicates the time has been reported by the clock of the client device; a subscript of M on time values indicates the time has been reported by the clock of the master device. Hence OTc is the time of the client sending the first message, RTM is the time of receipt of the first message at the master, and TTM is the time of transmission of the second message from the master. The completion timestamp CT is defined as the time the sender of the ICMP Timestamp request first touched the ICMP Timestamp reply on receipt and the offset O is defined as the offset between the clock of the client device and the clock of the master device. TD is the transmission delay of the first message, RD is the transmission delay in the other direction of the second message, and PD is the processing delay at the master between the first and second messages. The relationships between these times can be stated as follows: CTc - OTc = TD + PD + RD RTu - OTM = TD TTM - RTM = PD OTM = 0Tc + O CTC -OTc = RTM - OTc - 0 + TTu -RTM + RD => CTC = -O + TTM + RD The network reception delay RD can be approximated by the network transmission delay TD, where e is the difference between the delays:
RD = TD + e ^ CTc = -0 + TTM + RTM - OTc-0 + e = CTc = TTM + RTM - OTc - 2 - 0 + e
The instantaneous offset O can thus be found by the following equation: 2 -, σ-c e 2 TTM +RTM 2 ~ 0TC ~ CTC
All values except e (the difference between the network reception delay and the network transmission delay) are known with timestamp time value precision. If e was zero or at least one order of magnitude smaller than the accuracy we wish to achieve (this assumption is the basis of the Network Time Protocol [NTP] which obtains accuracies in the order of a few ms on LANs), the offset O' could be used to precisely synchronize the clock of the client with the clock of the master. For the application of streaming audio channels to speakers over a distribution network like Ethernet however, e will most likely not be negligible compared to the accuracy desired, namely at least 22 microseconds (= 1 sample) for audio sampled at 44.1 kHz. However, since the distribution of e tends to normal for a large number of measurements taken in a network where the conditions remain more or less the same, and since it is centered around zero for measurements taken in a network that is symmetrical in nature, the value of O' can be averaged and thereby the effect of e can be reduced. This is shown in Fig. 3. e « 0
If the skew was zero or negligible, it would have been sufficient to make a large number of measurements to find the average value of O' and use that value as the estimated offset O between the client device and the master device. However, since the skew is non-negligible compared to the desired accuracy, the estimate based on the average value of O' will no longer be representative of the offset O between the client device and the master device. Indeed, the effect of the skew will start to show during the measurements and if it is assumed the drift is negligible (meaning the skew will be constant) the measurements will trend towards a non-horizontal (non-horizontal if the skew is non-zero) straight line over time. Fig. 4 illustrates an example of a set of instantaneous offsets and the resulting best fit line through the set, to derive the estimated offset at OTc and the skew. The line can be derived by various statistical methods, one preferred method involves applying linear regression to the set of samples (0 OTa). A filter could optionally be applied on the values O'i of the collected samples in order to reduce or eliminate noise in the samples. The linear regression to find an estimation of the skew S (= slope of the line) and the offset O (= vertical intersect of the line) for the clock of the client device is as follows: θ'= s-oτc + o
Figure imgf000011_0001
=> O = O - S O with
Figure imgf000011_0002
^ TCi
A suitable value of n, the number of measurements, can be experimentally determined for the type of distribution network that will be used, and for the desired level of accuracy. Below is a pseudo-code illustration of the complete measurement: on the client device: for (i = 0; i < n; i++) { get OTci and send ICMP Timestamp Request; wait for ICMP Timestamp Reply and get CTα; extract TTMJ and RTMJ from ICMP Timestamp Reply; calculate O'J; add (O'j, OTci) to measurement list; } calculate S and O using measurement list;
on the master device: while (client is measuring) { wait for ICMP Timestamp Request and get RTMJJ get TTMi and send ICMP Timestamp Request; } A flow chart of these steps leading to the estimated values of skew and offset is shown in Fig. 5. At step 100, the client at the first node sends the first message with a timestamp request to the second node. In networks where there is more than one master there can be a preliminary step of choosing which master to synchronize to, or choosing to synchronize to an average of multiple masters. At step 110, the client receives the reply, the second message, records the time of receipt, and extracts from it a time of receipt of the first message and a time of transmission of the second message. These are used at step 115 to calculate the instantaneous offset O'j. These measurements are repeated by sending more messages, to build up a list at step 120 of instantaneous values. At step 130, the linear regression is carried out as discussed above, to derive the estimated values of skew and offset. At step 140, more measurements are taken and the estimated values are updated using the more recent measurements. There are a number of different uses for the estimated values. Once the value of the offset O and the skew S have been estimated, the client has enough information (in combination with the originate timestamp OTco of the first measurement) to know with high accuracy how its clock Tc relates to the clock of the master TM at every moment in time i:
Tu l = Tl +0 + {τ,L -OT)- S
This knowledge can be used to continuously synchronize the client to the master. This can involve correcting the clock of the client or involve feeding a PLL or adaptive sample rate converter to delay the data directly, when streaming content. Fig. 6 shows an embodiment in which a first node (the client) is household consumer equipment such as an audio speaker 200. It is connected to receive an audio signal in the form of packets over a household LAN 210 from a second node (the master) which is a Personal Computer PC 220. The LAN can use the household power supply wiring or be a wireless LAN, to overcome the inconvenience of conventional speaker cables. The speaker is accurately synchronized to the PC to avoid the problems described above. The speaker includes a network interface card or chip 230, a packet processing part 240 for recording time of receipt and transmission, and for extracting information from received measurement packets. An estimation part 250 uses the measured times to create the set of offsets and derive the estimated skew and offset, using a statistical method. This can be implemented as discussed above, or in other ways. An audio generator part 260 recreates the audio signal from the received streamed packets, with a clock variation according to the estimated skew and offset. For the speaker, the clock to be synchronized is the first clock 280 used by the audio generator part 260 to produce sound. This will for example typically be 44100 Hz for CD quality sound. This clock is adapted to speed up or slow down the clock time based on the estimated skew and offset of that clock with regards to the master clock. The speeding up or slowing down is a typically small change. The link between the first clock 280 and the audio generator part 260 is provided through estimation part 250. These parts can be implemented in various conventional types of hardware and software depending on the application, following established principles. A single general purpose microprocessor or Application Specific Integrated Circuit can be used to implement the NIC, the packet processing part and the estimation part for example. In order to produce better estimations of the offset O and skew S with fewer measurements, the measurements can be carried out on an idle network right before the content is being streamed. Alternatively, the measurements could be done continuously during the streaming thereby producing updated values of the offset O and skew S at fixed time intervals. The present invention provides several advantages. Being able to accurately synchronize the clocks of devices inside home or other networks is of importance if content is to be streamed in separate channels to separate devices. Not only synchronization between audio channels, but also synchronization between audio and video channels has to be achieved with accuracies that are orders of magnitude higher than that achieved by traditional network synchronization protocols used in the PC environment. The embodiments of the invention described here are able to achieve better accuracies and could therefore be implemented in any consumer electronic devices (and PCs) that stream and receive content inside home networks for example. Network clock synchronization can be implemented with an accuracy that is orders of magnitudes better than traditional network synchronization protocols like NTP by applying a well-defined statistical analysis to a well-defined series of measurements to precisely estimate the skew and offset of the clock of the client. The skilled person will appreciate from the above that skew and offset of a clock at a first node of a network relative to a second clock at a second node is estimated by recording times of transmission and receipt of a series of messages exchanged between the nodes, determining a series of instantaneous offsets at a series of time instants, from the recorded times and deriving offset and skew from the series using a statistical method such as regression, especially linear regression. Accuracy still depends on the skew being fairly constant, the measurements being accurate and well defined, an appropriate number of measurements, and the delays in each direction tending to be symmetric on average. The measurements can be repeated periodically to update the estimates. Apphcations include audio or visual packet data streamed to multiple nodes to enable them to be synchronized so that a user does not perceive distortion from relative delays or delay variation. Other variations can be envisaged by those skilled in the art and are intended to be encompassed by the claims.

Claims

CLAIMS:
1. Apparatus for estimating skew and offset of a first clock (280) at a first node
(200) of a network relative to a second clock (280) at a second node (220) of the network, the apparatus having: means (240) for recording times of transmission and receipt of a series of messages exchanged between the nodes, means (250) for deterrnining a series of instantaneous offsets at a series of time instants, from the recorded times of transmission and receipt, and means (250) for determining an estimated offset, and an estimated skew from the series using a statistical method.
2. The apparatus of claim 1, the statistical method being regression.
3. The apparatus according to claim 2, wherein the regression is linear regression.
4. The apparatus of claim 3, arranged to determine the linear regression using a least squares algorithm.
5. The apparatus of any preceding claim, arranged to repeat the steps to update the set and determine an updated estimated offset and an updated estimated skew.
6. The apparatus of any preceding claim, arranged to determine the instantaneous offset O using the relation:
0 _ TTM + RTM -OTc - CTc + e 2 where OTc is the time of the first node sending a first message to the second node, RTM is the time of receipt of the first message at the second node, TTM is the time of transmission of a second message from the second node, CTc is the time of receipt of the second message at the first node, O is the offset between the clock of the first node and the clock of the second node, and e is the difference between TD the transmission delay of the first message and RD the transmission delay in the other direction of the second message.
7. The apparatus of any preceding claim, the apparatus being incorporated in the first node.
8. The apparatus of any preceding claim, the network being an IP network.
9. The apparatus of any preceding claim, the messages comprising ICMP timestamp request and reply messages.
10. The apparatus of any preceding claim, further comprising means for correcting the first clock to match the second clock.
11. The apparatus of any preceding claim, arranged to carry out the recording of times of transmission and receipt during transmission of user data between the nodes.
12. The apparatus of any preceding claim, having means (260) for delaying user data passing through the first node on the basis of the estimated offset and skew.
13. The apparatus of any preceding claim, the first node being arranged to process user data representing video or audio or multimedia data for presentation to a user from a number of network nodes synchronously, or for recording from a number of network nodes synchronously.
14. Consumer equipment (200) having an interface (230) for coupling to a network (210), a first clock (280), means (250) for estimating skew and offset of the first clock relative to a second clock (270) at a second node (220) of the network by determining a series of instantaneous offsets at a series of time instants, from the recorded times of transmission and receipt, and using a statistical method to determine an estimated offset, and an estimated skew from the series.
15. A method of estimating skew and offset of a first clock at a first node of a network relative to a second clock at a second node of the network by determining (115) a series of instantaneous offsets at a series of time instants, from the recorded times of transmission and receipt, and using a statistical method (130) to deterrnine an estimated offset, and an estimated skew from the series.
16. A method of synchronizing signals received or transmitted by a first node of a network using skew and offset estimated by the method of claim 15.
17. A signal received or transmitted by a first node of a network having a first clock, the signal being synchronized to a second clock at a second node using estimates of skew and offset of the first clock relative to the second clock, estimated by the method of claim 15.
PCT/IB2004/051057 2003-06-30 2004-06-30 High accuracy network clock synchronization Ceased WO2005002100A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
EP03101936 2003-06-30
EP03101936.7 2003-06-30

Publications (1)

Publication Number Publication Date
WO2005002100A1 true WO2005002100A1 (en) 2005-01-06

Family

ID=33547767

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/IB2004/051057 Ceased WO2005002100A1 (en) 2003-06-30 2004-06-30 High accuracy network clock synchronization

Country Status (1)

Country Link
WO (1) WO2005002100A1 (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007055627A1 (en) * 2005-11-14 2007-05-18 Telefonaktiebolaget L M Ericsson (Publ) Generation of clock signal from received packet stream
GB2443868A (en) * 2006-03-21 2008-05-21 Zarlink Semiconductor Ltd Synchronising slave clocks in non-symmetric packet networks
US8139489B2 (en) 2008-08-06 2012-03-20 International Business Machines Corporation Robust jitter-free remote clock offset measuring method
EP2523372A1 (en) 2011-05-09 2012-11-14 British Telecommunications Public Limited Company Content delivery system
US8533355B2 (en) 2009-11-02 2013-09-10 International Business Machines Corporation Techniques for improved clock offset measuring
WO2013144760A1 (en) * 2012-03-29 2013-10-03 Ramot At Tel-Aviv University Ltd Localization, synchronization and navigation using passive sensor networks
ITTO20120740A1 (en) * 2012-08-22 2014-02-23 Selex Elsag Spa METHOD TO SYNCHRONIZE THE KNOTS OF A NETWORK WITH A PACKAGE, NETWORK KNOT AND PACKAGE NETWORK
CN105406932A (en) * 2009-04-29 2016-03-16 瞻博网络公司 Apparatus and Method of Compensating for Clock Frequency and Phase Variations by Processing Packet Delay Values
WO2017212205A1 (en) * 2016-06-10 2017-12-14 Khalifa University Of Science, Technology And Research Methods and systems for skew estimation
AT518674A1 (en) * 2016-06-06 2017-12-15 Sprecher Automation Gmbh Method for the synchronized detection of measured data required for controlling differential protective devices of electrical power lines
US10142088B2 (en) 2014-01-31 2018-11-27 University Of North Dakota Network clock skew estimation and calibration
EP3598247A4 (en) * 2017-03-17 2020-03-04 Hangzhou Hikvision Digital Technology Co., Ltd. NETWORK SYNCHRONIZATION METHOD AND DEVICE
WO2020081564A1 (en) * 2018-10-15 2020-04-23 Bose Corporation Wireless audio synchronization
WO2021018407A1 (en) * 2019-07-31 2021-02-04 Telefonaktiebolaget Lm Ericsson (Publ) Clock synchronization in packet communications networks
CN112684992A (en) * 2020-12-18 2021-04-20 深圳乐播科技有限公司 Method and device for realizing screen-casting playing synchronization and computer main equipment
CN116471211A (en) * 2023-06-19 2023-07-21 威胜信息技术股份有限公司 A precise time synchronization method for power internet of things
EP3231111B1 (en) * 2014-12-11 2024-07-24 Khalifa University of Science and Technology Method and devices for clock synchronization over links with asymmetric transmission rates

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0697774A1 (en) * 1994-08-15 1996-02-21 Hewlett-Packard Company Clock offset estimation
US5802082A (en) * 1995-07-25 1998-09-01 Deutsche Telekom Ag Method and device for measuring cell propagation time in ATM networks
US20020136335A1 (en) * 2000-12-19 2002-09-26 Shih-Ping Liou System and method for clock-synchronization in distributed systems

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0697774A1 (en) * 1994-08-15 1996-02-21 Hewlett-Packard Company Clock offset estimation
US5802082A (en) * 1995-07-25 1998-09-01 Deutsche Telekom Ag Method and device for measuring cell propagation time in ATM networks
US20020136335A1 (en) * 2000-12-19 2002-09-26 Shih-Ping Liou System and method for clock-synchronization in distributed systems

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
LEI GUO ET AL: "Performance analysis of general tracking algorithms", DECISION AND CONTROL, 1994., PROCEEDINGS OF THE 33RD IEEE CONFERENCE ON LAKE BUENA VISTA, FL, USA 14-16 DEC. 1994, NEW YORK, NY, USA,IEEE, US, 14 December 1994 (1994-12-14), pages 2851 - 2855, XP010144672, ISBN: 0-7803-1968-0 *
MILLS D L: "IMPROVED ALGORITHMS FOR SYNCHRONIZING COMPUTER NETWORK CLOCKS", IEEE / ACM TRANSACTIONS ON NETWORKING, IEEE INC. NEW YORK, US, vol. 3, no. 3, 1 June 1995 (1995-06-01), pages 245 - 254, XP000510988, ISSN: 1063-6692 *
TSURU M ET AL: "Estimation of clock offset from one-way delay measurement on asymmetric paths", APPLICATIONS AND THE INTERNET (SAINT) WORKSHOPS, 2002. PROCEEDINGS. 2002 SYMPOSIUM ON NARA, JAPAN 28 JAN.-1 FEB. 2002, LOS ALAMITOS, CA, USA,IEEE COMPUT. SOC, US, 28 January 2002 (2002-01-28), pages 126 - 133, XP010587872, ISBN: 0-7695-1450-2 *

Cited By (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007055627A1 (en) * 2005-11-14 2007-05-18 Telefonaktiebolaget L M Ericsson (Publ) Generation of clock signal from received packet stream
CN101310462B (en) * 2005-11-14 2013-01-02 艾利森电话股份有限公司 Apparatus and method for generating a clock signal from a received packet stream
GB2443868A (en) * 2006-03-21 2008-05-21 Zarlink Semiconductor Ltd Synchronising slave clocks in non-symmetric packet networks
US8139489B2 (en) 2008-08-06 2012-03-20 International Business Machines Corporation Robust jitter-free remote clock offset measuring method
CN105406932A (en) * 2009-04-29 2016-03-16 瞻博网络公司 Apparatus and Method of Compensating for Clock Frequency and Phase Variations by Processing Packet Delay Values
CN105406932B (en) * 2009-04-29 2018-09-18 瞻博网络公司 Device for computer network
US8788689B2 (en) 2009-11-02 2014-07-22 International Business Machines Corporation Techniques for improved clock offset measuring
US8533355B2 (en) 2009-11-02 2013-09-10 International Business Machines Corporation Techniques for improved clock offset measuring
WO2012153081A1 (en) 2011-05-09 2012-11-15 British Telecommunications Plc Content delivery system
EP2523372A1 (en) 2011-05-09 2012-11-14 British Telecommunications Public Limited Company Content delivery system
WO2013144760A1 (en) * 2012-03-29 2013-10-03 Ramot At Tel-Aviv University Ltd Localization, synchronization and navigation using passive sensor networks
US11140645B2 (en) 2012-03-29 2021-10-05 Sulu Networks Ltd. Localization, synchronization and navigation using passive sensor networks
ITTO20120740A1 (en) * 2012-08-22 2014-02-23 Selex Elsag Spa METHOD TO SYNCHRONIZE THE KNOTS OF A NETWORK WITH A PACKAGE, NETWORK KNOT AND PACKAGE NETWORK
US10142088B2 (en) 2014-01-31 2018-11-27 University Of North Dakota Network clock skew estimation and calibration
EP3231111B1 (en) * 2014-12-11 2024-07-24 Khalifa University of Science and Technology Method and devices for clock synchronization over links with asymmetric transmission rates
AT518674A1 (en) * 2016-06-06 2017-12-15 Sprecher Automation Gmbh Method for the synchronized detection of measured data required for controlling differential protective devices of electrical power lines
AT518674B1 (en) * 2016-06-06 2018-02-15 Sprecher Automation Gmbh Method for the synchronized detection of measured data required for controlling differential protective devices of electrical power lines
EP3255820B1 (en) * 2016-06-06 2024-01-24 Sprecher Automation GmbH Method for synchronized capture of measurement data required for controlling differential protection devices of electrical power lines
WO2017212205A1 (en) * 2016-06-10 2017-12-14 Khalifa University Of Science, Technology And Research Methods and systems for skew estimation
EP3598247A4 (en) * 2017-03-17 2020-03-04 Hangzhou Hikvision Digital Technology Co., Ltd. NETWORK SYNCHRONIZATION METHOD AND DEVICE
US10708033B2 (en) 2017-03-17 2020-07-07 Hangzhou Hikvision Digital Technology Co., Ltd. Network time correction method and apparatus
WO2020081564A1 (en) * 2018-10-15 2020-04-23 Bose Corporation Wireless audio synchronization
US10805664B2 (en) 2018-10-15 2020-10-13 Bose Corporation Wireless audio synchronization
WO2021018407A1 (en) * 2019-07-31 2021-02-04 Telefonaktiebolaget Lm Ericsson (Publ) Clock synchronization in packet communications networks
CN112684992A (en) * 2020-12-18 2021-04-20 深圳乐播科技有限公司 Method and device for realizing screen-casting playing synchronization and computer main equipment
CN116471211A (en) * 2023-06-19 2023-07-21 威胜信息技术股份有限公司 A precise time synchronization method for power internet of things
CN116471211B (en) * 2023-06-19 2023-10-13 威胜信息技术股份有限公司 An accurate time synchronization method for the power Internet of Things

Similar Documents

Publication Publication Date Title
US7680153B2 (en) Method and device for stream synchronization of real-time multimedia transport over packet network
WO2005002100A1 (en) High accuracy network clock synchronization
CN102027699B (en) Data transfer method and system for loudspeakers in a digital sound reproduction system
EP1815713B1 (en) Synchronizing multi-channel speakers over a network
US7724780B2 (en) Synchronization of one or more source RTP streams at multiple receiver destinations
CN106162861B (en) Method and apparatus for time synchronization in a wireless network
US7283568B2 (en) Methods, systems and computer program products for synchronizing clocks of nodes on a computer network
US7865760B2 (en) Use of T4 timestamps to calculate clock offset and skew
US7953118B2 (en) Synchronizing media streams across multiple devices
CN101729180A (en) Method and system for synchronizing precision clocks, and precision clock frequency/time synchronizing device
JP2013121014A (en) Time synchronization device and method
JP2004500758A (en) Synchronization of voice packet generation and unsolicited grant in voice telephony with DOCSIS cable modem packets
TWI291300B (en) Method and receiver for use with a communication link, and device for processing frequency
WO2012103702A1 (en) Method and device for detecting 1588 equipment performance
JP2004533769A5 (en)
JP2003179662A5 (en)
WO2014188664A1 (en) Broadcast system, client, synchronization program, and synchronization method
KR101315593B1 (en) Method for synchronizing a client clock frequency with a server clock frequency
CN100474807C (en) Method and device for realizing media gateway synchronization in communication system
CN116155778A (en) Network bidirectional time delay measurement method and device
Melvin et al. Playback synchronization techniques for networked home appliances
JP2002135299A (en) Packet communication system
Melvin et al. An integrated NTP-RTCP solution to audio skew detection and compensation for VoIP applications
Kang et al. Timing and Synchronization with Propagation Delay Symmetry and Originated Slave Clock Frequency for Ubiquitous Computing
EP3080951A1 (en) Method and devices for packet selection

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): BW GH GM KE LS MW MZ NA SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IT LU MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
122 Ep: pct application non-entry in european phase