PRISM: a Novel Protocol for Real-Time Synchronous ... - Netlab

0 downloads 0 Views 228KB Size Report
Aug 23, 2011 - include civil and structural engineering activities [11, 30], urbanistic and outdoor ..... the remaining − 1 slots remain free. Hence, the actual ..... tions with a nominal transfer rate of 250 kbps, although the definition of ..... [32] N. Xu, S. Rangwala, K. K. Chintalapudi, D. Ganesan, A. Broad,. R. Govindan, and ...
International Journal of Sensors, Wireless Communications and Control 2011, 1, 2

1

PRISM: a Novel Protocol for Real-Time Synchronous Acquisitions in WSNs Emanuele Goldoni*, Paolo Gamba University of Pavia, Dept. of Electronics, Via Ferrata 1, 27100 - Pavia, Italy Received: July 18, 2010; Accepted: January 21, 2011; Revised: August 23, 2011

Abstract Wireless Sensor Networks are often considered as low-rate asynchronous systems for distributed monitoring. However, there are several real-time and high data-rate applications where the traditional behavior of WSNs could give raise to channel sharing problems, thus limiting the usefulness of this technology for these emerging fields. This article proposes and discusses PRISM (Protocol for Real-tIme Synchronous Monitoring), a novel protocol for real-time synchronous acquisitions in single-hop and multi-hop wireless sensor networks. The PRISM protocol allows to define the maximum number of nodes, the requirements on the network synchronization and the data-rate in a flexible manner in order to accommodate for different types of acquisitions. Its performance has been studied theoretically through numerical simulations. Moreover, the protocol has been tested in a fully-working wireless monitoring system based on the IEEE 802.15.4 physical standard. Results show the effectiveness and the efficiency of the proposed protocol. Keywords: Real-time, wireless sensor networks, monitoring 1.

INTRODUCTION

Wireless Sensor Networks (WSNs) are an emerging technology for monitoring applications. Modern wireless sensor nodes are cheap, small-scale devices extremely limited in the amount of energy they can store or harvest from the environment. Furthermore, restricted size and power implies limited resources, such as CPU speed, memory and wireless communication bandwidth or range. These constraints limit somehow the usage of these devices, which are not suitable for applications characterized by real-time requirements. Current research topics refer instead to error control and resource management [29] for improvements in WSNs lifetime, security problems and countermeasures for attacks specific of unattended WSNs [5], and interconnection of sensing elements through the Internet Protocol [27]. On the topic of real-time processing, current WSNs are not really the ideal means – the majority of existing transmission and channel allocation protocols are suited to low sampling rates and loose latency constraints. As a matter of fact, almost all of the existing and implemented transmission protocols start from the idea that acquisitions must be synchronous, but transmissions usually are not [4, 2]. Similarly, many data processing algorithms are aimed at reducing the data-rate to save bandwidth and to reduce power consumption, against the need for very precise measurements, which is a requirement of many real-time applications. In contrast, there are several emerging fields in which high data-rates are quite common and the data streams, up to hundreds samples per second, need to be received and processed in real-time. These applications include civil and structural engineering activities [11, 30], urbanistic and outdoor systems for continuous monitoring * Address

correspondence to this author at the Università degli studi di Pavia, Facoltà di Ingegneria, Dipartimento di Elettronica, via Ferrata, 1, 27100 Pavia, Italy; Tel: +39-0382-985923; Fax: +39-0382422583; E-mail: [email protected]

or security applications [14, 28], and real-time video [19]. WSNs are quite cheap and widespread, but their suitability for these critical applications is low, mainly due to the lack of a consistent study. This article proposes PRISM (Protocol for Real-tIme Synchronous Monitoring), a novel protocol for real-time and high data-rate synchronous acquisitions in wireless sensor networks. In the next section, previous work in this area and its relation with our research are discussed, while Section 3 provides a brief description of the main features of our proposed protocol. A theoretical analysis of the relationship among number of nodes, channel capacity and data-rate in single-hop and multi-hop networks is presented in Sections 4 and 5. Preliminary results obtained with a numerical simulator and from a practical testbed system follow in Section 6. Finally, in Section 7 some conclusions and a discussion of future research directions will be introduced. 2.

RELATED WORK

Structural monitoring is gaining momentum with the recent increasing interest in preservation of historical buildings and in post-earthquake damage detection. In this field, Wireless Sensor Networks (WSNs) are a promising technology which could enable dense and distributed monitoring of structures and buildings. Compared to other existing solutions, a WSN can significantly reduce the cost and the time needed to setup a data acquisition system without the need for wires and complex hardware. However, Structural Health Monitoring (SHM) applications have unique features, such as high-frequency sensing, strict clock synchronization and high datarates. Moreover, critical measurements are often needed in near real-time – if data are received after a certain delay, they are not useful anymore. Hence, the main challenges for this class of time-critical

2210-3287/11 $58.00+.00 © 2011 Bentham Science Publishers Ltd.

