Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
∗
Sensor Networks
2. APPLICATION REQUIREMENTS
Our system design is motivated by the requirements of a
typical ground surveillance application. The general objec-
tive of such an application is to alert the military command
and control unit in advance to the occurrence of events of in-
terest in hostile regions. The event of interest for our work
is the presence of moving vehicles in the deployed region.
The deployed sensor devices must have the ability to de-
tect and track vehicles in the region of interest. Successful
detection and tracking requires that the application obtain
the current position of a vehicle with acceptable precision
and confidence. When the information is obtained, it has to
be reported to a remote base station within an acceptable
latency. Several application requirements must be satisfied
to make this system useful in practice:
Localliz ation
GroupM AggM Tracking
Each group is represented by a leader to the external LogicalTimerM Magnet
world. Group members (who by definition can sense the Sensing
tracked event) periodically report to the group leader. The RandomLFSR EntityConnection
leader records each report keeping only the most recent one
from each member. Reports that are older than a certain Others SentryPM PowerM
threshold are purged. We define the confidence level of event
detection as the number of distinct motes that have reported
the event in the last tr units of time. When the confidence Figure 5: System Architecture
level of detecting an event is at least as high as the threshold
required by the application, called the degree of aggregation
(DOA), the leader sends a digest of the reports to the base mode.
station. The confidence threshold can be tuned to manipu- The implementation of our system on the MICA2 motes
late the sensitivity of the system. A low threshold increases was driven by several requirements that arise from platform
sensitivity at the expense of possible false alarms. A high limitations. Namely:
threshold could result in missing some smaller targets. The
• Energy Efficiency: MICA2 operates on a pair of
effect of manipulating the degree of aggregation is explored
batteries that approximately supply 2200 mAh at 3V.
experimentally in Section 7.2.2.
It consumes 20mA if running a magnetic sensing ap-
This concludes the description of our system design. In
plication continuously which leads to a lifetime of 5
the next section, we discuss the implementation issues on
days.
the TinyOS / MICA2 platform.
• Bandwidth Efficiency: The Chipcon radio on MICA2
6. IMPLEMENTATION provides an effective data rate of 12.4kbps, which equals
The architecture described in Section 4 was built on top a maximum packet rate of 43 pkts/sec. Our exper-
of TinyOS [13]. TinyOS is an event driven computation iments show that a mote barely reaches 20 pkts/sec
model, written in NesC [8] specifically for the motes plat- when it is exposed to channel contention.
form. TinyOS provides a set of essential components such as
• Simplicity: Our system requires many essential func-
hardware drivers, scheduler and basic communication pro-
tions shown in Figure 5 to make target tracking ef-
tocols. These components provide low level support for ap-
ficient, while the whole system must fit in 4K data
plication modules, which are also written in NesC. NesC
memory and 128K code memory. This necessitates a
is a C-like language that enables the programmers to de-
simple, yet effective, design for the MICA2 platform.
fine the function of components and the relations (depen-
dencies) among them. Components from TinyOS and user • Flexibility: Our prototype system spans 280 feet and
applications are processed by the NesC compiler into a run- comprises 70 motes. Once deployed, motes can not be
ning executable, which runs (in our case) on the MICA2 easily collected. Dynamic configuration is desirable for
mote platform. MICA2 is the third generation mote built fast performance tuning and debugging.
for wireless sensor networks [4]. Besides normal computa-
tion and communication capabilities, MICA2 motes have (i)
selectable transmission power settings (255 levels) which en- 6.1 Software Architecture
able us to dynamically adjust the communication range, (ii) The architecture of our system, written in NesC, is shown
a snooze function with up to six sleep modes provided by the in Figure 5. The whole system occupies 39,496 bytes of code
ATmega128 Microcontroller, and (iii) a wireless reprogram- memory and 3,725 bytes of data memory. We divide system
ming capability that eliminates the need for manual code components into four major groups; initialization, track-
downloads. The first two functions are utilized extensively ing, power management, and general utilities. Initialization
by our protocols. The last facilitates deployment. In par- components are responsible for basic infrastructure estab-
ticular, we use a lower communication power setting during lishment. Tracking components support the event tracking
neighbor discovery for diffusion tree creation. This ensures functions. The SentryPM module performs power manage-
that when the diffusion tree is created and communication ment which puts motes to sleep as described earlier, when
power is subsequently increased, all found edges along the no significant events are detected. We also use some utilities
tree are quite reliable. In contrast, running diffusion tree to facilitate downloading, debugging, tuning and statistical
creation at the normal power setting could result in unreli- logging. We provide a backbone module which is in charge
able or asymmetric edges between some nodes. This choice of time-driven transitions between phases. We also use this
would ultimately reduce performance. The snoozing func- module to pass state information among other modules to
tion is used to put motes to sleep when in the power saving reduce the dependency among components.
50
In implementing the above architecture, several system mote A
mote B
challenges were met, primarily due to lack of common oper- 45
25
Elevation 0 ft 0.5 ft 1 ft 15
Mote A 27 ft 30 ft > 84 ft
Mote B 43 ft > 84 ft > 84 ft 10
30
of in-network aggregation. First, a higher DOA certainly
helps reduce the message overhead and the number of false
25 positives. However, if the density with which the motes are
deployed is not sufficiently high, a higher degree of aggre-
Reporting latency (sec)
40
300
35
200 25
20
150
15
100
10
50
5
0 0
2 4 6 8 10 12 14 16 18 20 0 2 4 6 8 10 12 14 16 18 20 22 24
Sleep duration (sec) Number of active hours per day
Figure 10: Power Management Message Overhead Figure 11: Expected Lifetime of a Sensor Network
Using Sentry-based Power Management
2.9
2.8
across the batteries supplying power to the motes as an in-
direct way to measure the energy dissipation. We measured
2.7
the voltage for each mote at regular intervals over a period
2.6 of 100 hours and found that the voltage drop was reasonably
2.5
uniform across the motes. Figure 12 shows the voltage drop
during the observation period for one of the 6 motes for dif-
2.4
0 20 40 60 80 100 ferent values of duty cycles. From the figure, we see that
Time elapsed (h)
the battery voltage for a mote does not drop uniformly with
time. One of the reasons for the non-uniform energy dissipa-
Figure 12: Impact of Sleep Duration on Power Con- tion is the periodic rotation of the sentry responsibility. The
sumption voltage drop of a mote is higher during an interval in which
it is serving as a sentry than when it is serving as a non-
the probability that a non-sentry mote is awake. The total sentry because the periodic sampling operation performed
current (C) consumed by a mote in the baseline case, when by a sentry consumes significant energy. The results also
there are no events in the network, is given by Equation 2. confirm that a higher duty cycle results in a higher energy
The lifetime of the motes, L, is the ratio of the battery ca- dissipation. We see that when the mote is always awake, it
pacity to the total current consumed. Assuming a battery loses most of its capacity within 100 hours (about 4 days).
capacity of 2200 mAh, the lifetime of the motes in hours is This reasonably matches with the results in Figure 11, which
simply 2200/C. predicted that a mote operating 100% of the time will last
C = P (s) ∗ 20 + (1 − P (s)) ∗ (P (a) ∗ 20 + (1 − P (a)) ∗ 0.13) (2) only 5 days.
The experimental results we obtained are promising in
Figure 11 uses the above equation to predict the expected
that they show that the sentry-based power management
lifetime of the motes for different percentages of their duty
algorithm is adaptive and that it is successful in extending
cycle. The actual values of P (s) and P (a) are measured from
the lifetime of the sensor network. While our current sentry
the our prototype system. A mote that is always asleep is
selection algorithm does not choose the minimal number of
expected to survive for 2 years, whereas a mote that is al-
sentries, by knowing the lifetime of the mission in advance,
ways awake (i.e. always remains a sentry), can survive only
we can choose the density of deployment and the duty cycle
up to 5 days. The exponential curves show that the lifetime
in such a way that the lifetime requirement can be met.
greatly improves when the duty cycle is low. For example,
when the probability that a mote is selected as a sentry is
0.5, and its duty cycle is reduced from 24 hours per day to 8. LESSONS LEARNED
one hour per day, its lifetime extends by nearly 100%. The The work described in this paper is our experience in
graphs also show that the lifetime improves significantly as building a complete system for using wireless sensor net-
the number of sentries is reduced. For example, when the works for a practical application, and evaluating it through
probability that a mote is selected as a sentry is reduced to an actual deployment of motes. This practical experience
0.05, and its duty cycle is reduced to 4%, its lifetime ex- has been valuable, because it has taught us that some of the
tends by nearly 900%. The probability of selecting a mote simplified assumptions made about the hardware platform
as a sentry involves a tradeoff between the sensing cover- and operating system in much current research do not hold
age that can be achieved and the required network lifetime. well in practice. The lessons we learned have greatly im-
A higher probability results in more sentries and provides pacted some of the design choices we had to make in building
better sensing coverage. However, it also reduces the life- our system.
time of the network, as Figure 11 shows. In order to reduce
the number of sentries without adversely affecting the sens- 1. Application-specific Reliability : We found that
ing coverage, we can either choose magnetometers with a the packet loss in the MICA2 platform can be as large
higher sensing range or increase the density with which the as 20%. A well-known approach to counter message
motes are deployed. For example, in our experiments we loss is to retransmit the message multiple times, in
found that when the motes were placed at a distance of 8 ft order to improve the probability of delivery. Such re-
from each other, the probability that a mote was selected as transmissions can be initiated either in the lower layers
a sentry was nearly about 40%. However, in a more dense of the protocol stack or at the application layer. Since
deployment in which the motes were placed within a few retransmitting a message consumes significant energy,
inches from each other, the probability of selecting a mote it is important that the messages are retransmitted se-
as a sentry dropped to about 20%. The reason is that a lectively, based on application-specific knowledge. For
dense deployment results in a larger number of neighbors instance, applications that transmit ephemeral sensor
for each mote. Therefore, a single sentry is able to cover readings, such as the instantaneous temperature, may
more neighbors, and that gives fewer motes a chance to elect not require reliability. Lower layers, such as the MAC
themselves as a sentry. layer, often lack domain-specific knowledge. So im-
In addition to predicting the lifetime of the network using plementing reliability guarantees in the lower layers
a simple model, we also conducted experiments to compare makes it harder to provide application-specific relia-
bility. Hence, for a system that strives to achieve en- capture those differences in a simulator. We found
ergy efficiency, providing reliability guarantees at the that the impact of such heterogeneity is significant in
application layer is a better option. the MICA2 platform, such as shown in Figure 6. The
variance in the sensor readings can be accounted for
2. False Alarm Reduction: We found that our sensors at the very outset through software calibration of the
generated false alarms at a non-negligible rate. This sensors.
introduces unnecessary energy consumption and inap-
propriate actions. False alarms we experienced can be 6. Other Lessons: The drift in the software timers in
categorized into two major types: Transient and per- TinyOS presents another practical issue, especially when
sistence false alarms. A simple exponential weighted motes transit into sleep state. In order to compensate
moving average (EWMA) on the mote is sufficient to for the drift in the soft timers, we need to increase
deal with transient false alarms such as the burst dis- the duration for which a mote remains awake, and de-
tortion of sensing reading. However, if the false alarms sign appropriate strategies to control the sleep-wakeup
are persistent due to errors in the sensor device, more cycle, as described in Section 7.3.1. Another prac-
advance techniques are desired. In our system, we suc- tical challenge we faced was the lack of appropriate
cessfully eliminated individual persistent false alarms tools for debugging a network of motes. We utilize
by utilizing in-network aggregation with a relatively the dynamic configuration method mentioned in 5.1.3
high DOA value. In the worse case, when multiple and overhearing tools to facilitate our work. However,
persistent false alarms are generated simultaneously, more sophisticated debugging and configuration tools
we are able to filter out such false alarms by analyz- will greatly ease the burden on the programmer in the
ing spatial-temporal correlations among the consecu- future. We acknowledge that our design choices some-
tive reports at the base station. times are restricted by limited hardware and operation
3. Race Conditions Reduction: Race conditions are system support. It is desirable to have new features
another example of a phenomenon that is often ig- such as interruptible snoozing, sub-controllers for I/O,
nored in simulation-based approach, but must be ad- a more reliable RF module and process management,
dressed when building the running system. For exam- so that we can improve our design and implementation
ple, contention occurs not only when different motes in the future.
try to transmit simultaneously, but also when differ-
ent software components on the same mote initiate 9. CONCLUSIONS
transmissions simultaneously through split-phase op-
Research in wireless sensor networks has been very active.
erations. Due to the limited support from TinyOS, the
Most of the published work studies an individual protocol
latter can lead to race conditions. Race conditions can
and performs evaluations via simulations. In contrast, in
be avoided, if the OS can support synchronized pro-
this work we implement an entire integrated suite of proto-
cessing, based on semaphores, in order to coordinate
cols and application modules and evaluate the performance
the shared resources among the contending modules.
on a system composed of 70 MICA2 motes in a realistic out-
While TinyOS supports concurrency control through
door setting. Empirical results identify the capability of the
atomic sections and tasks, it is more flexible and effi-
MICA2 radio, the value of in-network aggregation with re-
cient to use application level synchronization such as
spect to transmission overhead, false alarm processing and
packet scheduling mentioned in Section 6.1 to coordi-
application layer tracking latency, and the value of power
nate the operations.
management. Design decisions and how those decisions were
4. Asymmetry Reduction: Another issue we had to influenced by the empirical data were described. Key lessons
address was to account for the effect of asymmetric learned were also itemized. From our experience in build-
channels which is largely ignored in simulation ap- ing and analyzing this system it is clear that key realistic
proaches. Communication in low power devices, such hardware, software and environmental issues must not be
as the motes, is asymmetric due to differences in hard- ignored in developing usable solutions. This includes real-
ware, signal attenuation, and residual battery capacity. ism of sensor performance, asymmetries in communication,
In practice, we were able to reduce the effect of asym- false alarms, and race conditions.
metric channels by restricting a mote to communicate
with only those neighbors that are well within its com- 10. FUTURE WORK
munication range. This can be achieved by reducing
transmission power during the network establishment System design and engineering is one of the keys to bring
as we mentioned in Section 5.1.2. Moreover, it also sensor network paradigm into reality. The system described
can be achieved by bounding relay distance, if the lo- in this paper is still an ongoing prototype. Many outstand-
calization is available. ing design issues are yet to be resolved. We are currently in-
vestigating 1) target classification under constraint resources
5. Software Calibration: In a simulation-based ap- through collaborative data fusion, 2) the possibility to de-
proach, it is common for sensor devices of the same sign a more aggressive power management strategy with
type generate the same readings under identical con- passive wake-up capabilities [9], 3) approaches to build ex-
ditions. However, in practice, the same type of sensors tremely robust routing infrastructure, which can survive un-
are capable of generating quite different sensor read- der hostile environments, 4) a practical localization scheme
ings under identical conditions. Such a phenomenon and 5) a scalable architecture up to thousands of nodes while
may occur because of differences in the way the devices maintaining operational performance requirement. Presently
are manufactured, and it is often hard to accurately these topics are at the center of our attention.
11. REFERENCES [12] W. R. Heinzelman, A. Chandrakasan, and
[1] S. Bhattacharya, H. Kim, S. Prabh, and H. Balakrishnan. Energy-Efficient Communication
T. Abdelzaher. Energy-Conserving Data Placement Protocol for Wireless Microsensor Networks. In Proc.
and Asynchronous Multicast in Wireless Sensor of the Intl. Conference on System Sciences, January
Networks. In The First International Conference on 2000.
Mobile Systems, Applications, and Services (MobiSys), [13] J. Hill, R. Szewczyk, A. Woo, S. Hollar, D. E. Culler,
May 2003. and K. S. J. Pister. System Architecture Directions for
[2] B. M. Blum, P. Nagaraddi, A. Wood, T. F. Networked Sensors. In Proc. of Architectural Support
Abdelzaher, S. Son, and J. A. Stankovic. An Entity for Programming Languages and Operating Systems
Maintenance and Connection Service for Sensor (ASPLOS), pages 93–104, 2000.
Networks. In The First Intl. Conference on Mobile [14] Honeywell. 1- and 2-Axis Magnetic Sensors. Available
Systems, Applications, and Services (MobiSys), May at www.ssec.honeywell.com/magnetic/
2003. datasheets/hmc1001-2_1021-2.pdf.
[3] B. Chen, K. Jamieson, H. Balakrishnan, and [15] M. Horton, D. E. Culler, K. Pister, J. Hill,
R. Morris. Span: An energy-efficient coordination R. Szewczyk, and A. Woo. MICA: The
algorithm for topology maintenance in ad hoc wireless Commercialization of Microsensor Motes. Sensors
networks. In 6th ACM MOBICOM Conference, 2001. Online, April 2002.
[4] CrossBow. Mica2 data sheet. Available at www.sensorsmag.com/articles/0402/40.
http://www.xbow.com/Products/Product_ [16] C. Intanagonwiwat, R. Govindan, and D. Estrin.
pdf_files/MICA%20data%20sheet.pdf. Directed diffusion: A scalable and robust
[5] J. Elson and K. Romer. Wireless Sensor Networks: A communication paradigm for sensor networks. In the
New Regime for Time Synchronization. In Proc. of the Sixth Annual International Conference on Mobile
Workshop on Hot Topics in Networks (HotNets), Computing and Networks, 2000.
October 2002. [17] J. M. Kahn, R. H. Katz, and K. S. J. Pister. Next
[6] Z. Feng, S. Jaewon, and R. James. Information-Driven Century Challenges: Mobile Networking for Smart
Dynamic Sensor Collaboration for Target Tracking. Dust. In Proc. of Intl. Conference on Mobile
IEEE Signal Processing Magazine, 19(2), Mar 2002. Computing and Networking (MOBICOM), August
[7] F.Ye, G.Zhong, S.Lu, and L.Zhang. PEAS: A Robust 1999.
Energy Conserving Protocol for Long-lived Sensor [18] S. Madden, M. Franklin, J. Hellerstein, and W. Hong.
Networks. In Proc. of International Conference on TAG: A Tiny Aggregation Service for Ad-Hoc Sensor
Distributed Computing Systems (ICDCS), May 2003. Networks. In Operating Systems Design and
[8] D. Gay, P. Levis, R. von Behren, M. Welsh, Implementation, December 2002.
E. Brewer, and D. Culler. The nesC Language: A [19] A. Mainwaring, J. Polastre, R. Szewczyk, D. E.
Holistic Approach to Networked Embedded Systems. Culler, and J. Anderson. Wireless Sensor Networks for
In Proceedings of Programming Language Design and Habitat Monitoring. In Proc. of the ACM Workshop
Implementation (PLDI) 2003, 2000. on Sensor Networks and Application (WSNA),
[9] L. Gu and J. A. Stankovic. Radio-Triggered Wake-Up September 2002.
Capability for Sensor Networks. In Proceedings of [20] TOSSIM: A Simulator for TinyOS Networks.
RTAS, 2004. Available at webs.cs.berkeley.edu/tos/
[10] T. He, B. M. Blum, J. A. Stankovic, and T. F. tinyos-1.x/doc/nido.pdf.
Abdelzaher. AIDA: Adaptive Application Independent [21] R. Powers. Batteries for Low Power Electronics. In
Data Aggregation in Wireless Sensor Networks. ACM Proceedings of the IEEE, pages 687–693, April 1995.
Transactions on Embedded Computing System, Special [22] D. Tian and N. Georganas. A Node Scheduling
issue on Dynamically Adaptable Embedded Systems, Scheme for Energy Conservation in Large Wireless
2003. Sensor Networks. Wireless Communications and
[11] T. He, C. Huang, B. M. Blum, J. A. Stankovic, and Mobile Computing Journal, May 2003.
T. Abdelzaher. Range-Free Localization Schemes in [23] T. Yan, T. He, and J. Stankovic. Differentiated
Large-Scale Sensor Networks. In Proc. of the Intl. Surveillance Service for Sensor Networks. In First
Conference on Mobile Computing and Networking ACM Conference on Embedded Networked Sensor
(MOBICOM), September 2003. Systems (SenSys 2003), November 2003.