Vous êtes sur la page 1sur 73

Clock Synchronization in Distributed

Systems Using NTP and PTP

Chapter 21

Professor: HONGWEI ZHANG


CSC8260 Winter2016

Presented By: ABDUL AZIZ REEHAN SHAIK (fq8875)


fq8875@wayne.edu
Outline
Introduction

Clock Synchronization in a Nutshell

Network Time Protocol (NTP)

Precision Time Protocol (IEEE 1588 PTP)

Implementation and Application Issues

Conclusion
Introduction

Clock Synchronization deals with the idea that


internal clocks of several computers may differ.

Even when initially set accurately, real clocks will differ after
some amount of time due to clock drift, caused by clocks
counting time at slightly different rates.

Problems associated with clock skew that take on more


complexity in a distributed system in which several computers
will need to realize the same global time.
What is Distributed Systems?

Distributed system is a software system in which components


located on networked computers communicate and
coordinate their actions by passing messages or commands.

Examples of distributed systems vary from SOA-based


systems to massively multiplayer online games to peer-to-
peer applications.
What is Clock Synchronization used for?
With the rise of spatially distributed computers connected by
a data network, the need to establish a network-wide
timebase has sparked the interest in clock synchronization.
Enable the ordering of events and to provide a common
notion of time.
This degree of synchronization additionally enables to
coordinate and schedule actions between multiple computers
connected to a common network.
Temporal ordering of events produced by concurrent
processes.
Synchronization between senders and receivers of messages,
Coordination of a joint activity.
Different solutions to obtain synchronization

Cristians Algorithm
Berkeleys Algorithm
Network Time Protocol
Clock Sampling Mutual Network Synchronization
Precision Time Protocol
Reference Broadcast Synchronization
Reference Broadcast Infrastructure
Synchronization
Global Positioning System
Outline
Introduction

Clock Synchronization in a Nutshell

Network Time Protocol (NTP)

Precision Time Protocol (IEEE 1588 PTP)

Implementation and Application Issues

Conclusion
Clock Synchronization in a Nutshell

Clocks :
A clock can be considered an instrument to measure, keep,
and indicate time.
Practically, all clocks are built as a two-part device: An
oscillating device, a counter device.
Quartz-crystal oscillators are today the most widely used
oscillators, thanks to their low price, ruggedness, and low
power consumption.
The second part of a clock is a counter or accumulator, which
sums up the oscillations. These oscillators are then divided by
a certain number to generate seconds, minutes, hours, and so
on.
Clocks (Contd..)
A simple approach to describe the time tj at clock j by only two
parameters aj and bj is
t j (t ) = ajt +bj
Synchronization aims for minimizing the clock offset error
e= t j (t)- t
aj being the rate of the clock j
bj the offset, both with respect to the reference clock t.
This information can be shared by various means: It can be
transmitted encapsulated as data in the form of a timestamp
over a packet network, or implicitly in the form of a pulse
signal, which allows the slave clock to synchronize to the
reference clock.
Basic Synchronization Principle
Independent of how the time information is shared, the
packet-based synchronization of state-of-the-art protocols is
either based on a one-way or two-way message exchange.
The one-way message exchange mechanism transmits timing
information from the time source to the sink.
Two-way synchronization extends the one-way exchange by sending
packets from the sink back to the source.
To demonstrate the basic synchronization principle, consider a
synchronization scenario with two clocks i and j.
Without loss of generality, we assume that clock i is identical
to the reference clock, and therefore ti = t and clock j
synchronizes to clock i
Basic Synchronization Principle (Contd..)
Basic Synchronization Principle (Contd..)

We assume the skew aj = 1, constant offset bj indicated by the


arrow pointing from the time ti = 0 to tj = 0.
synchronization procedure is initiated by device i at time t1.
Tij -unknown propagation delay, the clock j receives the
notification at t2.
The process is reversed by j sending a timestamp at t3 to i,
which receives it after Tji at t4.
The propagation times Tij and Tji can therefore be expressed
by
Tij= (t2+bj)-t1
Tji=t4-(t3+bj)
Basic Synchronization Principle (Contd..)

By solving the two equations w.r.t bj we get

