Highly accurate synchronization of system time in distributed sys-tems with IEEE 1588 PTP What is IEEE 1588 PTP? IEEE 1588 is a standard to synchronize the clocks of distributed devices in a network. Current protocol versions are based on the specification IEEE 1588-2008, also called 1588 V2. Depending on the hardware and topology used, accuracy down to a two-digit nanosecond range can be achieved. With an in-creasing number of devices providing hardware support for IEEE 1588, also the number of applications grows. Having the same time in all devices of a network was up to now usually solved in different ways.
The first and easiest one was to distribute a common trigger signal from a master clock device to all other devices with a separate trigger cable. Accuracy is limited by the delay of the signal on the cable and thus by the cable length, as well as by the quality of the master clock. For several applications an additional cable was not applicable due to system requirements or price issues. Second possibility is to equip as many devices as possible with highly accurate time sources – for instance a GPS receiver. Depending on the local environment some devices will not be able to receive GPS or other radio signals as they are indoor, underground or shielded in many other ways.
In addition, for many devices such as smaller, cost sensitive sensors a GPS receiver is too expensive. IEEE 1588 PTP does not require additional cabeling for a separate synchroni-sation signal or external time sources. It can therefore also be added to existing systems or applications where such extensions arenot applicable. Typically, IEEE 1588 is used in Ethernet based networks. However, it is not limited to the physical layer or a transport protocol if typical characteristics of the bus system or network and the protocols are taken into account for delay compensation.
What are the use cases? The IXXAT IEEE 1588 solutions are used in various applications. For instance, the measurement data of several hundreds of distributed sensors is synchro-nized to allow for highly accurate data acquisition in geological measurements. Besides of the high accuracy of the time synchronization, the system also re-quires a very high robustness and fault tolerance, as retrieving the sensors from their position is extremely time consuming and thus expensive. With the number of electronic transactions on financial markets ever increasing, it becomes more and more important to know which transaction was placed at what time.
When looking back to the rapid changes in value at the stock mar-kets, fractions of a second can influence the amount of money earned or lost dramatically. IXXAT’s solutions are also used here to synchronize servers and clients on one another. One huge field of application is telecommunication where for instance compo-nents in the mobile backhaul have to work with the same time, allowing to hand over one participant from one base station to another.
Other fields of application for IXXAT’s products are synchronizing components of electric power application on the phase of the currency, or synchronizing the data exchange in satellites.
Picture 1: Sample implementations How can IEEE 1588 PTP be integrated into customer’s solutions? To provide IEEE 1588 functionality to a system, there are two main components required. The first one is a mechanism to apply time stamps to the incoming packages or external trigger events. This could be implemented in software, but depending on the operating system and other non deterministic influences the accuracy will be in the second or upper millisecond range. For professional applications, the time stamping unit (TSU) has to be implemented in hardware.
The closer it is located to the bus, the better the results will be. Currently there are several vendors of PHYs and microcontrollers with integrated TSUs. For systems, which do not yet have a TSU integrated, or which are using a FPGA anyway, an IEEE 1588 IP-core can be used. IXXAT’s IP-core for instance provides the TSU, a real time clock and also a trigger unit, that timestamps incoming trigger events but also transmits highly precise trigger signals. On top of the TSU, a protocol software processes the time stamps of incoming messages, calculates the offset from the master time, and then adjusts the speed of the real time clock.
These functions are not time critical and thus can easily be implemented on many current CPUs. Adaptations to various CPUs with integrated time stamping units are already available of the shelf.
When setting up new networks, system designers should take care to use switches which are already IEEE 1588 compliant. Unknown package delays in standard switches will have a significant influence on the synchronization quality and should be avoided wherever it is possible. Of course, if the networks already exist, e.g. in telecom applications, the package delay variations can be minimized by applying filters.
Testing PTP systems
To ensure high quality of a PTP system, there are several levels of testing. A hardware abstraction layer (HAL) test allows for checking the correct implemen-tation of the driver for the time stamping unit. In addition, the correct operation of the IEEE 1588 features has to be evaluated systematically. Finally the accu-racy, interoperability, and reliability will be checked with long-term test runs, stress tests and of course during the official IEEE 1588 plug fests. To test measurement systems according to the specification of the LXI consor-tium, a PC based conformance test was developed.
It is based on the IXXAT IEEE protocol stack and external clock hardware. The time critical time stamp-ing of the Ethernet packages is handled in the external clock hardware, which allows for usage of standard PC with Windows while not loosing accuracy by passing the packages from the net up to the conformance test application.
Reference Platforms and test results
Two out of the supported hardware platforms shall be shown more in detail to provide an impression of accuracy which could be achieved. All results were measured on standard evaluation boards with usual low quality oscillators. By replacing the oscillators with heat controlled ones, the accuracy could be im-proved dramatically.
Picture 2: Synchronization start-up of the test systems The MPC8313 is a Freescale communication processor that implements IEEE1588 hardware timestamp support in the Ethernet MAC layer. Both time stamping and implementation of an adjustable real-time clock in hardware ena-bles a synchronization accuracy in the nanosecond range.
One MPC8313E-RDB evaluation board synchronized back-to-back using synchronization interval of 0,125 sec to a MPC8360E-MDS reference board reaches an accuracy of ±50 nsec offset peaks. The standard deviation of the offset between the nodes is 10 nsec. The startup and the synchronization are done very fast. Normally up to 10 synchronization intervals are required to become synchronized.
Picture 3: Master offset of the test systems In co-operation with STMicroelectronics, IXXAT offers an adapted version of its IEEE 1588-2008 protocol software for the STM3220F-EVAL Evaluation board.
The software as binary code is available for download and thus enables a quick and easy introduction to the IEEE 1588 technology. The STM32F207 is a microcontroller by STMicroelectronics that implements IEEE1588 hardware timestamp support in the Ethernet MAC layer. Both time stamping and implementation of an adjustable real-time clock in hardware ena-bles a synchronization accuracy in the nanosecond range. During a long-term test, the system reached, back-to-back synchronized with a precise Master (2 ppm quartz) at a synchronization interval of 0,125 sec, an accuracy of ± 50 nsec (maximum deviation). The standard deviation of the off-set between the nodes is 12 nsec.
The startup and the synchronization are done very fast. Normally up to 20 synchronization intervals are required to become synchronized.
Author
Norbert Binder is sales manager at IXXAT and responsible for the IEEE 1588 area
Company Background
IXXAT Automation GmbH is a leading expert in data communication technologies for embedded systems. Since more than 25 years IXXAT is a reliable and powerful partner as a supplier of products and engineering services for various industries. For industrial communication systems, our core technologies are CAN, various real-time Ethernet standards and time synchronization based on IEEE1588. Besides a broad product range of hardware components, test-/analyzing tools and protocol software, IXXAT acts as system integrators matching solutions for requirements and problems on application and system level for its customers. Our solutions are typically custom specific OEM hardware like controllers, single board computers, I/O modules, gateways or communication modules.
In addition, safety relevant hardware and software solutions according to IEC61508 are developed. For automotive communication systems, the core technologies are FlexRay, CAN and LIN. The focus is on products and solutions for test stands, hardware-in-the-loop and vehicle testing as well as OEM components for utility and specialty vehicles. Currently, the company employs a staff of 80 people, mostly electronics engineers and computer scientists. IXXAT has an ISO 9001 certified quality management system and is represented world-wide by subsidiaries in the USA and France, sales office in Switzerland and Italy and numerous distributors.
