A Novel Loop Based Fine Grained Network-wide Time Synchronization over Constrained
Delay Paths in Wireless Sensor Networks
1
K L V Sai Prakash Sakuru,
2N Bheema Rao
1Department of Electronics and Communication Engineering, National Institute of Technology, Warangal, Telangana, India
Email - sai@nitw.ac.in
2Department of Electronics and Communication Engineering, National Institute of Technology, Warangal, Telangana, India
Email - nbr@nitw.ac.in
Article History: Received:11 January 2021; Accepted: 27 February 2021; Published online: 5 April 2021 Abstract- Sensor Networks play a vital role in today’s ever-growing automation process. Time synchronization
between the nodes impacts the performance of the network and applications. Most of the existing time synchronization algorithms either run a tree algorithm or cluster-based algorithm and then perform time synchronization. Both the algorithms suffer from communication and computation efficiency. When a node fails due to an energy shortage, these algorithms need to rerun the setup, thereby the remaining nodes consume energy. Hence, we propose a novel loop-based fine-grained network-wide time synchronization over constrained delay paths for the sensor networks. When a packet is transmitted, the neighborhood node on receiving this packet will add a time offset information and broadcast. The process continues until the loop is formed and then uses the information set and helps to synchronize its clock information. The simulations and results validate the performance of the proposed algorithm.
Keywords – wireless sensor networks, time synchronization, loop based, network-wide, estimation error
I.INTRODUCTION
Distributed sensor networks play an essential role in many applications, such as agriculture, border security, fire control, hospitals, smart cities, transport, etc. Data fusion, coordinated data transmission, coordinated on-off node control needs tight time synchronization [1], [2]. The sensor nodes are of small form factor, consisting of a communication module, computation module, and a power supply. Low-cost oscillators provide the clock on the node to keep the cost of the node minimal. These oscillators lose time, i.e., offset and skew concerning their neighbors. To make a worthy interpretation of the small form sensor node’s data, the physical time on the sensor nodes plays a crucial role. As different oscillators are equipped in other nodes, no two node clocks show the same time in a distributed environment. On the other hand, time synchronization algorithms provide a cost-effective way to place all the network nodes on the same timescale concerning a global clock.
The most prevalent approach to network-wide synchronization is to form a spanning tree network or divide the network into clusters of single-hop and run a tree algorithm among the cluster heads. The former suffers from the error trying to propagate along the path and suffer from the network’s higher computation and communication complexity and node failure. While the latter, the cluster-based time synchronization protocols, suffer from communication complexity in electing cluster heads, maintaining the communication paths, and node failure, thereby increasing energy consumption.
Given the above drawbacks, we have developed a novel loop-based fine-grained network-wide time synchronization algorithm over constrained delay paths in sensor networks that address the intermediate node failure and eliminates the requirement of re-establish cluster or tree formation.
The remaining paper is written as follows: Section II, a brief survey of the related work presented, and an iterative node-pair clock synchronization algorithm is explained in section III. The Loop concept is elaborated in section IV. Problem formulation regarding offset and skew is described in section V. Section VI presents the proposed algorithm. The simulation and results are shown in section VII and finally concludes with our work’s future direction in section VIII.
II.RELATED WORK
Time Synchronization in Wireless Sensor Network (WSN) is one of the interesting areas of research. Almost all the algorithms aim to synchronize the nodes, focusing mainly on time required for synchronization, energy consumption, computation energy, and synchronization error. As most of the nodes are battery-driven, reducing the energy consumption plays an important role. The applications dictate the synchronization error allowed.
Wireless Sensor Networks
The most prevalent approach to network-wide synchronization is to form a spanning tree network. The root node has the Global Time (GT) and synchronizes the child nodes along the branches using a bi-directional message exchange approach. Miklos Maroti et. al., [3], Jan van Greunen et. al., [4], Rahamatkar S, et. al., [5], L He [6], K L V Sai Prakash et. al., [7], Roberto Solis et. al., [8], Saurabh Ganeriwal et. al., [9]; first, will create a spanning tree of all the nodes in the network. Then, along the branches from the root node, the time information is exchanged. The problem with such algorithms is that error tries to propagate along the path and suffer from the network’s higher computation complexity. On the other hand, the cluster-based time synchronization protocols reduce the communication energy. Zhang J et. al., [10], Wang Z et. al., [11], J. Wu et. al., [12], C In et. al., [13], Jeremy Elson et. al., [14]; first, divide the network into clusters of single-hop and form a tree algorithm among the cluster heads to cover the complete network.
III.ITERIATIVE NODE-PAIR CLOCK SYNCHRONIZATION ALGORITHM
In this paper [15], we provide a node pair iterative time synchronization algorithm. We begin by considering the case when α = 1 the skew whence we need to determine only δ, the offset. We assume that node 0 has the correct time and is sending the timestamped packets to node 1. Let tk be the time at which node 0 send the k-th timestamped packet and rk be the time on the clock of node 1 when this packet is received at node 1 after random delay on the network, Dk . It is easy to see that rk = tk + δ + Dk i.e., δ = rk − tk − Dk .
We assume Dk ∈ [a, b] and 0 ≤ a ≤ b < ∞, i.e., Dk are bounded random variables and that a and b are known. Hence, after receiving n timestamped packets, we see that δ should satisfy δ ∈ [rk − tk − b, rk − tk − a] for 1 ≤ k ≤ n. This means that 𝛿 ∈ [𝛿𝑛 , 𝛿𝑛 ], where
𝛿𝑛 = max
{1≤𝑘≤𝑛} ( {𝑟𝑘− 𝑡𝑘} − 𝑏 ) = 𝛿 − ( 𝑏 − max{1≤k≤n}{𝐷𝑘}) (1)
𝛿𝑛 = min
{1≤𝑘≤𝑛}( {𝑟𝑘− 𝑡𝑘} − 𝑎 ) = 𝛿 − ( min{1≤k≤n}{𝐷𝑘} − 𝑎) (2)
The last equality in the above is obtained by noting that rk = tk +δ +Dk. Let δ̃(n) := ¯𝛿𝑛 − ▁𝛿𝑛 represents the uncertainty width in the estimation of δ after n received timestamps. The, we have 𝛿̃(𝑛) = (𝑏 − 𝑎) − ( max
{1≤𝑘≤𝑛}𝐷𝑘 − min{1≤𝑘≤𝑛}𝐷𝑘 ) we want to highlight that we have not made any assumptions regarding the random sequence Dk of delays that the timestamp packets experienced, except that they are constrained.
It is intuitively clear that max will approach close to b and min will approach close to a, thereby δ̃(n) converges to zero, if the a-priori bounds are accurately selected. Thus, eventually, the offset can be estimated.
IV.LOOP CONCEPT
We start with assuming that, we have a collection of clocks in a loop say 3 as shown in Figure 1. Let us assume that clock 1 with time representation as t1 and clock 2 with time representation as t2 have a relative skew α12 and relative offset δ12, and similarly t2 and t3 have relative skew α23 and relative offset δ23, and similarly t3 and t1 have relative skew α31 and relative offset δ31.
Figure 1: Three node network model
So, we can write the relationships between the clocks as:
t2= α12× t1+ δ12 (3)
t3= α23× t2+ δ23 (4)
We will formulate the problem, to capture the key ideas behind our intuition.
V.PROBLEM FORMULATION
5.1 Only Offset
In this case, we assume that all clocks in the loop are running at same speed and have only relative offsets present. The equations 3 to 5 can be rewritten as
t2= t1+ δ12 (6)
t3= t2+ δ23 (7)
t1= t3+ δ31 (8)
Rearranging and on simplification we get
t1= t1+ δ12+ δ23+ δ31 (9)
δ12+ δ23+ δ31= 0 (10)
We can now formulate that the total offset in a loop is zero.
5.2 Only Skew
In this case, we assume that all clocks in the loop have zero relative offsets and have only relative skews present. The equations 3 to 5 can be rewritten as
t2= α12× t1 (11)
t3= α23× t2 (12)
t1= α31× t3 (13)
Rearranging and on simplification we get
t1= α12× α23× α31× t1 (14)
α12× α23× α31= 1 (15)
We can now formulate that the product of all skews in a loop is 1.
VI.PROPOSED ALGORITHM
6.1 Single Loop Fine Grain Multihop Synchronization Algorithm
Based on the above formulations we now develop algorithms for a single loop multihop networks under the two conditions. We begin by considering a ‘n’ node network as shown in Figure 2. To analyze, we assume that the nodes have relative offset 𝛿𝑖𝑗 and relative skew 𝛼𝑖𝑗 between node ‘i’ and node ‘j’ forall (ij) ∈ [(12), (23), ……, (n1)]. Further, we will also assume that a packet is transmitted from node 1 to node 2, from node 2 to node 3, and so on up to node n to node 1, before a second packet is transmitted as shown in Figure 3. On circulating the packet, all the nodes will timestamp the received and transmitting time of the packet. Let ti (k) be the time at which node ‘i’ sends the kth timestamped packet and ri(k) be the time on the clock on node ‘j’ when the packet is received at node ‘j’ after a random delay Dij (k) on the network. We assume the delay Dij (k) ∈ [a, b] are bounded random variables and that ‘a’ and ‘b’ are apriori known. This means
ri (k) = αij× ti (k) + δij+ Dij (k) (16)
Wireless Sensor Networks
Figure 3: Packet flow diagram in a ’n’ node single loop network
We will consider the two cases to describe our multihop algorithm that minimizes the uncertainty region in estimating the relative offset and relative skew between the nodes.
6.2 Only Offset
Under the assumption that all the nodes have clock running at same speed we can rewrite the equation 16 as
ri(k) = ti(k) + δij + Dij(k) (17)
and as the following inequality
ri(k) − ti(k) − b ≤ δij ≤ ri(k) − ti(k) − a (18)
This means that δij ∈ [𝛿𝑖𝑗(k) , 𝛿𝑖𝑗(k)] , where
𝛿𝑖𝑗 (k) = {ri(k) − ti(k) } − b = δij− (b − {Dij (k) }) (19) 𝛿𝑖𝑗(k) = {ri(k) − ti(k) } − a = δij− ( {Dij (k) } − a) (20) Using the expression 10, we know that the total offset in a loop is 0 (zero).
∑ δij {(ij)∈[(12),(23),…,(n1)]} = 0 (21) δ{ij}= − ∑ δlm {(lm)∈[(12),(23),…,(n1)] (lm ≠ij) } (22) Now with this additional information from the other nodes, the synchronization algorithm works as follows:
− ∑ δlm {(lm)∈[(12),…,(n1)] (lm ≠ij) } ∈ [ − ∑ δ lm (k) {(lm)∈[(12),…,(n1)] (lm ≠ij) } , − ∑ 𝛿ij (k) {(lm)∈[(12),…,(n1)] (lm ≠ij) } ] (23) Now the update equations for synchronization algorithm are
𝛿ij (k) = max [ 𝛿ij (k − 1), 𝛿ij (k) , − ∑ δ lm (k) {(lm)∈[(12),(23),…,(n1)] (lm ≠ij) } ] (24) δ ij (k) = min [ δ ij (k − 1), δ ij (k), − ∑ 𝛿 lm (k) {(lm)∈[(12),(23),…,(n1)] (lm ≠ij) } ] (25) And the uncertainty interval 𝛿̃𝑖𝑗 (𝑘) is given by
δ̃ij (k) ∶= δ ij (k) − 𝛿ij (k) (26)
6.3 Only Skew
We assume that all the $n$ nodes clocks running at zero offset but have different skews. In this case, we can rewrite equation 16 as
ri (k) = αij × ti (k) + Dij (k) (27)
and as the following inequality
ri (k) − b
ti (k) ≤ αij ≤
(ri (k) − a) ti (k)
(28) This means that α𝑖𝑗 (𝑘) ∊ [𝛼ij (𝑘), α ij (𝑘)] where
𝛼ij(𝑘) =ri (k)−b
ti (k) (29)
α ij(k) =
(ri (k)−a)
ti (k) (30)
Using the expression 15, we know that the product of skew in a loop is 1 (one).
∏ αij {(ij)∈[(12),(23),…,(n1)]} = 1 αij = 1 { ∏{(lm)∈[(12),(23),…,(n1)] αlm (𝑙𝑚 ≠𝑖𝑗) } } (31) Now with this additional information from the other nodes, the synchronization algorithm works as follows:
α𝑖𝑗 ∊ [𝛼ij (𝑘), α ij (𝑘)] 1 {∏ αlm {(lm)∈[(12),…,(n1)] (lm ≠ij) } } ∈ [ 1 {∏ α lm (𝑘) {(lm)∈[(12),…,(n1)] (lm ≠ij) } } , 1 {∏ 𝛼lm (𝑘) {(lm)∈[(12),…,(n1)] (lm ≠ij) } } ] (32) Now the update equations for synchronization algorithm are
Wireless Sensor Networks
α ij(k) = min { α ij (𝑘 − 1), α ij (𝑘) , 1 {∏ 𝛼lm (𝑘) {(lm)∈[(12),(23),…,(n1)] (lm≠ij) } } } (33) 𝛼ij (𝑘) = max { 𝛼ij (𝑘 − 1), 𝛼ij (𝑘), 1 {∏ αlm {(lm)∈[(12),(23),…,(n1)] (lm≠ij) } (𝑘)} }And the uncertainty interval α̃ij (k) is given by (34)
α
̃ij (k) ∶= α ij (k) − 𝛼ij (k) (35)
VII.SIMULATIONS AND RESULTS
7.1 Three node network
For a three node network, as shown in figure 4, we have simulated to observe the behaviour of the two algorithms i.e., only offset and only skew. In the simulations we have taken the bounded delay [ai,bi], which is identical for all the three links as [1,5]. The random delay, the message packet takes from transmitting node to receiving node is assume to be uniformly distributed in the above bounded delay interval for all the links. We will assume that a packet is transmitted from node 1 - node 2 - node 3 - node 1 in a circular fashion before they circulate the second packet. On circulating the packet, all the nodes will timestamp the received and transmitting time of the packet. At time ‘ti’ a packet is transmitted by node ‘i’ and the same is received at node ‘j’ at time ‘rj’on its clock. The convergence curve of the estimated uncertainty region for the 50 message packets transmitted is observed for only offset, and only skew. We have also plotted the expected uncertainty width convergence curve of a single node pair (only one link). In this case also we have considered the delay bounds as [1, 5] and the random delay of the message packets to be uniformly distributed. It can be observed from the graphs that the multi-hop synchronization gives better estimates of uncertainty width than the node pair synchronization.
Figure 4. Three node network
Figure 5: Simulation of Sample path the uncertainty offset width for the three node pairs. The expected uncertainty offset width with `pairwise synchronization' is also shown.
7.2 Only Skew
Figure 6: Simulation of Sample path the uncertainty slope width for the three node pairs. The expected uncertainty slope width with `pairwise synchronization' is also shown
VII.CONCLUSION&FUTUREWORK
We present a novel loop-based fine-grained network-wide time synchronization algorithm motivated by Kirchhoff’s voltage law. The total offset sum in the loop as given in the equation 10 is zero, and the entire slope product in the loop as shown in the equation 14 is one. From Fig 5, we can conclude that the uncertainty offset error in estimating the offset for the three-node pairs using loop-based time synchronization is much better than that of single node-pair synchronization. It is also true in the case of uncertainty slope error, as shown in Fig.6. The analytical
Wireless Sensor Networks
and simulation results show that in a three-loop network, on average, approximately 15 time-stamped message packets are required to be transmitted compared to an average of 20 time-stamped message packets as are necessary for a single node pair. The uncertainty reduction of 10-time units to the 1-time unit was considered for the above simulation purposes. This outstanding outcome is an improvement compared to the RBS method, which needs 80 message packets for three receivers to synchronize. The loop network need not have to generate a spanning tree or divide the network into clusters, thereby reducing energy consumption and extending the lives of the nodes and network. With these encouraging results, we plan to analyze energy analysis and the time taken for synchronization as the network size grows.
REFERENCES
[1] Bharath Sundararaman, Ugo Buy and Ajay D Kshemkalyani, Clock Synchronization for Wireless Sensor Networks: A Survey, Elsevier Journal on Adhoc Networks, Vol 3, Issue 3, May 2005, P 281-323. DOI: 10.1016/j.adhoc.2005.01.002.
[2] Fikret Sivrikaya and Bulent Yener, Time synchronization in Sensor Networks: A Survey, IEEE Network, Vol 18, issue 4, p 45-50, July-Aug 2004.DOI: 10.1109/MNET.2004.1316761.
[3] Miklos Maroti, Branislav Kusy, Gyula Simon and Akos Ledeczi, The Flooding Time Synchronization Protocol, SenSys’04, November 3–5, 2004, Baltimore, Maryland, USA.
[4] Jana van Greunen and Jan Rabaey, Lightweight Time Synchronization for Sensor Networks, WSNA’03, September 19, 2003, San Diego, California, USA.
[5] Rahamatkar S., and Agarwal A, A Reference based, Tree Structured Time Synchronization approach and its analysis in WSN, International Journal of Adhoc, Sensor & Ubiquitous Computing (IJASUC) Vol.2, No.1, March 2011 DOI : 10.5121/ijasuc.2011.2103 20.
[6] L. He, Time Synchronization Based on Spanning Tree for Wireless Sensor Networks, 4th International Conference on Wireless Communications, Networking and Mobile Computing, Dalian, 2008, pp. 1-4, doi: 10.1109/WiCom.2008.846.
[7] K L V Sai Prakash Sakuru and N Bheema Rao, K-Hop Iterative Time Synchronization over a Linear Connected Wireless Sensor Networks, 4th International Conference on Smart Computing and Informatics (SCI-2020), Hyderabad, INDIA.
[8] Roberto Solis, Vivek S Borkar and P R Kumar, A New Distributed Time Synchronization Protocol for Multihop Wireless Networks, 45th IEEE Conference on Decision and Control, January 2007,DOI: 10.1109/CDC.2006.377675.
[9] Saurabh Ganeriwal, Ram Kumar and Mani B Srivastava, Timing-sync Protocol for Sensor Networks, SenSys ’03: Proceedings of the 1st international conference on Embedded networked sensor systems, Nov 2003, p 138–149. DOI:10.1145/958491.958508.
[10] Zhang J., Lin S., Liu D, Cluster-Based Time Synchronization Protocol for Wireless Sensor Networks, Algorithms and Architectures for Parallel Processing, ICA3PP 2014, Lecture Notes in Computer Science, vol 8630. Springer, Cham. DOI:10.1007/978-3-319-11197-1-55.
[11] Wang, Z.; Zeng, P.; Zhou, M.; Li, D.; Wang,J., Cluster-Based Maximum Consensus Time Synchronization for Industrial Wireless Sensor Networks, J. . Sensors 2017, 141. DOI: 10.3390/s17010141.
[12] J. Wu, L. Zhang, Y. Bai and Y. Sun, Cluster-Based Consensus Time Synchronization for Wireless Sensor Networks, IEEE Sensors Journal, vol. 15, no. 3, pp. 1404-1413, March 2015, doi: 10.1109/JSEN.2014.2363471. [13] C. In, C. Hong and M. Mamun-Or-Rashid, Passive Cluster Based Clock Synchronization in Sensor Network, Advanced Industrial Conference on Telecommunications/Service Assurance with Partial and Intermittent Resources Conference/E-Learning on Telecommunications Workshop, Lisbon, Portugal, 2005 pp. 340-345. doi: 10.1109/AICT.2005.68.
[14] Jeremy Elson, Lweis Girod and Deborah Estrin, Fine Grained Network Time Synchronization using Reference Broadcasts, ACM SIGOPS Operating Systems Review, December 2002. DOI:10.1145/844128.844143. [15] K L V Sai Prakash Sakuru and N Bheema Rao, An Iterative Node-pair Time Synchronization (INTS) for Wireless
Sensor Networks, Electronic Systems and Intelligent Computing, ESIC 2020, Lecture Notes in Electrical Engineering 686, P 495-505, https://doi.org/10.1007/978-981-15-7031-5-47.