[17] D.S. Dummit and R.M. Foote. Abstract Algebra. Wiley, 3 edition, July 2003. [18] H. Edelsbrunner. Algorithms in combinatorial geometry. Springer-Verlag New.
DETECTING TOPOLOGICAL EVENTS USING WIRELESS SENSOR NETWORKS By Christopher Farah M.A. in Mathematics St. Louis University, 2001 B.Eng. in Chemical Engineering The Cooper Union, 1993
A DISSERTATION Submitted in Partial Fulllment of the Requirements for the Degree of Doctor of Philosophy (in Spatial Information Science and Engineering)
The Graduate School The University of Maine December, 2011
Advisory Committee: Michael F. Worboys, Professor in Spatial Information Science and Engineering, Advisor Ali Abedi, Professor in Electrical and Computer Engineering Kate Beard, Professor in Spatial Information Science and Engineering Matt Duckham, Associate Professor in Geographic Information Science, University of Melbourne Silvia Nittel, Associate Professor in Spatial Information Science and Engineering
DISSERTATION ACCEPTANCE STATEMENT
On behalf of the Graduate Committee for Christopher Farah, I arm that this manuscript is the nal and accepted dissertation. Signatures of all committee members are on le with the Graduate School at the University of Maine, 42 Stodder Hall, Orono, Maine. Submitted for graduation in December, 2011
Michael F. Worboys, Professor in Spatial Information Science and Engineering
ii
(Date)
c ⃝
2011 Christopher Farah All Rights Reserved
iii
LIBRARY RIGHTS STATEMENT
In presenting this dissertation in partial fulllment of the requirements for an advanced degree at The University of Maine, I agree that the Library shall make it freely available for inspection. I further agree that permission for fair use copying of this thesis for scholarly purposes may be granted by the Librarian. It is understood that any copying or publication of this dissertation for nancial gain shall not be allowed without my written permission.
Christopher Farah
(Date)
DETECTING TOPOLOGICAL EVENTS USING WIRELESS SENSOR NETWORKS
By Christopher Farah Dissertation Advisor: Dr. Mike Worboys
An Abstract of the Dissertation Presented in Partial Fulllment of the Requirements for the Degree of Doctor of Philosophy (in Spatial Information Science and Engineering) December, 2011
Dynamic geographic phenomena, e.g. forest res and oil spills, can have dire environmental, sociopolitical, and economic consequences. Mitigating, if not preventing such events can be facilitated by the use of advanced spatiotemporal information systems. One system that has gained widespread interest is the wireless sensor network (WSN), a deployment of sensor nodes, tiny untethered computing devices, each of which runs on batteries and is equipped with one or more commercial o-the-shelf or custom-made sensors and a radio transceiver. In this dissertation, an algorithm is developed to detect specic topological events, called
connectivity events,
by a
deployed WSN. After introducing the mathematical and technical preliminaries, connectivity events are dened, a completeness proof on connectivity events is provided, and a formal Petri net model is used to prove network-level properties. With this foundation, subroutines are developed that comprise a distributed event detection algorithm suitable for 2-dimensional (2d) or 3-dimensional (3d) deployments. The algorithm is based on formal concepts from a eld of algebraic topology known as homology. The research presented focuses on
incremental events,
events result-
ing from the change of sensor status of a single node between two states of network operation, though simulations indicate that the algorithm can compute connectivity events arising from the change of sensor status of multiple nodes. The algorithm is validated through formal proofs and in WSN simulation and testbed environments. Results indicate the algorithm correctly computes an incremental event associated with a region comprised of
n nodes in O(n) time, using O(n) storage, and O(n) data
passed via messages, and only nodes in physical proximity to an event are tasked, thereby conserving network resources and allowing multiple disparate events to be simultaneously monitored.
ACKNOWLEDGEMENTS I would like to thank my advisor Dr.
Mike Worboys for his invaluable guidance
and ongoing support and patience, without which, I would not have completed my dissertation. My deepest thanks also go to the remaining members of my advisory committee, Dr. Ali Abedi, Dr. Kate Beard, Dr. Matt Duckham, and Dr. Silvia Nittel. Each helped me at key points in my research and/or coursework. My thanks go to Dr. Matt Duckham and his students of the Spatial Information Science Group at the University of Melbourne for valuable input during our webconferences. I must also thank fellow graduate students in the School of Computing and Information Science, especially, Jixiang Jiang, Cheng Zhong, Lisa Walton, Guang Jin, Jake Emerson, François Neville, and Kraig King. Through free, unprompted discussions and input, I was able to make improvements to my research. Without the support of Dr. Ali Abedi and his Wireless Sensor Networks (WiSeNet) Lab, a small-scale testbed would not have been deployed and evaluated. For this, I must thank Frederick Schwaner, whose countless hours of support and eort made the testbed deployments possible. My thanks also go to Kenneth Wiley, who supported some of the simulation trials. I am grateful to have been part of the rst cohort of National Science Foundation's Interdisciplinary Graduate Education and Research Traineeship (NSF IGERT) Sensors at the University of Maine, and am thankful to Dr. Kate Beard for supporting my application.
As a NSF IGERT Research Trainee, I was exposed to
ideas across dierent departments, given the opportunity to attend and present at conferences, and trained in sensor node programming; generally, I was provided a framework to address my research interests.
iv
I would like to thank friends for knowing when to give my mind a break from my research, to ask questions, or to let me verbalize some of my internal processing. Specically, I would like to thank Dr. Frank Cantelmi and Dr. Franco Montalto for their technical ears and kindness.
Finally, I would like to thank my parents,
Albert and Mildred Farah, and my daughter, Keiko Farah, for their support and love, which helped me to maintain a sense of balance throughout my studies. This work was partially supported by the National Science Foundation under grant numbers IIS-0534429, IIS-0429644, IIS-0916219, and DGE 0504494; by the National Aeronautics and Space Administration under grant NASA-EP-10-01-5404438, and by the National Geospatial-Intelligence Agency under under grant NMA201-012003.
v
TABLE OF CONTENTS ACKNOWLEDGEMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
iv
LIST OF TABLES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xi
LIST OF FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
LIST OF DEFINTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii
LIST OF NOTATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix
Chapter
1.
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
1.1
Monitoring Environmental Phenomena . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
1.2
Wireless Sensor Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
1.3
Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.4
Distributed Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.5
Goals and Hypothesis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.6
Scope of Dissertation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.7
Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.8
Major Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.9
Intended Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.10
Organization of Remaining Chapters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
vi
2.
3.
BACKGROUND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.1
Topology and Topological Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.2
Homology Theory and the Betti Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2.2.1
History. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.2.2
Prerequisite Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.2.3
Applications of Homology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.2.4
Advances in Eciency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.3
WSN Event/Property Detection Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.4
Communication Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.5
Topology Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
2.6
Formalizing Distributed Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
INCREMENTAL CHANGE WITHIN A SCALAR FIELD. . . . . . . . . . . . . . . . . . . 44
3.1
Linking Homology to the WSN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.2
Detecting Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3.3
From Continuous Scalar Field to a WSN Approximation . . . . . . . . . . . . . . . 48 3.3.1
Discretizing of the Scalar Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.3.2
WSN Approximation of a Discrete Scalar Field . . . . . . . . . . . . . . . . . 49
3.4
Topological Events of Interest. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.5
Topological Event Detection Nets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
3.6
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
vii
4.
IMPLEMENTING AND EXTENDING HOMOLOGY . . . . . . . . . . . . . . . . . . . . . . . 69
4.1
5.
Classifying Select Spaces Using the Betti Numbers . . . . . . . . . . . . . . . . . . . . . 69 4.1.1
The Pinched Sphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4.1.2
The Crimped Sphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
4.1.3
The n-Pinched Sphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
4.1.4
The Pinched Torus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
4.1.5
The Crimped Torus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
4.1.6
The n-Pinched Torus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4.1.7
Summary of Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4.2
Simplex Connectivity Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
4.3
Incidence Matrices and Simplex Connectivity Numbers . . . . . . . . . . . . . . . . 81
4.4
Component 3-Tuples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
4.5
Link Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
4.6
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
ALGORITHM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
5.1
Discovery Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
5.2
2d Event Detection Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
5.3
3d Event Detection Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 5.3.1
Overview of Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
5.3.2
Node Insertion - One Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
5.3.3
Node Insertion - Merging Multiple Components . . . . . . . . . . . . . . . . 109
5.3.4
Node Deletion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
viii
6.
EXPERIMENTAL RESULTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
6.1
7.
Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 6.1.1
2d Connectivity Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
6.1.2
3d Connectivity Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
6.1.3
Evaluating Non-incremental Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
6.1.4
Evaluation Using the localized Delaunay triangulation . . . . . . . . . 120
6.2
Testbed Deployments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
6.3
Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
CONCLUSIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
7.1
7.2
7.3
Evaluation of Hypothesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 7.1.1
Correct Computation of Connectivity Events . . . . . . . . . . . . . . . . . . . 131
7.1.2
Complexity of Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
7.1.3
Localized Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Results and Major Findings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 7.2.1
Incorporating Homology into a Distributed Model . . . . . . . . . . . . . . 133
7.2.2
Event Detection in the 3d Environment . . . . . . . . . . . . . . . . . . . . . . . . . 134
7.2.3
Singularity Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 7.3.1
Incorporating Uncertainty. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
7.3.2
Non-incremental Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
REFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
APPENDIX A PROOFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
ix
APPENDIX B ADDITIONAL TESTBED DEPLOYMENT RESULTS . . . . . . . 148
APPENDIX C TINYOS CODE FOR THE 2D DEPLOYMENT . . . . . . . . . . . . . . 150
APPENDIX D RELATED PUBLICATIONS AND PRESENTATIONS . . . . . . . 165
BIOGRAPHY OF THE AUTHOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
x
LIST OF TABLES Σ1
Table 3.1
Incidence matrix of the Petri net
Table 4.1
Incidence matrices for the pinched sphere. . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Table 4.2
Incidence matrices for the crimped sphere. . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Table 4.3
Incidence matrices for the
Table 4.4
Incidence matrices for the pinched torus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Table 4.5
Incidence matrices for the crimped torus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Table 4.6
Incidence matrices for the
Table 4.7
Spaces of interest partitioned by the Betti numbers.. . . . . . . . . . . . . . . . 76
Table 4.8
Spaces of interest partitioned by the Betti numbers, weakly connected,
Table 4.9
n-pinched
n-pinched
sphere. . . . . . . . . . . . . . . . . . . . . . . . . 73
torus. . . . . . . . . . . . . . . . . . . . . . . . . . . 75
k -connected. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
77
3-manifolds w/boundary of interest partitioned by the Betti numbers, weakly connected,
Table 4.10
in Figure 3.18 . . . . . . . . . . . . . . . . . 64
k -connected.. . . . . . . . . . . . . . . . . . . . . . . . . . . .
78
Surfaces of interest partitioned by the Betti and simplex connectivity numbers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Table 4.11
3-Manifolds w/boundary of interest partitioned by the Betti and simplex connectivity numbers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Table 4.12
Link cases and formulas. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Table 5.1
Data elements stored at each node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Table 5.2
Node
9's
data after polling neighbors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
xi
9's
Table 5.3
Node
nal data prior to multicasting updates . . . . . . . . . . . . . . . . . . . 110
Table A.1
Non-trivial incidence matrices for the
n-crimped
sphere . . . . . . . . . . . . 144
Table A.2
Non-trivial incidence matrices for the
n-crimped
torus . . . . . . . . . . . . . 145
Table A.3
Incidence matrices for the pinched solid sphere . . . . . . . . . . . . . . . . . . . . . 146
Table A.4
Incidence matrix of the Petri net in Figure A.3 . . . . . . . . . . . . . . . . . . . . . 147
xii
LIST OF FIGURES Figure 1.1
Yellowstone forest res of 1988 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
Figure 1.2
Three facets of WSN design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
Figure 1.3
Open Systems Interconnection (OSI) layers . . . . . . . . . . . . . . . . . . . . . . . . .
7
Figure 1.4
Examples of environmental phenomena . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
Figure 1.5
Sensor nodes for underwater applications [68] . . . . . . . . . . . . . . . . . . . . . . .
8
Figure 1.6
Examples of incremental events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Figure 2.1
Illustrations of types of connectivity of interest . . . . . . . . . . . . . . . . . . . . . 21
Figure 2.2
Cycles and boundaries as a homology tool . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Figure 2.3
Valid simplices and invalid complexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Figure 2.4
A simplicial complex, a cell, and a nerve complex . . . . . . . . . . . . . . . . . . 26
Figure 2.5
Betti numbers of an evolving complex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Figure 2.6
Reducing topological noise [21] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Figure 2.7
Nerve complex and its spectral sequence [4] . . . . . . . . . . . . . . . . . . . . . . . . . 31
Figure 2.8
Dierent notions of a hole in a WSN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Figure 2.9
Routing around network holes in a WSN [26] . . . . . . . . . . . . . . . . . . . . . . . 34
Figure 2.10
Boundary detection in a WSN [42] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Figure 2.11
Hole detection in a WSN [22] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Figure 2.12
Local changes in network resolution in WSNs [16] . . . . . . . . . . . . . . . . . . 39
xiii
Figure 2.13
Valid and invalid atomic nets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Figure 2.14
Dining philosophers solution validated using Petri nets [57] . . . . . . . . 41
Figure 2.15
Petri net representation of a token-passing solution to mutual exclusion [57] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Figure 3.1
Complexes induced from the communication graph by the scalar eld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Figure 3.2
Example of two components merging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Figure 3.3
From continuous scalar eld to WSN approximation . . . . . . . . . . . . . . . 48
Figure 3.4
From continuous to discrete scalar eld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Figure 3.5
From discrete scalar eld to WSN approximation . . . . . . . . . . . . . . . . . . . 50
Figure 3.6
Temporal resolution based on sampling rate. . . . . . . . . . . . . . . . . . . . . . . . . 51
Figure 3.7
2d connectivity events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Figure 3.8
Hexagonal, square, and triangular tilings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Figure 3.9
Hole loss/formation and disappearance/appearance . . . . . . . . . . . . . . . . 54
Figure 3.10
Self-split/self-merge and split/merge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Figure 3.11
Attrition/accretion and singularity formation/loss . . . . . . . . . . . . . . . . . . 56
Figure 3.12
Neighbor arrangements for a hexagonal Voronoi diagram . . . . . . . . . . 56
Figure 3.13
Connectivity event proof cases (i), (ii), (iii) . . . . . . . . . . . . . . . . . . . . . . . . . 57
Figure 3.14
Connectivity event proof cases (iv), (v) (vi) . . . . . . . . . . . . . . . . . . . . . . . . . 58
Figure 3.15
Connectivity event proof cases (vii), (viii), (ix) . . . . . . . . . . . . . . . . . . . . . 59
Figure 3.16
Connectivity event proof cases (x), (xi), (xii) . . . . . . . . . . . . . . . . . . . . . . . 60
xiv
Figure 3.17
Connectivity event proof cases (xiii), (xiv) . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Figure 3.18
The Petri net
Figure 3.19
An occurrence net of
Σ1
Figure 3.20
Execution Case 1 for
Σ1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
66
Figure 3.21
Execution Case 2 for
Σ1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
67
Figure 3.22
Execution Case 3 for
Σ1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
67
Figure 4.1
2d and 3d topological property overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Figure 4.2
Surfaces and near surfaces of interest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Figure 4.3
Quotient maps of surfaces and near surfaces . . . . . . . . . . . . . . . . . . . . . . . . 71
Figure 4.4
Quotient map of
Figure 4.5
Quotient map of the
Figure 4.6
k -simplex
Figure 4.7
Supporting gures for the proof of Theorem 4.2.1 . . . . . . . . . . . . . . . . . . 80
Figure 4.8
Two
1-complexes
and the corresponding incidence matrices . . . . . . . . 82
Figure 4.9
Two
2-complexes
and the corresponding incidence matrices . . . . . . . . 83
Figure 4.10
A
0-simplex
connected
3-complex
and its incidence matrices. . . . . . . 84
Figure 4.11
A
1-simplex
connected
3-complex
and its incidence matrices. . . . . . . 85
Figure 4.12
Changes to a
Figure 4.13
Component
Figure 4.14
Insertion cases and component
Σ1
of one node in the WSN . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
for two nodes in the WSN . . . . . . . . . . . . . . . . 65
n-pinched
sphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
n-pinched
torus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
connected complexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
0-link
1-link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
87
3-tuples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
88
3-tuples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
90
or
xv
3-tuples
Figure 4.15
k-link cases and component
Figure 5.1
Dierentiating between a cavity and a tunnel . . . . . . . . . . . . . . . . . . . . . . . 98
Figure 5.2
Data structure and derivative data of
Figure 5.3
Two components merging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Figure 5.4
Component splitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Figure 6.1
2d connectivity events simulated in MATLAB . . . . . . . . . . . . . . . . . . . . . . 114
Figure 6.2
Time to process a 2d incremental event vs number of nodes . . . . . . . 115
Figure 6.3
3d connectivity events simulated in MATLAB . . . . . . . . . . . . . . . . . . . . . . 116
Figure 6.4
3d connectivity events simulated in MATLAB - continued . . . . . . . . . 117
Figure 6.5
Time to process a 3d connectivity event vs number of nodes . . . . . . 118
Figure 6.6
A non-incremental event simulated in MATLAB . . . . . . . . . . . . . . . . . . . . 119
Figure 6.7
Evaluation of algorithm against graph sparsity . . . . . . . . . . . . . . . . . . . . . 121
Figure 6.8
Photograph of testbed deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Figure 6.9
Twelve trials of testbed deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Figure 6.10
Total transmitted data per node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Figure 6.11
Aggregated results of testbed trials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Figure 7.1
Non-incremental events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Figure A.1
Quotient map of the
n-crimped
sphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Figure A.2
Quotient map of the
n-crimped
torus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
xvi
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
T
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Figure A.3
Petri net of a 2-node system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Figure B.1
Delaunay 3x3 grid merge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Figure B.2
Delaunay 3x3 grid merge results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Figure B.3
Delaunay 3x3 grid attrition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Figure B.4
Delaunay 3x3 grid attrition results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
xvii
LIST OF DEFINTIONS abelian group A group that satises the axiom of commutativity.
action A set of transitions from
T
of a Petri net
algebraic topology Area of topology that exploits the computational tools of algebra.
areal object A two-dimensional region contained by a simple closed curve.
arrangement A nite set of hyperplanes in a linear, ane, or projective space satisfying certain conditions
n-ball The interior of a
n-sphere
(j th ) Betti number The rank of the corresponding homology group
Hj
j-boundary A
j -chain γ
that is the boundary of a
(j + 1)-chain.
boundary operator A mapping,
∂j , from j -chains to (j −1)-chains, expressing the boundary of a j -chain.
broadcast A message is transmitted to all nodes within the communication radius.
(open/closed) j-cell A space that is homeomorphic to a
j -dimensional
xviii
(open/closed) ball.
j-chain A nite linear combination of
j -simplices
j-cycle A
j -chain γ
such that
∂j (γ) = 0
communication graph A graph whose vertices are nodes and edges are communication links.
component Maximal connected subset of a space
component 3-tuple A 3-tuple,
(ID0 , ID1 , ID2 ),
IDk
where
is the ID of the
k -simplex
component
conguration Set of states of every process (node) in a network
conict A place
p
t, u
enables two transitions
that are not detached.
connected A set that cannot be expressed as the disjoint union of two or more nonempty open subsets.
k-connected A graph in which the removal of
k
vertices can disconnect the graph.
connectivity events An event in which the number of components, holes, and/or singularities of a topological space changes.
contact A place
p
contains the preset of
t
and an element of the post-set of
t.
convex set A set
S
where, for any two points in
S,
the line segment connecting them is in
xix
S.
convex hull The smallest convex set of a space
continuous A function
f :X→Y
satisfying:
V ⊆Y
is open implies
f −1 (V ) ⊆ X
is open.
crimp The reduction of a cycle to a 1-simplex.
crimped sphere A sphere,
S 2,
such that an entire cycle on its surface has been identied with a
1-simplex.
n-crimped sphere A sphere,
S2
n
with
non-intersecting cycles, each of which has been identied with
a 1-simplex, distinct from the identied 1-simplex of any of the other
(n − 1) cycles.
crimped torus A torus,
S 1 × S 1 , such that a transverse non-bounding cycle has been identied with
a 1-simplex.
n-crimped torus A torus,
S1 × S1
with
n
non-intersecting transverse non-bounding cycles, each of
which has been identied with a 1-simplex, distinct from the identied 1-simplex of any of the other
(n − 1)
cycles.
critical node A node that has secured a token and entered the critical section.
critical section Code in a distributed algorithm which should be executed by at most one process at a time.
Delaunay tetrahedization Dual of the Voronoi diagram of a point set in
xx
R3
Delaunay triangulation Dual of the Voronoi diagram of a point set in
R2
detached Two states/transitions
a, b ∈ P ∪T
are
detached if (a• ∪ {a} ∪• a)∩(b• ∪ {b} ∪• b) =
∅.
distributed algorithms Algorithms that operate over multiple networked machines, executing tasks through a combination of internal processing and coordinated communication of data.
enables A place
p
enables
of the post-set of
a transition
t
t
if the preset of
is contained in
t
is contained in
p
and no element
p.
exit Section of code in which the critical section is released.
fairness A transition
t
occurs innitely (nitely) if
t
is enabled innitely (nitely).
ow relation A directed relation linking a place to a transition or a transition to a place.
planar network graph Formal model that relies on a structured communication graph.
physical network Formal model that does not rely on a structured communication graph.
group A set
G
coupled with a binary operation satisfying the four axioms: closure, asso-
ciativity, identity, and inverses.
Hausdor space A space
b, Na
X,
and
such that, for any points
Nb ,
satisfying
a, b ∈ X ,
Na ∩ Nb = ∅. xxi
there exists neighborhoods of
a
and
homeomorphic A condition that implies there is a homeomorphism between two spaces; these spaces are topologically equivalent.
homeomorphism A bijective continuous function with a continuous inverse
homology group An abelian group that measures the structure of a space in terms of cycles and boundaries.
homology theory A eld of algebraic topology that investigates the nature of classes of cycles of a space
ID The identication number of the node or component in question
image Given a function
f
with domain
D,
the set of elements of
f (D)
incidence component A subset of column in
Ek , U × V ,
U ×V
where
U ⊂ Ck
and
V ⊂ Ck+1 ,
is non-zero, (ii) all entries in
are zero, and (iii) no proper subset of
U ×V
satisfying: (i) each row and
(Ck − U ) × V
and
U × (Ck+1 − V )
has properties (i) and (ii).
(j th ) incidence matrix A matrix of the form the
Cj × Cj+1
j -and j + 1-simplices
where each entry indicates the relationship between
in question.
incremental event A change in sensor status (relative to threshold) of a single node between two consecutive states of operation.
invariant A property that remains unchanged under homeomorphisms.
xxii
irreducible cycle A cycle associated with a space
X
that can't be trivially reduced in
X.
kernel Given a function, the set of elements in the domain that map to
0
in the codomain.
j-link A
j -simplex
that is incident to multiple
(j + 1)-simplex
components.
link case Determines the formula to compute
n
relative to a component
C
|E1 |,
given the insertion or deletion of a node
and is determined by the Betti numbers of
Lk (n, C).
liveness Ensures that forward progress is made in a run of a distributed algorithm.
3-manifold with boundary A Hausdor space in which every point has a neighborhood homeomorphic to an open subset of Euclidean half-space:
R3+ = {(x1 , x2 , x3 ) ∈ R3 : x3 ≥ 0}.
measurand A measurable property of the monitored region; usually a real, scalar value.
metric space A set
X
paired with a distance function
d.
multicast A message is transmitted to multiple nodes within communication range.
mutual exclusion A network state in which only one process is executing its critical section (of code) at any given time.
near 3-manifold with boundary A 3-manifold with boundary with measure zero singularities.
near surface A surface with one or more pinches and crimps
xxiii
neighborhood An open set of the universal space, containing the point in question.
neighborhood component A contiguous sequence of non-zero values in the neighborhood ring of a node
neighborhood ring Cyclic data structure stored at a node that maintains its neighbors' readings in counterclockwise order.
nerve complex A simplicial complex constructed from an open covering of a space.
occurrence net A unidirectional net where elements of
P
and
T
can occur zero or more times.
open covering A collection of open sets whose union contains the topological space in question.
open set A subset
U
contained in
of
Rn
such that, for each point
p ∈ U,
there is a
n-ball
with center
p,
U.
packaging The materials that protect the electronics of a sensor node.
parallel algorithm Algorithm that is executed by multiple processors on a single machine simultaneously.
path connected A space in which any two points can be connected by a path, contained in the space.
Petri net A triple of places, transitions, and ows.
pinch The reduction of a cycle to a 0-simplex.
xxiv
pinched sphere A sphere,
S 2 , in which an entire cycle on its surface has been identied with a point.
n-pinched sphere A sphere,
S 2,
in which
n
non-intersecting cycles, each of which has been identied
with a point, distinct from the identied point of any of the other
(n − 1)
cycles.
pinched torus A torus,
S 1 × S 1 , such that a transverse non-bounding cycle has been identied with
a point.
n-pinched torus A torus,
S 1 × S 1,
with
n
non-intersecting transverse non-bounding cycles, each of
which has been identied with a point, distinct from the identied point of any of the other
(n − 1)
cycles.
place An element of
P
from a Petri net
point-set topology Area of topology that generalizes concepts from calculus, such as continuity.
postset Preconditions of a place or transition
preset Postconditions of a place or transition
process A device, such as a network node, that has a processor.
progress Enabling without conict of a transition
t.
remainder Section of code a node executes during normal operation.
xxv
rips complex A simplicial complex constructed from a point set.
safety A property that ensures only one process is in its critical section at any given time.
serial algorithm Algorithm that is executed one step at a time on a single processor.
(spatial) scalar eld A function
d∈D
r
with spatial domain
is assigned a scalar value
D
and scalar codomain such that every point
r(d).
sensor node A micro-computing device equipped with a transceiver and one or more sensors.
j-simplex The unique convex hull of a set of
j+1
geometrically independent points
j-simplex component A maximal
j -simplex
connected subset of a simplicial complex
j-simplex connected A simplicial complex
K
if, for any two points
simplices
(c1 , c2 , . . . , cr ),
common,
a ∈ c1 ,
and
a, b ∈ K 0 , there is a sequence of (j +1)-
such that: adjacent
(j + 1)-simplices
have a
j -simplex
in
b ∈ cr .
simplex connectivity numbers The number of
j -simplex
components,
gj ,
for each
j ∈ {0, 1, 2, . . .}
simply connected A space where any cyclic path can be continuously deformed to a point, with the entire deformation occurring in the space.
singularity A point
s
in a space
X
if there exists a neighborhood
weakly connected.
xxvi
U
of
s
such that
X∩U
is
spectral sequence Generalizes an exact sequence and allows the homology groups of a space to be computed through successive approximations.
(n-)sphere Given a xed point
c,
the set of points in
Rn+1
that are a distance
r
from
c.
state A set of places from
P
of a Petri net
strongly connected A space
X
a
such that
and
b,
such that for any two points
P ⊆X
and
a, b ∈ X ,
P − {a, b}
there exists a path
P
connecting
does not lie on the boundary of
X.
surface A Hausdor space in which every point has a neighborhood homeomorphic to an open subset of the Euclidean plane
E 2.
tiling A regular tessellation of the plane
topological event Occurs when there is no homeomorphism between two time steps of a space
topology The study of non-metric properties of mathematically-dened spaces
topology control A set of protocol/techniques used to achieve ecient routing and processing in distributed networks.
torus The Cartesian product of two 1-spheres (or circles)
transition An element of
T
of a Petri net
xxvii
unicast A message is transmitted to a single node within communication range
Voronoi cell Relative to point in
p
in point set
P,
the set of points closer to
p
than any other point
P − {p}.
Voronoi diagram Relative to a point set
P,
the collection of all Voronoi cells of
P
weakly connected A space that is not strongly connected.
wireless sensor network (WSN) A spatially distributed collection of autonomous sensor nodes, usually deployed for a specic monitoring purpose.
xxviii
LIST OF NOTATION Bj (K)
- set of all
j -cycles
that are
j -boundaries,
Cj (K)
- set of all
j -chains
of a complex
×
- Cartesian product (of two sets)
D
- letter reserved for a spatial domain
or
Im(∂j+1 )
K
D0
- set of points in
D
with scalar values below the threshold
D1
- set of points in
D
with scalar values above the threshold
∂j e
- boundary operator carrying
j -chains
to
(j − 1)-chains
- set of edges of a simplicial complex
E
- number of edges of a simplicial complex
Ej (K)
- incidence matrix between
|Ej (K)|
j -simplices
- rank of the incidence matrix
and
(j − 1)-simplices
Ej (K)
∈
- is an element of
f
- set of faces of a simplicial complex
F
- set of ow relations of a Petri net OR number of faces of a simplicial complex
gj (K)
- number of
hj (K) - j th Hj (K) - j th hf
components
Betti number of a complex
K,
homology group of a complex
or the rank of
K,
Hj (K)
or the quotient group
Zj (K)/Bj (K)
- set of hyperfaces of a simplicial complex
HF K
j -simplex
- number of hyperfaces of a simplicial complex
- a simplicial complex
K
K0
- subgraph of
K
induced by
N0
K1
- subgraph of
K
induced by
N1
Ker(∂j )
- set of all
Im(∂j+1 )
j -chains
- set of all
(in
K)
(j + 1)-chains
where (in
K)
∂j = 0 that yields a
xxix
j -chain
in
K
under
∂j
N
- set of nodes in a WSN
N0
- set
N,
restricted to nodes with sensor value below the threshold
N1
- set
N,
restricted to nodes with sensor value above the threshold
O(•) P
- worse case asymptotic complexity of an algorithmic process
- set of places of a Petri net OR notation for a point set
∅
- empty or null set
r
- letter reserved for a scalar eld (function)
R
- set of real numbers, or 1-dimensional real space
Rn s
- Cartesian product of
R
with itself
n
times, i.e. n-dimensional real space
- a singularity in a topological space OR the number of singularities associated
with a topological space
Sn
- n-dimensional sphere
Σ
- a Petri net
Σ
- incidence matrix of Petri net
Σnj=i f (j)
- sum of the terms
f (j),
Σ for all integers
⊂
- is a proper subset of
⊆
- is a subset of
T
- set of transitions of a Petri net
∪
- union of
v
- set of vertices of a simplicial complex
V
i≤j≤n
- Voronoi diagram (corresponding to the node set
N)
OR number of vertices a
simplicial complex
Vn
- Voronoi cell corresponding to point (or node)
Zj (K) Z
- set of all
j -cycles
n
that are non-bounding, or
- set of integers
xxx
(of the node set
Ker(∂j )
N)
Chapter 1 INTRODUCTION A wireless sensor network (WSN) is comprised of sensor nodes, tiny untethered computing devices, each equipped with one or more custom or o-the-shelf sensors. Over the past decade, prototype WSNs have been deployed to monitor avian habitats [45], [64], volcanoes [62], [71], coal mines [40], and water pipelines [63]. If properly designed, a WSN can be robust, self-organizing, scalable, and energy-ecient [30]. As sensor node costs decrease and WSN power management improves, large-scale, long-term WSN deployments become feasible, oering users unprecedented access to real-time, high resolution environmental data [29], [61]. The main purpose of this dissertation is to develop a novel, distributed event detection algorithm using tools from topology. In response to previous research in the eld, this algorithm extends beyond the assumption of a 2d WSN deployment to include 3d WSN deployments, thereby enabling a multitude of new monitoring scenarios. The eld of topology oers mathematical techniques to identify non-metric properties of a space, and to determine whether two spaces are equivalent relative to their non-metric properties. If a space evolves over time, its present and past states can be compared in the same way two dierent spaces would be compared. Thus, the topological evolution of a space is computable. Translating such computations to a distributed WSN environment presents a few challenges, including substituting intensive linear algebra computations with more manageable ones and localizing global computations. The Yellowstone Forest Fires of 1988 spanned 1.4 million acres over 3 months. Figure 1.1 presents three chronological frames of the Yellowstone Forest Fires from
th August 16 to September
16th .
The frames were developed by the Scientic Visu-
1
accretion appearance
self-merge
merge
Figure 1.1. Yellowstone forest res of 1988. Three frames of the Yellowstone forest res of 1988, spanning one month, where colored regions distinguish between the progressions of independent res. This research addresses some of the changes these res underwent, as shown above.
alization Studio at NASA's Goddard Space Flight Center [52]. The renderings were not created from WSN data - the technology was not yet available - but from a combination of infrared images and lookout data. This technique has three shortcomings specic to forest re monitoring. First, infrared images were taken exclusively at night, which implies constrained temporal sampling, and a signicant lag time between the physical evolution of the res and the processing and interpretation of the corresponding images. Second, line of sight and satellite data will fail to capture a re's progression in certain instances, e.g. below a forest's canopy. Third, while the re occurs over three spatial dimensions, it is mainly captured as a phenomenon of two spatial dimensions. This is a distinct limitation since a crawling re, a re that spreads mainly through low level vegetation, has a dierent rate of propagation than a crowning re, a re that spreads mainly through the forest canopy. In the more general monitoring setting, another shortcoming arises: what if a phenomenon oers few or no visual cues, as in the case of a clear poisonous gas, such as carbon monoxide? This or any other sensing technique based on image data would be ineective.
A WSN is believed to mitigate these shortcomings, and others, which
motivates its use as a monitoring paradigm.
2
In the gure, regions are colored to distinguish between the progressions of independent res, e.g., the dark brown region represents the spread of the North Fork Fire. The three frames reveal a number of changes the res underwent, including appearance (of a new re), merge (of two or more existing res), accretion (of an existing re), and self-merge (of an existing re), or the merge of a re with itself. Knowledge of these simple events, along with location information, could prove valuable to emergency management teams. For example, the merging of two res could block an existing evacuation route, thereby requiring a new evacuation route to be identied. In the case of a 3d deployment, it is possible that particular topological events, e.g. the merging of a crawling re with a crowning re, will signal a physical phenomenon, such as a sudden increase in propagation rate. With such applications in mind, this research focuses on detecting events like those in Figure 1.1 for 2d and 3d WSN deployments. Attention for the most part is restricted to
incremental events, events arising from the change of a single node's sensor reading between two consecutive states of network operation, though the algorithm is tested against
non-incremental events,
events arising from the change of multiple node's
sensor readings between two consecutive states of network operation, via simulation. The remainder of Chapter 1 outlines the monitoring paradigm; introduces concepts from the elds of WSNs, topology, and distributed algorithms; states the goals, hypothesis, scope, major results, intended audience of this research; and summarizes the organization of Chapters 2-7.
1.1 Monitoring Environmental Phenomena The design of a WSN environmental monitoring system requires the answers to numerous questions, a few of which are: What is the phenomenon being monitored? What are the corresponding
measurands, measurable properties such as humidity or
3
chemical concentration, associated with the phenomenon? For what range of values does a measurand indicate the likely presence of the phenomenon?
For example,
if a researcher is interested in monitoring forest res, two candidate measurands are temperature and light intensity. Rather than a critical range with a maximum and minimum, it is more likely that a minimum value exists for each of the two measurands: a threshold above which the presence of re is likely. This threshold can be utilized to lessen the overall data load on the network. In particular, rather than maintaining precise sensor readings, e.g.
193.7o F ,
each sensor reading is discretized
relative to the threshold. Relative to a threshold of
193.7o F
would store the value
the value
1.
200o F , a node with sensor value
0 while a node with sensor value 200.4o F
would store
By working with single bits, communication and processing costs can
be reduced. Furthermore, the representation of the monitored region is simplied from a continuous range of scalar values to a discrete set of objects. The spaces of interest are those objects of high measurand concentration relative to threshold: it is their topological properties and topological events that will be computed. When we speak of 2d WSN and 3d WSN deployments, we mean the following. A 2d WSN deployment involves a deployment of sensor nodes over a region that is nearly planar, or planar from the perspective of the monitoring application. For example, a collection of sensor nodes deployed at various locations on the ground of a blueberry barren will be considered a 2d deployment, though variations in the ground's height will lead to inevitable deviations from a theoretically true 2d deployment, regardless of whether we think of that as a subset of the Euclidean plane,
E2 ,
a subset of the sphere,
S2 ,
or some more complex 2d surface. Still, these
variations are small enough to conceive of the deployment as 2d, much in the same way that the illustration of a point can be conceived as a theoretical point. A 3d WSN deployment by contrast is not merely a 3d space that could be approximated by a 2d one. It involves a deployment of sensor nodes over a region that requires three
4
spatial dimensions to fully describe. For example, consider a net of buoys cast into the ocean to monitor an oil spill event, where for each buoy, a collection of sensor nodes is tethered together, oering sampling every meter from the ocean's surface to 10 meters below the surface.
The region being monitored is a fully 3d space
that cannot be approximated as a 2d space without potentially losing signicant information.
1.2 Wireless Sensor Networks Informatics
Hardware
Networking
Figure 1.2.
Three facets of WSN design.
The three facets of WSN application
design, hardware, networking, and informatics
The three primary facets of WSN application design are: hardware, networking, and informatics (Figure 1.2).
Hardware includes the communication transceiver,
the power supply, the sensors, the processor, and the packaging, while networking includes all activities related to passing data through the WSN via communication packets. Informatics includes, but is not limited to, translating computational results into rich, human understandable output for the user. The Open Systems Interconnection (OSI) model is an International Organization for Standardization (ISO) standard that divides a generic communication sys-
5
tem into
7
layers: the physical layer, the data link layer, the network layer, the
transport layer, the session layer, the presentation layer, and the application layer [54]. Each layer is a set of functions that provides services to the layer above it and receives service from the layer below it. For example, the data link layer comprises those functions that support data transfer between nodes in the network. It receives services from the hardware layer, which denes the interaction of a single node with the transmission medium, and provides services to the network layer, which is concerned with routing data from a source node to a destination node in the network. Figure 1.3 represents the OSI model, customized for this research. Functions from the middleware layers, functions concerned with more advanced networking, are not utilized, conserving network resources. By removing the middleware layers, the application layer receives services from the network layer. This pairing is advantageous, since data structures that facilitate routing can be reused to support topology computations. In this research, an application layer event detection algorithm is developed.
This algorithm depends upon and subsumes network layer applications
that compute and maintain the communication graph. Furthermore, extending this application to non-incremental events (See Section 7.3.2) would depend upon and subsume additional applications from the network layer, e.g. hierarchical clustering. As an illustration of the dependency between application/deployment type, the three facets of WSN design, and the OSI model, we explore the scenarios in Figure 1.4.
First, each event has associated measurands.
In some cases, such as Figure
1.4(ii), it may be a single parameter, oil concentration, while in others, e.g. Figure 1.4(v), multiple measurands may be considered, such as temperature, light intensity, and
CO2 concentration.
For each measurand of interest, a sensor must be integrated
into the sensor node. Sensors may be o-the-shelf, e.g. a thermistor to measure temperature, or custom-designed, e.g. E. coli sensors as in [46]. Second, the deployment varies in each case. In Figure 1.4(i), the phenomenon is generally a slowly evolving
6
Middleware
Application
Topological event detection
Presentation Session Transport source Network Data Link
Scalable, robust routing
destination
Medium Access Control (MAC)
hidden node problem A
Hardware
B
C
Wireless RF communication
Figure 1.3. Open Systems Interconnection (OSI) layers. An illustration of the Open Systems Interconnection (OSI) layers. For this research, Data Link and Hardware layers adopt Institute of Electrical and Electronics Engineers (IEEE) 802.15.4 standards [34]. Due to common use of the WSN's communication structure, Network and Application layers are linked.
occurrence, aording the researchers time to deploy a sensor network in a regular, deliberate fashion. In the case of Figure 1.4(ii), sensors would be rapidly deployed and mobile. In the case of Figure 1.4(iv), nodes would need to be integrated directly into the bridge's design, requiring a deployment of high precision. Third, the
packaging,
the material necessary to protect the electronics while
still exposing each sensor to the corresponding measurand, varies with monitoring scenario. Figure 1.4(ii) requires not only waterproof, but also buoyant, packaging [2]. In Figure 1.4(v), a sensor node must be able to withstand high temperatures, with the expectation that exposure to such conditions may be lengthy.
Fourth,
we consider communication between nodes, which may be wired or wireless. Wireless options include radiofrequency (RF), optical, and acoustic. In Figures 1.4(i), 1.4(ii), and 1.4(v), radiofrequency communication is best. In Figure 1.4(iii), optical and acoustic sensors, like those in Figure 1.5 are more eective underwater [68]. Finally, in Figure 1.4(iv), RF or even wired channels would be appropriate communication mechanisms. Fifth, power source depends upon the length and regularity
7
(i) soil erosion in Madagascar
(ii) oil spill off the coast of Spain
(v) forest fire in California
(iv) Tacoma Narrows failure Figure 1.4.
(iii) E. coli outbreak
Examples of environmental phenomena. A few examples of geographic
phenomena that have social, political, and economic impact.
Each phenomenon
places unique demands on the monitoring system and therefore establishes prerequisites for WSN design.
of deployment, and environmental conditions. In Figure 1.4(i), each node could be tted with a solar cell.
In Figures 1.4(ii) and 1.4(v), nodes may be powered by
cadmium or lithium batteries. In Figures 1.4(iii) and 1.4(iv), power may be a part of the water system's or bridge's internal grid.
Figure 1.5. Sensor nodes for underwater applications [68]. Static and mobile sensor nodes designed for underwater WSN applications [68].
8
Sixth, power supplies and communication hardware govern decisions for the data link and routing layers of the OSI model [73].
Hence, 1.4(v) may lend itself to a
lightweight communication standard, such as Zigbee (802.15.4), while 1.4(iv) may require higher data throughput (to precisely compute stress/strain associated with the bridge) such as the Bluetooth standard [73]. Seventh, the algorithms written at the application layer will depend upon the deployment environment[44]. In Figure 1.4(iv), each node's position is known and therefore, it is possible to execute data ow with node proximity in mind. In Figure 1.4(ii), the relative position between nodes will not remain constant, and therefore, protocol would need to be drift tolerant, i.e. to account for frequent changes in network topology [53]. TinyOS is an open source, component-based, embedded operating system designed for low-power wireless devices, such as sensor nodes [66].
In addition to
providing a programming environment for sensor nodes, TinyOS denes interface standards between sensor nodes and computers used to set up the WSN and/or analyze the network's performance. TinyOS's components are written in an extension of C, Network Embedded Systems C (nesC), a language that supports concurrency and asynchronous execution through modularity [30]. Gay et al. present distributed software design patterns that facilitate the understanding, and use of, TinyOS, allowing researchers the ability to more quickly estimate computational costs associated with network operation in dierent application scenarios [29]. We employ TinyOS in a testbed deployment to validate formal bounds obtained for message complexity, and to conrm that the algorithm can correctly perform in a true distributed environment.
9
1.3 Topology Topology
grew out of and generalized the study of Euclidean space and contin-
uous functions applied to such spaces [50].
Its primary goals are to identify the
family of non-metric (topological from here on) properties that can be associated with a space, to prove inherent relationships between these topological properties, and to determine the equivalence classes of spaces, conditioned on some subset of the family of topological properties. This research makes use of topology in two distinct ways: as a formal model and as a computational tool. In the former, topology is used to capture the salient features of a space and to identify how the space has changed over time. In the latter, concepts from computer science are used to translate topology into a computing environment, as in [6], [12], [10].
time Figure 1.6. Examples of incremental events. An illustration of a WSN as it monitors an evolving scalar eld over four time steps. Red circles highlight changes that the WSN can detect.
By integrating formal and computational aspects of topology, event detection becomes possible. Figure 1.6 illustrates a 2d WSN deployment at four points in time. In each frame, the blue region represents areal objects of high measurand concentration. It could, for example, represent the progression of one or more independent forest res, as in Figure 1.1. Topological changes to this region are indicated by red circles. From left to right, we have the following topological events: the formation
10
of a hole; the splitting of two regions, and again, the formation of a hole.
First,
notice that the rst and third events, though both result in hole formation, are not the same. The rst event results from two tendrils of the region connecting, thereby capturing an area of low activity, while the third event results from a puncture that has grown from within the region. Second, every event results from the change of status of a single sensor node. This has been dened in [25] as an
incremental event
and will be the basis of the development in this research. Since the word event is overloaded in the literature, it is worth pausing to dierentiate between the types of events under investigation in this dissertation. An
environmental event
is a change in the phenomenon being monitored.
This
event may or may not be detected by the sensor network i.e. it is independent of observation and may be a complex or simple change over varying scales in time and space. As previously dened, an incremental event is a WSN-based event. It occurs when a single sensor node of a WSN changes status between two steps of network operation. An incremental event is always triggered by an environmental event. A topological event occurs when a topological property changes between the start state and nal state of a space. In this research, a topological event arises from specic changes to the Booleanized scalar eld, a representation of an environmental event, and is detected by a topological change in that part of the graph structure of the WSN approximating the Booleanized scalar eld, also a topological event. Finally, connectivity events are specic, topological events. Details of each type are presented in Chapter 3. When the context is clear, we simply use the word event.
1.4 Distributed Systems The concepts that follow can be found in [65].
A
distributed system
consists
of multiple networked machines, executing tasks through a combination of inter-
11
nal processing and coordinated communication.
Three key assumptions in many
other computing environments cannot be made in a distributed system: the presence of a global clock, knowledge of global state, and determinism of execution. A
distributed algorithm
is an algorithm that solves a problem using a distributed
system. To deployment of a distributed algorithm requires the solution to the following distributed-control problems: broadcasting and synchronization, election, termination detection, resource allocation, mutual exclusion, deadlock detection and resolution, and distributed data/le maintenance. In simpler terms, a distributed algorithm needs to have: a message passing scheme, a method to designate which node executes tasks, knowledge that a computation has concluded, identifying required resources/data held by an a priori unknown node, sharing a resource that can be used by one node at a time, preventing indenite wait cycles between two or more nodes, and ensuring that nodes have a consistent and correct view of the data they request. A distributed system is called
decentralized
if each node in the
network has the same code. Specically, no node has special rights that any other node in the network could not achieve through some election method. A
centralized
system generally has a node that is a designated leader throughout operation. An algorithm which solves a problem in one computing environment may not work in the other two computing environments. Even if it does, properties of the algorithm, such as optimal time complexity, do not in general carry over.
If an
algorithm can be easily adapted for the serial, parallel, or distributed environments, it is said to serialize, parallelize, or distribute, respectively.
Given the state of
research to date in homology theory, there is no evidence that serial algorithms in this eld parallelize or distribute [10].
A key component of this dissertation
is to discover a distributed, decentralized homology algorithm that exploits the underpinnings of the centralized methods in this eld. The reason for a distributed, decentralized system approach (simply decentralized from here on) is the context of
12
the application. We expect the monitored phenomenon to undergo periods of change and to present a degree of unpredictability and want a monitoring system that is exible to such changes.
Under harsh environmental conditions, node failure is
possible, and the consequent need to replace failed nodes with new ones in real time. It may also be desirable to add nodes to the network in certain regions where node failure has not occurred but an increase monitoring resolution is required. With such rapid changes, a centralized network is prone to a single point of failure. In addition to deployment/network adaptability, conserving network resources is a priority. To do so, we try to task nodes that are near changes in the monitored environment. While this is possible if the network is decentralized, a centralized system requires communication to and from the leader node, regardless of the distance from the environmental event.
1.5 Goals and Hypothesis The goal of this research is to detect and track topological events related to dynamic geographic phenomena through distributed algorithms embedded in wireless sensor networks (WSNs). In contrast to previous work, which is limited to 2d WSN deployments, this event detection model addresses both 2d and 3d WSN deployments. If achieved, it is believed that the scope and quality of environmental monitoring will improve. The algorithm is developed to support 2d and 3d node deployments, and is evaluated to conrm correctness and localization of computation, as well as various complexity measures. 2d events under consideration are: appearance and disappearance; split and merge; hole formation and hole loss; self-split and self-merge; and singularity formation and singularity loss. Given a deployment of a nite set of sensor nodes, these topological events can be composed to build all other topological events, as will be shown in Chapter 3. 3d events under consideration in-
13
clude all events listed above along with cavity formation and cavity loss. Additional computational tools required for 3d deployments are developed in Chapter 4. The hypothesis is:
A WSN can successfully identify
connectivity events
, the topological
events of interest in this research, through a distributed algorithm. By exploiting the foundation of homology theory, the developed algorithm supports localized event detection for both 2d and 3d deployments. To test the hypothesis, the following evaluation methods are proposed:
1. An algorithm detects topological events
successfully
if formal models can con-
rm its correctness and the algorithm identies each event type in simulation and/or testbed environments.
2. The
computational expense
of the algorithm (during event detection) will be
determined using a combination of time, message, and storage complexity through formal models, WSN simulation, and/or testbed environments.
3. An algorithm's computations are
localized if the number of nodes participating
in the computation is proportional to the size of the event being monitored. This will be evaluated through formal models and WSN testbed deployments.
1.6 Scope of Dissertation This dissertation focuses on detecting topological events by developing a distributed algorithm intended for environmentally deployed WSNs. The algorithm is designed for the application layer of the OSI, subsuming existing applications/functions from the network layer of the OSI. To formalize this process, constraints are set in each of the following areas: WSN deployment, node behavior, and dynamic scalar elds.
14
The actual placement of nodes into the environment is not considered in the formal models, simulations, or testbed deployments.
All sensor nodes are static.
The geometry of the deployment, i.e. the positions of the deployed sensor nodes, is incorporated into the research. The primary communication graph structure used in this research is a Delaunay triangulation for 2d deployments and a Delaunay tetrahedization for 3d deployments.
While this is not necessary, it simplies the
development of the algorithm. For the 2d case, the algorithm is evaluated using a less cost intensive communication graph as well (See Section 6.1.4). In the formal models and simulations, sensor nodes are assumed to sense the underlying measurand with complete precision and accuracy and wireless communication is error free.
Battery depletion and node failure are not modeled.
It is
assumed that a node knows the local relationships of the communication graph. In the testbed, sensor nodes are programmed to detect variations in light intensity based on low and high sensor thresholds. These thresholds create a range that is broader than the range of ambient light in the laboratory.
During testbed de-
ployments, communication error does arise, but it is not systematically evaluated. Battery depletion and node failure are not incorporated. In simulation and formal models, the scalar elds are modeled relative to sensor threshold: the simulated scalar eld is already a nite collection of areal objects. The temporal scale of changes to the areal objects are assumed to be commensurate with the sampling rate of the sensor nodes.
The spatial scale of changes to the
areal objects ensures that a small subset of nodes in the WSN will report changes in sensor status. So, for example, the case in which every node in the WSN changes sensor status relative to threshold will not be investigated. In the testbed, the scalar eld changes by exposing a node to high intensity light or by covering a node's light sensor, resulting in a reduction in light.
15
1.7 Approach Since the main goal is to establish a distributed event detection algorithm that can be applied in 2d or 3d WSN deployments, we approach our goal by rst establishing formal models, validating components of these models through mathematical and/or formal proofs, and relying on simulation models and testbed deployments to cross-validate some aspects of the formal models, and to validate other aspects of the model which were best left to computer evaluation. For the formal development, we begin with the foundation of homology theory, a eld of algebraic topology, identify computations that will allow us to track topological changes, and seek mechanisms to distribute these centralized processes. In particular, from the WSN, we look for a natural graph structure that acts as a valid input for the tools of algebraic topology and for which we are ensured successful detection of change.
With the graph structure in place, we then seek to replace
intensive algebraic computations with node-level data observations.
The purpose
of these substitutions is twofold: to make calculations at each sensor node more manageable and to ensure local changes can be computed without tasking the entire network.
After the formal model has been constructed, we analyze the time
complexity of the algorithm. Simulation models are used to conrm the algorithm's correctness and the time complexity of the algorithm for both 2d and 3d WSN deployments. Further, through simulation, we can evaluate the algorithm for planar communication graphs of varying sparsity. Simulation runs allow for easy changes in deployment type, deployment size, and deployment dimension. Further, through a simulation, the nature and complexity of the simulated scalar eld can be modied in a graphics software package in a small amount of time.
16
For time reasons and the challenges inherent to setting up a 3d WSN deployment, testbed evaluation is limited to 2d WSN deployments.
Testbed deployments are
conducted: as a proof of concept to determine if the algorithm computes events correctly in a true distributed environment; and to determine message complexity, which is executed by counting the number and type of transmitted and received packets, where each packet type is a known number of bytes. No single evaluation method is comprehensive but when taken as a whole, the three contribute to the overall validation of the distributed algorithm presented in this dissertation.
1.8 Major Results The major results of this research are:
1. This is the rst topological event detection model for 3d WSN deployments.
2. This is the rst distributed homology algorithm developed.
3. The algorithm can compute an incremental event associated with a region comprising
n
nodes in
O(n)
time, using
O(n)
storage, and
O(n)
data passed
via messages for all connectivity events.
4. Nodes more than 1 hop from the component undergoing change do not participate in the computation for all 2d cases and all but 2 3d cases.
5. The detection of singularities is demonstrated.
1.9 Intended Audience This dissertation is intended for computer scientists that are familiar with computational topology, geographic information scientists interested in environmental
17
monitoring advances, and electrical and computer engineers interested in WSN applications. The rst group may be interested to note the dierences between currently existing centralized topology algorithms and the distributed topology algorithm developed in this work.
Furthermore, the work extends to 3d events in a
natural, computationally light manner.The second group may be able to enhance remote sensing by incorporating close-range data [67], and begin to conduct remote sensing over 3d geographic regions. Finally, the third group may nd the testbed deployment of interest.
1.10 Organization of Remaining Chapters The remainder of this dissertation is organized into the following six chapters. Chapter 2 presents the prerequisites necessary to understand the core of this research, citing relevant literature along the way. Core areas include the continuous scalar eld, WSNs, topological properties and events of interest, homology theory, and previous event detection techniques. Chapters 3 provides the foundation for detecting topological properties and events. All formal models developed in this chapter apply equally well to the extensions to 3d deployments in Chapters 4 and 5, though 2d deployments are often used to illustrate general concepts. Chapter 4 develops the foundation for the 3d network graph algorithm.
This
includes required homology computations and the denitions and development of network-level topological primitives that support distributing the homology computations. Chapter 5 presents the 2d and 3d algorithms, along with time complexity analysis.
18
Chapter 6 covers the experimental results, including assumptions about the simulation environment, variables captured to test the hypothesis, and the corresponding discussion of the simulations. Chapter 7 establishes whether the hypothesis has been accepted or rejected, identies novel ndings related to this research, and indicates future work. Finally, the appendices cover proofs that are withheld from the body of the text, code from the testbed deployment, a supplementary simulation evaluation of the algorithm for sparse node deployments, and additional testbed results.
19
Chapter 2 BACKGROUND 2.1 Topology and Topological Properties The areas of topology that support this research are
braic topology.
point-set topology
and
alge-
The former extends and generalizes the concepts of continuity and
connectedness, as addressed in metric spaces and calculus, while the latter applies algebraic concepts to capture topological properties of a space [33]. The concepts presented in this section can be found in, e.g. [33] and [51]. Two spaces are said to be
homeomorphic
if there exists a continuous bijective function
with continuous inverse between them. This function is called a If two spaces possessed by
A B
cal) invariants. properties of
A
and
B
are homeomorphic, then any
and conversely.
homeomorphism.
topological property
These properties are commonly called
If the spaces are not must not hold for
homeomorphic,
B.
of
A
is
(topologi-
then one or more topological
Topological properties of interest are now
dened: A (topological) space
X in Rn is connected
if it cannot be expressed as the disjoint
union of two or more nonempty open spaces and is disconnected otherwise. A space
path connected
X
is
a
and
b
such that
if, for any two points
P ⊆ X.
a, b ∈ X ,
there is a path
P
connecting
For the spaces in this research (and non-pathological
spaces), connected and path connected are equivalent, so the term path connected will not be used. called
If a space is disconnected, it has maximal connected subsets,
connected components,
or simply
components. X
is
strongly connected
connecting
a
and
be assessed as a connected space. A space points
a, b ∈ X ,
there is a path
P
Each component can in turn
20
b
if, for any two
that lies entirely in
X,
and
every point in
P − {a, b}
connected, then it is are
weakly connected.
strongly connected components.
C
in
X
in
X.
X
has a
X
Analogous to connected components, there
A space
X
U
and
above. Space
U
is
simply connected
of
s
such that
Space
W
Space
X
Alternatively,
X ∩U
U, V , W ,
is disconnected: its components
connected. Space
V
U1
if any cyclic path
holes.
A
s
is a singularity if
is weakly connected. Referring and and
X
according to the terms
U2
are strongly and simply
is strongly connected but not simply connected, with 4 holes.
is simply connected but not strongly connected. is strongly connected - a path such as
P1
It has one singularity.
can be used in lieu of a path such
- but not simply connected: it has one hole.
X
has one singularity, lying on
P2 .
a
V
U1 a
U
X
X − {s}.
to Figure 2.1, we can classify the spaces
path
is not strongly
singularity s if the number of connected components or the number
there exists a neighborhood
P2
X
is not simply connected, then it must have one or more
of holes is dierent between
as
If
can be continuously deformed to a point, and this entire process can occur
If a space
space
X.
does not lie on the boundary of
P
a
W
b
a
P P
U2
b (i)
Figure 2.1.
W , and X
b (iv)
Illustrations of types of connectivity of interest. Sample spaces
P
is the path that connects
a singularity, if one exists.
21
U, V ,
a and b are reprethem, and s represents
illustrate varying degrees of connectedness. In (i)-(iv),
sentative points in each space,
s
P1
b (iii)
(ii)
P2
X
s
2.2 Homology Theory and the Betti Numbers In Figure 2.2, four dierent topological spaces are represented, the sphere, the pinched sphere, the torus, and the pinched torus.
The formal tools of homology
can be used to distinguish between all four of these spaces. These tools classify a subspace of each
Rn
by identifying properties of
k from 0 to n.
A,
that any
1-cycles indicate?
separating it from region
1-cycle
associated with this space, for
In Figure 2.2, the red ellipses are representative
of the spaces. What do these region
k -cycles
will separate the
B.
1-cycles for each
In Figure 2.2(i), the
1-cycle bounds
It should not be dicult to convince oneself
2-sphere
into two regions.
1-cycles
have the same
eect on the space in Figure 2.2(ii), as can be seen by the representative that separates regions
C
and
D.
For the torus in Figure 2.2(iii), neither
shown separates the torus into two regions. In fact, both torus into two or more regions: regions
E
and
in Figure 2.2(iv) behaves dierently: neither the pair does in fact divide the space.
H
F
1-cycles
1-cycle 1-cycle
do not divide the
are actually the same. The space
1-cycle
divides it into two regions, but
Thus, with both
1-cycles
in place,
G
and
are distinct regions because no path exists between them that does not cross at
least one of the 1-cycles. By including dierences between the nature of 2-cycles for the four topological spaces, any two can be distinguished.
C
G
E
A B D (i)
Figure 2.2.
H
F
(ii)
(iii)
Cycles and boundaries as a homology tool.
(iv)
Illustration of the rela-
tionship between cycles and boundaries on surfaces and near surfaces. circles/ellipses represent cycles.
22
Here, red
In the sections that follow, the history of homology, prerequisite concepts and relevant applications to date are presented. These concepts are used in the development in Chapter 4.
2.2.1 History From the time that homeomorphism was dened, topologists have acknowledged that proving two spaces are not homeomorphic is in general challenging [50]. Rather than prove that no homeomorphism can be constructed through abstract arguments, it is usually simpler to make use of a topological property, invariant, one space has but the other does not. The use of computable invariants was implicitly conceived in the work of Betti around 1871 [7]. This was the origin of homology theory, and would eventually lead to the corresponding
homology groups.
Interestingly, Betti
himself could not prove that the homology groups were invariants. This was accomplished by Poincare ´ [55]. Poincare´ also developed singular homology theory, and the
fundamental group,
which is by denition an invariant and marked the beginning
of homotopy theory [56]. Brouwer converted Poincare ´'s abstract singular homology into the language of simplicial homology [8]. Algebraist Noether was responsible for revitalizing the group-theoretic approach to homology theory and homotopy theory [1], which led to a sounder foundation for the two elds. Though homology groups are less rened than the corresponding
homotopy groups
(the natural extension of
the fundamental group) [3], they have proven their value through relative computational ease. Here, ease is used in the mathematical sense, not the algorithmic sense, i.e.
computations were ensured but low asymptotic complexities were not.
A formal work-around to the traditionally high computational complexity will be provided in Chapters 4 and 5.
23
1-simplex 2-simplex
invalid by (1)
invalid by (2)
0-simplex
(ii)
(i) Figure 2.3.
(iii)
Valid simplices and invalid complexes.
2.2.2 Prerequisite Concepts The concepts presented in this subsection can be found in, e.g. [1], [70], [69]. Let an
oriented j-simplex (j -simplex from now on), spanned by points {v0 , v1 , ..., vj }, be
the set of points each
ti ≥ 0.
A
x ∈ Rn
j -simplex
such that: (1) is denoted
A simplicial complex
K
K, σ ∩ γ
is in
K
Rn
in
every face (sub-simplex) of a simplex in
i=0 ti vi , and (2)
[v0 , v1 , ..., vj ]
set in question. Figure 2.3(i) illustrates three
2-simplex.
∑j
x=
σ
of
∑j
i=0 ti
=1
where
and is the convex hull of the point
0-simplices, three 1-simplices, and one
is a collection of simplices such that: (1)
K
is in
K
and (2) given simplices
σ
and
γ
if it is not empty. Figures 2.3(ii) and 2.3(iii) illustrate collections
of simplices that are not complexes, while Figure 2.4(i) illustrates a valid 2-complex. Let a
gi ∈ G, and
r
j-chain of K be a nite linear combination of j -simplices, the underlying coecient group (Z in this case),
is the number of
complex
K
i.e.
C0 (K)
j -simplices
in
K.
Let
Cj (K)
σi
is a
∑r i=1
j -simplex
be the set of all
is the set of linear combinations of vertices,
and
12v4 v5 − 3v7 v2
are
1-chains,
i.e. elements of
that the former is a cyclic path beginning and ending at traversable path.
24
v4
in
j -chains
C1 (K)
of linear combinations of edges, etc. As examples, in Figure 2.4(i),
v2 v7 + v7 v6 + v6 v4
gi σi , where K,
of a
is the set
v4 v3 − v2 v3 +
C1 (K).
Notice
while the latter is not a
The pair
(Cj (K), +),
abelian group [17]. If
j -chains,
for
that carries
j < 0 or j > n, Cj (K) is the trivial group.
0 ≤ j ≤ n, j -chains
where addition is componentwise for each
to
the
boundary operator
(j − 1)-chains,
∂j (σ) =
j ∑
is a mapping
where for a simplex
j -simplex,
is an
Given the groups of
∂j : Cj (K) → Cj−1 (K)
σ:
[ ] (−1)i v0 , ..., vˆi, ..., vj
(2.1)
i=0 (vˆ i indicates that
vi
ith
has been removed from the
term of the sum.)
Referring to Figure 2.4(i), two sample computations are:
∂2 (v4 v6 v5 ) = v6 v5 − v4 v5 + v4 v6
or
−v5 v6 − v4 v5 − v6 v4
and
∂1 (v6 v4 ) = v4 − v6 . ∂j
a homomorphism [69], and therefore the kernel of
∂j , Ker(∂j ),
∂j+1 , Im(∂j+1 ),
[17]. Elements of
Zj (K),
notated
j -boundaries. always a
are (abelian) subgroups of
while elements of
It is not dicult to see that the
j -cycle
Ker(∂j ),
Im(∂j+1 ), Bj (K),
j -boundary
is the boundary of the 2-chain
v3 v7 + v7 v6 + v6 v4 + v4 v3
However, the 1-chain
a 2-chain. It follows that quotient group,
and the image of
of a
is a
is
1-chain
v3 v2 v7
and also a
1-cycle
but not the boundary of
Im(∂j+1 ) = Bj (K) ⊆ Zj (K) = Ker(∂j )
Hj (K) = Zj (K)/Bj (K),
are called
(j + 1)-chain
but not conversely. For example, in Figure 2.4(i), the
−v2 v3 + v2 v7 − v3 v7
j th
j -cycles
are called
Cj (K)
is
1-cycle.
and therefore the
can be constructed [17]. This is called the
homology group.
So,
Hj (K) represents the set of j -cycles whose binary operation is componentwise
addition (along each relation:
z1 ≡ z2
if
j -simplex)
z1
and
z2
partitioned according to the following equivalence
dier by the boundary of a
referring to Figure 2.4(i), the 1-cycles
v5 v6 − v4 v5 + v4 v3 v4 v6 v5 .
The
(j + 1)-chain
v3 v7 + v7 v6 + v6 v4 + v4 v3
and
[33]. Thus,
v3 v7 + v7 v6 −
are equivalent since they dier by the boundary of the 2-chain,
1-cycles v2 v3 + v3 v7 − v2 v7
and
25
v4 v5 + v5 v6 + v6 v4
are not equivalent
v5 v5
v4v5
v4
v5v4
v4v6v5 v4v3
v5v6
v6v4 v3v7
v7v6
v2v3
v3v4
v6
v7
v2
v7
v3v2v7
v6
v3
v3
v8
v4
v4v5
v4
v4v3
v6 v3
v5 v5v4v5
v8
v3v2 v3v2v3
v2v7
v2v3 v1
v2
v1v2
v1
v2
(i) 2-complex K
v1v2
v1
(ii) 2-cell
(iii) nerve complex
Figure 2.4. A simplicial complex, a cell, and a nerve complex.
to the previous 1-cycles since there is no 2-chain by which they dier. Using the equivalence relation, the rst three homology groups can be interpreted. In the case of
H0 (K), 0-cycles are equivalent if they dier by the boundary of a 1-chain.
a connected region, any two
a
and
b,
there must be a
to extend this to any two and
0-simplices
1-chain
are equivalent, i.e. given two
beginning at
0-cycles
a
and ending at
0-simplices,
It is not dicult
from a connected region [69]. Given two points
c
d belonging to dierent connected components, there is no 1-chain beginning at
c and ending at d.
This argument can be extended to demonstrate that
equivalent only if they belong to the same component. Thus, connectivity of the space the
b.
Within
1-holes
of the
of
2-holes
K, of
K.
Similar arguments reveal that
H1 (K)
like the hole bounded in Figure 2.4(i), while
K,
H0 (K)
0-cycles are
measures the
is a measure of
H2 (K)
is a measure
the cavities within a space. For example, in Figure 2.2, from
left to right, there are
1, 2, 1,
and
1
cavities, respectively.
The entire development thus far relies on simplices and simplicial complexes, and is referred to as simplicial homology.
Figure 2.4(ii) represents a
cell
or
CW
complex from cellular homology. Analogous to simplicial complexes, cellular or CW complexes are built up from
j -cells.
This generalization oers greater exibility,
26
since a simplex is always a (closed) cell but not conversely. Though the details will not be presented, it has been demonstrated that the two formalizations of homology lead to the same results, i.e., given a space, the homology groups will be the same, regardless of whether the space is decomposed using simplicial complexes or cellular complexes [69]. Thus, when a result is easier to demonstrate using cellular homology, this route will be taken.
Figure 2.4(iii) illustrates a
nerve complex,
general, a nerve complex is built up from open sets of an
or nerve.
open covering.
In
In the
gure, the open sets are disks without boundary. In the context of a WSN, for each node, there is an open set corresponding to the node's communication range. It is this connection to WSNs that resulted in the rst application of homology theory in a WSN [31], to be presented shortly. The interpretation of the homology groups does not reveal how event detection will be executed. This will be explained in Chapter 4. Even if the homology groups can be used to interpret topological change, it is not clear how the equivalence classes of
j -cycles
that dier by the boundary of a
(j + 1)-chain
be determined in
a computing environment. No ecient solution has been published, nor is it clear that there exists an ecient solution in any of the computing environments. counter this, the the
j th
Betti numbers
are utilized. The
j th
Betti number is the rank of
homology group [3], and can be obtained through the following equation:
hj = |Cj | − |Ej | − |Ej−1 | Here,
To
Cj
is the set of
between the group, and
j -chains
j -simplices
||
and
(as previously dened),
(j − 1)-simplices,
(2.2)
Ej
is the incidence matrix
with entries from the coecient
returns the rank of the corresponding set. In Figure 2.5, the
incidence matrices are determined for ve dierent spaces, and the Betti numbers
h0 , h1 ,
and
h2 ,
are computed. As an example, in the fourth stage,
27
h1 = |C1 | − |E1 | − |E0 | = 3 − 0 − 2 = 1.
For connected components,
h1
simplies to
the formula:
h1 = −V + E − F + 1
(2.3)
Here, V, E, and F are the counts of vertices, edges, and faces, respectively. Repeating the previous calculation of
h1 = 1.
h0=2 h1=0 h2=0 a c
E0 C0 a b c
C1 ∅ 0 0 0
with Formula 2.3, the same result is obtained,
This reduced formula will be used in the algorithm.
h0=3 h1=0 h2=0 a
b
h1
h0=1 h1=0 h2=0 a
h0=1 h1=1 h2=0 a
y
x
x
c
b E0 C0 a b c
C1 x 1 -1 0
x 1 -1 0
C2 ∅ 0 0
y
x
c
b E0 C0 a b c
b
E 1 C2 C1 ∅ x 0
E1 C1 x y
E 2 C3 C2 ∅ ∅ 0
E 2 C3 C2 ∅ ∅ 0
E 2 C3 C2 ∅ ∅ 0
E0 C0 a b c E1 C1 x y z
x
c
z
C1 y -1 0 1
E 1 C2 C1 ∅ ∅ 0
h0=1 h1=0 h2=0 a
C2 ∅ 0 0 0
b x 1 -1 0
0
E 2 C3 C2 ∅ ∅ 0
C1 y -1 0 1
y
F z
c
z 0 -1 1 E1 C1 x y z
C2 F 1 1 -1
E 2 C3 C2 ∅ F 0
Figure 2.5. Betti numbers of an evolving complex. Five stages of an evolving space, the corresponding incidence matrices, and rst three Betti numbers.
The rst three Betti numbers provide the number of connected components, holes, and cavities of a space, respectively [50]. In the case of 2d event detection, since there are no cavities in a planar graph,
h2
is identically
0
in the planar case.
Furthermore, if the discovery process from [24] is applied, spaces of interest will be connected and therefore,
h0
will identically be
of one connected component. This leaves
h1
an issue which will be resolved in Chapter 4.
28
1,
i.e. each component is comprised
as the remaining event detection tool,
2.2.3 Applications of Homology The use of homology theory as a scientic tool has been reported in a variety of elds including: biology, computer-aided design (CAD), and - like this research sensor networks. Ghrist et. al have investigated two simplicial complex structures, rips and nerves, as a means of identifying coverage of, and gaps in, the communication graph of a WSN [31]. The
C˘ ech
Theorem [50] proves that for compact, convex sets, the topo-
logical properties of the nerve complex,
Nc ,
can be determined from the underlying
simplices [3]. However, without absolute coordinates of the WSN's nodes, this cannot be accomplished.
The
(Vietoris) rips
generation is dependent on the metric function, and
r
3-tuple (P, m, r),
is a xed distance.
rips complex if they are within
r
r
k
where
points from
P
is a point set,
P
form a
units of each other, relative to
network, the associated metric is the of the sensor nodes, and
complex is a simplicial complex whose
m.
m
is a
k -simplex
in a
In the case of a
hop metric, the point set is the set of locations
is related to communication range. It can be computed
without absolute coordinates but this complex does not oer as much topological information. To compensate, two complexes are computed, complex derived from xed distance between two nodes. Analogously,
rw ,
Rw
rs ,
Rs
and
Rw . Rs
is the rips
the maximum distance for a strong signal
is the rips complex derived from xed distance
the maximum distance for a weak signal between two nodes. The authors prove
that
Rs ⊂ Nc ⊂ Rw ,
thereby using two rips complexes to place bounds on the nerve
complex. The authors compute all simplicial complex structures using a centralized approach. Edelsbrunner et al. introduce the concept of topological
persistence
of a space
in [20]. This technique is extended in [21], by reducing topological noise associated with a dataset. To do so, a threshold is set to dierentiate between those topological
29
properties that persist, and those that do not. manifold in
R3 ,
an
ϵ-simplication
manifold which results when
ϵ
The authors prove that, given a
of the manifold can be constructed.
This is a
noise is removed from the original manifold. Figure
2.6(i) provides an example, where the light pink region is the original manifold and the combined light and dark pink regions make up the
ϵ-simplication.
Figure
2.6(ii) indicates that two local maxima are removed as noise, but the centered local maximum is not.
By making simplied manifolds available to researchers, it is
hoped that trends in continuous datasets, such as electron density and temperature distributions, will be revealed.
(i)
(ii)
Figure 2.6. Reducing topological noise [21]. A manifold and its where
ϵ
ϵ-simplication [21],
noise has been removed.
2.2.4 Advances in Eciency Saugata Basu has reported [4] that, in general, computing the complexity of the
lth
Betti number of a complex expressible as
O(n)
bounded polynomials is
O(nl+2 ).
While the technique in this research allows for a graded cost, even the computation of the
0th
Betti number would be prohibitive in a distributed network scenario.
30
In Figure 2.7(i), the nerve complex of a union of disks is illustrated.
As noted
in the review of [31], for convex, compact sets, the nerve complex can be used to determine the topological properties of a space. complex combinatorial object, the
spectral sequence,
For non-convex sets, a more can be used to compute the
Betti numbers. The spectral sequence is a generalization of the nerve complex of the
C˘ ech
Theorem. It entails recursively computing a homology group until a limiting
value arises. Figure 2.7(ii) provides a schematic of a spectral sequence, which can be shown to converge to its limit in nitely many steps. While spectral sequences allow for the analysis of a broader class of spaces, the techniques are perhaps too challenging to be translated into a computing environment algorithm.
(i) nerve complex Figure 2.7.
(ii) spectral sequence
Nerve complex and its spectral sequence [4]. A nerve complex (i) and
schematic of the spectral sequence (ii) [4]
In the less general case, Dey and Guha [15] report on computing the homology groups of complexes in
R3 .
Initially, the homology groups and corresponding
generators are computed for triangulable 3-manifolds. The authors then generalize the work by
thickening
an arbitrary 3-complex to the corresponding homotopic 3-
manifold. Lower computational cost is achieved by limiting the work to a particular
31
class of spaces in
R3 .
Though the algorithms do not translate well to a distributed
environment, many of the techniques could be used to guide this research when the scope is broadened to include more complex 3d deployments. Even less general is the work of Delnado and Edelsbrunner [13], which provides a linear algebra-independent incremental algorithm to compute the Betti numbers of spaces in
S 3.
The authors prove that the algorithm reduces time and storage
complexity over traditional methods.
From a WSN development perspective, the
algorithm is backwards in that the process does not originate from the change of status of a vertex (node) but from the change of a simplicial complex. In Computational Geometry: a Retrospective [10], Chazelle comments that homology theory will earn its value as a mathematical tool when geometric intuition can substitute for linear algebraic computation. Solutions to this problem and others were discussed at an NSF-funded workshop in computational topology [6]. The summarized work in this section has been generated by many of the attendees of the workshop and responds in part to Chazelle's comment.
2.3 WSN Event/Property Detection Techniques Current research in topological event detection using WSNs has focused on the characterization of the WSN's communication graph.
In particular, research has
been conducted in order to ensure the eective routing of messages, even in the presence of holes in the communication graph.
Such holes could be the result of
node failure or insucient node density, illustrated in Figures 2.8(ii) and 2.8(iii), respectively. The emphasis in this research is on the phenomenon. Thus, the detection of a hole or any other topological property is not an assessment of the communication graph's state, but a measure of the evolution of the underlying scalar eld, as in Figure 2.8(i).
32
X X
(i) Hole in scalar field Figure 2.8.
(ii) Node failure
(iii) Hole in distribution
Dierent notions of a hole in a WSN. An illustration of the dierent
types of holes in a WSN: a hole arising due to the underlying scalar eld (i), a hole arising from node failure, and (iii) a hole arising from a gap in node distribution.
In [26], the author uses hop count from designated beacon nodes to identify holes and boundaries in a WSN's communication graph.
Figure 2.9 provides an
overview of the development in this research. In the continuous case, Figure 2.9(i), if there are no obstructions, the set of points equidistant from a beacon node lies on a circle. Natural network boundaries and holes, indicated by the square's perimeter and triangular shapes respectively, aects the distribution in two ways. The rst is that the circle is broken at the boundary or hole, resulting in an arc. The second is that a set of equidistant points becomes distorted when they are hidden from the beacon node by a hole. Given a beacon node in a WSN, each change can be used to identify boundary nodes, as indicated by the light grey nodes in Figure 2.9(ii). With four beacon nodes, the boundary nodes can be more accurately identied, as indicated in Figure 2.9(iii). The algorithm is shown to successfully detect holes in the communication graph in a simulation environment. In follow-up work, hole detection is distributed using a rubber-banding procedure [27]. This research does not address topological properties other than holes and boundaries e.g.
merges,
self-splits. Liu et al.
use a dual-space approach to detect the boundary of a dynamic
spatial event [42]. In Figure 2.10, sensor nodes
P1 -P4
and the event boundary
L
in
the primal space are mapped to lines and a point in the dual space. This collection
33
(i) Continuous ideal Figure 2.9. beacon:
(iii) Boundary nodes
(ii) Discrete WSN case
Routing around network holes in a WSN [26].
Isolines relative to a
(i) in the continuous ideal, using Euclidean distance as the metric and
(ii) in the discrete WSN case, using hop count as the metric.
In (iii), boundary
nodes computed from the results of multiple beacons' discrete isolines are presented. Illustrations from [26].
of lines in the dual space is called an
arrangement
in combinatorial geometry [18].
To discover properties of the arrangement, a topological line sweep is applied. The formal models are evaluated in a small-scale, laboratory-based testbed environment. Due to the high computational complexity associated with the topological line sweep,
O(n2 ),
data collected from sensor nodes in this testbed is passed to a computer,
where computations are executed. Three distributed solutions are proposed in the discussion:
limiting computational cost through clustering, localizing dual-space
data required by nodes, and incremental construction of dual-space. To date, these methods have not been evaluated. Further, this dual-space approach only addresses boundary detection and tracking. In [22], hole detection is researched.
While the paper focuses on holes in the
communication graph, the authors indicate how the algorithm could be used to detect event-related holes. The algorithm makes use of basic theorems from circle geometry to identify
weakly stuck nodes, as in Figure 2.11(i).
With this foundation,
a distributed and decentralized approach is developed that identies the boundary of a hole in a recursive manner (Figure 2.11(ii)). A at routing approach is applied
34
Figure 2.10.
Boundary detection in a WSN [42]. Nodes
P1 -P4
and boundary
L
in
the primal space and dual space [42]
in order to dene and update each hole's boundary, i.e. data is passed via nearest neighbors.
While this may be feasible in maintaining the topology of a slowly
changing communication graph, the topology of the underlying scalar eld is likely to evolve much more rapidly.
This research does not address other topological
properties or events.
(i) Weakly stuck node Figure 2.11.
(i) Traversing a hole
Hole detection in a WSN [22].
A weakly stuck node (i) is used to
detect holes (ii) [22]
Jin and Nittel use an in-network, breakable SNAKE model to update and maintain deformable curves in WSNs. These curves represent the boundaries of dynamic spatial events relative to some measurand and enable detection of the 2d topologi-
35
cal events, splitting and merging [37]. Other events, such as singularity formation, singularity loss, hole formation, hole loss, are not addressed. Jiang and Worboys formalized a framework for topological event detection, representing each stage of the space under investigation as a tree [35].
Between two
states of a space, the corresponding tree representations infer one or more topological events. In later work, Jiang and Worboys embedded the model into a simulation environment and used node data to construct and update the tree representations in a distributed manner [36]. In response to the gap in current research, the work in this dissertation extends event detection to include 3d WSN deployments, which has not been conducted previously. More importantly, many of the aforementioned models do not necessarily lend themselves to the extension to 3d WSN deployments.
By employing homol-
ogy as a foundation, a 3d model is inherently adopted, though this process requires distributing historically centralized, serial algorithms. By including a third spatial dimension, we expect to enable a variety of monitoring scenarios e.g. monitoring the propagation of a toxic plume of gas in a laboratory environment.
The data
structures required to enable 3d deployments (Chapters 4 and 5 add to the memory and communication requirements of nodes in the network, but we show that these requirements still preserve the algorithm's complexity, when compared to a 2d deployment.
2.4 Communication Graph The
Delaunay triangulation
of a point set is the dual of the Voronoi diagram
of the same point set [12]. The Delaunay triangulation is known to be planar and a spanner of the complete Euclidean graph on a point-set [32]. The Delaunay triangulation ensures that greedy routing protocol can deliver a packet between two
36
nodes in the WSN but it is globally dened and therefore, not an ideal candidate as a communication graph of a distributed network. Despite this shortcoming, the Delaunay triangulation is the primary communication graph investigated in this research, mainly for the sake of simplifying simulation and testbed trials. Specically, the MATLAB library has many built-in tools that facilitate evaluation through Delaunay triangulations over other graph models. In light of the diculty associated with distributing the Delaunay triangulation algorithm, Gao et al. propose the
restricted Delaunay graph
nar graph that copes with updates eciently.
(RDG) in [28], a pla-
The authors demonstrate that the
RDG outperforms the relative neighborhood graph (RNG) under greedy perimeter stateless routing (GPSR), an important result, since the RDG is a spanner of the Euclidean graph on a point-set but the RNG is not. Another variant of the Delaunay triangulation that can be constructed locally is the
localized Delaunay triangulation
(LDel) [41]. The LDel is a planar spanner of the unit-disk graph (UDG), containing all edges that are in both the UDG and the Delaunay triangulation of the point set. The LDel can be constructed by
n
nodes in
O(nlogn)
time and is used to conrm
the algorithm (See Section 6.1.4) can detect events in a graph that can be computed and updated through localized algorithms.
2.5 Topology Control Topology control
comprises a set of techniques to conserve network resources.
The book [60] provides a thorough overview of the subject. The three main areas of topology control are: hardware optimization, network structure, and communication paradigm. Belding-Royer investigates multi-level hierarchies, i.e. incorporating tiered clusters with corresponding clusterheads, in order to promote scalable ad hoc routing
37
in [5]. While the tiers impose extra storage requirements on the network, signicant gains in throughput (80%) are achieved over at routing strategies.
A tiered ap-
proach will be discussed in Section 7.3, a proposal to handle non-incremental events in a scalable manner. Royer and Perkins extend Ad-Hoc On-Demand Distance Vector (AODV) routing [58]. In traditional AODV, routes are established through
unicasting, i.e.
messages
are passed from the transmitting node to a single identied receiving node. this work, the authors incorporate
multicasting,
i.e.
In
a transmitting node sends a
message to multiple identied receivers. By using a combination of unicasting and multicasting, the eciency of the authors' extended AODV routing is conrmed through simulations. Duckham et al.
[16] propose methods to dynamically adjust the resolution of
the network by: (1) shutting o nodes and reducing communication links in areas of low activity, and (2) turning on all nodes and increasing communication links in areas of high activity. For example, in Figure 2.12(i), nodes edge/link
ab as a communication channel.
a
and
b
add the
The authors analyze all incremental cases
requiring changes in network resolution. Figure 2.12(ii) illustrates a WSN operating under the algorithm implicit in the authors' work. Topology control is not employed in this dissertation but is discussed in 7.3 for its potential role in extending event detection to non-incremental events.
2.6 Formalizing Distributed Algorithms The development below is from [57]. A the set of places,
T
Petri net is a 3-tuple (P, T, F ), where P
is the set of transitions and
places and transitions, i.e.
F
is
is the set of ow relations between
F ⊆ (P × T ) ∪ (T × P )
As indicated in Figure 2.13,
places are indicated by circles, transitions by squares, and ow relations by directed
38
(i)
(ii)
Figure 2.12. Local changes in network resolution in WSNs [16]. How local changes in network resolution (i) can lead to ecient monitoring (ii) [16]
arcs. Figure 2.13(i) illustrates accepted atomic nets, which require that a transition is followed by a place or vice versa. Given the denition of
F , a place cannot proceed
a place, a transition cannot proceed a transition, and multiple directed relations of the same type cannot link a place to a transition or a transition to a place. Each of these invalid Petri net designs is illustrated in Figure 2.13(ii). A subset of places from
P
preset
is called a
state
and a subset of transitions from
(or preconditions) and
post-set
detached
if
is called an
action.
Two places or transitions
(a• ∪ {a} ∪• a) ∩ (b• ∪ {b} ∪• b) = ∅.
Thus,
a
and
b
a, b ∈ P ∪T
are detached if
their places/transitions, presets, and post-sets have nothing in common.
p∈P
enables t ∈ T
if: (i)
element of the preset of present in
p.
t
•
t⊆p
and (ii)
is present in
The
(or postconditions) of a place or transition
a ∈ P ∪T , are notated • a and a• , respectively. are
T
p
(t• −• t) ∩ p = ∅.
A place
This means (i) every
and (ii) no element of the post-set of
If (i) is satised but (ii) is not, then
p
is in
contact
with
t.
t
is
Contact
indicates that a transition is prevented from occurring due to the presence of a postcondition. If then
p
p
results in a
enables two transitions
conict. 39
t, u ∈ T
and
t
and
u
are not detached,
Relation
Relation
Transition
Relations
Relation
Place
Transition
Transition
Relation Transition
Place
Relation Place
Transition
Place
Relation
Transition
Place
Place
(i) Valid net design
(ii) Invalid net design
Valid and invalid atomic nets. Valid atomic nets from which a Petri
Figure 2.13.
net can be constructed (i) and invalid atomic nets (ii)
Referring to Figure 2.14, we can interpret the schematic of the dining philosophers problem with the denitions thus far.
Ar -Er , which refer to philosophers A-E tively. Places
a0 -a4 , At -Et ,
and philosophers
{a0 , a1 , Ae }
A-E
Ae -Ee
and
The transitions include
Ap -Ep
and
picking up and returning their forks, respec-
A-E
refer to forks 0-4, philosophers
eating, respectively. Thus, for philosopher
thinking,
A to eat, the state
must hold. The net also illustrates logical use of ow relations, e.g. the
ordered actions philosopher returns his/her forks,
Dr ,
D
thinks,
Dt ,
Dp ,
picks up his/her forks
eats,
De ,
and
agrees with the dining philosophers problem statement.
Places and transitions corresponding to adjacent philosophers are not detached. Each of places
At -Et
and
Ae -Ee
enables precisely one transition and therefore does
not result in a state of conict. contact, e.g.
a0
enables
Ap
and
a0 -a4
Each of places
Ep .
So,
a0 -a4
enables two transitions in
result in conict.
The Petri net model in Figure 2.15 represents a token-passing solution to the mutual exclusion problem, restricted to two nodes,
l and r.
The nodes are symmetric
by design but possession of the token, indicated by a lled circle at
availl
asymmetric. The current state of operation indicates that if node
l
via transition critical state,
f,
then transition
criticall .
Node
empty. As a result, node its pending state, granted,
r
pendingr ,
grantedr ,
node
r
r
a
is enabled, allowing node
l
or
enters
requests the token through transition
can proceed to
criticalr
40
waitingr .
is
pendingl
to proceed to its
does not possess the network token, since
and waits for the token at
availr
h
availr
is
after entering
When the token is
via transition
k.
In either case,
Figure 2.14.
Dining philosophers solution validated using Petri nets [57].
A net
model used to prove a valid solution to the dining philosophers problem [57].
when a node exits its critical state, its token is made available via
availl
or
availr
and the node enters its quiet state. This model is similar to the token-passing model adopted for this research (See Section 3.5). For each Petri net model
∑
, the incidence matrix
Σ and place
invariants
can be
determined. The incidence matrix is dened and determined the same way as it is for a simplicial complex. A place invariant is computed from the incidence matrix and identies potential traps. Specically, a vector net
∑
if the dot product
ΣT · i = 0.
i
is a place invariant of a Petri
The incidence matrix and placed invariants
are used to identify properties of the corresponding system. An occurrence net is a nite, acyclic, Petri net and
|t• | ≥ 1.
(P, T, F )
where (i)
∀p ∈ P |• p| ≤ 1,
(ii)
∀t ∈ T |• t| ≥ 1
It represents a system execution of a Petri net model.
For simple
systems, it is possible to enumerate all occurrence nets. For more complex systems however, it is used mainly to identify key representatives of system executions. An occurrence net neglects
progress
of a transition
41
t
if: (i)
t
is enabled by some state
a
Figure 2.15.
Petri net representation of a token-passing solution to mutual exclu-
sion [57]. A net model used to prove a valid token-passing solution to the mutual exclusion problem [57].
and (ii) no state afterward. An occurrence net respects occurs innitely (nitely) often if
fairness
of a transition
t if t
t is enabled innitely (nitely) often, and neglects
fairness otherwise. Finally, given a set of critical sections
p1 , p 2 , . . . pn ⊆ P ,
mutual
exclusion is preserved if for any step of the occurrence net, only one critical section is present. Petri nets that model distributed algorithms are separated into four states of operation: Remainder, Entry, Critical, and Exit. The
remainder
is the section of
code that a node can execute without the need to arrest other nodes in the network. This code will not lead to inconsistency of data if run simultaneously by multiple nodes. The
entry
is the section of code that a node executes when it requires access
to the critical section of code. The The
exit
critical
section of code is as previously dened.
is the section of code in which the critical section can be released. Each
place and transition occurs in precisely one of these four sections. Each ow relation
42
resides in one of the four sections of code, or bridges two sections. By designing the net with these sections in mind, mutual exclusion, starvation-freedom, and correct termination can be formally proved.
43
Chapter 3 INCREMENTAL CHANGE WITHIN A SCALAR FIELD A
(spatiotemporal) scalar eld
is a spatiotemporal region in which every point
has an associated scalar value [16]. Formally, it is a function domain
D×T
and scalar codomain
assigned a unique scalar value
R
r
with spatiotemporal
such that every point
r(d, t) ∈ R.
(d, t) ∈ D × T
This scalar value is tied to a
is
measurand,
a measurable physical property, such as light intensity, chemical concentration, or temperature.
A Boolean scalar eld is a scalar eld in which the codomain is a
two element set.
In this work, a Boolean scalar eld is established by setting a
200o F ),
measurand threshold (e.g. exceeds the threshold and disjoint sets,
0
D = D0 ∪ D1 ,
mapping
(d, t)
to
otherwise. For each time
where
1
if the scalar value at
t, D
(d, t)
can be expressed as two
Di = {d ∈ D | r (d) = i}. D1 ,
that portion of the
scalar eld above threshold, is comprised of zero or more connected components. These components (blue lled contours in Figure 3.1) and the changes they undergo are precisely what this work characterizes. Except for Section 3.4, the development in this chapter applies equally to 2d and 3d deployments.
3.1 Linking Homology to the WSN Data about the communication graph can be shared across nodes to support message routing. The Delaunay graph (Section 2.4) is a well documented graph that has many good properties as a communication graph and is also a simplicial complex [19].
K = (v(K), e(K), f (K))
is the graph illustrated in Figure 3.1. Assuming the
vertices and edges represent nodes and communication links, respectively, communication graph and a Delaunay graph. Given this dual role,
44
K
K
is a
can be used
to route messages between sensor nodes, and well as the homology of subgraphs of
D
K 's
homology can be computed, as
K.
D
D K
K
K1
K
K1 K1 1
D
K1 D
D1
(i) t1 Figure 3.1.
D1
1
(ii) t2
(iii) t3
Complexes induced from the communication graph by the scalar eld.
Three stages of a WSN, where each node coincides with the point of intersection 1 between two line segments. In the gure, D is the scalar eld being monitored, D is that part of the domain above sensor threshold (illustrated as blue regions), K is 1 the communication graph of the WSN, and K is that part of the communication 1 graph induced by D .
For each sensor node
D,
n
in the set of nodes
N,
there exists a unique sensor value at each time
deployed in the spatial domain
t.
We assume the sensor value
and corresponding point value are the same, i.e., if the sensor's position coincides with
dn ∈ D,
the sensor value at time
analogously to the set Dene
i.e.
N1
i.e.
is
r(dn , t).
N = N0 ∪ N1
K 1 = (v(K 1 ), e(K 1 ), f (K 1 ))
nodes are restricted to and
D,
t
The set
where
Ni
=
t3 ,
K1
{n ∈ N | s (dn ) = i}. K 's
v(K 1 ) = N 1 , e(K 1 ) = {(a, b) ∈ e(K) | a, b ∈ N 1 }, is a simplicial complex whose
union comprises zero or more components and approximates and
can be separated
to be the induced graph that results when
f (K 1 ) = {(a, b, c) ∈ f (K) | a, b, c ∈ N 1 }. K 1
D, D1 , K ,
N
D1 .
are represented in Figure 3.1 at network times
t1 < t 2
0 h1 (Lk(n, C)) > 0
|E1 (C + n)| = |E1 (C)| + µ − 1 |E1 (C − n)| = |E1 (C)| − µ + 1 |E1 (C + n)| = |E1 (C)| + µ |E1 (C − n)| = |E1 (C)| − µ |E1 (C + n)| = |E1 (C)| + µ ± 1 |E1 (C − n)| = |E1 (C)| − µ ± 1
1d 2i 2d 3i 3d
Table 4.12. Link cases and formulas.
5.1) for Link Cases 2d and 3d. Even in the instance of a single link,
Lk(n, C),
Cases 3i and 3d require the use of a discovery process to determine whether
Link
Lk(n, C)
is associated with a cavity or a tunnel.
4.6 Summary This chapter has demonstrated the value gained by coupling the simplex connectivity numbers with the Betti numbers of homology to rene the classication of topological space. While both sets of numbers can be computed using the incidence matrices, these computations are not scalable. Hence, the incorporation of
k -links
and link case into the computations. It should be noted that the proposed solution does not scale a priori, however this can be remedied through existing networking solutions, as presented in Section 2.5 and proposed in Section 7.3.
95
Chapter 5 ALGORITHM Using the notation and conventions from Chapters 3 and 4, the subroutines comprising the distributed event detection algorithm are presented.
5.1 Discovery Routines Traditional computation of the Betti numbers requires maintaining and updating the incidence matrices of the entire component in question. In Delnado and Edelsbrunner's work, an incremental process that detects
0-, 1-,
and
2-cycles
replaces
the need for incidence matrices, thereby reducing time and storage complexity [13]. Since this process is centralized, a single node is responsible for computing changes to the simplicial complex under investigation, which may span multiple components. Translating computations from a centralized, incremental process to a decentralized, incremental process involves exploiting local discovery and computation. Nodes only participate in computations associated with components in spatial proximity. This is accomplished through three discovery routines, each of which draws on ooding. In each instance, the critical node broadcasts a message to its neighbors, which is propagated if certain criteria are met and dropped otherwise. In pseudocode, if packet received if condition satised execute required operations propagate message else drop packet
96
endif endif The simplest discovery routine propagates component updates.
To propagate
component data after the critical node has executed computations, the data is transmitted to the critical node's neighbors and each node receiving the message checks two conditions, elevated sensor status and no prior receipt of the message. The rst condition limits the component update to those nodes associated with the component, while the second condition ensures the component update terminates among those nodes associated with the component. The second discovery routine dierentiates between split and self-split events for 2d and 3d deployments. When a node is deleted from a component, if less than
1
of the two.
h0 (Lk(n, C)) is
then the corresponding event can be a split, self-split, or a combination To uniquely determine the event type, the critical node initiates a
discovery round. For each component of
Lk(n, C),
a node is passed a discover split
message, which includes the critical node's ID, the transmitting node's ID (which is the same as the critical node's ID in the rst transmission), the link component ID, and a timestamp indicating the time the discovery round was initiated. A node propagates the discover split message if its sensor value is above threshold and if it has not propagated the same discover split message previously. The message is passed to all neighbors except for the node that transmitted the message in the previous round. If a node receives discover split messages tagged with dierent link component ID, then both link component IDs are backpropagated to the critical node as a tuple.
Each tuple indicates a self-split.
Hence, the critical node can
determine if each link component pair was a self-split or a split after handling all incoming tuples, if there are any. The third discovery routine dierentiates between the cavity formation and tunnel loss events for 3d deployments. When a node is inserted into a component, if
97
ü
r ü
ü
ü
ü
ü
ü ü
ü
ü
ü ü
ü ü
ü
ü
ü
(ii) Cavity formation
(i) Tunnel loss Figure 5.1.
Dierentiating between a cavity and a tunnel. A gure indicating the
node roles required to dierentiate between a cavity and a tunnel.
h1 (Lk(n, C))) ≥ 1 then the event results in the formation of a cavity or the loss of a tunnel. A node propagates a discover hole type message to each link component of
Lk(n, C ′ ).
If a node receives discover hole type messages tagged with dierent link
component IDs, then the event is tunnel loss. Otherwise, it is a cavity formation event. The two dierent cases are represented in Figure 5.1.
5.2 2d Event Detection Algorithm The material in this section can be found in [23]. Pseudocode of the distributed algorithm for incremental insertion cases is presented as below. Complete code used to test the algorithm in the testbed deployment is presented in Appendix C. The only signicant change the incremental deletion cases provides is the processing required when dierentiating between a split or self-split. During an execution of the algorithm, each node can be in one of four states, INITIALIZATION, WAIT, CRITICAL, and UPDATE. After INITIALIZATION is complete, a node must be described as a wait node, a critical node, or an update note. Only one node can be in its CRITICAL state at any stage of an algorithm's execution. Three dierent events
98
(interrupts) can occur to, or be scheduled by, each node: sample timer res, receive message, and response timer res. The rst event indicates that the environment should be sampled via a designated sensor, the second event indicates that a message has been received, and the third event indicates that a message needs to be resent. There are four types of messages that can be sent: data request, acknowledge receipt of data request (ACK), component data, and component update. The rst message is transmitted by a node in its critical state; the second message, by a node in update or wait state; the third and fourth messages, by a node in update state. Component data and component update contain the following data elements: component vertex count
C,
V , edge count E , face count F , the rst Betti number h1 (t1 ), and ∆h1 .
INITIALIZATION: The base station distributes local triangulation data to each node in the network as a vector of Delaunay neighbors, of Delaunay neighbors,
e(Lk).
v(Lk), and an array of pairs
Once initialized, a node enters WAIT state.
STATE:INITIALIZATION 01 s = 0; V = E = F = C = 0; ∆h0 = h1 (t1 ) = h1 (t2 ) = ∆h1 = 0; 02 v(Lk), e(Lk)
(from base station),
v(Lk 1 ) = e(Lk 1 ) = ∅; ST AT E = W AIT
WAIT: A wait node sets its sample timer.
When the sample timer res, the
node polls the environment through a designated sensor on its sensor board and enters CRITICAL state if sensor status has risen above threshold. If sensor status is below threshold, then the node resets its sample timer and remains in WAIT state. If a wait node receives a data request message, and if its sensor status relative to threshold is high, then it transmits a component data message to the critical node and sets a response timer. If the response timer res, this message is resent. If a wait node receives a component update message, it transmits and ACK and stores the data if its sensor status relative to threshold is high.
99
STATE:WAIT 03
Start sample timer
04
Event: sample timer res
05
if
06
previous sensor status
endif
08
Event: receive message
09
if
message
if
11 12 13
sensor status
r == 1
Transmit message
then
then
component data ; start response timer
endif elseif
message
component update then
Transmit message
15
if
17
r == 1
data request then
14
16
and new sensor status
ST AT E = CRIT ICAL
07
10
r == 0
sensor status Store Data;
ACK
r == 1
then
ST AT E = U P DAT E
endif
18
endif
19
Event: response timer res
20
Retransmit last message
CRITICAL: The critical node transmits a data request to each neighbor. neighbors respond, the critical node builds
v(Lk 1 ) and e(Lk 1 ) from v(Lk) and e(Lk).
For each unique existing component contributing to the new component,
F
are updated appropriately. After computing
h1 , ∆h0 ,
and
∆h1 ,
the previous section, the critical node proceeds to UPDATE state.
STATE:CRITICAL 21
As
Stop sample timer, stop response timer,
100
CompSet = ∅
V , E,
and
as illustrated in
22 23
foreach neighbor N br ∈ v(Lk) do Transmit message
data request
to
N br
24
endfor
25
Event: receive message
26
while not each neighbor N br in v(Lk) responded do
27
if
r.N br == 1
28
Update
29
if
30
then
v(Lk 1 )
and
e(Lk 1 )
C.N br ∈ / CompSet
then
CompSet = CompSet ∪ C.N br, V = V + V.N br,
E = E + E.N br, F = F + F.N br 31
endif
32
endif
33
endwhile
34 C = N odeID, V = V + 1, E = E + V (Lk 1 ),
F = F + E(Lk 1 ); h1 (t2 ) = −V + E − F + 1 35 ∆h0 = 1 − |CompSet|, ∆h1 = h1 (t2 ) − h1 (t1 ), ST AT E = U P DAT E
UPDATE: An update node starts a response timer and broadcasts a component update message to each of its neighbors. If an ACK is not received for a particular recipient node, the message is resent. If a component update message is received, the node ACKs the transmitting node. After the update node has received ACKs from all of its neighbors, the node proceeds to WAIT state.
STATE:UPDATE 36
Start response timer
37
for neighbor N br ∈ v(Lk) do
38 39
Transmit message
component update
to
endfor 101
N br
40
Event: response timer res
41
Retransmit last message
42
Event: receive message
43
if
44
receive ACK from neighbor in
if
45 46 47 48 49
all neighbors in
v(Lk)
v(Lk)
ACK'ed
then
then
h1 (t2 ) = h1 (t1 ); ST AT E = W AIT
endif elseif
receive message component update
Transmit message
then
ACK
endif Now, we determine the worst case time complexity, storage complexity, and
message complexity of the algorithm. A key assumption is that the degree of the deployed WSN's communication graph, Delaunay graph, is bounded by some integer
k , independent of the number of nodes in the WSN, n.
This assumption is reasonable
for grid deployments, or randomized deployments in which a pathological geometric distribution occurs with low likelihood [19].
Theorem 5.2.1. The algorithm computes an incremental insertion event for a component comprised of n nodes in O(n) time. Proof.
Let
k
be the maximum degree of the communication graph of the WSN.
Lines 26-33 and lines 44-46 comprise the highest time complexity, since the node in question must evaluate whether a neighbor has transmitted a component data or ACK message. Using a standard quadratic time search, this process is each instance. Since only
n
O(k 2 )
nodes have sensor reading above threshold,
in
(n − 1)
nodes will execute lines 44-46 and the critical node will execute lines 26-33 and
102
lines 44-46. In other words, each of
n
nodes requires constant time to participate
in the computation. The result follows.
Theorem 5.2.2. The algorithm computes an incremental insertion event for a component comprised of n nodes using O(n) storage. Proof.
Let
M
be a constant bound for simplicial complex data, component
membership data, topology data, messages en queue, and supporting data (operating system, source code, local address data) stored at each node; let
k
be
the maximum degree of the WSN's communication graph. Clearly, an upper bound for the total storage required is
M kn.
The result follows.
Theorem 5.2.3. The algorithm computes an incremental insertion event for a component comprised of n nodes using O(n) transceived data. Proof.
There are ve mutually exclusive node types that potentially contribute to
the total message complexity, associated with computations: the critical node
Crit,
the critical node's neighbors above threshold
v(Lk 1 ),
critical node that belong to the evolving component
non-neighbors of the
v(C) − v(Lk 1 ) − Crit,
neighbors (hence below threshold) of the evolving component non-neighbors of the evolving component
N br(C),
v(K) − N br(C) − v(C),
and
where
N br
notates nodes that neighbor the node(s) in question. Let the maximum number of neighbors for any node in the network be received data be
Rx,
k,
total transmitted data be
the cost of a data request or ACK message be
cost of a component data or component update message be
T x,
m1 ,
total
and the
m2 .
For each node, data transmission occurs if any of line 11, line 14, line 20, line 23, line 38, line 41, or line 48 is executed. Assuming retransmission only contributes constant cost to total transmission (and consequently, to total reception), lines 20
103
and 41 are excluded from the analysis. Bounds for transmission costs per node type are:
T x(Crit) ≤ 2m1 k + m2 k
(Cost of lines 23, 38, and 48)
T x(v(Lk 1 )) ≤ m1 (k + 1) + m2 (k + 1)
(Cost of lines 11, 14, 38, and 48)
T x(v(C) − v(Lk 1 ) − Crit) ≤ m1 (k + 1) + m2 k T x(N br(C)) ≤ m2 k
(Cost of lines 14, line 38, and line 48)
(Cost of line 14)
T x(v(K) − N br(C) − v(C)) = 0 Since there is one critical node, a maximum of
n−k−1
k
neighbors above threshold,
nodes remaining in the component, and an upper bound of
kn
for nodes
neighboring the component,
T x ≤ 2m1 k + m2 k + [m1 (k + 1) + m2 (k + 1)]k + [m1 (k + 1) + m2 k](n − k − 1) + m2 k 2 n, which reduces to:
T x ≤ (m1 k + m1 + m2 k 2 + m2 k)n + m1 k + m2 k − m1 In a similar fashion, the total received data during the computation is bounded by:
Rx ≤ (m1 k 2 + m1 k + m2 k + m2 )n + m1 k − m2 Since total message complexity is proportional to
T x + Rx,
and
m1 , m2 ,
and
k
are
constants, the result follows.
Thus, worst case time, storage, and message complexity are
O(n) for an execution
of the algorithm involving one incremental insertion to a component comprised of
n
nodes. Time complexity outcomes are conrmed by simulation results in Section
6.1 while message complexity outcomes are partially conrmed by testbed results in Section 6.2.
104
5.3 3d Event Detection Algorithm The primary goal of the algorithm is
to maintain the Betti numbers and simplex
connectivity numbers of simplicial complexes in a distributed, incremental manner. The motivation is clear: classication gains are made by coupling the two topological invariants, as shown in Tables 4.10 and 4.11. status and has secured a token is the
Recall that a node that changes
critical node.
The distributed algorithm in
this chapter focuses on the critical node and the data it polls from its neighbors to handle incremental events.
This involves replacing computationally intensive
methods, maintaining incidence matrices, with more ecient ones that can be shared across multiple nodes when needed. In particular, the Betti numbers are computed by correctly identifying the link case for each insertion or deletion and applying the appropriate formula for
|E1 |,
while the simplex connectivity numbers are computed
by correctly maintaining component resulting from
0-
and
1-links.
3-tuples,
which naturally account for changes
An overview of the algorithm is presented in Section
5.3.1 and subcases are presented in Sections 5.3.2-5.3.4.
5.3.1 Overview of Algorithm Prior to network initialization, a base station with sucient computing power determines the Delaunay tetrahedization of the WSN and local tetrahedization data is distributed to each node in the network as a linked list. At initialization, each node senses the environment and broadcasts a token request if its sensor status is
r == 1,
i.e. sensor value has exceeded the designated threshold, and it does not
have the network token. If
r == 0,
the node awaits either a packet interrupt from
a neighboring node or a self-interrupt to sense the environment. If node has the network token, it enters its critical section. If
r == 1
r == 1
and the
and the node
does not have the network token, it broadcasts a token request and awaits a packet
105
interrupt. The packet could either be a message providing the network token or a packet requesting data on behalf of the current critical node. When a node
n
enters its critical section, it polls its neighbors for data.
particular, it requests node ID, sensor status, component
3-tuple(s), k -link
In
status,
and component simplex and topology data from each of its neighbors. This data is sucient to update topology information, save three instances. They are: deletion of node
n
h0 (Lk(n, C)) > 1
where
h1 (Lk(n, C)) > 0
(Link Case 2d), insertion of node
(Link Case 3i), and deletion of node
n
where
n
where
h1 (Lk(n, C)) > 0
(Link Case 3d). The rst time a node has entered its critical section, only insertion is possible and therefore, only Link Case 3i can arise. for node
n
Lk(n, C)
is to build
Regardless, the rst step
from its neighbors' data and compute the link case
for each connected component of
Lk(n, C) to determine if further communication is
needed. If no further communication is needed (Link Cases 1d, 1i, 2i), then puted for each connected component of
Lk(n, C),
eliciting any changes to
g2
is com-
after which the Betti numbers
can computed. The critical node then analyzes component dened in Section 4.4. After analysis, component
|E1 |
3-tuples
3-tuples
using the rules
are updated, naturally
0- or 1-links as outlined in Section 4.2.
Furthermore,
g1
and
are computed using Propositions 4.4.0.3-4.4.0.5. If a component of
Lk(n, C)
necessitates further communication (Link Cases 2d,
3d, 3i), then the critical node transmits a request to an arbitrarily selected node of that component. The message noties the node of the link case(s) involved, from which the type of action can be determined. If Link Case 2d, then a discovery round is needed to determine if deletion has resulted in a split, a self-split (Section 3.4, or some combination of the two events. If Link Case 3i, then a discovery round is needed to determine if
Lk(n, C) is associated with a cavity or a tunnel.
If Link Case
Lk(n, C)
is associated
3d, then a discovery round is needed to determine both: if
106
with a cavity or a tunnel, and if the deletion has resulted in a split, self-split, or some combination of the two events. Again, just after initialization, only insertion cases are possible, and therefore only Link Case 3i can arise (of these three cases). Once the discovery round has concluded, node
n can execute computations as summarized
in the previous paragraph. When the topology of the new component(s) has been computed, updates are multicast to relevant nodes, i.e. nodes belonging to the corresponding component(s). After updates have been completed, the critical node forwards the network token to the next node in queue. While it is possible for the token to be monopolized by a particular subset of the deployed nodes, no fairness techniques are employed. After a node
n
has become incorporated into the newly developing simplicial
complex, it is possible for this node's sensor to drop below threshold. If this happens, then node
n must be deleted from the simplicial complex to which it belongs.
To do
so, it requests the network token and proceeds as outlined above, noting that now Link Case 2d and Link Case 3d are candidate link cases. From this point onward, a node will alternate between incremental insertion and incremental deletion, with each change in sensor status. The data elements and core routines foundational to this solution are now presented.
Each node stores the data elements in Table 5.1.
When outlining the
algorithm, the parent component of a connected simplicial complex will be notated
C
rather than
list,
ID0 ,
though it will be understood that
C
is derived from the linked
Comp3T uple.
As is standard for any sensor node, it is assumed that each node can sense its environment, unicast (transmit messages to a single node), multicast (transmit messages to a select set of nodes), broadcast (transmit messages to every node within communication range), receive and handle messages, and set interrupts. Further-
107
Data element
Description
n r k − link N br Comp3T uple T SimplexC T opoC Lk(n, C) SimplexLk(n, C) T opoLk(n, C)
ID of the node in question
n relative to threshold Tuple indicating if n is a 0-link or 1-link (0 for fail, 1 for pass) Linked list of IDs of node n's neighbors Linked list of component 3-tuples (Section 4.4) Linked list of vertices opposite node n, for each hyperface 4-tuple, (V, E, F, HF ), containing simplex counts of C 5-tuple, (|E1 |, h1 , h2 , g1 , g2 ), containing topology data about C Data structure containing faces, edges, and vertices of Lk(n, C) 3-tuple, (V, E, F ), containing simplex counts of Lk(n, C) 3-tuple, (h0 , h1 , h2 ), containing topology data about Lk(n, C) The sensor status of node
Table 5.1. Data elements stored at each node
more, routines such as constructing a complex, e.g.
Lk(n, C),
from
T
and
r
and
counting the corresponding simplices are assumed.
5.3.2 Node Insertion - One Component 1
1
(9,1,5)
(1,5,0)
7
7 2 9 3 (1,0,0)
2
6 (1,5,0)
(0,0,0) 4
3 (9,1,0)
5 (1,5,0)
(9,1,5) 4
8
8
(i)
(ii)
Figure 5.2. Data structure and derivative data of
In Figure 5.2,
9
6 (9,1,5)
9
5 (9,1,5)
T.
is the critical node and has polled sensor status from its neigh-
bors, thereby ascertaining that nodes therefore, are the vertices of pared against the triples in
Lk(9, 1). T.
1, 3, 5,
and
6
all belong to component
1
and
To compute the edges, vertex pairs are com-
In this example, the edge set contains
108
(1, 3), (1, 5),
(1, 6), T.
and
Using
computed:
9
(5, 6).
Finally, faces are computed by comparing the edge set against
Lk(9, 1)'s
simplex data, the Betti numbers of this component can be
h0 (Lk(9, 1)) = 1, h1 (Lk(9, 1)) = 0,
and
h2 (Lk(9, 1)) = 0.
Since node
is being inserted, this is Link Case 2i and therefore, no discovery round is re-
quired.
E1
is computed using the formula in Table 4.12:
E1 (1 + 9) = 1 + (4 − 1) = 4. 4.2:
h1 (1 + 9) = 0
and
E1 (1 + 9) = E1 (1) + µ
or
Betti numbers are computed using Formulas 4.1 and
h2 (1 + 9) = 0.
Finally, component
3-tuples
are computed
and updated, Figure 5.2(ii) and, since none of the cases in Figure 4.12 have arisen,
g1 = 1
and
g2 = 1.
T (1, 2, 3) (1, 2, 7) (1, 3, 4) (1, 4, 5) (1, 5, 6) (1, 6, 7) (2, 3, 8) (2, 7, 8) (3, 4, 8) (4, 5, 8) (5, 6, 8) (6, 7, 8)
Lk(9, 1) F aces {} Edges {} V ertices {1, 3, 5, 6} SimplexLk(n, C) (4, ∅, ∅) T opoLk(n, C) (∅, ∅, ∅) Table 5.2. Node
9's
Comp3T uple Node 3 (1, 0, 0) Node 1 (1, 5, 0) Node 5 (1, 5, 0) Node 6 (1, 5, 0)
SimplexC
(4, 4, 1, 0) TopoC
(1, 1, 0, 1, 0)
data after polling neighbors
5.3.3 Node Insertion - Merging Multiple Components Figure 5.3 represents the merging of two components, node
3's insertion.
7
and
12,
as a result of
To compute the topology of the new component, node
each existing component in turn, working with (arbitrarily) component
3
rst computes
Lk(3, 7), SimplexLk(3, 7)
link case can be determined. Since case is Link Case 2i. Hence,
|E1 |
and
T opoLk(3, 7).
h1 (Lk ((3, 7))
and
is computed using
109
3 handles
7 rst.
Node
Using this data, the
h2 (Lk ((3, 7))
are
0,
this link
|E1 (7 + 3)| = |E1 (7)| + µ =
T (1, 2, 3) (1, 2, 7) (1, 3, 4) (1, 4, 5) (1, 5, 6) (1, 6, 7) (2, 3, 8) (2, 7, 8) (3, 4, 8) (4, 5, 8) (5, 6, 8) (6, 7, 8)
Lk(9, 1) F aces {(1, 5, 6)} Edges {(1, 3) , (1, 5) , (1, 6) , (5, 6)} V ertices {1, 3, 5, 6}
Table 5.3. Node
9's
SimplexC (5, 8, 5, 1) T opoC (4, 1, 0, 1, 1)
Comp3T uple (1, 5, 9)
nal data prior to multicasting updates
(12,0,0)
(3,12,0)
(12,1,0)
(12,6,0)
(3,12,1)
(3,12,6) (3,12,0)
(12,0,0)
3
(3,12,1) (3,12,6) (3,7,9)
(7,9,0)
(3,7,9)
Figure 5.3. Two components merging. Example of two components merging through incremental insertion of node
8 + (16 − 8) = 16.
Thus,
3.
h1 (7 + 3) = E − |E1 | − V + 1 = 25 − 16 − 10 + 1 = 0
h2 (7 + 3) = F − HF − |E1 | = 24 − 8 − 16 = 0. After computing
Lk(3, 12), SimplexLk(3, 12),
h1 (Lk ((3, 12)) = 1
and
h2 (Lk ((3, 12)) = 0,
Node and
3 proceeds with component 12.
T opoLk(3, 12),
h1
or not.
Lk(3, 12)
is indeed the reason that
110
node
3 computes
so the insertion is of type Link Case 3i
and therefore, a discovery broadcast is required to determine if a hole to
and
Lk(3, 12) contributes
h1 (12) = 1
and therefore,
|E1 (12 + 3)| = |E1 (12)| + µ − 1 = 2 + (10 − 2) = 10.
Node
3
0-link,
is a
since its
insertion has merged two components.
5.3.4 Node Deletion 1
1
7
7 2 9 3 (9,0,0)
2
6 (9,5,0)
(9,5,0)
(0,0,0)
3 (3,0,0)
5 (9,5,0)
4
6 (5,0,0)
9
5 (5,0,0)
4
8
8
(i)
(ii)
Figure 5.4. Component splitting. Example of a component splitting through incremental deletion of node
9.
Figure 5.4 represents the splitting of one component, a result of node
9's
deletion from the component.
the new component, node (arbitrarily) component
T opoLk(3, 7). and
9
into two,
3 rst.
Node
|E1 (7)|+µ = 8+(16−8) = 16.
Thus,
Hence,
|E1 |
as
h1 (Lk ((3, 7))
(Recall from Section 4.5 that
is computed using
|E1 (7 + 3)| =
h1 (7+3) = E−|E1 |−V +1 = 25−16−10+1 = 0
h2 (7+3) = F −HF −|E1 | = 24−8−16 = 0. Lk(3, 12), SimplexLk(3, 12), and
3,
9 rst computes Lk(3, 7), SimplexLk(3, 7) and
h2 (Lk ((3, 7)) are 0, this link case is Link Case 2i.
h1 (Lk ((3, 12)) = 1
and
To compute the topology of
Using this data, the link case can be determined. Since
After computing
5
handles each existing component in turn, working with
µ = F (St(n, C)) − HF (St(n, C)).)
and
9,
h2 (Lk ((3, 12)) = 0,
Node and
3 proceeds with component 12.
T opoLk(3, 12),
3 computes
so the insertion is of type Link Case 3i
and therefore, a discovery broadcast is required to determine if
111
node
Lk(3, 12) contributes
a hole to
h1
or not.
Lk(3, 12)
is indeed the reason that
|E1 (12 + 3)| = |E1 (12)| + µ − 1 = 2 + (10 − 2) = 10.
h1 (12) = 1
Node
3
is a
and therefore,
0-link,
since its
insertion has merged two components. Since
|E1 |
can be computed from the link case, the only remaining task in the
computation is to update
h1 , h2 , g 1 ,
and
g2 .
112
Chapter 6 EXPERIMENTAL RESULTS The algorithms are evaluated using simulation models and testbed deployments. The simulations are developed in MATLAB 7.9.0 while the testbed deployment is developed using TelosB motes, TinyOS 1.2 as the operating system, and nesC 1.1 as the programming language. Simulation results are compared for correctness using CHomP, software that computes the Betti numbers and homology groups in a centralized fashion.
6.1 Simulations The primary goals of the simulation are to validate the algorithm and determine the relation between the time complexity / internal processing and component size of topological events being computed. Since transception draws more power than internal processing, and transmission and reception costs are roughly equivalent for the TelosB, overall network cost is assessed through data transmission per node, in bytes [39].All simulation trials are developed in, and conducted using MATLAB 7.9.0. The distributed algorithms are evaluated for correctness of computation and for eciency and scaling.
Correctness is veried using functions from CHomP's
homology functions library. Due to the dierences in availability between 2d data and 3d data, along with core functions to handle such data, the scalar elds for simulated 2d deployments dier from the scalar elds for simulated 3d deployments. Specically, the scalar eld for a 2d deployment is black-and-white image le, which is read using the MATLAB image analysis library. The scalar eld for 3d deployments is an Excel le in which each record represents a single cube, providing the cube's coordinates and size, and its sensor status relative to threshold. The overall
113
le therefore represents a scalar eld which is a cuboid region. For each sensor node placed into this scalar eld, the sensor value is determined by the cube it falls within. 2d simulation runs were primarily conducted using the Delaunay graph. Refer to Section 6.1.4 for evaluation using the localized Delaunay triangulation (lDel). appearance 1
2
3
accretion
merge
1
2
3
7 1
2
9 3
2 1
2 2
2 3
7 1
2
3
5 1
2
6
7 4
5
9 6
2 4
5
2 6
7 4
5
6
5 4
5 5
6
9
7 7
8
9 9
2 7
8
2 9
7 7
8
9
5 7
8
9
4
5
6
4
5 5
7
8
9
7
8
disappearance
split
attrition
hole formation
self-split
singularity formation
3
9 1
9 2
9 3
5 7 1
5 2
9 5 3
8 1
8 2
8 3
9 1
9 2
9 3
7 9 1
9 2
9 3
5 1
5 2
5 3
9 4
9 5
9 6
7 5 4
5
5 9 6
8 4
5
8 6
9 4
5
9 6
7 9 4
9 5
9 6
5 4
5 5
5 6
9 7
9 8
9 9
7 5 7
5 8
5 9 9
8 7
8 8
8 9
9 7
8
9 9
7 9 7
8
9 9
5 7
8
5 9
hole loss
self-merge
singularity loss
Figure 6.1. 2d connectivity events simulated in MATLAB. Each image corresponds 1 to a discrete scalar eld. White regions represent D while black regions represent D0 . The Delaunay graph induced by D1 is represented by blue simplices and num0 bering, while the Delaunay graph induced by D is represented by red simplices and numbering. Green numbers indicate the component ID of each simplicial complex.
6.1.1 2d Connectivity Events Nodes are congured in square grid geometries, where the total number of nodes deployed includes 9, 25, 49, 81, and 121 nodes. 10 simulation trials are executed for each deployment size per event type, and the results are aggregated. For each event type, two black-and-white image les are read in sequence, creating the specied change (See Figure 6.1). MATLAB R2009b is used to determine precise node locations, generate the Delaunay graph of the WSN, and parse this data to node-level Delaunay information [47].
Code corresponding to the second task makes use of
algorithms available through the open source Computational Geometry Algorithms Library [9].
114
Time to Process 2d Dele!on Events
2.5 Appearance
2
Hole loss 1.5
Merge
1
Self-merge
0.5
Accre!on Singularity loss
0 0
20
40
60
80
100
120
MATLAB Run Time in Seconds
MATLAB Run Time in Seconds
Time to Process 2d Inser!on Events 3
140
3 2.5 Disappearance
2
Hole forma!on 1.5
Split
1
Self-split
0.5
A"ri!on Singularity forma!on
0 0
Number of Nodes in WSN
20
40
60
80
100
120
140
Number of Nodes in WSN
(ii)
(i)
Figure 6.2. Plots of time required to process a 2d incremental event vs the number of nodes in the component, including: (i) time to process incremental insertion events and (ii) time to process incremental deletion events.
Results of the simulations are presented in Figure 6.2. Appearance and disappearance require constant time to process. For all other incremental insertion and incremental deletion events, the time to process each event varies linearly with the number of nodes in the component. Among the incremental insertion events, hole loss takes the greatest time to compute.
This is a result of the simulated scalar
eld, which has the most nodes requiring a component update (Section 5.1) after the critical node has determined the topological change and corresponding event. Among the incremental deletion events, the split and self-split consume the most processing time, resulting from the discovery routine that dierentiates between splits and self-splits (Section 5.1). The ten trials per event type were not evaluated to determine if any of these dierences were signicant.
6.1.2 3d Connectivity Events The 3d scalar eld is a 3 by 3 grid of unit cubes, each of which is assigned a sensor value relative to threshold. The coordinates and sensor value of each cube are entered into a table, which is interpreted and rendered by the MATLAB code. Simulations include 27, 64, 125, 216, and 343 node deployments. For each node deployment and event type being evaluated, 10 simulations are executed and aggregated. Nodes are
115
appearance
merge 23 27 22 27
24 27
27 27
6 9
25 27
22 9
5 9
4 9
9 9
8 9
26 27
23 23
21 27
23 9
3 9
22 27
26 27 25 27
19 27
21 20 27 27
16 27
10 27
8 27 7 27
22 16 9 27
3 27
2 27
6 16
27 16
8 16 7 16
21 20 16 16
19 16
1 27
10 16
6 10
6 9
4 5 1616
23 16
26 16 25 16
1 9
accretion
24 16
6 27
27 27
3 9
2 9
split
singularity formation 4 5 2727
9 9
7 9
21 9
10 9
disappearance
23 27
8 9
19 20 9 9
1 9
24 27
4 9
27 9
25 9
2 9
6 9 5 9
26 9
7 9
19 20 27 27
24 9
4 9
9 16
5 9
4 10
9 9
5 10
7 10
7 9
3 16
2 9
2 16
3 2 10 10
3 9 10 10
1 9
1 16
singularity loss
9 10 8 10
8 9
1 10
attrition
Figure 6.3. 3d connectivity events simulated in MATLAB. The simplicial complex K 1 induced by D1 is represented by blue simplices, vertices, and numbering, while 0 0 the simplicial complex K induced by D is represented by red simplices, vertices, and numbering. Green numbers indicate the component ID of each connected com1 ponent of K .
congured in cube grid geometries. For each event trial, two tables of data are read in sequence to simulate the events of interest, shown in Figures 6.3 and g:MATLABsimulation-atomic-3d-2. In each gure, the simplicial complex,
K 1,
induced by
D1
(not shown for ease of visualization) is represented by blue simplices, vertices, and numbering, while the simplicial complex,
K 0,
induced by
D0
is represented by red
simplices, vertices, and numbering. Green numbers indicate the component ID of each connected component of
K 1.
Results of the simulations are presented in Figure 6.5. As in the 2d trials, appearance and disappearance require constant time to process. For all other connectivity
116
self-merge (tunnel formation)
tunnel formation 18 27
15 27
17 27
12 11 27 27
13 27
16 27 27 27
26 27 25 27
9 27
10 24 27 27
8 27 7 27
21 27 20 27
19 27 6 27
22 27
27 5
25 5
10 24 5 5 19 5 6 5
22 5
9 5 8 5 4 5
4 5 2727
27 27 26 27
25 27
19 27
1 5
8 27 7 27
21 20 27 27
3 5
17 27 16 27 26 27
27 27
25 27
7 27
14 27 13 27
24 23 27 27
5 27
8 27 4 27
16 23
10 27
19 6 27 27
22 9 27 27
26 23
21 27
20 27
27 23
25 23
7 23
14 23 13 23
15 23
24 23
11 23
5 23
8 23 4 23
17 27
12 23
16 27
10 23
19 6 23 23
22 9 23 23
3 27 2 27
1 27
17 23
12 27
7 15
21 20 15 15
19 15
9 15
3 15
2 15
10 15
1 27
25 27
3 23 2 23
8 9 27 27
7 27
1 23
12 27
10 24 27 27
16 14 21 27
1 15
6 27 5 27 1 27
2 27
3 27
15 14
18 14
27 14
7 14
8 9 14 14
12 14
14 14 13 14
11 14 10 24 14 14
26 14 25 14
19 20 27 27
22 27
4 27
17 14
11 27
13 27
27 27 26 27
21 23
20 23
15 27
18 27
19 20 14 14
22 14
4 14
21 14
6 14 5 14
2 14
3 14
1 14
self-split (cavity loss)
cavity loss Figure 6.4.
25 15
8 15
self-merge (cavity formation) 18 23
11 27
26 15
self-split (tunnel loss)
cavity formation 15 27
4 5 1515
27 15
9 27
3 27
6 15
15 15
23 15
22 15
2 27
10 27
tunnel loss
18 27
24 15
6 27
23 27
22 27
21 5 20 5
2 5
7 5
1 27
12 11 5 5
13 5
16 5
3 27
24 27
15 5
17 5
26 5
2 27
5 27
4 27
18 5
3d connectivity events simulated in MATLAB - continued. Colors and
symbols have the same meaning as in Figure 6.3.
events, the time to process each event varies linearly with the number of nodes in the WSN. Again, by design of the simulated scalar eld, this is equivalent to: time to process each event varies linearly with component size. Similar to the 2d incremental insertion case, cavity loss takes the longest to detect among 3d incremental insertion cases. The remaining 3d insertion events group together. In the case of 3d incremental deletion, a self-split event takes the most time to detect, with split, cavity formation, and tunnel formation taking nearly as much time, due to the discovery routines required to detect each event. Singularity formation and attrition take less time to detect, since neighbor data is sucient to detect each. It is interesting to note that the 3d trials take less time per node than the 2d trials. This could be due to the fundamental dierences in the simulated scalar eld
117
Time to Process 3d Dele!on Events
2.5
MATLAB Run Time in Seconds
MATLAB Run Time in Seconds
Time to Process 3d Inser!on Events 3 Appearance
2
Cavity loss Tunnel loss
1.5
Merge
1
Self-merge
0.5
Accre!on 0 0
100
200
300
400
Singularity loss
Number of Nodes in WSN
6 5
Disappearance
4
Cavity forma!on
3
Tunnel forma!on
2
Split Self-split
1
A"ri!on 0 0
100
300
400
Singularity forma!on
Number of Nodes in WSN
(i) Figure 6.5.
200
(ii)
Time to process a 3d connectivity event vs number of nodes.
Plots
of time required to process 3d connectivity events vs the number of nodes in the component, including: (i) time to process incremental insertion events and (ii) time to process incremental deletion events.
and how it is read to determine a sensor node's sensor status relative to threshold. In the case of the 2d simulation, the MATLAB function impixel locates the pixel corresponding to the sensor node's deployment position and determines if the color value is black or white. In the case of the 3d simulation, it is a matter of a lookup operation performed on a data table.
When viewing the functions related to
the algorithm developed in this research using MATLAB's Proler, we see a 5-fold increase in CPU time when comparing 3d simulation trials to 2d simulation trials, where the same event is being detected and the WSN is about the same size. Further, memory requirements increased by about 20 % using the same evaluation criteria between 3d and 2d simulation trials.
6.1.3 Evaluating Non-incremental Events Non-incremental events are restricted to 2d node deployments. Like incremental events, nodes are congured in square grid geometries. The total number of nodes deployed includes the perfect squares from 9to 225 nodes. 10 simulation trials are executed for each deployment size, and the results are aggregated. For each run, the non-incremental topological events are simulated using image les generated from
118
1 1
2
3
39 4
39 5
39 6
39 7
39 8
39 9
10
1 1
39 15
39 16
39 17
39 18
39 19
39 20
1 11
3
38 4
38 5
38 6
38 7
38 8
38 9
10
12
13
38 14
38 15
38 16
38 17
38 18
38 19
38 20
2
11
12
13
39 14
21
22
23
24
25
39 26
39 27
39 28
39 29
39 30
21
22
23
24
25
38 26
38 27
38 28
38 29
38 30
31
32
33
34
35
36
37
39 38
39 39
39 40
31
32
33
41 34
35
36
37
38 38
38 39
38 40
41
42
43
44
45
46
47
39 48
49
50
41 41
42
41 43
41 44
41 45
46
47
38 48
49
50
52
75 53
54
55
51
41 52
75 41 53
41 54
41 55
41 56
57
58
69 59
60
62
75 63
75 64
75 65
62
75 41 63
75 41 64
75 41 65
66
67
69 68
69 69
69 70
74
75 75
76
77
74
75 41 75
76
77
78
79
80
86
87 87
86
87 87
88
89
90 90
96
97
96
97
98
99
100
51 61 71 71
72
73
81
82
83
84
75 85
91
92
93
94
95
56 66
57 67
58
59
60
68
69 69
69 70
61
79
80
71 71
72
88
89
90 90
81
82 82
83
84
75 41 85
98
99
100
91
92
93
94
95
78
(i) Figure 6.6.
73
(ii)
A non-incremental event simulated in MATLAB. Simulated WSN grid
deployment of 100 nodes, developed in MATLAB. Frames (i) and (ii) represent two consecutive stages of network operation. Nodes are randomly distributed over the entire area of the underlying image le. If a node's position coincides with a white pixel in the image le, then its sensor status is 1, and the node ID is in blue font. Otherwise, the sensor status is 0 and the node ID is in red font.
If a group of
nodes has elevated sensor status, then they belong to a common component. The component ID is displayed in green font. The underlying communication graph is represented by red line segments. If part of the graph is associated with a component, it is represented by blue line segments.
aerial photographs of an oil spill, as shown in Figure 6.6. In the gure, frames (i) and (ii) represent two consecutive stages of network operation.
As in Figure 6.1,
if a node's position coincides with a white pixel in the image le, then its sensor status is 1, and the node ID is in blue font. Otherwise, the sensor status is 0 and the node ID is in red font. If a group of nodes has elevated sensor status, then they belong to a common component. The component ID is displayed in green font. The underlying communication graph is represented by red line segments. If part of the graph is associated with a component, it is represented by blue line segments. The algorithm is evaluated for correctness both with regard to topological characterization, i.e., for a single slice in time, and event detection. Furthermore, the
119
time required to process events is compared to the total number of nodes in the WSN, as well as the number of critical nodes during the simulation. Regarding correct computation, while the initial and nal values of
h0
and
h1
are correctly computed, and the global event can be identied, intermediate computations result in local changes which are dependent on the order nodes assume the role of critical node.
For example, intermediate events identied during the
growth of component 75 to component 41 in Figure 6.6 are as follows: Node 34, appearance; Node 43, growth; Node 44, merge; Node 45, growth; Node 52, growth; Node 54, growth; Node 55, growth; Node 56, growth. Node 34 reports appearance, the addition of a new component, while Node 44 reports a merge. Had the event been processed by nodes nearest Component 75 rst, proceeding to distant nodes in turn, only growth events would have been reported at intermediate stages. The time
T
required to process the entire event is quadratic with respect to the
component size
C , T = 0.008C 2 − 0.153C
where
R2 = 0.999.
For non-incremental
events, the number of critical nodes can contribute signicantly to the component size. Thus,
C
includes all nodes in the original component and all critical nodes.
If the number of critical nodes is very small when compared with the component size, the time required to process a non-incremental event will approach a linear cost, as in the results of Sections 6.1.1 and 6.1.2. Furthermore, if component size is very small when compared with the size of the WSN, the time to process an event should still be reasonable. However, a quadratic time solution for broad-scale events involving a large number of critical nodes in the process is not favorable. This should be addressed in future work.
6.1.4 Evaluation Using the localized Delaunay triangulation We use the localized Delaunay triangulation (LDel) to conrm the validity of the algorithm for weaker planar communication graphs than the Delaunay triangulation.
120
Specically, the LDel contains those edges of the Delaunay triangulation within a dened length, call it
L
[41]. Twenty 2d deployment simulations are run per event,
for incremental values of
L
between the average length between nodes and twice
the average length between nodes. As the
L
value increases, the number of edges
increase, and the LDel approaches the Delaunay triangulation. Figure 6.7 presents the simulation results, plotting the fraction of success of detecting an event against the average number of edges in the LDel.
Evaluang Inseron Event Detecon Using LDel as the Communicaon Graph
Evaluang Deleon Event Detecon Using LDel as the Communicaon Graph 1.2
1
Fracon of Success
Fracon of Success
1.2 Appearance
0.8
Merge
0.6
Self-merge
0.4 Accre on 0.2
1
Disappearance
0.8
Split
0.6
Self-split
0.4 A"ri on 0.2
Hole loss
0
Hole forma on
0 0
10
20
30
40
50
60
Singularity loss
0
Number of Edges in 25-Node WSN
10
20
30
40
50
60
Singularity forma on
Number of Edges in 25-Node WSN
(i)
(ii)
Figure 6.7. Evaluation of algorithm against graph sparsity. Plots of fraction of success to detect 2d connectivity events vs the communication graph's, LDel's, sparsity, measured in number of edges. (i) and (ii) present the results for incremental insertion events and incremental deletion events, respectively.
As can be seen, appearance and disappearance are not aected by the sparsity of LDel. For the remaining events, as the graph becomes more sparse, the fraction of correct event detection decreases. In particular, when the node undergoing change is disconnected from other nodes, all incremental insertion events and incremental deletion events are incorrectly reported as appearance and disappearance, respectively. Increasing
L till the node undergoing change is adjacent to some other nodes
in the LDel, there is still a reduction in the ability to dierentiate between insertion events hole loss, merge, accretion, and singularity loss; deletion events, hole formation, split, attrition, and singularity formation. Increasing
121
L further,
the fraction of
success of event detection rapidly approaches the true Delaunay triangulation.
122
1,
even before the LDel converges to
6.2 Testbed Deployments The material in this section can be found in [23]. Crossbow's TelosB mote is an open source platform designed to enable and accelerate WSN experimentation and understanding. TelosB is IEEE 802.15.4/ZigBee compliant, has a data rate of 250 kbps, an 8 MHz TI MSP430 microcontroller with 10kB RAM, and 1MB external ash for data logging [48]. The TelosB motes in this experiment are equipped with light sensors and run TinyOS 1.1.10, an open source, component-based, energyecient operating system developed by UC Berkeley which supports large scale, self-conguring sensor networks [39].
Testbed deployment
Base station
Figure 6.8.
Photograph of testbed deployment. Testbed deployment of 16 nodes
+ 1 base station at the Wireless Sensor Network Laboratory at the University of Maine Department of Electrical and Computer Engineering.
An experimental 2d-deployed testbed of TelosB motes is developed at the Wireless Sensor Network Laboratory (WiSe-Net) at the University of Maine Department of Electrical and Computer Engineering [72]. The primary goals of the testbed are to validate the algorithm, conrm localization of computation, and determine the
123
relation between the communication cost and component size of topological events being computed.
Since transception draws more power than internal processing,
and transmission and reception costs are roughly equivalent for the TelosB, overall network cost is assessed through data transmission per node, in bytes [39]. 2d deployments consist of one 9-node deployment and two 16-node deployments. Nodes are congured in square grid and randomized geometries.
Over the 3 WSN de-
ployments, a total of 50 event trials were conducted. For each event trial, a sensor node is exposed to light, either creating a new component or altering an existing component, thereby simulating one of the ve topological events of interest. Groups of event trials are executed sequentially to better simulate evolving environmental phenomena and to conrm the algorithm operates correctly over time. Prior to each deployment, MATLAB R2009b is used to determine precise node locations, generate the Delaunay graph of the WSN, and parse this data to node-level Delaunay information [47]. Code corresponding to the second task makes use of algorithms available through the open source Computational Geometry Algorithms Library [9]. Twelve consecutive event trials for the 16-node, grid deployment are shown in Figure 6.9. Results for the remaining 50 trials prove similar and are not presented for space reasons. Filled white circles illustrate that a sequence of bursts of light has been delivered to nodes using a halogen lamp. A dashed circumference indicates that light has been delivered to the node shown for the current event trial, i.e. a dashed circumference marks the critical node. All other circles indicate the light was delivered during a previous event trial. White edges/faces do not represent delivery of light to the WSN but the construction of 1- and 2-simplices by the algorithm. For this gure, frames are in chronological sequence from left-to-right column, top-to bottom row. Figure 6.10 presents the corresponding number of bytes transmitted per node for each of the twelve event trials in Figure 6.9, in the same order, e.g. the top left
124
frame of Figure 6.9 corresponds to the top left frame of Figure 6.10.
Comparing
the two gures, a few observations can be made. First, the critical node and nodes belonging to the evolving component transmit the most data. Second, neighbors of the evolving component that are below threshold transmit very little data; generally an ACK package. Third, nodes that are two or more hops from the evolving component, including nodes belonging to a dierent component, transmit no data during computations. Thus, each event draws on nodes that are spatially tied to the event. To quantify the aforementioned observations, mean data transmitted for each category of node over the 50 event trials is shown in Figure 6.11(i). node,
Crit,
The critical
averages 54 bytes per event trial; neighbors of the critical node above
sensor threshold,
v(Lk 1 ),
same component
C
average 59 bytes per event trial; nodes belonging to the
as the critical node,
v(C) − v(Lk 1 ) − Crit,
per event trial; nodes neighboring component trial; nodes not neighboring component
average 54 bytes
C , N br(C), average 9 bytes per event
C , v(K)−v(C)−N br(C), transmit precisely
0 bytes per event trial. As shown in Figure 6.11(ii), transmitted data, (number of nodes), display a linear relationship,
T x (bytes) and component size, C T x = 57.72C + 3.50,
nent size accounting for about 97% of the variance of
with compo-
T x (R2 = 0.9735).
the source data indicates that the remaining variance of
Analysis of
T x is explained by:
number
of critical node's neighbors and data retransmission arising from lost packets.
125
1
2
3
4
1
2
3
4
1
2
3
4
5
6
7
8
5
6
7
8
5
6
7
8
9
10
11
12
9
10
11
12
9
10
11
12
13
14
15
16
13
14
15
16
13
14
15
16
1
2
3
4
1
2
3
4
1
2
3
4
5
6
7
8
5
6
7
8
5
6
7
8
9
10
11
12
9
10
11
12
9
10
11
12
13
14
15
16
13
14
15
16
13
14
15
16
1
2
3
4
1
2
3
4
1
2
3
4
5
6
7
8
5
6
7
8
5
6
7
8
9
10
11
12
9
10
11
12
9
10
11
12
13
14
15
16
13
14
15
16
13
14
15
16
1
2
3
4
1
2
3
4
1
2
3
4
5
6
7
8
5
6
7
8
5
6
7
8
9
10
11
12
9
10
11
12
9
10
11
12
13
14
15
16
13
14
15
16
13
14
15
16
Figure 6.9.
Twelve trials of testbed deployment.
Twelve consecutive event trials
for a 16-node testbed deployment of TelosB motes, ordered from left-to-right, topto-bottom. A white circle with dashed circumference indicates that light has been delivered to the node shown for the current event trial. All other circles indicate the light was delivered during a previous event trial.
White edges/faces do not
represent delivery of light to the WSN but the construction of 1- and 2-simplices by the algorithm.
126
15 10 5 0 5
6
7
8
9 10 11 12 13 14 15 16
1
2
3
4
5
6
7
50 40 30 20 10 0 2
3
4
5
6
7
8
9 10 11 12 13 14 15 16
5
6
7
8
40 30 20 10 0 1
2
3
4
5
6
7
9 10 11 12 13 14 15 16
5
6
7
8
6
7
1
2
3
4
5
6
7
20 10 0 3
4
5
6
7
8
9 10 11 12 13 14 15 16
9 10 11 12 13 14 15 16
60 50 40 30 20 10 0 1
2
3
4
5
6
7
50 40 30 20 10 0 2
3
4
5
6
7
8
8
9 10 11 12 13 14 15 16
Accretion at Node 10
60
1
9 10 11 12 13 14 15 16
Node
70
Node
8
Accretion at Node 15
30
2
9 10 11 12 13 14 15 16
Node
40
1
8
90 80 70 60 50 40 30 20 10 0
Self-m erge at Node 8 Data Transmitted (bytes)
Data Transmitted (bytes)
4
9 10 11 12 13 14 15 16
50
Merge at Node 14
3
5
Node
80 70 60 50 40 30 20 10 0 2
8
60
Node
1
4
Appearance at Node 12 Data Transmitted (bytes)
Data Transmitted (bytes)
4
3
Merge at Node 5
50
Merge at Node 2
3
2
Node
80 70 60 50 40 30 20 10 0 2
1
Node
60
Node
1
9 10 11 12 13 14 15 16
Appearance at Node 6 Data Transmitted (bytes)
Data Transmitted (bytes)
Accretion at Node 3 60
1
8
Node
Node
Data Transmitted (bytes)
4
Data Transmitted (bytes)
3
50 45 40 35 30 25 20 15 10 5 0
9 10 11 12 13 14 15 16
Data Transmitted (bytes)
2
40 35 30 25 20 15 10 5 0
Data Transmitted (bytes)
20
Data Transmitted (bytes)
Data Transmitted (bytes)
25
1
Appearance at Node 9
Appearance at Node 4
Appearance at Node 1 30
100 90 80 70 60 50 40 30 20 10 0 1
2
3
4
5
Node
6
7
8
9 10 11 12 13 14 15 16
Node
Figure 6.10. Total transmitted data per node. Total transmitted data in bytes per
Total Data Transm itted vs. Com ponent Size
Mean Data Transm itted Per Node Type Tx, Transmitted Data (bytes)
Mean Data Transmitted (bytes)
node for each event trial shown in Figure 6.9.
70 60 50 40 30 20 10 0
Crit
Figure 6.11.
v(Lk1)
v(C)-v(Lk1)-Crit
Nbr(C)
v(K)-v(C)-Nbr(C)
1000 900 800 700 600 500 400 300 200 100 0
Tx = 57.72C + 3.50 R 2 = 0.9735
0
5
10
15
Node Type
C, Com ponent Size (nodes)
(i)
(ii)
20
Aggregated results of testbed trials. For the 50 event trials, (i) mean
data transmitted over all events per node type, and (ii) linear regression of total data transmitted versus component size, measured in number of nodes.
127
6.3 Discussion Simulation and testbed results validate important features of the algorithm. Some of these features are common to both test environments, while others are specic to simulations or the testbed but not both. For the simulation trials, the following summary of results can be given:
1.
h1 , ∆h0 ,
and
∆h1
are correctly computed in-network for each of the events
investigated.
2. The total time to compute an event increases linearly with the number of nodes in the component.
3.
g1
and
g2
are correctly computed to support event detection in the 3d simula-
tion environment.
4. Non-incremental events can be correctly computed, though scaling and the interpretation of composite events have not been addressed.
For the testbed deployments, we have the following summary:
1.
h1 , ∆h0 ,
and
∆h1
are correctly computed in-network for each of the events
investigated.
2. Local data is sucient to maintain and update component membership for each node in the network.
3. The total data transmitted while computing a connectivity event increases linearly with component size.
4. Nodes more than 1 hop from the component undergoing change do not participate in the computation.
128
The focus of this research is incremental connectivity events, topological events resulting from the change of sensor status of a single node between two consecutive network states. By incorporating a network token, correct computations could be executed for non-incremental atomic and composite events as well [43]. In particular, a unique network token could prevent the occurrence of multiple critical nodes at any given state of operation, ensuring non-incremental events could be computed as a sequence of incremental events. To accommodate large-scale, non-incremental events, scalability could be improved through WSN clustering [5]. For example, by assigning cluster heads to groups of nodes in geographical proximity, updates could be computed and propagated via cluster heads as opposed to the ooding routine used in this research. Incorporating clustering would result in a trade-o between the cost/time of at routing and the resources required to maintain data about the entire cluster at the cluster head.
Lk ,
Finally, a more generalized notion of the link,
would have to be developed to account for the link of an entire cluster, versus
individual nodes, as in this work. While node positions are determined prior to deployment, virtual coordinate algorithms have been, and continue to be, developed that allow for on-the-y calculation of the relative coordinates of the nodes in a network [11], [49]. Furthermore, while the Delaunay graph can only be computed in a centralized fashion, there are variants of the Delaunay graph that can be computed in a distributed fashion [28]. Incremental algorithms have been developed to update a Delaunay graph when a limited number of nodes are added to, or removed from the graph, or when nodes are not stationary [14], [32]. Therefore, in future work/deployments, a distributed virtual coordinate algorithm could be used to deliver each node its relative coordinates and nodes could compute and store Delaunay-like neighbor information after relative coordinates are determined, and also update this data when nodes are added to, or removed from, the WSN.
129
The algorithm developed in this research only has one mechanism to deal with failed communication, message retransmission. To extend this work, more signicant communication failure, along with node failure, need to be considered. For example, how should computations proceed if a critical node discovers one of its neighbors is no longer transmitting messages?
Such failure could occur when the critical
node is computing the simplicial complex of the evolving component, along with the component's topology or when the critical node has completed computations, transmitted updates, and is awaiting ACKs from its neighbors before entering WAIT state. Persisting node failure would require
v(Lk)
and
e(Lk)
to be recomputed for
all nodes neighboring the failed node, and simplicial complex and topology data to be updated appropriately.
130
Chapter 7 CONCLUSIONS Wireless sensor networks (WSNs) can span large geographical regions and collaboratively monitor environmental phenomena, e.g.
forest res.
By designing a
WSN to detect changes to such phenomena, current environmental monitoring systems could be supplemented, if not replaced.
This dissertation focused on incre-
mental events, events arising from the elevation of a single node's sensor reading between two consecutive states of network operation. Homology, a eld of topology, was used to detect and dierentiate between
connectivity events,
incremental
events of interest. Homology tools were translated to a distributed environment for 2d and 3d WSN deployments. The result is a novel distributed algorithm that can compute a connectivity event associated with a region comprising n nodes in O(n) time, using O(n) storage, and O(n) data passed via messages. Simulations and a small-scale, laboratory testbed were developed to evaluate the algorithm. Deployment results indicate that only nodes in physical proximity to an event are tasked, thereby conserving network resources and allowing multiple disparate events to be simultaneously monitored.
7.1 Evaluation of Hypothesis 7.1.1 Correct Computation of Connectivity Events Each connectivity event was computed successfully via testbed deployments (restricted to 2d deployments) and simulation trials (2d and 3d deployments).
For
simulation runs, the outcome was compared against CHomP when possible, which included for 2d deployments: appearance, disappearance, hole loss, hole formation, merge, split, self-merge, and self-split; and for 3d deployments: appearance, disap-
131
pearance, tunnel loss, tunnel formation, cavity loss, cavity formation, merge, split, self-merge, and self-split. Singularity loss and singularity formation were evaluated without a baseline comparison. Besides algorithm-to-algorithm comparison, visual inspection of the simulations and testbed deployments was carried out.
7.1.2 Complexity of Algorithm Time, message, and storage complexity were found to be linear in cost with respect to the number of nodes in the evolving component. This was proven formally for 2d incremental insertion events and evaluated experimentally for 2d and 3d incremental events. Although computations have linear time complexity, certain groups of connectivity events can be distinguished in cost. 2d events can be placed in ascending order of computational cost as follows: appearance and disappearance; hole formation, hole loss, merge, self-merge, accretion, attrition, singularity formation, and singularity loss; split and self-split. Appearance and disappearance dierentiate from all other events since only a single node is involved. The second group's additional cost is a result of utilizing the component update discovery routine. Finally, split and self-split require the greatest computational cost since component update discovery and split discovery routines are called. For 3d events, computational cost straties similarly. In ascending order: appearance and disappearance; cavity formation, cavity loss, tunnel formation, tunnel loss, merge, self-merge, accretion, attrition, singularity formation, and singularity loss; split, self-split, self-merge (cavity formation and tunnel loss), and self-split (cavity loss and tunnel loss). Appearance and disappearance cost the least for the same reason as in 2d incremental events. The second group's cost, like 2d deployments, is mainly due to calling the component update discovery routine. Finally,
132
the third group calls both component update and discover hole type or discover split routines, resulting in the greatest cost.
7.1.3 Localized Computation Testbed deployments conrmed localization of computation for 2d connectivity events.
This is most clearly illustrated in Figure 6.10, which presents the mean
data transmitted per node type. In particular, nodes further than one hop from the component undergoing change, or execute internal processing. change,
Crit,
N br(C),
v(K) − v(C) − N br(C),
did not transmit packets
Nodes one hop from the component undergoing
transmitted minimal data, an ACK message. The critical node,
neighbors of the critical node,
v(C) − v(Lk 1 ) − Crit,
v(Lk 1 ),
and nodes of the evolving component,
transmit the majority of data, and therefore account for the
majority of the overall computations. Thus, event detection only tasks those nodes in physical proximity of the event, as desired.
7.2 Results and Major Findings 7.2.1 Incorporating Homology into a Distributed Model This research presents the rst reported distributed event detection model for WSNs that incorporates the underpinnings of homology theory, the Betti numbers in particular.
The algorithm is developed for 2d and 3d WSN deployments.
To
translate centralized Betti number computations to a distributed environment, the high cost of maintaining incidence matrices and computing the incidence matrices' corresponding ranks were substituted with local node computations. the component of
E1
3-tuple, k -link,
without maintaining
E1
Specically,
and link case were constructed to compute the rank itself.
133
7.2.2 Event Detection in the 3d Environment 2d WSN deployment modeling is the predominant design though 3d deployments potentially have a wide span of applications, e.g. monitoring.
water reservoir and air quality
This work developed a foundation for 3d event detection and tested
the model in a WSN simulation environment, though the model could just as easily be applied in other monitoring contexts. The simplex connectivity numbers rene the Betti number's ability to dierentiate between topologically dierent simplicial complexes in any dimension. Table 4.7 and Tables 4.10 and 4.11 conrm this for simplicial complexes embedded in
R3 .
7.2.3 Singularity Detection In this work, the formation or loss of a singularity is included as two of the key connectivity events. In so doing, topological classication is rened, and consequently, event detection. Furthermore, singularity detection is expected to support the prediction of connectivity or other topological events, e.g.
a component that
gains a singularity may be expected to split into two separate components. Event prediction was not evaluated.
7.3 Future Work 7.3.1 Incorporating Uncertainty Formal and simulation models are developed using a single, precise threshold as the basis for component membership.
The TinyOS testbed made use of lower
and upper thresholds to prevent unwanted uctuation of a node between elevated and depressed node status. This suggests the need for a designated range of sensor value that falls within ambient conditions, bounded by lower and upper thresholds, determined by the WSN's application.
Thus, the implicit use of uncertainty to
stabilize the evolving phenomena according to the monitoring needs. By dividing
134
the scalar range into three components - below ambient conditions, within ambient conditions, above ambient conditions - rough sets can be drawn on in a natural way. Uncertainty can also refer to communication uncertainty.
Specically, how can
the algorithm be designed to deal with dropped packets and noisy communication environments?
time Figure 7.1. Non-incremental events. Four stages of a deployed WSN as it monitors a dynamic scalar eld, indicated by blue regions. Each red rectangle represents a nonincremental atomic event. The rst, hole formation; the second, self-split; the third, split. Future work should address scalable monitoring of large scale non-incremental events.
7.3.2 Non-incremental Events Figure 7.1 illustrates four snapshots of a WSN. From left to right, the topological events are hole formation, self-split, and split. In each instance, two or more nodes change status, i.e. each event is non-incremental. Assuming only one node executes the critical section of code at any given moment, a non-incremental event requires correctly interpreting and reducing the results of all critical nodes to an atomic or composite topological event in a scalable manner. WSN clustering (Section 2.5 could be employed to handle such events. For example, by assigning cluster heads to groups of nodes in geographical proximity, updates could be computed and propagated via cluster heads as opposed to the ooding routine used in this research. Incorporating clustering would result in a trade-o between the network cost/time
135
of at routing and the resources required to maintain data about each cluster at each cluster head. Also, a more generalized notion of the link, Lk, would have to be developed to account for the link of an entire cluster, versus individual nodes, as in this work.
136
REFERENCES [1] M.K. Agoston.
Algebraic Topology: A First Course.
[2] I.F. Akyildiz, D. Pompili, and T. Melodia.
State of the art in protocol re-
search for underwater acoustic sensor networks.
Commun. Rev., 11(4):1122, 2007. [3] E. Artin and H. Braun.
Marcel Dekker, Inc., 1976.
SIGMOBILE Mob. Comput.
Introduction to Algebraic Topology.
C.E. Merrill Pub-
lishing, Co., 2000.
STOC '02: Proceedings of the 34th Annual ACM Symposium on Theory of Computing, pages
[4] S. Basu. Computing the betti numbers of arrangements. In 712720, New York, NY, USA, 2002. ACM.
Wireless Networks, pages 461478, Netherlands, 2003. Kluwer Academic Publishers.
[5] E. Belding-Royer. Multi-level hierarchies for scalable ad hoc routing. In
[6] M. Bern, D. Eppstein, P. Agarwal, and N. Amenta. computational topology.
Emerging challenges in
NSF-funded Computational Topology Workshop, 1999.
[7] E. Betti. Sopra gli spazi di un numero qualunque di dimensioni.
Pura Appl., 2(4):140158, 1871.
[8] L.E.J. Brouwer. Beweis der invarianz der dimensionzahl.
Ann. Math.
Math. Ann., 70:161
165, 1911. [9] Computational geometry algorithms library, 2010. http://www.cgal.org/. Computational geometry: a retrospective. In STOC '94: Proceedings of the 26th Annual ACM Symposium on Theory of Computing, pages
[10] B. Chazelle.
7594, New York, NY, USA, 1994. ACM. [11] F. Dabek, R. Cox, F. Kaashoek, and R. Morris. Vivaldi: A decentralized network coordinate system. In
Proceedings of the ACM SIGCOMM '04 Conference,
Portland, Oregon, August 2004. [12] M. de Berg, M. van Kreveld, M. Overmars, and O. Schwarzkopf.
Geometry: Algorithms and Applications.
[13] C.J.A. Delnado and H. Edelsbrunner.
Springer, 2000. An incremental algorithm for betti
numbers of simplicial complexes on the 3-spheres.
Design, 12(7):771784, 1995.
Computational
Computer Aided Geometric
SCG '99: Proceedings of the 15th Annual Symposium on Computational Geometry, pages 181188,
[14] O. Devillers. On deletion in delaunay triangulations. In New York, NY, USA, 1999. ACM.
137
[15] T.K. Dey and S. Guha. Computing homology groups of simplicial complexes 3 in R . , 45(2):266287, 1998.
Journal of the ACM
[16] M. Duckham, S. Nittel, and M.F. Worboys. Monitoring dynamic spatial elds
GIS '05: Proceedings of the 13th Annual ACM International Workshop on Geographic Information Systems, pages using responsive geosensor networks. In
5160, New York, NY, USA, 2005. ACM. [17] D.S. Dummit and R.M. Foote. [18] H. Edelsbrunner.
Abstract Algebra.
Wiley, 3 edition, July 2003.
Algorithms in combinatorial geometry.
Springer-Verlag New
York, Inc., New York, NY, USA, 1987. [19] H. Edelsbrunner, M. J. Ablowitz, S. H. Davis, E. J. Hinch, A. Iserles, J. Ock-
Geometry and Topology for Mesh Generation (Cambridge Monographs on Applied and Computational Mathematics). Cambridge endon, and P. J. Olver.
University Press, New York, NY, USA, 2006. [20] H. Edelsbrunner, D. Letscher, and A. Zomorodian.
Topological persistence
FOCS '00: Proceedings of the 41st Annual Symposium on Foundations of Computer Science, page 454, Washington, DC, USA, 2000. and simplication. In
IEEE Computer Society. [21] H. Edelsbrunner, D. Morozov, and V. Pascucci. Persistence-sensitive simpli-
SCG '06: Proceedings of the 22nd Annual Symposium on Computational Geometry, pages 127134, New York, NY, USA, cation functions on 2-manifolds. In 2006. ACM.
[22] Q. Fang, J. Gao, and L.J. Guibas. networks.
Locating and bypassing holes in sensor
Mobile Networking Applications, 11(2):187200, 2006.
[23] C. Farah, F. Schwaner, A. Abedi, and M. Worboys.
Distributed homology
algorithm to detect topological events via wireless sensor networks.
IET WSS,
1:151160, 2011. [24] C. Farah and M.F. Worboys. Qualitative analysis of a scalar eld via a wireless
Proceedings of the 7th International Conference on Geographic Information Science: Abstracts, Munster, Germany, 2006. Springersensor network.
In
Verlag. [25] C. Farah, C. Zhong, M.F. Worboys, and S. Nittel. Detecting topological change
GIScience '08: Proceedings of the 5th international conference on Geographic Information Science, pages 5569, Berlin, using a wireless sensor network. In Heidelberg, 2008. Springer-Verlag.
[26] S. Funke. Topological hole detection in wireless sensor networks and its applications.
In
DIALM-POMC '05: Proceedings of the 2005 Joint Workshop on 138
Foundations of Mobile Computing,
pages 4453, New York, NY, USA, 2005.
ACM. [27] S. Funke and N. Milosavljevic.
Network sketching or: how much geometry
Technical Report: Max Planck Center for Visual Computing and Communication, pages 110. Max-Planck-Institut fu¨r hides in connectivity? - part ii. In
Informatik 2007. [28] J. Gao, L.J. Guibas, J. Hershberger, L. Zhang, and A. Zhu. Geometric spanner
MobiHoc '01: Proceedings of the 2nd ACM International Symposium on Mobile Ad hoc Networking & Computing, pages for routing in mobile networks. In
4555, New York, NY, USA, 2001. ACM. [29] D. Gay, P. Levis, and D. Culler. Software design patterns for tinyos.
tions on Embedded Computing Systems, 6(4):22, 2007.
Transac-
[30] D. Gay, M. Welsh, P. Levis, E. Brewer, R. Von Behren, and D. Culler. The nesc
Proceedings of the ACM SIGPLAN 2003 conference on Programming language design and implementation, PLDI '03, pages 111, New York, NY, USA, 2003. ACM. language: A holistic approach to networked embedded systems. In
[31] R. Ghrist and A. Muhammad. Coverage and hole-detection in sensor networks
IPSN '05: Proceedings of the 4th International Symposium on Information Processing in Sensor Networks, page 34, Piscataway, NJ, USA, via homology. In
2005. IEEE Press. [32] L.J. Guibas and D. Russel. An empirical comparison of techniques for updating
SCG '04: Proceedings of the 20th Annual Symposium on Computational Geometry, pages 170179, New York, NY, USA, 2004. delaunay triangulations. In
ACM. [33] M. Henle.
A Combinatorial Introduction to Topology.
Dover Publications,
March 1994. [34] Institute for electrical and electronic engineers, 2010. http://www.ieee.org/. [35] J. Jiang and M.F. Worboys. objects. In
Event-based topology for dynamic planar areal
International Journal of Geographic Information Science, 2007.
[36] J. Jiang and M.F. Worboys.
Detecting basic topological changes in sensor th
ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, 2008. networks by local aggregation. In
16
[37] G. Jin and S. Nittel. Ecient tracking of 2d objects with spatiotemporal properties in wireless sensor networks.
Distrib. Parallel Databases, 29:330, February
2011.
139
[38] Lydia Kronsjö.
Algorithms: their complexity and eciency (2nd ed.).
John
Wiley & Sons, Inc., New York, NY, USA, 1987. [39] P. Levis.
Tinyos: An open platform for wireless sensor networks.
Technical
report, Stanford University, Nara, Japan, 2006. [40] Mo Li and Yunhao Liu. Underground structure monitoring with wireless sensor
IPSN '07: Proceedings of the 6th international conference on Information processing in sensor networks, pages 6978, New York, NY, USA, networks.
In
2007. ACM. [41] X.Y. Li, G. Calinescu, P.J. Wan, and Y. Wang. Localized delaunay triangulation with application in ad hoc wireless networks.
Parallel and Distributed Systems, 14:10351047, 2003.
IEEE Transactions on
[42] J. Liu, P. Cheung, F. Zhao, and L. Guibas. A dual-space approach to tracking
WSNA '02: Proceedings of the 1st ACM International Workshop on Wireless Sensor Networks and Applications, pages 131139, New York, NY, USA, 2002. ACM. and sensor management in wireless sensor networks. In
[43] N.A. Lynch. Distributed computing theory: algorithms, impossibility results,
STOC '07: Proceedings of the 39th Annual ACM Symposium on Theory of Computing, pages 247247, New York, NY, USA, 2007. models, and proofs. In ACM.
[44] I. Mahgoub and M. Ilyas.
Sensor Network Protocols.
Taylor and Francis, CRC
Press, 2006. [45] Alan Mainwaring, David Culler, Joseph Polastre, Robert Szewczyk, and John
Proceedings of the 1st ACM international workshop on Wireless sensor networks and applications, WSNA '02, pages 8897, New York, NY, USA, 2002. ACM. Anderson. Wireless sensor networks for habitat monitoring. In
[46] D. Maraldo and R. Mutharasan. cherichia coli o157:
Preparation-free method for detecting es-
H7 in the presence of spinach, spring lettuce mix, and
ground beef particulates.
Journal of Food Protection, 70(11):26512655, 2007.
[47] Matlab and simulink, 2010. http://www.mathworks.com/. [48] Telosb mote platform, 2010. http://www.memsic.com/. [49] Thomas Moscibroda, Regina O'Dell, Mirjam Wattenhofer, and Roger Watten-
DIALM-POMC '04: Proceedings of the 2004 joint workshop on Foundations of mobile computing, pages 816, New York, NY, USA, 2004. ACM. hofer. Virtual coordinates for ad hoc and sensor networks. In
[50] J.R. Munkres.
Elements of Algebraic Topology.
1993.
140
Westview Press, December
[51] J.R. Munkres.
Topology (2nd Edition).
Prentice Hall, 2000.
[52] Wildre growth around yellowstone national park in 1988, scientic visualization studio, goddard space ight center, 2010. http://svs.gsfc.nasa.gov/vis/. [53] S. Nittel, N. Trigoni, K. Ferentinos, F. Neville, A. Nural, and N. Pettigrew. A
Proceedings of the 6th ACM international workshop on Data engineering for wireless and mobile access, MobiDE '07, pages 4958, New York, NY, USA, 2007. ACM. drift-tolerant model for data management in ocean sensor networks. In
[54] Open
systems
interconnection,
2011.
http://standards.iso.org/ittf/
Pub-
liclyAvailableStandards/s020269_ISO_IEC_7498-1_1994(E).zip. [55] H. Poincare ´. Complement a l'analysis situs.
di Palermo, 13:285343, 1899.
Rendiconti del Circolo Matematico
[56] H. Poincare ´. Second complement a l'analysis situs.
Mathematical Society, 32:277308, 1900.
Elements of Distributed Algorithms: Modeling and Analysis with
[57] W. Reisig.
Petri Nets.
Proceedings of the London
Springer-Verlag, September 1998.
[58] E. Royer and C. Perkins. Multicast operation of the ad-hoc on-demand distance vector routing protocol.
In
MobiCom,
pages 207218, New York, NY, USA,
1999. ACM. [59] M.J. Sadeq and M. Duckham. Eect of neighborhood on in-network processing in sensor networks.
Proceedings of the 8th International GIScience Conference,
2008. [60] P. Santi.
Topology control in wireless ad hoc and sensor networks.
Computing Survey, 37(2):164194, 2005.
ACM
[61] B. Shen and A. Abedi. A simple error correction scheme for performance improvement of ieee 802.15.4. In
Networks, 2007.
ICWN '07: International Conference on Wireless
[62] Wen-Zhan Song, Renjie Huang, Mingsen Xu, Andy Ma, Behrooz Shirazi, and Richard LaHusen. Air-dropped sensor network for real-time high-delity vol-
MobiSys '09: Proceedings of the 7th international conference on Mobile systems, applications, and services, pages 305318, New York, cano monitoring. In
NY, USA, 2009. ACM. [63] Ivan Stoianov, Lama Nachman, Sam Madden, and Timur Tokmouline. Pipeneta
IPSN '07: Proceedings of the 6th international conference on Information processing in sensor networks, wireless sensor network for pipeline monitoring. In pages 264273, New York, NY, USA, 2007. ACM.
141
[64] Robert Szewczyk, Alan Mainwaring, Joseph Polastre, John Anderson, and David Culler.
An analysis of a large scale habitat monitoring application.
SenSys '04: Proceedings of the 2nd international conference on Embedded networked sensor systems, pages 214226, New York, NY, USA, 2004. ACM. In
[65] G. Tel.
Introduction to Distributed Algorithms.
Cambridge University Press,
Cambridge, United Kingdom, 2 edition, 2000. [66] Tinyos, 2011. http://www.tinyos.net/. [67] G. W. A. M. van der Heijden, J. G. P. W. Clevers, and A. G. T. Schut. Combining close-range and remote sensing for local assessment of biophysical characteristics of arable land.
International Journal of Remote Sensing, 28(24):5485
5502, 2007. [68] I. Vasilescu, K. Kotay, D. Rus, M. Dunbabin, and P. Corke. Data collection,
SenSys '05: Proceedings of the 3rd International Conference on Embedded Networked Sensor Systems, pages 154165, New York, NY, USA, 2005. ACM. storage, and retrieval with an underwater sensor network. In
[69] J.W. Vick.
Homology Theory: An Introduction to Algebraic Topology. Springer-
Verlag, Inc., New York, NY, USA, 2 edition, 1994. [70] A. Wallace.
Algebraic Topology: Homology and Cohomology.
W.A. Benjamin,
Inc., New York, NY, USA, 1970. [71] Geo Werner-Allen, Konrad Lorincz, Je Johnson, Jonathan Lees, and Matt Fidelity and yield in a volcano monitoring sensor network. In OSDI '06: Proceedings of the 7th symposium on Operating systems design and implementation, pages 381396, Berkeley, CA, USA, 2006. USENIX Association. Welsh.
[72] Wise-net lab, 2010. http://wisenet.eece.maine.edu/. [73] F. Zhao and L.J. Guibas.
ing Approach.
Wireless Sensor Networks: An Information Process-
Morgan Kaufmann Publications, Elsevier, Inc., San Francisco,
CA, USA, 2004.
142
Appendix A PROOFS A.1 Betti Numbers A.1.1 The n-Crimped Sphere The
n-crimped
sphere generalizes the crimped sphere.
In particular it has
n
non-intersecting cycles, each of which is identied with an edge, distinct from the identied edge of any of the other
n-pinched
the
a1
P2
b2
P3
a2 F1
Q1
Q2
F2
Q3
Figure A.1.
b2
Pn+2
bn+1
an+2
an+1
...
a3
P2
b1
Pn+1
a3
a2
a1 P1
cycles. A quotient map representation of
sphere is shown in Figure A.1.
b1
P1
(n − 1)
Qn+1
Fn+1
Qn+2 an+2
an+1
P3
Pn+1
Quotient map representation of the
The corresponding incidence matrices for the
n-crimped
n-crimped
Pn+2
bn+1 sphere
sphere are presented in
Table A.1. From the quotient map in Figure A.1,
V = 2n + 4, E = 2n + 3,
Furthermore, row reduction of the incidence matrices yields and
|E2 | = 0.
h1 = 0
and
and
F = n + 1.
|E0 | = 2n + 3, |E1 | = 0
Substituting these values into Formula 2.2, one obtains
h2 = n + 1.
When
n
h0 = 1,
is 1, this result agrees with the Betti numbers for
the crimped sphere.
143
Table A.1.
E2
E0 P1 Q1 P2 Q2 P3 Q3
a1 2 −2 0 0 0 0
b1 −2 0 2 0 0 0
a2 b2 0 0 0 0 2 −2 −2 0 0 2 0 0
. . .
. . .
. . .
. . .
. . .
Pn+1 Qn+1 Pn+2 Qn+2
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
··· ··· ··· ··· ··· ··· ···
an+1 0 0 0 0 0 0
bn+1 0 0 0 0 0 0
an+2 0 0 0 0 0 0
. . .
. . .
. . .
. . .
··· ··· ··· ···
2 −2 0 0
−2 0 2 0
0 0 2 −2
Non-trivial incidence matrices for the
are withheld, since they are trivial.
144
n-crimped
sphere. Here,
E1
and
A.1.2 The n-Crimped Torus The
n-crimped
torus generalizes the crimped torus. In particular it has
n
non-
intersecting transverse cycles, each of which is identied with an edge, distinct from the identied edge of any of the other representation of the
b1
P1 a1
n-pinched
P3
a2
Q3
a2
a1 P1
Figure A.2.
...
Fn+1
Q1 a1
an+1
P3
b2
a1 Qn+1
a3
P2
b1
P1
an+1
F2
Q2
bn+1
Pn+1
a3
F1
Q1
transverse cycles. A quotient map
torus is shown in Figure A.2.
b2
P2
(n − 1)
A quotient map representation of the
P1
Pn+1
bn+1
n-crimped
torus
The corresponding non-trivial incidence matrices for the
n-crimped
torus are
presented in Table A.2.
Table A.2.
E2
E0 P1 Q1 P2 Q2 P3 Q3
a1 4 −4 0 0 0 0
b1 −2 0 2 0 0 0
a2 0 0 2 −2 0 0
b2 0 0 −2 0 2 0
. . .
. . .
. . .
. . .
. . .
Pn+1 Qn+1
0 0
0 0
0 0
0 0
··· ··· ··· ··· ··· ··· ···
an+1 0 0 0 0 0 0
bn+1 2 0 0 0 0 0
. . .
. . .
. . .
··· ···
2 −2
−2 0
Non-trivial incidence matrices for the
n-crimped
torus. Here,
E1
and
are withheld, since they are trivial.
From the quotient map in Figure A.2,
V = 2n + 2, E = 2n + 2,
Furthermore, row reduction of the incidence matrices yields and
|E2 | = 0.
and
F = n + 1.
|E0 | = 2n + 1, |E1 | = 0
Substituting these values into Formula 2.2, one obtains
145
h0 = 1,
h1 = 1
and
h2 = n + 1.
When
n
is 1, this result agrees with the Betti numbers for
the crimped torus.
A.1.3 The Pinched Solid Sphere The pinched solid sphere is a pinched sphere that includes its interior.
The
corresponding incidence matrices for the pinched solid sphere are presented in Table A.3.
E0 P Q R
a −2 2 0
Table A.3.
b 0 −2 2
E1 a b
F 0 0
G 0 0
E2 F G
HF1 1 0
Incidence matrices for the pinched solid sphere
From the quotient map in Figure A.1,
V = 3, E = 2, F = 2,
Furthermore, row reduction of the incidence matrices yields
|E2 | = 2.
HF2 0 1
and
HF = 2.
|E0 | = 2, |E1 | = 0
and
Substituting these values into Formula 2.2 of Section 2.2.2, one obtains
h0 = 1, h1 = 0
and
h2 = 0.
A.2 Petri Net for 2-Node System The Petri net in Figure A.3 is a result of connecting the Petri nets (Figure 3.18) of two individual nodes through the communication medium. In particular,
request and
and
tx token
tx token granted, t1 and t2 , of one node are connected to rx token request
rx token granted, r2
and
are made through transitions
r2 ,
of the other node, respectively. These connections
P1 , P2 , P3 ,
and
P4 ,
each representing the passage of a
particular message type through the communication medium. Table A.4 presents the six general regions of incidence matrix Regions
0
S1 × T1
and
S1 × T2
Σ3 , of Petri net
∑
3.
are copies of the incidence matrix in Table 3.1. Regions
indicate that no place in node 1 (node 2) is incident to any transition in node 2
146
Sensor operation
sensor same
sensor change
sensor same
sensor change
s1
s2
s1
s2
S2
S1
sensor interrupt
sensor interrupt
s0
S1
rx other msg
wait
rx other msg
critical pending
w
token available
msg interrupt
r0
g0
C0
P1
tx token request
r2
g0
R2
C2
c1
t0
wait for token
tx token granted
G0
R3
C2
c1
tx token granted
g1 token granted
C1
t0
wait for token
t2
T2
g1 c2
request token msg tx
r3
P2
t1
T1
k1
rx token granted
grant token
G2
C0
token request msg tx
G0
Message transmission
rx token request
request token
token request
g2
token available
U k0
t1
T1
k1
rx token granted
R3
c0
r0
tx token request
R2
critical pending
w
msg interrupt Message transmission
k0
token granted
S2
R1
U
rx token request
r3
wait
r1
c0
R1
r2
s0
Message reception
Message reception
r1
Sensor operation
t2
T2
grant token
g2
c2
G2
C1
critical
critical
P4 P3
Figure A.3. Petri net of a 2-node system, constructed by constructing two instances
Σ1
of Petri net reception,
r2
and joining the nets between states of transmission,
and
t1
and
t2 ,
and
r3 .
Σ3
Node 1 Transitions
Medium
Node 2 Transitions
Node 1 Places
P1 × T1
C1
0
Node 2 Places
0
C2
P2 × T2
Table A.4. Incidence matrix between states and transitions of the Petri net in Figure A.3
(node 1). Finally, regions
C1
and
C2
represent the incidence relations between node
1 and node 2, respectively, with the transitions
P1 , P2 , P3 , and P4 .
invariants, it suces to show that the solution to by some vector computes
i
i.
ΣT3 · i = 0
To identify place
is satised non-trivially
The equation is solved via MATLAB's function
using QR factorization with column pivoting.
i
linsolve,
which
is found to be trivial
and therefore, no non-trivial place invariants exist for the two node Petri net model,
∑
3.
147
Appendix B ADDITIONAL TESTBED DEPLOYMENT RESULTS 1
2
3
1
2
3
1
2
3
4
5
6
4
5
6
4
5
6
7
8
9
7
8
9
7
8
9
1
2
3
1
2
3
1
2
3
4
5
6
4
5
6
4
5
6
7
8
9
7
8
9
7
8
9
Figure B.1. Delaunay 3x3 grid merge
Accretion at Node 1
40 30 20 10 0 1
2
3
4
5
6
7
8
70 60 50 40 30 20 10 0
9
1
2
3
4
Node
50 40 30 20 10 0 4
5
Node
Figure B.2.
7
8
40 30 20 10 0
9
1
2
3
4
5
6
7
8
9
60 50 40 30 20 10 0 2
3
4
5
Node
7
8
9
Merge at Node 5
70
1
6
Node
Data Transmitted (bytes)
Data Transmitted (bytes)
Data Transmitted (bytes)
60
3
6
50
Accretion at Node 3
Accretion at Node 9
2
5
60
Node
70
1
Appearance at Node 6 Data Transmitted (bytes)
Data Transmitted (bytes)
Data Transmitted (bytes)
Accretion at Node 7 50
6
7
8
9
100 90 80 70 60 50 40 30 20 10 0 1
2
3
4
5
6
7
8
9
Node
Total transmitted data per node for each event trial shown in Figure
B.1.
148
1
2
3
1
2
3
1
2
3
4
5
6
4
5
6
4
5
6
7
8
9
7
8
9
7
8
9
80 60 40 20 0 1
2
3
4
5
Node
Figure B.4.
6
7
8
9
Attrition at Node 6 80 70 60 50 40 30 20 10 0 1
2
3
4
5
Node
6
7
8
9
Data Transmitted (bytes)
Attrition at Node 9 100
Data Transmitted (bytes)
Data Transmitted (bytes)
Figure B.3. Delaunay 3x3 grid attrition
Attrition at Node 8 90 80 70 60 50 40 30 20 10 0 1
2
3
4
5
6
7
8
9
Node
Total transmitted data per node for each event trial shown in Figure
B.3.
149
Appendix C TINYOS CODE FOR THE 2D DEPLOYMENT #dene SAMP_TIME 4096 #dene RESP_TIME 2048 #dene DATA_H_THRESH 1000 #dene DATA_L_THRESH 150 #dene TOS_BASE_ADDR 0 includes packet; module 2dGraphDependentAlgorithm { provides interface StdControl; uses { interface Leds; interface Timer as SampleTimer; interface Timer as ResponseTimer; interface ADC as Photo; interface SendMsg as DataMsg; interface SendMsg as AckMsg; interface ReceiveMsg as CommandMsg; } } implementation { norace TOS_Msg msg,ack; norace CmdMsg *cmdData,*ackData; norace UpdateMsg* updateData; norace InitMsg* initData; norace nodeStruct nodeInfo;
150
norace bool waiting_response; norace bool begin_updating; norace int8_t update_index; norace updatingStruct upd; norace int8_t* recMsgData; norace uint16_t MsgAddr; norace uint16_t WaitAddr; norace uint8_t MsgSize; task void initialize() {
Comment
Initialize data.
atomic { uint8_t i; cmdData = (CmdMsg*)&msg.data; updateData = (UpdateMsg*)&msg.data; initData = (InitMsg*)&msg.data; ackData = (CmdMsg*)&ack.data; cmdData->node_id = TOS_LOCAL_ADDRESS; ackData->node_id = TOS_LOCAL_ADDRESS; ackData->mtype = MTYPE_ACK; nodeInfo.state=STATE_UNINITTED; nodeInfo.status=STATUS_OFF; nodeInfo.V=nodeInfo.E=nodeInfo.F=0; nodeInfo.h1=0; nodeInfo.compID=0; upd.V=upd.E=upd.F=0; upd.h1=0; for(i=0;i E=nodeInfo.E-nodeInfo.v(Lk)1; nodeInfo.E=0; updateData->F=nodeInfo.F-nodeInfo.e(Lk)1;
153
nodeInfo.F=0; updateData->h1=nodeInfo.h1; if (nodeInfo.numNBors==nodeInfo.v(Lk)1) updateData->h1++; if (nodeInfo.v(Lk)1==0) updateData->compID=0; else { for (i=0;nodeInfo.nborsup[i]!=1; i++); updateData->compID=nodeInfo.nbors[i]; } nodeInfo.h1=0; updateData->mtype=MTYPE_UPDATE; updateData->state=nodeInfo.state; updateData->status=nodeInfo.status; update_index=0; MsgAddr=nodeInfo.nbors[update_index];
Comment
Send update.
MsgSize=sizeof(UpdateMsg); post send_msg(); }
Comment
Insertion case
if (t>DATA_H_THRESH && nodeInfo.status==STATUS_OFF) { call Leds.redOn(); call SampleTimer.stop(); nodeInfo.state=STATE_UPDATING; nodeInfo.status=STATUS_ON;
154
cmdData->mtype=MTYPE_REQUEST; MsgAddr=nodeInfo.nbors[update_index]; MsgSize=sizeof(CmdMsg); post send_msg(); } } return SUCCESS; }
Comment
Event created by nishing radio send.
event result_t DataMsg.sendDone(TOS_MsgPtr sent, result_t success) {
Comment
If message requires a response, then start timer.
if (sent->data[2]==MTYPE_REQUEST
||
sent->data[2]==MTYPE_UPDATE)
{ atomic waiting_response=TRUE; call ResponseTimer.start(TIMER_REPEAT,RESP_TIME); WaitAddr=MsgAddr; } return SUCCESS; } event result_t AckMsg.sendDone(TOS_MsgPtr sent, result_t success) { if (begin_updating==TRUE) { begin_updating=FALSE; updateData->mtype=MTYPE_UPDATE; updateData->state=nodeInfo.state; updateData->status=nodeInfo.status; updateData->compID=nodeInfo.compID; updateData->V=nodeInfo.V; updateData->E=nodeInfo.E;
155
updateData->F=nodeInfo.F; updateData->h1=nodeInfo.h1; update_index=0; MsgAddr=nodeInfo.nbors[update_index];
Comment
Send update.
MsgSize=sizeof(UpdateMsg); post send_msg(); } return SUCCESS; }
Comment
Event created by receiving message.
task void update_children() {
Comment
If not all children updated, then continue updating. Else, return to wait-
ing. atomic update_index++; if (nodeInfo.nbors[update_index]!=0 && update_index itype) { case ITYPE_NBORS: for(i=0; i data[i]; if (x->data[i]!=0) nodeInfo.numNBors++; } break; case ITYPE_PAIR0: for(i=0;i data[i]; if (x->data[i]!=0) nodeInfo.numPairs++; } break; case ITYPE_PAIR1: for(i=0;i data[i]; break; } call AckMsg.send(TOS_BASE_ADDR,sizeof(CmdMsg),&ack); } task void rec_start() {
157
Comment
Received a START message from base station.
Comment
ACK and check sensor.
call Leds.set(0); call SampleTimer.start(TIMER_REPEAT,SAMP_TIME); nodeInfo.state=STATE_RUNNING; call AckMsg.send(TOS_BASE_ADDR,sizeof(CmdMsg),&ack); } task void rec_stop() {
Comment
ACK, stop and wait for further information.
call SampleTimer.stop(); nodeInfo.state=STATE_STOPPED; call AckMsg.send(TOS_BASE_ADDR,sizeof(CmdMsg),&ack); } task void rec_request() {
Comment
Send a RESPONSE to node.
CmdMsg* x=(CmdMsg*)recMsgData; updateData->mtype=MTYPE_RESPONSE; updateData->state=nodeInfo.state; updateData->status=nodeInfo.status; updateData->compID=nodeInfo.compID; updateData->V=nodeInfo.V; updateData->E=nodeInfo.E; updateData->F=nodeInfo.F; updateData->h1=nodeInfo.h1; MsgAddr=x->node_id; MsgSize=sizeof(UpdateMsg); post send_msg();
158
} task void rec_response() {
Comment
Stop the waiting timer, use data, continue asking other nbors, no need to
ACK. UpdateMsg* x = (UpdateMsg*)recMsgData; int i; bool FOUND=FALSE; call ResponseTimer.stop(); atomic waiting_response=FALSE;
Comment
Check and add component.
for (i=0;upd.compsResp[i]!=0;i++) { if (upd.compsResp[i]==x->compID) { FOUND=TRUE; } } if (!FOUND) { upd.compsResp[i]=x->compID; upd.V=upd.V+x->V; upd.E=upd.E+x->E; upd.F=upd.F+x->F; upd.h1=upd.h1+x->h1; } update_index++; while (!nodeInfo.nborsup[update_index] && update_index mtype=MTYPE_UPDATE; updateData->state=nodeInfo.state; updateData->status=nodeInfo.status; updateData->compID=nodeInfo.compID; updateData->V=nodeInfo.V; updateData->E=nodeInfo.E; updateData->F=nodeInfo.F; updateData->h1=nodeInfo.h1; update_index=0; MsgAddr=nodeInfo.nbors[]; MsgSize=sizeof(UpdateMsg); post send_msg();
160
update_index } } task void rec_update() {
Comment
ACK, Update current structure, tx message after ACK sent (in UPDAT-
ING state). UpdateMsg* x = (UpdateMsg*)recMsgData; int8_t look,look2,i,j; if (x->compID==nodeInfo.compID) { call AckMsg.send(x->node_id,sizeof(CmdMsg),&ack); } else { call SampleTimer.stop(); look=x->node_id; for (i=0;i status==STATUS_ON && nodeInfo.nbors[i]==look && nodeInfo.nborsup[i]!=1) { nodeInfo.nborsup[i]=1; nodeInfo.v(Lk)1++; } if (x->status==STATUS_OFF && nodeInfo.nbors[i]==look && nodeInfo.nborsup[i]==1) { nodeInfo.nborsup[i]=0; nodeInfo.v(Lk)1; } } if (x->status==STATUS_ON) { for (i=0;i E; nodeInfo.F=x->F;
162
nodeInfo.h1=x->h1; begin_updating=TRUE; } call AckMsg.send(x->node_id,sizeof(CmdMsg),&ack); } } task void rec_ack() {
Comment
If updating, then continue.
Comment
Otherwise, just ACK.
CmdMsg* x=(CmdMsg*)recMsgData; if (nodeInfo.state==STATE_UPDATING && WaitAddr==x->node_id) { call ResponseTimer.stop(); WaitAddr=0; atomic waiting_response=FALSE; post update_children(); } else { if (x->node_id==TOS_BASE_ADDR) { call AckMsg.send(x->node_id,sizeof(CmdMsg),&ack); } } } event TOS_MsgPtr CommandMsg.receive(TOS_MsgPtr m) { recMsgData=m->data; switch (m->data[2]) { case MTYPE_INIT: post rec_init(); break; case MTYPE_START: post rec_start();
163
break; case MTYPE_STOP: post rec_stop(); break; case MTYPE_REQUEST: post rec_request(); break; case MTYPE_RESPONSE: post rec_response(); break; case MTYPE_UPDATE: post rec_update(); break; case MTYPE_ACK: post rec_ack(); break; } return m; } }
164
Appendix D RELATED PUBLICATIONS AND PRESENTATIONS D.1 Publications 1. Farah, C., Schwaner, F., Abedi, A., Worboys, M. A Distributed homology algorithm to detect topological events via wireless sensor networks. IET Journal of Wireless Sensor Systems. 1(3): 151-160, 2011. [23]
2. Farah, C., Zhong, C., Worboys, M., Nittel, S. Detecting Topological Change Using a Wireless Sensor Network. in Proceedings of Fifth International Conference of Geographic Information Science. Salt Lake City, Utah. September, 2008. [25]
3. Farah, C., Worboys, M. Qualitative Analysis of a Scalar Field Using a Wireless Sensor Network.
in Proceedings of Fourth International Conference of
Geographic Information Science, Extended Abstracts.
Munster, Germany.
September, 2006. [24]
D.2 Presentations 1. Farah, C., Zhong, C., Worboys, M., Nittel, S. Detecting Topological Change Using a Wireless Sensor Network.
Fifth International Conference of Geo-
graphic Information Science. Salt Lake City, Utah. September, 2008.
2. Farah, C. Anticipating Events in a Scalar Field Using a Wireless Sensor Network.
The Atlantic Institute Annual Research Forum: GIScience and Geo-
matics Graduate Research Seminar. Schoodic Peninsula, Maine. June, 2007.
165
3. Farah, C., Worboys, M. Qualitative Analysis of a Scalar Field Using a Wireless Sensor Network. Fourth International Conference of Geographic Information Science. Munster, Germany. September, 2006.
166
BIOGRAPHY OF THE AUTHOR Christopher Farah was born in Hackensack, New Jersey in 1971.
He obtained a
Bachelor of Engineering in Chemical Engineering from The Cooper Union in 1993. Christopher enjoyed theorems and abstract models more than petroleum production and mass-scale chemical processing. With this realization, he opted to serve in the US Peace Corps (1996-1997) in Namibia. Though teaching was limited to high school mathematics, Christopher was able to teach and think concepts, and see a radically dierent culture and social paradigm to boot. Upon returning to the US, Christopher was prepared to further his academic foundation and entered St. Louis University in 1999 as a master's candidate. In 2001, Christopher obtained a Master of Arts in Mathematics. At this point, Christopher bought a one-way ticket to Cape Town, South Africa and remained in Cape Town for four years, as a full-time father and mathematics teacher. Upon his second return to the US, Christopher was prepared for another academic stage of development and began looking for programs that aligned with his interest. In spring 2005, Christopher had the good fortune of cyber-connecting with Dr. Kate Beard, who was preparing to post announcements for ve National Science Foundation Integrative Graduate Education and Research Traineeship (NSF IGERT) positions. Dr. Beard forwarded Christopher's details to Dr. Mike Worboys, who continued the conversation and was able to oer Christopher a position as one of trainees in the rst NSF IGERT cohort. Christopher began his doctoral studies at the University of Maine in Fall of 2005 and has focused on embedding algebraic topology onto sensor nodes to discover environmental phenomena. He has authored two refereed conference proceedings, both in the International Journal of Geographic Information Science, and one refereed paper in the Journal of the Institution of Engineering and Technology, Wireless Sensor Systems.
167
Christopher Farah is a candidate for the Doctor of Philosophy degree in Spatial Information Science and Engineering from The University of Maine in December, 2011.
168