bj= [(t1-t2)-(t3-t4)]/2 + (Tij-Tji)/2

Where (Tij Tji)/2 represents the asymmetry of the


communication channel.
If the skew aj 1, the rate of clock j is different than the one
of i, and the timestamps between i and j cannot be converted
by simply adding the offsets, as the skews scale the time
spans,
tj=(aj/ai)(ti-bi)+bj
Taxonomy of Clock Synchronization Approaches

Given the limited stability of real clocks, the aim of


clock synchronization is to establish a common
notion of time, compensating for offset and rate
errors.

Degrees of synchronization
Ordering of events
Relative synchronization
Internal synchronization; reference is internal
Absolute synchronization
Absolute time reference as external reference
Taxonomy of Clock Synchronization Approaches
(Contd..)
Which devices are synchronized?
Sender/Receiver (SR) Synchronization
Receiver/Receiver (RR) Synchronization

Propagation time correction


No offset correction
Round-trip time-based correction
Individual path delay correction
Taxonomy of Clock Synchronization Approaches
(Contd..)
Timestamping Methods

Software-based Timestamping
Hardware-based Timestamping
Synchronization Approaches for Packet-Based
Networks
Clock synchronization based on the exchange of time
information encapsulated in data packets is one of the widely
used synchronization techniques due to its seamless
integration into existing network and communication
techniques.
Messages containing timestamps can be transmitted from the
reference clock to the clock to be synchronized, the so-called
slave clock, by various means, ex: wireless
State-of-the-art synchronization technologies just explained
briefly are DCF77, GPS and Inter Range Instrumentation
Group.
In Detail NTP,PTP
DCF77

DCF77 sends the time information using long waves with a standard radio
station. The primary DCF77 transmitter is located in Mainflingen, Germany,
and started radio transmission on January 1, 1959.

The carrier signal at 77.5 kHz is generated from local atomic clocks that are
linked with German master clocks. The time provided by the radio
transmission is Universal Time Coordinated plus 1 h (UTC + 1), Central
Europe Time.

DCF77 receiver based on the cross-correlation of the phase modulated time


signal can be used to obtain an accurate estimation of the beginning of the
second markers.

Similar radio time signal stations with slightly different modulations and
encodings are deployed all over the world, such as the WWVB in Fort
Collins, the United States, or the TDF in Allouis, France.
Global Positioning System (GPS)

One of the most commonly used GNSSs is the Navigation Satellite


Timing and Ranging System (NAVSTAR GPS). The concept of global
positioning system (GPS) was developed for the US Department of
Defense (DoD) starting in the 1970s, and the system became fully
operational in 1994.
Each GPS satellite is equipped with four atomic clocks (two
rubidium and two cesium clocks) with a fundamental frequency
slightly below 10.23 MHz.
The legacy GPS navigation signals are transmitted on two
frequencies, the L1 and L2 band.
L1 band- center frequency of 1575.42 MHz
L2 band- 1227.60 MHz carrier frequency.
Inter-Range Instrumentation Group

The Inter-Range Instrumentation Group (IRIG) standard defines a set of


timecodes, each of them characterized by its own specific attributes.
The IRIG signal consists of a carrier that is modulated to transfer the
timecode.
The different timecodes are identified by alphabetic designations: A, B, D,
E, G, and H.
The three modulations supported are direct current level shift (DCLS), sine
wave carrier (amplitude modulation), and Manchester modulation.
One of the most common IRIG codes is IRIG-B. This code provides a bit
rate of 100 Hz and a frame transmission rate, in BCD coding, of every
second.
A typical application of an IRIG-B encoded signal is the time distribution to
measurement and control devices in substation automation systems
(SASs).
Outline
Introduction

Clock Synchronization in a Nutshell

Network Time Protocol (NTP)

Precision Time Protocol (IEEE 1588 PTP)

Implementation and Application Issues

Conclusion
Network Time Protocol (NTP)

NTP systems can operate as a primary server, secondary server, or


