WIRELESS COMMUNICATIONS AND MOBILE COMPUTING Wirel. Commun. Mob. Comput. 2013; 13:798–808 Published online 17 May 2011 in Wiley Online Library (wileyonlinelibrary.com). DOI: 10.1002/wcm.1144
RESEARCH ARTICLE
Random time source protocol in wireless sensor networks and synchronization in industrial environments Fuqiang Wang1,2 , Peng Zeng1 , Haibin Yu1* and Yang Xiao3 1 2 3
Key Laboratory of Industrial Informatics, Shenyang Institute of Automation, Chinese Academy of Sciences, Shenyang, China Graduate School of the Chinese Academy of Sciences, Beijing, China Department of Computer Science, The University of Alabama, Tuscaloosa, AL 35487, U.S.A.
ABSTRACT Reliability is a crucial aspect of time synchronization for industrial wireless applications in wireless sensor networks. Existing time synchronization algorithms often provide good synchronization in laboratory environments; however, outdoor environments with associated radio interference influence the performance of time synchronization. In this paper, we propose a random time source protocol for industrial wireless applications in wireless sensor network synchronization. Each synchronized node randomly selects its time source for each period in order to prevent reliance on a fixed time source because this may lead to resynchronization once the source fails. We have implemented the algorithm on the SIA2420 platform using T INYOS, and the results show the reliability of our protocol. Copyright © 2011 John Wiley & Sons, Ltd. KEYWORDS WSNs; time synchronization; clock drift; random time source *Correspondence Haibin Yu, Shenyang Institute of Automation Chinese Academy of Sciences, 114 Nanta Street Shenhe District, Shenyang, 110016, China. E-mail:
[email protected]
1. INTRODUCTION A typical wireless sensor network (WSN) consists of a large number of wirelessly connected sensor nodes that are capable of computation, communication, and sensing. Because it is one of the key technologies in WSNs, time synchronization plays an important role in node localization, data fusion, synchronized channel switching/hopping, and so forth. Although sensor nodes are equipped with hardware clocks, these hardware clocks usually cannot be used directly because they may experience severe drifts. Although these hardware clocks can be calibrated before deployment, they may ultimately exhibit a degree of skew. In order to obtain an accurate common time, nodes must occasionally exchange messages and adjust their clock values. Two major network time synchronization methods, the global positioning system (GPS) and the network time protocol (NTP), are widely used. Although the GPS method provides high precision with the assistance of GPSs [1],
798
it is often not available in certain situations, especially in either battlefield or industrial environments; in addition, GPS receivers are expensive. The NTP method is used within the Internet, and it provides highly precise network time synchronization via relatively complex computation and communication [2]. The GPS and NTP methods are not suitable for WSNs because sensor nodes are equipped with batteries that provide a limited energy supply. These sensors are small in size and inexpensive, and they may be deployed in harsh environments. Several time synchronization protocols have been developed to address the special requirements for applications in WSNs. Some notable examples are the reference broadcast synchronization (RBS) algorithm [3], timing-sync protocol for sensor networks (TPSN) [4], the flooding time synchronization protocol (FTSP) [5], simple time synchronization [6], TSync [7], and lightweight time synchronization (LTS) [8]. Some experiments on these protocols have achieved synchronization within a few microseconds; however, most of these experiments are implemented in laboratory environments with less radio interference. Most of
Copyright © 2011 John Wiley & Sons, Ltd.
F. Wang et al.
Random time source protocol
the protocols employ node-to-node time synchronization in which all of the children of a parent node may be out of synchronization if this node fails, and thus, a process of refreshing topology or resynchronization may occur. As illustrated in Figure 1, node 0 is the root of the whole network, and it acts as the reference time source for the other nodes. If node 1 is invalid, all of the nodes synchronized through node 1 (including nodes 3, 4, 5, and 6) will soon be out of synchronization. Figure 2 exhibits the synchronization state of a node in the network. This node has been placed in a location where electromagnetic interference and other radio devices exist on the same frequency band. We also manually opened or shut down some nodes in order to imitate node failure, which threatens time synchronization. As illustrated in Figure 2, the node experiences ‘in synchronization’ and ‘out of synchronization’ alternatively, where ‘out of synchronization’ means that the system suffers a loss of data interaction and high energy consumption. Reliability requires high precision, stability, and security. In this paper, reliability is defined as the stability of synchronization. Reliability is an important aspect of time synchronization in WSNs, particularly in industrial wireless applications. In a wireless network, link and node failures are inevitable for reasons such as radio interference
2. RELATED WORK
0
1
3
2
4 6
5
Figure 1. One example of time synchronization. 1.5
1
0.5
0
0
1
2
3
and energy exhaustion. When nodes are out of synchronization, a series of methods can be used to resynchronize them, but typically, the time required to detect and to repair synchronization is long. The method in [4] needs four cycles to detect time source failures and then at least one more to be resynchronized. The method in [5] does not perfectly detect synchronization failures; it needs at least four cycles to perform resynchronization processes. It is possible to prolong time cycles to save energy, but this method leads to longer resynchronization times and may not be suitable for real-time systems. In this paper, we propose a random time source protocol (RTSP) to decrease the probability of synchronization failure. The proposed algorithm was designed during a period of implementation and experiments in an industrial wireless project when our real system frequently encountered node failure. We implemented RTSP on the SIA2420 sensor nodes under the T INYOS (University of California at Berkeley, Berkeley CA, USA) operating system. The rest of this paper is organized as follows. Section 2 presents the related work of synchronization in WSNs. We the propose RTSP in Section 3. In Section 4, implementation in our testbed is introduced. In Section 5, the experiment results are presented. Finally, we conclude this paper in Section 6.
4
5
time (h) Figure 2. The synchronization state of a node in the network (the values of the y -axis indicate the following states: 1 means ‘in synchronization’, and 0 means ‘out of synchronization’).
Clock synchronization has been studied in distributed systems and wired networks long before the advent of WSNs. GPS-based clock acquisition schemes exhibit some weaknesses; GPS is not ubiquitously available (e.g., underwater, indoors, under foliage) and requires a relatively high-power receiver that is not possible in small, inexpensive sensor nodes. Software-based approaches are thus motivated to achieve in-network time synchronization. Classical clock synchronization algorithms rely on the ability to exchange messages at a high rate, although this may not be possible in WSNs. Traditional time synchronization algorithms like the NTP are not suitable for a wireless sensor environment because WSNs pose numerous challenges, including the following: limited energy and bandwidth, limited hardware capability, latency and unstable network conditions caused by mobility of sensors, dynamic topologies, and multi-hopping. The RBS [3] intended for pairwise and multi-domain clock synchronization seeks to reduce unpredictable latency by exploiting the broadcast nature of the wireless communication and by shortening the critical path. The paper in [9] extends RBS and applies probabilistic clock synchronization to guarantee an upper bound on accuracy. The paper [4] proposes a network-wide synchronization scheme called timing-sync protocol for sensor networks that uses medium access control (MAC)-layer time-stamping to reduce the non-deterministic message delay. The protocol achieves a global timescale by establishing a hierarchical structure and by having each sensor node synchronize with its root. The FTSP [5] extends the MAC-layer time-stamping
Wirel. Commun. Mob. Comput. 2013; 13:798–808 © 2011 John Wiley & Sons, Ltd. DOI: 10.1002/wcm
799
F. Wang et al.
Random time source protocol
to further eliminate the uncertainties in message transmission so that a single broadcast message is sufficient to synchronize the sender and the receiver. The paper in [10] proposes the time diffusion protocol that achieves a network-wide equilibrium time based on the diffusion of messages; thereby, it involves all of the nodes in the synchronization process. The paper in [11] proposes a fully localized diffusion-based method in order to achieve global time synchronization. More recently, the gradient time synchronization protocol (GTSP) [12] has provided accurately synchronized clocks between neighbor nodes. GTSP works in a completely decentralized fashion where every node periodically broadcasts its time information. The logical clock is calibrated from synchronization messages received from direct neighbors. However, all of the above protocols may have problems with complex interferences, especially in industrial environments, both outdoor and indoor, that are typically subject to the following harsh environmental effects: high temperature variations, direct sun irradiation, humidity, mud, crushes, vibrations, and electromechanical forces [13]. These interferences lead to message loss, which is crucial to synchronization protocols that perform synchronization with message exchanges. To achieve reliability, several synchronization schemes [12,14] have also been proposed. GTSP in [12] provides accurately synchronized clocks between neighboring nodes. GTSP works in a completely decentralized fashion in which each node periodically broadcasts its time information. The logical clocks are calibrated from synchronization messages that are received from direct neighbors. The paper in [14] presents an improved FTSP in industrial wireless networks; it avoids the transmission of time synchronization messages in order to decrease the total number of sent and received frames. For the improved FTSP, time synchronization frames are transmitted by either the root or by any synchronized node in the industrial wireless network in order to decrease the error rate caused by different environments. In recent years, FTSP has been widely used because of its simple implementation and energy efficiency via oneway message exchanges, but FTSP introduces many errors when the number of hops from the root of the tree is larger. FTSP may also introduce errors due to the resynchronization necessitated by sync-message loss that is caused by link failure or radio interference in a single time source systems. Our proposed RTSP concentrates on achieving robustness to packet loss resulting from link failure, and it achieves reliable synchronization among neighbors as opposed to using a single time source. There are some other related work in synchronization [15–26] and other problems [27–49].
3. RANDOM TIME SOURCE PROTOCOL In this section, we describe our use of RTSP in WSN synchronization. The basic idea is to use a random source 800
algorithm in order to decrease the probability of resynchronization rather than using a single time source. In a clock synchronization algorithm, which should be completely distributed and reliable in overcoming link and node failures, it is impractical to synchronize the clock with a fixed node. Therefore, our clock synchronization algorithm adopts a random time source as well as a time source evaluation mechanism in order to decrease the effects of link or node failures. Potential time sources are derived through our neighbor table management that selects suitable time sources from all of its neighboring nodes.
3.1. Neighbor table management Typically, network protocols maintain information concerning their neighbors in order to make informed decisions for routing, aggregation, and dissemination. Similarly, the synchronization model maintains information about the link quality of the potential time source. For example, MintRoute [50] in the T INYOS distribution combines link reliability information for its direct neighbors with path metrics (e.g., hop count or expected path cost) for routing to a root node. Neighborhood management has three essential components: insertion, eviction, and reinforcement. For each incoming packet on which neighbor analysis is performed, the sources of insertion and reinforcement are considered. If the source is present in the table, a reinforcement operation may be conducted to keep it there. If the source is not present and the table is full, the node must decide whether to discard information associated with the source or to evict another node from the table. We seek to develop a neighborhood management algorithm that keeps a sufficient number of good neighbors in the table regardless of cell density. Ultimately, the reliability criteria should reflect which nodes are most useful for synchronization. For example, we may want to discard nodes with lowquality links. A node may hear many neighbors with good or poor link qualities and may even change from time to time; however, a node should hear from the well-connected nodes more frequently. The management algorithm should prevent the table from being polluted by many low utility neighbors and should allow new valuable neighbors to enter. After hearing from a non-resident source, we must determine whether to insert it. No historical information can be used because no table entry has been allocated. In some cases, it may be possible to use packet reception rate or signal strength information associated with the packet, but because the packet reception rate is required, we seek to obtain a simple statistical method. The insertion policy should avoid overrunning the neighbor table with a high rate of insertion so that a stable set of neighbors can be established. Probabilistic down-sampling is a preferred technique for controlling the insertion rate. The insertion policy should reinforce the good neighbors in the table. At the insertion time, if the node is not in the
Wirel. Commun. Mob. Comput. 2013; 13:798–808 © 2011 John Wiley & Sons, Ltd. DOI: 10.1002/wcm
F. Wang et al.
Random time source protocol
table and there is still space for new entries, the entry is inserted into the table once the signal strength of the neighbor enters an allowable range. If there is no space in the table and a new node has better link quality than the worst node in the table, the worst one will be evicted from the table. Reinforcement is also crucial if the approaching node is already in the table because the link quality changes from time to time. In this algorithm, nodes in the network choose several potential nodes as time sources and then randomly select one for time synchronization during each synchronization time period. The following rules are applied: Better link quality increases the probability of being chosen as the time source. If the node successfully receives time information from its recent time source, the parameters associated with link quality will be updated; if unsuccessful, the values of the parameters will be decreased. If the values of the parameters for a potential time source are lower than the threshold of link quality, the corresponding node will be deleted from the potential time source queue. If the node fails to synchronize with all of the potential time sources, a resynchronization process will be enacted.
0
1
3
2
4 7 6 5 Figure 3. Example of the random time source algorithm.
.n/
Let pij denote a binary function that returns 1 if node n successfully receives the synchronization packet in a synchronization cycle and otherwise returns 0, where i is the i th potential time source and j is the jth synchronization period. We have .n/
pij D
1; 0;
success fail
(1)
3.2. Random time source selection The time precision and the survival period of synchronization depend on the time source that a synchronized node selects, and, if a problem occurs for the time source, all children of this node will be out of synchronization. If deployed wireless devices are accompanied by other wireless equipment or are in industrial plants full of electronic interference, communication failures will be common. One example of a choice for a time source is shown in Figure 3, and the choice of a time source depends on the number of hops from the root. Node 1 and node 2 hear from the network root node 0, and they can only synchronize with node 0. Next, nodes within the radio radius of nodes 1 and 2 (e.g., nodes 4 and 7 in Figure 3) can use these two nodes as potential time sources. Similarly, node 5 can acquire three potential time sources, such as nodes 4, 6, and 7 in Figure 3. Random selection can reduce the probability of resynchronization due to link failures, and it can increase the consistency of synchronization. As illustrated in Figure 3, if one of the parents of node 5 fails, it can remain synchronized with the other two nodes. Table I lists some of notations used in this paper. Let n in a network denote a typical node that is synchronized to the network and acquires several potential time sources, and let M denote the number of potential time sources. The node is out of synchronization after m consecutive losses of synchronization packets. The duration of m consecutive losses of synchronization packets is called a test period.
If a neighbor of node n receives all of the synchronization packets for one potential source i , this neighbor is called a perfect source. If a neighbor of node n does not receive any of the synchronization packets for one potential source i , this neighbor is called a failed source. Those for others (which do not belong to the above two cases) are called unstable sources. We have 8 .n/ ˆ pij D 1 j D 1; 2; : : : ; m ˆ ˆ ˆ ˆ m ˆ < P .n/ pij > 0 j D1 ˆ ˆ P m ˆ ˆ .n/ ˆ pij D 0 ˆ :
perfect source usable source
(2)
failed source
j D1
We define a packet receiving matrix for node n within m periods of M potential time sources as follows: 0
.n/
p B 11 B :: @ : .n/ pM 1
::: :: :
1 .n/ p1m :: C C : A .n/ pM m M m
(3)
In a traditional time synchronization algorithm, each node in the network has only one time source at a given time, and the selective matrix is defined as follows:
Wirel. Commun. Mob. Comput. 2013; 13:798–808 © 2011 John Wiley & Sons, Ltd. DOI: 10.1002/wcm
Œ1
:::
1Tm1
(4) 801
F. Wang et al.
Random time source protocol
Table I. Notations used in this paper. Notations
Meaning
n M m pij.n/ 0 B B @
.n/ p11 : : : pM.n1/
::: :: :
qji.n/ W S ni ıi
1 p1.mn/ : C : C : A .n/ pMm M m
A typical node in the network The number of potential time sources A period of consecutive loss of synchronization packets A binary function, which returns 1 if node n successfully receives the synchronization packet in a synchronization cycle; otherwise, it returns 0, where i is the i th potential time source and j is the j th synchronization period A packet receiving matrix of node n within m periods of M potential time sources The selecting mode of source i in period j The number of table entries used for calculation The duration of the synchronization period The number of nodes with the hop number i The delay for each hop node to be synchronized
This indicates that, if the potential neighbor is selected as a time source, it will be kept as the chosen source during the test period. By multiplying the two matrices (3) and (4), we obtain the selection results of each potential source as follows: 3T 2 m m X X .n/ .n/ 4 p1j pMj 5 (5) j D1
j D1
M 1
If a failed source appears in node n’s potential sources, one of the items in Equation (5) is 0. This indicates that, if node n selects this failed source, the synchronization will fail after the test period. In the random time source algorithm, node n randomly selects one of the potential sources each period, and the selective matrix is defined as follows: 1 0 .n/ .n/ q11 : : : q1M B : :: C :: C B : (6) : : A @ : .n/ .n/ qm1 qmM mM
In Equation (8), each line denotes the cumulative results of each source. If a single time source algorithm is used, one of the lines in Equation (8) denotes the selection result. This acts as a special example of the random time source algorithm in which one of the values for each row in Equation (8) is randomly selected to form the final result. The advantage of expression (8) over expression (5) is that Equation (5) cannot be proved through mathematical operations; instead, the random source algorithm performs more efficiently in practical implementations. Figure 4 reveals that the random time source algorithm performs better in our experiments. The experiments were implemented with radio interference and with selectively activated nodes in the network. In the experiments, a node with 10 potential time sources in the network was used, and the experiments lasted for more than 3 days. Although the experiments are unable to represent all of the scenarios for a network, most of the potential abnormality is reflected here. Nodes in a network perform according to a level hierarchy, and nodes with the same hop number act as one level. There is no need for the network to form a tree
.n/
j D1
We obtain the selection results of each potential source by multiplying the two matrices (3) and (6) and by using the random time source selection algorithm: 1 0 .n/ .n/ : : : t1M t11 m X B : :: C .n/ .n/ .n/ :: C B : ; where t D pac qcb : : A @ : ab cD1 .n/ .n/ tM 1 tMM M M (8) 802
0.05 fixed time source
0.045
percentage of failure
where qj i acts as the selecting mode of source i in period j and is defined as follows: 1; selected qij D 0; not selected (7) M X qij D 1
0.04
random time source
0.035 0.03 0.025 0.02 0.015 0.01 0.005 0 100
1000
5000
10000
cycles
Figure 4. Comparison of loss rate between fixed and random time sources.
Wirel. Commun. Mob. Comput. 2013; 13:798–808 © 2011 John Wiley & Sons, Ltd. DOI: 10.1002/wcm
F. Wang et al.
Random time source protocol
structure before synchronization because the hop information accompanies the sync-messages. In a traditional synchronization protocol, the time for a network to be synchronized depends on the network scale and the synchronization period. The protocol proposed in this paper ensures that the nodes use all the time information by overhearing from neighbors with the same hops. Let W denote the number of table entries used for calculation, and let S denote the duration of the synchronization period. Let ni denote the number of nodes with the hop number i , and let ıi denote the delay for each hop node to be synchronized; m acts as the depth of the network. Therefore, we obtain the synchronization time of a traditional protocol and the proposed scheme as follows:
m X
.W S C ni ıi /
(9)
m X W S C ni ıi ni1
(10)
T D
iD1
T D WS C
iD2
Equation (9) gives the synchronization time for traditional protocols, and Equation (10) gives this time for our protocol. The comparison of these two methods can be depicted in Figure 5. We observe that for Figure 5, when the number of nodes increases from 1 to 5, the required synchronization cycles decrease and then start to climb again. The reason for this is that when the number of nodes is 1, the advantage of our scheme cannot be fully utilized with the result that the performance is the same for the traditional approach. When the number reaches 5, the advantage of our scheme is shown, and the performance is even better than the case where the number is 1. However, when the number of nodes increases to 10 or more, the performance becomes worse because of the increased number of nodes.
100
syncronization cycles (S)
90
Traditional
80
RTSP
70
4. IMPLEMENTATION This section describes the implementation of RTSP on the SIA2420 sensor nodes using the T INYOS operating system. 4.1. Target platform The hardware platform used for the implementation of the protocol is the SIA2420 sensor node from the Shenyang Institute of Automation in China. It features a TI MSP430 microcontroller with 10 kB RAM. The CC2420 radio module has been designed for low-power applications, and it offers data rates up to 250 kBaud by using the direct sequence spread spectrum. The MSP430 microcontroller has 10 built-in 16 bit timers, three of which are type A and seven of which are type B. The SIA2420 board is equipped with two different quartz oscillators (32 kHz and 8 MHz, respectively), which can be used as clock sources for the timers. Type A timers are configured to operate at 1/8 of the oscillator frequency (8 MHz), leading to a clock frequency of 1 MHz. Because Timer A is sourced by an external oscillator, it is also operational when the microcontroller is in low-power mode. We employ timer 2 in timer A to provide our system with a free-running 32-bit hardware clock that offers precision to 1 s. This approach to the SIA2420 node offers better clock granularity than more recent hardware platforms that lack a high-frequency external oscillator, as shown in Table II. 4.2. TINYOS implementation The implementation of RTSP on the SIA2420 platform is done through T INYOS 2.1. The protocol implementation provides a time synchronization service for applications running on the mote. The architecture of the time synchronization component and its relation to other system components are both shown in Figure 6. The root node first broadcasts a synchronization message with its local clock, which acts as the global time of the network. Nodes that can overhear the message record the received timestamp from the hardware clock model. The RTSP module of the root node and of the synchronized nodes periodically broadcasts a synchronization beacon containing the sending timestamp. Each node overhearing
W=4m=4
60 50
Table II. Comparison of clock sources for common sensor network hardware platform.
40 30 20
Platform
CPU clock
Quartz crystal
10 0
1
5
10
20
40
100
nodes number
Figure 5. Comparison of synchronization time between the traditional protocol and the RTSP.
Mica2 MICAz TinyNode Tmote Sky SIA2420
Wirel. Commun. Mob. Comput. 2013; 13:798–808 © 2011 John Wiley & Sons, Ltd. DOI: 10.1002/wcm
8 MHz 8 MHz 8 MHz 8 MHz 8 MHz
32 kHz, 7.37 MHz 32 kHz, 7.37 MHz 32 kHz 32 kHz 32 kHz, 7.37 MHz
803
F. Wang et al.
Random time source protocol
Application Time Synchronization Component RTSP
Logical Clock
Radio
Local Clock
Figure 6. Architecture of time synchronization service and its integration within the hardware and software platforms.
messages sorts by the time source managed by the RTSP module, and the run compensation mechanism is disposed by the logical clock module. By overhearing synchronization messages, a node will learn when another node joins its neighborhood. When no such messages are received from a node for several synchronization cycles, the link to this node is assumed to be broken, and the node is removed from the neighbor table. The capacity of the neighbor table is limited by the data memory available to the node. The upper bound for the required capacity is the maximum node degree in the network. It is possible to ignore synchronization messages from a specific neighbor while the network grid remains connected. In our experiment, the default capacity of the neighbor table is set to 12.
5. TESTBED EXPERIMENTS We evaluated the implementation of RTSP by experiments on a testbed with SIA2420 sensor nodes. 5.1. Experiment results The scene as shown in Figure 7 is adopted to test the reliability of our random time source mechanism. Node 0 acts as the root and the reference time for the network, and the
hop with nodes 1, 2, and 3 both acts as the first level of the network and maintains the unique time source of node 0. Node 5 deploys within the radio range of the three onehop nodes but beyond the range of node 0. This is the same for node 4 and node 6. Node 5 randomly synchronizes to one of the three potential time sources of the first hop, and nodes 4 and 6 run the unique time source selecting mechanism. Figure 8 shows that the nodes running a random selection with three time sources achieve better performance. Also, Figure 8 shows that the node with a single source selects its time source of the curve with a diamond shape and follows with our protocol. Although nodes with a single source cannot always have the most stable time source, as shown in Figure 8, the node with a random choice can obtain a compromise performance. The point at the peak suggests that the node is out of synchronization, a matter that we adopt for the convenience of exhibiting the relation of our experiment because the error is of great value. The node with a single time source may be out of synchronization for the failure of the link with its source node, as the peak point in Figure 8; the node that performs a random choice can always remain in synchronization by not relying on a single time source. 5.2. Comparison with flooding time synchronization protocol The time required for the network to finish synchronization was tested under the same scenario as in Figure 9. Both RTSP and FTSP were tested with synchronization period changes from 1 s to 64 s, and the times required for the synchronization of the whole network were recorded and exhibited in Figure 10. We began to record the time once one of the nodes in the network synchronized in order to eliminate the influence of tree establishing time for FTSP. From the figure, we can conclude that the network synchronization time consistently increases with the synchronization period. RTSP requires less time to be networkwide synchronized, and it performs better as the cycle
one hop single time source
one hop one hop random 3 time sources
0
2
average error (us)
1
8.00
3
7.00 6.00 5.00 4.00 3.00 2.00 1.00 0.00
4
5 Figure 7. Test scene of the experiment.
804
6
0
10
20
30
40
50
60
time (min) Figure 8. Comparison of single and random time sources.
Wirel. Commun. Mob. Comput. 2013; 13:798–808 © 2011 John Wiley & Sons, Ltd. DOI: 10.1002/wcm
F. Wang et al.
Random time source protocol
: Original time source in the network
: Node in the network
: Direction of time source
: Radio radius of a node
: Link of two nodes
ID1
well synchronized, the beacon rate can be lowered to save energy. The communication overhead of RTSP is comparable with that of FTSP because both algorithms require each node to broadcast its time information only once per synchronization period. For the random time source, although they randomly select a time source each synchronization cycle, nodes that require synchronization wake up only once to listen to synchronization messages per synchronization cycle in a duty-cycling system. The complexity of the proposed scheme is almost the same as the traditional approach with the exception of the additional use of random number generators.
6. CONCLUSION AND FUTURE IMPROVEMENT Figure 9. Test scenario of the time synchronization test. 450
time (s)
400 350
RTSP
300
FTSP
250 200 150 100 50
0
1
2
4
8
16
32
64
synchronization period (s) Figure 10. Synchronization completion time for different periods of random time source protocol (RTSP) and flooding time synchronization protocol (FTSP).
increases; this is because the random time source algorithm in our protocol, in which every node in the network is synchronized, can be used as the time source during synchronization.
We have described the RTSP for the WSN. The protocol was implemented on SIA2420 platforms that run T INYOS. The average precision is no more than 5 s and robustness to link failure. This performance is markedly better than that of other existing time synchronization approaches on the same platform. The RTSP was tested, and its performance was verified in a real-world application. This is important because the service did not operate in isolation but rather as part of a complex application where resource constraints as well as intended and unintended interactions between components can and usually do cause undesirable effects. Moreover, the system operated in fields with factory devices and other interference. This is a testimony to the robustness of the protocol and its implementation. Several further studies must be conducted in the future. The first is to study the influence of temperature for the accuracy of our protocol, and the second is to eliminate this influence. Also, synchronization information may be carried by a normal network message in the network in order to reduce the energy consumed by synchronous messages.
5.3. Energy efficiency
ACKNOWLEDGEMENTS
Radio communication consumes a large portion of the energy budget of a sensor node. Although the microcontroller can be put into sleep mode when it is idle and thus greatly reducing power consumption, the radio module must still be powered in order to capture incoming message transmissions. Energy-efficient communication protocols employ scheduled radio duty-cycling mechanisms to lower power consumption and prolong battery life. Because the exact timing of synchronization messages is not important, RTSP can be used together with an energy-efficient communication layer [12]. In addition, a node can estimate the current synchronization error of its neighbors from the incoming beacons in order to dynamically adapt the interval between synchronization beacons. If the network is
This work is supported by the Chinese National 863 High Technology Plan under grant number 2007AA041201, National Natural Science Foundation of China 60804067, and National Excellent Young Leader Foundation under grant number 60725312. Prof. Yang Xiao’s work was supported in part by the US National Science Foundation (NSF) under grants CNS-0737325, CNS-0716211, CCF-0829827, and CNS-1059265.
REFERENCES 1. Zhu W. TDMA frame synchronization of mobile stations using a radio clock signal for short range
Wirel. Commun. Mob. Comput. 2013; 13:798–808 © 2011 John Wiley & Sons, Ltd. DOI: 10.1002/wcm
805
F. Wang et al.
Random time source protocol
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
806
communications. In Proceedings of the 44th IEEE Vehicular Technology Conference, Stockholm, Sweden, June 1994; 1878–1882. Guanlin K, Fubao W, Weijun D. Survey on time synchronization for wireless sensor networks. Computer Measurement & Control 2005; 13: 1021–1023,1030. Elson J, Girod L, Estrin D, Usenix U. Fine-grained network time synchronization using reference broadcasts. In ACM SIGOPS Operating Systems Review—OSDI ’02: Proceedings of the Fifth Symposium on Operating Systems Design and Implementation, Boston, MA, USA, December 2002; 147–163. Ganeriwal P, Kumar P, Srivastava MB. Timing-sync protocol for sensor networks. In Proceedings of the First Conference on Embedded Networked Sensor Systems (SenSys ’03), Los Angeles, CA, USA, November 2003; 138–149. Maroti M, Kusy B, Simon G, Ledeczi A. The flooding time synchronization protocol. In Proceedings of the Second International Conference on Embedded Networked Sensor Systems (SenSys ’04), Baltimore, MD, USA, 2004; 39–49. Sichitiu ML, Veerarittiphan C. Simple accurate time synchronization for wireless sensor networks. In IEEE Wireless Communications and Networking (WCNC ’03), New Orleans, LA, USA, March 2003; 1266–1273. Dai H, Han R. TSync: a lightweight bidirectional time synchronization service for wireless sensor networks. ACM SIGMOBILE Mobile Computing and Communications Review 2004; 8: 125–139. Greunen JV, Rabaey J. Lightweight time synchronization for sensor networks. In Proceedings of the Second ACM International Conference on Wireless Sensor Networks and Applications (WSNA ’03), San Diego, CA, USA, September 2003; 11–19. PalChaudhuri S, Saha AK, Johnson DB. Adaptive clock synchronization in sensor networks. In Proceedings of the Third International Symposium on Information Processing in Sensor Networks (IPSN ’04), Berkeley, CA, USA, April 2004; 340–348. Su WL, Akyildiz IF. Time-diffusion synchronization protocol for wireless sensor networks. IEEE/ACM Transactions on Networking 2005; 13: 384–397. Li Q, Rus D. Global clock synchronization in sensor networks. IEEE Transactions on Computers 2006; 55: 214–226. Sommer P, Wattenhofer R, Ieee. Gradient clock synchronization in wireless sensor networks. In International Conference on Information Processing in Sensor Networks (IPSN ’09), San Francisco, CA, USA, April 2009; 37–48. Kaiser T, Perez-Guirao MD, Wilzeckm A. Cognitive radio & networks in the perspective of industrial
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
wireless communications. In The Second International Workshop on Cognitive Radio and Advanced Spectrum Management (CogART ’09), Aalborg, Denmark, May 2009. Xu N, Zhang XT, Wang Q, Liang J, Pan GR, Zhang M. An improved flooding time synchronization protocol for industrial wireless networks. In International Conference on Embedded Software and Systems (ICESS ’09), Zhejiang, China, May 2009; 524–529. Chen X, Li C. A routing based time synchronization protocol for multi-hop wireless networks. In Proceedings of the 2010 IEEE International Conference on Communications (ICC ’10), Cape Town, South Africa, May 2010; 1–6. Bian T, Venkatesan R, Li C. Adaptive time synchronization for wireless sensor networks with selfcalibration. In Proceedings of the 2009 IEEE International Conference on Communications (ICC ’09), Dresden, Germany, June 2009; 1–5. Wang F, Zeng P, Yu H, Xiao Y. Error compensation algorithm in wireless sensor networks synchronization. International Journal of Sensor Networks. accepted and to appear. Hu F, Malkawi Y, Kumar S, Xiao Y. Vertical and horizontal synchronization services with outlier detection in underwater sensor networks. Wireless Communications and Mobile Computing 2008; 8(9): 1165–1181. DOI: 101002/wcm.559. Du X, Guizani M, Xiao Y, Chen H. Secure and efficient time synchronization in heterogeneous sensor networks. IEEE Transactions on Vehicular Technology 2008; 57(4): 2387–2394. Liu L, Xiao Y, Zhang J. A bio-inspired time synchronization algorithm for wireless sensor networks. In Proceedings of the Second International Conference on Computer Engineering and Technology (ICCET ’10), Chengdu, China, April 2010; V4-306–V4-311. Liu L, Xiao Y, Zhang J. A linear time synchronization algorithm for underwater wireless sensor networks. In Proceedings of the 2009 IEEE International Conference on Communications (ICC ’09), Dresden, Germany, June 2009; 1–5. Hu F, Wilson S, Xiao Y. Correlation-based security in time synchronization of sensor networks. In Proceedings of the 2008 IEEE Wireless Communications and Networking Conference (WCNC ’08), Las Vegas, NV, USA, 31 March–3 April 2008; 2525–2530. Liu L, Lei M, Xiao Y, Zhang J. Effect of channel errors on time synchronization in wireless sensor networks. In Proceedings of the 2007 IEEE Global Telecommunications Conference (GLOBECOM ’07), Washington, DC, USA, November 2007; 1248–1252.
Wirel. Commun. Mob. Comput. 2013; 13:798–808 © 2011 John Wiley & Sons, Ltd. DOI: 10.1002/wcm
F. Wang et al.
24. Du X, Guizani M, Xiao Y, Chen H. A secure time synchronization scheme for heterogeneous sensor networks. In Proceedings of the 2007 IEEE Global Telecommunications Conference (GLOBECOM ’07), Washington, DC, USA, November 2007; 5143–5147. 25. Galloway M, Zhang Y, Xiao Y, Shao P. Time synchronization in sensor networks and underwater sensor networks. In Underwater Acoustic Sensor Networks. CRC Press: Boca Raton, FL, 2010; 143–175. ISBN-10: 1420067117, ISBN-13: 978-1420067118, Chapter 6. 26. Huang L, Xu H, Wan Y, Wu J, Li H. An efficient synchronisation protocol for wireless sensor network. International Journal of Sensor Networks 2006; 2(1/2): 17–24. 27. Li D, Zhu Q, Chen W. Efficient algorithm for maximum lifetime many-to-one data aggregation in wireless sensor networks. International Journal of Sensor Networks 2011; 9(2): 61–68. 28. Haider MB, Imahori S, Sugihara K. Success guaranteed routing in almost Delaunay planar nets for wireless sensor communication. International Journal of Sensor Networks 2011; 9(2): 69–75. 29. Hung K-S, Lui K-S. On perimeter coverage in wireless sensor networks with minimum cost. International Journal of Sensor Networks 2011; 9(2): 76–88. 30. Yu C-M, Li C-C, Lu C-S, Kuo S-Y. An applicationdriven attack probability-based deterministic pairwise key pre-distribution scheme for non-uniformly deployed sensor networks. International Journal of Sensor Networks 2011; 9(2): 89–106. 31. Vecherin SN, Wilson DK, Pettit CL. Optimal sensor placement with signal propagation effects and inhomogeneous coverage preferences. International Journal of Sensor Networks 2011; 9(2): 107–120. 32. Ouni S, Gherairi S, Kamoun F. Real-time quality of service with delay guarantee in sensor networks. International Journal of Sensor Networks 2011; 9(1): 50–60. 33. Chen M, Leung VCM, Huang X, Li M. Editorial. International Journal of Sensor Networks 2011; 9(1): 1–2. 34. Zhang J, Lip CW, Ong SK, Nee AYC. Development of a shoe-mounted assistive user interface for navigation. International Journal of Sensor Networks 2011; 9(1): 3–12. 35. Neves PACS, Esteves A, Cunha R, Rodrigues JJPC. User-centric data gathering multi-channel system for IPv6-enabled wireless sensor networks. International Journal of Sensor Networks 2011; 9(1): 13–23. 36. Uddin MdB, Castelluccia C. Towards clock skew based services in wireless sensor networks. International Journal of Sensor Networks 2011; 9(1): 24–37. DOI: 10.1504/IJSNET.2011.037302.
Random time source protocol
37. Chen W, Hu J, Bouwstra S, Oetomo SB, Feijs L. Sensor integration for perinatology research. International Journal of Sensor Networks 2011; 9(1): 38–49. 38. Toscani D, Archetti F, Frigerio M, Messina E. IKNOS: inference and knowledge in networks of sensors. International Journal of Sensor Networks 2010; 8(3/4): 209–221. 39. Machado R, Tekinay S, Zhang W, Wang G. Diffusionbased approach to deploying wireless sensor networks. International Journal of Sensor Networks 2010; 8(3/4): 222–232. 40. Li X. Collaborative multi-sensor tracking in mobile wireless sensor networks. International Journal of Sensor Networks 2010; 8(3/4): 233–246. 41. Chen H, Li M. Editorial. International Journal of Sensor Networks 2010; 8(3/4): 123–124. 42. Seok S, Song W, Choi D. Implementation of pastrybased P2P system to share sensor data. International Journal of Sensor Networks 2010; 8(3/4): 125–135. 43. Soares JM, Goncalves BJ, Rocha RM. Practical issues in the development of a minimalistic power management solution for WSNs. International Journal of Sensor Networks 2010; 8(3/4): 136–146. 44. Bari A, Teng D, Ahmed R, Jaekel A. Relay node placement with energy and buffer constraints in wireless sensor networks using mobile data collector. International Journal of Sensor Networks 2010; 8(3/4): 147–159. 45. Al-Otaibi M, Soliman H. Efficient geographic routeless routing protocols with enhanced location update mechanism. International Journal of Sensor Networks 2010; 8(3/4): 160–171. 46. Zennaro M, Bagula AB. Design of a flexible and robust gateway to collect sensor data in intermittent power environments. International Journal of Sensor Networks 2010; 8(3/4): 172–181. 47. Szczechowiak P, Scott M, Collier M. Securing wireless sensor networks: an identity-based cryptography approach. International Journal of Sensor Networks 2010; 8(3/4): 182–192. 48. Min M, O’Brien AF, Shin SY. Improved PSOR algorithm for minimum power multicast tree problem in wireless ad hoc networks. International Journal of Sensor Networks 2010; 8(3/4): 193–201. 49. Kung HT, Vlah D. A spectral clustering approach to validating sensors via their peers in distributed sensor networks. International Journal of Sensor Networks 2010; 8(3/4): 202–208. 50. Woo A, Tong T, Culler D. Taming the underlying challenges of reliable multihop routing in sensor networks. In Proceedings of the First International Conference on Embedded Networked Sensor Systems, Los Angeles, CA, USA, November 2003; 14–27.
Wirel. Commun. Mob. Comput. 2013; 13:798–808 © 2011 John Wiley & Sons, Ltd. DOI: 10.1002/wcm
807
F. Wang et al.
Random time source protocol
AUTHORS’ BIOGRAPHIES Fuqing Wang is currently pursuing the PhD degree in mechatronic engineering from Shenyang Institute of Automation, Chinese Academy of Sciences. His research interests are in the areas of time synchronization in wireless sensor networks and hopping technology. Peng Zeng holds a PhD degree in mechatronic engineering from Shenyang Institute of Automation, Chinese Academy of Sciences, in 2005. He is a Professor of Shenyang Institute of Automation, Chinese Academy of Sciences. His research has involved industrial communication and wireless sensor networks.
Yang Xiao is currently with Department of Computer Science at The University of Alabama. He serves as a panelist for the US National Science Foundation (NSF), Canada Foundation for Innovation (CFI)’s Telecommunications expert committee, and the American Institute of Biological Sciences (AIBS), as well as a referee/reviewer for many national and international funding agencies. His research areas are security and communications networks. He has published more than 170 refereed journal papers and over 200 refereed conference papers and book chapters related to these research areas. He currently serves as editor-in-chief for International Journal of Security and Networks (IJSN) and International Journal of Sensor Networks (IJSNet).
Haibin Yu holds a PhD degree in automation control from Northeastern University, Shenyang, China. He is a Professor of Shenyang Institute of Automation, Chinese Academy of Sciences. His research has involved wireless sensor network, networked control systems, and networked manufacturing.
808
Wirel. Commun. Mob. Comput. 2013; 13:798–808 © 2011 John Wiley & Sons, Ltd. DOI: 10.1002/wcm