What is Precision Time Protocol?
The Precision Time Protocol (PTP) specified in IEEE 1588-2008 standard is a self-organizing and optionally hardware supported time synchronization protocol, the protocol operates on master/slave hierarchy on local area networked devices and provides the opportunity to achieve the sub-microsecond level accuracy.
Why Time Synchronization?
The time is a measurable period in which a particular event, process or action may occur. In the domain of distributed systems, it can be used to draw a conclusion on the rate of change, event ordering, an interval between different process and exact time of particular action. A clock is used to measure the specific spot in the time or a whole interval of time. In an embedded system, the clock is driven by an internal oscillator, which generates the signals with a precise frequency. In a networked system, where different nodes having different type of clocks, which are powered by non-identical oscillators. These oscillators are running at different frequencies and having inconsistent behavior in different conditions (Temperature, Voltage), which results in a timing error. So, there is a need for time synchronization to correct the drifting clocks from the reference time.
1. Introduction
The project aimed to implement and analyze the PTP protocol on hardware-assisted IEEE 1588 clock based system-on-chip platform (Beaglebone Black) by using an opensource (LinuxPTP) solution. The document of project summarizes PTP protocol and PTP infrastructure in Linux, and it represents the comparison between software and hardware assist PTP implementation. In order to analyze the performance and behavior of established PTP network, multiple tools are used to simulate the load scenarios in different dimensions (CPU, I/O and network).
Research Objectives and Goals
- Enabling Hardware timestamping capabilities of BeagleBone Black.
- Analyzing the behavior of PTP implementation, with simulated load.
- Analysis of precision uncertainty.
- Maximum attainable accuracy.
Tools and Technologies
LinuxPTP:
ptp4l:
The ptp4l tool synchronizes (by default) PHC (PTP hardware clock) with master clock in network. If the system does not have PHC then it synchronizes the system clock with a master clock using software timestamping, in this case, there is no need of phy2sys tool.
phy2sys:
The phc2sys tool synchronizes Linux system clock to the PHC. In whole process the the phc2sys is synchronized with ptp4l, where system clock act as slave and PHC plays a role of master clock.
2. Methodology
In order to achieve research objectives and to implement IEEE 1588 protocol, linuxPTP (Opensource PTP implementation) application is used on SoC devices (Beaglebone Black) in a Linux environment. The protocol hierarchy is established in different test case scenarios (Hardware assisted and Software based tests ). The log data generated in a specific scenario is prepared and imported to MATLAB workspace, where comparison of results in different scenarios are compiled in graphical form.
Data Collections and Presentation
3. Results
Software Timestamping based Time Synchronization
Hardware Timestamping based Time Synchronization
Comparison of Hardware and Software based Time Synchronization
Hardware Assisted Time Synchronization under Network Load
Download Links and Contact Details
Project Documentation:
Report: Master_Project__PTP_1588
Presentation: Presentation_MasterProject_FH_Kiel
Mudassar Ahmed
mudassar.ahm@hotmail.com