A Novel Loop Based Fine Grained Network-wide Time Synchronization over Constrained Delay Paths in Wireless Sensor Networks

Article History: Received:11 January 2021; Accepted: 27 February 2021; Published online: 5 April 2021 AbstractSensor 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 loopbased 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.

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 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 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: We will formulate the problem, to capture the key ideas behind our intuition.

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 Rearranging and on simplification we get We can now formulate that the product of all skews in a loop is 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 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.

Only Offset
Under the assumption that all the nodes have clock running at same speed we can rewrite the equation 16 as r i (k) = t i (k) + δ ij + D ij (k) (17) and as the following inequality This means that δ ij ∈ [ (k) , Using the expression 10, we know that the total offset in a loop is 0 (zero). (25) And the uncertainty interval ̃ ( ) is given by

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 and as the following inequality VII. SIMULATIONS AND RESULTS

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 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 & FUTURE WORK
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 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.