client. The primary server derives its time directly from a UTC
reference clock like GPS or Galileo receiver.
The NTP protocol can be implemented in three variants which are
Client/Server Variant, Symmetric Variant and Broadcast Variant.
NTP is organized as a hierarchical structure of servers to which the
clients are connected. The servers level in the hierarchy is given by
the stratum number.
In NTP networks, the synchronization mean errors are proportional
to the server stratum number. For this reason, the NTP topology
should minimize the synchronization distance between servers and
between servers and clients, although loops should be avoided.
NTP Time Scale, Time Format, and Other
Definitions
For NTP implementations, two timescales are considered: UTC time
for dating events and the running time, which is the output of the
NTP synchronization function.

If T(t) is the time offset, R(t) is the frequency offset (expressed in


seconds-per-second(s/s) or ppm), and D(t) is the aging rate (first
derivative of R(t) with respect to t).

If T(t0) is the UTC time offset determined at t = t0, the UTC time
offset at time t can be expressed by
T(t)=T(t0)+R(t0)(t- t0)+(0.5)D(t0) (t- t0)2+e

Where the term e refers to the stochastic error term.


NTP Time Scale, Time Format, and Other
Definitions(Contd..)
The performance of the NTP timekeeping function is computed
each time a time information exchange takes place using four
statistics.

1. The offset represents the maximum-likelihood time offset of


the server clock relative to the system clock.
2. The delay represents the round-trip delay between the client
and server.
3. The dispersion represents the maximum error inherent in the
measurement.
4. The jitter is defined as the root-mean-square (RMS) average of
the most recent offset differences. It represents the nominal error
in estimating the offset.
NTP Time Scale, Time Format, and Other
Definitions(Contd..)
There is a separate group of the four statistics (, , , and ) for each server
the system clock is connected to. However, the strength of the NTP protocol is
the way it combines the statistics of many servers in order to increase the
overall system clock accuracy.
1. The system offset represents the maximum-likelihood offset
estimate for the server population.
2. The delta statistic is accumulated at each stratum level from the
reference clock to produce the root delay statistic .
3. The epsilon statistic is accumulated at each stratum level from
the reference clock to produce the root dispersion statistic E.
4. The system jitter represents the nominal error in estimating
the system offset.
5. The synchronization distance equal to E + /2 represents the
maximum error due to all causes.
NTP Time Scale, Time Format, and Other
Definitions(Contd..)
In the NTP system, there are three time formats
NTP Time Scale, Time Format, and Other
Definitions(Contd..)
The 128 bit date format can be used if sufficient memory space is available
in the system. This format has the highest resolution and range, since the
64 bit wide seconds field may reach 584 109 years and the 64 bit fraction
may resolve 0.5 1018 s. In order to be compatible with other formats,
the seconds field is divided into a 32 bit era number field and a 32 bit era
offset field. Usually, era numbers are out of the scope of normal NTP
implementations.

The 64 bit time format is commonly used for packet headers and in
systems with limited memory space. It is composed of 32 bit unsigned
seconds (range of 136 years) and 32 bit fraction (resolution of 232 ps).

The 32 bit short format is used only if the range/resolution of the other
formats is not required (e.g., for delay and dispersion header fields). It is
composed of a 16 bit unsigned seconds field and a 16 bit fraction field.
NTP Implementation Model

The NTP is usually implemented with a multithread structure.


For each server, two processes exist, one for receiving messages
from servers (the peer process) and one for sending requests to
servers (the poll process).
For each server, a data structure called association is maintained .
Every time NTP packets are received, the statistics , , , and are
updated.
The time retrieved by each association is fed to the system process,
which includes three algorithms which are Selection, Cluster, and
Combine to harmonize/mitigate the various servers, determining
which are the most accurate and reliable.
NTP Implementation Model (Contd..)

Selection Algorithm: Primarily used to detect the Byzantine


faults, which is nothing but discarding the incorrect servers
also known as falsetickers and retaining the good servers
which are known as truechimers.

Cluster Algorithm: Used to classify the truechimers


statistically., and to identify the most accurate set.

Combine Algorithm: Used to statistically average the selected


truechimers and generating the final clock offset.
NTP Implementation Model (Contd..)
On-Wire Protocol
The time exchange between peers (servers and/or clients) is
the core mechanism of NTP. The On- Wire Protocol describes
how time quantities are exchanged.

