Professional Documents
Culture Documents
Design and Implementation of Low Power WSN
Design and Implementation of Low Power WSN
typically exhibit high spatial and temporal correlation and ĂƚĂ'ĞŶĞƌĂƚŝŽŶ ĂƚĂWƌŽĐĞƐƐŝŶŐ ĂƚĂZĞƉŽƌƚŝŶŐ
hence application layer protocols may exploit such correlation dĂƐŬƐ
properties in data compression to reduce the communication
'ůŽďĂůůŽĐŬ EĞƚǁŽƌŬ>ĂLJĞƌ;DƵůƚŝŚŽƉͿ
load of the network. In such scenarios, reliable data collection
is even more important because any packet loss may affect the ƵƚLJLJĐůĞ^ĐŚĞĚƵůŝŶŐ
usefulness of many other packets.
Near-real-time data collection: Environmental parameters dŝŵĞ^LJŶĐŚƌŽŶŝnjĂƚŝŽŶ >ŝŶŬYƵĂůŝƚLJƐƚŝŵĂƚŽƌ
typically vary slowly [3], [2] and thus latency can be traded off D>ĂLJĞƌ;^DͿ
for energy efficiency in environmental monitoring systems. On dŝŵŝŶŐ^ĞƌǀŝĐĞ EĞƚǁŽƌŬŝŶŐ^ĞƌǀŝĐĞ
the other hand, some monitoring systems are used to provide
vital hazard warnings such as flash flood alerts. While real- >ŽǁWŽǁĞƌ KƚŚĞƌƌŝǀĞƌƐ
ĂƚĂĐƋƵŝƐŝƚŝŽŶ ůŽĐŬΘdŝŵĞƌ dŝŶLJK^
time constraint is generally hard to satisfy, near-real-time data ƌŝǀĞƌƐΘKƉĞƌĂƚŝŶŐ^LJƐƚĞŵ
collection is achievable while keeping energy consumption
low. Here we define that the term near-real-time pertains to ,ĂƌĚǁĂƌĞ ;/Z/^͕DϯϬϬĞƚĐͿ
the delay introduced by network transmission, between the
Fig. 1. Software architecture for wireless sensors
occurrences of consecutive measurements. More specifically,
the maximal latency of data delivery should be less than the
sensor sampling period. The functional modules we present here are implemented
Scalability: Environmental monitoring applications vary sig- in TinyOS [12], the de-facto operating system for WSN. The
nificant in terms of spatiotemporal sampling resolution and TinyOS source tree shipped by the mote manufacturer has
scale, depending on the physical phenomenon under observa- included most of the essential drivers for motes and sensor
tion. Thus, environmental monitoring sensor networks need to boards. And many networking protocols and services have
be scalable to suit a wide range of application scenarios, espe- been implemented in TinyOS in the literature by the WSN
cially in large-scale monitoring applications such as watershed community. Although TinyOS promises that designers can
soil moisture monitoring. easily compose new applications and services by wiring to-
Unattended autonomous operation: Environmental monitor- gether existing components, implementing a complete working
ing systems are often deployed in remote places that are typ- system is not as easy as bringing building blocks together.
ically harsh and hard to access. Thus, in order to accomplish Moreover, it is necessary to restructure or even redesign
long-term monitoring in such environments, sensor networks most of the building components, especially the networking
need to be capable of self-configuration and self-organization protocols, to construct a reliably functioning system. It is
upon initial deployment as well as self-healing in the events well understood that in a resource-constrained platform such
of node failures without frequent user intervention. as wireless sensor node, the stack of protocols should be
Load balance: Most of the environmental monitoring sensor jointly optimized in order to maximize the overall network
networks have the spanning-tree multi-hop network structure performance and to minimize energy consumption. A number
that is rooted in a single sink node. In such networks, sensor of lower-power protocols are available in the literature, but
nodes closer to the sink are deemed to have higher energy most of them are not optimized for environmental monitoring
consumption than those nodes that are further away from the applications. In the next section, we briefly describe the main
sink because of the overhead for relaying messages. Therefore, components of networking protocol stack as well as other
it is of great importance to balance the load throughout the software services and drivers that we have developed in this
network to maximize the overall network lifetime. research for environmental monitoring applications.
III. S OFTWARE A RCHITECTURE
IV. N ETWORKING P ROTOCOLS
Fig. 1 shows the functional block diagram of a sensor
Wireless communication is the most energy-consuming op-
program. In general, in environmental monitoring applications,
eration that a wireless sensor node performs. Therefore, the
every sensor node periodically carries out three main tasks,
design of networking protocols will determine the overall
including data generation through sensing, data processing,
energy efficiency of the system. In this section, we describe
and data reporting through multihop wireless communications.
the major features of our communication protocol stack that
To accomplish the data generation task, sensor readings are
make the whole system self-organized and energy-efficient.
collected periodically at certain frequency and sensor data are
time-stamped upon sampling, which necessitates global time
synchronization in the network. Then, in the data processing A. Related Works on Networking Protocols for WSN
task, sensor nodes calibrate, aggregate, summarize, and com- In wireless sensor networks, the main mechanism to achieve
press the data. Lastly, during the data reporting task, data are energy efficiency is duty-cycling; that is, sensor nodes alter-
transmitted to the Base Station or sink node through multihop nate between the active and sleep states with a prescribed
wireless communications. The data reporting task is enabled pattern. Obviously, a sleep scheduling-based Medium Access
by a variety of software services, which implements essential Control (MAC) protocol is needed to coordinate nodes so that
timing, communication, and networking protocols for energy- neighbors can still communicate together while minimizing the
efficient multihop data collection in distributed networks. energy waste due to idle listening. According to their degrees
3
and the one-time overhead will be amortized and approach 0 as save energy in low-power modes, existing timer drivers pull
time goes by. While passive sniffing can also be used to collect down clock frequency at which repeat timers request when
neighborhood information, such an active request method will there are no active one-shot timers. However, to support the
reduce considerable amount of time for initialization. After one-shot timers, which usually fire in a few milliseconds, the
parent selection, the child node picks a slot that is not in the clock has to run at high frequency, which leads to high CPU
NAT, i.e., not occupied by any neighbors and their children usage and high power consumption. Unfortunately, switching
and requests for the slot by sending a request (REQ) packet between high and low frequencies results in inconsistent time
to its parent. The parent node responds with a reply packet stamps. Therefore, we developed a new two-layer timer driver
(RPL) if the requested slot is not in its NAT, i.e., not in use. to replace the original driver, which employs two individual
Then the child node acknowledges (ACK) the slot allocation hardware clocks to tackle the two types of timer separately.
and concludes this request. This conversation is conducted A high speed clock is used to drive one-shot timers, which
during contention slots when all the nodes are awake. Other remains active for a short period of time in normal mode.
neighboring nodes eavesdropping the conversation will update On the contrary, a low speed and thus low power clock runs
their NAT, which in turn is used to ensure that when a node continuously to support the repeat timers. Two clocks are
negotiates slots with its parent, the slots occupied by their synchronized from time to time to ensure consistency in time
neighbors will not be reused. stamps.
The aforementioned protocol provides nodes with the latest
slot allocations of neighbors and their children and seamlessly D. Multihop Routing
embeds the information in the parent selection process. With A common characteristic of monitoring systems is, at most
the help of such a distributed slot scheduling protocol, a of the time, the data are flowing into a sink, the base station
collision-free channel is assigned to each node and at the (BS) node with Internet access. Consequently, the network
same time an upstream route is established for forwarding architecture could be described as a spanning tree structure
data packets from sensor nodes to the sink node. rooted at the BS node. Initially the routing tree includes
only the BS node. A non-BS node is required to look for
a neighboring node that has already joined to the routing tree
C. Time Synchronization Protocol
as its parent for relaying data.
The performance of fully synchronized MAC protocol heav- The information about neighbors is managed in a neighbor-
ily depends on the accuracy of time synchronization. The hood table. Parents will be selected and re-examined according
authors in [6] utilize a dedicated out-of-band synchronization to the neighborhood table in order to maintain a reliable
hardware to achieve global synchronization. While very high routing topology. Periodically, each node will broadcast a
accuracy can be obtained, such a method increases the com- probe message containing its ID, state, hop count, slot number,
plexity of the overall system design and requires a custom- duty cycle as well as bi-directional RSSI with respect to its
made sensor platform. In this research, we found that in- neighbors. The neighborhood table maintains all the fields
band software-based synchronization schemes are completely in the probe packets along with a TTL field. TTL will be
practical and desirable accuracy for duty cycle scheduling can updated upon receiving and successfully sending a packet, and
be obtained. We adopted a modified version of FTSP [10] decreased regularly or upon an unacknowledged transmission
because it is able to synchronize multiple receivers with a to the neighbor. Neighbors with low or zero TTL will be
single broadcast message. considered as dead and replaced by new nodes.
In the new design, similar to FTSP, each node maintains a The network topology and routing tree are constructed and
buffer containing the latest time stamps for estimating clock updated as nodes select or change parent nodes according to a
skew and offset. The buffer window is also used for outlier parent selection algorithm. Many distance-vector based parent
detection to filter out corrupted time measurements. In our selection algorithms are available in the literature, which uses
experimental study, it is observed that FTSP can achieve less different cost metrics to guide routing. The cost of a node is
than 1ms timing errors in a three-hop network when the an abstract measure of distance. In our protocol, the cost is
power management functionality is turned off. However, in parameterized by hop count, RSSI, TTL, and duty cycle. When
low-power modes, FTSP results in errors of several hundred scheduled to run, the routing algorithm scans the neighbor list
milliseconds. Through carefully examination of the timer and find a potential parent with good link quality determined
driver shipped with FTSP, it is found that the driver is not by the RSSI and TTL, and relatively low duty cycle. Among
able to return consistent time stamps in low power modes. In the parent candidates, the neighbor with lowest hop count is
TinyOS, timer driver is required to implement two types of selected as the potential parent. If two or more candidates have
timer interfaces: one-shot timer and repeat timer. A one-shot the same hop count, the one with the lowest duty cycle will
timer fires only once whereas a repeat timer fires periodically be selected so as to balance the routing load and maximize
until being called off. All existing timer drivers rely on a network lifetime. Once a parent is targeted, a child node
single hardware clock to handle both types of timers. During will reserve a TDMA slot from the parent based on the slot
the sleep periods, clock is the only active module thus it reservation protocol we described earlier. Upon accepting the
dominates the power consumption in sleep mode. In a duty slot reservation, the parent node will start listening in the
cycling system, the sleep mode power consumption decides child’s slot and pass on incoming data packets from the child
the lower-bound of the average power consumption. Hence to to upper level nodes in the routing tree.
5
TABLE I
V. D EPLOYMENT AND F IELD T ESTING R ESULTS S TATISTICS OF SENSOR NETWORK STATUS DATA