IEEE 1588 Protocol
The
IEEE 1588 standard is known as "Precision Clock Synchronisation
Protocol for Networked Measurement and Control Systems" or "PTP" for
short. PTP defines a procedure allowing many spatially
distributed real-time clocks to be synchronised through a
"package-compatible" network (normally Ethernet). The technology behind
the standard was originally developed by Agilent and was used for
distributed measuring and control tasks. The challenge was to
synchronise networked measuring devices with each other in terms of
time so that they are able to record measured values and provide them
with a precise system time stamp. Based on this time stamp, the
measured values can then be correlated with each other.
Synchronisation principle
In
Ethernet systems, unpredictable collisions due to the CSMA/CD procedure
may lead to time packages being delayed or disappearing completely. For
this reason, IEEE 1588 defines a special "clock synchronisation"
procedure.

First,
one node (master clock) transmits a "Sync" telegram, which contains the
estimated transmission time. The exact transmission time is captured by
a clock and transmitted in a second "Follow Up" message. Based on
the first and second telegram and by means of its own clock, the
receiver can now calculate the time difference between its clock and
the master clock. To achieve the best possible results, the time stamps
should be generated in hardware or as close as possible to the hardware.
The telegram propagation time is determined cyclically in a second
transmission process between the slave and the master ("delay"
telegrams). The slave can then correct its clock and adapt it to
the current bus propagation time.
Configuration
A
PTP network configures and segments itself automatically. For this,
each node uses the "best master clock" algorithm (BMC) in order to
determine the best clock in the segment. Every PTP clock stores
its features within a specified dataset. These features are transmitted
to other nodes within its "Sync" telegrams. Based on this, other nodes
are able to synchronise their datasets with the features of the actual
master and can adjust their clocks accordingly. Due to the cyclic
running of the BMC, nodes can also be connected or removed during
propagation time (hot plugging).
No distinction is made
in the protocol between a software clock and a hardware clock. However,
to be able to work with synchronism in the nanosecond
range, hardware support is required. Generally, the
synchronisation errors – caused by software jitter – cannot be
eliminated. With a pure software solution (e.g. Windows systems), the
error may actually be in the micro- or milli-second range. |