2 International Journal of Sensors, Wireless Communications and Control, 2011, Vol. 1, No. 2 applications is the guarantee of deadlines while delivering messages. Although some ideas borrowed from the traditional protocols for WSNs can apply also to the real-time domain, most of the existing techniques are not suitable for timecritical scenarios – they have been designed focusing on energy consumption, latency or throughput factors. For this reason, new methods for accessing the channel are needed to satisfy predictability requirements on the delivery time of messages [26]. Generally speaking, a real-time protocol should guarantee an upper bound for end-to-end delay of wireless transmissions. Real-time MAC-layer protocols can be divided into two main classes, according to the way they consider time constraints while scheduling transmissions. A first class of mechanisms, sometimes addressed as “soft”, aims at minimizing the travel time of packets from each node of the network. These protocols calculate a schedule for the network and then derive an upper bound for the transmissions’ delay. Examples of soft protocols are RT-Link [24], The Low-power Real-Time Protocol (LPRT) [1], TreeMAC [25], AREA-MAC [13], and the Timely Sensor Data Collection using Distributed Graph Coloring (TIGRA) protocol [22]. The problem with all the above real-time protocol is that a delay bound is calculated assuming a specific network scenario, and there are no a-priori guaranteed delays. Similarly, when new nodes enter the network or bandwidth requirements changes, no admission control is performed. Instead, the new flows are always accepted and the protocols reschedule the transmissions aiming at providing fairness. To alleviate the problem, a second class of real-time protocol may be designed, often labeled as “hard”. In this class of algorithm a maximum bandwidth requirement for sensors is used to validate the schedulability of a transmission, and new nodes can enter the network only if the deadlines of the other nodes are still satisfied. Among examples of hard protocols we can list i-GAME [12], RRMAC [10], Channel Reuse-based Smallest Latest start time First (CR-SLF) [15], Implicit EDF [3], and Virtual TDMA for Sensors (VTS) [6]. However, the applicability of these hard solutions is limited to singlehop networks, cellular networks, or applications with limited bandwidth requirements. The issues with the real-time protocols are reflected by the existing working structural monitoring systems, which lack efficient mechanism for delivering data synchronously and in real-time. Hence, latency is a fundamental scaling limitation for past researches: samples are usually buffered by each node, and data are collected from every node one by one when the storage memory is filled up. The duration of a sampling test is bounded by the amount of node memory to a maximum of a few hours. Moreover, data gathering takes a lot of time: in [21] and [20] the data collection phase for the whole network takes about 6 times the duration of the sampling phase. A second issue with these systems is their limited sampling bandwidth, which allows acquisition frequencies only below 100 Hz.

E. Goldoni, P. Gamba

Looking at the big picture, these approaches are really valuable for studying and preserving the long-term stability of buildings, but offer limited validity for rapid structural damage response. Despite a number of notable efforts, it is clear that there is room for improvements, especially towards the design of solutions for multi-hop, high data-rates wireless sensor networks for time-critical monitoring applications. Even more important, new real-time protocols should be able to guarantee a deterministic delay on transmissions taking into account both the data acquisition frequency used to monitor the phenomena and the validity deadlines of the acquired data. 3.

AN OVERVIEW OF PRISM

The newly proposed PRISM protocol is specifically tailored for high data-rate and real-time WSNs. This protocol overcomes the above mentioned limitations of currently available sensor networks using a TDMA-like channel access mechanism and organizing transmissions in an efficient way. Furthermore, the approach employs a simple in-band synchronization mechanism which does not require dedicated hardware, avoiding to tie the protocol to a specific platform. The protocol can be implemented both in single-hop topologies and in multi-hop networks, whereas routing paths are logically organized on a perfect binary tree. The remainder of this section describes these main features of PRISM in detail. 3.1

TDMA Scheduling

Due to the limits of a carrier sense channel access mechanism, PRISM drops CSMA/CA in favour of a TDMA-like scheduling of transmissions. This allows to avoid collisions among transmissions assigning non-overlapping time slots. To be more precise, the protocol adaptively creates a scheduling with an optimal number of time slots, thus achieving higher throughputs compared to TDMA protocols with a fixed framesize. Given the maximum sampling frequency of the sensor network, PRISM computes off-line the optimal scheduling of transmissions. Then, before starting the acquisition process, the resulting TDMA arrangement is broadcast into the network, and only after this step the acquisition can start. 3.2

Bursty Transmission

The key assumption of PRISM is that low-cost nodes specifically developed for wireless sensor networks are provisioned with an analog-to-digital converter circuitry, a processing unit and the communication module, all embedded in a simple chip without DMA. The main drawback of this integration is the lack of support for the concurrent acquisition of samples and the transmission of data. To cope with this issue, PRISM exploits the idle time between two consecutive sensor acquisitions for transmitting data. This interval is quite long, compared to the transmission time of a single value – hence, it is possible to reduce the channel usage by putting multiple samples in a single packet, that is transmitting them into a burst. The packet structure of a burst is quite simple: the first data in the packet is the absolute timestamp associated to the first sample of the group; then, a burst of 𝑛 consecutive

Real-Time Synchronous Acquisitions in WSNs

T0

S0

Tn

Sn Sn+1

S1

International Journal of Sensors, Wireless Communications and Control, 2011, Vol. 1, No. 2

Sn-1 CRC

and the transmission of the burst (𝑇𝑏𝑢𝑟𝑠𝑡 ) must fit inside the time slot: 𝑇𝑠𝑙𝑜𝑡 ≥ 𝑇𝑏𝑢𝑟𝑠𝑡 . (2)

S2n CRC