It is based on four timestamps (t1, t2, t3, t4) and three state
variables origin timestamp org, receiving timestamp rec,
and transmitting timestamp xmt.
On-Wire Protocol (Contd..)
On-Wire Protocol (Contd..)

For each peer, the four most recent timestamps (T1, T2, T3, T4)
are used to compute the offset and the round-trip delay of B
relative to A as described in the standard.

These equations match the basic equations of the two-way


message exchanges. The initial value of at t0
Network Data Packet for NTP
Network Data Packet for NTP (Contd..)
The NTP packet is transported inside a UDP(user datagram
protocol) datagram.
The specific UDP port 123 has been assigned by Internet
Assigned Numbers Authority (IANA) for use with NTP. In case of
broadcast servers, the IPv4 multicast group address 224.0.1.1
and the IPv6 multicast address ending: 101 are also reserved by
IANA for NTP.
The NTP packet is composed of three parts: the header, the
extension fields, and the message authentication code.
The packet also includes a 32 bit Reference ID (refid), which is
used to identify the time server or reference clock.
Network Data Packet for NTP (Contd..)

The header includes four timestamps in the NTP timestamp


format:

The Reference Timestamp


The Origin Timestamp
The Receive Timestamp
And the Transmit Timestamp
NTP Managing Process

The NTP core is focused on filtering and analyzing the time


information coming from several servers.
The most important of these processes are :

Clock Filter Algorithm


Mitigation Algorithm
Selection Algorithm
Cluster Algorithm
Combine Algorithm
Clock Discipline Algorithm
Clock Filter Algorithm
The clock filter algorithm is used to produce, for each peer,
the following variables: offset , delay , dispersion , jitter ,
and time of arrival t.
The clock filter algorithm uses the eight most recent sample
tuples (, , , t) in the order of packet arrival. When a new
packet is received, the least recent tuple is discarded.
The operation of the filter algorithm is outlined in the
following:
The eight tuples in the filter are sorted by increasing . Only the valid
tuple relative to received packets are considered.
The filtered (i.e. dispersion of the considered peer) is calculated as:
Clock Filter Algorithm (Contd..)

The of the first tuple of the ordered list is used as 0 for the
calculation of the filtered jitter (which is the RMS average of all the
valid tuples)

The synchronization distance between server and client is obtained


from
Mitigation Algorithm

The mitigation algorithm consists of the selection algorithm,


the cluster algorithm, the combine algorithm, and the clock
discipline algorithms.
Run each time a new tuple (, , , , t) is produced by the
clock filter algorithm.
The time-related system variables, which are used for
propagating the time to other servers and clients and passed
to the applications running on the same machine as NTP, are
an output of the cluster algorithm; the cluster algorithm
selects one of the surviving truechimers as the system peer,
and the system inherits its variables (, , , , t).
Selection Algorithm

The selection algorithm tries to find out an intersection interval that


contains the majority set of the truechimers. It is focused on the
exclusion of Byzantine faults.
For the scope of the algorithm, each server is identified by its
midpoint (the offset ), its upper endpoint + , and its lower
endpoint , where is the root synchronization distance.
It may happen that the nonempty interval cannot be found; in this
case, the number of falsetickers is increased by one, and the
algorithm tries to find the nonempty intersection that contains
midpoints of all minus one truechimers, and so on.
Two possible outcomes are expected: a nonempty interval is found
and the number of truechimers is greater than the number of
falsetickers.
Clustering Algorithm
The following variables are considered by the cluster
algorithm for each candidate p belonging to the majority
clique: the current offset p, the current jitter p, and the QFp
= stratump .
MAXDIST + where stratump is the stratum of the considered
candidate, MAXDIST is the maximum allowed distance, usually
set to 1 s, and is the root synchronization distance.
Each candidate is used as the reference, and the selection
jitter is calculated by:

Two conditions terminate the clustering algorithm: if the s is


