Skip to main content

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.

1 Introduction

Wireless sensor networks (WSNs) consists of a plurality of sensor nodes capable of conveying the data they acquire from the environment towards a base station [1]. WSN protocols and algorithms are, typically, designed with very stringent constraints due to their inherent properties like limited resources of energy, storage, computation, and bandwidth [2,3,4]. Linear wireless sensor networks (LWSNs) are under the WSNs’ umbrella that is especially used to monitor and control linear structures like roads, bridges, pipelines, tunnels, traffic lights, and similar [5,6,7,8]. Needless to say, the abovementioned limitations of WSN are also applicable to the special class of WSN, specifically LWSN, along with some additional ones due to the linear structure of the network. Veritably, the partial findings of a gas pipeline monitoring system [5] coursing through cross-country mountainous regions in Turkey are presented in this paper.

Considering our model of LWSN topology where the nodes are allowed to communicate by preserving the hierarchical order (i.e., with immediate parent and child), the 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. 1.

    Novel performance comparison of OD and OO in the time synchronization of LWSN nodes.

  2. 2.

    Moreover, the joint effect of both OO and OD with synchronization windows is studied.

  3. 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.

2 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

$$ {t}_{\mathrm{node}}={\alpha}_{\mathrm{node}}+{\beta}_{\mathrm{node}}\times {t}_{\mathrm{ref}}, $$

where α and β are the offset and drift, respectively, and tref 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

$$ {t}_2={\alpha}_{12}+{\beta}_{12}\times {t}_1, $$

where α12 and β12 are the relative offset and drift, respectively, and t1 and t2 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 TA is the time of transmission, and the time TC is the time of reception at the origin node while TB 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.

$$ {\beta}_{12U}(i)=\frac{T_{\mathrm{A}}(i)-{T}_{\mathrm{A}}\left(i-1\right)}{T_{\mathrm{B}}(i)-{T}_{\mathrm{B}}\left(i-1\right)}, $$
$$ {\beta}_{12L}(i)=\frac{T_{\mathrm{C}}(i)-{T}_{\mathrm{C}}\left(i-1\right)}{T_{\mathrm{B}}(i)-{T}_{\mathrm{B}}\left(i-1\right)}, $$
Fig. 1
figure 1

Two-way handshaking visualization

Rearranging (2), the upper and lower bounds of the offset can be calculated using (5) and (6)

$$ {\alpha}_{12U}(i)={T}_{\mathrm{A}}(i)-{\beta}_{12U}(i)\times {T}_{\mathrm{B}}(i), $$
$$ {\alpha}_{12L}(i)={T}_{\mathrm{C}}(i)-{\beta}_{12L}(i)\times {T}_{\mathrm{B}}(i). $$

The average offset and drift can be estimated by employing (7) and (8)

$$ {\beta}_{12}(i)=\frac{\beta_{12U}(k)+{\beta}_{12L}(k)}{2}, $$
$$ {\alpha}_{12}(i)=\frac{\alpha_{12U}(k)+{\alpha}_{12L}(k)}{2}. $$

Finally, the offsets are time-averaged in order to eliminate the random time-dependent delays using the following equations. The W term on Eqs. (9) and (10) is the sample count or synchronization window

$$ {\beta}_{12-\mathrm{Avg}}(i)=\frac{1}{W}\sum \limits_{i-W+1}^i{\beta}_{12}(k), $$
$$ {\alpha}_{12-\mathrm{Avg}}(i)=\frac{1}{W}\sum \limits_{i-W+1}^i{\alpha}_{12}(k). $$

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 \( \overline{\varepsilon} \).

$$ \Delta \varepsilon ={\mathrm{Time}}_{\mathrm{true}}-{\mathrm{Time}}_{\mathrm{Exp}} $$
$$ \varepsilon =\frac{\Delta \varepsilon }{{\mathrm{Time}}_{\mathrm{true}}}\times 100\% $$
$$ \overline{\varepsilon}=1-\frac{{\mathrm{Time}}_{\mathrm{Exp}}}{{\mathrm{Time}}_{\mathrm{true}}} $$

3 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 low-power, 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.

Fig. 2
figure 2

Experimental node setup showcasing the baseboard, RF module, and other peripherals

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.

4 Results and discussion

The data for absolute differences and relative differences are tabularized in Tables 1 and 2, respectively.

Table 1 Absolute difference (in seconds)
Table 2 Relative difference (as percentages)

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.

Fig. 3
figure 3

Normalized mean time elapsed for OD and OO synchronization methods

5 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.

Availability of data and materials

Not applicable.



General Packet Radio Services


Global Positioning System


Linear wireless sensor networks


Microcontroller unit


Network Time Protocol






Personal computer


Radio frequency


