考虑到无线传感器网络时钟同步多跳误差累积问题,提出一种基于动态生成树的全网时钟同步算法,只需由根节点开始沿树边广播一次同步消息,全网待同步节点即可采用时钟偏差补偿,并结合贝叶斯后验估计算法对时钟进行准确估计。一个同步轮次内每个节点至多广播两次消息即可完成全网同步。使用OMNeT++软件进行仿真实验表明算法有效降低了多跳累积误差,提高了同步精度,且具有较快的收敛速度和较低的开销。
For wireless sensor networks spanned many hops and the synchronization error accumulated while the path length grows, this paper proposed an Ad hoc tree structured synchronization algorithm for WSNs. As a root of time synchronization path, root node broadcasted only one message along the tree edges, could synchronizate all nodes through the clock offset com- pensation and Bayesian posterior estimation. Each node was able to achieve network-wide time synchronization by broadcasting at most two messages. Simulation on OMNeT + + shows the proposed algorithm can effectively reduce the synchronization error. it is a fast, resource-efficient algorithm with high synchronization precision and low overhead.