节点间存在的晶振频率偏差是引起时间漂移的最主要原因,针对这个问题,本文提出一种基于晶振频率偏差补偿的时间同步算法,该算利用相邻两次同步过程中记录的时间估算出了与时间基准节点间的晶振频率偏差,并根据晶振频率偏差和双向报文交换模型对时间偏移进行了补偿.试验结果表明,该算法大大提高了同步精度.
The most important reasons that cause time drift is the freqiuency oscillator deviation of different nodes. To address this issue, this paper presents a time synchronization algorithm based on the Quartz Oscillator Frequency deviation compensation. The algorithm estimates Quartz Oscillator Frequency deviation between pending synchronization node and time beacon node by use of the time recorded in two adjacent synchronization process, and pending synchronization nodes realize time synchronization with time beacon node according to Quartz Oscillator Frequency deviation and two-way message exchange model. Experiment results show that the algorithm greatly improves synchronization precision.