US 12,314,198 B1
Synchronization optimization method for EtherCAT master slaves
Yinglian Jin, Zhejiang (CN); Binrui Wang, Zhejiang (CN); Haochun Wang, Zhejiang (CN); Kun Zhou, Zhejiang (CN); Shanqiang Wu, Zhejiang (CN); Wei Song, Zhejiang (CN); Tao Zheng, Zhejiang (CN); and Xianlei Chen, Zhejiang (CN)
Assigned to CHINA JILIANG UNIVERSITY, Hangzhou (CN)
Filed by CHINA JILIANG UNIVERSITY, Zhejiang (CN)
Filed on Aug. 12, 2024, as Appl. No. 18/800,161.
Application 18/800,161 is a continuation of application No. PCT/CN2024/103186, filed on Jul. 2, 2024.
Claims priority of application No. 202410511726.5 (CN), filed on Apr. 26, 2024.
Int. Cl. G06F 13/20 (2006.01)
CPC G06F 13/20 (2013.01) [G06F 2213/40 (2013.01)] 9 Claims
OG exemplary drawing
 
1. A synchronization optimization method for EtherCAT master-slaves, comprising steps of:
capturing a time when a master sends a data frame and a time when the master receives the data frame, capturing a time when a reference slave receives the data frame, calculating a transmission delay between the master and the reference slave, and obtaining a compensated transmission delay between the master and the reference slave;
calculating a time taken for the data frame to leave a parent port of a non-reference slave and return to the parent port of the non-reference slave, calculating a transmission delay, a clock offset, and a clock drift for the non-reference slave;
compensating for the clock drift by adopting a double exponential smoothing algorithm, subtracting the compensated clock drift from the clock offset and obtaining a new clock offset, writing the new clock offset into the non-reference slave for compensation to complete a synchronization optimization; and
before the step of capturing a time when a master sends a data frame and a time when the master receives the data frame, further comprising: by sending the data frame through the master, capturing a number of slaves, a first port of each slave that receives the data frame, and active ports of each slaves, determining a parent and a parent port of the non-reference slave based on the number of connected slaves and a port transmission sequence.