Combining (1) and (2) we get: 𝑃𝑏𝑢𝑟𝑠𝑡 (𝑆) 1 ≥ 𝑇𝑏𝑢𝑟𝑠𝑡 = , 𝑓𝑠 𝐶

Figure (1). Packet format of the PRISM protocol.

samples follows and an integrity check code concludes the packet. The structure of a PRISM packet is shown in Fig. (1). A similar approach has been proposed also in [32]. The advantage of this solution is the reduced overhead introduced into the channel, which increases the throughput. On the other hand, the use of bursts could introduce a notable delay between acquisition and transmission of samples. PRISM overcomes this limit by identifying the optimal setup of the network and configuring parameters in order to fulfill user requirements. 3.3

Network Synchronization

Synchronization between sensors plays a crucial role for most of real-world monitoring applications. However, providing aligned clocks is a complex task due to various challenging internal and external factors, such as drifts, non-linearity of timers or signal propagation times [23, 8]. PRISM adopts a flexible, in-band approach to keep nodes synchronized. In single-hop networks, the gateway periodically broadcasts a clock signal to all the sensor nodes during a dedicated time slot. On the other hand, in larger networks other existing distributed synchronization algorithms can be used during one or more dedicated time slots. The details of the various synchronization solutions which can be implemented in star and multi-hop topologies are better described in the following sections, devoted to single-hop and multi-hop networks respectively. 4.

Theoretical Analysis

We know that the transmission of data and the acquisition of samples at a given frequency 𝑓𝑠 are mutually exclusive. Therefore, the duration 𝑇𝑠𝑙𝑜𝑡 of the time slot assigned to a node can not exceed the interval between two consecutive acquisitions: 1 ≥ 𝑇𝑠𝑙𝑜𝑡 (1) 𝑓𝑠

(3)

where 𝑃𝑏𝑢𝑟𝑠𝑡 (𝑆) is the size of the burst data unit sent by the node and 𝐶 the channel capacity. Since a burst contains 𝑆 sample of size 𝑃𝑠𝑎𝑚𝑝𝑙𝑒 and an optional header of 𝑃ℎ𝑒𝑎𝑑𝑒𝑟 byte, we have: 𝑃𝑏𝑢𝑟𝑠𝑡 (𝑆) = 𝑆 · 𝑃𝑠𝑎𝑚𝑝𝑙𝑒 + 𝑃ℎ𝑒𝑎𝑑𝑒𝑟

(4)

and we can rewrite (3) as 1 𝑆 · 𝑃𝑠𝑎𝑚𝑝𝑙𝑒 + 𝑃ℎ𝑒𝑎𝑑𝑒𝑟 ≥ 𝑓𝑠 𝐶

(5)

According to (5), the maximum number of samples in a single data unit sent by PRISM may be: ⌊︂ (︂ )︂⌋︂ 𝐶 1 · − 𝑃ℎ𝑒𝑎𝑑𝑒𝑟 𝑆𝑚𝑎𝑥 = (6) 𝑃𝑠𝑎𝑚𝑝𝑙𝑒 𝑓𝑠 Since a burst is made of 𝑆 samples acquired at frequency 𝑓𝑠 , a node will send data to the gateway every 𝐻 seconds, where 1 (7) 𝐻=𝑆· 𝑓𝑠 This periodic transmission must be performed by all nodes in the wireless sensor network: during this interval each node must transmit at least once. Hence, 𝐻 can be considered the hyper-period of the transmission cycle in a PRISM network. Therefore, the maximum number 𝑁 of devices in the network when using a slot per node per hyper-period can be calculated as:

PRISM IN SINGLE-HOP NETWORKS

The considered single-hop network is organized into a simple star topology coordinated by a central gateway. This device is responsible for the initial configuration of the network, the scheduling of transmissions and the collection of all the measurements acquired by sensors. Therefore, the gateway is supposed to be less energy and computationally constrained than the other nodes of the network. 4.1

3

𝑁=

𝑆𝑚𝑎𝑥 · 𝑓1𝑠 𝑆𝑚𝑎𝑥 · 𝐻 = ≤ 1 𝑇𝑠𝑙𝑜𝑡 𝑇𝑠𝑙𝑜𝑡 𝑓𝑠

1 𝑓𝑠

= 𝑆𝑚𝑎𝑥

(8)

Hence, if we put in a burst the maximum allowed number of samples 𝑆𝑚𝑎𝑥 , acquired at a given frequency 𝑓𝑠 , the biggest network we can build is made up of 𝑁𝑚𝑎𝑥 = 𝑆𝑚𝑎𝑥 nodes. Finally, since measurements are sent periodically by the nodes after an hyper-period, the maximum delay 𝐷 experienced by values is 𝐷 = 𝐻. (9) 4.2

Synchronization issues

As foreshadowed in Section 3, PRISM adopts a centralized in-band synchronization mechanism in order to compensate clock discrepancy among sensor nodes without requiring dedicated hardware. In a star topology, either a reference node