less than the minimum peer jitter p (which means that no
improvement is possible by discarding candidates), or the
number of survivors is less than a given threshold.
Combine Algorithm
The combine algorithm receives as input the peer offset and
jitter statistics of the remaining survivors after the clustering
algorithm.
Then, the combine algorithm outputs the combined system
offset and system peer jitter p.
The standard recommends weighting the statistics coming
from each server j using the weighted average as:
Clock Discipline Algorithm
In NTP, the strategy adopted by the clock discipline algorithm
is rather complex since it is the combination of two feedback
controllers.
Basically, there is a phase-locked loop (PLL) controller that
periodically corrects the time error with update intervals of
microseconds.
Besides, a frequency-locked loop (FLL) periodically acts on the
frequency error with the update interval .
The twin approach is used since usually the PLL is better if the
network jitter dominates, while the FLL is better if the local
oscillator frequency instability is greater than other
contributions.
Simple Network Time Protocol

Servers and clients may comply with a subset of NTP,


implementing the RFC4330 Simple Network Time Protocol
(SNTP).
The basic difference to NTP is that SNTP does not implement
the mitigation algorithms.
SNTP is used in primary servers that have a single reference
clock, or in clients with a single upstream server.
The behavior of an SNTP server is indistinguishable from an
NTP server from the on-wire protocol point of view.
When a client request is received, the SNTP server constructs
and sends the reply packet only adding the transmit
timestamp.
Outline
Introduction

Clock Synchronization in a Nutshell

Network Time Protocol (NTP)

Precision Time Protocol (IEEE 1588 PTP)

Implementation and Application Issues

Conclusion
IEEE 1588 Precision Time Protocol
The IEEE 1588 standard specifies the PTP enabling highly accurate clock
synchronization in packet-based networks.

PTP has been designed as a general-purpose synchronization protocol,


which can be used over any kind of network and topology.

PTP is a masterslave synchronization protocol defining mechanisms to find


the best master in the network, and to synchronize all slave devices to the
master.

Clocks can be categorized into ordinary clocks, boundary clocks, end-to-end


transparent clocks, and peer-to-peer transparent clocks.

The class of ordinary clocks consists of master clocks, which provide the
time reference to other nodes, and slave clocks, which synchronize to a
master clock.

It consists of the local clock, the PTP control engine, the data and port data
sets, timestamping functions for event messages, and application-specific
functions.
Precision Time Protocol (Contd..)
Precision Time Protocol (Contd..)
A dedicated master clock synchronizes a group of slaves. This master clock
can be either a boundary clock, a clock synchronizing itself to another PTP
clock, or a PTP grandmaster, which is ideally the best synchronized node in
a whole system, such as a node connected to a GPS receiver or an atomic
clock.

The protocol has two phases, the start phase and the synchronization
phase.

In the start phase, the best master clock (BMC) algorithm is elected by the
so-called BMC algorithm, which finds the device with the best accuracy.

After the BMC algorithm has decided which node to promote as master
clock, the synchronization phase is started where the slave clocks
synchronize to the master clock by an exchange of synchronization
messages.
Master Election: Best Master Clock Algorithm (BMC)

The BMC is executed independently on each clock, and every


clock makes the master decision on its own.
The data comparison algorithm ranks the clocks and
determines which clock is the best.
An algorithm that computes the recommended state of the
synchronization state machine.
This data set includes the priority, clock class, clock accuracy,
clock stability, second priority, and clock identity.
If the identity does not match, subsequently the priority, clock
class, clock accuracy, clock stability, second priority, and clock
identity are compared; and a ranking between the clocks can
be made.
Master Election: Best Master Clock Algorithm (BMC)
(Contd..)
Synchronization in PTP

The synchronization process in PTP is based on timestamps


that are taken at the ingress and egress of event messages.

IEEE 1588 defines four types of event messages: Sync,


Delay_Req, Pdelay_Sync, and Pdelay_Resp.

In addition to event messages, general messages are used to


transport non-timing critical data between the devices, such
as Announce or Follow_Up messages.
Offset and Skew Correction
Offset and Skew Correction (Contd..)

The synchronization in PTP uses the two-way synchronization