Real-time clock


  1. I. Akyildiz, W. Su, Y. Sankarasubramaniam, E. Cayirci, Wireless sensor networks: a survey. Comput. Netw. 38(4), 393–422 (2002).

    Article  Google Scholar 

  2. O. Dagdeviren, V.K. Akram, B. Tavli, Design and evaluation of algorithms for energy efficient and complete determination of critical nodes for wireless sensor network reliability. IEEE Trans. Reliab. 68(1), 280–290 (2019).

    Article  Google Scholar 

  3. S. Kurt, H.U. Yildiz, M. Yigit, B. Tavli, V.C. Gungor, Packet size optimization in wireless sensor networks for smart grid applications. IEEE Trans. Ind. Electron. 64(3), 2392–2401 (2017).

    Article  Google Scholar 

  4. O. Cayirpunar, E. Kadioglu-Urtis, B. Tavli, Optimal base station mobility patterns for wireless sensor network lifetime maximization. IEEE Sensors J. 15(11), 6592–6603 (2015).

    Article  Google Scholar 

  5. A Kara, M A Al Imran, and K Karadag, Linear wireless sensor networks for cathodic protection monitoring of pipelines, 2019 IEEE International Conference on Mechatronics, Robotics and Systems Engineering (MoRSE), 233-236 (2019). doi:

  6. N Sazak, and M Ertug. The effect of node deployment scheme on LWSN lifetime for railway monitoring applications, 2017 IEEE Workshop on Environmental, Energy, and Structural Monitoring Systems (EESMS), 1-4 (2017). doi:

  7. C.M. Imran, M. Aldukhail, N. Almezeini, M. Alnuem, Potential applications of linear wireless sensor networks: a survey. Int. J. Comput. Netw. Commun. Secur. 4(6), 183–200 (2016)

    Google Scholar 

  8. B Barbagli, L Bencini, I Magrini, G Manes, and A Manes, A real-time traffic monitoring based on wireless sensor network technologies, 2011 IEEE 7th International Wireless Communications and Mobile Computing Conference, 820-825 (2011). IEEE. doi:

  9. R. Sokullu, E. Demir, A comparative study of MAC protocols for linear WSNs. Procedia Computer Science 52(492-499) (2015).

  10. A. Al Shaikhi, Improved-precision time synchronization protocol for WSNs based on averaging consensus control. IEEE Access 6, 62261–62271 (2018).

    Article  Google Scholar 

  11. A. Al-Shaikhi, A. Masoud, Efficient, single hop time synchronization protocol for randomly connected WSNs. IEEE Wireless Communications Letters 6(2), 170–173 (2017).

    Article  Google Scholar 

  12. P. Briff, A. Lutenberg, L.R. Vega, F. Vargas, M. Patwary, Generalised trade-off model for energy-efficient WSN synchronisation. Electron. Lett. 51(3), 291–292 (2015).

    Article  Google Scholar 

  13. K. Yildirim, R. Carli, L. Schenato, Adaptive proportional–integral clock synchronization in wireless sensor networks. IEEE Trans. Control Syst. Technol. 26(2), 610–623 (2017).

    Article  Google Scholar 

  14. F. Wang, C. Yu, X. Wu, Y. Hu, Dual time synchronisation method for wireless sensor networks. Electron. Lett. 51(2), 179–181 (2015).

    Article  Google Scholar 

  15. H. Wang, H. Zeng, P. Wang, Linear estimation of clock frequency offset for time synchronization based on overhearing in wireless sensor networks. IEEE Commun. Lett. 20(2), 288–291 (2015).

    Article  Google Scholar 

  16. D. Djenouri, M. Bagaa, Synchronization protocols and implementation issues in wireless sensor networks: a review. IEEE Syst. J. 10(2), 617–627 (2014).

    Article  Google Scholar 

  17. F. Walls, J. Gagnepain, Environmental sensitivities of quartz oscillators. IEEE Trans. Ultrason. Ferroelectr. Freq. Control 39(2), 241–249 (1992).

    Article  Google Scholar 

  18. G Bam, E Dilcan, B Dogan, B Dinc, B Tavli, DLWTS: distributed light weight time synchronization for wireless sensor networks. Paper presented at IEEE Int. Symp. Intell. Signal Proc. Comm. Syst. (ISPACS), Nusa Dua, Indonesia, 9-12 November 2015.

  19. J. Chen, Q. Yu, Y. Zhang, H.H. Chen, Y. Sun, Feedback-based clock synchronization in wireless sensor networks: a control theoretic approach. IEEE Trans. Veh. Technol. 59(6), 2963–2973 (2010).

    Article  Google Scholar 

  20. L. Ferrigno, V. Paciello, A. Pietrosanto, Experimental characterization of synchronization protocols for instrument wireless interface. IEEE Trans. Instrum. Meas. 60(3), 1037–1046 (2010).

    Article  Google Scholar 

  21. A. Akbas, H.U. Yildiz, B. Tavli, S. Uludag, Joint optimization of transmission power level and packet size for WSN lifetime maximization. IEEE Sensors J. 16(12), 5084–5094 (2016).

    Article  Google Scholar 

Download references


Not applicable.

Author information

Authors and Affiliations



M.A.A.I was responsible for all hardware and software implementation of the work and wrote some sections of the paper. Y.D. evaluated some of the findings of the implementation and finalized the preparation of the manuscript. B.T. formulated the problem and evaluated parametric results and key findings and organized the paper. A.K. identified the problem, determined the requirements, and evaluated the results from usability point of view.

Corresponding author

Correspondence to Yaser Dalveren.

Ethics declarations

Competing interests

The authors declare that they have no competing interests.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Al Imran, M.A., Dalveren, Y., Tavli, B. et al. Optimal operation mode selection for energy-efficient light-weight multi-hop time synchronization in linear wireless sensor networks. J Wireless Com Network 2020, 109 (2020).

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: