WO2015049480A1 - Method and devices for time and frequency synchronization - Google Patents

Method and devices for time and frequency synchronization Download PDF

Info

Publication number
WO2015049480A1
WO2015049480A1 PCT/GB2013/052568 GB2013052568W WO2015049480A1 WO 2015049480 A1 WO2015049480 A1 WO 2015049480A1 GB 2013052568 W GB2013052568 W GB 2013052568W WO 2015049480 A1 WO2015049480 A1 WO 2015049480A1
Authority
WO
WIPO (PCT)
Prior art keywords
time
clock
master
slave
counter
Prior art date
Application number
PCT/GB2013/052568
Other languages
French (fr)
Inventor
James Aweya
Original Assignee
Khalifa University of Science, Technology, and Research
British Telecommunications Plc
Emirates Telecommunications Corporation
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 Khalifa University of Science, Technology, and Research, British Telecommunications Plc, Emirates Telecommunications Corporation filed Critical Khalifa University of Science, Technology, and Research
Priority to EP13779332.9A priority Critical patent/EP3053288A1/en
Priority to PCT/GB2013/052568 priority patent/WO2015049480A1/en
Publication of WO2015049480A1 publication Critical patent/WO2015049480A1/en

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter
    • H04L7/02Speed or phase control by the received code signals, the signals containing no special synchronisation information
    • H04L7/033Speed or phase control by the received code signals, the signals containing no special synchronisation information using the transitions of the received signal to control the phase of the synchronising-signal-generating means, e.g. using a phase-locked loop
    • H04L7/0331Speed or phase control by the received code signals, the signals containing no special synchronisation information using the transitions of the received signal to control the phase of the synchronising-signal-generating means, e.g. using a phase-locked loop with a digital phase-locked loop [PLL] processing binary samples, e.g. add/subtract logic for correction of receiver clock

Definitions

  • the present invention relates to methods and devices for time and frequency
  • PTP Precision Time Protocol
  • Time Division Duplexing which uses two separated frequency bands to transmit/receive
  • Time Division Duplexing which transmits and receives on a single frequency band.
  • Time synchronization (in addition to frequency synchronization) is needed for LTE-TDD, WiMAX TDD, CDMA networks (popular in North America), TD-CDMA and TD-SCDMA, while only frequency synchronization is required for LTE-FDD, GSM (global system for mobile communications), W-CDMA, and other wireless technologies.
  • LTE-FDD Frequency Division Duplexing
  • WiMAX TDD Time Division Duplexing
  • CDMA networks popular in North America
  • TD-CDMA and TD-SCDMA while only frequency synchronization is required for LTE-FDD
  • GSM global system for mobile communications
  • W-CDMA Wideband Code Division Duplexing
  • the present invention has particular application to clock synchronization (both time and frequency) over packet networks, specifically with the synchronization of telecom networks.
  • telecom networks require sub microsecond (in fact, nanosecond) level accuracies.
  • Such stringent clock quality levels have traditionally been provided by GPS, atomic clocks, and TDM timing links.
  • ITU-T, IEEE, and other standards bodies have defined special standards to allow packet networks to support the special synchronization needs of telecom networks.
  • One such recent standard that is now widely accepted and adopted by the telecom industry is the IEEE 1588 Precision Timing Protocol (PTP).
  • PTP Precision Timing Protocol
  • IEEE 1588 profile defined for telecom applications.
  • time synchronization for IT computing systems and sensor networks have the same underlying concepts, these systems have different application requirements, protocols, architectures, and implementation goals and therefore considered completely out of scope of telecom synchronization.
  • IEEE 1588 is now the industry accepted packet-based method/standard for distributing timing information from a master to enable the clocks of distributed systems to be synchronized with high precision (accuracies in the nanosecond levels). Its underlying principle is a master/slave concept based on the regular exchange of synchronization messages as shown in Figure 1 , whereby a slave clock 5 in a slave device 3 is synchronized to a master clock 4 in a master device 1 by the exchange of messages over the packet network 2.
  • IEEE 1588 synchronizes all clocks within a network by adjusting clocks to the highest quality clock (GrandMaster clock). IEEE 1588 supports both frequency and time transfer unlike another packet-based technique called Synchronous Ethernet with supports only frequency transfer. IEEE 1588 defines a wide range of synchronization capabilities except the clock recovery mechanisms (servo algorithm, PLL, timers, etc.) to be used at the slave (client) to synchronize its local clock to the master.
  • the clock recovery mechanism is able to process transmitted clock samples (timestamps) encoded within the packet data stream to generate timing signal for the receiver.
  • the purpose of the clock recovery mechanism is to estimate and compensate for the frequency drift occurring between the oscillators of the transmitter clock and the receiver clock.
  • PDV packet delay variation
  • packet losses affects the performance of the clock estimation/compensation process, making the transmitter clock appear faster or slower than it actually is, and ultimately, causing the propagation of mostly wander up to the receiver clock signal.
  • Wander is clock noise less 10 Hz while jitter is clock noise equal or greater than 10 Hz.
  • the time of a single event is called a timestamp and is a real number.
  • IEEE 1588v2 PTP messages are categorized into event and general messages. All IEEE 1588 PTP messages have a common header.
  • Event messages are timed messages in that an accurate timestamp is generated at both transmission and receipt of each message. Event messages have to be accurately timestamped since the accuracy in transmission and receipt timestamps directly affects clock distribution accuracy.
  • General messages are not required to be timestamped.
  • a timestamp event is generated at the time of transmission and reception of any event message.
  • the set of event messages consists of Sync, Delay_Req, Pdelay_Req, and Pdelay_Resp.
  • the set of general messages consists of Announce, Follow_Up, Delay_Resp, Pdelay_Resp_Follow_Up, Management, and Signaling.
  • IEEE 1588 PTP allows for two different types of timestamping methods, either one-step or two-step.
  • One-step clocks update time information within event messages (Sync and Delay-Req) on-the-fly, while two-step clocks convey the precise timestamps of packets in general messages (Follow_Up and Delay-Resp).
  • the Sync, Delay_Req, follow_Up, and Delay_Resp messages are used to generate and communicate the timing information needed to synchronize ordinary and boundary clocks using the delay request-response mechanism.
  • a Sync message is transmitted by a master to its slaves and either contains the exact time of its transmission or is followed by a Follow_Up message containing this time. In a two-step ordinary or boundary clock, the Follow_Up message communicates the value of the departure timestamp for a particular Sync message.
  • a Delay_Req message is a request for the receiving node to return the time at which the Delay_Req message was received, using a Delay_Resp message.
  • the basic pattern of synchronization message exchanges for the two-step clocks are illustrated in Figure 1.
  • the message exchange pattern for the two-step clock can be explained as follows.
  • the master 1 sends a Sync message to the slave 3 and notes the time T1 at which it was sent.
  • the slave 3 receives the Sync message and notes the time of reception T2 according to its local clock 5.
  • the master 1 conveys to the slave the timestamp T1 by one of two ways: 1) Embedding the timestamp T1 in the Sync message (not shown). This requires some sort of hardware processing (i.e., hardware timestamping) for highest accuracy and precision. 2) Embedding the timestamp T1 in a Follow_Up message as shown in Figure 1.
  • the slave 3 sends a Delay_Req message to the master 1 and notes the time T3 at which it was sent.
  • the master 1 receives the Delay_Req message and notes the time of reception T4.
  • the master 1 conveys to the slave 3 the timestamp T4 by embedding it in a Delay_Resp message.
  • the slave 3 At the end of this PTP message exchange, the slave 3 possesses all four timestamps ⁇ T1 , T2, T3, T4 ⁇ . These timestamps may be used to compute the offset of the slave's clock 5 with respect to the master clock 4 and the mean propagation time of messages between the two clocks. The computation of offset and propagation time assumes that the master-to-slave and slave-to-master propagation times are equal - symmetrical communication path.
  • Time/frequency can be transferred in an end-to-end fashion from master 1 to slave 3 without involving the intermediate network nodes 6 as illustrated in Figure 2.
  • the slave 3 is solely responsible for correctly recovering the master clock signal.
  • time/frequency transfer here is more challenging because the slave 3 is exposed to all the PDV generated by the intermediate packet network 2 ( Figure 3 and Figure 4).
  • the processing and buffering of packets in network devices introduces variations in the time latency of packets traversing the packet network 2 that tend to degrade the clock signal transferred.
  • the PDV inherent in packet networks is a primary source of clock noise.
  • the recovered clock from the PTP timing signal at the slave contains clock noise (contributed largely by PDV) that needs to be removed or attenuated.
  • a filtering process is used at the slave to filter out the clock noise, thus generating a "smooth" clock output.
  • methods of the present invention provide for synchronization of the frequency and time of a slave clock using a recursive least squares algorithm.
  • a first aspect of the present invention provides a method of synchronising the frequency and time of a slave clock in a slave device to a master clock in a master device, wherein the master device and the slave device are connected by a network, the method including the steps of: exchanging, between the master device and the slave device, timing messages and timestamps which are: the time of sending of timing messages from the master device according to the master clock; the time of receipt of said timing messages according to the slave clock; the time of sending of said timing messages according to the slave clock; and the time of receipt of said timing messages according to the master clock; estimating the offset and skew of the slave clock compared to the master clock by applying an exponentially weighted recursive least squares algorithm to a state-space formulation of the frequency and time of the slave clock and the timestamps which are treated as noisy observations of the offset and skew of the slave clock in combination with its frequency and time; and adjusting the frequency and time of the slave clock based on the estimated offset and skew to produce a master time estimate
  • timing messages are messages under the IEEE 1588 PTP, for example, Sync, Follow_Up, Delay_Req or Delay_Response messages.
  • the exponentially weighted recursive least squares estimation technique is Kalman Filter like in structure but does not require knowledge of the measurement and process noise statistics as in the traditional Kalman Filter [3].
  • This algorithm can be used to attenuate the clock noise introduced by the packet network to levels commensurate with the clock output requirements of the application.
  • the method of this aspect can therefore provide a timestamp-based clock recovery technique for end-to-end time and frequency distribution over packet networks.
  • This technique requires no assistance from the packet network and is still able to provide sub- microsecond level clock accuracies.
  • the recursive clock offset and skew estimation mechanism can provide both time and frequency signals for use at the slave (time client). Most techniques, typically, provide only one signal type, not both.
  • the estimation technique of this aspect does not require the measurement noise and process noise statistics as is the case in using the traditional Kalman filtering technique.
  • the technique may resemble the Kalman filter in structure.
  • X n is the estimate of the state vector X n which expresses the offset and skew of the slave clock at time n in vector form;
  • a n is the state transition matrix, which, for a two-dimensional state-space in
  • ⁇ ⁇ is the forgetting factor at time n
  • y n is the measurement at time n
  • D n is a known measurement vector derived from the timestamps at time n.
  • the forgetting factor ⁇ ⁇ may be a suitable constant or may be dynamic.
  • the method further includes the steps of: using a digital phase locked loop including a phase detector, a loop filter, a phase accumulator and a counter, processing the master time estimate as follows: on receipt of a first estimate of the master time, initializing the counter; on receipt of subsequent estimates of the master time, detecting, using the phase detector, a phase difference between the output of the counter and the received estimate and producing an error signal representing that difference; filtering the error signal using the loop filter to produce a filtered error signal; controlling the frequency of the phase accumulator using the filtered error signal; and incrementing counter using the output of the phase accumulator, and obtaining a clock frequency of the slave clock which is synchronized to the frequency of the master clock as the output of the phase accumulator.
  • a digital phase locked loop including a phase detector, a loop filter, a phase accumulator and a counter
  • the digital phase locked loop in the slave device can be used to attenuate the clock noise introduced by the network (which may be, for example, a packet network) to levels commensurate with the clock output requirements of the application.
  • the method further includes the step of using the output of the counter as the clock time of the slave clock which is synchronized to the time of the master clock.
  • the digital phase locked loop in this aspect can provide both time and frequency signals for use at the slave (time client). Most techniques, typically, provide only one signal type, not both.
  • the counter output (time signal) can be subsequently formatted into various standard time signals as required.
  • the method of this aspect may further include the step of producing an analog frequency signal from the output of the phase accumulator using a direct digital synthesizer including the steps of: mapping the output of the phase accumulator to produce a digital waveform; and converting said digital waveform to an analog waveform using a digital-to-analog converter.
  • the method may further include the step of low-pass filtering the analog waveform to produce a smoothed waveform.
  • the method may process or condition the output of the phase accumulator in other ways to provide a signal that meets the jitter requirements of the end applications in the slave device.
  • Various forms of signals square wave, sine wave, etc.
  • These signals can be conditioned by another (typically analog) phase locked loop.
  • the timestamps for the time of receipt and of sending of timing messages at/from the slave device are provided by the counter of the digital phase locked loop.
  • the method may further include the steps of: initializing the counter on receipt by the slave device of the first timing message from the master device, and resetting the counter to said first master time estimate on receipt of the first master time estimate.
  • the timestamps for the time of receipt and sending of timing messages at/from the slave device are provided by a second free-running counter.
  • the method of the present aspect may include any combination of some, all or none of the above described preferred and optional features.
  • the method of the above aspect is preferably implemented by a slave device according to the second aspect of this invention or in a system according to the third aspect of this invention, as described below, but need not be.
  • slave devices of the present invention provide for the synchronization of time and frequency of a slave clock by using a using a recursive least squares algorithm.
  • a second aspect of the present invention provides a slave device connected to a master device having a master clock over a network, wherein the slave device includes: a slave clock; and the slave device is arranged to: exchange with the master device, timing messages and to record timestamps which are: the time of sending of said timing messages from the master device according to the master clock; the time of receipt of said timing messages according to the slave clock; the time of sending of said timing messages according to the slave clock; and the time of receipt of said timing messages according to the master clock, estimate the skew and offset of the slave clock relative to the master clock by applying an exponentially weighted recursive least squares algorithm to a state-space formulation of the frequency and time of the slave clock and the timestamps which are treated as noisy observations of the offset and skew of the slave clock in combination with its frequency and time; and synchronize said slave clock to the master clock based on the estimated skew and offset to produce a master time estimate.
  • timing messages are messages under the IEEE 1588 PTP, for example, Sync, Follow_Up, Delay_Req or Delay_Response messages.
  • the exponentially weighted recursive least squares estimation technique is Kalman Filter like in structure but does not require knowledge of the measurement and process noise statistics as in the traditional Kalman Filter [3].
  • This algorithm can be used to attenuate the clock noise introduced by the packet network to levels commensurate with the clock output requirements of the application.
  • the slave device of this aspect can therefore provide a timestamp-based clock recovery technique for end-to-end time and frequency distribution over packet networks.
  • This technique requires no assistance from the packet network and is still able to provide sub- microsecond level clock accuracies.
  • the recursive clock offset and skew estimation mechanism can provide both time and frequency signals for use at the slave (time client). Most techniques, typically, provide only one signal type, not both.
  • the estimation technique of this aspect does not require the measurement noise and process noise statistics as is the case in using the traditional Kalman filtering technique.
  • the technique may resemble the Kalman filter in structure.
  • a preferred form of the exponentially weighted recursive least squares algorithm is as follows:
  • X n is the estimate of the state vector X n which expresses the offset and skew of the slave clock at time n in vector form;
  • a n is the state transition matrix, which, for a two-dimensional state-space in
  • ⁇ ⁇ is the forgetting factor at time n
  • y n is the measurement at time n
  • the slave device includes: a digital phase locked loop including a phase detector, a loop filter, a phase accumulator and a counter, and wherein: the digital phase locked loop processes the master time estimate as follows: on receipt of a first estimate of the master time, the counter is initialised; on receipt of subsequent estimates of the master time, the phase detector is arranged to detect a phase difference between the output of the counter and the received estimate and produce an error signal representing that difference; the error signal is filtered by the loop filter to produce a filtered error signal; the filtered error signal is used to control the frequency of the phase accumulator; and the output of the phase accumulator increments the counter and also provides a clock frequency of the slave clock which is synchronized to the frequency of the master clock.
  • a digital phase locked loop including a phase detector, a loop filter, a phase accumulator and a counter, and wherein: the digital phase locked loop processes the master time estimate as follows: on receipt of a first estimate of the master time, the counter is initialised; on receipt of subsequent estimates of
  • the digital phase locked loop in the slave device can be used to attenuate the clock noise introduced by the network (which may be, for example, a packet network) to levels commensurate with the clock output requirements of the application.
  • the network which may be, for example, a packet network
  • the slave device uses the output of the counter as the clock time of the slave clock which is synchronized to the time of the master clock
  • the slave device of this aspect can therefore provide a timestamp-based clock recovery technique for end-to-end time and frequency distribution over packet networks. This technique requires no assistance from the packet network and is still able to provide sub- microsecond level clock accuracies.
  • the digital phase locked loop can provide both time and frequency signals for use at the slave (time client). Most techniques, typically, provide only one signal type, not both.
  • the counter output (time signal) can be subsequently formatted into various standard time signals as required.
  • the slave device of this aspect may further comprise a direct digital synthesizer producing an analog frequency signal from the output of the phase accumulator, the direct digital synthesizer including: the phase accumulator; an oscillator; a mapping device; and a digital- to-analog converter.
  • the slave device may further comprise a low-pass filter arranged to filter the output of the direct digital synthesizer.
  • the slave device may process or condition the output of the phase accumulator in other ways to provide a signal that meets the jitter requirements of the end applications in the slave device.
  • Various forms of signals square wave, sine wave, etc.
  • These signals can be conditioned by another (typically analog) phase locked loop.
  • the counter of the digital phase locked loop is also used to provide timestamps for the time of receipt and of sending of timing messages at/from the slave device.
  • the counter may be initialized on receipt by the slave device of the first timing message from the master device, and the counter may be reset on receipt of the first master time estimate to said first master time estimate.
  • the slave device further comprises a second free-running counter, wherein the second counter is used to provide timestamps for the time of receipt and sending of timing messages at/from the slave device.
  • the slave device of this aspect preferably operates by carrying out the relevant steps of a method according to the above described first aspect.
  • the slave device of the present aspect may include any combination of some, all or none of the above described preferred and optional features.
  • systems of the present invention provide for the synchronization of time and frequency of a slave clock by using a using a recursive least squares algorithm.
  • a third aspect of the present invention provides a time and frequency synchronisation system for a network, the system including: a master device having a master clock; a slave device having a slave clock; and a network connecting the master and slave devices, wherein the slave device is arranged to: exchange with the master device, timing messages and to record timestamps which are: the time of sending of said timing messages from the master device according to the master clock; the time of receipt of said timing messages according to the slave clock; the time of sending of said timing messages according to the slave clock; and the time of receipt of said timing messages according to the master clock, estimate the skew and offset of the slave clock relative to the master clock by applying an exponentially weighted recursive least squares algorithm to a state-space formulation of the frequency and time of the slave clock and the timestamps which are treated as noisy observations of the offset and skew of the slave clock in combination with its frequency and time; and synchronize said slave clock to the master clock based on the estimated skew and offset to produce a master time estimate.
  • the timing messages are messages under the IEEE 1588 PTP, for example, Sync, Follow_Up, Delay_Req or Delay_Response messages.
  • the exponentially weighted recursive least squares estimation technique is Kalman Filter like in structure but does not require knowledge of the measurement and process noise statistics as in the traditional Kalman Filter [3].
  • This algorithm can be used to attenuate the clock noise introduced by the packet network to levels commensurate with the clock output requirements of the application.
  • the slave device of this aspect can therefore provide a timestamp-based clock recovery technique for end-to-end time and frequency distribution over packet networks. This technique requires no assistance from the packet network and is still able to provide sub- microsecond level clock accuracies.
  • the recursive clock offset and skew estimation mechanism can provide both time and frequency signals for use at the slave (time client). Most techniques, typically, provide only one signal type, not both.
  • the estimation technique of this aspect does not require the measurement noise and process noise statistics as is the case in using the traditional Kalman filtering technique.
  • the technique may resemble the Kalman filter in structure.
  • a preferred form of the exponentially weighted recursive least squares algorithm is as follows:
  • X n is the estimate of the state vector X n which expresses the offset and skew of the slave clock at time n in vector form;
  • a n is the state transition matrix, which, for a two-dimensional state-space in
  • ⁇ ⁇ is the forgetting factor at time n
  • y n is the measurement at time n
  • D n is a known measurement vector derived from the timestamps at time n.
  • the forgetting factor ⁇ ⁇ may be a suitable constant or may be dynamic.
  • the slave device further includes: a digital phase locked loop including a phase detector, a loop filter, a phase accumulator and a counter, and wherein the digital phase locked loop processes the master time estimate as follows: on receipt of a first estimate of the master time, the counter is initialised; on receipt of subsequent estimates of the master time, the phase detector is arranged to detect a phase difference between the output of the counter and the received estimate and produce an error signal representing that difference; the error signal is filtered by the loop filter to produce a filtered error signal; the filtered error signal is used to control the frequency of the phase accumulator; and the output of the phase accumulator increments the counter and also provides a clock frequency of the slave clock which is synchronized to the frequency of the master clock.
  • the digital phase locked loop in the slave device can be used to attenuate the clock noise introduced by the network (which may be, for example, a packet network) to levels commensurate with the clock output requirements of the application.
  • the slave device uses the output of the counter as the clock time of the slave clock which is synchronized to the time of the master clock.
  • the system of this aspect can therefore provide a timestamp-based clock recovery technique for end-to-end time and frequency distribution over packet networks between a master and slave device.
  • This technique requires no assistance from the packet network and is still able to provide sub-microsecond level clock accuracies.
  • the digital phase locked loop can provide both time and frequency signals for use at the slave (time client). Most techniques, typically, provide only one signal type, not both.
  • the counter output (time signal) can be subsequently formatted into various standard time signals as required.
  • the slave device may further comprise a direct digital synthesizer producing an analog frequency signal from the output of the phase accumulator, the direct digital synthesizer including: the phase accumulator; an oscillator; a mapping device; and a digital-to-analog converter.
  • the slave device may further comprise a low-pass filter arranged to filter the output of the direct digital synthesizer.
  • the slave device may process or condition the output of the phase accumulator in other ways to provide a signal that meets the jitter requirements of the end applications in the slave device.
  • Various forms of signals square wave, sine wave, etc.
  • These signals can be conditioned by another (typically analog) phase locked loop.
  • the counter of the digital phase locked loop is also used to provide timestamps for the time of receipt and of sending of timing messages at/from the slave device.
  • the counter may be initialized on receipt by the slave device of the first timing message from the master device, and the counter may be reset on receipt of the first master time estimate to said first master time estimate.
  • the slave device further comprises a second free-running counter, wherein the second counter is used to provide timestamps for the time of receipt and sending of timing messages at/from the slave device.
  • the system of this aspect preferably operates by carrying out a method according to the above described first aspect.
  • the system of the present aspect may include any combination of some, all or none of the above described preferred and optional features.
  • Figure 1 shows the message flow in a two-step clock under IEEE 1588 PTP and has already been described
  • Figure 2 shows end-to-end time/frequency transfer over a network and has already been described
  • Figure 3 shows, in schematic form, the effect of Packet Delay Variation in a packet network and has already been described;
  • Figure 4 shows the effects of Packet Delay Variation on a PTP message stream and has already been described
  • Figure 5 shows simple models of the effect of clock skew on clocks with and without offset
  • Figure 6 shows the calculation process for the estimation sever time at a PTP slave device
  • Figure 7 shows the architecture of a slave device according to an embodiment of the present invention
  • FIG 8 shows the operation of a digital phase locked loop (DPLL) based on a phase accumulator
  • Figure 9 shows the output of the phase accumulator in Figure 8
  • Figure 10 illustrates the synchronization between a master and a slave following
  • FIG 1 1 shows a direct digital synthesizer (DDS) which is used in an embodiment of the present invention
  • Figure 12 shows a DPLL operating in a slave device according to an embodiment of the present invention with time and frequency outputs;
  • DDS direct digital synthesizer
  • Figure 13 shows a PLL model with a direct digital synthesizer
  • Figure 14 shows DPLL measurement and control intervals
  • Figure 15 shows the characteristic operation of a phase detector
  • Figure 16 shows the closed loop control model used to model the operation of a time client according to an embodiment of the present invention
  • Figure 17 shows further details of the closed loop control model of Figure 16
  • Figure 18 is a basic block diagram of an analog phase locked loop
  • Figure 19 shows the characteristics of a direct digital synthesizer and its input mapping function.
  • ⁇ ⁇ and a n are the offset and skew during the nth Sync message exchange.
  • the clock offset can be expressed from (4) as follows
  • the clock deviation of a clock is modeled by the following random differential equation dX(t)
  • ⁇ ( ⁇ ) is the vector of statistically independent zero-mean white Gaussian noises
  • the random differential (8) can be written in the integral form
  • the integral form of (14) in discrete time becomes
  • the variance of the process noise w n is related to the oscillator of local PLL at the slave.
  • the local oscillator is typically a Temperature Compensated Crystal Oscillator (TCXO) or Oven Controlled Crystal Oscillator (OCXO).
  • the exponentially weighted recursive least squares (RLS) technique [4] of the embodiment described below (which has a Kalman Filter-like structure) requires no such noise variance estimates but yields accurate clock parameter estimates like the Kalman Filter with known noise statistics.
  • the model used in this embodiment is based on state-space representations of the variables being estimated.
  • the state-space formulation implies that, at each point in time, the process being modeled is described by a vector of state variables that summarize all relevant quantities of interest.
  • the filtering algorithm to be described below uses this model of the time behavior of the system along with noisy observations or measurements of some system variables to produce optimal estimates of all state variables. These estimates are then used in the process model to determine state estimates for future time periods.
  • n is a nonnegative time index
  • a N is a known M-by-M state transition matrix
  • X n is the M-dimensional state (or parameter) vector
  • w n is an M-dimensional zero mean white process noise vector
  • y n is the measurement
  • D n is a known M-dimensional measurement vector
  • v n is white noise with zero mean and variance ⁇ ⁇ 2 ⁇
  • T denotes transpose.
  • the measurements y n _ t , 0 ⁇ i ⁇ n can be expressed in terms of X n . From the state equation (16), X n _ t can be written as
  • X (H T WH) 1 H T WY , (29) which is an unbiased estimate of X .
  • the matrix W can be set equal to the diagonal matrix
  • X n n denotes an estimate of X based on data up to time n
  • W n is a (n + 1) -by- (n + 1) weight matrix
  • P nn ⁇ H n T W n H n y l
  • the matrix P nn is not a covariance matrix, unlike the case of Kalman filtering.
  • the matrix W n can be expressed as
  • W n n _ ! is a weight matrix.
  • W n n _ l is a weight matrix.
  • Every input including the most recent one y n _ can be properly weighted for one-step prediction.
  • Equations (38), (39), (41), (42), and (43) constitute the RLS algorithm which is summarized in the steps below:
  • X n,n X n,n-l + ⁇ n ( 'n ⁇ X n,n-l )
  • the clock offset ( ⁇ ) and skew ( ⁇ ) can be estimated by the client after each Sync message broadcast by the server or after multiple periods of the Sync message broadcast.
  • the period between Sync messages could serve as sampling period of the system.
  • the server time S can be computed using the local clock C of the client as adjusted for skew and offset as illustrated in Figure 6.
  • Figure 7 shows the main blocks of the proposed synchronization mechanism at the time client.
  • a free running local client oscillator 25 is used together with the estimated clock offset and skew to derive the server clock estimate S .
  • the principal purpose of the architecture shown in Figure 7 is to reconstruct an accurate estimate of both the server time and frequency at the slave. This is done using a Digital Phase Locked Loop (DPLL) 20 that employs a phase accumulator 23, a loop filter 22, a phase detector 21 , and a counter 24 as shown in Figure 8.
  • the local assist hardware clock 25 (with free-running counter) is used only for timestamping PTP messages.
  • the free- running counter can be initialized with first arriving Sync message at the slave.
  • the DPLL 20 is controlled in such a way that the overflow pulses of the phase accumulator 23 drive the counter 24 as shown in Figure 9. In the locked mode, the DPLL counter 24 generates a continuous server time signal while the phase accumulator overflow pulses generate a server frequency signal.
  • the DPLL 20 waits for the first computed server time estimate ( S(0) ).
  • This error signal ( e(n) ) is sent to the loop filter 21 whose output controls the frequency of the phase accumulator 23.
  • the output (overflow pulses) of the phase accumulator 23 in turn provides the clock frequency of the slave and also drives the DPLL counter 24. After a while the error term is expected to converge to zero which means the DPLL 20 has been locked to the incoming master time base (in both frequency and time).
  • the DPLL counter 24 is incremented by the nominal period of the phase accumulator overflow pulse (e.g. , 8 ns for a 125 MHz nominal phase accumulator overflow output frequency).
  • the DPLL 20 is controlled in such a way that the DPLL counter evolution follows the computed server time estimate as illustrated in Figure 10.
  • the timing of the increment (controlled by the phase accumulator overflow input word) is controlled such that the increment falls along the master clock time base.
  • the DPLL 20 provides both a frequency signal (output of phase accumulator 23 overflow) and time signal (output of DPLL counter 24).
  • the frequency signal can then be conditioned using other techniques as shown in Figures 11 and 12 to provide a signal that meets the jitter requirements of the end applications.
  • Various forms of signals square wave, sine wave, etc.
  • the signals can be conditioned by another analog PLL (APLL) for use by the end application.
  • APLL analog PLL
  • the DPLL counter output time signal
  • FIG. 7 and 8 can be implemented with either two separate counters (free-running counter and DPLL counter) or one counter (DPLL counter only). Both architectures can be used to synthesize both time and frequency signals:
  • This counter is used only for timestamping PTP messages. It can be initialized with first arriving Sync message at the slave. Its initial value can also be user configured.
  • This counter provides a continuous time signal for the slave locked to master. It is initialized with the first computed server time estimate by the slave.
  • the DPLL starts in open-loop mode.
  • the DPLL counter is initialized with first arriving Sync message. This can also be a user configured initial value.
  • the phase accumulator 23 is a variable-modulus counter that increments the number stored in it each time it receives a clock pulse. When the counter overflows it wraps around, making the phase accumulator's output contiguous. The larger the added increment ⁇ , the faster the accumulator overflows, which results in a higher output frequency.
  • the output frequency f DDS of the phase accumulator is a function of the system clock frequency f o , the number of bits q in the phase accumulator and the phase increment value ⁇ .
  • the phase increment ⁇ is an unsigned value.
  • the phase accumulator 23 can be employed, if needed, as part of a Direct Digital Synthesizer (DDS) 30 from which an analog signal can be generated as shown in Figures 1 1 and 12.
  • DDS Direct Digital Synthesizer
  • the conventional DDS architecture can be viewed as a simple assembly comprised of only three common digital components: a phase accumulator 23 (or adder/accumulator), a mapping device 26 (such as a read-only-memory (ROM) or random-access memory (RAM)), and a digital-to-analog converter (DAC) 27.
  • a low-pass filter 28 is implemented at the output of the DAC but this component is not normally considered a part of the DDS.
  • the reference clock f 0 must operate at higher frequency than the synthesized clock because of Nyquist theorem.
  • the model is a set of mathematical relationships among the system variables. Because the system under consideration is dynamic in nature, the descriptive equations are usually differential (or difference) equations. The model or the set of differential equations describe the dynamic behavior of the system. The differential equations developed in modeling are often nonlinear. Because they are significantly more challenging to solve than linear ones, linear models are usually adequate. Linearization is the process of finding a linear model that approximates a nonlinear one. Both analysis and control design are far easier for linear than nonlinear models.
  • the Laplace transform can be utilized in order to simplify the method of solution.
  • the complexity of systems and the lack of complete knowledge of all the relevant factors necessitate the introduction of assumptions concerning the system operation. Therefore we shall find it useful to consider the physical system, delineate some necessary assumptions, and linearize the system. Then utilizing mathematical tool such as the Laplace transform, we obtain a solution describing the operation of the system.
  • a phase locked look is essentially a feedback control system as shown in Figure 12 and simplified to its components as "black box” operations in Figure 13.
  • mathematical models e.g., in the form of transfer functions
  • PD phase detector
  • the z-transform technique is employed to analyze the general tracking (i.e., steady-state) behavior of the PLL.
  • the phase error samples are small and the general nonlinear difference equation can be approximated by a linear one which can be solved by the z-transform technique. It is noted in that when the PLL has acquired lock and is not pulled out by large phase steps, frequency steps, or phase noise applied to its reference input, its performance can be analyzed by a linear model.
  • the PLL as a feedback control system can be simplified as linear feedback control system. This assumption is reasonable for most applications since a real PLL has a bounded and limited locking range (expressed in parts-per-million, ppm, of the nominal operating frequency), outside of which locking cannot be guaranteed.
  • the small signal linear analysis for the PLL is therefore useful for studying steady-state equilibrium behavior and stability properties under these same conditions.
  • control models are developed for the phase detector 21 , the controlled oscillator and, given some general structure of the loop filter 22, the PLL as a whole.
  • the analysis will further provide design procedures for determining the parameters of the loop filter 22 that will meet certain pre- specified design and performance requirements.
  • the DDS appears in the digital PLL as a digital integrator, just as the VCO appears as an analog integrator in the analog PLL.
  • T is defined as the nominal time interval between S estimation and as the sampling interval of the DPLL at the time client.
  • the interval T which is the reference operating interval for measurement and control at the DPLL 20, is equivalent to 2 ⁇ radians or M nominal client clock ticks (see Figure 14).
  • the estimate of the server time at the client at local clock time L clock is denoted as S ⁇ L dock ) .
  • phase error range [-2 ⁇ ,2 ⁇ ] maps to the error range [-M,M] .
  • the error signal output e(n) is then passed to the loop filter G LF ⁇ z) to be processed into the filtered error e (n) .
  • the transfer function of the PD is given as
  • E(z) and ® e (z) are the z-transforms of e(z) and ⁇ ⁇ ( ⁇ ) , respectively.
  • filters that can be used as the loop filter 22.
  • the digital loop filter 22 could be implemented as a proportional plus integral (PI) filter having transfer function G LF ⁇ z) given by
  • E(z) is the z-transform of the filter output e (n)
  • K x and K 2 are the proportional and integral path gains, respectively.
  • the loop filter being a PI filter yields a second-order PLL.
  • the proportional gain K x and the integral gain K 2 determine the filter response.
  • the filter gains K and K 2 can be adjusted dynamically on the fly, with greater gain in the startup process for fast locking (acquisition mode) and smaller gain in steady-state for better stability and steady-state error (tracking mode).
  • the DPLL 20 with a well-designed loop filter 22 can eventually eliminate the phase difference and make the controlled oscillator output phase and frequency lock to the reference.
  • Figure 16 and 17 show the DPLL 20 as a closed-loop feedback control system.
  • This section describes a method for synthesizing a DPLL using standard control theory principles.
  • the design is based on the digitization of a continuous-time system whereby the s-plane poles and zeros of a specified differential equation are mapped to the z-plane poles and zeros of a corresponding difference equation using the matched pole-zero (MPZ) method.
  • MPZ pole-zero
  • the analog or continuous-time PLL 40 (see Figure 18) consists of a phase detector 41 , a loop filter 42 and voltage controlled oscillator (VCO) 43.
  • the phase detector 41 can simply be represented by a constant gain K PD .
  • the loop filter 42 can be specified in Laplace domain as F(s) .
  • ® vc0 (s) , ® s (s) , and ® e (s) are the Laplace transforms of the VCO phase 0 vco (t) , reference signal phase 0 s (t) , and phase error 0 e (t) , respectively.
  • the order of the loop is equal to the number of perfect integrators within the loop structure. Since the VCO 43 is modeled as a perfect integrator the loop is at least of order 1 . If the loop filter 42 contains one perfect integrator, then the loop is of order 2.
  • the order of the loop can be shown to greatly influence the steady-state performance of the loop.
  • the steady-state error is defined as the deviation of the VCO phase from the reference after the transient response has died out.
  • the steady-state error is simply /3 ⁇ 4( ⁇ ) . It can be shown by means of (60) that a first-order loop or higher will track an initial phase offset with zero steady-state error. Moreover, a second-order system is required to track a frequency step, while a third-order loop must be employed to track an accelerating phase with zero steady- state error.
  • ⁇ ⁇ and ⁇ are the natural frequency and damping factors, respectively, and are specified in terms of K PD , K vc0 , ⁇ and r 2 as
  • the transient response of the closed-loop system is increasingly oscillatory as the poles approach the imaginary axis when ⁇ approaches zero.
  • the above model can be directly applied to the PLL in the continuous-time domain. But for systems based on sampled data, discrete-time models have to be used.
  • a linearized, time-invariant, approximate transfer function for the entire PLL 40 can be derived based on the conditions that nonlinearity of the system quantization is neglected.
  • the z-domain representation of the PD 41 , loop filter 42 and the controlled oscillator 43 are given, respectively, as
  • K 2 (K l + K 2 )z - K l
  • the matched pole-zero (MPZ) method will now be applied to the H(s) to obtain a discrete- time system H 2 (z) that is of form (or relates to the discrete transfer function) H(z) . From this relationship, we will derive closed form expressions for the loop filter gains K x and K 2 .
  • the goal here is to map the system that meets the performance requirements specified by ⁇ ⁇ and damping factor ⁇ to a corresponding model in the z-domain.
  • the MPZ method directly maps the s-plane poles and zeros of an analog system to the corresponding z-plane poles and zeros of a discrete-time system.
  • MMPZ Modified-MPZ
  • K DC is the DC or low-frequency gain of H 2 (z) .
  • the Final Value Theorem is often used to find the steady state value of a time function given its Laplace transform or z-transform.
  • limj (i) limsX(s) , (72) f-> ⁇ s-»0
  • X ⁇ s is the Laplace transform of x ⁇ t) and as long as all the poles of sX ⁇ s) are in the left half-plane (LHP) of the s-plane.
  • LHP left half-plane
  • the theorem can also be use to find the DC gain of a system.
  • the DC gain is the ratio of the output of a system to inputs (input presumed constant) after all transients have decayed. To find the DC gain, we assume there is a unit step input and use the Final Value Theorem to compute the steady state value of the output. Therefore for a system with transfer function G(s) , the DC gain is defined as
  • the transfer function H 2 (z) can further be expressed as
  • the setting time, t set is defined as the time it takes for the system transients to decay.
  • t set is also referred to as the locking time.
  • the setting time for the second-order system with 0 ⁇ ⁇ ⁇ 1 , the setting time (for the system to settle within 1 % of the input amplitude) is given by
  • the damping ratios in PLLs and clocks in telecom systems typically have gain peaking of 0.1 dB or 0.2 dB, respectively (corresponding to damping ratios of 4.3188 and 2.9585, respectively). This makes telecom synchronization overdamped systems.
  • the loop bandwidth B w , damping ratio ⁇ , and natural frequency ⁇ ⁇ are related by
  • B w and ⁇ the natural frequency ⁇ ⁇
  • K x and K 2 can easily be determined from the above equations.
  • 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 computer system has a monitor to provide a visual output display (for example in the design of the business process).
  • 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 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 non-transitory 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.

Abstract

This invention relates to methods and devices for time and frequency synchronization, especially over packet networks using, for example, the IEEE 1588 Precision Time Protocol (PTP). Timing protocol messages are exposed to artifacts in the network such as packet delay variations (PDV) or packet losses. Embodiments of the invention provide a recursive least squares mechanism for clock offset and skew estimation. A major potential advantage of such estimation is that it does not require knowledge of the statistics of the measurement noise and process noise. An implementation using a digital phase locked loop based on direct digital synthesis to provide both time and frequency signals for use at the slave (time client) is also provided.

Description

METHOD AND DEVICES FOR TIME AND FREQUENCY SYNCHRONIZATION Field of the Invention
The present invention relates to methods and devices for time and frequency
synchronization. It is particularly, but not exclusively, concerned with time and frequency synchronization over packet networks using, for example, the IEEE 1588 Precision Time Protocol (PTP).
Background of the Invention
Mobile networks fall into two categories, Frequency Division Duplexing (FDD), which uses two separated frequency bands to transmit/receive, and Time Division Duplexing (TDD), which transmits and receives on a single frequency band. Time synchronization (in addition to frequency synchronization) is needed for LTE-TDD, WiMAX TDD, CDMA networks (popular in North America), TD-CDMA and TD-SCDMA, while only frequency synchronization is required for LTE-FDD, GSM (global system for mobile communications), W-CDMA, and other wireless technologies. Even with the use of LTE-FDD, new LTE mobile services such as network MIMO and location-based services will demand accurate time synchronization.
The present invention has particular application to clock synchronization (both time and frequency) over packet networks, specifically with the synchronization of telecom networks. Unlike IT computing systems and sensor networks, which require millisecond level accuracies to operate well, telecom networks require sub microsecond (in fact, nanosecond) level accuracies. Such stringent clock quality levels have traditionally been provided by GPS, atomic clocks, and TDM timing links. For these reasons, the ITU-T, IEEE, and other standards bodies have defined special standards to allow packet networks to support the special synchronization needs of telecom networks. One such recent standard that is now widely accepted and adopted by the telecom industry is the IEEE 1588 Precision Timing Protocol (PTP). There is even a special IEEE 1588 profile defined for telecom applications. Even though time synchronization for IT computing systems and sensor networks have the same underlying concepts, these systems have different application requirements, protocols, architectures, and implementation goals and therefore considered completely out of scope of telecom synchronization.
IEEE 1588 is now the industry accepted packet-based method/standard for distributing timing information from a master to enable the clocks of distributed systems to be synchronized with high precision (accuracies in the nanosecond levels). Its underlying principle is a master/slave concept based on the regular exchange of synchronization messages as shown in Figure 1 , whereby a slave clock 5 in a slave device 3 is synchronized to a master clock 4 in a master device 1 by the exchange of messages over the packet network 2.
IEEE 1588 synchronizes all clocks within a network by adjusting clocks to the highest quality clock (GrandMaster clock). IEEE 1588 supports both frequency and time transfer unlike another packet-based technique called Synchronous Ethernet with supports only frequency transfer. IEEE 1588 defines a wide range of synchronization capabilities except the clock recovery mechanisms (servo algorithm, PLL, timers, etc.) to be used at the slave (client) to synchronize its local clock to the master.
In the case where clock transfers have to be done end-to-end with no assistance from the packet network (for example in the form of hop-by-hop Boundary Clocks (BCs) [1][2] or Transparent Clocks (TCs)), there are no reference clocks traceable to a Primary Reference Clock (PRC) at both ends of the packet network, or in the absence of a network-wide GPS service, a receiving timing-dependent terminal node has to use an adaptive timing technique to reconstruct the timing signal of the transmitting timing reference source. The receiving terminal would commonly use a "packet- based" clock recovery mechanism that slaves the receiver clock to a transmitter clock. The clock recovery mechanism is able to process transmitted clock samples (timestamps) encoded within the packet data stream to generate timing signal for the receiver. The purpose of the clock recovery mechanism is to estimate and compensate for the frequency drift occurring between the oscillators of the transmitter clock and the receiver clock. However, the presence of packet delay variation (PDV) and packet losses affects the performance of the clock estimation/compensation process, making the transmitter clock appear faster or slower than it actually is, and ultimately, causing the propagation of mostly wander up to the receiver clock signal. Wander is clock noise less 10 Hz while jitter is clock noise equal or greater than 10 Hz.
Basics of IEEE 1588 PTP
A clock whether physical or virtual can be used to associate an event with time. The time of a single event is called a timestamp and is a real number. In IEEE 1588v2 PTP messages are categorized into event and general messages. All IEEE 1588 PTP messages have a common header. Event messages are timed messages in that an accurate timestamp is generated at both transmission and receipt of each message. Event messages have to be accurately timestamped since the accuracy in transmission and receipt timestamps directly affects clock distribution accuracy. General messages are not required to be timestamped. A timestamp event is generated at the time of transmission and reception of any event message. The set of event messages consists of Sync, Delay_Req, Pdelay_Req, and Pdelay_Resp. The set of general messages consists of Announce, Follow_Up, Delay_Resp, Pdelay_Resp_Follow_Up, Management, and Signaling. IEEE 1588 PTP allows for two different types of timestamping methods, either one-step or two-step. One-step clocks update time information within event messages (Sync and Delay-Req) on-the-fly, while two-step clocks convey the precise timestamps of packets in general messages (Follow_Up and Delay-Resp).
The Sync, Delay_Req, Follow_Up, and Delay_Resp messages are used to generate and communicate the timing information needed to synchronize ordinary and boundary clocks using the delay request-response mechanism. A Sync message is transmitted by a master to its slaves and either contains the exact time of its transmission or is followed by a Follow_Up message containing this time. In a two-step ordinary or boundary clock, the Follow_Up message communicates the value of the departure timestamp for a particular Sync message. A Delay_Req message is a request for the receiving node to return the time at which the Delay_Req message was received, using a Delay_Resp message.
The basic pattern of synchronization message exchanges for the two-step clocks are illustrated in Figure 1. The message exchange pattern for the two-step clock can be explained as follows. The master 1 sends a Sync message to the slave 3 and notes the time T1 at which it was sent. The slave 3 receives the Sync message and notes the time of reception T2 according to its local clock 5. The master 1 conveys to the slave the timestamp T1 by one of two ways: 1) Embedding the timestamp T1 in the Sync message (not shown). This requires some sort of hardware processing (i.e., hardware timestamping) for highest accuracy and precision. 2) Embedding the timestamp T1 in a Follow_Up message as shown in Figure 1. Next, the slave 3 sends a Delay_Req message to the master 1 and notes the time T3 at which it was sent. The master 1 receives the Delay_Req message and notes the time of reception T4. The master 1 conveys to the slave 3 the timestamp T4 by embedding it in a Delay_Resp message.
At the end of this PTP message exchange, the slave 3 possesses all four timestamps {T1 , T2, T3, T4}. These timestamps may be used to compute the offset of the slave's clock 5 with respect to the master clock 4 and the mean propagation time of messages between the two clocks. The computation of offset and propagation time assumes that the master-to-slave and slave-to-master propagation times are equal - symmetrical communication path.
Time/frequency can be transferred in an end-to-end fashion from master 1 to slave 3 without involving the intermediate network nodes 6 as illustrated in Figure 2. In this scenario the slave 3 is solely responsible for correctly recovering the master clock signal. Compared to the other methods (e.g., using hop-by-hop Boundary Clocks or Transparent Clocks), time/frequency transfer here is more challenging because the slave 3 is exposed to all the PDV generated by the intermediate packet network 2 (Figure 3 and Figure 4). The processing and buffering of packets in network devices (switches, routers, etc.) introduces variations in the time latency of packets traversing the packet network 2 that tend to degrade the clock signal transferred. The PDV inherent in packet networks is a primary source of clock noise. The recovered clock from the PTP timing signal at the slave contains clock noise (contributed largely by PDV) that needs to be removed or attenuated. A filtering process is used at the slave to filter out the clock noise, thus generating a "smooth" clock output. Summary of the Invention
Accordingly, at their broadest, methods of the present invention provide for synchronization of the frequency and time of a slave clock using a recursive least squares algorithm.
A first aspect of the present invention provides a method of synchronising the frequency and time of a slave clock in a slave device to a master clock in a master device, wherein the master device and the slave device are connected by a network, the method including the steps of: exchanging, between the master device and the slave device, timing messages and timestamps which are: the time of sending of timing messages from the master device according to the master clock; the time of receipt of said timing messages according to the slave clock; the time of sending of said timing messages according to the slave clock; and the time of receipt of said timing messages according to the master clock; estimating the offset and skew of the slave clock compared to the master clock by applying an exponentially weighted recursive least squares algorithm to a state-space formulation of the frequency and time of the slave clock and the timestamps which are treated as noisy observations of the offset and skew of the slave clock in combination with its frequency and time; and adjusting the frequency and time of the slave clock based on the estimated offset and skew to produce a master time estimate.
Preferably the timing messages are messages under the IEEE 1588 PTP, for example, Sync, Follow_Up, Delay_Req or Delay_Response messages.
The exponentially weighted recursive least squares estimation technique is Kalman Filter like in structure but does not require knowledge of the measurement and process noise statistics as in the traditional Kalman Filter [3]. This algorithm can be used to attenuate the clock noise introduced by the packet network to levels commensurate with the clock output requirements of the application.
The method of this aspect can therefore provide a timestamp-based clock recovery technique for end-to-end time and frequency distribution over packet networks. This technique requires no assistance from the packet network and is still able to provide sub- microsecond level clock accuracies. The recursive clock offset and skew estimation mechanism can provide both time and frequency signals for use at the slave (time client). Most techniques, typically, provide only one signal type, not both.
The estimation technique of this aspect does not require the measurement noise and process noise statistics as is the case in using the traditional Kalman filtering technique. Other than not requiring the noise statistics, the technique may resemble the Kalman filter in structure.
A preferred form of the exponentially weighted recursive least squares algorithm is as follows:
a) initializing the algorithm by setting:
Figure imgf000006_0001
PQ _j = γ l7 , γ is a small positive constant
n = l
b) setting the state prediction for the current time n as:
Figure imgf000006_0002
c) calculating:
Figure imgf000006_0003
d) calculating the Kalman gain vector:
Figure imgf000006_0004
+1
e) updating the state estimate: f) calcul
Figure imgf000006_0005
g) incrementing n: n = n + 1
h) repeating from b) above,
wherein:
Xn is the estimate of the state vector Xn which expresses the offset and skew of the slave clock at time n in vector form;
An is the state transition matrix, which, for a two-dimensional state-space in
1 Δί
discrete time, can be approximated as A * Φ(Δί) = where Δί is the sampling time;
0 1
λη is the forgetting factor at time n;
yn is the measurement at time n; and
Dn is a known measurement vector derived from the timestamps at time n.
The forgetting factor λη may be a suitable constant or may be dynamic.
Preferably the method further includes the steps of: using a digital phase locked loop including a phase detector, a loop filter, a phase accumulator and a counter, processing the master time estimate as follows: on receipt of a first estimate of the master time, initializing the counter; on receipt of subsequent estimates of the master time, detecting, using the phase detector, a phase difference between the output of the counter and the received estimate and producing an error signal representing that difference; filtering the error signal using the loop filter to produce a filtered error signal; controlling the frequency of the phase accumulator using the filtered error signal; and incrementing counter using the output of the phase accumulator, and obtaining a clock frequency of the slave clock which is synchronized to the frequency of the master clock as the output of the phase accumulator.
The digital phase locked loop in the slave device can be used to attenuate the clock noise introduced by the network (which may be, for example, a packet network) to levels commensurate with the clock output requirements of the application. Preferably the method further includes the step of using the output of the counter as the clock time of the slave clock which is synchronized to the time of the master clock.
The digital phase locked loop in this aspect can provide both time and frequency signals for use at the slave (time client). Most techniques, typically, provide only one signal type, not both. The counter output (time signal) can be subsequently formatted into various standard time signals as required.
The method of this aspect may further include the step of producing an analog frequency signal from the output of the phase accumulator using a direct digital synthesizer including the steps of: mapping the output of the phase accumulator to produce a digital waveform; and converting said digital waveform to an analog waveform using a digital-to-analog converter. The method may further include the step of low-pass filtering the analog waveform to produce a smoothed waveform.
The method may process or condition the output of the phase accumulator in other ways to provide a signal that meets the jitter requirements of the end applications in the slave device. Various forms of signals (square wave, sine wave, etc.) with interface form factors can be constructed from the phase accumulator overflow output. These signals can be conditioned by another (typically analog) phase locked loop.
In one embodiment, the timestamps for the time of receipt and of sending of timing messages at/from the slave device are provided by the counter of the digital phase locked loop.
In this embodiment, the method may further include the steps of: initializing the counter on receipt by the slave device of the first timing message from the master device, and resetting the counter to said first master time estimate on receipt of the first master time estimate.
In an alternative embodiment, the timestamps for the time of receipt and sending of timing messages at/from the slave device are provided by a second free-running counter.
The method of the present aspect may include any combination of some, all or none of the above described preferred and optional features.
The method of the above aspect is preferably implemented by a slave device according to the second aspect of this invention or in a system according to the third aspect of this invention, as described below, but need not be.
Further aspects of the present invention include computer for running on computer systems which carry out the methods of the above aspect, including some, all or none of the preferred and optional features of that aspect. At their broadest, slave devices of the present invention provide for the synchronization of time and frequency of a slave clock by using a using a recursive least squares algorithm.
A second aspect of the present invention provides a slave device connected to a master device having a master clock over a network, wherein the slave device includes: a slave clock; and the slave device is arranged to: exchange with the master device, timing messages and to record timestamps which are: the time of sending of said timing messages from the master device according to the master clock; the time of receipt of said timing messages according to the slave clock; the time of sending of said timing messages according to the slave clock; and the time of receipt of said timing messages according to the master clock, estimate the skew and offset of the slave clock relative to the master clock by applying an exponentially weighted recursive least squares algorithm to a state-space formulation of the frequency and time of the slave clock and the timestamps which are treated as noisy observations of the offset and skew of the slave clock in combination with its frequency and time; and synchronize said slave clock to the master clock based on the estimated skew and offset to produce a master time estimate.
Preferably the timing messages are messages under the IEEE 1588 PTP, for example, Sync, Follow_Up, Delay_Req or Delay_Response messages.
The exponentially weighted recursive least squares estimation technique is Kalman Filter like in structure but does not require knowledge of the measurement and process noise statistics as in the traditional Kalman Filter [3]. This algorithm can be used to attenuate the clock noise introduced by the packet network to levels commensurate with the clock output requirements of the application.
The slave device of this aspect can therefore provide a timestamp-based clock recovery technique for end-to-end time and frequency distribution over packet networks. This technique requires no assistance from the packet network and is still able to provide sub- microsecond level clock accuracies. The recursive clock offset and skew estimation mechanism can provide both time and frequency signals for use at the slave (time client). Most techniques, typically, provide only one signal type, not both.
The estimation technique of this aspect does not require the measurement noise and process noise statistics as is the case in using the traditional Kalman filtering technique.
Other than not requiring the noise statistics, the technique may resemble the Kalman filter in structure. A preferred form of the exponentially weighted recursive least squares algorithm is as follows:
a) initializing the algorithm by setting:
Figure imgf000010_0001
PQ _l = γ7 , γ is a small positive constant
n = l
b) setting the state prediction for the current time n as:
Figure imgf000010_0002
c) calculating:
Figure imgf000010_0003
d) calculating the Kalman gain vector:
Figure imgf000010_0004
e) updating the state estimate:
Figure imgf000010_0005
)
f) calcu
Figure imgf000010_0006
g) incrementing n:
n = n + 1
h) repeating from b) above,
wherein:
Xn is the estimate of the state vector Xn which expresses the offset and skew of the slave clock at time n in vector form;
An is the state transition matrix, which, for a two-dimensional state-space in
1 At
discrete time, can be approximated as i * Φ(Αΐ) where Δί is the sampling time;
0 1
λη is the forgetting factor at time n;
yn is the measurement at time n; and
Dn is a known measurement vector derived from the timestamps at time n. The forgetting factor λη may be a suitable constant or may be dynamic. Preferably, the slave device according to further includes: a digital phase locked loop including a phase detector, a loop filter, a phase accumulator and a counter, and wherein: the digital phase locked loop processes the master time estimate as follows: on receipt of a first estimate of the master time, the counter is initialised; on receipt of subsequent estimates of the master time, the phase detector is arranged to detect a phase difference between the output of the counter and the received estimate and produce an error signal representing that difference; the error signal is filtered by the loop filter to produce a filtered error signal; the filtered error signal is used to control the frequency of the phase accumulator; and the output of the phase accumulator increments the counter and also provides a clock frequency of the slave clock which is synchronized to the frequency of the master clock.
The digital phase locked loop in the slave device can be used to attenuate the clock noise introduced by the network (which may be, for example, a packet network) to levels commensurate with the clock output requirements of the application.
Preferably the slave device uses the output of the counter as the clock time of the slave clock which is synchronized to the time of the master clock
The slave device of this aspect can therefore provide a timestamp-based clock recovery technique for end-to-end time and frequency distribution over packet networks. This technique requires no assistance from the packet network and is still able to provide sub- microsecond level clock accuracies. The digital phase locked loop can provide both time and frequency signals for use at the slave (time client). Most techniques, typically, provide only one signal type, not both.
The counter output (time signal) can be subsequently formatted into various standard time signals as required.
The slave device of this aspect may further comprise a direct digital synthesizer producing an analog frequency signal from the output of the phase accumulator, the direct digital synthesizer including: the phase accumulator; an oscillator; a mapping device; and a digital- to-analog converter. The slave device may further comprise a low-pass filter arranged to filter the output of the direct digital synthesizer.
The slave device may process or condition the output of the phase accumulator in other ways to provide a signal that meets the jitter requirements of the end applications in the slave device. Various forms of signals (square wave, sine wave, etc.) with interface form factors can be constructed from the phase accumulator overflow output. These signals can be conditioned by another (typically analog) phase locked loop.
In one embodiment, the counter of the digital phase locked loop is also used to provide timestamps for the time of receipt and of sending of timing messages at/from the slave device.
In this embodiment the counter may be initialized on receipt by the slave device of the first timing message from the master device, and the counter may be reset on receipt of the first master time estimate to said first master time estimate.
In an alternative embodiment, the slave device further comprises a second free-running counter, wherein the second counter is used to provide timestamps for the time of receipt and sending of timing messages at/from the slave device.
The slave device of this aspect preferably operates by carrying out the relevant steps of a method according to the above described first aspect.
The slave device of the present aspect may include any combination of some, all or none of the above described preferred and optional features.
At their broadest, systems of the present invention provide for the synchronization of time and frequency of a slave clock by using a using a recursive least squares algorithm.
A third aspect of the present invention provides a time and frequency synchronisation system for a network, the system including: a master device having a master clock; a slave device having a slave clock; and a network connecting the master and slave devices, wherein the slave device is arranged to: exchange with the master device, timing messages and to record timestamps which are: the time of sending of said timing messages from the master device according to the master clock; the time of receipt of said timing messages according to the slave clock; the time of sending of said timing messages according to the slave clock; and the time of receipt of said timing messages according to the master clock, estimate the skew and offset of the slave clock relative to the master clock by applying an exponentially weighted recursive least squares algorithm to a state-space formulation of the frequency and time of the slave clock and the timestamps which are treated as noisy observations of the offset and skew of the slave clock in combination with its frequency and time; and synchronize said slave clock to the master clock based on the estimated skew and offset to produce a master time estimate.
Preferably the timing messages are messages under the IEEE 1588 PTP, for example, Sync, Follow_Up, Delay_Req or Delay_Response messages. The exponentially weighted recursive least squares estimation technique is Kalman Filter like in structure but does not require knowledge of the measurement and process noise statistics as in the traditional Kalman Filter [3]. This algorithm can be used to attenuate the clock noise introduced by the packet network to levels commensurate with the clock output requirements of the application. The slave device of this aspect can therefore provide a timestamp-based clock recovery technique for end-to-end time and frequency distribution over packet networks. This technique requires no assistance from the packet network and is still able to provide sub- microsecond level clock accuracies. The recursive clock offset and skew estimation mechanism can provide both time and frequency signals for use at the slave (time client). Most techniques, typically, provide only one signal type, not both.
The estimation technique of this aspect does not require the measurement noise and process noise statistics as is the case in using the traditional Kalman filtering technique. Other than not requiring the noise statistics, the technique may resemble the Kalman filter in structure. A preferred form of the exponentially weighted recursive least squares algorithm is as follows:
a) initializing the algorithm by setting:
*o,-i = 0
PQ _l = γ7 , γ is a small positive constant
n = 1
b) setting the state prediction for the current time n as:
Figure imgf000013_0001
c) calculating:
Figure imgf000013_0002
d) calculating the Kalman gain vector:
Figure imgf000014_0001
e) updatin the state estimate:
Figure imgf000014_0002
n,n-l )
f) calcul
Figure imgf000014_0003
g) incrementing n:
n = n + 1
h) repeating from b) above,
wherein:
Xn is the estimate of the state vector X n which expresses the offset and skew of the slave clock at time n in vector form;
An is the state transition matrix, which, for a two-dimensional state-space in
1 Δί
discrete time, can be approximated as A * Φ(Δί) = where Δί is the sampling time;
0 1
λη is the forgetting factor at time n;
yn is the measurement at time n; and
Dn is a known measurement vector derived from the timestamps at time n.
The forgetting factor λη may be a suitable constant or may be dynamic.
Preferably the slave device further includes: a digital phase locked loop including a phase detector, a loop filter, a phase accumulator and a counter, and wherein the digital phase locked loop processes the master time estimate as follows: on receipt of a first estimate of the master time, the counter is initialised; on receipt of subsequent estimates of the master time, the phase detector is arranged to detect a phase difference between the output of the counter and the received estimate and produce an error signal representing that difference; the error signal is filtered by the loop filter to produce a filtered error signal; the filtered error signal is used to control the frequency of the phase accumulator; and the output of the phase accumulator increments the counter and also provides a clock frequency of the slave clock which is synchronized to the frequency of the master clock. The digital phase locked loop in the slave device can be used to attenuate the clock noise introduced by the network (which may be, for example, a packet network) to levels commensurate with the clock output requirements of the application.
Preferably the slave device uses the output of the counter as the clock time of the slave clock which is synchronized to the time of the master clock.
The system of this aspect can therefore provide a timestamp-based clock recovery technique for end-to-end time and frequency distribution over packet networks between a master and slave device. This technique requires no assistance from the packet network and is still able to provide sub-microsecond level clock accuracies. The digital phase locked loop can provide both time and frequency signals for use at the slave (time client). Most techniques, typically, provide only one signal type, not both.
The counter output (time signal) can be subsequently formatted into various standard time signals as required.
The slave device may further comprise a direct digital synthesizer producing an analog frequency signal from the output of the phase accumulator, the direct digital synthesizer including: the phase accumulator; an oscillator; a mapping device; and a digital-to-analog converter. The slave device may further comprise a low-pass filter arranged to filter the output of the direct digital synthesizer.
The slave device may process or condition the output of the phase accumulator in other ways to provide a signal that meets the jitter requirements of the end applications in the slave device. Various forms of signals (square wave, sine wave, etc.) with interface form factors can be constructed from the phase accumulator overflow output. These signals can be conditioned by another (typically analog) phase locked loop.
In one embodiment, the counter of the digital phase locked loop is also used to provide timestamps for the time of receipt and of sending of timing messages at/from the slave device.
In this embodiment the counter may be initialized on receipt by the slave device of the first timing message from the master device, and the counter may be reset on receipt of the first master time estimate to said first master time estimate. In an alternative embodiment, the slave device further comprises a second free-running counter, wherein the second counter is used to provide timestamps for the time of receipt and sending of timing messages at/from the slave device.
The system of this aspect preferably operates by carrying out a method according to the above described first aspect.
The system of the present aspect may include any combination of some, all or none of the above described preferred and optional features.
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 the message flow in a two-step clock under IEEE 1588 PTP and has already been described;
Figure 2 shows end-to-end time/frequency transfer over a network and has already been described; Figure 3 shows, in schematic form, the effect of Packet Delay Variation in a packet network and has already been described;
Figure 4 shows the effects of Packet Delay Variation on a PTP message stream and has already been described;
Figure 5 shows simple models of the effect of clock skew on clocks with and without offset; Figure 6 shows the calculation process for the estimation sever time at a PTP slave device;
Figure 7 shows the architecture of a slave device according to an embodiment of the present invention;
Figure 8 shows the operation of a digital phase locked loop (DPLL) based on a phase accumulator; Figure 9 shows the output of the phase accumulator in Figure 8; Figure 10 illustrates the synchronization between a master and a slave following
synchronization using a DPLL;
Figure 1 1 shows a direct digital synthesizer (DDS) which is used in an embodiment of the present invention; Figure 12 shows a DPLL operating in a slave device according to an embodiment of the present invention with time and frequency outputs;
Figure 13 shows a PLL model with a direct digital synthesizer;
Figure 14 shows DPLL measurement and control intervals;
Figure 15 shows the characteristic operation of a phase detector; Figure 16 shows the closed loop control model used to model the operation of a time client according to an embodiment of the present invention;
Figure 17 shows further details of the closed loop control model of Figure 16;
Figure 18 is a basic block diagram of an analog phase locked loop; and
Figure 19 shows the characteristics of a direct digital synthesizer and its input mapping function.
Detailed Description
Basic Clock Model and Development of Measurement and Process Models
Consider the time server (master) and time client (slave) clocks, S and , respectively. The difference or offset of the clock C relative to S at time t≥ 0 is 6{t) = (S(t) - C(t)) . t is used to denote the true time or reference (ideal) time. Frequency is the rate at which a clock progresses, and the frequency at time t of S is S'(t) . The skew a is defined as the normalized frequency difference between a clock and another clock. Generalized clock offset and skew equations can then be defined for the synchronization problem. It is assumed that at any particular time instant, the instantaneous view of the relationship between the master (server) clock with timeline S(t) and the slave (client) clock with timeline C(t) , can be described by the well-know simple skew clock model depicted in Figure 5, and described by the equation, S(t) = Q. + )C(t) + 0 , (1) where the normalized a is a very small quantity in the order of parts-per-million. This snapshot is an instantaneous view of how well the two clocks are (mis)aligned. Figure 5 illustrates the influence of Θ and a on the clock alignment.
Development of Measurement (Observation) Model
The above equation can be extended to account for the case where the master clock and slave clock exchange messages over a communication link with delay. Assume that a Sync message travels from a master to a slave experiences a fixed delay d plus a variable (stochastic) delay ε . Similarly, assume a Delay_Req message sent from the slave to the master experiences a fixed delay of d and a variable delay γ . It is further assumed that the fixed delay components in both directions are equal (symmetric communication paths) but the messages experience variables delays such queuing delays. The master and slave exchange messages using the Delay_Request Delay_Response mechanism described in Figure 1. The system is considered to operate such that events are logged in discrete time instants n = 0, 1 , 2, 3, with each discrete steps is equal to a small interval (sampling) of At seconds.
For the nth Sync message (Figure 1) which departs with timestamp Tl n e S(t) and arrives with timestamp T2 n e C(t) after having experienced a fixed delay d and a variable delay εη , the simple skew clock model above can be extended to account for the travel time d + εη to obtain the following expression
+ ά + εη) = {\ + αηη + θη (2)
The variables θη and an are the offset and skew during the nth Sync message exchange.
For the nth Delay_Req message which departs with timestamp T3 n e C(t) and arrives with timestamp T4 n e 5(t) after having experienced a fixed delay d and a variable delay γη , the following expression is obtained
Τ4,η - ά - γη = {\ + αηη + θη (3)
Adding (2) and (3) provides
Ά + + εη - γη = {\ + an)(T2 n + T3 n) + 2θη
(4)
- TXn) + (Γ4,„ - Τ η) = 2θη + αηη + Τ η) + {γη - εη)
The expression above is a measurement (observation) equation of the form yn = Dn TXn+vn (5) where n is a nonnegative time index, yn = (Tln -T2n) + (T4n -Tn) is a scalar,
D = [2 (ΤΊ„+Γ,„)]r is a vector, X =W„ c„] is a vector, v„ = (/„-£„) is the measurement noise and T denotes transpose. Filtering techniques such as the Kalman Filter assume vn to be white noise with zero mean and variance c 2 n . The nth sampling interval is considered to be the period in which the nth Sync and nth Delay_Req messages exchanges occur. This measurement equation relates all the necessary protocol (measurement) variables ({Tln,T4n} e S(t) and {T2n,T3n} e Cit)) to the clock variables (θη and an) plus measurement noise v„ = {γηη).
The clock offset can be expressed from (4) as follows
Figure imgf000019_0001
It can be seen from this equation that for a system with zero skew and no noise, the clock offset simplifies to the classic offset equation
Figure imgf000019_0002
The above equation can be derived without the minus sign when the clock model C(t) = (l + )S(t) + e is used instead. Either way, the same classic offset equation can be derived.
Developing the State (Process) Equation - Clock Process Model
Typically, the clock deviation of a clock is modeled by the following random differential equation dX(t)
X(f) + ( , (8) dt
where Fis an L*L real matrix and X t) is the state vector x,{t)
X(t) (9)
xL(t) The quantity xx{t) = 6>(t) represents the time deviation (or time offset), x2(t) = a{t) is the clock frequency deviation, and x {t) = a{t) represents the so-called frequency drift or aging. In the model, ξ(ί) is the vector of statistically independent zero-mean white Gaussian noises,
6(0
(10)
4(0
with each element of the vector having autocorrelation
E[tk(tl)tk(t2)] = gkS(tl - t2) , (11) for k = l,2,...,L and where 5{t) is the Dirac delta function. The autocorrelation matrix of ξ(ΐ) is thus
Ε[ξ(ίιτ2)] = Οδ(ίι - ί2) (12) and where G is the diagonal matrix
Figure imgf000020_0001
The random differential (8) can be written in the integral form
X(t) = Φ(ί - f0)X(f0) + Γ Φ(ί - τ)ξ{τ)άτ , (14) where t0 is the initial time and Φ(ΐ) is the transition matrix
Ft
Φ(ί) = e (15)
The time axis can be discretized with a sampling time At so that t takes the values tn = nAt , where n = 0,1,2,... The integral form of (14) in discrete time becomes
X(t ) = (At)X(t , ) + w(t , )
(16)
Xn = AXn_, +wr
where
W(i„_i) = f" Φ{ί - τ)ξ{τ)άτ , (17) is a Gaussian random variable whose mean is zero and whose covariance matrix is Qn-X = β(ί„-ΐ) =
Figure imgf000021_0001
- E[w(i„_1)])(w(i„_1) - E[w{tn_
(18)
= Γ" Γ" Φ<Χ - T)GS(S - Γ)ΦΓ<Χ - s)dsdr
= " i (i„- r)GOr(i„- r)rfr
2, it is noted that the matrix A in our clock process model (16) is
Figure imgf000021_0002
which an approximation of a power series expansion of (15), which is
. q-l
t2 „, i2
(t) = eFt = I + F(t) + F2— + F3— + - - - + Fq (20)
2 6
where / is the identity matrix. The system can be described by the following two-state dynamic model
X AXn_, + w„, (21)
Figure imgf000021_0003
where A is the known 2-by-2 state transition matrix and w is an 2-dimensional zero mean white process noise vector. If the time between Sync messages is fixed and is taken as the sampling interval, then we have ATn = (Tl n - Τγ η_γ) = At .
The variance of the process noise wn is related to the oscillator of local PLL at the slave. For the Telecom clock synchronization problem, the local oscillator is typically a Temperature Compensated Crystal Oscillator (TCXO) or Oven Controlled Crystal Oscillator (OCXO). Practical implementation of filtering techniques such as the Kalman Filter require getting a good estimate of the variance of measurement noise (vn = {γη - εη) ) and covariance of the process noise vector ( wn). The exponentially weighted recursive least squares (RLS) technique [4] of the embodiment described below (which has a Kalman Filter-like structure) requires no such noise variance estimates but yields accurate clock parameter estimates like the Kalman Filter with known noise statistics.
Exponentially Weighted Recursive Least Squares (RLS) Method - A Kalman Filter-Like Algorithm The model used in this embodiment is based on state-space representations of the variables being estimated. The state-space formulation implies that, at each point in time, the process being modeled is described by a vector of state variables that summarize all relevant quantities of interest. The filtering algorithm to be described below uses this model of the time behavior of the system along with noisy observations or measurements of some system variables to produce optimal estimates of all state variables. These estimates are then used in the process model to determine state estimates for future time periods.
Consider a state-space model described by the following pair of equations (i.e., clock measurement and state equations, respectively), yn = DIxn + vn ,
Figure imgf000022_0001
where n is a nonnegative time index, AN is a known M-by-M state transition matrix, Xn is the M-dimensional state (or parameter) vector, wn is an M-dimensional zero mean white process noise vector, yn is the measurement, Dn is a known M-dimensional measurement vector, vn is white noise with zero mean and variance σν 2 η , and T denotes transpose. The measurements yn_t , 0 < i≤ n , can be expressed in terms of Xn . From the state equation (16), Xn_t can be written as
Figure imgf000022_0002
where
Figure imgf000022_0003
is the backward transition matrix relating the states Xa and Xb . Using (22) in (5), we get y n-i = D nT-ix¥ nn iX n - + v„ (24)
Figure imgf000022_0004
If we define the (n+1)-by-M matrix
Figure imgf000022_0005
and the (n + 1) -dimensional vector
Figure imgf000023_0001
then the set of measurements {yn,yn_l,...,yQ} can be expressed as
Figure imgf000023_0002
where F„ = [yn,yn_v...,ya\T , n„ = w„+v„ (which has zero mean) and v„ = [v„,v„_ ...,v0 .
Consider X to be an M-dimensional vector to be estimated. In least-square (LS) estimation, the problem is to find an estimate X of the vector X as a linear combination of the measurements Y so that the estimate X minimizes the following cost function:
J(X) = (f-HX)TW(Y-HX), (28) where W is an M-by-M weight matrix. The solution to this problem, dJ/dX = 0, can be expressed as
X = (HTWH) 1 HTWY , (29) which is an unbiased estimate of X . The matrix W can be set equal to the diagonal matrix
W =diag[l,A,A2,...,AM l], (30) where 0 < λ≤ 1 and X (0 < n≤ M -1) represents the (n + l)-th diagonal element. This results in the cost function (28) becoming
Figure imgf000023_0003
where yn is the (M -n)-th element of Y and Dn T is the (M -n)-th row of H . This cost function leads to the exponentially weighted RLS algorithm with forgetting factor λ .
Using (29) the state vector X can be estimated as
Xn,n = i n Γ ' Hn TW n = Pn,nHn TW n , (32) where Xn n denotes an estimate of X based on data up to time n, Wn is a (n + 1) -by- (n + 1) weight matrix, and Pnn = {Hn TWnH nyl . The matrix Pnn is not a covariance matrix, unlike the case of Kalman filtering. The matrix Wn can be expressed as
Figure imgf000023_0004
When =λ1=... = λη=λ, the weight becomes identical to (30). To reduce the amount of calculations for X in (32), a recursive version needs to be developed. Substituting Χη_χ =
Figure imgf000024_0001
from (16) into Yn_ in (27), gives
Ϋη-ι = Hn_lXn_l + nn_l
Figure imgf000024_0002
Hn,n-lXn + ««,«-!
where Hn n_, = H^AT-i and nn n_, = nn_, - H„i„_1w„_1 . The one-step prediction of Xn given {y0, yl , ... , yn_! } can be expressed as
Xn,n-l = n,n-) n,n-lH n,n-l
Figure imgf000024_0003
' (35) where
(36) and Wn n_! is a weight matrix. A reasonable choice for the matrix Wn n_l for the one-step prediction is
,^ = · (37)
With this weight matrix, every input including the most recent one yn_ can be properly weighted for one-step prediction. The goal here is to express Xn n in terms of Xn n_ and Xn-i,n-i■ Substituting (37) into (36), and making use of the relations Ηη η_γ =
Figure imgf000024_0004
and ( f = (An T_i gives p
K
Figure imgf000024_0005
Using the relation iabcy = c~ b~ a in the above result gives
— A ~P A T
n,n-l - · 0)
Substituting (38) in (35) and using the relations Hn γ = Hn n_lAn_l , the following is obtained
Figure imgf000025_0001
— - — W —
p n-\,n-\
Figure imgf000025_0002
Using (32) in the above results gives
Figure imgf000025_0003
Exploiting the following relations
Figure imgf000025_0004
Figure imgf000025_0009
the recursions for P and X can be derived. From the matrix P in (32),
Figure imgf000025_0005
Applying the matrix inversion lemma (a + bcd) 1 = a 1 - a lb(da lb + c ') lda 1 to the above, gives
Figure imgf000025_0006
Now the desired estimate XN N becomes
Figure imgf000025_0007
which after some manipulations reduces to
Figure imgf000025_0008
where
Figure imgf000026_0001
is the Kalman gain vector. Eq. (41) can further be expressed in terms of Kn as
Figure imgf000026_0002
where 7 is the identity matrix. Equations (38), (39), (41), (42), and (43) constitute the RLS algorithm which is summarized in the steps below:
1. Initialize algorithm by setting
o,-i = 0
PQ _j = γ lI , γ is a small positive constant n = l
2. State prediction:
K
4.
Figure imgf000026_0003
5. Update state estimate:
Xn,n = Xn,n-l + ^n ( 'n ~ X n,n-l )
6. Calculate
7. n = n + 1
go to step 2
For the present clock synchronization problem, the initialization factor γ is selected to be a small positive constant in the order of parts-per-million (e.g., γ = 10 6 ). The forgetting factor An is a suitable constant (e.g., λη = 0.9999) or can be made dynamic.
Proposed DPLL Architecture for Time and Frequency Recovery
The clock offset ( Θ) and skew (ά ) can be estimated by the client after each Sync message broadcast by the server or after multiple periods of the Sync message broadcast. The period between Sync messages could serve as sampling period of the system. The server time S can be computed using the local clock C of the client as adjusted for skew and offset as illustrated in Figure 6. Figure 7 shows the main blocks of the proposed synchronization mechanism at the time client. A free running local client oscillator 25 is used together with the estimated clock offset and skew to derive the server clock estimate S .
The principal purpose of the architecture shown in Figure 7 is to reconstruct an accurate estimate of both the server time and frequency at the slave. This is done using a Digital Phase Locked Loop (DPLL) 20 that employs a phase accumulator 23, a loop filter 22, a phase detector 21 , and a counter 24 as shown in Figure 8. The local assist hardware clock 25 (with free-running counter) is used only for timestamping PTP messages. The free- running counter can be initialized with first arriving Sync message at the slave. The DPLL 20 is controlled in such a way that the overflow pulses of the phase accumulator 23 drive the counter 24 as shown in Figure 9. In the locked mode, the DPLL counter 24 generates a continuous server time signal while the phase accumulator overflow pulses generate a server frequency signal. At startup, the DPLL 20 waits for the first computed server time estimate ( S(0) ). This first server time estimate is used to initialize the DPLL counter ( C(0) = S(0) ). From this point onwards and upon the receipt of subsequent server time estimates ( 5(«) ) at any discrete time instant n, the DPLL 20 starts to operate in a closed-loop fashion. At each server time estimate ( S(n) ), the DPLL counter reading is noted by the slave ( C(«) ). Then the difference between the computed server time estimate ( 5(«) ) and the DPLL counter reading ( («) ) gives an error signal ( e(n) = S(n) - C{n) ). This error signal ( e(n) ) is sent to the loop filter 21 whose output controls the frequency of the phase accumulator 23. The output (overflow pulses) of the phase accumulator 23 in turn provides the clock frequency of the slave and also drives the DPLL counter 24. After a while the error term is expected to converge to zero which means the DPLL 20 has been locked to the incoming master time base (in both frequency and time).
As shown in Figure 8, at each phase accumulator overflow (output) pulse, the DPLL counter 24 is incremented by the nominal period of the phase accumulator overflow pulse (e.g. , 8 ns for a 125 MHz nominal phase accumulator overflow output frequency). The DPLL 20 is controlled in such a way that the DPLL counter evolution follows the computed server time estimate as illustrated in Figure 10. As illustrated in Figure 10, the timing of the increment (controlled by the phase accumulator overflow input word) is controlled such that the increment falls along the master clock time base. With correct controlled timing of the counter increments, the DPLL 20 provides both a frequency signal (output of phase accumulator 23 overflow) and time signal (output of DPLL counter 24).
The frequency signal can then be conditioned using other techniques as shown in Figures 11 and 12 to provide a signal that meets the jitter requirements of the end applications. Various forms of signals (square wave, sine wave, etc.) with interface form factors can be constructed from the phase accumulator overflow output. The signals can be conditioned by another analog PLL (APLL) for use by the end application. The DPLL counter output (time signal) can also be formatted into various time standard signals.
The architecture shown in Figures 7 and 8 can be implemented with either two separate counters (free-running counter and DPLL counter) or one counter (DPLL counter only). Both architectures can be used to synthesize both time and frequency signals:
• Architecture with separate counters (free-running counter 25 and DPLL counter
24): The initialization of these counters is done as follows:
o Free-Running Counter. This counter is used only for timestamping PTP messages. It can be initialized with first arriving Sync message at the slave. Its initial value can also be user configured.
o DPLL Counter. This counter provides a continuous time signal for the slave locked to master. It is initialized with the first computed server time estimate by the slave.
• Architecture with one counter (DPLL counter 24 only): In this configuration, the DPLL counter serves both as a timestamping counter as well as a counter that provides a continuous time signal for the slave. Initialization is carried out as follows:
o The DPLL starts in open-loop mode. The DPLL counter is initialized with first arriving Sync message. This can also be a user configured initial value.
o DPLL still running in open-loop but DPLL counter driven by phase accumulator overflow pulses. DPLL counter readings now used to timestamp subsequent PTP messages.
o First server time estimate is computed and DPLL counter reset to this first time estimate. DPLL now moves into closed-loop mode. DPLL counter readings used to timestamp subsequent PTP messages.
o Subsequent server time estimates used as DPLL reference signal. DPLL continuous to operate in closed-loop mode.
The phase accumulator 23 is a variable-modulus counter that increments the number stored in it each time it receives a clock pulse. When the counter overflows it wraps around, making the phase accumulator's output contiguous. The larger the added increment φ , the faster the accumulator overflows, which results in a higher output frequency. The output frequency fDDS of the phase accumulator is a function of the system clock frequency fo , the number of bits q in the phase accumulator and the phase increment value φ . The phase increment φ is an unsigned value.
Figure imgf000029_0001
From this equation it can be seen that the frequency resolution of the phase accumulator is fres = fo ■ Assuming that the phase accumulator is operating with a control input φηοιη which corresponds to the nominal frequency fDDS = fnom , it will be seen from the above discussion that, adding a quantity - φ£0π to φηοηι (i.e., ΦΒΒ5 = φηοπι - Φ∞π ) results in a decrease in the output frequency, fDDS = fnom - Af , whereas adding a quantity + φ∞ΓΓ to <Pnom (i e-> Φοιχ = Φ*»η + Φαοττ ) results in an increase in the output frequency, fans = fn0m + f - Thus > by appropriately controlling the quantity φ£0π added to φηοηι , the output frequency of the phase accumulator fDDS can be controlled accordingly. The phase accumulator 23 can be employed, if needed, as part of a Direct Digital Synthesizer (DDS) 30 from which an analog signal can be generated as shown in Figures 1 1 and 12. Though there are many variations, the conventional DDS architecture can be viewed as a simple assembly comprised of only three common digital components: a phase accumulator 23 (or adder/accumulator), a mapping device 26 (such as a read-only-memory (ROM) or random-access memory (RAM)), and a digital-to-analog converter (DAC) 27. In many cases a low-pass filter 28 is implemented at the output of the DAC but this component is not normally considered a part of the DDS. The reference clock f0 must operate at higher frequency than the synthesized clock because of Nyquist theorem.
DPLL Loop Filter Parameters
In order to analyze and design a control system, it is necessary to obtain a quantitative mathematical description or model of the system. The model is a set of mathematical relationships among the system variables. Because the system under consideration is dynamic in nature, the descriptive equations are usually differential (or difference) equations. The model or the set of differential equations describe the dynamic behavior of the system. The differential equations developed in modeling are often nonlinear. Because they are significantly more challenging to solve than linear ones, linear models are usually adequate. Linearization is the process of finding a linear model that approximates a nonlinear one. Both analysis and control design are far easier for linear than nonlinear models. The justification for using linear models is that, if a small-signal linear model is valid near an equilibrium (steady-state) and is stable, there is a region which may be small, containing the equilibrium within which the nonlinear system is stable. In other words, the deviation from equilibrium is assumed to be small so that the nonlinear functions can be approximated by linear functions.
Furthermore, if these equations can be linearized, then the Laplace transform can be utilized in order to simplify the method of solution. In practice, the complexity of systems and the lack of complete knowledge of all the relevant factors necessitate the introduction of assumptions concerning the system operation. Therefore we shall find it useful to consider the physical system, delineate some necessary assumptions, and linearize the system. Then utilizing mathematical tool such as the Laplace transform, we obtain a solution describing the operation of the system.
A phase locked look (PLL) is essentially a feedback control system as shown in Figure 12 and simplified to its components as "black box" operations in Figure 13. Thus mathematical models (e.g., in the form of transfer functions) of the DDS 30 and the phase detector (PD) 21 are needed to determine the parameters of the loop filter 22. In this section, the z-transform technique is employed to analyze the general tracking (i.e., steady-state) behavior of the PLL. Under the steady-state assumption, the phase error samples are small and the general nonlinear difference equation can be approximated by a linear one which can be solved by the z-transform technique. It is noted in that when the PLL has acquired lock and is not pulled out by large phase steps, frequency steps, or phase noise applied to its reference input, its performance can be analyzed by a linear model.
Assuming that the phase error θε (i.e., θε{ή) = 0s{n) - 0osc{n) is the difference between the oscillator clock phase 0osc{n) and the reference clock phase 0s{n) ) is within a limited range, the PLL as a feedback control system can be simplified as linear feedback control system. This assumption is reasonable for most applications since a real PLL has a bounded and limited locking range (expressed in parts-per-million, ppm, of the nominal operating frequency), outside of which locking cannot be guaranteed. The small signal linear analysis for the PLL is therefore useful for studying steady-state equilibrium behavior and stability properties under these same conditions. In the following sections, control models are developed for the phase detector 21 , the controlled oscillator and, given some general structure of the loop filter 22, the PLL as a whole. The analysis will further provide design procedures for determining the parameters of the loop filter 22 that will meet certain pre- specified design and performance requirements. Control Model of the DDS
In the DDS 30, the nominal control word φηοιη produces the corresponding nominal frequency fnom. It is assumed that the control input φηοιη is change by the amount φ£0π at discrete time n. Note that change takes effect in the next discrete interval. This change results in an output frequency of foos(n) = ^{φηοιη + Φ - 1)) = fnom + Af(n) , (46) or foos(n) = fnom+^corr(n-l). (47) This corresponds to an angular frequency of
^(η) = ωηοηι+^φ^(η-1). (48) The above equation can also be written as coDDS (n) = conom + KDD^corr(n - 1) = ωηοιη + Αω(η) , (49) where
KDDS = KOSC = (5°) is the DDS gain. By definition, the phase of the DDS 0DDS is given by the integral over the frequency variation Αω(η) = a>DDS(n) - ωηοιη as n n
0DDS = Σ Δ^( = KDDS Σ Φαοπ ( " (51 )
The DDS appears in the digital PLL as a digital integrator, just as the VCO appears as an analog integrator in the analog PLL.
Given that ωΌΌ5 = 27tf l2q , the DDS gain can be obtained alternatively as
ΚΒΟ5 =άωοο5Ιάφ = 2πϊ0Ι2'] .
From the above integration, the transfer function of the DDS in the z-domain is given as
Figure imgf000031_0001
Ocorr(z) 1-z 1-z
where denotes the delay operator (i.e., z ~lx(n) = x(n-\)), and ®DDS(z) = ®osc(z) and Ocorr(z) are the z-transforms of 6DDS{n) = 0osc(n) and φ0ΓΓ(η), respectively. Control Model of the Phase Detector
T is defined as the nominal time interval between S estimation and as the sampling interval of the DPLL at the time client. The sampling interval T is quantized by the nominal client clock fnom into M = Tsp ltnom units as shown in Figure 14. That is, computations are made every M DPLL clock pulses. The phase detector (PD) 21 operates at the frequency = 1/Γ . The interval T which is the reference operating interval for measurement and control at the DPLL 20, is equivalent to 2π radians or M nominal client clock ticks (see Figure 14). The estimate of the server time at the client at local clock time Lclock is denoted as S{Ldock) .
If the PD output e is plotted versus phase error θε , a sawtooth function as shown in Figure
15 results. This represents the characteristic curve of the PD and covers phase errors greater than 2π or smaller than - 2π . The curve is periodic with period 2π . The PD output is ideally linear for the entire range of input phase differences from - 2π to 2π radian and has maximum output at M , since we assuming steady-state or locked state operations of the PLL, where the linear control system models apply. Note that in the locked state, all frequencies are close to their ideal values. In this state the phase error range [-2π,2π] maps to the error range [-M,M] .
The slope of the PD characteristic curve is equivalent to the gain of the PD. From Figure 15, the slope is given by
KPD = ^ . (53)
When the phase error is restricted to the range - 2π < θε < 2π , the PD output becomes
Figure imgf000032_0001
The PD 21 measures the phase difference 0e(ri) = 0s(ri) - 0osc(ri) between the time client DPLL controlled oscillator phase 0osc(n) and the time server (reference) clock phase 0s(n) and develops an output e(n) that is proportional to this phase difference 0e(ri) . This operation can be expressed as e(n) = KPD - 0e(n) (55) The error signal output e(n) is then passed to the loop filter GLF {z) to be processed into the filtered error e (n) . The transfer function of the PD is given as
Figure imgf000033_0001
where E(z) and ®e(z) are the z-transforms of e(z) and θε(ζ) , respectively. Control Model of the Digital Loop Filter
The error signal e(n) from the PD 21 is passed to a digital loop filter 22, the output of which is used to adjust the frequency fosc = fDDS of the oscillator. There are many forms of filters that can be used as the loop filter 22. For example, the digital loop filter 22 could be implemented as a proportional plus integral (PI) filter having transfer function GLF {z) given by
G iz) = EW = K (57)
E{z) l - z'1
where E(z) is the z-transform of the filter output e (n) , and Kx and K2 are the proportional and integral path gains, respectively. This transfer function is equivalent to the discrete-time control equation e (n) = e (n - 1) + K^ein) - e(n - 1)) + K2e(n)
The loop filter being a PI filter yields a second-order PLL. The proportional gain Kx and the integral gain K2 determine the filter response. The filter gains K and K2 , if required, can be adjusted dynamically on the fly, with greater gain in the startup process for fast locking (acquisition mode) and smaller gain in steady-state for better stability and steady-state error (tracking mode).
Control Model of the PLL at Time Client
The DPLL 20 with a well-designed loop filter 22 can eventually eliminate the phase difference and make the controlled oscillator output phase and frequency lock to the reference. Figure 16 and 17 show the DPLL 20 as a closed-loop feedback control system.
This section describes a method for synthesizing a DPLL using standard control theory principles. The design is based on the digitization of a continuous-time system whereby the s-plane poles and zeros of a specified differential equation are mapped to the z-plane poles and zeros of a corresponding difference equation using the matched pole-zero (MPZ) method. Linear Second-order Model of a PLL in the s-domain
The analog or continuous-time PLL 40 (see Figure 18) consists of a phase detector 41 , a loop filter 42 and voltage controlled oscillator (VCO) 43. The phase detector 41 can simply be represented by a constant gain KPD . The VCO 43 can be modeled as a perfect integrator in the Laplace domain as Gvc0(s) = Kvco l s , where Kvc0 is its gain. The loop filter 42 can be specified in Laplace domain as F(s) .
In the absence of noise, the closed-loop transfer function and normalized phase error response are specified in the Laplace domain, respectively, as
®vc0(s) KPDKvcoF(s)
(58)
®s(s) s + KPDKvc0F(s)
and
®e(s) _ ®s(s) - ®vc0(s)
l - H(s) , (59)
®s(s) ®s(s) s + KPDKvcoF(s)
where ®vc0(s) , ®s(s) , and ®e(s) are the Laplace transforms of the VCO phase 0vco(t) , reference signal phase 0s(t) , and phase error 0e(t) , respectively.
The order of the loop is equal to the number of perfect integrators within the loop structure. Since the VCO 43 is modeled as a perfect integrator the loop is at least of order 1 . If the loop filter 42 contains one perfect integrator, then the loop is of order 2.
The order of the loop can be shown to greatly influence the steady-state performance of the loop. The steady-state phase error can readily be determined from (59) by means of the final value theorem, i.e., lim# (0 = Ιίηΐί Θ (s) = lim . (60)
*→° '→» s + KPDKvcoF(s)
The steady-state error is defined as the deviation of the VCO phase from the reference after the transient response has died out. The steady-state error is simply /¾(∞) . It can be shown by means of (60) that a first-order loop or higher will track an initial phase offset with zero steady-state error. Moreover, a second-order system is required to track a frequency step, while a third-order loop must be employed to track an accelerating phase with zero steady- state error.
This paper considers a second-order lag-lead filter (also known as a proportional-integral (PI) filter) which has transfer function F(s) = ^^ , (61) where τχ and r2 are time constants of the filter. The filter has a pole at s = 0 and therefore behaves like an integrator. It has (at least theoretically) infinite gain at zero frequency. The closed-loop transfer function of the PLL with this filter is obtained as
Figure imgf000035_0001
where ωη and ζ are the natural frequency and damping factors, respectively, and are specified in terms of KPD , Kvc0 , τ and r2 as
Figure imgf000035_0002
These two parameters are usually used to specify performance requirements of a system. The poles of the closed loop system are
Figure imgf000035_0003
When ζ > \ , the poles are real; and when ζ < l , the poles are complex and conjugate. When ζ = 1 , the poles are repeated and real and the condition is called critical damping. When ζ < 1 , the response is underdamped and the poles are complex.
The transient response of the closed-loop system is increasingly oscillatory as the poles approach the imaginary axis when ζ approaches zero. The above model can be directly applied to the PLL in the continuous-time domain. But for systems based on sampled data, discrete-time models have to be used.
Linear Second-order Model of a PLL in the z-domain
A linearized, time-invariant, approximate transfer function for the entire PLL 40 can be derived based on the conditions that nonlinearity of the system quantization is neglected. The z-domain representation of the PD 41 , loop filter 42 and the controlled oscillator 43 are given, respectively, as
GPD{z) = K (66)
K2 = (Kl + K2)z - Kl
(Z) = K1 + - — = , (67) Gosc(z) = ^^- = ^ . (68)
l - z z - 1
Using these transfer functions, the closed-loop transfer function of the PLL 40 becomes
Η =
Figure imgf000036_0001
or
Figure imgf000036_0002
The matched pole-zero (MPZ) method will now be applied to the H(s) to obtain a discrete- time system H2(z) that is of form (or relates to the discrete transfer function) H(z) . From this relationship, we will derive closed form expressions for the loop filter gains Kx and K2 .
Matched Pole-zero (MPZ) Method
The goal here is to map the system that meets the performance requirements specified by ωη and damping factor ζ to a corresponding model in the z-domain. The MPZ method directly maps the s-plane poles and zeros of an analog system to the corresponding z-plane poles and zeros of a discrete-time system. Here the Modified-MPZ (MMPZ) method is used which can be described as follows:
1. Map the s-plane poles and zeros into the z-plane using the relationship, z = esTsp , where Tsp is the sampling interval.
The poles of H(s) at s = -ζωη + ]ωη^\ - ζ2 will map to a pole of H2(z) at ) p0|es of at 5 = -ζωη - ]ωη^\ - ζ2 will map to a pole of
H2(z) at eV-*8"- *-^ \
The zero at s = -ωη Ι2ζ will map to a zero of H2(z) at e 10"7'" Ι 2ζ .
2. Form a discrete-time transfer function in z with the poles and zeros determined in the previous step.
Figure imgf000036_0003
where KDC is the DC or low-frequency gain of H2(z) . 3. Set the DC or low-frequency gain of the discrete-time system H2(z) equal to that of the continuous-time system H(s) .
The Final Value Theorem is often used to find the steady state value of a time function given its Laplace transform or z-transform. Suppose we have a function x{t) , the theorem states, in the s-domain, that limj (i) = limsX(s) , (72) f->∞ s-»0
where X{s) is the Laplace transform of x{t) and as long as all the poles of sX{s) are in the left half-plane (LHP) of the s-plane. In the z-domain, the theorem states that lim x(kT = lim(l - z'l)X (z) , (73) where X{z) is the z-transform of x{t) and if all the poles of (1 - z~l )X(z) are inside the unit circle. The theorem can also be use to find the DC gain of a system. The DC gain is the ratio of the output of a system to inputs (input presumed constant) after all transients have decayed. To find the DC gain, we assume there is a unit step input and use the Final Value Theorem to compute the steady state value of the output. Therefore for a system with transfer function G(s) , the DC gain is defined as
DC gain = limsG(s)- = limG(s) , (74) and for a system with transfer function G(z) , the DC gain is defined as
DC gain = lim(l - z ' )G(z)— = limG(z) . (75)
z→i 1 - z z→1
The DC gain of H{s) is obtained as limH(i) = 1 .
Setting the DC gain of H2(z) to that of H{s) we see that
KDC = 1 ·
Therefore, the transfer function H2(z) simplifies to
Figure imgf000037_0001
Digital Loop Filter Gains
The transfer function H2(z) can further be expressed as
Figure imgf000038_0001
z2 - 2e w" cos{conTsp \-C2 )z + e
Now comparing the denominators (or characteristic functions) of H(z) and H2(z) , it will be seen that
-2ζωΗΤ,
KPDKOSCK\ + l - e (78) or
-2ζωΗΤ,
l - e (79)
^PD^OSC
and
Figure imgf000038_0002
or
1
(81)
KPDK0SC
Typically, performance specification for feedback control systems often involves certain requirements associated with the time response of the system. The setting time, tset , is defined as the time it takes for the system transients to decay. For the PLL, tset is also referred to as the locking time. For the second-order system with 0 < ζ < 1 , the setting time (for the system to settle within 1 % of the input amplitude) is given by
Figure imgf000038_0003
Thus, for a second-order system, by specifying the settling time, tset , and the damping factor (e.g., ζ = 0.707 ), the undamped natural frequency ωη , and the filter gains K and K2 can easily be determined from the above equations.
Designers of Telecom PLLs typically adopted the following approach to determine the PLL parameters. The damping ratios in PLLs and clocks in telecom systems typically have gain peaking of 0.1 dB or 0.2 dB, respectively (corresponding to damping ratios of 4.3188 and 2.9585, respectively). This makes telecom synchronization overdamped systems. In a second-order PLL, the loop bandwidth Bw , damping ratio ζ , and natural frequency ωη are related by
(83)
Figure imgf000038_0004
Following telecom industry practice, the second-order PLL with PI filter are implemented to have closed-loop bandwidth Bw = 1 Hz or less and damping ratio ζ≥3 . Thus, for our second-order PLL, by specifying Bw and ζ , the natural frequency ωη , and the filter gains
Kx and K2 can easily be determined from the above equations.
Using the loop filter gains K and K2 , and the error e{n) , the control equation becomes e {n) = e {n - 1) + Κ {η) - ein - 1)) + K2e{n) . The filtered error can then be mapped to a corresponding DDS input control word using a mapping function as depicted in Figure 19. A much simpler mapping function is where the DDS correction factor is computed as
Figure imgf000039_0001
and the DDS control word is obtained from
φ(η) = φηοιη + Αφ(η) (85)
The systems and methods of the above embodiments may be implemented 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. Preferably the computer system has a monitor to provide a visual output display (for example in the design of the business process). 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 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 non-transitory 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
[1]. M. Ouellette, Kuiwen Ji, Song Liu, and Han Li, "Using IEEE 1588 and boundary
clocks for clock synchronization in telecom networks," IEEE Commun. Mag., Feb. 201 1 , pp. 164-171.
[2]. M. Ouellette, G. Garner, and S. Jobert, "Simulations of a chain of Telecom Boundary Clocks combined with Synchronous Ethernet for phase/time transfer," 2011
International IEEE Symposium on Precision Clock Synchronization for Measurement Control and Communication (ISPCS), 12-16 Sept. 2011 , pp. 105-1 13.
[3]. R. E. Kalman, "A New Approach to Linear Filtering and Prediction Problems,"
Transaction of the ASME— Journal of Basic Engineering, March 1960, pp. 35-45.
[4]. B. Chun, B. Kim; Y. H. Lee, "Generalization of exponentially weighted RLS algorithm based on a state-space model, " Proc. of the 1998 IEEE Inter. Symp. on Circuits and Systems, Vol. 5, 1998, pp. 198 -201.
All references referred to above are hereby incorporated by reference.

Claims

1. A method of synchronising the frequency and time of a slave clock in a slave device to a master clock in a master device, wherein the master device and the slave device are connected by a network, the method including the steps of:
exchanging, between the master device and the slave device, timing messages and timestamps which are: the time of sending of timing messages from the master device according to the master clock; the time of receipt of said timing messages according to the slave clock; the time of sending of said timing messages according to the slave clock; and the time of receipt of said timing messages according to the master clock;
estimating the offset and skew of the slave clock compared to the master clock by applying an exponentially weighted recursive least squares algorithm to a state-space formulation of the frequency and time of the slave clock and the timestamps which are treated as noisy observations of the offset and skew of the slave clock in combination with its frequency and time; and
adjusting the frequency and time of the slave clock based on the estimated offset and skew to produce a master time estimate.
2. A method according to claim 1 wherein the exponentially weighted recursive least squares algorithm takes the following form:
a) initializing the algorithm by setting:
X 0,-1 0
P 0,-1 γ lI , γ is a small positive constant
n = l
b) setting the state prediction for the current time
X -Λ n-\,n-\
c) calculating
d) calculatin the Kalman gain vector:
Figure imgf000041_0001
e) updating the state estimate:
X Xn,n-l + Kn(yn - Dn X '„,„-! ) f) calcul
Figure imgf000042_0001
g) incrementing n:
n = n + 1
h) repeating from b) above,
wherein:
Xn is the estimate of the state vector Xn which expresses the offset and skew of the slave clock at time n in vector form;
An is the state transition matrix, which, for a two-dimensional state-space in
1 At
discrete time, can be approximated as i * Φ(Αΐ) where Δί is the sampling time;
0 1
λη is the forgetting factor at time n;
y is the measurement at time n; and
Dn is a known measurement vector derived from the timestamps at time n.
3. A method according to claim 2, wherein the forgetting factor λη is dynamic.
4. A method according to any one of claims 1 to 3, further including the steps of:
using a digital phase locked loop including a phase detector, a loop filter, a phase accumulator and a counter, processing the master time estimate as follows:
on receipt of a first estimate of the master time, initializing the counter;
on receipt of subsequent estimates of the master time, detecting, using the phase detector, a phase difference between the output of the counter and the received estimate and producing an error signal representing that difference;
filtering the error signal using the loop filter to produce a filtered error signal; controlling the frequency of the phase accumulator using the filtered error signal; and
incrementing counter using the output of the phase accumulator, and obtaining a clock frequency of the slave clock which is synchronized to the frequency of the master clock as the output of the phase accumulator.
5. A method according to claim 4 further including the step of using the output of the counter as the clock time of the slave clock which is synchronized to the time of the master clock.
6. A method according to claim 4 or claim 5 further including the step of producing an analog frequency signal from the output of the phase accumulator using a direct digital synthesizer including the steps of:
mapping the output of the phase accumulator to produce a digital waveform; and converting said digital waveform to an analog waveform using a digital-to-analog converter.
7. A method according to claim 6 further including the step of low-pass filtering the analog waveform to produce a smoothed waveform.
8. A method according to any one of claims 4 to 7 wherein the timestamps for the time of receipt and of sending of timing messages at/from the slave device are provided by the counter of the digital phase locked loop.
9. A method according to claim 8 further including the steps of:
initializing the counter on receipt by the slave device of the first timing message from the master device, and
resetting the counter to said first master time estimate on receipt of the first master time estimate.
10. A method according to any one of claims 4 to 7 wherein the timestamps for the time of receipt and sending of timing messages at/from the slave device are provided by a second free-running counter.
11. A slave device connected to a master device having a master clock over a network, wherein the slave device includes:
a slave clock; and
the slave device is arranged to:
exchange with the master device, timing messages and to record timestamps which are: the time of sending of said timing messages from the master device according to the master clock; the time of receipt of said timing messages according to the slave clock; the time of sending of said timing messages according to the slave clock; and the time of receipt of said timing messages according to the master clock,
estimate the skew and offset of the slave clock relative to the master clock by applying an exponentially weighted recursive least squares algorithm to a state-space formulation of the frequency and time of the slave clock and the timestamps which are treated as noisy observations of the offset and skew of the slave clock in combination with its frequency and time; and
synchronize said slave clock to the master clock based on the estimated skew and offset to produce a master time estimate.
12. A slave device according to claim 11 wherein the exponentially weighted recursive least squares algorithm takes the following form:
a) initializing the algorithm by setting: o 0
PQ _l = γ7 , γ is a small positive constant
n = l
b) setting the state prediction for the current time n as:
Λ Ϋ A Y
η,η
c) calculating:
Figure imgf000044_0001
d) calculating the Kalman gain vector:
e) updating the state estimate:
Figure imgf000044_0003
)
f) calcu
Figure imgf000044_0004
g) incrementing n:
n = n + 1
h) repeating from b) above,
wherein:
Xn is the estimate of the state vector Xn which expresses the offset and skew of the slave clock at time n in vector form;
An is the state transition matrix, which, for a two-dimensional state-space in
1 At
discrete time, can be approximated as i * Φ(Αΐ) where Δί is the sampling time;
0 1
λη is the forgetting factor at time n; y is the measurement at time n; and
Dn is a known measurement vector derived from the timestamps at time n.
13. A slave device according to claim 12, wherein the forgetting factor λη is dynamic.
14. A slave device according to any one of claims 11 to 13 further including:
a digital phase locked loop including a phase detector, a loop filter, a phase accumulator and a counter, and wherein:
the digital phase locked loop processes the master time estimate as follows:
on receipt of a first estimate of the master time, the counter is initialised; on receipt of subsequent estimates of the master time, the phase detector is arranged to detect a phase difference between the output of the counter and the received estimate and produce an error signal representing that difference;
the error signal is filtered by the loop filter to produce a filtered error signal; the filtered error signal is used to control the frequency of the phase accumulator; and
the output of the phase accumulator increments the counter and also provides a clock frequency of the slave clock which is synchronized to the frequency of the master clock.
15. A slave device according to claim 14 wherein the slave device uses the output of the counter as the clock time of the slave clock which is synchronized to the time of the master clock.
16. A slave device according to claim 14 or claim 15 further comprising a direct digital synthesizer producing an analog frequency signal from the output of the phase accumulator, the direct digital synthesizer including:
the phase accumulator;
an oscillator;
a mapping device; and
a digital-to-analog converter.
17. A slave device according to claim 16 further comprising a low-pass filter arranged to filter the output of the direct digital synthesizer.
18. A slave device according to any one of claims 14 to 17 wherein the counter of the digital phase locked loop is also used to provide timestamps for the time of receipt and of sending of timing messages at/from the slave device.
19. A slave device according to claim 18 wherein the counter is initialized on receipt by the slave device of the first timing message from the master device, and the counter is reset on receipt of the first master time estimate to said first master time estimate.
20. A slave device according to any one of claims 14 to 17 further comprising a second free-running counter, wherein the second counter is used to provide timestamps for the time of receipt and sending of timing messages at/from the slave device.
21. A time and frequency synchronisation system for a network, the system including: a master device having a master clock;
a slave device having a slave clock; and
a network connecting the master and slave devices,
wherein the slave device is arranged to:
exchange with the master device, timing messages and to record timestamps which are: the time of sending of said timing messages from the master device according to the master clock; the time of receipt of said timing messages according to the slave clock; the time of sending of said timing messages according to the slave clock; and the time of receipt of said timing messages according to the master clock,
estimate the skew and offset of the slave clock relative to the master clock by applying an exponentially weighted recursive least squares algorithm to a state-space formulation of the frequency and time of the slave clock and the timestamps which are treated as noisy observations of the offset and skew of the slave clock in combination with its frequency and time; and
synchronize said slave clock to the master clock based on the estimated skew and offset to produce a master time estimate.
22. A system according to claim 21 wherein the exponentially weighted recursive least squares algorithm takes the following form:
a) initializing the algorithm by setting: o.-i = 0
P0 _ j = γ l7 , γ is a small positive constant b) setting the state prediction for the current time
Figure imgf000047_0001
c) calculating:
A P A T
K
d) calculating the Kalman gain vector:
Figure imgf000047_0002
e) updating the state estimate: f) calcul
Figure imgf000047_0003
g) incrementing n:
n = n + 1
h) repeating from b) above,
wherein:
Xn is the estimate of the state vector Xn which expresses the offset and skew of the slave clock at time n in vector form;
An is the state transition matrix, which, for a two-dimensional state-space in
1 At
discrete time, can be approximated as i * Φ(Αί) where Δί is the sampling time;
0 1
λη is the forgetting factor at time n;
y is the measurement at time n; and
Dn is a known measurement vector derived from the timestamps at time n.
23. A system according to claim 22, wherein the forgetting factor λη is dynamic.
24. A system according to any one of claims 21 to 23 wherein the slave device further includes:
a digital phase locked loop including a phase detector, a loop filter, a phase accumulator and a counter, and wherein
the digital phase locked loop processes the master time estimate as follows:
on receipt of a first estimate of the master time, the counter is initialised; on receipt of subsequent estimates of the master time, the phase detector is arranged to detect a phase difference between the output of the counter and the received estimate and produce an error signal representing that difference;
the error signal is filtered by the loop filter to produce a filtered error signal; the filtered error signal is used to control the frequency of the phase accumulator; and
the output of the phase accumulator increments the counter and also provides a clock frequency of the slave clock which is synchronized to the frequency of the master clock.
25. A system according to claim 24 wherein the slave device uses the output of the counter as the clock time of the slave clock which is synchronized to the time of the master clock.
26. A system according to claim 24 or claim 25 wherein the slave device further comprises a direct digital synthesizer producing an analog frequency signal from the output of the phase accumulator, the direct digital synthesizer including:
the phase accumulator;
an oscillator;
a mapping device; and
a digital-to-analog converter.
27. A system according to claim 26 wherein the slave device further comprises a low- pass filter arranged to filter the output of the direct digital synthesizer.
28. A system according to any one of claims 24 to 27 wherein the counter of the digital phase locked loop is also used to provide timestamps for the time of receipt and of sending of timing messages at/from the slave device.
29. A system according to claim 28 wherein the counter is initialized on receipt by the slave device of the first timing message from the master device, and the counter is reset on receipt of the first master time estimate to said first master time estimate.
30. A system according to any one of claims 24 to 27 wherein the slave device further comprises a second free-running counter, wherein the second counter is used to provide timestamps for the time of receipt and sending of timing messages at/from the slave device.
PCT/GB2013/052568 2013-10-02 2013-10-02 Method and devices for time and frequency synchronization WO2015049480A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP13779332.9A EP3053288A1 (en) 2013-10-02 2013-10-02 Method and devices for time and frequency synchronization
PCT/GB2013/052568 WO2015049480A1 (en) 2013-10-02 2013-10-02 Method and devices for time and frequency synchronization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/GB2013/052568 WO2015049480A1 (en) 2013-10-02 2013-10-02 Method and devices for time and frequency synchronization

