针对现有时间同步算法存在能量开销大、同步频次高等问题,提出了一种能量有效的自适应WSN时间同步算法。该算法基于簇状网络拓扑结构并分为两个阶段。同步阶段:簇头与簇成员节点分别采用SR主动消息交换机制与RO被动监听捎带机制实现与参考节点的同步,并通过最大似然估计修正节点时钟相偏、频偏提高同步精度。重同步周期调整阶段:簇头估计簇同步误差,并动态调整簇重同步周期,优化节点间同步分组数,降低同步开销。仿真结果表明,该算法同步精度可达19.5μs,较PBS算法提高18.2μs,且在单轮次同步分组数为15时能耗最低,具有较好的能量有效性。
Aiming at the problem of high energy overhead and high frequency of synchronization in typical algorithms, an energy-effective and adaptive WSN time synchronization algorithm is proposed. Based on the clustering topology, the algorithm is divided into two phases. In the first phase, the cluster head synchronizes the reference node with a SR mechanism, while the cluster members synchronize the reference node with a RO mechanism by listening to the packets that sending by the cluster head. The algorithm adopts the maximum likelihood estimation for the clock offset and skews correction, which gets a good precision. In the second phase, the cluster head estimates the cluster synchronization error and regulates the re-synchronization period dynamically according to the accuracy requirement, then estimates the optimal number of synchronous message in every synchronization period. The experimental results show that the synchronization accuracy is almost 19.5 μs which improved by 18.2 μs compared with the PBS algorithm, and the lowest energy consumption will be accomplished when the synchronous package is 15 in second phase, which implements better energy efficiency.