Because many existing time synchronization schemes rely on sensor nodes’ broadcasting synchronization messages received from a root node (i.e., flooding) to achieve network-level time synchronization (e.g., [4, 5]), additional computation and energy consumption are imposed on the resource-constrained sensor nodes which are already loaded with tasks including medium access control (MAC) protocol, message scheduling and routing, and data measurement. The Flooding Time Synchronization Protocol (FTSP) 
, which is a benchmark among WSN time synchronization schemes, is a typical example of flooding-based time synchronization schemes, where the energy consumption caused by the layer-by-layer broadcasting and the computational complexity of estimating the clock skew and offset could be high for battery-powered, low-cost sensor nodes.
To address the high computational complexity of estimating the clock skew and offset to achieve microsecond-level accuracy in FTSP, the Ratio-based time Synchronization Protocol (RSP) has been proposed based on the periodical one-way synchronization message dissemination and a lightweight procedure for the estimation of clock parameters . In RSP, additional thresholds and procedures are introduced to reduce the impact on the clock parameter estimation of the numerical errors by the limited floating-point precision (i.e., 32-bit floating-point numbers) of the resource-constrained sensor nodes. However, like FTSP, RSP also relies on the periodical broadcasting of the synchronization messages and, therefore, is not energy efficient in terms of message transmissions by sensor nodes. Another well-known WSN time synchronization scheme is the Timing-sync Protocol for Sensor Networks (TPSN) , which is based on the two-way message exchange requiring additional response message along with the beacon message. Considering that the schemes based on the two-way message exchange could achieve higher accuracy in principle by compensating for propagation delay, however, TPSN’s synchronization error of tens of microseconds is quite high even compared to that of the schemes based on one-way message dissemination. In case of the Reference Broadcast Synchronization (RBS) , because it requires not only additional reference nodes to broadcast the common clock time but also additional message exchanges between the sensor nodes to estimate their relative time differences, it is also not energy-efficient and proper for resource-constrained sensor nodes. Aiming at conserving the energy consumption through reducing message transmissions for the synchronization procedures, the authors of  proposed the Energy-Efficient and rapid Time Synchronization (EETS). Although EETS could reduce the message transmissions between neighboring levels in a hierarchical network, it still strongly relies on the broadcasting of the synchronization messages to achieve network-level time synchronization. Also, because the energy efficiency of EETS is indirectly evaluated through the number of message transmissions using simulations, its actual energy consumption could be different on real sensor nodes.
The authors of  proposed a novel energy-efficient time synchronization scheme based on the reverse two-way message exchange and demonstrated through simulation experiments that sub-microsecond-level synchronization accuracy could be achieved. Still, the computational precision required by their scheme (i.e., the precise division of the floating-point numbers) is beyond the capability of most resource-constrained sensor nodes equipped with a low-cost MicroController Unit (MCU) providing only 32-bit floating-point as discovered in . The idea of the reverse two-way message exchange together with message bundling for synchronization and measurement data, however, could be applied for designing more advanced energy-efficient time synchronization schemes targeting resource-constrained sensor nodes because it can greatly reduce the number of message transmissions by sensor nodes.
In this paper, we present the reverse asymmetric time synchronization framework illustrated in Fig. 1 and propose the Beaconless Asymmetric energy-efficient Time Synchronization (BATS) scheme specifically based on the reverse one-way message dissemination shown in Fig. 1 (a). In the proposed framework, all the synchronization procedures are moved from sensor nodes to the head111The head node and the monitoring station (i.e., a PC or a workstation for data processing) connected to it locally or remotely over the Internet are collectively called the head in this paper. as in , and application messages (e.g., for reporting measurement data to the head) carry synchronization-related data as well. In addition, BATS does not rely on the “Beacon/Request” messages as shown in Fig. 1 (a), thereby saving energy for their transmissions and receptions at sensor nodes, the latter of which often consume more energy . The proposed scheme is designed to address the three major challenges in WSN time synchronization on resource-constrained sensor nodes, i.e., achieving high synchronization accuracy, reducing energy consumption  and lowering computational complexity .
Based on the reverse asymmetric time synchronization framework and the one-way message dissemination, the proposed BATS scheme combines in a unique way the advantages of several existing WSN time synchronization schemes: Being based on the one-way message dissemination, BATS can take the advantage of simpler implementation compared to those based on the two-way message exchange. Unlike the conventional schemes based on the one-way message dissemination including FTSP, however, BATS is optimized for energy efficiency by reversing the flow of synchronization messages from “headsensor nodes” to “sensor nodeshead”, which is the key idea of the reverse asymmetric time synchronization framework. The reverse asymmetric time synchronization framework, on the other hand, is a generalization of the schemes we have proposed in  and  and belongs to a broader category of reactive time synchronization protocols , where sensor nodes’ local clocks, which are not synchronized to a common reference, are used to timestamp events; synchronization takes place after the event has been detected. However, BATS is also different from the existing reactive time synchronization protocols like Routing Integrated Time Synchronization protocol (RITS)  in its multi-hop extension, where, unlike RITS, there is no layer-by-layer time translation at gateway nodes along a multi-hop path; instead, the said time translation is completely moved to the head to relieve the burden of the gateway nodes.
Note that the actual energy consumption and synchronization accuracy of the proposed scheme are evaluated and analyzed through experiments on a real WSN testbed in this paper. To the best of our knowledge, this is the first work that shows the actual performance of energy-efficiency of the high-precision time synchronization schemes on resource-constrained sensor nodes through real experiments.
The rest of the paper is organized as follows: In Section II, the related work including the time synchronization scheme proposed in  based on reverse two-way message exchange and the conventional time synchronization schemes based on one-way message dissemination is discussed. Section III presents the proposed BATS scheme based on the reverse one-way message dissemination. Section IV discusses the multi-hop extension of BATS scheme with a focus on the issue of communication overhead. The results of the performance evaluation of BATS scheme in terms of energy consumption and synchronization accuracy on a real testbed are presented in Section V. Section VI concludes our work in this paper and highlights the future work.
Ii Related Work
Ii-a Time Synchronization Based on Reverse Two-Way Message Exchange
Aiming at providing high-precision time synchronization for an asymmetric WSN with a head equipped with abundant computing and power resources and multiple resource-constrained sensor nodes (e.g., powered by standalone batteries and equipped with low-cost MCUs), the authors of  proposed an energy-efficient time synchronization scheme based on the asynchronous source clock frequency recovery (SCFR) and the reverse two-way message exchange shown in Fig. 1 (b), which we call it EE-ASCFR in short from now on. In EE-ASCFR, the estimation of the clock offset and frequency ratio is separated into the head and the sensor node to reduce the computational complexity of the latter where a logical clock is maintained based on the estimated clock frequency ratio. Although the broadcasting of the beacon messages is still required, the number of message transmissions at sensor nodes is reduced through bundling several measurement data together with synchronization data in a “Report/Response” message. Compared to BATS, parts of the time synchronization procedures—i.e., the estimation of the clock frequency ratio and the maintenance of the logical clock based on it—are still done at sensor nodes in EE-ASCFR.
Since the hardware clocks of sensor nodes based on low-cost crystal oscillators run independently at different clock frequencies and offsets with respect to those of the reference clock, which is the hardware clock of the head in , the hardware clock of a sensor node for a -node WSN (i.e., ) can be described by the affine clock model as follows:
where is the reference clock time, and and are the clock frequency ratio and the clock offset, respectively. The aforementioned logical clock maintained at the sensor node is described in terms of the hardware clock as follows : For (),
where is the reference time for the th synchronization, and and are the clock skew and offset of the sensor node estimated during the th synchronization. Note that, since the estimation of the offset and frequency ratio is separately done at the head node and the sensor node in EE-ASCFR, the is set to 0 in (2) for the logical clock at the sensor node, which means that the logical clock is synchronized to the reference clock in frequency but runs with a different offset.
As for the frequency ratio in (1), due to the use of the cumulative ratio (CR) estimator of the asynchronous SCFR scheme proposed in  and the reverse two-way message exchange, it is estimated as where and are the timestamps recorded during the initial beacon message transmission at the head and its reception at the sensor node, respectively, and and are the timestamps corresponding to the latest beacon message. The time points of recording the timestamps and are shown in Fig. 1 (b).
Of particular note is that the second term in (2)—i.e., —for the logical clock update requires the division by the frequency ratio, instead of multiplication, unlike the time synchronization schemes based on conventional two-way message exchange. Considering the microsecond-level timestamps involved in the calculation, this division may cause significant numerical computation error due to the limited floating-point precision in the resource-constrained sensor nodes embedded with low-cost MCU as discussed in  and .
Ii-B Time Synchronization Based on One-Way Message Dissemination
Compared to the time synchronization schemes based on the two-way message exchange, those based on the one-way message dissemination have simpler synchronization procedures as shown in Fig. 2 (a) (i.e., conventional one) and Fig. 1 (a) (i.e., reverse one). As a representative example of the time synchronization schemes based on the one-way message dissemination, here we discuss the details of FTSP, whose implementation is available as part of the standard TinyOS library , and identify issues in its implementation on resource-constrained WSN sensor nodes.
In FTSP, the linear regression is used to estimate the clock frequency ratio and offset, i.e., the slope and the intercept of the regression line. However, due to the limited computing resources of the sensor node, FTSP limits the number of timestamp samples used for the least squares estimation of the slope and intercept: Specifically, past 8 timestamp values are employed for all different synchronization intervals (SIs) during the performance evaluation in. In addition to the linear-least-squares-based clock frequency ratio and offset estimation, the timestamping procedure of FTSP records multiple timestamps—i.e., timestamps at each byte boundary after the SYNC bytes as shown in Fig. 3—in sending and receiving a synchronization message to reduce the jitter of the interrupt handling and encoding/decoding times, which is also quite demanding for resource-constrained sensor nodes .
The authors of  proposed RSP, which is also based on the flooding of synchronization messages but simplifies the estimation of the clock skew and offset. In case of the head and the sensor node shown in Fig. 2 (a), their hardware clock times (i.e., for the head and for the sensor node) modeled in (3) can be described as follows:
where and are the clock frequency ratio and the clock offset of the reference clock with respect to the sensor node hardware clock, respectively. Let and () be the timestamps corresponding to the latest Beacon/Request message received at the sensor node. Then, the logical clock at the sensor node —i.e., the estimated reference time corresponding to the sensor node’s hardware clock—is obtained as follows :
are the clock frequency ratio and the clock offset estimated based on the linear interpolation using four timestamps, i.e.,
Ii-C Impact of Limited Precision Floating-Point Arithmetic on High-Precision Time Synchronization
Even with the relatively simpler clock parameter estimation procedures, RSP suffers from numerical errors caused by the limited precision of the low-cost MCUs (i.e., 32-bit single-precision floating-point numbers) of the resource-constrained sensor nodes: Specifically, the proposers of RSP suggest to use SI (i.e., or ) that is large enough to mitigate the impact of the numerical errors on the estimation of clock parameters in (5) and (6).
Likewise, the actual performance of EE-ASCFR on resource-constrained sensor nodes turns out to be poorer than expected due to the precision loss resulting from the use of single-precision floating-point numbers. In this regard, we have proposed an improved version of the scheme along with its multi-hop extension based on the reverse asymmetric framework and demonstrated satisfactory time synchronization accuracy on a real WSN testbed .
It is worth mentioning that the use of 32-bit single-precision floating-point format is common not only for the resource-constrained sensor node platforms (e.g., TelosB  and MicaZ ) but also for the lightweight Arduino boards , which are frequently used as hardware platforms for Internet of Things (IoT) prototyping as discussed in .
Iii Energy-Efficient Time Synchronization Tailored for Resource-Constrained Sensor Nodes
When the propagation delay is not significant (e.g., sub-microsecond delays for WSNs with a communication range of or less), time synchronization schemes based on the one-way message dissemination have a clear advantage over those based on the two-way message exchange in terms of the number of message transmissions at sensor nodes. Still, the schemes based on the one-way message dissemination have issues in their implementation on resource-constrained sensor nodes as discussed in Sec. II-B. Here we introduce BATS—i.e., the energy-efficient time synchronization scheme based on the reverse one-way message dissemination—which addresses the implementation issues of the one-way-message-dissemination-based time synchronization schemes on resource-constrained sensor nodes.
Iii-a Impact of Precision Loss on the Performance of One-Way-Message-Dissemination-Based Time Synchronization Schemes
Taking RSP as an example, which was proposed to simplify the estimation of the clock skew and offset in FTSP, we first analyze the impact of the precision loss on the performance of the one-way-message-dissemination-based time synchronization schemes.
The impact of the precision loss on the estimated reference clock of RSP in (4) can be analyzed in a similar way to that for EE-ASCFR : Let and be the precision loss in the estimation of the clock frequency ratio and the clock offset, i.e.,
are the value of the clock frequency ratio and the clock offset from the practical implementation that are affected by the limited-precision floating-point arithmetic in (5) and (6). The computational error in the estimated reference clock at the sensor node at time , therefore, can be derived as follows:
(9) shows that the computational error consists of two components, the first of which is proportional to the current time of the sensor node’s hardware clock (i.e., ).
According to the IEEE standard for floating-point arithmetic , a non-zero floating-point number can be represented in the binary format as follows:
where is the sign taking the value of or , is the binary fraction whose value is within the range of , and is the integer exponent. Because the IEEE 32-bit single-precision floating-point format assigns 1 bit to , 8 bits to and 23 bits to , the machine epsilon  becomes . If the rounding arithmetic is chopping (i.e., rounding towards 0), the precision loss is within the range of , and the maximum absolute precision loss in this case is . This implies that the first component of (9) alone could result in about and computational errors for of and , respectively, in the worst case.
Note that the analysis of the computational error above is based on the worst-case scenario for simplicity. As discussed in , however, in reality the precision loss itself is inversely proportional to SI (i.e., the time difference between two consecutive beacon messages), which could more or less relax the dependency of the computational error on . In fact, setting an optimal value of SI is quite complicated because the value of SI not only affects the computational error but also determines the impact of the sensor node’s hardware clock drift due to the changes in the ambient temperature and the battery voltage.
Iii-B Beaconless Asymmetric Energy-Efficient Time Synchronization
Now we introduce BATS and show how it can address the implementation issues on resource-constrained sensor nodes discussed in Sec. III-A and further increase energy efficiency by saving the energy for transmissions and receptions of the “Beacon/Request” messages at sensor nodes.
As illustrated in Fig. 4, the proposed BATS scheme based on the reverse one-way message dissemination does not rely on beacon messages but utilizes only measurement data messages to carry the reversed synchronization timestamp , which results in the movement of all time synchronization procedures to the head except timestamping of . As shown in Fig. 5, the timestamping of and is triggered by an interrupt generated by the radio chip immediately after the Start Frame Delimiter (SFD) byte has been sent and received by the MAC layer of the sender and the receiver, respectively, which is similar to that of the Recursive Time Synchronization Protocol (RTSP) . This timestamping approach, which is based on a pair of timestamps generated during the transmission and reception of one message, is simpler and faster than that of FTSP  which reduces the jitter of interrupt handling through recording, normalizing and averaging multiple timestamps at both the sender and the receiver.
In the single-hop scenario shown in Fig. 4, the head’s direct offspring nodes employ their measurement data messages to transmit their timestamps during the -th synchronization to the head for maintaining the time synchronization. Using the abundant computing and power resources including the 64-bit floating-point precision at the head, the numerical computational errors mentioned in Section. II could be avoided in the proposed scheme.
Instead of using the relatively simpler clock parameter estimation procedures of  and , we employ the original linear regression like  and  to model the relationship of the timestamps of the hardware clocks of the sensor node and the head, however, without the limitation on the number of past samples, e.g., FTSP uses only the past 8 samples. The following linear least squares method is employed in BATS to model the linear relationship between the hardware clocks of the sensor node and the head: For
where is the parameter set of clock skew and offset, and denotes the -synchronization.
As we will see in Section V, employing the complex linear regression solution with no limitation on the sample size for solving the linear equation of the time synchronization, could improve the performance of time synchronization compared with the conventional simpler solutions described in Section II. Furthermore, applying relatively more complex solution with higher computational complexity is the natural advantage of our reverse asymmetric framework as we operate all the estimation procedures in the head with abundant computing capability instead of the resource-constrained sensor node.
As exhibited in Fig. 4, the direction of the conventional one-way message dissemination is reversed, where the estimation of the hardware clocks between sensor node and the head is also reversed compared to the conventional one. On the one hand, when timestamps along with measurement data from sensor nodes are gathered in the head, the corresponding hardware clock timestamps of the sensor nodes should be translated based on the head’s reference clock to estimate the exact time for the measurement events. On the other hand, optionally, when the head issues commands to notify sensor nodes to perform collaborative operations (e.g., sleep and wake-up for energy-efficient MAC protocols and application of coherent sampling), the timestamps carried in the commands have to be translated to the target sensor nodes’ hardware clock time. Using the estimated frequency ratio and offset between a sensor node and the head, in single-hop scenario, the translations between their hardware clock time are represented as:
where the translation from sensor node’s clock time to head’s clock time involved the floating-point division, which is similar to the clock time translation in EE-ASCFR. As mentioned in , such calculation involved with floating-point division and microsecond-level timestamp should be carefully handled in the resource-constrained sensor nodes, but BATS is not bothered by such level of computational complexity.
Iv Extension of BATS to Multi-Hop WSNs
Independent of the network topologies which are typically established through routing protocols (e.g., Collection Tree Protocol (CTP) ), the proposed BATS scheme in principle could be extended to any existing multi-hop routing protocols with the addition of the required timestamps in the application messages. There are several issues to consider, however, in its extension to the multi-hop scenario.
In the multi-hop scenario, gateway sensor nodes located in intermediate layers process not only their own data as regular sensor nodes but also the data from their offspring sensor nodes. The presence of gateway nodes makes it complicated for the head to directly handle all timestamps required for time synchronization in multi-hop WSNs.
Iv-a Multi-Hop Extension of The Time Synchronization Based On Reverse One-Way Message Dissemination
As described in , two possible approaches for the multi-hop extension of WSN time synchronization schemes based on the reverse two-way message exchange (including EE-ASCFR) are those of time-relaying and time-translation at the gateway nodes. Of the two approaches, the time-relaying one could introduce more random delays as the messages from the sensor nodes are being transmitted to the head through multiple gateway nodes unlike the time-translation one. Moreover, the random queueing delays of the synchronization messages are also not properly compensated for. To maximize the advantage of MAC-layer timestamping and avoid random queueing delays cumulated through multiple gateway nodes, therefore, we use per-hop time synchronization for the multi-hop extension of BATS, which is similar to the aforementioned time-translation approach in which the hardware clock time of a sensor node goes through layer-by-layer translation in order to estimate its time with respect to the reference clock of the head. The fundamental difference of the per-hop time synchronization compared to the time-translation approach, however, is that all layer-by-layer translations are again moved from the gateway nodes to the head to relieve the burden of the gateway nodes in the original time-translation approach. The system architecture is illustrated in Fig. 6, where the “command” is optional and the “sensor nodes” refer to both gateway and leaf sensor nodes.
We first extend the hardware clock time translation equation of (12) for the single-hop case to the multi-hop case where we recursively translate the hardware clock time. Consider the hardware clock time of a sensor node located at layer of the sensor network with layers: For ,
where is the hardware clock time of the head when is equal to . And the equation when represents the layer-by-layer translation using the clock frequency ratio and offset of each layer.
To translate the hardware clock time of a sensor node at layer to that based on the hardware clock time of the head (i.e., ), we go through the following recursive procedure that is to run at the head:
where the clock frequency ratio and clock offset of each layer are all known at the head.
Note that, in the proposed per-hop time synchronization, timestamps required for the synchronization of a sensor node based on the reverse one-way message dissemination are recorded at the sensor node and its gateway node (working as a reference) as shown in Fig. 4. Unlike the time translation approach described in , however, the time translation operation is moved from the gateway to the head, and the gateway node just sends the pair of timestamps obtained from the reverse one-way message dissemination (i.e., and ) to the head. Based on these pairs of timestamps from all the gateway nodes, the head can establish the relationships between sensor nodes and their gateway nodes and eventually translate sensor nodes hardware clock times to those based on the reference clock at the head recursively based on (13) and (14).
Using the aforementioned per-hop time synchronization, BATS could be extended to cover the multi-hop scenario as demonstrated in Fig. 8 (b), which is different from the conventional multi-hop scheme based on one-way message dissemination shown in Fig. 8 (a) where the synchronization timestamps are carried by standalone beacon messages and the measurement data are transported by the standalone measurement messages. The proposed BATS does not rely on broadcasting beacon messages and embeds the synchronization timestamps into the measurement messages as in . In case of the conventional schemes, there are two separate flows of messages with different directions (i.e., one for synchronization and the other for measurement), we cannot embed synchronization timestamps into the measurement messages as in the extended BATS.
Iv-B Comparison to Other Multi-Hop WSN Time Synchronization Schemes
Having discussed the multi-hop extension of BATS, which does not rely on beacon messages but exploits the bundling of synchronization timestamps with the measurements, we compare the extended BATS to other multi-hop WSN time synchronization schemes.
Since the synchronization timestamps are bundled with measurement data in the same message, consequently the major cost of using the proposed scheme is the payload occupation of the synchronization timestamp—i.e., and —on the measurement message. As exhibited in Fig. 8 (b), for hop , timestamps—i.e., and —are required for the head to achieve network-wide time synchronization. Therefore, for a flat -hop network, timestamps222Because is generated at the head, there is no need of transmission. are transmitted through the measurement messages to the head. Note that, those timestamps ( and ) are also needed in the conventional scheme based on one-way message dissemination such as FTSP, however, the cost—i.e., the transmissions of the standalone synchronization messages—is much higher. Even considering that the timestamp could be kept locally in the sensor node to perform the synchronization procedures, for a flat -hop network, synchronization messages which carry the timestamp have to be broadcasted for achieving overall time synchronization. Using the self-data and all-data bundling procedure illustrated in Fig. 7, for a flat -hop network with generating measurements each hop, the numbers of message receptions and transmissions for conventional scheme () and proposed scheme () with bundling procedures could be quantified as follows:
where contains not only the synchronization message but also the measurement message. On the contrary, just involves the measurement message with synchronization timestamps inside. A flat -hop network with generating measurements each hop is taken as an example with applying (15) and (16), the numbers of message transmissions and receptions for conventional scheme and proposed scheme with self-data and all-data bundling procedures are , and . The proposed scheme with all-data bundling procedure conserves more than message transmissions and receptions compare to the conventional scheme.
Compared to the multi-hop extension of the time synchronization scheme based on reverse two-way message exchange proposed in , the multi-hop extension of BATS based on one-way message dissemination can greatly lower communication overheads by reducing the number of synchronization messages required for network-wide synchronization, which is a significant advantage when used for large-scale WSNs. If the end-to-end communication range of a multi-hop WSN is over a kilometer, however, the propagation delay cannot be ignored any longer, and the time synchronization schemes based on reverse two-way messages exchange would be a better solution in such a case.
V Experimental Results
The proposed BATS scheme is implemented on a real testbed for a flat -hop WSN consisting of one head and six sensor nodes, all of which are based on TelosB motes running TinyOS . Note that the timer resolution of TelosB motes running TinyOS is since the resolutions of its hardware clock running on a 32-kHz crystal oscillator and software timer are and , respectively. The accuracy of time synchronization schemes tested on the testbed, therefore, is limited to a microsecond level.
V-a Energy Efficiency
V-A1 The Number of Message Transmissions/Receptions
|Type of Synchronization Scheme||N1||N|
Both synchronization and measurement messages are counted.
First, we count the numbers of message transmissions and receptions of the conventional and reverse asymmetric time synchronization schemes based on both one-way message dissemination and two-way message exchange to indirectly compare their energy consumptions. A single-hop scenario is considered, where the head and one sensor node are directly connected to each other. We assume that there are measurements in total at the sensor node over the period of , which are reported to the head through measurement messages without measurement bundling, and the SI is set to . The resulting number of messages—i.e., synchronization and measurement messages—transmitted (N) and received (N) by the sensor node are summarized in Table. I.
From the comparison, we observe that the reverse one-way scheme could save the energy consumed by both transmissions and receptions of the synchronization messages; this is because the reverse one-way scheme is free from transmissions and receptions of beacon messages and synchronization timestamps are embedded into measurement messages.
In the reverse two-way scheme, the “Request” synchronization message including timestamp can be embedded into beacon messages, but still sensor nodes consume energy to receive the beacon messages. On the other hand, the conventional two-way scheme requires the most message transmissions due to the sending the “Request” messages from the sensor node to the head. In addition, the conventional one-way scheme requires the same number of synchronization message receptions as in the reverse two-way scheme.
V-A2 Direct Measurement of Energy Consumption
To measure the actual power consumption of a time synchronization scheme on the resource-constrained sensor nodes, we employ a stabilized voltage supply and a digital storage oscilloscope (DSO) to power the sensor node which synchronizes with the head and log the actual power consumption as shown in Fig. 9. In the experiment setup, one resistor is connected in series between the power supply and the sensor node. The two pins of the resistor are connected to the inputs of the amplifying circuit333The amplifying circuit is based on the analog devices designer guidebook [26, chapter 4]. which used to enlarge the -level current input value with 150 times. The outputs of the amplifying circuit are connected to the DSO for logging the power consumption. The power consumption logged in the DSO is illustrated in Fig.10. Because the voltage is stabilized in the measurement experiment which is constantly, so the actual power consumption could be compared through comparing the logged current value sets.
During the experiments, the measurement is generated every and the bundling procedure with bundling measurements is employed in both FTSP and BATS for fair comparison. FTSP broadcasts and receives the synchronization beacon messages per second (i.e., default setting) and reports the bundling messages every , BATS reports the bundling messages with the measurements and synchronization data every without broadcasting or receiving—i.e., radio listening deactivated—the synchronization beacons. The power and energy consumptions are computed as follows:
where , and are the instant power, voltage and current for the sensor node at time , respectively, and is the energy consumed by the sensor node over the time period of . Because the voltage is fixed to during the experiments, we only measure the current over the two different time intervals of and (i.e., in (18)) to obtain power and energy consumptions; Fig. 11 shows the power consumption for different time synchronization schemes over the period of . Since the broadcasting of beacon messages and the reporting of the (bundled) measurement message are periodic, so the two aforementioned example measurement intervals could represent the long-term experiments. As illustrated in Fig. 12, the average power consumption for BATS is the lowest, while the original FTSP—i.e., without using low-power mode—consumes the most power. Specifically, the FTSP employing low-power mode consumes less than one-third power of the original FTSP but more than BATS, which consumes less than and power of the original and the low-power FTSP, respectively.
V-B Time Synchronization Accuracy
V-B1 Single-Hop Scenario
We first evaluate the time synchronization accuracy of the proposed BATS scheme in comparison to that of FTSP with a single-hop scenario. For the experiments, we assume that the sensor node periodically sends measurement data to the head via measurement messages, where 5 measurements are bundled in each measurement message for both FTSP and BATS together with synchronization data in case of the latter. We run experiments for .
Note that BATS uses the measurement messages to carry both measurement and synchronization data, while conventional one-way time synchronization schemes like FTSP rely on beacon messages for synchronization data and use measurement messages only for measurement data. For a fair comparison between BATS and FTSP, therefore, we define SI as the interval between two consecutive measurement messages carrying synchronization data for BATS and the interval between two consecutive beacon messages for FTSP, respectively, and use the same SI value for both schemes for each experiment.
|Synchronization Scheme||MAE1 [s]||MSE1||N||N|
|BATS with the method 1||SI||2.4837E-05||2.1194E-09||36||0|
|BATS with the method 2||SI||8.1524E-06||1.5805E-10||36||0|
Based on the measurement time estimation obtained from such that the actual performance in real deployment is represented.
The standard FTSP implementation provided in TinyOS library offers limited millisecond-level time synchronization .
Before carrying out a comparative analysis with FTSP, we need to decide the values of BATS system parameters affecting time synchronization performance. During the preliminary experiments, we found that the time synchronization accuracy of BATS is affected by the sample size for the linear regression for clock frequency ratio estimation. Note that, for a reasonable comparison, to find the best value of the sample sizes for different SIs, we implemented the offline re-running program in which the same raw data trace produced in the online experiment could be reused to run different offline experiments with different sample sizes. With this program, the possible sample sizes (e.g., 2, …, 10, …, 100, …, all) for different values of SI are evaluated. In particular, the performance of the experiment based on all samples does not outperform the one using the most recent timestamps with certain sample size value. This may result from, as time goes on, due to the aggravating clock drift, the very past sample data—i.e., very past timestamps—do not have positive contributions for the estimations of the timestamps in the most current synchronization interval. Instead, the most recent samples could provide relatively better contributions for the estimation of the most recent timestamps.
Fig. 13 shows the effect of sample size on the mean square error (MSE) and the mean absolute error (MAE) of measurement time estimation of BATS with different values of SI. From the results, we find that the MSE and MAE of measurement time estimation are minimal when the sample size is 19 and 5 for SI of and , respectively. As for the experiments with SI of , the size of total samples is quite limited (i.e., only 36 samples from the experiment over ), which means, it is quite difficult to apply large value for the aforementioned sample size. Anyhow, we still tuned the value of sample size in the range of 2–30, and the results showed that, 2 is the best sample size for the experiment with SI of .
With the best empirical values of the sample sizes for various values of SI, the performance of our proposed scheme embedding the linear regression method is demonstrated. The performance of the method of linear regression with the best parameter value outperformed the conventional methods such as the method based on the calculation of the cumulative frequency ratio proposed in  as shown in Fig. 14. In this figure, the measurement time estimation errors of our proposed time synchronization scheme based on both traditional ratio-based method and linear regression method are demonstrated, in which the linear regression method outperforms the ratio-based method in all three report intervals at different levels. In addition, Fig. 14 demonstrated that our proposed reverse asymmetric framework could be employed on different conventional time synchronization schemes with diverse estimation methods.
Table II summarizes the MAE and MSE of measurement time estimation from the experiments during the period of . In the single-hop scenario, one sensor node is synchronized to one head in the experiments. Note that, as the standard FTSP implementation provided in TinyOS library is employed in our experiments, so the synchronization accuracy of FTSP is limited to millisecond-level. The MAE of measurement time estimation of all three different SIs show that the proposed scheme with two proposed methods provides satisfactory precision with minimum of which is competitive with consideration to the results presented in other papers—e.g., conventional two-way scheme TPSN and one-way schemes FTSP and RSP—which are also evaluated through real testbeds, however, with drastically fewer message transmissions as shown in Table. II.
In addition, Fig. 14 and Table II illustrate that a relatively smaller SI results in better performance with smaller MSE, which means, the performance of the proposed scheme with both methods is related to the value of report intervals. This may result from the drifting of the low-cost crystal oscillator with up to tens of ppm of clock skew in the resource-constrained sensor node, in which the drifting range is typically larger in a longer interval.
V-B2 Multi-Hop Scenario
|Hop Number||MAE 1||MSE 1|
Based on the measurement time estimation obtained from such that the actual performance in real deployment is represented.
Here we investigate the effect of the number of hops on time synchronization with a flat 6-hop WSN with one head and six sensor nodes. We set the SI to and employ the optimal sample size of 19 for the experiment. Note that we apply the self-data bundling only in order to mainly focus on the effect of the number of hops, rather than that of bundling, and thereby make the results more consistent with those of conventional schemes reported in the literature.
As shown in the Fig. 15, the level of fluctuations of the measurement time estimation errors are roughly proportional to the hop counts; for instance, the measurement time estimation errors of the node 6 hops away from the head show the highest fluctuations, while those of the node 1 hop away from the head show the least fluctuations. This is due to the per-hop synchronization strategy employed in BATS, where the estimation of the hardware clock time of a sensor node with respect to the reference clock relies on those of its upper-layer sensor nodes.
Fig. 16 shows the effect of the number of hops on time synchronization in a clearer way through the cumulative distribution functions (CDFs) of absolute measurement time estimation errors. 90th-percentile absolute measurement time estimation errors for sensor nodes 1 to 6 hops away from the head are , , , , and , respectively. The MAEs and MSEs of measurement time estimation are also summarized in Table III. The results of Fig. 16 and Table III demonstrate that the proposed scheme can provide microsecond-level time synchronization accuracy for all the sensor nodes in the 6-hop WSN, even though the time synchronization error is cumulative over the hop count.
Vi Concluding Remarks
We have proposed BATS, i.e., an energy-efficient time synchronization scheme based on the framework of reverse asymmetric time synchronization and the reverse one-way message dissemination; BATS can simultaneously address the major challenges in WSN time synchronization, i.e., lowering energy consumption and computational complexity while achieving high time synchronization accuracy.
The major contribution of our work in this paper is three-fold: First, the reverse asymmetric time synchronization framework is presented. This framework reassigns the clock parameter estimation procedures from resource-constrained sensor nodes to the head equipped with abundant computing and power resources, which leaves only timestamping procedure at the sensor nodes. This reassignment of time synchronization can not only reduce the computational errors caused by the limited precision floating-point arithmetic at the sensor nodes but also bring further potential to use more complex estimation methods at the head, e.g., those based on machine learning techniques such neural networks as demonstrated in; note that, the proposed framework could be employed by the conventional time synchronization schemes based on both one-way message dissemination and two-way message exchange, too.
Second, based on the reverse asymmetric time synchronization framework, BATS is proposed and extended to multi-hop WSNs, which significantly reduces the energy consumption by eliminating the need of the extra synchronization-related message—i.e., beacon message and standalone synchronization message—transmissions.
Third, the actual energy consumption and time synchronization accuracy of BATS are evaluated through extensive experiments on the real WSN testbed. The results demonstrate that BATS conserves up to 95% of the energy consumption by FTSP and provides synchronization accuracy in the single-hop scenario. In case of the multi-hop scenario, the synchronization accuracy for 1-hop and 6-hop sensor nodes are and respectively, which results in per-hop synchronization error in average.
As part of BATS, we have also outlined the message bundling procedure, the full investigation of which would require the consideration of its effect on the end-to-end delay of the measurement data as well as the time synchronization performance. In the follow-up work, therefore, we will carry out a systematic investigation of the effects of the bundling procedure on both synchronization and delay performance in order to identify potential issues and address them through more advanced bundling procedures.
Note that the asymmetric time synchronization framework presented in this paper fits the asymmetric Internet of Things (IoT) deployment which typically consists of a powerful server and numerous resource-constrained IoT devices .
This work was supported by Xi’an Jiaotong-Liverpool University Research Development Fund (RDF) under grant reference number RDF-16-02-39.
-  B. Sundararaman, U. Buy, and A. D. Kshemkalyani, “Clock synchronization for wireless sensor networks: A survey,” Ad Hoc Networks, vol. 3, no. 3, pp. 281–323, May 2005.
-  I.-K. Rhee, J. Lee, J. Kim, E. Serpedin, and Y.-C. Wu, “Clock synchronization in wireless sensor networks: An overview,” Sensors (Basel, Switzerland), vol. 9, no. 1, pp. 56–85, Jan. 2009.
-  Y. Wu, Q. Chaudhari, and E. Serpedin, “Clock synchronization of wireless sensor networks,” IEEE Signal Processing Magazine, vol. 28, no. 1, pp. 124–138, Jan. 2011.
-  M. Maróti, B. Kusy, G. Simon, and Ákos Lédeczi, “The flooding time synchronization protocol,” in Proc. 2nd Int. Conf. SenSys, Nov. 2004, pp. 39–49.
-  B. Kusý, P. Dutta, P. Levis, M. Maróti, Ákos Lédeczi, and D. Culler, “Elapsed time on arrival; a simple and versatile primitive for canonical time synchronisation services,” Int. J. Ad Hoc Ubiquitous Comput., vol. 1, no. 4, pp. 239–251, Jul. 2006.
-  J.-P. Sheu, W.-K. Hu, and J.-C. Lin, “Ratio-based time synchronization protocol in wireless sensor networks,” Telecommunication Systems, vol. 39, no. 1, pp. 25–35, Sep. 2008.
-  S. Ganeriwal, R. Kumar, and M. B. Srivastava, “Timing-sync protocol for sensor networks,” in Proc. SenSys’03, Nov. 2003, pp. 138–149.
-  J. Elson, L. Girod, and D. Estrin, “Fine-grained network time synchronization using reference broadcasts,” in Proc. 5th Symp. Operating System Design and Implementation, Dec. 2002, pp. 147–163.
-  B. Kim, S. Hong, K. Hur, and D. Eom, “Energy-efficient and rapid time synchronization for wireless sensor networks,” IEEE Transactions on Consumer Electronics, vol. 56, no. 4, pp. 2258–2266, Nov. 2010.
-  K. S. Kim, S. Lee, and E. G. Lim, “Energy-efficient time synchronization based on asynchronous source clock frequency recovery and reverse two-way message exchanges in wireless sensor networks,” IEEE Transactions on Communications, vol. 65, no. 1, pp. 347–359, Jan. 2017.
-  X. Huan and K. S. Kim, “On the Practical Implementation of Propagation Delay and Clock Skew Compensated High-Precision Time Synchronization Schemes with Resource-Constrained Sensor Nodes in Multi-Hop Wireless Sensor Networks,” arXiv e-prints, p. arXiv:1905.00554, 2019.
-  “TelosB datasheet,” http://www.memsic.com/userfiles/files/Datasheets/WSN/telosb_datasheet.pdf, accessed: 07-06-2019.
-  F. Gong and M. L. Sichitiu, “CESP: A low-power high-accuracy time synchronization protocol,” IEEE Transactions on Vehicular Technology, vol. 65, no. 4, pp. 2387–2396, Apr. 2016.
-  S. el Khediri, N. Nasri, M. Samet, A. Wei, and A. Kachouri, “Analysis study of time synchronization protocols in wireless sensor networks,” arXiv e-prints, pp. 1–15, Jun. 2012.
-  J. Sallai, B. Kusý, A. Lédeczi, and P. Dutta, “On the scalability of routing integrated time synchronization,” in Proceedings of the Third European Conference on Wireless Sensor Networks, ser. EWSN’06. Berlin, Heidelberg: Springer-Verlag, 2006, pp. 115–131.
-  K. S. Kim, “Asynchronous source clock frequency recovery through aperiodic packet streams,” IEEE Communications Letters, vol. 17, no. 7, pp. 1455–1458, Jul. 2013.
-  “TinyOS,” https://github.com/tinyos/tinyos-main, accessed: 07-06-2019.
-  “MicaZ datasheet,” http://www.memsic.com/userfiles/files/Datasheets/WSN/micaz_datasheet-t.pdf, accessed: 07-06-2019.
-  “Arduino platforms,” https://www.arduino.cc/, accessed: 07-06-2019.
-  S. K. Mani, R. Durairajan, P. Barford, and J. Sommers, “An architecture for iot clock synchronization,” in Proceedings of the 8th International Conference on the Internet of Things, Oct. 2018, pp. 17:1–17:8.
-  IEEE Computer Society, IEEE Std 754™-2008, IEEE Standard for floating-point arithmetic, Std., 2008.
-  D. Goldberg, “What every computer scientist should know about floating-point arithmetic,” ACM Computing Surveys, no. 1, pp. 5–48, Mar. 1991.
-  M. Akhlaq and T. R. Sheltami, “RTSP: An accurate and energy-efficient protocol for clock synchronization in WSNs,” IEEE Transactions on Instrumentation and Measurement, vol. 62, no. 3, pp. 578–589, Mar. 2013.
-  D. Djenouri and M. Bagaa, “Implementation of high precision synchronization protocols in wireless sensor networks,” in Proc. WOCC 2014, May 2014, pp. 1–6.
-  O. Gnawali, R. Fonseca, K. Jamieson, M. Kazandjieva, D. Moss, and P. Levis, “CTP: An efficient, robust, and reliable collection tree protocol for wireless sensor networks,” ACM Trans. Sen. Netw., vol. 10, no. 1, pp. 16:1–16:49, Dec. 2013.
-  “A Designer’s Guide to Instrumentation Amplifiers, 3RD Edition, 2006,” https://www.analog.com/en/education/education-library/dh-designers-guide-to-instrumentation-amps.html, accessed: 07-06-2019.
-  J. M. Castillo-Secilla, J. M. Palomares, and J. Olivares, “Temperature-compensated clock skew adjustment,” Sensors, vol. 13, no. 8, pp. 10 981–11 006, Aug. 2013.
-  G. Cena, S. Scanzio, and A. Valenzano, “A neural network clock discipline algorithm for the rbis clock synchronization protocol,” in Proc. 14th IEEE International Workshop on Factory Communication Systems, Jun. 2018, pp. 1–10.
-  B. Badihi, R. Jantti, Huseyin, and Yigitler, “Time synchronization for IoT deployments: Clock discipline algorithms and protocols,” https://www.researchgate.net/publication/328577639_Time_Synchronization_for_IoT_Deployments_Clock_Discipline_Algorithms_and_Protocols, 2018, accessed: 07-06-2019.