Publications (1)

Publication Number Publication Date
WO2015049480A1 true WO2015049480A1 (en) 2015-04-09

Family

ID=49385288

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/GB2013/052568 WO2015049480A1 (en) 2013-10-02 2013-10-02 Method and devices for time and frequency synchronization

Country Status (2)

Country Link
EP (1) EP3053288A1 (en)
WO (1) WO2015049480A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3089386A1 (en) * 2015-04-29 2016-11-02 ABB Technology AG Method, system and device for clock synchronization over time-varying and lossy networks
CN106301996A (en) * 2015-06-26 2017-01-04 中国移动通信集团公司 The method and device that a kind of PTP message is tested automatically
CN110300450A (en) * 2019-05-22 2019-10-01 南京大学 A kind of clock servo method using sef-adapting filter correction 1588 agreement of IEEE
CN111245593A (en) * 2020-01-03 2020-06-05 北京邮电大学 Time synchronization method and device based on Kalman filtering
CN113438045A (en) * 2021-06-25 2021-09-24 重庆邮电大学 Timestamp-free synchronous clock parameter tracking method based on extended Kalman filtering
CN114401066A (en) * 2021-12-20 2022-04-26 中国航天科工集团八五一一研究所 High-precision time-frequency synchronization signal distribution system and distribution method thereof
CN114584248A (en) * 2022-04-22 2022-06-03 南京典格通信科技有限公司 RRU high-precision clock synchronization method based on Kalman sliding window filtering

