Font Size: a A A

Research And Design Implementation Of Precise Clock Synchronization System Based On IEEE 1588 Protocol

Posted on:2020-11-20Degree:MasterType:Thesis
Country:ChinaCandidate:W J TaoFull Text:PDF
GTID:2428330575996960Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
With the rapid development of information age,clock synchronization technology plays a very important role in all walks of life,especially the distributed measurement and control system has higher and higher precision for clock synchronization.Although,the traditional NTP protocol is widely used,it can only reach the synchronization level of up to milliseconds,cannot be applied to occasions where the synchronization accuracy is higher;GPS can achieve high-precision positioning and timing functions,but the installation of GPS equipment is expensive,and there are political risks,so it is also not suitable for large-scale use.The IEEE 1588 protocol can achieve sub-microsecond synchronization levels,and has many advantages such as high precision,easy implementation,and low cost.It can be widely used in distributed measurement and control systems.Based on the in-depth analysis of IEEE 1588 protocol,this thesis studies the synchronization mechanism and optimal master clock algorithm of IEEE 1588 protocol,a software implementation framework based on the IEEE 1588 protocol is designed to modularize the functions of each component,the filtering algorithm(FIR and IIR filter)is used to filter the clock deviation and link delay,which reduces the jitter generated during the transmission of clock information,and the frequency compensation algorithm(PI controller)is used to compensate the frequency deviation of the slave clock relative to the master clock,finally,phase synchronization and frequency synchronization are realized.This thesis designs two methods to implement IEEE 1588 protocol,which is based on IEEE 1588 protocol network layer implementation method and MAC layer implementation method.The network layer implementation method is implemented in pure software mode based on PTPd2,and the packet timestamp is obtained at the network driver layer,and the timestamp of the packet passing through the MAC layer is captured by Wireshark package capture software,By compensating the time that the message is transmitted from the network driver layer to the MAC layer in the master-slave clock,the timestamp can be obtained approximately in the MAC layer,thereby improving the synchronization accuracy;The MAC layer implementation method is implemented in hardware,STM32F407 is used as clock node,DP83848 is used as physical layer chip,and LwIP light protocol stack is transplanted as the basis of network communication,the hardware automatically obtains the timestamp of the communication message to reach the MII/RMII interface between the MAC layer and the physical layer,and finally implements clock synchronization.Finally,the performance of clock synchronization is tested,perform experimental tests by setting different Announce message receiving periods,different synchronization periods,different P?I values,compensating for outbound time,and connecting different intermediate devices,finally,the synchronization accuracy of the network layer implementation method can reach 19?s,and the clock synchronization accuracy of the MAC layer implementation method can reach 28 ns.The test results show that the clock synchronization system based on IEEE 1588 protocol designed in this thesis can meet the needs of most occasions.
Keywords/Search Tags:clock synchronization, IEEE 1588, frequency compensation, network layer implementation, MAC layer implementation
PDF Full Text Request
Related items