Skip to main content

Network Time Synchronized Solutions

Digital illustration of gears helping to synchronize time.

 

Figure 1: Digital illustration of gears helping to synchronize time.

As digital networks continue to evolve, it is Internet Protocol (IP) based technology that is increasingly being implemented because of its ubiquity, flexibility and scalability. Local Area Networks (LANs), Wide Area Networks (WANs), or even cellular networks, are common examples of IP networks. When they are implemented in industrial control, test and measurement, or even data trunk applications where voice, video, or data are being transported, timing is a critical design consideration. For example, voice and video quality are sensitive to non-deterministic delays and jitter, and robotic machines on an assembly line need to be synchronized with each other.

IP networks and Ethernet were not originally designed to be synchronous as is necessary today. So how does that affect implementation when your product has timing synchronization requirements? Several approaches can been taken. Here, we discuss four common implementations: Network Time Protocol (NTP), Simple Network Time Protocol, (SNTP), Precision Time Protocol (PTP), and timing from navigation systems like Global Positioning System (GPS). Fortunately these different implementations have much in common from an architectural point of view.

Master Clock Source

Synchronous networks usually have a master clock that derives its source from Coordinated Universal Time (UTC), based on the rotation of the earth about its axis and the Gregorian calendar, which is based on the earth’s rotation around the sun.1 UTC has a fixed relationship to International Atomic Time (TAI). The fixed relationship between these two times is based on leap seconds periodically added to UTC to account for the slowing of earth’s rotation. UTC is currently 36 seconds greater than TAI. Another measure is UT1, which is essentially mean solar time at 0° longitude. The relationship between UTC and UT1 is maintained within .9 seconds.

There are time servers around the world, but in the U.S., probably the most commonly used are those of the National Institute of Science and Technology (NIST). NIST provides time based on UTC, UTC1, and Network Time Protocol (NTP) servers from which computers and master clocks in other networks base their timing. However, hundreds of secondary servers exist and timing information can also come from navigation satellites.

Timing Considerations

There are asynchronous and synchronous clocking schemes in network designs. All synchronized approaches require a cohesive hierarchical timing solution. A reference clock is required for synchronization by Network Elements (NE). NEs typically require a Voltage Controlled Crystal Oscillator (VCXO), Phase Locked Loop (PLL), or a clock generator that is adjusted to achieve a synchronized state. Popular choices include Abracon’s ultra-low phase noise VXCO or Renesas / IDT's 82P33814-1NLG synchronization management unit that supports several synchronous modes.

Regardless of what solution is chosen, the design will need to be able to provide the right amount of jitter attenuation and cancellation of phase noise, with the ability to sync with all other NE’s in the network with proper synchronization tolerances. The timing design must also include a holdover feature. Holdover is the ability of the NE to maintain a clock at the last known sync state in case the master or reference clock fails.

Common Synchronization Solutions

Network Time Protocol (NTP) and Simple Network Time Protocol (SNTP)

The most common approach to time synchronization on the public Internet is NTP, and its simpler version, SNTP. The public NTP subnet has servers located on all continents, in space, and even on the ocean floor, supporting millions of computers on the global Internet.2 NTP servers base their time on UTC, however NIST now has a NTP server based on UT1.3

NTP uses software timestamps to achieve time synchronization so accuracy varies over a wide range from 10µs to 100ms or more. Many factors contribute to variances, but it’s usually due to latency variables in network propagation, hardware, and operating systems, oscillator drift due to ambient temperature changes, and the interval of time between timing updates1.

When determining timing adjustments that need to be made to a client’s local clock, roundtrip propagation delays need to be factored out. NTP and SNTP use the same process to determine correction factor. Calculations are made with the assumption that delay is the same in both directions. Thus, a four packet exchange between the client and the server takes place.

The primary difference between NTP and SNTP is that SNTP clients periodically sync their timing directly from a single SNTP server. Therefore, SNTP is used in applications that don’t require high degrees of accuracy.4 NTP has intricate state-based algorithms to improve accuracy.

Synchronization paths on the first three stratums (Source: Wikipedia)

 

Figure 2: Synchronization paths on the first three stratums (Source: Wikipedia)

NTP can operate in multicast/anycast, client-server, or peer-peer modes, while SNTP typically operates in a client-server mode. The NTP system for distributing timing information is hierarchical and established as levels, where a level is assigned a number called a stratum. Stratum 1 servers are the lowest level, synchronized to national time services, whereas higher level stratums are synchronized to lower level stratums.2 (The Network Time Foundation5 is a good practical source of information for further study and it provides a reference implementation called NTPd for Unix and Windows operating systems.)

IEEE 1588 Precision Time Protocol (PTP)

PTP is quickly becoming the preferred timing synchronization solution in Ethernet packet networks, particularly in industrial control, telecom, and test and measurement applications because it is more precise and more deterministic than NTP. PTP is similar to NTP in many ways, but there are a couple of key differences.6 First, timestamps for the client are implemented using hardware rather than software, and are placed as close as possible to the network interface to eliminate irregular latencies related to client software, which contributes to improving accuracy within the nanosecond range. The second difference lies within the robustness the PTP network’s master clock selection process.

Synchronization mechanism and delay calculation - offset correction = ó (Source: Wikipedia)

 

Figure 3: Synchronization mechanism and delay calculation - offset correction = ó (Source: Wikipedia)

With PTP, timing information is distributed hierarchically throughout a network in a type of master-slave architecture. The timing source’s root is TAI-based. Software called the Best Master Clock (BMC) algorithm choses the “grandmaster” clock from all available clocks. Timing then flows down through each PTP subdomain.