Citations (2)

* 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
US20100054283A1 (en) * 2008-08-26 2010-03-04 Zarlink Semiconductor Inc. Method of transferring timing information over packet network

Patent Citations (2)

* 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
US20100054283A1 (en) * 2008-08-26 2010-03-04 Zarlink Semiconductor Inc. Method of transferring timing information over packet network

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
B. CHUN; B. KIM; Y. H. LEE: "Generalization of exponentially weighted RLS algorithm based on a state-space model", PROC. OF THE 1998 IEEE INTER. SYMP. ON CIRCUITS AND SYSTEMS, vol. 5, 1998, pages 198 - 201
BYUNGJIN CHUN ET AL: "Generalization of exponentially weighted RLS algorithm based on a state-space model", CIRCUITS AND SYSTEMS, 1998. ISCAS '98. PROCEEDINGS OF THE 1998 IEEE IN TERNATIONAL SYMPOSIUM ON MONTEREY, CA, USA 31 MAY-3 JUNE 1998, NEW YORK, NY, USA,IEEE, US, vol. 5, 31 May 1998 (1998-05-31), pages 198 - 201, XP010289999, ISBN: 978-0-7803-4455-6, DOI: 10.1109/ISCAS.1998.694442 *
HAYANG KIM ET AL: "Tracking Low-Precision Clocks With Time-Varying Drifts Using Kalman Filtering", IEEE / ACM TRANSACTIONS ON NETWORKING, IEEE / ACM, NEW YORK, NY, US, vol. 20, no. 1, 1 February 2012 (2012-02-01), pages 257 - 270, XP011415419, ISSN: 1063-6692, DOI: 10.1109/TNET.2011.2158656 *
M. OUELLETTE; G. GARNER; S. JOBERT: "Simulations of a chain of Telecom Boundary Clocks combined with Synchronous Ethernet for phase/time transfer", INTERNATIONAL IEEE SYMPOSIUM ON PRECISION CLOCK SYNCHRONIZATION FOR MEASUREMENT CONTROL AND COMMUNICATION (ISPCS, 12 September 2011 (2011-09-12), pages 105 - 113
M. OUELLETTE; KUIWEN JI; SONG LIU; HAN LI: "Using IEEE 1588 and boundary clocks for clock synchronization in telecom networks", IEEE COMMUN. MAG., February 2011 (2011-02-01), pages 164 - 171
R. E. KALMAN: "A New Approach to Linear Filtering and Prediction Problems", TRANSACTION OF THE ASME-JOURNAL OF BASIC ENGINEERING, March 1960 (1960-03-01), pages 35 - 45

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3089386A1 (en) * 2015-04-29 2016-11-02 ABB Technology AG Method, system and device for clock synchronization over time-varying and lossy networks
WO2016173741A1 (en) * 2015-04-29 2016-11-03 Abb Technology Ag Method, system and device for clock synchronization over time-varying and lossy networks
US10164762B2 (en) 2015-04-29 2018-12-25 Abb Schweiz Ag Method, system and device for clock synchronization over time-varying and lossy networks
CN106301996A (en) * 2015-06-26 2017-01-04 中国移动通信集团公司 The method and device that a kind of PTP message is tested automatically
CN110300450A (en) * 2019-05-22 2019-10-01 南京大学 A kind of clock servo method using sef-adapting filter correction 1588 agreement of IEEE
CN111245593B (en) * 2020-01-03 2021-04-20 北京邮电大学 Time synchronization method and device based on Kalman filtering
CN111245593A (en) * 2020-01-03 2020-06-05 北京邮电大学 Time synchronization method and device based on Kalman filtering
CN113438045A (en) * 2021-06-25 2021-09-24 重庆邮电大学 Timestamp-free synchronous clock parameter tracking method based on extended Kalman filtering
CN113438045B (en) * 2021-06-25 2022-03-29 重庆邮电大学 Timestamp-free synchronous clock parameter tracking method based on extended Kalman filtering
CN114401066A (en) * 2021-12-20 2022-04-26 中国航天科工集团八五一一研究所 High-precision time-frequency synchronization signal distribution system and distribution method thereof
CN114401066B (en) * 2021-12-20 2023-11-03 中国航天科工集团八五一一研究所 High-precision time-frequency synchronous signal distribution system and distribution method thereof
CN114584248A (en) * 2022-04-22 2022-06-03 南京典格通信科技有限公司 RRU high-precision clock synchronization method based on Kalman sliding window filtering
CN114584248B (en) * 2022-04-22 2022-08-05 南京典格通信科技有限公司 RRU high-precision clock synchronization method based on Kalman sliding window filtering

Also Published As

Publication number Publication date
EP3053288A1 (en) 2016-08-10

Similar Documents

Publication Publication Date Title
US9531395B2 (en) Method and devices for time and frequency synchronization using a phase locked loop
EP3053287B1 (en) Method and devices for time and frequency synchronization using a phase locked loop
US20150092796A1 (en) Method and devices for time and frequency synchronization
WO2015049480A1 (en) Method and devices for time and frequency synchronization
US8693608B2 (en) Frequency synchronization using clock recovery loop with adaptive packet filtering
JP5701420B2 (en) Timing system and method for time synchronization over a packet network
JP5378601B2 (en) High precision synchronization method and system
EP2740228B1 (en) Method and system for frequency synchronization
US20130235889A1 (en) Differential timing transfer over synchronous ethernet using digital frequency generators and control word signaling
CN102013970B (en) Clock synchronization method and device thereof as well as base station clock device
Aweya Technique for differential timing transfer over packet networks
EP2893656B1 (en) Method and system for clock offset and skew estimation
EP3053286A1 (en) Method and devices for synchronization
US20200021378A1 (en) End-to-end transparent clocks and methods of estimating skew in end-to-end transparent clocks
US8767898B2 (en) Method and system of synchronizing data to reference time signal with data resampling
Piqueira Using bifurcations in the determination of lock-in ranges for third-order phase-locked loops
Macii et al. A master-slave synchronization model for enhanced servo clock design
JP6198075B2 (en) Time synchronization apparatus, time synchronization method, and time synchronization program
Zhang et al. A disturbance rejection control approach for clock synchronization in IEEE 1588 networks
Piqueira et al. Double-frequency jitter figures in master–slave PLL networks
US20230094645A1 (en) Linear prediction to suppress spurs in a digital phase-locked loop
US11831405B2 (en) Adaptive filtering for precision time protocol with physical layer support
US20230198531A1 (en) Modified control loop in a digital phase-locked loop
EP3732806B1 (en) Method, device and system for estimating offset skew and drift
Rinaldi et al. On the use of synchronous Ethernet over multiple paths for syntonization of distributed systems

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: 13779332

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: 2013779332

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2013779332

Country of ref document: EP