Hardware Assisted Full Time Synchronization of EtherCAT Network with Cable Redundancy
Ben Zhang, Tao Tao, Xuesong Mei · 2024
The nodes in a distributed control system require precise time synchronization to accomplish cooperation tasks. EtherCAT, as a commonly used serial bus in the industry, can only achieve time synchronization between slaves. The time differences between the master and the slaves are relatively large. In this work, we develop a hardware assisted solution to achieve full time synchronization in the EtherCAT network. The proposed solution synchronizes all slaves with distributed clock to the master. The master time is maintained by programmable hardware and serves as the system time. Using the timestamps generated by hardware, the wire delays between the master and the slaves are calculated. During drift compensation step, the hardware embeds the master time into the drift compensation frame generated by the software. The proposed solution also compensates for changes in propagation delay caused by a cable disconnection, thereby quickly restoring synchronization performance. By performing extensive experiments, the proposed solution achieves synchronization accuracy of 0.1us in both single-port and cable redundancy mode. The means of system time differences are less than 30.54ns with standard deviations less than 36.23ns. The maximum change in system time differences when a cable is disconnected does not exceed 1us, and synchronization is restored within 50 drift compensations.