Master clocks for PTP subdomains are also chosen using the BMC approach. Multicast transmission is the primary way clocks are distributed, but an end-client could synchronize to a master clock using direct communication, initiating the timing request in a unicast fashion. There is also the possibility of a “transparent clock” that network switches might implement to modify timestamps in PTP messages before passing them to PTP subdomains. This modification acts as a calculated delay through local equipment to improve the accuracy of the timestamp for receiving subdomains.7

Good PTP solutions exist, but the choice comes down to having a discreet transceiver solution coupled with a PTP software stack in the microcontroller, or a microcontroller-based solution and protocol stack. The Network Time Foundation has an open source PTP stack implementation call PTPd, which is free to download.8 The most notable discrete solution is the Texas Instruments’ (TI) DP83640; a very versatile part that, amongst other modes of operation, outputs a slave node clock that is synchronized to the Grand Master clock in both frequency and phase down to the sub-nanosecond range. It also performs NTP time stamping as well. TI has excellent application notes that explain device configuration and how to achieve high levels of accuracy.9

Global Positioning System (GPS)

Space-based navigational systems

 

Figure 4: Space-based navigational systems comprise a collection of satellites that circle the globe. These systems provide very precise time and location.

Space-based navigational systems comprise a collection of satellites that circle the globe. These systems provide very precise time and location. The U.S. system is called the “Global Positioning System” (GPS). Russia’s “GLObal NAvigation Satellite System” (GLONASS), China’s “BeiDou Navigation Satellite System” (BeiDou-2), and India’s, “Indian Regional Navigation Satellite System” (IRNSS) exist, and other countries are developing their own systems.

GPS satellites have onboard atomic clocks, all in sync with each other, and are periodically adjusted for synchronization with ground clocks. Time is calculated based on the periodic timestamp transmissions given by each of a minimum of 4 satellites, factoring out transmission delays. The delay is relatively simple to calculate, since signals travel at the speed of light and satellites transmit their location.

Unlike NTP and PTP, variable latency issues are not as much of an issue with GPS because timing information comes directly from satellites. The only limitation is that there must be an unobstructed line of sight for the receiver. Atmospheric variables and issues related to where the satellites are located relative to the receiver can also affect precision. As it is expensive to have a receiver on every network element, they are usually added judiciously to control costs. Still, GPS time has become more affordable, producing a practical synchronization precision down to 100ns.

One nice feature is that GPS receivers can be used in closed networks, where there is no connection to the Internet. They also provide an affordable grandmaster for PTP networks.

Conclusion

In addition to the timing synchronization methods mentioned, there are others like Synchronized Ethernet (SyncE) and Inter-Range Instrumentation Group time codes (IRIG time codes) that are worth further study. Both of these methodologies distribute signals to facilitate synchronization but require specialized hardware. Synchronized Ethernet is a standard that is becoming increasingly popular as legacy Time Division Multiplexing-type networks evolve to IP-based switching and multiplexing implementations. (The DP83640 mentioned earlier can be used for Synchronized Ethernet designs10 ). For further exploration, see governing standards: ITU-T Rec. G8261, 62, & 64 from the International Telecommunications Union.11 Networked timing synchronization solutions can be implemented using a combination of methods mentioned. For example, a PTP based industrial control network can derive its grandmaster clock from a GPS receiver. Other options for the grandmaster could be derived from an NTP-derived server. Many viable methods and combinations can work together to ultimately produce very accurate time synchronization through a network, but each is unique, especially as both the network and technology grow to meet the demands of a modern world.


1David L. Mills, “Executive Summary: Computer Network Time Synchronization”, [Internet – WWW, URL], https://www.eecis.udel.edu/~mills/exec.html, 12 May 2012.
2David L. Mills, “How NTP Works”,[Internet-WWW,URL], https://www.eecis.udel.edu/~mills/ntp/html/warp.html, 10 March 2014.
3National Institute of Science and Technology, “NIST Internet Time Service (ITS)”, [Internet-WWW, URL], http://www.nist.gov/pml/div688/grp40/its.cfm, 5 May 2016.
4David L. Mills, “Simple Network Time Protocol (SNTP) Version 4 for IPv4, IPv6 and OSI”, [Internet-WWW, URL], https://tools.ietf.org/html/rfc4330, January 2006.
5Network Time Foundation, “NTP: The Network Time Protocol”, [Internet-WWW, URL], http://www.ntp.org/, 31 May 31, 2016.
6David L. Mills, “IEEE 1588 Precision Time Protocol (PTP)”, [Internet-WWW, URL], https://www.eecis.udel.edu/~mills/ptp.html, 18 May 2012.
7National Institute of Science and Technology, “Meanings of Common Terms Used in IEEE 1588”, [Internet-WWW,URL], http://www.webcitation.org/5qaBMRXjA, 18 June 2010.
8Network Time Foundation, “PTPd Project”, [Internet-WWW, URL], http://nwtime.org/projects/ptpd/, 1 June, 2016.
9Texas Instruments, “AN-1729 DP83640 IEEE 1588 PTP Synchronized Clock Output”, [Internet-WWW, URL], http://www.ti.com/lit/an/snla099d/snla099d.pdf, April 2013
10Texas Instruments, “AN-1730 DP83640 Synchronous Ethernet Mode: Achieving Sub-Nanosecond Accuracy in PTP Applications”, [Internet-WWW,URL], http://www.ti.com/lit/an/snla100a/snla100a.pdf, April 2013.
11International Telecommunication Union, “Transmission systems and media, digital systems and networks”,[Internet-WWW,URL], http://www.itu.int/rec/T-REC-G/en, 10 May 2016.