4 International Journal of Sensors, Wireless Communications and Control, 2011, Vol. 1, No. 2 or the gateway itself periodically broadcasts a clock signal to all the sensor nodes during a dedicated time slot. Given the reference node sends the a message every hyper-period, the remaining 𝑁 − 1 slots remain free. Hence, the actual maximum number of nodes in a WSN based on PRISM is reduced to 𝑁 − 1. Moreover, the maximum length 𝑇𝑠𝑦𝑛𝑐 of the synchronization signal is equal to 𝑇𝑠𝑙𝑜𝑡 while the resynchronization frequency is 𝐻. However, should the specific mechanism take longer to calibrate all clocks, 𝑋 consecutive time slots could be used for this tasks, leaving 𝑁 − 𝑋 intervals free for sensor nodes. Similarly, various non-consecutive slots in the same hyper-period could be used instead to repeat the process, hence increasing the synchronization frequency without affecting the sensor sampling period. This solution features low execution time, low traffic overhead, and it also provides accurate synchronization for most practical uses. Nevertheless, the approach is flexible and it could be easily extended using other well-established algorithms during the dedicated time slot in place of a single reference signal, such as [8, 17] or [18]. 5.

PRISM IN MULTI-HOP NETWORKS

It is possile to extended PRISM from the single-hop case to multi-hop networks logically organized as a binary tree. This is not an oversimplifying hypothesis: many routing protocols designed for the WSN domain calculate network paths so that transmissions are routed and forwarded along such a hierarchical topology (see, for instance, [16, 7]). 5.1

Theoretical Analysis

Like the single-hop case, all nodes in a multi-hop topology acquire data from the environment at a given frequency and transmit them during a dedicated time slot. Moreover, it is assumed that any node in the network can be used as a relay device, i.e. it can receive a burst coming from another node, store it in a buffer and retransmit it later. Due to the balanced and symmetric binary tree topology, the root node (i.e. the gateway) will receive half of data from the left side of the network and half from the right. Thus, time slots for communication with the root will be equally used by the two subtrees. Moreover, since the left and the right side share a unique wireless link with the gateway, transmissions from the two sides are mutually exclusive. This link is also the bottleneck for both subtrees: in order to avoid queuing of packets along the path, it must be guaranteed that there will not be more than one transmission per level in each side. Finally, a node can not transmit and receive at the same time; for this reason, two transmissions in the same subtree must be at least two levels far from each other. From [31] we know that the total number of nodes in a perfect binary tree is (2ℎ+1 − 1), where ℎ is the height of the tree. Therefore, if we exclude the root node, which serves only as a gateway, the amount of sensor nodes in the network becomes 2ℎ+1 − 2. This structure is made up of two subtrees

E. Goldoni, P. Gamba

Figure (2). Example of WSNs organized in a perfect binary tree.

Table (1). Example of schedulation for the 2-level complete binary shown in Fig. (2)

Transmissions 1𝑠𝑡 hop → root 2𝑛𝑑 hop → 1𝑠𝑡 hop

1 A

2 B C

3 C E

4 E D

5 D F

6 F

7 A

8 B ..

and both the left and the right ones consist of (2ℎ − 1) children nodes. From (6) we know that the maximum number of samples per burst depends on the sampling frequency. According to (8) the number 𝑁 of nodes in the network must not be higher than the maximum number of samples 𝑆 allowed per burst. In addition, we found that all slots are used to gather data from sensor nodes when the number of nodes in the network is 𝑁 = 𝑆. Given the sampling frequency 𝑓𝑠 , it is possible to find the maximum ℎ height of a network organized as a perfect binary tree: (2ℎ+1 − 1) − 1 ≤ 𝑁𝑚𝑎𝑥 = 𝑆𝑚𝑎𝑥 This means that the maximum height of a perfect binary tree acquiring at frequency 𝑓𝑠 and working with PRISM may be: ⌊︂ (︂ )︂⌋︂ 𝑆𝑚𝑎𝑥 ℎ𝑚𝑎𝑥 = log2 +1 (10) 2 Therefore, given ℎ and 𝑆𝑚𝑎𝑥 , the size 𝑁 of the network is defined as: 𝑁 = 2ℎ+1 − 1,

ℎ ∈ 𝑁+ , ℎ ≤ ℎ𝑚𝑎𝑥

Given these requirements and constraints, there is an algorithm which could be used to produce a valid scheduling of transmissions. An implementation of this solution in pseudolanguage is described in Fig. (3). The same algorithm applied to the example binary tree network shown in Fig. (2) would result in the schedulation shown in Table 1. The proposed algorithm organizes transmissions so that bursts coming from left-side nodes are received by the root during even slots, whereas odd intervals would be used for right-side transmissions (or vice versa). If we consider only one of the two subtrees, the sending time slot 𝑡𝑖 assigned to

Real-Time Synchronous Acquisitions in WSNs

International Journal of Sensors, Wireless Communications and Control, 2011, Vol. 1, No. 2

5

function S CHEDULER 𝑙𝑒𝑓 𝑡𝑠𝑖𝑑𝑒_𝑠𝑐ℎ𝑒𝑑 = 𝑆𝑐ℎ𝑒𝑑𝑢𝑙𝑒_𝑆𝑢𝑏𝑡𝑟𝑒𝑒(𝑙𝑒𝑓 𝑡, 0) 𝑟𝑖𝑔ℎ𝑡𝑠𝑖𝑑𝑒_𝑠𝑐ℎ𝑒𝑑 = 𝑆𝑐ℎ𝑒𝑑𝑢𝑙𝑒_𝑆𝑢𝑏𝑡𝑟𝑒𝑒(𝑟𝑖𝑔ℎ𝑡, 1) end function