principle; thus, it compensates for the path delay by round-
trip measurements.
In the delay requestresponse mechanism, the master
transmits periodic Sync messages to the slaves at time t1.
The slave takes the timestamp t2 at the arrival of the Sync
message.
The master may have either included its own egress
timestamp t1 already in the Sync message or it may use the
Follow_Up message to transport the timestamp to the slave.
Similarly, the slave transmits a Delay_Req message and takes
the egress timestamp t3.
Offset and Skew Correction (Contd..)
The master receives this message at t4 and submits t4 within
the Delay_Resp message back to the slave.
When the slave has received at least two Sync messages, it
can estimate the clock skew by dividing the timespans elapsed
in the master and the slave, and in consequence, it can adjust
its rate to the master.
When the master and slave clocks have approximately the
same clock rate, then only the initial clock offset toff exists due
to different bootstrapping times.
The offset toff can be exactly determined by the timestamps t1
to t4 and the link delays tms and tsm by
Asymmetry Correction
Commonly used media, such as switched Ethernet, wireless
networks, or wide-area networks, impose different delays for
the receive and transmit path and thus create asymmetry.
Although asymmetry fields in the protocol have been
introduced in PTP version 2, asymmetry is not detectable by
PTP.
The delays tms and tsm are composed of the meanPathDelay =
(tms + tsm)/2 and the delayAsymmetry as follows:

tms= meanPathDelay + delayAsymmetry


t sm= meanPathDelay - delayAsymmetry
End-to-End and Peer-to-Peer Synchronization
The delay requestresponse synchronization mechanism is
applicable for ordinary or boundary clocks that are connected
by any kind of network topology.
Ordinary clocks have a single clock port and may either be
master or slave.
Clock data sets and the local clock are shared to all ports but
each port runs its individual protocol state machine.
Thus, a boundary clock may serve as slave clock on one port
and as master clock on the other port.
The peer-to-peer mechanism is used to measure the link
delay between two clock ports. With the gathered
information, ordinary and boundary clocks can synchronize
using the peer delay information and the information
contained in the Sync and Follow_Up messages.
Transparent Clocks
The accuracy and precision of PTP relies on the timely delivery
of event messages; that is, event messages should have
constant transmission latency and the latencies in both
directions should be identical or known.
Real-world equipment often does not offer a constant latency
for a number of reasons.
This variable delay leads to timestamp jitter and in
consequence degrades the synchronization accuracy.
A transparent clock is a network that measures the residence
time of PTP event messages within the device.
As a result, the slave clocks still receive event messages with a
variable delay, but the magnitude of the variable delay is
measured and sent to the slave clocks in order to compensate
for the packet delay variation.
Transparent Clocks (Contd..)
Transparent Clocks (Contd..)
In IEEE 1588, two types of transparent clocks are defined: end-to-
end transparent clocks and peer-to- peer transparent clocks.
An end-to-end transparent clock supports the use of the end-to-
end delay measurement mechanism between ordinary and
boundary clocks.
It timestamps all ingress event messages and forwards them
through the switching element to the egress port. The egress port
takes another timestamp.
The difference between these timestamps is the residence time
within the transparent clock.
In a one-step, end-to-end transparent clock, the PTP correction field
within the event message is directly updated.
A two-step transparent clock, on the other hand, needs to find the
Follow_Up frame matching to the event message and modify the
correction field.
Transparent Clocks (Contd..)
A change in the routing between master and slave changes the path
delay between master and slave and therefore temporarily
degrades the synchronization until the synchronization has
resettled.
Peer-to-peer transparent clocks additionally provide corrections for
the propagation delay of a link that receives PTP event messages.
When using the peer-to-peer delay measurement mechanism,
propagation delays are corrected on a link basis instead of end-to-
end.
Thus, any change in the routing immediately changes the path delay
correction, and therefore, the synchronization does not degrade in
case of dynamic packet routing.
The residence time measurement in transparent clocks is calculated
by the difference of the egress and ingress timestamps generated
from the local clock.
Timestamp Generation
Commonly, timestamping is classified into hardware- and
software-based approaches.
Hardware-based timestamping generates the receive and
transmit timestamps with the aid of dedicated logic. These
approaches may either estimate the timestamp based on the
received and transmitted signal.
Software timestamps can be taken within the device driver,
when processing interrupt requests, or within the
synchronization application.
With the increasing number of network layers, the jitter
increases due to nondeterministic processing delays, and
therefore, the timestamping should be as close as possible to
the medium.
Timestamp Generation(Contd..)
Timestamp Generation(Contd..)

When using the PTP numbering for egress timestamps, t1 and t3, let the transmission at
master or slave be issued in software at time t1 or t 3.

