In recent years,with the rapid popularization and application of Wireless Sensor Networks(WSN)in industrial Internet of Things and other fields,time synchronization as a basic technology of Sensor equipment has been widely studied.How to achieve lower energy consumption and computational complexity while maintaining high precision time synchronization is a hot research topic nowadays.IPv6 Routing Protocol for Low-Powr and Lossy Networks(RPL)based on Internet Protocol Version 6(IPv6)is a popular routing implementation scheme in WSN,which is widely used in multi-hop distributed WSN scenarios and has become a standard.Therefore,this thesis studies the multi-hop distributed time synchronization algorithm based on the existing RPL routing protocol.The main research content and innovation work are as follows:Firstly,aiming at the problems of energy consumption and high computational complexity of WSN nodes caused by time synchronization,this thesis proposes a distributed time synchronization algorithm in multi-hop scenarios.The algorithm improves the Precision Time Protocol(PTP)and combines with Acknowledgemet(ACK)confirmation mechanism of Media Access Control(MAC)layer.A three-step unidirectional Time synchronization algorithm is implemented by adding time synchronization information to ACK frame.After the node to be synchronized completes a round of time synchronization information collection,the clock skew and clock offset of the reference nodes are estimated to achieve time synchronization.In the network building stage of RPL routing protocol,unicast control packets are used for initial time synchronization,and continuous time synchronization is realized by continuous transmission of packets after the node joining network.Since no additional time synchronization communication is required,the energy efficiency of WSN nodes is significantly improved.Secondly,the greater the difference between the clock Varying Rate of Skew(VRS)of the parent node and the VRS of the child node,the worse time synchronization accuracy of the child node is.Therefore,considering the influence of VRS from parent node on time synchronization,this thesis proposes a time synchronization algorithm based on improved RPL.In the network building stage of RPL,the algorithm makes the node to be added to the network collect the VRS of all its neighbors and calculate the relative VRS(RVRS)with its own VRS.In addition,this thesis designs a new objective function,which combines RVRS and Expected Transmission Count(ETX)as a composite routing metric,so that the node to be connected to the network can always select the node with smaller RVRS as its parent node to minimize the time synchronization error.Because all nodes in the network can synchronize time with the optimal parent node,the time synchronization accuracy of WSN is further improved.Finally,the Cooja simulation platform in Contiki-NG operation system is used to simulate the two proposed algorithms.Experimental results show that the two algorithms can improve the time synchronization accuracy and energy efficiency significantly. |