| In recent years,with the rapid development of Wireless Sensor Network(WSN),it has been widely used in military,agriculture,industry and various fields.Many applications,such as data collection,distance measurement,localization,low-power sleep control,etc.,all require the technology of clock synchronization as an important support.Therefore,under the influence of complex environment,energy supply,network security and other factors,how to achieve high-precision clock synchronization of low-cost wireless sensor networks is a very valuable research topic.In this thesis,WSN’s classical clock synchronization algorithms and their latest research progress are reviewed,and the existing algorithms are improved.The main research points of this thesis are as follows:WSNs are easily to be disturbed or attacked in an open environment.In the process of clock synchronization,the nodes need to exchange their timestamp information frequently,and the nodes are easily to receive the timestamp information with large error(outlier timestamp).The existing clock synchronization algorithms mainly use the least squares linear regression to calculate the clock drift and clock offset.But when there are outlier timestamps,the synchronization accuracy will be greatly reduced.To deal with this case,a clock synchronization scheme based on robust regression is proposed and the weighting function of robust regression is optimized.The scheme can still ensure synchronization accuracy in the presence of outlier timestamps.The test results show that the synchronization accuracy of the scheme based on robust regression is 70.6%higher than that based on least square error(LSE)linear regression under the presence of outlier timestamp.The synchronization accuracy of the optimized weighting function is improved by 26.3%.In addition,the scheme also includes a timestamp encoding algorithm based on the system frame number,which can reduce communication cost;a multi-antenna-based sending and receiving delay compensation algorithm,which can accurately calculate the propagation delay of the signal.In the large and complex WSN,the existing clock synchronization algorithms for choosing master clock nodes mostly consider the node degree centrality,node betweenness centrality or the node clock quality,which are not considered comprehensively.The K-Shell algorithm is a classic algorithm for identifying important nodes in complex networks,which comprehensively considers the degree of the node and the position of the node in the network.In this thesis,by improving K-Shell algorithm,a K-Shell-Local-Centrality(KSLC)algorithm is proposed,which solves the problem that the importance of nodes at the same layer cannot be distinguished in the K-Shell algorithm.Then,combining it with Best Master Clock(BMC)algorithm which selects the master clock node by considering the node clock quality,a master clock selection algorithm based on KSLC-BMC is proposed.The KSLC-BMC algorithm can choose out the optimal master clock node by comprehensively considering the network topology and node clock quality.Finally,the network topology generation algorithm based on breadth first is used to reduce the number of hops in the network topology,so that the synchronization error of the whole network nodes is as small as possible.Through the simulation test,compared with the existing algorithms,the KSLC-BMC algorithm generates less network topology hops,and the overall clock synchronization error in the network is reduced by 24.3%on average. |