Font Size: a A A

Clock Synchronization Based On IEEE 1588 Protocol For Industrial Ethernet

Posted on:2011-11-29Degree:MasterType:Thesis
Country:ChinaCandidate:S Q GuanFull Text:PDF
GTID:2178360308469389Subject:Control Science and Engineering
Abstract/Summary:PDF Full Text Request
The distributed systems are applied widely in communication, navigation and power fields. With growing in both system complexity and speed of data exchange, the better and better real-time performance of systems is required. The key of ensuring real-time performance of system is to make all the nodes' clock to be synchronized correctly in the network. Therefore, it is of great theoretical and practical value to study the high-precision clock-synchronizing technique, in order to solve real-time communication in the distributed measurement and control systems. In this paper, considering the application background, the distributed clock-synchronizing technique based on the IEEE 1588 protocol is mainly researched in the environment of industrial Ethernet.Firstly, the pros and cons of several existing clock synchronization methods are compared. The domestic and abroad research of high precision clock-synchronizing is reviewed, and the synchronization principles and key algorithms of IEEE 1588 protocol are introduced in detail. Secondly, considering the features of clock-synchronizing system, on the basis of a TI LM3S8962 chip, we present a system hardware design, which includes the power, serial communication, Ethernet interface modules. On the premise to guarantee the accuracy of system clock,μC/OS-Ⅱis chosen as the real-time operating system to manage various clock synchronization tasks. Meanwhile, the entrance to critical region is implemented by locking the task scheduler instead of turning on or off the interrupts, which results in shortening of response time ofμC/OS-Ⅱinterrupts and further improves the real-time performance. Additionally, the light-weight TCP/IP stack (LwIP) is migrated to operating system, and the driver of Ethernet adapter as well as the mailbox chained list are coded, which then established the basis of UDP/IP protocol for transmission of clock-synchronizing messages.Thirdly, we emphasize the implementation of IEEE 1588 server and client into target boards. The building of development platform and the framework of system software are presented, and the coordination relationship between interrupts and tasks is clarified. To preserve the key point of an accurate system time measurement, a solution considering both long-time stability and immediate timeliness is proposed. Here, the satellite time frame from serial interface is used to calibrate the local clock at an interval of one or several PPS, and the high-priority timer interrupt is adopted to maintain the precise time during the short interval. Moreover, a RTC module is presented to avoid the loss of time information during power-off period. To meet the requirement of system manage and parameter setup, the system manage module is also designed. Based on the above work, the software of IEEE 1588 server and client is completed, and the UDP/IP communication of their clock-synchronizing messages is implemented with the APIs of LwIP protocols.Finally, the synchronization performance of the IEEE 1588 synchronization system is tested through simulating environment in lab. The experimental results show that the synchronization precision is sub-microsecond, meeting the requirement of high precision of clock-synchronizing in most distributed measurement and control systems, and there would be a brighter prospect by applying it into practice.
Keywords/Search Tags:IEEE 1588 standard, clock synchronization, Industrial Ethernet, μC/OS-II real-time operating system, LwIP procotol
PDF Full Text Request
Related items