Optimal operation mode selection for energy-efficient light-weight multi-hop time synchronization in linear wireless sensor networks

We explored the joint effect of synchronization window and offset/drift mode selection on the time synchronization of linear wireless sensor networks (LWSNs). Recent advances in the field along with the availability of capable hardware led to adoption of LWSNs in diverse areas like monitoring of roads, pipelines, and tunnels. The linear topology applications are susceptible to single point of failure; therefore, energy efficient operation of LWSNs is even more important than the traditional WSNs. To address the challenge, we investigate the time synchronization mode selection for the optimum operation of a multi-hop and low-overhead LWSN. We investigate two modes of synchronization: synchronization by using only offset and synchronization by using offset in addition to the clock drift. Furthermore, we investigate the effects of synchronization window size. Our experimental results reveal that computation of offset alone for smaller window sizes and resynchronization periods is sufficient in achieving acceptable degree of synchronization.

traditional distributed WSN architectures become inefficient. This hierarchical setup introduces longer delays between nodes along with other restrictions [9] compared to mesh, star, and hybrid topologies where a broadcast beacon can arrive at any child node within the single hop neighbourhood of a transmitting node. Time synchronization is of paramount importance in networked systems, especially in distributed network systems namely WSNs which extensively utilizes the time synchronization aspect for coordination and correlation of distributed entities and events (e.g., data fusion, synchronized sleeps and wake-ups, channel sharing). In fact, the complex nature of the problem to be solved and demanding system requirements lead to the development of numerous synchronization algorithms. In this context, several accurate time synchronization methods have been proposed for WSNs [10][11][12][13], in general, and for LWSNs [14,15], in particular. A dual-time or two-time sources per node were introduced in [14] to decrease the time fluctuations with increasing hops but requires maintenance of those clocks thus adds complexity to the system model. Besides, a broadcast mechanism was utilized to estimate the time in [15] which is unfeasible in our context as described above.
Despite the abundance of synchronization techniques in the literature, most of the proposed methods ignored certain practical aspects [16] which in turn affect the implementation. Furthermore, accurate time sources like Network Time Protocol (NTP), General Packet Radio Services (GPRS), and Global Positioning System (GPS) are better suited when there exists an infrastructure and good network coverage. Nevertheless, these techniques require specific conditions and are relatively expensive to implement. Additionally, the achievable timing accuracy of the aforementioned techniques might be redundant for most of the industrial applications, or sometimes unfeasible given the harsh and resource-limited working conditions [5].
Our focus in this study is to determine the optimum operation mode and parameters for the trade-off between the synchronization speed and the accuracy, thereby avoid overdesigning the synchronization algorithm. To achieve this, we establish some quantitative metrics for experimental assessment of each of the synchronization methods namely offset-and-drift (OD) and offset-only (OO) for different synchronization windows. This work will help designers to overcome possible obstacles and optimization problems (e.g., network lifetime) faced in constructing a LWSN and more specifically LWSN in pipelines. The key contributions of this paper are as follows: 1. Novel performance comparison of OD and OO in the time synchronization of LWSN nodes. 2. Moreover, the joint effect of both OO and OD with synchronization windows is studied. 3. Lastly, regardless of the abundant time synchronization algorithms proposed in the literature, there exists only a few implemented systems. Here, the proposed technique is adopted and realized in a pipeline monitoring system which is soon to be deployed for active usage.
The remainder of the paper is organized as follows: In section 2, we review the literature for related work and introduce our take on LWSN as well as some evaluation techniques. Section 3 presents details of our extensive experiment and the outcomes. We then discuss the findings in section 4. Finally, conclusions are highlighted in section 5.

Method
The timekeeping module of WSNs is susceptible to clock offsets and drifts due to factors including component quality and aging, and ambient conditions like temperature and humidity [17]. Nonetheless, the clock can be modeled [18][19][20] as where α and β are the offset and drift, respectively, and t ref is the global or universal reference time assuming the clock offset and drift are constant over a period of short observation time. The α term is also referred to as the bias and is subjective to the clock start time. The clock drift, on the contrary, is affected by the surroundings as discussed previously. In fact, (1) can be modified to account for pairwise synchronization as where α 12 and β 12 are the relative offset and drift, respectively, and t 1 and t 2 are local time of two nodes. A two-way handshaking mechanism to pass timestamps can be used to estimate relative offset and drift at a node [11].
Refer to the Fig. 1 for a visual representation of the said handshaking process where the node initiating the synchronization process is the parent and the other node is the child denoted by the superscript. Moreover, the time T A is the time of transmission, and the time T C is the time of reception at the origin node while T B is the time of reception at the target node. This model assumes there are no incurred delays, retransmissions, and packet losses which are far from the reality. The time period where a specific number of two-way handshaking messages are exchanged is referred to as the synchronization window. One could compute relative offset and drift terms once ample amount of timestamps are collected. These timestamps are time averaged [18] to estimate the relative offset and drift. The upper and lower limits of relative drift can be calculated using (3) and (4), respectively. The index i refers to the sample.
Rearranging (2), the upper and lower bounds of the offset can be calculated using (5) and (6) The average offset and drift can be estimated by employing (7) and (8) Finally, the offsets are time-averaged in order to eliminate the random timedependent delays using the following equations. The W term on Eqs. (9) and (10) is the sample count or synchronization window Hence, smaller windows will contribute to faster synchronization while deteriorating the accuracy as lower number of samples is used in the computation of offset and drift.
In this paper, the effect of synchronization window on the clock synchronization accuracy is studied in conjunction with the mode of operation (i.e., offset-only estimation and both offset-and-drift estimation) which enables us to choose the optimum synchronization parameters and mode to prolong lifetime. Here, we establish some quantitative metrics for experimental assessment of each of the synchronization methods namely offset-and-drift (OD) and offset-only (OO) for various synchronization windows. The absolute difference (i.e., Δε) is the difference between the expected and the measured average times which is given in (11). The percentage relative difference, ε, is given by (12). Equation (13) represents the normalized time and is denoted by ε.