But we also know that the total number 𝑁 of sensor nodes in the tree is 2ℎ+1 − 2. Combining the two equations above, we can calculate that the last time slot used to deliver data acquired by the nodes in one subtree is the (𝑁 − 1)th.

function S CHEDULE _S UBTREE(subtree, offset) 𝑡𝑖𝑚𝑒𝑠𝑙𝑜𝑡 ← 𝑜𝑓 𝑓 𝑠𝑒𝑡 for 𝑙𝑒𝑣𝑒𝑙 = 1 to ℎ do for 𝑐ℎ𝑖𝑙𝑑 = 1 to (2𝑙𝑒𝑣𝑒𝑙−1 ) do timeslot++ 𝑆𝑐ℎ𝑒𝑑_𝑇 𝑟𝑎𝑛𝑠𝑚𝑖𝑠𝑠𝑖𝑜𝑛(𝑙𝑒𝑣𝑒𝑙, 𝑐ℎ𝑖𝑙𝑑, 𝑡𝑖𝑚𝑒𝑠𝑙𝑜𝑡) if 𝑐ℎ𝑖𝑙𝑑 ̸= (2𝑙𝑒𝑣𝑒𝑙−1 ) then timeslot++ ◁ Leave an empty slot end if end for end for end function

The same algorithm described in Fig. (3) applies also to the right-side, since the two subtrees are symmetric. Hence, a phase displacement by one slot would result in transmissions to the root node only during even slots. Therefore, the root node will never experience collisions: odd slots unused by one subtree would be used by the other and vice versa. Moreover, this scheduling is able to fill all the 𝑁 time slots of an hyperperiod: 𝑁/2 acquired from the sensors of one subtree and the remaining 𝑁/2 from the other subtree. Hence, the hyperperiod H is composed of 2 · 𝑁2 = 𝑁 = 𝑆 slots and we have:

Figure (3). Pseudo-code for the PRISM scheduling algorithm applied to the left and right-side subtrees in a perfectly binary tree configuration.

the 𝑖-th node at level 𝑙 (where 𝑖 ≤ 2𝑙−1 ) can be expressed as 𝑡𝑖 = (2 · 𝑖 − 1) +

𝑙−1 ∑︁

(2𝑥 − 1)

(11)

𝑥=1

The arrival time 𝑎𝑖 of each burst can be easily calculated adding to (11) the propagation delay introduced by the (𝑙 − 1) intermediate hops: 𝑎𝑖 = (𝑙 − 1) + (2 · 𝑖 − 1) +

𝑙−1 ∑︁

(2𝑥 − 1)

𝑥=1

𝑎𝑖 = (2 · 𝑖 − 2) + 𝑙 +

(2𝑥 − 1)

(12)

𝑥=1

According to this equation, 𝑎𝑖 will always be odd: hence, the arrival time of burst on the root node would always coincide with odd time slots. Moreover, the empty slot between two burst guarantees that there will never be a two consecutive levels on the same side. In addition, such a scheduling for the left or right subtree is able to fill exactly half of the slots. Finally, the arrival time of the last child 𝑐 at the deepest level ℎ of the tree is: 𝑎𝑐 = (ℎ − 1) +

ℎ ∑︁

(2𝑥 − 1)

𝑥=1

This results can be also rewritten using the properties of geometric series as: 𝑎𝑐 = (2ℎ+1 − 2) − 1

1 1 =𝑁· 𝑓𝑠 𝑓𝑠

(13)

which is exactly the result for the single-hop case in (7). There is however a change in the maximum delay experienced by data in a burst, since the effects introduced by intermediate nodes should be considered, too. The first sample in a burst must wait 𝐻 time slot before being sent; then, it may have to cross one or more intermediate hops before arriving to the root node. Hence, the maximum delay experienced by data from a level-𝑙 node will be 𝐷 = 𝐻 + (𝑙 − 1)

(14)

It is interesting to note that, like in (9) for the single-hop case, the delay for nodes directly connected to the gateway is exactly 𝐷 = 𝐻 . This is reasonable, since a star network with two sensor device is also a binary tree with level-1 nodes only. 5.2

which can be rewritten as: 𝑙−1 ∑︁

𝐻=𝑆·

Synchronization issues

Node synchronization in a multi-hop network based on PRISM can be achieved using different approaches. The most straightforward is that of a reference node periodically broadcasting a clock signal to all the sensor nodes during dedicated time slots, as done for the single-hop case. However, all the devices in the network must be able to receive the timing messages – the applicability of this solution depends on both the maximum output power of the radio and the physical distance between the reference node and the farthest one. Otherwise, distributed algorithms could be used to establish a global timescale throughout the network. For example, an effective choice is the Timing-sync Protocol for Sensor Networks (TPSN) [8]. This algorithm establishes a global timescale performing pair wise synchronization along the edges of a hierarchically organized network through a proper exchange of messages. Similarly to the single-hop case described in the previous section, such system could be implemented into the network using a single time slot, thus reducing only by 1 the maximum number of sensor nodes allowed.

6 International Journal of Sensors, Wireless Communications and Control, 2011, Vol. 1, No. 2 6.

E. Goldoni, P. Gamba

PERFORMANCE EVALUATION

Maximum height of a multi−hop WSN IEEE 802.15.4 @ 250 kbps

We have investigated the applicability and the performance of our protocol as an alternative MAC mechanism for IEEE 802.15.4 networks. We used a numerical simulator in order to identify the theoretical bounds of PRISM over the physical layer defined by the standard. Moreover, the technique has been implemented in a real network for structural health monitoring. 6.1

6

hmax

5

3

Numerical Evaluation

The applicability and the performance of the protocol as an alternative MAC mechanism for IEEE 802.15.4 networks have been investigated. The aim of this numerical simulation is to identify the theoretical bounds of PRISM over the physical layer defined by the standard before implementing the technique in a real network for structural health monitoring. The basic IEEE 802.15.4 standard conceives communications with a nominal transfer rate of 250 kbps, although the definition of several physical layers allow lower transfer rates, e.g. 40 and 100 kbps. In Fig. (4) the maximum size of a wireless sensor network based on PRISM is shown. In this simulation the compact frame header of 15 bytes is used, and it has been assumed that the ADC integrated in sensor nodes would output 16-bit samples. As expected from (6), the maximum network size of decreases as the sampling frequency increases. Furthermore, a sensor network acquiring at 1 KHz could only be created transmitting at 250 KHz, while lower transfer rates are still suitable for small networks and moderate sampling frequencies. Maximum size of a PRISM−based WSN

3

10

250 kbps 100 kbps 40 kbps

2

N

max

10

1

10

0

10 100

200

300

400 500 600 700 Sampling frequency [Hz]

4

800

900

1000

Figure (4). Maximum size of a IEEE 802.15.4-based star network with increasing sampling frequency values.

The simulation has been repeated for the multi-hop case using only the highest transfer rate of 250 Kbps specified by the standard. Fig. (5) plots the maximum tree height as a function of the sampling frequency. Results obtained are quite impressive: although not specifically designed for high datarate applications, IEEE 802.15.4 could be used in combination

2 100

200

300

400 500 600 700 Sampling frequency [Hz]

800

900

1000

Figure (5). Maximum height of a IEEE 802.15.4-based multi-hop network with increasing sampling frequency values.

with PRISM to build multi-hop networks of tens of nodes all acquiring more than 500 samples per second. 6.2

Experimental Evaluation

The protocol has been implemented in a working example to monitor the response of a steel structure subject to simulated seismic stresses. To this aim, a number of tests have been carried out in collaboration with the European Center for Earthquake Engineering (EUCENTRE), acquiring data from a shaking table. The prototype wireless sensor network consists of Squidbee nodes, which are based on the Arduino development platform [9]. The nodes use XBee 802.15.4 transceiver modules operating in the 2.4 GHz ISM-band. Moreover, the modules operate with a maximum nominal bit rate of 115.200 kbps and the optional acknowledgment frames have been disabled. Squidbee devices are easy to program, provide both analog and digital inputs and are quite cheap. These features make this hardware platform suitable for the implementation of prototype WSNs. PRISM has been developed as a transparent service located between MAC and the Application layer. This way, the application running on each node continuously collects data and puts them in a dedicated buffer. The protocol then periodically gets values from the buffer and transmit them in the assigned time slot. The prototype wireless sensor network was firstly tested on simple steel structures with known oscillation frequencies ranging from about 1 to 5 Hz. Multiple nodes were used to acquire vibrations in real-time, sampling at 1 KHz during shaking tests. In all the tests, the analysis of the spectra through Matlab always provided results with a maximum absolute error of less than 0.1 Hz between the wireless and the actual value. Then, the tests concentrated on the synchronization between multiple sensors. The relative drift between the hard-

Real-Time Synchronous Acquisitions in WSNs

International Journal of Sensors, Wireless Communications and Control, 2011, Vol. 1, No. 2

Table (2). Experimental results obtained from the testbed.

Max. sampling frequency Max. network size @ 1 𝐾𝐻𝑧 Absolute accuracy error Absolute synchronization error Maximum packet-loss ratio Node power consumption

1000 𝐻𝑧 12 nodes 0.07 𝐻𝑧 0.8 𝑚𝑠 8.1 % 17 𝑚𝐴 @ 9 𝑉

ware clocks of the nodes is negligible – the worst-case relative drift measured offline through an oscilloscope is approximately 1.7 ppm, that is a discrepancy of 1 ms after 10 minutes of operation. On the other side, the precision of the software functions is lower, but still acceptable for the considered applications. The shaking tests described above were repeated putting a second accelerometer on the same side of the structure, so that they have the same phase. The acquired vibrations data exhibit thigh synchronization – the average offset between the two sensors was about 0.8 ms. All these experiments for testing both accuracy and synchronization have been repeated lowering the sampling frequencies to 500 Hz, 200 Hz and 100 Hz obtaining, as expected, similar results. Then, the system has been tested in inside a small building placing one sensor node per room at 1.5 m height, while the gateway has been installed in the passageway (see Fig. (6)). The number of nodes per room was then increased to 2 and 3 – all values were obtained in real-time and the packet-loss ratio never fall below 91.9% even with 6 wireless nodes acquiring synchronously and delivering data in real-time.

0,2 m

3m

5m

Sensor Node

Sensor Node

Gateway

Figure (6). Setup of the indoor testbed.

The lifetime of a node is a crucial aspect of a wireless sensor network. The consumption of stock Squibee node is extremely high – the Arduino board requires 30mA to operate. However, the current consumption of the whole sensor node in active state can be halved to 17 mA with a few changes in the design of board. The resulting lifetime of a W-TREMORS sensor node continuously acquiring samples is about 2 days and half when powered by a 1200 mAh battery. The main features and the results obtained with the prototype sensing platform based on PRISM are summarized in Table (2). Please refer to [9] for a detailed description of the hardware and software elements of this monitoring system,

7

and for a complete analysis of the results obtained from the testbed in terms of accuracy, synchronization and reliability. 7.

CONCLUSION

This article described the most relevant challenges for the next-generation of time-critical WSN applications, which are responsible for high data-rates and require low-latency. Moreover, the details of PRISM, a novel protocol useful to identify the limits of a wireless sensor network for real-time acquisition, have been presented. A theoretical analysis on the relationship among number of nodes, channel capacity and data-rate in both single-hop and multi-hop networks have investigated the performance of the protocol and its theoretical bounds. Finally, some experiments on the field were used to validate the numerical results and show which problems should be addressed when moving from theory to the realworld. The results confirm the validity of PRISM, which can provide strict guarantees on the delay of transmissions. The scheduling algorithm of PRISM allows to easily check if any traffic and delay requirements may be satisfied with the current size of the network. At the same time, new nodes can be added to the overlay routing tree if all the requirements are still satisfied. Most of the existing real-time protocol for WSNs currently lack a mathematical description of delay, overhead and scalability. Hence, comparing PRISM with competing protocols would first require a formal analysis of the various alternatives. This aspect is crucial to the understanding of the real advantages of PRISM, and will be addressed in a forthcoming paper. In addition, more tests are needed to validate the protocol for different deployment and environmental conditions. The deterministic nature of the approach, however, should guarantee that no major differences would appear while studying the real-time features of the protocol. Critical issues for future researches are instead related to the introduction of a coding scheme, and different channel-assignment mechanisms for increasing throughput could be also investigated. References [1] J. Afonso, L. Rocha, H. Silva, and J. Correia, “MAC Protocol for Low-Power Real-Time Wireless Sensing and Actuation”, In Electronics, Circuits and Systems, 2006. ICECS ’06. 13th IEEE International Conference on, pp. 1248 –1251, dec. 2006. [2] J. Al-Karaki and A. Kamal, “Routing techniques in wireless sensor networks: a survey”, Wireless Communications, IEEE, Vol. 11, No. 6, pp. 6–28, dec. 2004. [3] M. Caccamo, L. Zhang, L. Sha, and G. Buttazzo, “An implicit prioritized access protocol for wireless sensor networks”, In Real-Time Systems Symposium, 2002. RTSS 2002. 23rd IEEE, pp. 39–48, 2002. [4] I. Demirkol, C. Ersoy, and F. Alagoz, “MAC protocols for wireless sensor networks: a survey”, IEEE Communications Magazine, Vol. 44, pp. 115–121, 2006. [5] R. Di Pietro, L. Mancini, C. Soriente, A. Spognardi, and G. Tsudik, “Data Security in Unattended Wireless Sensor Networks”, Computers, IEEE Transactions on, Vol. 58, No. 11, pp. 1500 –1511, nov. 2009.

8 International Journal of Sensors, Wireless Communications and Control, 2011, Vol. 1, No. 2 [6] E. Egea-López, J. Vales-Alonso, A. S. Martínez-Sala, J. GarcíaHaro, P. Pavón-Mariño, and M. V. Bueno Delgado, “A wireless sensor networks MAC protocol for real-time applications”, Personal Ubiquitous Comput., Vol. 12, No. 2, pp. 111–122, 2008. [7] J. Eriksson, M. Faloutsos, and S. V. Krishnamurthy, “DART: dynamic address routing for scalable ad hoc and mesh networks”, IEEE/ACM Trans. Netw., Vol. 15, No. 1, pp. 119– 132, 2007. [8] S. Ganeriwal, R. Kumar, and M. B. Srivastava, “Timing-sync protocol for sensor networks”, In SenSys ’03: Proceedings of the 1st international conference on Embedded networked sensor systems, pp. 138–149, New York, NY, USA, 2003, ACM. [9] E. Goldoni and P. Gamba, “W-TREMORS, a Wireless Monitoring System for Earthquake Engineering”, In Environmental, Energy, and Structural Monitoring Systems, 2010. EESMS 2010. IEEE Workshop on, pp. 26–31, sept. 2010. [10] J. Kim, J. Lim, C. Pelczar, and B. Jang, “RRMAC: A sensor network MAC for real time and reliable packet transmission”, In Consumer Electronics, 2008. ISCE 2008. IEEE International Symposium on, pp. 1 –4, apr. 2008. [11] S. Kim, S. Pakzad, D. Culler, J. Demmel, G. Fenves, S. Glaser, and M. Turon, “Health monitoring of civil infrastructures using wireless sensor networks”, In IPSN ’07: Proceedings of the 6th international conference on Information processing in sensor networks, pp. 254–263, New York, NY, USA, 2007, ACM. [12] A. Koubaa, M. Alves, and E. Tovar, “i-GAME: an implicit GTS allocation mechanism in IEEE 802.15.4 for time-sensitive wireless sensor networks”, In Real-Time Systems, Euromicro Conference on, pp. 183–192, Los Alamitos, CA, USA, 2006, IEEE Computer Society. [13] P. Kumar, M. Gunes, Q. Mushtaq, and B. Blywis, “A realtime and energy-efficient MAC protocol for wireless sensor networks”, In Wireless and Optical Communications Networks, 2009. WOCN ’09. IFIP International Conference on, pp. 1–5, apr. 2009. [14] H. Kwon, V. Berisha, and A. Spanias, “Real-time sensing and acoustic scene characterization for security applications”, In Wireless Pervasive Computing, 2008. ISWPC 2008. 3rd International Symposium on, pp. 755 –758, May 2008. [15] H. Li, P. Shenoy, and K. Ramamritham, “Scheduling messages with deadlines in multi-hop real-time sensor networks”, In Real Time and Embedded Technology and Applications Symposium, 2005. RTAS 2005. 11th IEEE, pp. 415–425, mar. 2005. [16] G. Lu, B. Krishnamachari, and C. S. Raghavendra, “An adaptive energy-efficient and low-latency MAC for tree-based data gathering in sensor networks: Research Articles”, Wirel. Commun. Mob. Comput., Vol. 7, No. 7, pp. 863–875, 2007. [17] M. Maróti, B. Kusy, G. Simon, and A. Lédeczi, “The flooding time synchronization protocol”, In SenSys ’04: Proceedings of the 2nd international conference on Embedded networked sensor systems, pp. 39–49, New York, NY, USA, 2004, ACM. [18] O. Mirabella, M. Brischetto, A. Raucea, and P. Sindoni, “Dynamic Continuous clock Synchronization for IEEE 802.15.4 based sensor networks”, In Industrial Electronics, 2008. IECON 2008. 34th Annual Conference of IEEE, pp. 2438– 2444, nov. 2008. [19] S. Misra, M. Reisslein, and G. Xue, “A survey of multimedia streaming in wireless sensor networks”, Communications Surveys Tutorials, IEEE, Vol. 10, No. 4, pp. 18 –39, 2008.

