| Wireless Sensor Networks(WSN)have significant importance in various fields such as military and civilian applications due to their characteristics of large network scale,strong robustness,and strong self-organization.Many of the technologies in WSN require precise time synchronization to provide accurate time,and the performance of synchronization accuracy and energy consumption directly affects the survival cycle of WSN and the performance of link access protocols.This has become a critical technical issue and research hotspot that urgently needs to be solved in recent years.Addressing the problems of accumulated synchronization errors and high energy consumption in existing time synchronization algorithms,this paper proposes two improved algorithms based on hierarchical synchronization mechanism and frame-based information difference elimination redundancy and adaptive synchronization period.The specific research work includes:(1)Based on the hierarchical synchronization mechanism,an optimized time synchronization algorithm(TSHSM)is proposed to address the problems of multi-hop cumulative synchronization errors,and weak dynamic security in WSN time synchronization algorithms.This algorithm re-divides the network topology by using the cluster selection algorithm to select the cluster head,dividing the entire network into a dominant network and a subordinate network.In the dominant network,synchronization is achieved through bidirectional information exchange,using maximum likelihood estimation to estimate and compensate for nodes’ frequency and phase offsets.In the subordinate network,synchronization is achieved through bidirectional information exchange and unidirectional listening.A univariate linear regression model is used to estimate the node’s time deviation,and a time filter is set to filter out incorrect information to ensure the algorithm’s security.Through extensive theoretical analysis and simulation experiments,it has been shown that the TSHSM algorithm proposed in this paper has smaller synchronization errors than traditional time synchronization algorithms of the same network scale.Moreover,in the face of sudden situations such as new node additions and malicious tampering of information,the TSHSM algorithm can ensure the synchronization accuracy of each node without producing additional energy consumption,thus demonstrating good dynamic and security properties.(2)Based on the redundancy of the synchronization information packet containing complete timestamps of adjacent two rounds in the existing WSN time synchronization algorithm and the waste of network resources caused by synchronizing according to a fixed synchronization period while satisfying the synchronization accuracy,this paper proposes an adaptive time synchronization improvement algorithm(IDF-ATSA)based on inter-frame information difference.This algorithm no longer sends complete timestamp information packets during the synchronization process but sends the difference frame of the synchronization timestamp information before and after two rounds,and uses the synchronization period adaptive mechanism to dynamically increase or decrease the synchronization period.The synchronization process of this algorithm is divided into relay synchronization and terminal synchronization.Estimate and compensate for frequency drift and frequency offset by using the least squares method,the algorithm achieves synchronization accuracy while reducing the energy consumption caused by redundant synchronization.Theoretical analysis and simulation experiments show that the IDF-ATSA time synchronization algorithm improves synchronization accuracy compared to traditional time synchronization algorithms,and effectively reduces energy consumption during the synchronization process. |