Experiment
The sensor nodes utilized in our experiments (depicted on Fig. 2) are composed of Atmel ATmega2560 chips as the microcontroller unit (MCU) as of Board 1, the lowpower, high-performance CC1200 Radio Frequency (RF) transceiver manufactured by Texas Instruments as the communication module as module 2, and the low-cost, highly accurate DS3231 real-time clock (RTC) chipset from Maxim Integrated as the module 3. The internal 16-bit timer/counter of the MCU is used to mimic the local clock of each node. The RTC is used to sample the local times of each node at accurate intervals and send to a companion personal computer (PC) for data logging. Our LWSN network consists of 5 identical sensor nodes configured to communicate for maintaining the hierarchical order, thereby, the first/reference node being the root and the subsequent nodes having a pairwise relationship with immediate neighbor nodes. Three different synchronization windows (i.e., 5, 15, and 25) are chosen for the experiment. Two different synchronization scenarios are designed for each of the synchronization windows namely offset-and-drift (OD) and offset-only (OO). Note that, the relative drift term on (2) is unity for the OO synchronization unlike OD where it is computed from the timestamp packets. Consequently, OO synchronization is relatively faster as requires less computation. Each data point consists of a single synchronization operation followed by sampling periods. The time synchronization is characterized by the synchronization window and one of the test scenarios. During the sampling period, the timing data of a node is recorded at the frequency of 1 Hz for three observation periods of 10, 30, and 60 min. The times elapsed are compared against the observation duration to draw conclusions. In other words, a synchronization command (OD or OO) was generated at the base station which stimulated a pairwise time synchronization of nodes in a top-down approach. Upon synchronization of the last/ leaf node, the system was put to sleep and observed for the three different periods. The time at which each of the nodes woke up were recorded and compared. Intuitively, the closer the recorded time to the observed time, the better the synchronization has been. And lastly, the experiment was carried out in an indoor laboratory environment while keeping all other factors controlled (e.g., transmission power level, packet size, transmission speed, inter-node distances, ambient temperature) and realistic, i.e., any conclusions drawn are indeed due to the method of synchronization only. Here, the system model was kept simple to promote feasibility and making the system implementable on inexpensive hardware without sacrificing the functionality. In conjunction with these, the relatively longer end-to-end delays in LWSN compared to traditional WSNs' makes complex system models impractical.

Results and discussion
The data for absolute differences and relative differences are tabularized in Tables 1  and 2, respectively. A lower absolute difference signifies better synchronization or smaller absolute error. Referring to Table 1 of absolute differences, it is obvious that the absolute difference increases with the duration for any of the particular synchronization windows regardless of the synchronization method (i.e., offset-and-drift or offset-only) which is due to the local clock's drift over time. The absolute difference data itself is not decisive enough to comment on the general trend. This is where the percentage relative difference term comes in. It is particularly useful to compare results from different observation or sampling durations. The difference between the two synchronization modes' percentage relative difference for a given window decreases over time as can be observed from Table 2. This decreasing trend can also be observed while traversing the data diagonally (i.e., the difference in ε decreases with increasing both the sampling time and the window). Both of these deductions from Tables 1 and 2 suggest that although the absolute difference tends to increase over time, this increase is almost negligible compared to the observation time. However, in order to find the optimum mode of operation and thus draw conclusions, the normalized data should be analyzed. Figure 3 shows the plot of differential normalized mean-elapsed times. The lower the normalized mean is, the better the synchronization is. Observe that using only the offset for smaller synchronization windows is sufficient, therefore, less computation is required; hence, the resources can be utilized efficiently. One would expect the synchronization accuracy to improve with increasing window size, yet the drift weighs more than the window size with our setup, and the differences are very subtle. Lastly, the optimum window size is found to be the intersection of the curves, i.e., 7 for this setup; choice of synchronization method has no effect on the achievable synchronization accuracy. We also show that the use of OO for frequent synchronizations can outperform OD. Inevitably, further work is necessary to perform a more extensive optimization of the system parameters. For example, a constant transmission power was used in this experiment.
In order to achieve a prolonged network lifetime, the payload and the transmission power level can be varied as suggested in [21]. Our goal in this work was to synchronize the nodes in the LWSN system frequently rather than proposing a comparable accurate synchronization algorithm with the existent ones.

Conclusion
To the best of our knowledge, the contribution of offset/drift along with the synchronization window on the accuracy of synchronization has never been investigated, systematically, in the WSN literature. More importantly, numerous synchronization techniques have been proposed throughout the literature but no studies have been carried out on the determination of optimal synchronization parameters for relatively short resynchronization intervals which are frequently experienced in practical field deployments of LWSNs. Hence, to fill the gap in the literature, in this study, we explore the joint effect of synchronization window and offset and/or drift on the time synchronization of LWSNs through direct experimentation employing a LWSN testbed. Furthermore, we show that computation of offset alone for lower synchronization windows should be sufficient in attaining reasonable accuracy while lowering both the overall energy consumption and the synchronization duration. Additionally, the system is being realized in a pipeline project where the time synchronization is carried out with OO method rather than OD which is not pragmatic for deployable systems. Again, the aim of this paper is to publish the partial findings of a realized system where the choice of OO as opposed to conventional OD gives better performance and increased network operable lifetime.