E. Goldoni, P. Gamba

[20] J. Paek, O. G. K.-Y. Jang, D. Nishimura, R. Govindan, J. Caffrey, M. Wahbeh, and S. Masri, “A Programmable Wireless Sensing System for Structural Monitoring”, In 4th World Conference on Structural Control and Monitoring (4WCSCM), July 2006. [21] S. N. Pakzad, G. L. Fenves, S. Kim, and D. E. Culler, “Design and Implementation of Scalable Wireless Sensor Network for Structural Monitoring”, Journal of Infrastructure Systems, Vol. 14, No. 1, pp. 89–101, 2008. [22] L. Paradis and Q. Han, “A data collection protocol for real-time sensor applications”, Pervasive and Mobile Computing, Vol. 5, No. 4, pp. 369 – 384, 2009. [23] K. Römer, P. Blum, and L. Meier, “Handbook of Sensor Networks: Algorithms and Architectures”, chapter Time Synchronization and Calibration in Wireless Sensor Networks, pp. 199–238, John Wiley & Sons, 2005. [24] A. Rowe, R. Mangharam, and R. Rajkumar, “RT-Link: A global time-synchronized link protocol for sensor networks”, Ad Hoc Networks, Vol. 6, No. 8, pp. 1201 – 1220, 2008, Energy Efficient Design in Wireless Ad Hoc and Sensor Networks. [25] W.-Z. Song, R. Huang, B. Shirazi, and R. LaHusen, “TreeMAC: Localized TDMA MAC protocol for real-time high-data-rate sensor networks”, Pervasive and Mobile Computing, Vol. 5, No. 6, pp. 750–765, 2009, PerCom 2009. [26] Z. Teng and K.-I. Kim, “A Survey on Real-Time MAC Protocols in Wireless Sensor Networks”, Communications and Network, Vol. 2, No. 2, pp. 104–112, may 2010. [27] J.-P. Vasseur and A. Dunkels, Interconnecting Smart Objects with IP: The Next Internet, Morgan Kaufmann, 2010. [28] P. Vicaire, T. He, Q. Cao, T. Yan, G. Zhou, L. Gu, L. Luo, R. Stoleru, J. A. Stankovic, and T. F. Abdelzaher, “Achieving long-term surveillance in VigilNet”, ACM Trans. Sen. Netw., Vol. 5, No. 1, pp. 1–39, 2009. [29] H. Wang, N. Agoulmine, M. Ma, and Y. Jin, “Network lifetime optimization in wireless sensor networks”, Selected Areas in Communications, IEEE Journal on, Vol. 28, No. 7, pp. 1127 –1137, sep. 2010. [30] M. J. Whelan and K. D. Janoyan, “Design of a Robust, High-rate Wireless Sensor Network for Static and Dynamic Structural Monitoring”, Journal of Intelligent Material Systems and Structures, Vol. 20, No. 7, pp. 849–863, 2009. [31] N. Wirth, Algorithms + Data Structures = Programs (PrenticeHall Series in Automatic Computation), Prentice Hall, 1976. [32] N. Xu, S. Rangwala, K. K. Chintalapudi, D. Ganesan, A. Broad, R. Govindan, and D. Estrin, “A wireless sensor network For structural monitoring”, In SenSys ’04: Proceedings of the 2nd international conference on Embedded networked sensor systems, pp. 13–24, New York, NY, USA, 2004, ACM.

Suggest Documents