After a certain latency (p1, p3), the first bit of the message is put on the line. After the
propagation delay (tms, tsm), the first bit of the message arrives at the receiver.

Finally, when the entire frame is received, the frame is passed through the network
stack, and the payload is presented to the synchronization application (receive
complete).

p1 and p3 are dependent on the implementation of the network stack in the master or
slave.
Outline
Introduction

Clock Synchronization in a Nutshell

Network Time Protocol (NTP)

Precision Time Protocol (IEEE 1588 PTP)

Implementation and Application Issues

Conclusion
Implementation and Application Issues

The performance of clock synchronization can be quantified


by the statistics of the offset e =ts tm between the slave clock
ts and the master clock tm.
To assess the offset between master and slave, it is common
practice to use a one-pulse per second (PPS) signal generated
at the master and slave.
Commonly used statistics are the mean clock offset and the
standard deviation , also termed jitter.
reflects any bias and asymmetry in the synchronization
path, while is influenced by the quality of the timestamps,
the synchronization interval, the stability of the local clocks, as
well as the control servos.
Implementation and Application Issues (Contd..)

Difference between the slave clock and the received


timestamp from the master, is not an appropriate measure for
the synchronization performance.

As the slave is unaware of any asymmetry or bias in the


system, it cannot detect clock offsets.

An external unbiased measurement instrument, such as a


time interval measurement instrument or an oscilloscope, is
required to determine the synchronization performance.
Synchronous Ethernet and PTP
IEEE 802.3 Ethernet [17] can be considered as the state-of-
the-art communication technology for home, office, and even
industrial networks.

The two most common implementations are 100Base-TX and


1000Base-T. Both 100Base-TX and 1000Base-T transmit the
information with a symbol rate of 125 MS/s.

100Base-TX and 1000Base-T differ in the interface to the


physical layer transceiver (PHY) and thus require different
hardware timestamping logic.

The receive clock is synchronous to the transmitter on the


other end of the line.
Synchronous Ethernet and PTP (Contd..)

Synchronous Ethernet (SyncE) was created to fill this gap with the
ITU-T recommendation G.8262.
The idea behind SyncE is to provide high frequency stability through
syntonization with a clock distribution concept that resembles a
cascade of PLLs.
The master node, which is connected to an external reference clock
signal, embeds the clock into the Ethernet transmit signal.
Switches recover the clock, clean it using PLLs, and use it to embed
the clock in the transmit signal until it reaches the final destination.
The SyncE concept was well accepted by telecom carriers as the
core network required no major changes for the introduction of
SyncE.
Synchronous Ethernet and PTP (Contd..)
A particular issue in both 100Base-TX and 1000Base-T is the
asymmetry of the PHY devices and the cabling. The propagation
delays of the wire pairs of a category 5E Unshielded Twisted Pair
(UTP) cable are permitted to differ by up to 50 ns according to the
ANSI/TIA/EIA 568-B specification.

This results in an unresolvable synchronization offset of up to 25 ns


per link.

PTP can also be used with software timestamping and standard


switches instead of PTP transparent or boundary clocks.

Software-based synchronization approaches may reach


synchronization accuracies of about 10 s.
Conclusion
Distributed systems need clock synchronization as a basic network
feature.
In packet-based networks, which are the most commonly used
network concepts in IT and automation environments, this always
boils down to determining the message delays over the network
and taking them into account when adjusting the local clock.
NTP and PTP emerged in different application contexts, but their
basic operation is very similar as they both essentially rely on the
two-way synchronization principle using round-trip delay
measurements.
NTP, with its strictly distributed and fault-tolerant approach of
finding a good agreement between several time servers, is ideally
suited for large-scale networks such as the Internet with unclear
and changing topologies.
Conclusion

PTP, on the other hand, using a simpler masterslave


approach, is better suited for smaller-scale networks with
clear, well-maintained topology where synchronicity is more
essential than in IT environments and thus resynchronization
takes place much more frequently.

Provisions to achieve a high accuracy are significantly more


elaborated such as transparent clocks to measure the
residence time of packets in network elements like switches.
Thank You!

Questions??

Vous aimerez peut-être aussi