Sie sind auf Seite 1von 273

Optimization of Energy-ecient

Transmission Protocol for


Wireless Sensor Networks
Femi A. Aderohunmu
a thesis submitted for the degree of
Doctor of Philosophy
at the University of Otago, Dunedin,
New Zealand.
August 2013
Abstract
Wireless sensor network (WSN) technologies are increasingly employed in
recent years for monitoring purposes in various elds ranging from the engi-
neering industry to our immediate home environments due to their ability
to intelligently monitor remote locations at low cost. While WSNs are
continuously tasked to handle more complex functions, such as, data ag-
gregation, frequent transmissions etc., in-network processing and intelligent
computation still necessitate the available energy resources to be judiciously
consumed in order to prolong their lifetime, since the nodes are often pow-
ered by batteries.
In this thesis, our original contribution to knowledge is by developing three
key strategies that can eciently optimize transmission protocols in rela-
tion to oer an improved network lifetime for WSN deployments. Our rst
strategy involves a design of a cluster-based network layer routing protocol.
We propose a purely deterministic model that utilizes clustering to organize
the WSN. Our design is referred to as DEC: a deterministic energy-ecient
clustering protocol. It is dynamic, distributive, self-organizing and it oers
better energy eciency compared with the existing protocols in the same
domain. In addition, it utilizes a simplied approach that minimizes com-
putational overhead to self-organize the sensor network. Our simulation
result shows a better performance with respect to the energy consumption,
which is reected in the network lifetime of up to 2 improvement in both
homogeneous and heterogeneous settings when compared with the existing
protocols. It is worth mentioning that our approach approximates an ideal
solution to oer a balanced energy consumption in hierarchical wireless
sensor networks.
ii
Our second strategy to reduce energy consumption in WSN deployment
involves designing a light-weight forecasting algorithm for prolonging the
lifetime of sensor nodes. A detailed comparison with the state-of-the-art
methodologies is conducted and they are evaluated using both a simulation
study and a real-world deployment testbed implemented on a 32-bit mote
class device. Overall, up to 96% transmission reduction is achieved using
our Naive method, while still able to maintain a considerable level of accu-
racy at less than 2% error bound and it is comparable in performance to
other complex models often used in the same domain.
Finally, our third strategy to further optimize energy-ecient transmission
protocols in a real-world WSN deployment, involves combining the syner-
gies between a data reduction method and a data acquisition method. Un-
fortunately, energy eciency is often in contrast with network reactiveness
for alarms and urgent messages. Thus, we propose SWIFTNET: a fast-
reactive data acquisition protocol. SWIFTNET is built on the synergies
between compressive sensing and prediction algorithms and it limits the en-
ergy consumption in environmental monitoring and surveillance networks.
We show how this approach dramatically reduces the amount of communi-
cation required to monitor the sensor readings in a deployment. We use a
wildre monitoring application that requires high reactiveness with contin-
uous data updates of the monitoring process. Experimental results show
over 50% communication reduction can be further achieved without loss in
accuracy over the common prediction approach. In addition, SWIFTNET
is able to guarantee reactiveness by adjusting the sampling interval from 5
minutes up to 15 seconds in our application domain.
In general, extensive simulation study has been conducted to evaluate these
new approaches together with real-world deployment testbeds using a com-
mercial o-the-shelf (COTS) node platform that is currently available in
the market. One good contribution of the overall design of our work is that
it enables easy practical deployment and prototyping. To sum up, favorable
results are obtained that support our design strategies.
iii
To Mum and Dad...for your love.
iv
Acknowledgements
A work of this magnitude is anchored on the contribution of several people.
First, I thank God for His providence over my life during this journey.
My sincere and special thanks goes to my parents and siblings for their
relentless prayers, love and the constant encouragements over the years,
especially during the hard times of this journey.
My indebtedness goes to the University of Otago, for providing the learning
environment and the scholarship required to achieve this goal. A special
thanks to the Division of Commerce and to the Information Science de-
partment of the University of Otago, for the travel and conference grants.
I would say it has yielded meaningful results.
I had the opportunity to work with some of the nest minds and world
class researchers during the pursuit of this degree. I am indebted to my
rst mentors; my supervisors Dr. Jeremiah D. Deng and Prof. Martin
K. Purvis for giving me the opportunity to pursue an area that ts my
abilities and interest. Mentally and intellectually they have been extremely
supportive without shying away from providing constructive criticism and
patting my back when good results are achieved.
During the fall of 2012, I had the opportunity to visit the Micro Electron-
ics Laboratory, Department of Electronics and Information Systems of the
University of Bologna. The collaborative eorts, resources, endless ideas
and direction under Prof. Luca Benini made a huge impact on the suc-
cessful completion of this work. The interaction with colleagues in the eld
of embedded and distributive systems at the MICREL Lab sharpened my
thought process and I would forever be grateful for such opportunities. To
Dr. Davide Brunelli and Dr. Giacomo Paci of the WISPES Srl, Italy, a
v
Big Thank You for the resources and the WISPES node prototype designs.
Your invaluable insights gave credence to the actualization of my work,
nonetheless the technical support provided to me. My abilities to program
the WISPES platform is a result of Dr. Giacomos tireless eorts to put
the parts into a whole. I deeply appreciate it all.
To my proofreaders; Mr. James Irwin, Samuel Ujewe, Stephanie Thomsen,
Francesca Rappocciolo and Abayomi Aderohunmu, thank you for tolerating
my jargons and taking the pain to go through every line. Your comments
have made this manuscript more readable.
I shared the long path of this journey with stas and colleagues who are
some of the brightest minds at the Information Science New Zealand Dis-
tributed Information Systems (NZDIS) group and the Systems group of the
Computer Science department. The experience I shared with them made
my PhD journey both educational and fun: A/Prof. Stephen Craneeld,
Dr. Tony Savarimuthu, Dr. Mariusz Nowostawski, Dr. Brendon Wood-
ford, Munir, Yuwei, Christopher, Rasika, Angrosh, Sharmila, Surangika
and Yasir. Their contribution and criticism during my seminar presenta-
tions shaped and enriched some of the ideas of this work.
Many thanks to Mrs. Gail Mercer and Mr. Stephen Hall-Jones for the
countless administrative support and putting the hard-bound of this piece
together. I am grateful to the support stas (TSG) and to A/Profs. Hol-
ger Regenbrecht, Hank Wolfe and Michael Winiko for taking the pain to
convene my PhD meetings.
Big Thanks to my special friends Dr. and Mrs. Grigorut; for their un-
limited support and encouragements. I am deeply indebted to the entire
Rappocciolo family for their love and hospitality towards me, it is highly
appreciated. To Dr. and Mrs. Olaniran, for their support while I was far
away from home, thank you very much.
CRITICS: To all my soccer team mates; Constantin, Tosin, Mikhail,
Ramy, Dan etc.; without them this work would have been much delayed.
To my swimming team mates; Chris, Munir and Rahul (who has remained
a brother rather than a friend), I say thanks for being there.
Finally, to Francesca for your reassuring and unequivocal love, I owe you
much more than words or scripts can express. Thanks for standing by me.
To everyone I say this is my thesis...Thank you all.
vi
Experience without theory is blind, but theory without experience is mere intellectual
play.
Immanuel Kant (1724-1804)
It is the mark of an educated mind to be able to entertain a thought without accepting
it.
Aristotle
Knowledge rests not upon truth alone, but upon error also.
Carl Gustav Jung (1875-1961)
vii
Table of Contents
Table of Contents xi
List of Acronyms and Symbols xviii
1 Introduction 1
1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Research Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Research Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.5 Refereed Journal and Conference Publications . . . . . . . . . . . . . . 6
1.6 Thesis Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2 Background 9
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1.1 Taxonomy of Energy Optimization Strategies in WSNs . . . . . 10
2.2 Communication Driven: Routing Protocols . . . . . . . . . . . . . . . . 12
2.3 Hierarchical Network-based Protocol Design for WSNs . . . . . . . . . 13
2.3.1 Low Energy-Adaptive Clustering Hierarchical Protocol . . . . . 13
2.3.2 Low Energy-Adaptive Clustering Hierarchical Protocol with De-
terministic Cluster Head . . . . . . . . . . . . . . . . . . . . . . 15
2.3.3 Stable Election Protocol . . . . . . . . . . . . . . . . . . . . . . 16
2.3.4 Distributed Energy-Ecient Clustering Protocol . . . . . . . . . 17
2.3.5 A Hybrid Energy-Ecient Distributed Clustering Protocol . . . 18
2.3.6 Enhanced Stable Election Protocol . . . . . . . . . . . . . . . . 19
2.4 Flat Network-based Protocol Design for WSNs . . . . . . . . . . . . . . 21
2.4.1 Sensor Protocol for Information via Negotiation . . . . . . . . . 21
2.4.2 Directed Diusion . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.4.3 Gradient-Based Routing . . . . . . . . . . . . . . . . . . . . . . 24
2.5 Remarks On Routing Methods . . . . . . . . . . . . . . . . . . . . . . . 24
2.6 Data Driven Schemes: State-of-the-Art . . . . . . . . . . . . . . . . . . 25
2.6.1 Data Reduction Strategies . . . . . . . . . . . . . . . . . . . . . 25
2.6.2 Data Acquisition Methods . . . . . . . . . . . . . . . . . . . . . 29
2.6.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
viii
3 Routing and Network Protocols 33
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.2 Network Model Architecture . . . . . . . . . . . . . . . . . . . . . . . . 33
3.3 Clustering Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.3.1 Single-level vs. Multi-level Cluster Architecture . . . . . . . . . 35
3.3.2 Single-level Clustering Structure . . . . . . . . . . . . . . . . . . 36
3.3.3 Total Energy Dissipation for a Single-level Mode in a Clustered
WSNs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.4 Multi-level Clustering Structure . . . . . . . . . . . . . . . . . . . . . . 38
3.4.1 Total Energy Dissipation in a Dual and Multi-level Network in
a Clustered WSN . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.5 Our Proposed Optimized Network Protocol . . . . . . . . . . . . . . . . 42
3.5.1 Motivation of DEC Protocol . . . . . . . . . . . . . . . . . . . . 43
3.5.2 Path-loss Model . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.5.3 Data Aggregation Model . . . . . . . . . . . . . . . . . . . . . . 45
3.5.4 DEC Algorithm: Cluster Formation and Energy Model . . . . . 45
3.5.5 Energy Derivation . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.5.6 Analysis of Cluster-head Election and Energy Consumption . . 52
3.5.7 Lifetime Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . 56
3.6 Simulation and Analysis of Results . . . . . . . . . . . . . . . . . . . . 57
3.6.1 Simulation Setup . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3.6.2 Energy Consumption Analysis . . . . . . . . . . . . . . . . . . . 60
3.6.3 Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.6.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
4 Coverage Awareness and Spatial Analysis 71
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4.2 Coverage Issues in WSN . . . . . . . . . . . . . . . . . . . . . . . . . . 73
4.3 Coverage Preservation and Spatial Energy Distribution Analysis . . . . 75
4.3.1 Network Coverage . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4.3.2 Spatial Uniformity . . . . . . . . . . . . . . . . . . . . . . . . . 78
4.4 Simulation Study and Statistical Analysis . . . . . . . . . . . . . . . . 78
4.4.1 Experiment Setup . . . . . . . . . . . . . . . . . . . . . . . . . . 78
4.4.2 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . 80
4.4.3 Network Lifetime Under Coverage Constraint and Heterogeneity 82
4.4.4 Spatial Uniformity Heatmaps and Statistic Test . . . . . . . . . 83
4.5 Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
4.5.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
5 Intelligent and Control Monitoring Solution: WSN Design Architec-
ture 93
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
5.2 Application Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
5.3 Sensing Unit and Hardware Design . . . . . . . . . . . . . . . . . . . . 96
ix
5.4 Wireless Communication . . . . . . . . . . . . . . . . . . . . . . . . . . 97
5.5 Power Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
5.6 Software and Protocol Stack Architecture . . . . . . . . . . . . . . . . . 101
5.7 Time Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
5.8 Continuous Real-time Data Acquisition . . . . . . . . . . . . . . . . . . 103
5.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
6 Data Reduction Strategies in Energy-limited WSNs 105
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
6.1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
6.2 Prediction-based Data Reduction Methods . . . . . . . . . . . . . . . . 107
6.2.1 Adaptive Light-weight Models . . . . . . . . . . . . . . . . . . . 108
6.3 Model Evaluation and Selection . . . . . . . . . . . . . . . . . . . . . . 113
6.3.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
6.3.2 Parameter Selection . . . . . . . . . . . . . . . . . . . . . . . . . 117
6.3.3 Model Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
6.4 Simulation Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
6.4.1 Simulation Study . . . . . . . . . . . . . . . . . . . . . . . . . . 123
6.4.2 Simulation Results: Cross Validation with Adaptive Filters . . . 126
6.4.3 Further Simulation Results: Naive vs. ARIMA, WMA, LMS and
NLMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
6.4.4 Simulation Results: Naive vs Exponential Smoothing Models . . 140
6.4.5 Eect of History Window on Models . . . . . . . . . . . . . . . 144
6.5 Real-world Testbed-based Evaluation . . . . . . . . . . . . . . . . . . . 145
6.5.1 Setup and Deployment . . . . . . . . . . . . . . . . . . . . . . . 145
6.5.2 Testbed Results . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
6.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
7 Combining Data-Driven Strategies for an Improved Network Lifetime
in WSNs 156
7.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
7.2 SWIFTNET: A Data Acquisition Protocol for a Fast-reactive Wireless
Sensor Network Monitoring Application . . . . . . . . . . . . . . . . . . 160
7.2.1 Compressed Sensing . . . . . . . . . . . . . . . . . . . . . . . . 160
7.2.2 Prediction Algorithms . . . . . . . . . . . . . . . . . . . . . . . 165
7.2.3 Combining CS and Prediction Methods . . . . . . . . . . . . . . 166
7.3 Application Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
7.3.1 Wildre Characteristics . . . . . . . . . . . . . . . . . . . . . . 168
7.3.2 Challenges and Solutions . . . . . . . . . . . . . . . . . . . . . . 170
7.4 SWIFTNET Design Illustration . . . . . . . . . . . . . . . . . . . . . . 171
7.4.1 Hardware Platform . . . . . . . . . . . . . . . . . . . . . . . . . 174
7.4.2 Client Control Platform . . . . . . . . . . . . . . . . . . . . . . 174
7.4.3 Real-world Test-bed Implementation of SWIFTNET . . . . . . 176
7.5 Design of Measurement and Representation Basis . . . . . . . . . . . . 176
x
7.5.1 Measurement Matrix and Sparse Representation . . . . . . . . . 177
7.5.2 Signal Reconstruction Algorithm . . . . . . . . . . . . . . . . . 180
7.6 Experimental Setup and Evaluation of SWIFTNET . . . . . . . . . . . 182
7.6.1 Choice of Prediction Model . . . . . . . . . . . . . . . . . . . . 183
7.6.2 Performance Metric . . . . . . . . . . . . . . . . . . . . . . . . . 184
7.6.3 Discussion of Results . . . . . . . . . . . . . . . . . . . . . . . . 185
7.6.4 Limitation of Approach . . . . . . . . . . . . . . . . . . . . . . . 187
7.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
8 Conclusion and Future Work 190
8.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
8.2 Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
8.3 Future Research Direction . . . . . . . . . . . . . . . . . . . . . . . . . 194
References 197
A Source Code for Experiments 214
A.1 MATLAB scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
A.1.1 DEC code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
A.1.2 SEP-E code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
A.1.3 LEACH Homogeneous code . . . . . . . . . . . . . . . . . . . . 230
A.1.4 LEACH Heterogeneous code . . . . . . . . . . . . . . . . . . . . 236
A.1.5 SEP code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
A.1.6 SWIFTNET Signal Recovery Algorithm code . . . . . . . . . . 250
xi
List of Tables
2.1 Classication of network protocol design. . . . . . . . . . . . . . . . . . 13
3.1 Parameter settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3.2 Average of network lifetime of the sensors for 50 trials with total energy
of 102.5J, when the BS is located inside the sensing region. . . . . . . . 63
4.1 Common parameter settings for all experiments. . . . . . . . . . . . . . 79
4.2 SEP-E vs. LEACH F-test Result. . . . . . . . . . . . . . . . . . . . . . 85
4.3 DEC vs. SEP F-test Result. . . . . . . . . . . . . . . . . . . . . . . . . 86
4.4 DEC vs. LEACH F-test Result. . . . . . . . . . . . . . . . . . . . . . . 86
4.5 DEC vs. SEP-E F-test Result. . . . . . . . . . . . . . . . . . . . . . . . 86
4.6 SEP-E vs. SEP F-test Result . . . . . . . . . . . . . . . . . . . . . . . 86
5.1 Summary of the energy consumption for one cycle of the state machine 98
6.1 Summary of performance of the predictive models: FP7 data source . . 134
6.2 Summary of performance of the predictive models: Intel Berkeley Data
source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
6.3 ARIMA model weights/parameters . . . . . . . . . . . . . . . . . . . . 137
6.4 Summary of performance of the predictive models: FP7 Humidity data
source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
6.5 Summary of performance of the predictive models: FP7 Temperature
data source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
6.6 Summary of performance of the predictive models: FP7 Humidity data
source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
6.7 Summary of the energy consumption for one cycle of the state machine 149
6.8 Summary of performance of the predictive models: Real-world deployment152
xii
7.1 Performance summary of SWIFTNET . . . . . . . . . . . . . . . . . . 185
xiii
List of Figures
2.1 Detailed Taxonomy of energy optimization methods in WSN . . . . . . 11
2.2 Energy optimization: Taxonomy of a communication-driven technique . 12
2.3 Directed diusion simplied schematic (Intanagonwiwat et al., 2003):
(a) Interest propagation (b) Gradient setup (c) Data delivery via rein-
forced path. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.4 Energy optimization: Taxonomy of a data-driven method . . . . . . . . 26
3.1 Network Model diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.2 Sensor Network Design: Clustering method . . . . . . . . . . . . . . . . 36
3.3 Single-level Network Design . . . . . . . . . . . . . . . . . . . . . . . . 37
3.4 Dual-hop Network Design . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.5 Behavior of nodes energy consumption overtime . . . . . . . . . . . . 43
3.6 Flowchart of DEC algorithm . . . . . . . . . . . . . . . . . . . . . . . . 46
3.7 DEC cluster formation process . . . . . . . . . . . . . . . . . . . . . . . 47
3.8 Wireless Sensor Network with heterogeneous setup . . . . . . . . . . . 49
3.9 Voronoi regions resulted from the cluster formation. Here

indicates
a cluster member,

a cluster-heads, and

a base station (BS). . . . 49


3.10 Variation of energy consumption pattern on the changes to the number
of clusters c formed. Energy values in log-scale are in the unit of Joules. 51
3.11 Number of cluster-heads per round. The solid line represents probabilistic-
based models, which do not guarantee the election of stable number of
CH per round. The dotted line represents the DEC protocol (deterministic-
based), which guarantees a more stable number of CH election per round. 55
xiv
3.12 FND in DEC as the number of cluster-head varies from 1 to 30. This
graph shows that DEC is more ecient when cluster-heads are between
10 and 20 and the optimality lies around 16 clusters in homogeneous
setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
3.13 The residual energy standard deviation across the sensor nodes at rounds
100, 200...1000, in Setup 1. . . . . . . . . . . . . . . . . . . . . . . . . . 61
3.14 The residual energy standard deviation across the sensor nodes at rounds
100, 200...1000 in Setup 2. . . . . . . . . . . . . . . . . . . . . . . . . . 62
3.15 Performance of the protocols using Setup 1. . . . . . . . . . . . . . . . 62
3.16 Performance of the protocols using Setup 2, with the proposed optimal
parameters. This is done in order to have complete fairness for all the
protocols. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
3.17 Exploiting Heterogeneity: (a) Tuning dierent heterogeneity parameters
(b) Network lifetime for dierent when m = 0.2 (b) Network lifetime
for dierent when n = 0.5, m = 0.2 and b = 0.3. . . . . . . . . . . . 66
3.18 Exploiting Heterogeneity: (a) Performance of the protocols as the energy
load increases (b) Percentage gain of the protocols (c) Relative gain of
DEC with other protocols. . . . . . . . . . . . . . . . . . . . . . . . . . 67
4.1 A network snapshot showing the network coverage formed by live nodes
of all types: normal, intermediate, and advanced. . . . . . . . . . . . . 76
4.2 Live node distribution can be examined, e.g., by using a 5 5 grid. . . 79
4.3 Comparing coverage performance of DEC, SEP-E, LEACH (m = 0.2, b =
0.3, = 3 and = 1.5) and SEP (m = 0.3, b = 0, = 3.5 and = 0),
E
total
= 102.5J. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
4.4 Comparison of FCT for DEC, SEP-E, SEP and LEACH. The boxplot is
generated by 30 simulation runs for each protocol. . . . . . . . . . . . . 81
4.5 The heatmap at Round=1500 for (a) DEC coverage, (b) SEP-E coverage,
(c) SEP coverage, and (d) LEACH coverage. . . . . . . . . . . . . . . . 84
4.6 The heatmap at Round=2200 for (a) DEC coverage, (b) SEP-E coverage,
(c) SEP coverage and (d) LEACH coverage. . . . . . . . . . . . . . . . 84
4.7 The heatmap at Round=3500 for (a) SEP-E coverage, (b) SEP coverage,
and (c) LEACH coverage. . . . . . . . . . . . . . . . . . . . . . . . . . 85
xv
4.8 The live node distribution at 50% interval for (a) SEP-E vs. LEACH,
(b) DEC vs. SEP-E. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
4.9 Comparison of spatial uniformity of the protocols. The boxplot is gen-
erated from pairwise F-ratios averaged over 20 independent experiments. 89
5.1 Cross-section of the Deployment Building Testbed . . . . . . . . . . . . 94
5.2 A rear view of 32-bit WISPES W24TH prototype . . . . . . . . . . . . 95
5.3 Hardware Unit Design Architecture . . . . . . . . . . . . . . . . . . . . 96
5.4 A tree topology network . . . . . . . . . . . . . . . . . . . . . . . . . . 97
5.5 A star topology network . . . . . . . . . . . . . . . . . . . . . . . . . . 97
5.6 State machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
5.7 Jennic protocol stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
6.1 Time series data taken from our deployment from the FP7 3ENCULT
Project in Bologna . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
6.2 Humidity data trace taking from the attic, basement and the rst-oor
from our FP7 3ENCULT deployment in Bologna . . . . . . . . . . . . . 114
6.3 Intel data source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
6.4 Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
6.5 Simulation study, Naive prediction: (a) Fitting Naive model to Intel
data (b) mote 11: Naive model vs LMS (c) mote 19: Naive model vs LMS 127
6.6 Simulation study, Naive model, NLMS and LMS: (a) Intel data: mote
11 (b) FP7 data: node 3 . . . . . . . . . . . . . . . . . . . . . . . . . . 129
6.7 Simulation study, Naive and WMA models: (a) Fitting Naive model to
FP7 data (b) Fitting WMA model to FP7 data . . . . . . . . . . . . . 131
6.8 FP7 Temperature data: Performance of all models using dierent error
bound. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
6.9 Simulation study, ARIMA prediction: (a) Fitting ARIMA(4,1,1) model
to FP7 data (b) ARIMA(5,1,1) model to Intel data . . . . . . . . . . . 135
6.10 Simulation study, ARIMA, WMA and NAIVE prediction: (a) Node 1
(b) Node 2 (c) Node 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
6.11 Simulation study, prediction models: (a) Fitting SES and EWMA mod-
els to observed data (b) Fitting Naive and MA models to observed data 140
xvi
6.12 Simulation study, prediction models: (a) Fitting Naive and ETS(A,Ad,N)
models to observed data . . . . . . . . . . . . . . . . . . . . . . . . . . 141
6.13 Humidity Dataset: Summary model performance . . . . . . . . . . . . 143
6.14 Eect of window size on MA and EWMA models . . . . . . . . . . . . 144
6.15 State machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
6.16 Real-world testbed-Naive prediction: (a) Prediction at sink and sensed
data at node (b) prediction error . . . . . . . . . . . . . . . . . . . . . 151
6.17 Real-world testbed: (a) Naive prediction, (b) Naive prediction error
(Absolute value) (c) WMA prediction . . . . . . . . . . . . . . . . . . . 153
7.1 Data reduction strategies . . . . . . . . . . . . . . . . . . . . . . . . . . 157
7.2 CS vs. Prediction methods . . . . . . . . . . . . . . . . . . . . . . . . . 166
7.3 SWIFTNET: design illustration . . . . . . . . . . . . . . . . . . . . . . 171
7.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
7.5 A front view of WISPES W24TH node prototype . . . . . . . . . . . . 174
7.6 Real-time data trace from CACTI . . . . . . . . . . . . . . . . . . . . . 175
7.7 Experimental testbed topology . . . . . . . . . . . . . . . . . . . . . . . 175
7.8 A 16-Bit LFSR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
7.9 A Steiner Heat Gun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
7.10 Data trace from SWIFTNET . . . . . . . . . . . . . . . . . . . . . . . 183
7.11 Data trace from default adaptive prediction . . . . . . . . . . . . . . . 184
7.12 Dynamic sampling rate SWIFTNET . . . . . . . . . . . . . . . . . . . 186
xvii
List of Acronyms and Symbols
ARIMA Autoregressive Moving Average
BS Base Station
COTS Commercial-O-The-Shelf
CDMA Code Division Multiple Access
CSMA Carrier Sense Multiple Access
CS Compressive/Compressed Sensing
CM Cluster Member
DEEC Distributed Energy-Ecient Clustering Algorithm
DEC A Deterministic Energy-ecient Clustering Protocol
EWMA Exponiential Weighted Moving Average
ETS Exponiential Smoothing
EBGR Energy-Ecient Beaconless Geographic Routing
FCT Full Coverage Time
FND First Node Dies
GBR Gradient-Based Routing
GTS Guarantee Time Slot
HEED Hybrid Energy-Ecient Distributed clustering protocol
ICM Indicator control message
xviii
ID Identication
LND Last Node Dies
LEACH Low-Energy Adaptive Clustering Hierarchy
LMS Least-Mean-Square lter
LEACH-D Low-Energy Adaptive Clustering Hierarchy Deterministic
LFSR Linear Feedback Shift Register
MA Moving Average
MAC Medium Access Control
MAE Mean Absolute Error
NLMS Normalized Least-Mean-Square lter
PNA Percentage of Nodes Alive
PC Prediction Cost
RLS Recursive Least Square lter
RE Relative Error
RMSE Root Mean Squared Error
SPIN Sensor Protocols for Information via Negotiation
SES Simple Exponiential Smoothing
SEP Stable Election Protocol
SEP-E Enhanced Stable Election Protocol
TDMA Time Division Multiple Access
WISPES Wireless Intelligent Self-Powered Electronic Systems
WMA xed-Weighted Moving Average
WSNs Wireless Sensor Networks
xix
C
i
(t) Indicator function
E[#CH ]Expected number of cluster-heads
P
i
(t) Threshold for election as cluster-head
c Number of clusters
T
n
Threshold for election as cluster-head
P
opt
Optimal probability of becoming cluster-heads
E
TH
Threshold value for cluster-head election
n Number of sensor nodes
v Power loss factor
E
elec
Energy dissipation per bit for the transceiver circuit
d
CH
transmission distance to cluster-heads
M
bit
Packet size
E(r) Residual energy
R
T
Total round of the network
R Communication radius
r number of rounds
R
T
Total network rounds
E
total
Total energy at the beginning of network operation
E
round
Energy consumed in each round
P
nrm
Probability election as cluster-head for normal nodes
P
int
Probability election as cluster-head for intermediate nodes
P
adv
Probability election as cluster-head for advanced nodes
m Proportion of advanced node to normal nodes
xx
E
0
Initial energy for normal nodes
d
max
Maximum distance of each node to BS
d
min
Minimum distance of each node to BS
k Packet size
E
Tx
Transmission energy
E
Rx
Reception energy
d
0
Threshold distance for swapping application model
G Set of non-cluster heads
E
CH
Energy dissipation by a cluster-head node
E
DA
Data aggregation energy
d
tosink
Transmission distance to sink/BS
E
nonCH
Energy dissipation by a non-cluster head node
E[. ]Expectation (expected value)
E
cluster
Energy dissipation by a cluster
c Number of clusters
k
opt
Optimum number of clusters
E
int
Initial energy for intermediate nodes
E
adv
Initial energy for advanced nodes
n
adv
number of advanced nodes
n
int
number of intermediate nodes
n
nrm
number of normal nodes
T(n
adv
) Threshold for advanced nodes
T(n
int
) Threshold for intermediate nodes
xxi
T(n
nrm
) Threshold for normal nodes
B
0
number of non-cluster heads
Ch
2
Level two cluster-heads
Ch
3
Level three cluster-heads
E
sum
Sum of energy dissipation in a dual-hop network
T
delay
Delayed epoch
T
normal
Normal epoch
E(N
th
sum
) Sum of energy dissipation in a multi-hop network
Energy factor of advanced nodes
Network lifetime improvement factor
Energy factor for intermediate nodes
xxii
Chapter 1
Introduction
1.1 Motivation
In recent years, wireless sensor networks (WSN) are becoming more critical to the
functionalities of new and emerging technology advancements than in the past decades,
such as the Internet of Things (IoT). Wireless sensor networks are evolving to be an
important enabling technology due to the increasing capability to sense, process and
communicate their information at low cost. The advances in micro-electromechanical
technologies have made the improvising of such sensors a possibility. For example,
sensor nodes such as the W24TH node from WISPES
1
and the TelosB mote from
Crossbow
2
, have enabled easy building of real-world applications such as wildre mon-
itoring
3
, health care (Jamthe et al., 2013; Daz-Ramrez et al., 2013), structural health
monitoring (Lynch, 2004; Kim et al., 2007), water quality monitoring (Hu et al., 2012),
agricultural monitoring (Wark et al., 2007) etc. In recent years, the development of
WSNs has received much attention both in the academia and in industry. For example,
with the recent attention to global climate change, WSNs can be eectively utilized
to monitor various environmental variables such as temperature, humidity, wind speed
and pressure that can pose risk to human safety. The recent natural disasters have
increased the call for quick and ecient ways to communicate vital information to
people living in disaster prone areas. One of the numerous advantages of these sensor
nodes is their ability to operate unattended, which is ideal for inaccessible areas. How-
ever, while WSNs are increasingly equipped to handle some of these complex functions,
in-network processing, such as data aggregation, information fusion, computation and
1
www.wispes.com
2
www.xbow.com
3
http://www.futuregov.asia/articles/2012/jan/18/china-pilots-wildre-detection-sensor-network/
1
transmission activities, require these sensor nodes to use their energy eciently in or-
der to extend their eective network lifetime. Energy eciency is probably the most
important issue in wireless sensor networks. Since future sensor nodes are envisioned
as disposable, it is extremely important to develop techniques that prolong battery
lifetime as much as possible. Unnecessary energy consumption must be avoided by
attentive hardware/component design as well as low level (i.e., operating system and
support middleware) and high level (i.e., application) software programming (Baronti
et al., 2007).
The need to achieve a prolonged wireless sensor network lifetime deployment has
fueled further research into ways that can better optimize the energy consumption in
a more ecient manner. To achieve this goal, few bottlenecks need to be tackled. For
example, recent prototypes of sensor nodes are equipped with recharging capabilities
such as the WISPES W24TH nodes. These nodes are capable of scavenging energy from
the wind and solar cells. Meaning, nodes will scavenge energy at dierent rates and/or
discharge their batteries unevenly. This poses an important challenge of managing the
energy consumption across the network in such a way that the overall energy spread in
the network is evenly preserved to avoid loss in coverage. Similarly, some nodes could
be damaged, hence fail and new fully charged nodes could be re-introduced into the
network. The re-energizing of a wireless sensor network as old sensor nodes die out
and/or the introduction of new nodes creates energy heterogeneity among the sensor
nodes. How to deal with such heterogeneity could lead to the dierence in the WSN
deployment lifetime. There are various network layer schemes that have been proposed
to mitigate this challenge such as in DEEC (Qing et al., 2006) and SEP (Smaragdakis
et al., 2004) etc.
Similarly, addressing the energy consumption in WSNs becomes more critical for
some other application deployment, such that, once deployed it is not easily accessible.
For example, in a wildland monitoring application, it might be important to have a
large WSN deployment over thousands of acres with the intention of having the deploy-
ment run for years with little human intervention, moreover, it might be inconvenient to
frequently change the batteries. Hence, the continuous strive to have a distributed and
an autonomous deployment has driven the search for other methods that can further
optimize the energy consumption, such as using data reduction strategies and adaptive
sampling on the application layer in addition to coupling a routing approach on the
network layer. All these methods have been well researched in the past literature, how-
ever, to achieve a robust WSN deployment, an eective solution requires a cross layer
2
design that meets various objectives such as load balancing, fault-tolerance, increased
connectivity with reduced delay and network longevity. Several proposals attempt to
reduce energy waste at the MAC layer but recent research recognizes the importance
of coordination with the higher layers of the protocol stack (Network and Application
layers) to adapt radio usage to application communication patterns and achieve higher
energy savings (Baronti et al., 2007). Our motivation for this work is to be able to
optimize the energy consumption at the Network and Application layers of the WSN
framework. One of our primary goals is to design a protocol that can better manage
both energy heterogeneity and homogeneity compared with the state-of-the-art often
reported in literature. As a secondary goal, we aim to meet the demands of dierent
application scenarios and guarantee reliability with respect to coverage preservation
and energy maintenance in the network. In addition, we attempted a real-world de-
ployment with some realistic application scenario driven by our own needs to achieve
a distributed and autonomous WSN deployment that can span into years with little
or no human intervention. Our proposed methods are further implemented on the
real-world testbed as a proof of concept. Both mathematical deductions and computer
simulations are used for the preliminary validation and testing.
1.2 Research Objectives
The research objectives of this thesis are to:
1. Design a protocol that can equally and eciently distribute the energy consump-
tion across all nodes and still achieve an extended network lifetime compared with
the state-of-the-art designs often oered as solutions for a clustered architecture
in the literature.
2. Provide novel methods that can signicantly improve the network lifetime of WSN
designs using data forecasting technique. This objective aims at providing new
understanding of the research problem on forecasting models often employed in
WSN and hence, providing key substantial evidence on claims of previous studies
done in this area.
3. Present a comparative assessment of the state-of-the-art data reduction models
using a simulation and a real-world deployment testbed that is implemented on
a COTS node platform.
3
4. Provide a robust WSN deployment for our in-house intelligent and control mon-
itoring building application that can last for years without any human interven-
tion.
5. Design a novel data acquisition scheme for an event-based monitoring system,
with the aim of conserving the energy resources in WSN deployments. The goal
is to provide a new design method for optimizing energy consumption in a data
gathering monitoring application.
6. Finally, we want to be able to assess the performance of our design strategies
with a focus on realistic applications.
1.3 Research Methods
In this thesis we have adopted key research methods that are often utilized in the eld
of wireless sensor networks. The following methods have been adopted: 1) Simulation-
based study 2) Testbed measurements and 3) Analytical modeling.
In the study of large-scale deployment of wireless sensor networks an experimental
method is often dicult to achieve due to the associated cost. Hence a majority
of the existing studies widely adopt a model-based method viz., simulation-based and
analytical approaches. For example the study in (Heinzelman and Chandrakasan, 2002;
Smaragdakis et al., 2004; Haase and Timmermann, 2002; Qing et al., 2006; Le Borgne
et al., 2007; Jiang et al., 2011) etc, which are similar to our study have adopted these
methods largely due to some of the following attributes: 1) It can ease the testing
of the performance of the dierent models on the same datasets 2) It can drastically
limit the testing time normally associated with real-world testing 3) It aords us the
opportunity to test large datasets from other similar available public deployments.
Although using simulation could have huge advantages, it can however limit the
selection of realistic parameter space that exists in the real world experimentations.
In addition it might be dicult to accurately interpret simulation results due to the
limited knowledge about the real-world system. Apart from some of these drawbacks,
we believe that simulation study when carefully designed can provide a close approxi-
mation on a real-world behavior of the system when it relates to WSN study.
In addition we adopted a real-world testbed measurement in order to assess the
performance of our simulation design strategies while focusing on realistic applications.
In previous studies on wireless sensor networks, very few studies have been done using
4
this method. As a result the interpretations of some of the ndings from the existing
studies could be inaccurate. A justication of the adoption of this method is because
it gives a practical understanding of the wireless sensor network problem domain,
which until recently have been heavily researched and yet it is still on the verge of full
standardization. We hope that by using this approach as a proof-of-concept, engineers
and WSN developers can gain more insight into the intricate aspects of this eld.
Finally, we adopted a rigourous analytical modelling, which serves as a foundation
for both our simulation and real-world testbed methods. To sum up, all the results
obtained are statistically assessed and compared with the state-of-the-art methods in
order to verify the improvements achieved by our proposed optimization methods.
1.4 Contributions
The contributions of this thesis are:
1. A design and implementation of an energy-ecient transmission protocol for a
clustered architecture in wireless sensor networks (Chapter 3).
2. An analysis of an optimized energy-ecient clustering protocols for coverage
preservation in the presence of energy heterogeneity (Chapter 4). This analy-
sis further presents two key strategies: 1) Spatial uniformity measurement and
2) Coverage lifetime, which can be exploited to further improve WSN protocol de-
signs for a robust performance. This method complements the results in Chapter
3.
3. A presentation of WSN design for a real-world application deployment i.e., our
intelligent and control monitoring solution. This work presents the details of our
testbed implementation and the network stack architecture (Chapter 5).
4. A design of a light-weight forecasting algorithm for prolonging WSN lifetime.
This study covers both simulation study and a real-world deployment scenario
for an application-specic design (Chapter 6). The real-word deployment utilizes
a commercial o-the-shelf platform.
5. A design of a data acquisition protocol for a fast-reactive monitoring application
(Chapter 7). This work covers a real-world implementation testbed using the
WISPES W24TH node and NXP-Jennic open source platform. As a use-case, a
wildre monitoring application is presented. In addition, this method oers an
5
intuitive approach to further optimize the WSNs energy consumption by combin-
ing two key strategies, i.e., data reduction and energy-ecient data acquisition,
to realize our goal.
1.5 Refereed Journal and Conference Publications
The following publications have resulted from various chapters of this thesis.
Aderohunmu, F.A., Deng, J.D. and Purvis, M.K. (2011). Enhancing clustering
in wireless sensor networks with energy heterogeneity. Inter. Journal of Business
Data Communications and Networking, 7(4), 18-32, doi:10.4018/jbdcn.2011100102.
Aderohunmu, F.A., Deng, J.D. and Purvis, M.K. (2011). A Deterministic Energy-
ecient Clustering protocol for wireless sensor networks. In Proceedings of the
Seventh IEEE International Conference on Intelligent Sensors, Sensor Networks
and Information Processing (IEEE-ISSNIP), pages 341-346, Dec. 2011. Adelaide,
Australia.
Aderohunmu, F.A., Deng, J.D. and Purvis, M.K. (2012). Optimization of Energy-
ecient Protocols with Energy-heterogeneity for Coverage Preservation in Wire-
less Sensor Networks. In Proceedings of The High Performance Computing and
Communication & 2012 IEEE 9th International Conference on Embedded Soft-
ware and Systems (HPCC-ICESS), 2012 IEEE 14th International Conference on;
pages 1173-1178, June, 2012. Liverpool, UK.
Aderohunmu, F.A., Paci, G., Brunelli, D., Deng, J., and Benini, L. (2013). Pro-
longing the lifetime of wireless sensor networks using light-weight forecasting
algorithms. In Proceedings Intelligent Sensors, Sensor Networks and Informa-
tion Processing, 2013 IEEE Eighth International Conference on, pages 461-466,
Adelaide, Australia (April 2-5, 2013).
Aderohunmu, F. A., Paci, G., Brunelli, D., Deng, J. D., Benini, L., and Purvis,
M. (2013). An Application-Specic Forecasting Algorithm for Extending WSN
Lifetime. In Distributed Computing in Sensor Systems (DCOSS), 2013 IEEE
International Conference on, pages 374-381. Cambridge, Massachusetts, USA,
(May 21-23, 2013).
6
Aderohunmu, F.A., Paci, G., Brunelli, D., Deng, J., Benini, L., and Purvis,
M.(2013). Trade-os of Forecasting Algorithm for Extending WSN Lifetime
in a Real-World Deployment. In Distributed Computing in Sensor Systems
(DCOSS), 2013 IEEE International Conference on, pages 283-285. Cambridge,
Massachusetts, USA, (May 21-23, 2013).
Aderohunmu, F. A., Paci, G., Brunelli, D., Deng, J. D., and Benini, L. (2013).
SWIFTNET: A Data Acquisition Protocol for Fast-reactive Monitoring Applica-
tions. In Proceedings of The 8th IEEE International Symposium on Industrial
Embedded Systems (SIES). Porto, Portugal (June 21-24, 2013).
Aderohunmu, F.A., Balsamo, D., Paci, G., and Brunelli, D. (2013). Long Term
WSN Monitoring for Energy Eciency in EU Cultural Heritage Buildings. Tech-
nical report, University of Otago, New Zealand and University of Bologna, Italy.
(Accepted for publication at the IEEE REALWSN 2013).
1.6 Thesis Outline
This thesis is organized into two main categories of energy-ecient optimization strate-
gies for WSNs, namely:
1. A network-based routing protocol under the communication-driven category,
2. Data reduction and data acquisition method under the data-driven category.
Thus, in Chapter 2, we provide a detailed discussion on the state-of-the-art techniques
of optimizing energy consumption in WSNs under the two key categories mentioned
above. Chapter 3 provides our new WSN clustering protocol; a deterministic energy-
ecient clustering protocol designed for an improved network lifetime. The network
model, the lifetime analysis and the theoretical framework of our design are presented,
followed by the discussion of our experimental results. In Chapter 4, we conduct an
empirical study on our improved heterogeneity-aware clustering protocol. We dene a
full coverage time, as well as a spatial uniformity measurement to analyze the perfor-
mance of our design strategy. Chapter 5 presents our WSN real-world deployment and
the architectural stack design with our application scenario. In Chapter 6, a new light-
weight forecasting algorithm for extending WSNs lifetime is presented. A comparative
study of some well-known regression models using an application scenario is carried
7
out. Extensive simulation study is conducted followed by a real-world deployment to
verify our design strategy. Chapter 7 describes a new data acquisition method for a
fast-reactive monitoring application. This method combines the synergy between com-
pressed sensing (CS) and prediction method to oer an optimized energy consumption.
A wildre application is presented as a use-case to test the ecacy of this method. The
experimental results are presented thereafter. Finally, in Chapter 8, we conclude the
thesis and highlight open research direction for future WSN designs.
8
Chapter 2
Background
This chapter presents a review of wireless sensor networks with regards to energy
optimization techniques. The review will cover two broad areas of energy optimiza-
tion strategies, namely: 1) Communication-driven approach with a particular focus on
network-based routing protocols and 2) Data-driven approach with a focus on data
reduction vis-a-vis data prediction methods. Our work has been informed and inu-
enced by a variety of other research eorts, which we will describe in this chapter. The
review will highlight the state-of-the-art methods as applied to both routing protocols
and data reduction in wireless sensor networks. The discussion will cover some of the
design challenges often encountered in these schemes and we will further highlight some
multi-objective criteria to be considered when embarking on WSN deployments.
2.1 Introduction
The advances in wireless communication and micro-electronics technologies have paved
the way for easy fabrication and development of miniaturized gadgets such as wireless
sensors powered by batteries, solar cells and vibration. Wireless sensor nodes are ca-
pable of gathering information from the environment where they are deployed. There-
after, the sensor nodes can process or store the data for future use depending on the
application. Furthermore, it is most likely that these sensor nodes will be required
to transmit their data to another neighboring node or to a Base Station (BS). In a
nutshell, a sensor node could be powerful enough to accomplish three tasks: Sensing,
Processing and Transmission. In order to achieve a robust result, it is important to
allow these sensor nodes to work in a collaborative manner so as to achieve a collective
objective. The design of such an architecture give rises to the well researched wireless
sensor networks (WSNs). This eld has received lots of attention in the past decade
9
and it is still on the verge of full actualization in some application domain. Part of the
reasons why the development of WSN will continue to receive attention is that they are
powerful for any monitoring application ranging from the military to our immediate
home environment. In recent times we have seen some real-world deployment of WSN
such as wildre monitoring application in China
1
, structural health monitoring (Kim
et al., 2007), health care monitoring system (Shnayder et al., 2005; Wood et al., 2006)
etc. As mentioned in the previous chapter, majority of the time, the main bottle-neck
of WSN deployment is with the energy management. Most of the time the sensor
nodes will have limited source of energy. It is against this background that lots of
authors have proposed dierent energy-aware methods to help cope with this bottle-
neck. In the next section we give a brief introduction similar to the discussion covered
by both Al-karaki and Kamal (2004) and Anastasi et al. (2009) on the state-of-the-art
approaches to energy optimization methods in WSNs.
2.1.1 Taxonomy of Energy Optimization Strategies in WSNs
In this section we discuss the various state-of-the-art techniques that have been applied
to optimize energy consumption in wireless sensor networks. We present a detailed
taxonomy of these techniques as applied to our study, shown in Figure 2.1 and we
further narrow it down to the focus of this thesis with respect to our contribution to
the eld of WSNs.
The focus of this thesis covers two key areas: 1) Communication-driven and 2)
Data-driven approaches. From Figure 2.1 we extract sub-categories of these methods
and we discuss our contributions in each domain. Chapter 3 and 4 of this thesis con-
centrate on an energy management scheme based on the network routing protocols that
utilize a TDMA/CSMA approach. This is shown in Figure 2.2, specically, Chapter
3 discusses our improvement of a TDMA-based scheme, while Chapter 4 is devoted to
a performance analysis of Chapter 3 for a cross-layer design with respect to quality of
service guarantee.
The remaining chapters of this thesis addresses a data driven approach for an
energy optimization problem in WSN. One of the key contributions of these chapters
is that, we have taken a dierent dimension for the proof of concepts contrary to
the approaches often employed in the existing studies. Thus, we conduct extensively
both simulation studies and real-world deployment testbeds in order to understand the
1
http://www.futuregov.asia/articles/2012/jan/18/china-pilots-wildre-detection-sensor-network/
10
Figure 2.1: Detailed Taxonomy of optimization methods in WSN
11
practical implications of some of the existing proposed techniques and the feasibility
of turning the theoretical methods into real-world applications in the eld of WSNs.
In the next sections we discuss in details some of the methods in the taxonomy above.
Figure 2.2: Energy optimization: Taxonomy of a communication-
driven technique
2.2 Communication Driven: Routing Protocols
The majority of the routing protocols can be classied into network-based and protocol
operation-based (routing criteria). In general both classication can be implemented
as a MAC layer solution using a TDMA/CSMA and/or CDMA combination. The
contribution of our work falls under the network-based category, henceforth we will
concentrate on protocols in this category under two distinct architectures: at and
hierarchical network protocols. In at network-based protocols, nodes are assigned
equal role to perform network-wide data transmission. The at routing protocols are
based on the same concept as ad hoc networks, where a route is set up only when needed
(on-demand routing) or where there is an existing route from each node to every other
node so that when needed, it is immediately available (Agrawal and Zeng, 2010). In
hierarchical network-based protocols, nodes play dierent roles such as, cluster-head
etc. For ease of our discussion on previous proposed protocols, we list some of the
network-based protocols into the two categories shown in Table 2.1
2
. There have been
2
This table is intended for classication purposes only, and should not be taken as a contrast
between the adjacent individual protocols.
12
Table 2.1: Classication of network protocol design.
Hierarchical Flat
LEACH Directed Diusion
HEED SPIN
SEP Energy Aware Routing
SEP-E GBR
DEEC RUMOR
LEACH-D
some extensive works done in this eld, for example, a survey on routing techniques
in wireless sensor network is conducted by Al-karaki and Kamal (2004). The review
covered some well-known routing protocols. We have selected some of these protocols
with a particular focus on TDMA-based routing strategies that have been well studied
in previous works. Hence, we discuss each of these protocols in the following subsections
according to the two categories aforementioned.
2.3 Hierarchical Network-based Protocol Design for
WSNs
We present a review of some well-known hierarchical topology-based protocols with
a particular focus on clustered-hierarchy designs, followed by a presentation of at
topology-based protocols in the next section.
2.3.1 Low Energy-Adaptive Clustering Hierarchical Protocol
Low Energy-Adaptive Clustering Hierarchical Protocol (LEACH) (Heinzelman et al.,
2000) is one of the pioneering protocols that rst applied the clustering approach for
an eective energy management in WSNs. The LEACH protocol is a self-organizing,
adaptive clustering protocol that uses a randomization algorithm to distribute the en-
ergy load evenly among the sensors in a homogeneous network. The nodes in LEACH
organize themselves into local groups called clusters. Each cluster is governed by a
cluster-head/leader which rotates based on a probability threshold resulting from a sim-
ulated annealing (SA) algorithm rst described in Kirkpatrick et al. (1983). According
to the LEACH authors, the rotation of the cluster-head also leads to a dynamically
changing cluster sizes which in a way is a source of fault tolerance. This helps to evenly
13
spread the energy among the sensor nodes compared with the case where the cluster-
heads were to be chosen a priori and xed. Furthermore, the cluster-heads carry out
data compression on the data received from their cluster members. The data compres-
sion could be in form of signal processing or simply an averaging method depending
on the application in place. Finally, the compressed data is transmitted by the cluster-
head to the BS. The operation of LEACH is divided into rounds, and each round uses
a two-phase method called the set-up phase and the steady phase to accomplish data
dissemination from sensor nodes to the BS. We discuss these two phases that govern
the LEACH protocol in the subsections that follow.
Set-up phase of LEACH
The set-up phase begins with the cluster formation process, where nodes are organized
into clusters using a distributive algorithm. Nodes self-elect themselves to be cluster-
head at the beginning of round r + 1, which starts at time t with a probability P
i
(t).
P
i
(t) is chosen so that the expected number of cluster-head (CH) nodes for this round
is k
c
. If N is the number of nodes in the network (Heinzelman et al., 2000):
E[#CH] =
N

i=1
P
i
(t) = k
c
. (2.1)
Further, an indication function C
i
(t) is used to determine if a node i has been a
cluster-head in the most recent rounds, such that, C
i
(t) =0 if node i has been a cluster-
head, and one otherwise. The node chooses a probability P
i
(t) which is expressed as:
P
i
(t) =
_
_
_
k
c
Nk
c

[
r mod(N/k
c
)
]
if C
i
(t) = 1;
0 if C
i
(t) = 0.
(2.2)
According to Heinzelman and Chandrakasan (2002), only nodes that have not al-
ready been cluster-heads recently, and which presumably have more energy available
than nodes that have recently performed this energy-intensive function, may become
cluster-heads at round r +1. Once the dierent cluster-heads are elected, cluster-heads
broadcast their role as leaders. Any node within the communication range and with a
minimum communication distance join the respective cluster by sending a JOIN RE-
QUEST. The cluster-head sets up a TDMA schedule for its cluster members. The
TDMA schedule governs the intra-cluster communication and this helps to reduce the
interference within each cluster. This process concludes this phase, and the steady
phase begins.
14
Steady phase of LEACH
In this phase each node sends its data to the respective cluster-head in its allocated
time schedule. It is assumed that the nodes are synchronized, making all nodes to
start the set-up phase at the same time. Another assumption is that every node can
adjust its transmission power depending on the communication distance or perhaps the
received signal strength of the cluster-head advertisement message. Once the cluster-
head receives all the data, it performs some signal processing function such as data
aggregation. The aggregated data is then forwarded to the BS. In order to further
reduce inter-cluster interference, spreading codes are used combined with CSMA for
this purpose (Heinzelman and Chandrakasan, 2002). Thus, the LEACH protocol is
able to guarantee a better network lifetime compared with the conventional protocols
in a homogeneous set-up.
2.3.2 Low Energy-Adaptive Clustering Hierarchical Protocol
with Deterministic Cluster Head
Haase and Timmermann (2002) proposed a Low Energy-Adaptive Clustering Hierar-
chical Protocol with a Deterministic cluster-head (LEACH-D) similar to the original
LEACH except that they considered additional component which takes into account
both the probability P of election as cluster-head and the residual energy of each node.
In a nutshell the authors extend LEACHs stochastic cluster-head selection algorithm
by a deterministic component. Their rst approach was to directly introduce the resid-
ual energy component as a quotient to the original threshold equation in LEACH, such
that the new threshold indication function becomes
T(n)
new
=
P
1 P
_
rmod
1
P
_
E
n current
E
n max
(2.3)
where E
n current
is the current energy and E
n max
is the initial energy of the nodes. Al-
though, just by introducing this energy component could improve the network lifetime
but at the same time it has its inherent disadvantages, that is, the network gets stuck
after a certain number of rounds as reported by Haase and Timmermann (2002). The
reason is that there is a cluster-head threshold which is too low and the remaining
live nodes are left with low residual energies. As such, this pattern is not desirable for
most WSN applications, since the energy are not evenly consumed. To cope with such
anomaly Haase and Timmermann (2002) re-adjusted the threshold indication function
15
by introducing more parameters such that the threshold is increased for nodes that
have not been cluster-heads in the last 1/P rounds. Thus, the new equation becomes
T(n)
new
=
P
1 P
_
rmod
1
P
_
_
E
n current
E
n max
+
_
r
s
div
1
P
__
1
E
n current
E
n max
__
(2.4)
where r
s
is the number of consecutive rounds in which a node has not been a cluster-
head, this value is reset to 0 whenever a node becomes the cluster-head. The threshold
T(n)
new
is also reset to the value it had before the inclusion of the remaining energy into
the threshold-equation whenever r
s
reaches the value 1/P (Haase and Timmermann,
2002). This way the problem of the network being stuck is avoided, since the threshold
will never be too low. With this method the authors are able to further improve on the
original LEACH protocol in terms of network lifetime performance by better controlling
how cluster-head nodes are elected.
2.3.3 Stable Election Protocol
The rst approach employed to extend the network lifetime by Smaragdakis et al.
(2004) was rst to investigate the possibility and the impact of energy-heterogeneity,
which is a result of sensor nodes consuming dierent amount of energy in the net-
work over time. This could be due to: 1) Their distance or position to the BS; 2)
The amount of data aggregation performed as a cluster-head, which depends on the
size of each cluster; 3) Some nodes could fail during transmission as a result of the
deployment terrain or obstacle; 4) The network could be recharged by introducing
new set of additional nodes and 5) The nodes could be powered by energy harvesting
sources, such as, solar, wind etc. All the above reasons could potentially be sources
of energy-heterogeneity. Based on this investigation, Smaragdakis et al. (2004) pro-
posed an energy heterogeneous-aware protocol called Stable Election Protocol (SEP).
SEP is based on weighted election probabilities of each node to become cluster-head
according to the remaining energy in each node. In their work they use a two node
energy classication to characterize the energy-heterogeneity problem in the network.
They further adapted the weighted probabilities according to the types of nodes in the
network. Specically, they labelled some nodes as normal nodes and some nodes as
advanced nodes. Each type of node elect itself according to new sets of threshold
16
indication function given below:
T(n
nrm
) =
_
_
_
P
nrm
1P
nrm[
r mod(1/P
nrm
)
]
if n
nrm
G

;
0 Otherwise,
(2.5)
T(n
adv
) =
_
_
_
P
adv
1P
adv[
r mod(1/P
adv
)
]
if n
adv
G

;
0 Otherwise,
(2.6)
In the above equations the probability P in LEACH is replaced with P
nrm
and
P
adv
signifying the weighted probabilities, which translates into thresholds T(n
nrm
)
and T(n
adv
) of election for both the normal and advanced respectively. The values for
P
nrm
and P
adv
are calculated as:
P
nrm
= P/(1 + m),
P
adv
= (P)(1 + )/(1 + m),
(2.7)
where m is the proportion of the advanced nodes with times more energy than
the normal nodes. With the above governing equations the SEP protocol improved
signicantly the network lifetime of WSNs compared with the LEACH protocol.
2.3.4 Distributed Energy-Ecient Clustering Protocol
The Distributed Energy-Ecient Clustering Protocol (DEEC) (Qing et al., 2006), fol-
lowing the thoughts of SEP (Smaragdakis et al., 2004) was proposed to cope with
energy-heterogeneity. The DEEC protocol elect cluster-heads based on the ratio be-
tween the residual energy of each node and the average energy of the network. The
epochs of being cluster-heads for the nodes are dierent according to their initial and
the residual energies. Qing et al. (2006) further estimated the ideal value of network
lifetime which is used to compute the reference energy that each node should expend
during a round. They proposed a set of governing equations to ensure high energy nodes
have more chances of being elected as cluster-heads. They choose the probability P
i
to become cluster-head as:
P
i
= p
opt
_
1
E(r) E
i
(r)
E(r)
_
= p
opt
E
i
(r)
E(r)
(2.8)
where E
i
(r) is the residual energy of node i at round r, p
opt
is the initial probability of
a node to become cluster-head in a homogeneous setup as used in LEACH and E(r)
17
is the estimated average energy of the network at round r given as:
E(r) =
1
n
E
total
_
1
r
R
T
_
(2.9)
R
T
= (E
total
/E
round
) (2.10)
where R
T
is the total round of the network lifetime, n is the number of nodes in the
network, E
total
and E
round
are the total energy at the beginning of the network and
the energy consumed in the network in each round respectively. By using this method
of estimation, DEEC is able to further extend the network lifetime compared with the
LEACH and SEP protocols.
2.3.5 A Hybrid Energy-Ecient Distributed Clustering Pro-
tocol
Hybrid energy-ecient distributed clustering protocol is proposed to periodically select
cluster-heads according to a hybrid function i.e., the nodes residual energy and a
secondary parameter, such as the nodes proximity to its neighbors or nodes degree
(Younis and Fahmy, 2004). According to the HEED protocol, clustering process is
triggered every T
CP
+ T
NO
seconds. Where T
CP
is the time interval taken by the
clustering protocol to cluster the network and T
NO
is time between the end of a T
CP
interval and the start of the subsequent T
CP
interval. In order to guarantee a smooth
operation of the HEED protocol, an initial percentage of the node C
prob
is chosen, this
value may not be optimal at the beginning since this might not be known a priori.
Each node further computes the probability CH
prob
of being elected as cluster-head
using a set of equation expressed as:
CH
prob
= C
prob

E
residual
E
max
(2.11)
where E
residual
is the estimated current residual energy in the node, and E
max
is a
reference maximum energy (corresponding to a fully charged battery), which is typically
identical for all nodes (Younis and Fahmy, 2004). The value of CH
prob
is controlled
such that it does not fall below a certain threshold p
min
set to 10
4
which is selected
to be inversely proportional to E
max
. Younis and Fahmy (2004) further noted that the
choice of p
min
is intended to allow the algorithm terminate at N
iter
= O(1) iterations,
18
otherwise it becomes unstable. Using the above method, HEED protocol is able to
elect appropriate cluster-head that can help to further improve the network lifetime
when compared with the LEACH protocol. One of the few disadvantages of HEED is
that, it is designed for an energy-homogeneous setup, making it to inherit the problems
associated with the LEACH protocol.
2.3.6 Enhanced Stable Election Protocol
Aderohunmu et al. (2011a) proposed a modied clustering algorithm with a three-tier
energy set-up to characterize energy-heterogeneity, where energy consumption among
sensor nodes is adaptive to their energy levels. This protocol is a direct enhancement
to the original SEP protocol (Smaragdakis et al., 2004). Aderohunmu et al. (2011a)
introduces a new class of node called the intermediate nodes to further characterize
energy-heterogeneity. The enhanced protocol is referred to as SEP-E, which uses a
three-node energy classication to further improve the network lifetime compared with
both LEACH and SEP. The authors adapted the energy levels of each types of nodes
by assuming energy-heterogeneity in the network set-up. With this method each node
chooses a dierent probability for election as cluster-head depending on the type. The
governing probabilities are given below:
P
nrm
= P
opt
/(1 + m + b). (2.12)
P
int
= P
opt
(1 + )/(1 + m + b). (2.13)
P
adv
= P
opt
(1 + )/(1 + m + b). (2.14)
where P
nrm
, P
int
and P
adv
are the probabilities of becoming normal, intermediate and
advanced nodes respectively. m is the proportion of the advanced nodes with times
more energy than the normal nodes, b is the proportion of the intermediate nodes
with times more energy than the normal nodes. p
opt
is the initial probability of a
node to become cluster-head in a homogeneous setup as used in LEACH. However,
to guarantee that the protocol adapts to the type of nodes (heterogeneous setup), the
threshold indication function used in LEACH and SEP must be changed to T(n
nrm
),
19
T(n
int
), T(n
adv
) for normal, intermediate and advanced nodes respectively, which re-
ect the cluster-head election probabilities. These probabilities must equally satisfy
the following conditions (Aderohunmu, 2010):
1. The advanced nodes must be cluster-heads exactly (1 + ) times every
1
P
opt
(1 +
m + b).
2. The intermediate nodes must be cluster-heads exactly (1+) times every
1
P
opt
(1+
m + b).
3. Every normal nodes must also become cluster-heads once every
1
P
opt
(1+m+b).
4. The average number of cluster in the network should be nP
opt
.
Following this analysis the threshold indication functions for normal, intermediate
and advanced nodes can be computed as:
T(n
nrm
) =
_
_
_
P
nrm
1P
nrm[
r mod(1/P
nrm
)
]
if n
nrm
G

;
0 Otherwise,
(2.15)
From the above equations, we have n(1 mb) normal nodes, which ensures that
our assumption (1) is exact, where G

is the set of all normal nodes that have not


become cluster-head in the past 1/P
nrm
round r. The same analogy follows for the
intermediate and advanced nodes.
T(n
int
) =
_
_
_
P
int
1P
int[
r mod(1/P
int
)
]
if n
int
G

;
0 Otherwise,
(2.16)
We have nb intermediate nodes, with G

the set of intermediate nodes that have not


become cluster-head in the past 1/P
int
round r. This proves assumption (2) to be
valid.
T(n
adv
) =
_
_
_
P
adv
1P
adv[
r mod(1/P
adv
)
]
if n
adv
G

;
0 Otherwise,
(2.17)
Similarly, we have nm advanced nodes, with G

as the set of advanced nodes that


have not become cluster-head in the past 1/P
adv
round r. Hence validating assumption
(3), from Eqs. (2.15), (2.16) and (2.17), the average total number of cluster-heads per
round will be:
20
n(1 mb)P
nrm
+ nbP
int
+ nmP
adv
.
= nP
opt
. (2.18)
To sum-up, SEP-E is designed to exploit dierent levels of heterogeneity in the net-
work, which proved to further signicantly extend network lifetime compared with the
LEACH and SEP protocols (Aderohunmu, 2010).
2.4 Flat Network-based Protocol Design for WSNs
In this section we present a review on some few known protocols using at network-
based design, then followed by a concurrent discussion on some of the drawbacks of
these protocols. We have intentionally focused on the pioneering protocols under this
theme and we prefer to omit variants of the main methods in our discussion.
2.4.1 Sensor Protocol for Information via Negotiation
The Sensor Protocol for Information via Negotiation (SPIN) (Heinzelman et al., 1999)
is a family of protocol designed to eciently disseminate information among sensors
in an energy-constrained wireless sensor network. The protocol is proposed as an
improvement to the classical ooding approach. The idea is to use high-level data
descriptors called, meta-data to eliminate redundant data throughout the network.
All the nodes are treated as a potential sink node. This way the sensor nodes in the
network do not need to have dierent role to achieve data transmission from the source
node to the BS. SPIN incorporates two key strategies i.e., negotiation and resource-
adaptation to solve the problem of implosion, overlap and resource blindness that is
often associated with the classic ooding approach. To overcome the implosion and
overlap problems, SPIN nodes negotiate with each other before transmitting data.
With the concept of negotiation, SPIN is able to ensure that only useful information
is transmitted in the network by using the meta-data descriptor to name the data
they observe. Similarly, to overcome the problem of blindness, SPIN nodes poll their
resources before data transmission. Every node is equipped with a resource manager
that keeps track of the resource consumption. This allows sensors to cut back on certain
activities when energy is low e.g., by being more prudent in forwarding third-party data
(Heinzelman et al., 1999).
21
SPIN operation is a 3-stage protocol, which requires nodes to use three types of
messages ADV, REQ and DATA to communicate. The ADV is used to advertise new
data when a SPIN node has data to share, it can advertise this information by sending
an ADV message containing meta-data. The REQ message is used to request data.
The SPIN node send the REQ message whenever it wishes to receive a new data.
Finally, DATA is the data message that contains the actual sensor data with a meta-
data header. The operation starts when a SPIN node receive new data that it is willing
to share. It then broadcast an ADV message containing the meta-data descriptor, if
a neighbor has an interest in the data, its sends a REQ message for DATA and the
DATA is sent from the source to this neighbor node. This process is repeated with
other neighbors until the entire sensor area receives the particular copy of the data.
One of the few advantages of SPIN over the classical ooding is that topological
changes are localized since each node needs to know only its single-hop neighbors (Al-
karaki and Kamal, 2004). SPIN is able to achieve a higher energy-eciency than the
ooding technique, since the meta-data negotiation almost halve the redundant data.
However, one of the few drawbacks is that the message delivery in SPIN cannot be
guaranteed.
2.4.2 Directed Diusion
The directed diusion routing protocol is proposed by Intanagonwiwat et al. (2003)
for a data-centric and application-aware WSN. The directed diusion is data-centric
in the sense that all communication is for a named data. This enables diusion to
achieve energy savings by selecting empirically good paths and by caching and pro-
cessing data in-network through data aggregation. The idea is that data coming from
dierent sources en-route in-network aggregation are combined by eliminating redun-
dancy and minimizing the number of transmitted data, thus, saving network energy
and prolonging network lifetime. Unlike the traditional end-to-end routing, the di-
rected diusion nds route from multiple sources to a single destination that allows
in-network consolidation of the redundant data (Al-karaki and Kamal, 2004).
The operation of directed diusion consist of several elements: interests, data mes-
sages, gradients, and reinforcements. Figure 2.3 depicts a schematic of the directed
diusion process. The interest message is a query that species what the user want.
The data message species the collected information of the monitored phenomenon.
22
(a) (b) (c)
Figure 2.3: Directed diusion simplied schematic (Intanagonwiwat
et al., 2003): (a) Interest propagation (b) Gradient setup (c) Data
delivery via reinforced path.
The operation of directed diusion begins when a sensing task is propagated through-
out the sensor network as an interest for the named data. Following this, gradients are
being set up, these are designed to pull events i.e., data matching interest. Gradient
direction is then set in the direction of the neighboring node from which the interest
is received. The events then start owing towards the source of the interests along
multiple gradient paths. Finally, to ensure the interests t gradients, the paths of in-
formation ow are formed from multiple paths and then the best paths are reinforced
so as to prevent further ooding according to a local rule. The overall goal is to nd an
aggregation tree with the minimum communication cost vis-a-vis energy budget that
can guarantee data transmission from the source node to the sink node.
An important feature of this routing scheme is that interest, data propagation and
aggregation are determined by local interactions i.e., message are exchanged between
neighbors or nodes within some vicinity (Intanagonwiwat et al., 2003). The nodes
in directed diusion are application-aware, which allows the protocol to achieve en-
ergy savings by selecting good paths and caching, and processing data in the network.
However, one of the few drawbacks of this protocol is that it may not be applied to
a continuous data delivery monitoring application such as environmental monitoring.
This is because the query on-demand data model may not help in this regard, moreover,
matching data to queries might require some extra overhead at the sensor nodes (Al-
karaki and Kamal, 2004). Other variants of the directed diusion have been proposed
in Energy Aware Routing (Shah and Rabaey, 2002), GBR (Schurgers and Srivastava,
2001), EBGR (Zhang and Shen, 2010) and Rumor Routing (Braginsky and Estrin,
2002). Their results revealed various improvements in terms of network lifetime com-
pared with the directed diusion and other existing schemes in the same domain. In
the next subsection, we present one of the directed diusion variants and we conclude
23
our discussion on the at network-based routing protocols.
2.4.3 Gradient-Based Routing
Schurgers and Srivastava (2001) proposed a variant of the directed diusion called
Gradient-Based Routing (GBR). The key concept of GBR is that packets are forwarded
on the link with the largest gradients and nodes are required to memorize the number
of hops when the interest is diused through the network. The gradient of a link is
calculated as the dierence between a nodes height and that of the neighbor. The
height of a node is calculated as the minimum number of hops to reach the BS. The
approach of GBR further aggregate packets streams and reshapes the trac ow over
the network. One important goal of this scheme is to obtain a balanced distribution of
the trac ow using network trac spreading techniques, thus improving the network
lifetime. Their simulation results revealed that energy consumption in the network can
be reduced up to a factor of 2 to 3.
2.5 Remarks On Routing Methods
Generally, majority of the at or hierarchical network-based protocols are application-
specic and the experiments reported in literature are largely simulation based, which
makes it dicult to assess the performance in terms of energy consumption in a real-
world scenario. However, the simulation study provides a close approximation on
how much network lifetime could be achieved when using these protocols in a real-
world deployment. Finally, we acknowledge that considerable eorts have been exerted
so far on routing protocols in WSN, however, there are other key areas that could
provide promising performance in terms of energy eciency and quality of service
(QoS). Such areas could exploit tiered architecture with a mix form of energy levels
(source of heterogeneity), density and spatial diversity of nodes, data reduction through
in-network processing and/or data prediction, dynamic reconguration and topology
change etc. Hence, we have addressed some of these points in the remainder of this
thesis.
24
2.6 Data Driven Schemes: State-of-the-Art
The state-of-the-art data driven schemes are designed according to the problems they
intend to address. For example, the energy-ecient data acquisition paradigm as
depicted in Figure 2.4 tackles energy optimization problem from the perspective of how
data is being sampled in a monitored environment over time. These methods can be
classied into: 1) Adaptive sampling strategy; 2) Hierarchical sampling and 3) Model-
driven sampling method. Similarly, from Figure 2.4, data reduction strategies another
category of data-driven method instead tackles the energy optimization problem from
the perspective of how much data can be suppressed in the network. This method
has continued to gain grounds over the years due to its simplicity of approach to
signicantly minimize the energy-consumption in an energy-constrained WSN. The idea
can also be classied into three categories: 1) In-network processing and aggregation;
2) Data compression and 3) Data prediction. We will review and analyze some of these
methods in this thesis. Hence, we have devoted a chapter to data reduction methods.
In particular Chapter 6 provides a comparative study on the state-of-the-art data
reduction methods often encountered in literature, followed by our proposed method
with results from a realistic real-world deployment implementation. In addition, in
Chapter 7 we present a new method that combines key areas of data reduction strategies
for an improved WSN lifetime, followed by a presentation of the results from a real-
world deployment testbed of an application scenario on a WISPES W24TH node-type
device.
In the next subsection, we survey the key areas that are directly relevant to our
work.
2.6.1 Data Reduction Strategies
Data reduction methods have been employed in various application domains to provide
an improved network lifetime for wireless sensor networks. One of the early works on
in-network processing (Madden and Franklin, 2002) proposed an enhanced query plan
data-structure called Fjords. Their method allows users to pose queries that combine
streaming, push-based sensor-sources with traditional sources that produces data via a
blocking i.e., a pull-based iterator interface. Similarly, Yao and Gehrke (2003) evaluated
the design of a query layer for sensor networks. The query layer accepts queries in a
declarative language that are then optimized to generate ecient query execution plans
with in-network processing which can signicantly reduce the resource requirements.
25
Figure 2.4: Energy optimization: Taxonomy of a data-driven method
In a more recent study on in-network processing Malhotra et al. (2011) considered
the exact top-k query problem in wireless sensor networks, i.e., where one seeks to
nd the k highest reported values as well as the complete set of nodes that reported
them. Their primary objective was to provide a new ltering-based algorithm for
processing exact top-k queries in WSN. A similar study was conducted by Thanh et al.
(2009) they proposed two algorithms that enhanced querying information in multi-hop
WSN. The rst algorithm is the decentralized query reevaluation algorithm proposed
to reduce the communication cost of sending probe messages from the BS to the leaf
with updated information. The second algorithm is a regression-based model proposed
to improve the eectiveness of lters in the nodes. This method is more of a predictive
model based on historical data at each sensor node. The overall goal is to improve the
network lifetime of the sensor system. There are lots of other in-network processing
methods oered in literature, however, we will limit our discussion on this topic as it
is not directly connected with the focus of our work.
One of the other key areas is data compression in WSN. Data compression ap-
proach has received lots of attention in the recent times particularly due to the proven
enhancement to energy consumption associated with aggregating and sending very few
data packets. Some of the well-known aggregating functions such as, MIN, MAX,
AVG have been studied in the past literature e.g., Madden, Szewczyk, Franklin, and
Culler (2002) showed how generic query interface for data aggregation can be applied to
ad-hoc networks of sensor devices. Similarly Madden, Franklin, Hellerstein, and Hong
(2002) proposed TAG; a simple query service for aggregation in low-power, distributed,
26
wireless environments. Other recent works have proposed data compression algorithm
to manage energy consumption in WSN. For example Baek et al. (2004) studied how to
reduce energy consumption in large-scale sensor networks which systematically sample
a spatio-temporal eld. They further formulated a distributed compression problem
subject to aggregation (energy) costs to a single sink. Their analysis and simulations
revealed that an optimal organization of aggregation/compression can yield 8-28% en-
ergy savings depending on the compression ratio. Also, Sadler and Martonosi (2006)
proposed a lossless data compression algorithm for a delay tolerant network. Their
results proved that it is possible to achieve up to 2 or more cut on energy consump-
tion for their application setup. Other recent approaches applied compressive sensing
(CS); a new compression paradigm for large scale networks using temporal-spatial data
correlation techniques. For example Caione et al. (2010) considered a scenario in which
a large WSN, based on ZigBee protocol, is used for monitoring (e.g., building, indus-
try etc.). Hence, they proposed a new algorithm for in-network compression aiming
at longer network lifetime. Their result revealed a trade-o on the energy spent in
transmission and data compression. Similarly, the work by Luo et al. (2009) anchored
on CS to oer an improved network lifetime for WSN. In particular, they proposed
a complete design that applies compressive sampling theory to sensor data gather-
ing for large-scale wireless sensor networks. They considered the scenario in which a
large number of sensor nodes are densely deployed and sensor readings are spatially
correlated. In a similar recent study by Min et al. (2012), they proposed a data com-
pression technique using temporal correlation of sensor data, data transformation from
one dimension to two dimension, and data separation to achieve their goal. It is worth
noting that, although, the application of CS on data compression in WSNs has been
successfully applied, however, majority of the studies are drifted towards non-real-time
application of data gathering in WSN.
Finally, data prediction method in WSN is becoming more mature in recent years.
A survey of this area was conducted by Anastasi et al. (2009), where they provided
some taxonomy of data driven methods with a focus on data prediction techniques.
In general, prediction method aims to achieve reduced transmission cost. Since during
data transmission the radio is in ON mode, this has shown to consume energy re-
source compared to when the node is in a sleep mode. Specically, 1 packet suppressed
is equivalent to 13 minutes of added lifetime on a WISPES W24TH node platform
(Aderohunmu, Paci, Brunelli, Deng, Benini, and Purvis, 2013b). The idea is that, if
the sink node can rightly predict the data at the source node with a given error bound,
27
the source node can avoid transmission until the error bound condition is violated. In
a nutshell, models can be built at the sink node and then transmitted to the source
nodes for prediction. The reverse could also be possible i.e., source nodes build their
models and communicate it with the sink node. There have been quite a number of
studies on how to achieve an ecient data prediction method with minimal energy cost
on the network and sensor nodes. A pioneering work in this respect is Liu et al. (2005),
the authors derived a model-based prediction approach. They used the Autoregres-
sive Integrated Moving Averages (ARIMA) to model the environment. Also, in PAQ
(Tulone and Madden, 2006), a similar approach was applied, however, with a lower
order autoregressive (AR) model. A common approach used by these methods is that
model parameters need to be constantly updated to the network and a prior knowl-
edge of the monitored system is required to accurately t a good model. Updating the
models often require the sink node to ood the model parameters into the network.
This increases the complexity of implementing a data prediction method on real-world
WSNs. More complex statistical models can be developed, however, their complexities
does not make them suitable for wireless sensor network (Anastasi et al., 2009). In
Santini and Romer (2006) an adaptive strategy for quality-based data reduction in
WSNs is proposed. Their approach focused on choosing a model that can be adaptive
and can avoid frequent model updates. Hence, they proposed a Least-Mean-Square
(LMS) adaptive lter. One of the major advantages of this approach is that it requires
no prior knowledge of the monitored environment for which the sink and source nodes
can easily be synchronized without constantly ooding the model parameters to the
network. In addition, the model computation is light-weight and can easily be achieved
on the network compared with the autoregressive models. In the same manner, Edara
et al. (2008) proposed an asynchronous in-network prediction. Their method is a com-
bination of aggregation and prediction to reduce data transmission in WSNs. They
used a combination of xed-weighted moving average model for predicting data trends
and a linear regression model that uses the Recursive-Least-Square (RLS) method for
the parameter estimates. Computing the RLS on the nodes will involve a matrix in-
version which requires a high computation to achieve. In a more recent study Yang
et al. (2011) applied a similar method to achieve a reduced energy consumption in
WSNs. They however, avoided the RLS method, instead they use the xed-weighted
moving averages that combines both temporal and spatial data suppression method
to improve the lifetime of WSNs. Overall, none of these approaches oers a realistic
method on achieving data gathering in a real-world implementation. The majority of
28
their results are simulation-based, using publicly available datasets from the real-world
deployment with the assumption that data synchronization can easily be achieved even
under frequent model parameter updates in the network. One of the few recent studies
on what does model-driven data acquisition really achieve in WSN?, (Raza et al.,
2012) examines two key issues: 1) Whether model-driven data acquisition works in a
real application; 2) Whether the energy savings achieved in theory are still worthwhile
once the network stack is taken into account. The authors proposed a linear model
known as derivative-based prediction (DBP). Their model still requires a learning phase
i.e., gathering of initial data to build a model and then transmitting the model to the
sink for the future predictions. If the model fails continuously at the source nodes,
a new model is generated and transmitted to the sink. This is similar to the update
methods used by Tulone and Madden (2006). Hence, inherits similar aws. However,
their results gave an interesting insight on prediction models. The summary of their
results revealed that up to 99% data suppression is achieved for an adaptive lighting
application in a road-tunnel. However, when the network stack is taken into consid-
eration DBP can only provide at best 3 lifetime improvement compared with the
traditional sense-transmit paradigm. Putting these results into perspective, it is obvi-
ous that any model with model updates and weight computation can easily be bounded
to the performance of the DBP when implemented on the network stack.
For simplicity, one of the obvious bottle-necks with complex models on WSN is that
it cannot be easily achieved practically especially when model updates are required for
a reasonable sized network deployment. An important open research direction was
raised in (Anastasi et al., 2009, pp. 556) and we quote: To this end, a research
direction would focus on assessing if a specic solution is ecient for a certain class of
applications in a real-world scenario, so that it can be taken as a reference for further
study and possible improvements. Therefore, we carried-out a detailed comparative
analysis of such solutions on a real-world application specic setting. A majority of
this work is well covered in Chapter 6 of this thesis.
2.6.2 Data Acquisition Methods
Following the taxonomy presented in Figure 2.4, data acquisition methods have been
widely studied in the literature. They have proven to signicantly improve the network
lifetime of WSNs. Similar to data reduction methods, the gain on any approach is tied
to the application setting. According to Anastasi et al. (2009), this approach can be
29
divided into three main parts: 1) Adaptive sampling; 2) Hierarchical sampling; 3)
Model-based active sampling.
In the eld of wireless sensor networks, the application setup could impose certain
energy costs that can be oset only by limiting the number of times an event is being
sampled. For instance, sensing arrays such as CMOS image sensors or some multimedia
sensors may require lots of power to operate, hence it is necessary for a WSN designer
to limit the number of times such sensing task is performed on the network. Similarly,
some other sensors such as acoustic (Simon et al., 2004) may impose a higher sampling
rate in order to achieve a quality reconstruction. Such sensing tasks over time could
also account for the majority of the energy drainage in the network deployment. On the
other hand, a low power sensor with a continuous sensing task could as well consume
huge amount of energy on top of the transmission cost. Thus, it would be necessary to
take such sensing paradigm into consideration when designing wireless sensor networks.
The idea of adaptive sampling is aimed at limiting the number of samples collected,
in fact some of the time it is possible to oversample a phenomenon. To avoid this,
Marbini and Sacks (2003) proposed an adaptive sampling mechanism that allows a
feedback control mechanism on each individual node. In the same manner, an adaptive
sampling for sensors was proposed by Jain and Chang (2004), their method uses the
well-known Kalman-Filter (KF)-based estimation technique wherein the sensor uses
the KF estimation error to adaptively adjust its sampling rate within a given range,
autonomously. When the desired sampling rate violates the range, a new sampling
rate is requested from the server. The approach is more centralized i.e., the algorithm
is executed at the sink and then the sample rate is transmitted to the individual
nodes. This method oers that the sensors adapt to the streaming-data characteristics.
Similarly, in a more recent study in Alippi et al. (2010), in order to make the rate of
sensing dynamic and adaptable, the authors proposed an adaptive sampling strategy
for energy conservation in a snow monitoring application. Their adaptive sampling
algorithm is able to dynamically estimate the optimal sampling frequency of the signal
to be monitored. In turn, this minimizes the activity of both the sensor and the radio
(hence saving energy) while maintaining an acceptable accuracy on the acquired data.
A more application specic approach is used in Zhou and De Roure (2007), where the
authors proposed a method that combines adaptive sampling rate and routing strategy.
Their system known as FloodNet, a ood warning system, which uses a predictor model
to make ood predictions based on readings of water level collected by a set of sensor
nodes. One of the aim of their method is to transmit data across nodes with ample
30
energy and light reporting tasks whilst conserving energy for other nodes low on battery
power and that are heavily required by the monitoring task.
In the same vein, hierarchical sampling strategy is a method targeted at using a
combination of low-power and high-power sensors (in terms of energy) on a node. The
idea is that some sensors are cheap in terms of energy consumption, hence, they can
be used more often to sense a process while the expensive ones are only triggered when
necessary. An example of such application is in target tracking. Targets can be discov-
ered using low-power sensors with poor resolution and when the detection is successful
a more powerful sensor can be turned on for high quality resolution construction. A
similar application referred to as triggered sampling is presented in Kijewski-correa
et al. (2006) proposed for a structural health monitoring application. In their study
they introduced the concept of multi-scale network with a restricted input activation
scheme for damage detection. A similar study is conducted by Tseng et al. (2007),
where they presented an integrated mobile surveillance and wireless sensor system
(iMouse) that uses static and mobile wireless sensors to detect and then analyze un-
usual events in the environment. Similarly, a survey on such surveillance system was
carried-out in a more recent study by Raty (2010), where the author presented some
challenging dilemmas that are composed of: 1) The attainment of real-time distributed
architecture, awareness and intelligence diculties existing in video surveillance; 2)
The utilization of wireless networks; 3) The energy eciency of remote sensors; 4) The
location diculties of surveillance personnel, and scalability diculties. In the same
manner, in Di Paola et al. (2008) a multi-sensor approach for indoor environments using
an autonomous mobile robot was presented. The robot is equipped with a monocular
camera, a laser scanner, encoders, and an RFID device, connected to a multi-layer de-
cision and control scheme. Fuzzy logic is then used to integrate information provided
by the dierent sensors. Applications of the proposed system includes surveillance of
wide areas, such as airports and museums, and monitoring of safety equipments. As
such, it is possible to acquire information from various environments using a mix of
dierent class of sensors to further limit the overall energy consumption in wireless
sensor networks.
Finally, model-driven active sampling, the third classication of data acquisition
paradigm from the taxonomy presented in Figure 2.4 aims at using a model to dynam-
ically tune the sampling rate of a sensing application. This process is similar to the
data prediction however, data prediction keeps the sampling frequency xed (Anastasi
et al., 2009). A more application oriented approach using this method is proposed in
31
Padhy et al. (2006). They developed a novel mechanism for adaptive sampling. In this
method, each agent adjusts its rate depending on the rate of change of its observations
and a valuation function (based on a sound information theoretic foundation) that the
agents use for assigning a value to the data they observe. They tested their approach
on GLACSWEB (Martinez et al., 2004), multi-sensor network; a network designed to
monitor sub-glacial behavior in order to understand climatic change.
Overall, all the methods i.e., energy-ecient data acquisition strategies reviewed are
aimed at achieving a reduced energy consumption in WSNs. Some of these techniques
are quite novel and seem promising when applied to large scale WSN deployment except
in most of the cases they could be application specic. An important future direction
to further improve energy consumption in WSN deployment would be to integrate
some of these approaches in a cross-layered design. For example, it has been shown
that data reduction strategy can provide improvement on network lifetime. Similarly,
energy-ecient data acquisition is equally promising to achieve an improved lifetime.
An integration of some of the sub-categories of these methods could be novel and
promising. Hence, we devote Chapter 7 of this thesis to attempt an integrated solution
for such techniques. The work reported in Chapter 7 is on-going, however, we have
shown by our experiments that such method could be ideal for a variety of real-world
applications.
2.6.3 Summary
This chapter provided an introduction to wireless sensor networks with various exam-
ples and potential application areas. The chapter enveloped and presented two major
direction of energy optimization schemes vis-a-vis communication-driven and data-
driven methods. We covered some of the state-of-the-art methods including the design
issues, WSN architectures and dierent clustering techniques for energy management
in WSNs. In the next chapters, we present our contribution to these major elds and
we oer some open research direction for future works.
32
Chapter 3
Routing and Network Protocols
This chapter presents an improved network protocol for wireless sensor networks. The
discussion covers the network model and the cluster formation process for WSNs that
are hierarchically clustered. The path-loss model, data aggregation model, the total
energy consumption and the lifetime analysis of the protocols for WSNs are also dis-
cussed. The description of the experiments conducted and analysis of the proposed
enhancement to LEACH, SEP and SEP-E are presented thereafter followed by the
discussion of the results.
3.1 Introduction
The network model design we have used is shown in Figure 3.1 and it is similar to the
one proposed in LEACH and other clustering protocols. We further explain how this
model design is used on the dierent network architectures. Specically, we discuss a
clustering approach using a single level design and a multi-level design. Following this
discussion, we formulate our approach and present the optimized clustering protocol
for an improved network lifetime.
3.2 Network Model Architecture
This thesis considers the radio energy dissipation model as used in a number of pre-
vious studies such as, Heinzelman et al. (2000) and Smaragdakis et al. (2004) shown
in Figure 3.1. From this gure, the rst assumption is that the radio model dissipates
energy E
elect
= 50nJ/bit to both the transmitter and the receiver circuits. The sec-
ond assumption is that both Friss free space (fs) and multi-path (mp) losses rely on
33
the transmitter amplier model and the respective node distances (d). Therefore, to
Figure 3.1: Network Model diagram
transmit k bits, the energy expended E
Tx
is:
E
Tx
(k, d) = E
Txelec
(k) + E
Txamp
(k, d)
=
_
kE
elec
+ k
fs
d
2
if d < d
o
;
kE
elec
+ k
mp
d
4
if d d
o
.
(3.1)
where d
o
is the distance threshold for swapping amplication models, which can be
calculated as d
o
=
_

fs

mp
. The electronic energy E
elec
often depends on factors such as
the digital coding, modulation, ltering, and spreading of the signal.
fs
and
mp
are
the amplier energies, which depend on the distance to the receiver and the acceptable
bit-error rate.
To receive a k-bit message, the radio will expend:
E
Rx
(k) = E
elec
k. (3.2)
It is further assumed that the radio channel is symmetric i.e., the same amount of
energy is required to transmit a k-bit message from node A to node B and vice versa.
34
3.3 Clustering Approach
3.3.1 Single-level vs. Multi-level Cluster Architecture
Wireless sensor networks can be designed to communicate using dierent types of com-
munication modes/levels. Some existing literature, such as, Smaragdakis et al. (2004);
Heinzelman et al. (2000); Li et al. (2005); Qing et al. (2006) proposed protocols that
utilize a single-level communication mode to send their data to the sink. Other lit-
erature, Sin et al. (2008); Vincze and Vida (2005); Bandyopadhyay and Coyle (2003)
employed hierarchical modes of communication (multi-level) for sensors outside each
others range to reach the sink. A dierent approach is used in Zhang et al. (2007),
the authors exploited the tradeo between a hop-by-hop transmission and a direct
transmission to the sink for a balanced energy dissipation among sensor nodes. Their
numerical results revealed that it is possible to achieve a signicant lifetime extension
especially for dense sensor networks. For simplicity, we consider a data communica-
tion process shown in Figure 3.2. In this design, the data communication process can
be logically classied within a clustering system. One of the design objectives of the
dierent communication modes is to further extend the network lifetime by reducing
the communication cost. Often this decision depends on how large the deployment is
and how dense is the deployment area. In Mhatre and Rosenberg (2004) the authors
investigated a systematic cost-based approach for both multi-level and single-level com-
munication modes. They further proposed a hybrid method that is focused on data
aggregation model. In a nutshell, the shift in communication paradigm from any-to-any
in adhoc networks to many-to-one in wireless sensor networks has motivated several
research into the design of energy aware protocols for WSNs, that meet the require-
ments of the dierent communication models. In this section we provide a discussion
on the modalities of the communication modes with respect to the energy consumption
analysis in WSNs. Further we emphasize that the protocols we have considered are
capable of being deployed with any of these models.
In a WSN design, when nodes communicate directly to the sink using a single-level
cluster structure, the nodes far away from the sink are likely to die out faster than
nodes that are closer due to the long range of transmission. On the other hand, when
a network is organized in a multi-level cluster structure, it is obvious that the nodes
closer to the sink will die out rst as a result of being over-burdened from relaying
packets of other far away nodes. The choice of either methods relies on the scale of
35
Figure 3.2: Sensor Network Design: Clustering method
the deployment. A network design of the above mentioned communication hierarchies
can yield desirable results if properly exploited. In the next sections, we closely exam-
ine these communication paradigms with respect to the energy consumptions in the
network for a clustered architecture design.
3.3.2 Single-level Clustering Structure
When nodes communicate directly with the sink without relaying their packets, it is
referred to as single-hopping or sometimes referred to single-level mode. Hence, for the
remainder of this work we will use these terms interchangeably as they connote the
same meaning. The design of a single-level technique could vary in dierent network
topologies. A protocol design may require the nodes to form clusters among themselves
such that, each non-cluster member sends its data to their respective cluster-heads and
the cluster-heads perform data aggregation before forwarding the rened data to the
sink node (Aderohunmu, 2010). Examples of this protocol design are LEACH and most
of the other proposed clustering algorithms. On the other hand, a protocol design can
completely adopt a layered architecture where the nodes are required to send their data
directly to the sink. An example of this protocol is the Direct Transmission protocol
(DTE) (Shepard, 1996). The drawback of a layered design such as DTE, is that, if
the sink is far away from the nodes, direct transmission will require large transmission
energy. As shown by Heinzelman et al. (2000), this method is not so eective, since
the nodes energy will be drained faster. This will impact the overall network lifetime
of the system. However, if the sink is within the sensing region i.e., located at the
center, the performance could be optimal since the sink is equidistant to all the square
36
region of the deployment. This particular scenario oers very interesting deployment
design. Also, the sink will be the only data reception point and the cost function
of data aggregation energy is minimized on the total energy of the network system.
Figure 3.3 depicts the single-level communication mode for a clustered WSN.
Figure 3.3: Single-level Network Design
3.3.3 Total Energy Dissipation for a Single-level Mode in a
Clustered WSNs
From the above mentioned design strategy for a single-level clustered architecture,
the total energy dissipation for the network system is expressed as the sum of energy
consumed by the sensor nodes to sense an event and transmit the sensed data to a
central location, in this case the sink node. If the sensor node is a cluster-head, the
energy expended will be the sum of energy consumed to sense the environment, to
receive data from cluster members, to perform data aggregation and to transmit the
aggregated data to the sink. As a cluster-head, the energy consumption could be high.
The energy expended is also a factor of the number of cluster members in each cluster
and the distance to the sink as discussed in Comeau (2008) and Aderohunmu (2010).
Optimal results can be achieved in a square area deployment if the sink is located at
the center of the sensing region compared with having the sink location outside the
sensing eld. Thus, we show mathematically the energy cost function, when the sink
node is located at the center of the sensing region as depicted in Figure 3.3. The total
37
energy dissipated by a cluster-head can be expressed as:
E
CH
= kE
elec
B
0
+ kE
DA
(B
0
+ 1) + E
Tx
(k, d
tosink
). (3.3)
recall that E
elect
is the energy dissipated by both the transmitter and receiver circuits
and n is the number of nodes in the network. E
CH
is the energy expended to receive B
0
number of k bits from cluster members, and E
DA
is the energy expended to aggregate
the data and then transmit with E
Tx
(k, d
tosink
) energy. In this premise, the free space
path-loss is used since the sink is at the center of the sensing region. Hence, if the
sensor node is a cluster member, the energy expended is given as:
E
nonCH
= kE
elec
+ k
fs
d
2
toCH
. (3.4)
The total energy expended in a single-level communication network will be the sum
of energy expended by non-cluster members and the cluster-heads, expressed as:
E
cluster
E
CH
+
n
c
E
nonCH
. (3.5)
However, to ensure an optimal setup for this type of communication mode, the follow-
ing issues need to be considered: an optimal number of cluster-heads per round per
epoch, and the battery dimensioning that will ensure at least a guaranteed network
lifetime. According to the study conducted by Heinzelman and Chandrakasan (2002),
in some instances, a single-level communication can be preferable to a multi-level com-
munication. The authors further noted that for the parameters they investigated, the
single-level communication is more ecient than the multi-level mode when they com-
pared their results with the work of Shepard (1996). However, the authors in Mhatre
and Rosenberg (2004) found this proposition to be relaxed when they considered a
network that may be deployed over a large region. Their work revealed that the en-
ergy consumed by each node to transmit packets to the sink can be higher than the
energy consumed if the data were to be aggregated and multi-hopped before transmis-
sion to the sink. The argument by Heinzelman and Chandrakasan (2002) may be true
for a single-level mode to become more ecient when the path-loss factor is 2. How-
ever, when this assumption is relaxed, then it becomes undesirable in large networks
(Aderohunmu, 2010).
3.4 Multi-level Clustering Structure
Various literature have proposed the use of multi-level communication model for sensor
networks. Similarly, multi-hop and multi-level connote same meaning, hence, will
38
be interchanged in the rest of the discussion. The idea of multi-level model follows
that nodes further away can relay their packets to nodes closer to the sink. One
of the earliest work to use this model is the Minimum-Transmission-Energy (MTE)
(Shepard, 1996). For their work, they estimated that a packet with a transmission
distance more than 2

1
2
should be routed through an intermediate node, where the
value of expresses the density in the intermediate area. The goal of this scheme
is to use the route with minimum energy consumption. However, the authors also
noted that, the minimization of energy in a multi-level routing is only one of the
criteria for an improved network lifetime. As discussed in Akyildiz et al. (2002b),
some other criteria for a multi-hop network might include maximal available power,
minimal hop and maximal-minimal available power. A similar study is conducted in
Aderohunmu (2010), where two improvements to the LEACH protocol is proposed i.e.,
the DLCC and MLCC protocols. However, their results revealed that not much energy
gain is achieved particularly for a LEACH model with either a dual-hopping or multi-
hopping strategies. This points to the fact that signicant lifetime improvements can
be achieved only if the network is particularly large probably with a sparse deployment.
Similar to the single-level model, multi-level architecture can be classied as ei-
ther inter-cluster-based and/or intra-cluster-based for clustered architecture or layer-
to-layer hopping for a layered architecture. For example, Xiangning and Yulin (2007),
proposed an inter-cluster multi-level communication as an improvement to the LEACH
protocol. Similarly, Ding (2002) successfully implemented a layered architecture using
a multi-level communication mode. A mobile sink strategy using a multi-level commu-
nication is proposed in Vincze and Vida (2005). Their approach is aimed at adaptively
moving the sink towards the events being sensed, and the nodes multi-hop to transmit
their data to the sink. As discussed in Section 3.3.2, deploying a multi-level archi-
tecture may be desirable only if the network is large enough to compensate for the
aggregation energy of the cluster-heads.
In the next section, we derive the total energy consumption for both dual-level and
multi-level design models and we leave the implementation of these approaches under a
heterogeneous setup for our proposed protocol design as an open research issue. Over-
all, our aim is to elaborate the dierent possible designs and the consequences on the
energy consumption for a clustered architecture and then describe the implementation
of our proposed protocol design for a small-scaled network as it has been used in the
existing protocol designs.
39
3.4.1 Total Energy Dissipation in a Dual and Multi-level Net-
work in a Clustered WSN
In this Section we derive the total energy consumption for a multi-level communication
design. Particularly, we consider a two-level communication (dual-level) model and
then we generalize the expression for a multi-level design following the thoughts of
Comeau (2008) and Aderohunmu (2010). Assuming we consider the scenario shown
in Figure 3.4 as a dual-level network, we can logically partition the network area into
three dierent levels; level 1, 2 and 3 with C
2
as level 2 (local cluster-heads) and C
3
as
level 3 (relay cluster-heads). When the clusters are formed in the network, C
2
cluster-
heads aggregate the data from level 1 nodes as their cluster members and they transmit
the data to C
3
cluster-heads. Interestingly, level 2 cluster-heads sees level 1 nodes as
their cluster members, likewise level 3 cluster-heads view level 2 nodes as their cluster
members.
Figure 3.4: Dual-hop Network Design
From Figure 3.4 given n nodes in a sensing eld, let the energy required for level
1 nodes to sense and transmit the data to level 2 be E
1
. Similarly, let the energy
required for level 2 cluster-heads to receive and aggregate the data from non-cluster
heads be E
2
, when level 3 cluster-heads receive and aggregate the data from level 2,
let the energy expended be E
3
and nally when level 3 transmits the data to sink, let
the energy expended be E
4
. Thus, the expected energy per bit for level 1 non-cluster
heads will be:
40
E
1
k
= E
elec
+
fs
d
2
toCH
(3.6)
Substituting d
2
toCH
=
M
2
2C
2
(recall the expected distance given in Eq.(3.22) with path-
loss 2) into Eq.(3.6), it becomes:
E
1
k
= E
elec
+
fs
M
2
2C
2
(3.7)
Likewise, the level 2 cluster-heads expend some energy receiving and aggregating the
data. The energy per bit is given as:
E
C
2
k
= E
elec
(
n
C
2
1) + E
DA
n
C
2
(3.8)
The term (
n
C
2
1) is the number of non-cluster head nodes for each level 2 cluster-head.
Hence, the overall energy per bit E
2
at level 2 stage will be the sum of energy expended
by non-cluster heads n C
2
in level 1 and the level 2 cluster-heads C
2
given as:
E
2
k
= (n C
2
)
E
1
k
+ C
2
E
C
2
k
(3.9)
Finally, at level 2, the selected cluster-heads will transmit the rened data to level 3
cluster-heads. Let (E
Tx
C2
/k) be the transmission energy per bit expressed as:
E
TxC
2
k
= E
elec
+
fs
M
2
2C
3
(3.10)
Using similar analysis above for level 3 cluster-heads, we have the overall energy per
bit to receive and aggregate the energy from level 2 cluster-heads as:
E
C
3
k
= E
elec
(
C
2
C
3
1) + E
DA
C
2
C
3
(3.11)
As explained from Eq.(3.9), C
3
level 3 cluster-heads, see level 2 cluster-heads as their
cluster members; hence we have (
C
2
C
3
1) non-cluster members per level 3 cluster-head.
The overall energy per bit (E
3
/k) expended at level 3 stage, will be the sum of energy
per bit of the non-cluster heads (C
2
C
3
) to transmit the aggregated data (in this case
level 2 becomes cluster members to level 3 cluster-heads) and the energy expended by
level 3 cluster-heads to receive and aggregate the data is given as:
E
3
k
= (C
2
C
3
)
E
TxC
2
k
+ C
3
E
C
3
k
(3.12)
The total energy per bit expended at level 2 will be the sum of energies for receiving, ag-
gregating and transmitting, which is computed in Eq.(3.13) by substituting Eqs.(3.10),
(3.11) into Eq.(3.12).
41
E
2
k
= 2(C
2
C
3
)E
elec
+
fs
M
2
2
_
C
2
C
3
1
_
+ C
2
E
DA
(3.13)
Since the sink is located at the center in our setup, the free space path-loss factor of
v = 2 is utilized. Thus, the overall energy per bit E
4
required by level 3 cluster-head
to transmit to the BS or sink is expressed as:
E
4
k
= E
TxC
3
(k, d
tosink
). (3.14)
The function (k, d
tosink
) is expressed in Eq.(3.26). Finally, by adding Eqs.(3.9), (3.13)
and (3.14) the total energy per bit E
sum
that will be expended in a dual-hopping
network per round will be:
E
sum
k
= 2nE
elec
+
fs
M
2
2
_
n
C
2
+
C
2
C
3
2
_
+E
DA
(n+C
2
)+C
3
(
fs
d
2
tosink
E
elec
). (3.15)
Following from the network energy analysis for a dual-level scheme, we can derive a
generalized energy model by iterating the energy model for a three layer system into
an N
th
-level system. An extension of dual-level energy model yields an energy model
for a multi-level network in a hierarchically clustered WSN expressed as:
E(N
th
sum
)
k
= 2nE
elec
+
fs
M
2
2
_
n
C
2
2 +
N

i=2
C
i1
C
i
_
+E
DA
_
n +
N1

i=1
C
i
_
+ C
N
(
fs
d
2
tosink
E
elec
). (3.16)
As we have mentioned previously, the implementation of the multi-level approach
for our protocol design is left as an open research issue. In the next section, we
discuss the detailed implementation of our protocol design strategy under a single-level
clustering model.
3.5 Our Proposed Optimized Network Protocol
In this section, we have developed a purely deterministic model that utilizes clustering
to organize the WSNs. We propose a deterministic energy-ecient clustering (DEC)
protocol that is dynamic, distributive, self-organizing and it has proven to be more
energy ecient than the existing TDMA-based clustering protocols as shown by our
42
experimental results. DEC utilizes a simplied approach, which minimizes the compu-
tational overhead to self-organize the sensor network. Simulation studies are carried-
out to evaluate the ecacy of this method. The result is compared with few selected
existing protocols in our domain. Our simulation results show a better performance
with respect to energy consumption, which is reected in the network lifetime under
both homogeneous and heterogeneous settings when compared with the other existing
protocols. It is worthy of note that our approach approximates an ideal solution for a
balanced energy consumption in hierarchical wireless sensor networks.
Figure 3.5: Behavior of nodes energy consumption overtime
3.5.1 Motivation of DEC Protocol
The previous studies such as Aderohunmu et al. (2011a); Heinzelman and Chan-
drakasan (2002); Qing et al. (2006); Smaragdakis et al. (2004); Younis and Fahmy
(2004), that oer clustering solution for energy management in WSNs, have been fo-
cused majorly on utilizing probabilistic-based models to elect cluster-heads. The idea
of clustering involves electing leaders among the sensor nodes. When the cluster-heads
are elected, they gather the information from their respective cluster members, perform
data aggregation before reporting the aggregated data to the sink. However, being a
cluster-head could be an energy consuming task, as discussed in Heinzelman et al.
(2000). Consequently, rotating the cluster-head could have much more energy gains
than if it were to be xed. Hence, one of the most important factors in determining
43
the eciency of a good clustering protocol design for distributive WSNs is how well it
is able to manage the spread of energy consumption in the network in order to guar-
antee an improved lifetime. The probabilistic-based models have proven to improve
the network lifetime of a hierarchically clustered WSN. However, one of the major
disadvantages of this approach is that the rotation of cluster-heads is carried out in
a randomized manner, which makes the cluster-head election to be sub-optimal most
of the time. A consequence of this is sometimes nodes with lower residual energy are
elected as cluster-heads. Since the death of the rst node in the network constitute
the network lifetime (Heinzelman and Chandrakasan, 2002), there are situations where
the network reaches its lifetime while some nodes are still high in residual energy. De-
signing a protocol that is capable of a uniform energy consumption and/or distribution
in the network is non-trivial. It is against this background that we propose the DEC
protocol, which determines cluster-head (CH) election strictly based on the residual
energy (RE) of each node. For simplicity, our goal is to design DEC algorithm to look
similar to an ideal solution as shown in Figure 3.5 (Gamwarige and Kulasekere, 2005).
To meet this objective, we design DEC to oer the followings:
1. The CH election should be locally decided based on each nodes residual energy.
Each round should be independent of the subsequent round unlike the strategy
in LEACH, SEP and SEP-E.
2. DEC should guarantee every node a chance of election as long as its residual
energy is higher than its neighbors.
3. DEC should ensure an average of N
opt
cluster-heads is chosen in the network.
4. DEC should ensure an extended lifetime compared with LEACH, SEP and SEP-E
in both homogeneous and heterogeneous setups.
3.5.2 Path-loss Model
In the eld of wireless communication networks, path-loss estimation is based on the cir-
cuitry characteristics. When signals are sent from a transmitter to a receiver circuitry,
the path-loss is estimated as the function of the propagated signal of the transceiver.
This is calculated as the ratio of the power of transmitted signal to the power of the re-
ceived signal. For the purpose of this work we will adopt similar path-loss models used
in previous studies on clustered WSNs. The models are: multi-path fading and Friss
44
free space models. The multi-path model is often used to estimate longer transmission
range e.g., transmission from cluster-heads to BS, while the Friss free space model is
used for shorter transmission e.g., the distance from cluster members to their respective
cluster-heads. With the free space model, the energy loss due to channel transmission
is proportional to the square distance separation of the transmitter-receiver circuitry.
It is estimated as v = 2 for a distance d. The multi-path model estimates this channel
transmission loss as v = 4 for a distance d. For example in Heinzelman et al. (2000)
and Kim and Youn (2005), they considered the crossover distance between v = 2 and
v = 4, when the position of the sink is outside the sensing region. For simplicity and
ease of estimation of the energy consumption, we have not considered the crossover
distance, since in our topology, the position of the sink or BS lies at the center of the
sensing region for all the experiments conducted.
3.5.3 Data Aggregation Model
Data aggregation method is a type of in-network processing, and it has been described
previously in the current literature. The idea is that a node is capable of data gathering
from multiple sources and performs simple compression function such as min, max,
cusum, average or using a spatial correlation to reduce the received data into a single
packet. For instance, works such as in Comeau (2008), proposed a new data aggregation
model that involves data compression. This work is originally inspired by the authors in
Chen et al. (2005). The authors in Vaidyanathan et al. (2004) highlighted dierent data
aggregation schemes: in-network, grid-based and hybrid data aggregation. Similarly,
a study on the impacts of data aggregation in WSNs is carried out in Krishnamachari
et al. (2002). Generally, for the works closely related to ours such as the LEACH
protocol design, it is assumed that the data are perfectly aggregated, meaning multiple
packets are sent from all cluster members to their respective cluster-heads but only a
single packet is forwarded to the BS. Thus for the purpose of our studies, we assume
a perfect data aggregation E
DA
model such as the one used in a number of previous
studies like in LEACH, LEACH-D, DEEC, HEED, SEP and SEP-E protocols.
3.5.4 DEC Algorithm: Cluster Formation and Energy Model
In this section we discuss our cluster formation method and then formulate the energy
model for our approach. The key idea is that the sensor nodes should perform election
45
Figure 3.6: Flowchart of DEC algorithm
46
Figure 3.7: DEC cluster formation process
of cluster-heads with respect to their energy levels autonomously. Overall, the goal is to
reduce the communication cost and to maximize network resources when necessary. To
ensure concise information is sent to the sink or BS, each node transmits data to the
nearest cluster-head and these cluster-heads perform data aggregation (Heinzelman
and Chandrakasan, 2002). To put this into perspective, we abandon the simulated
annealing algorithm presented in Eq.(3.17) used in the previous studies to elect cluster-
heads. The way the algorithm in Eq.(3.17) works is that an assumed optimal number of
clusters c in each round is selected in each round. Recall from LEACH model described
in Chapter 2, each node can become a cluster-head with a probability P
opt
and every
node must become cluster-head once every
1
P
opt
rounds. Intuitively, it means we have
nP
opt
clusters and cluster-heads per round. Let the non-elected nodes be a member
of set G in the past
1
P
opt
rounds. Each sensor chooses a random number between 0
and 1. If this is lower than the threshold T(n) for node n, the sensor node becomes a
cluster-head. The threshold T(n) is expressed as:
T(n) =
_
_
_
P
opt
1P
opt[
rmod(1/P
opt
)
]
if n G;
0 otherwise.
(3.17)
Similarly, we can re-write SEP, LEACH-D, SEP-E and any other probabilistic-based
models that use simulated annealing algorithm as:
47
T(n
x
) =
_
_
_
P
x
1P
x[
rmod(1/P
x
)
]
Q if n
x
G

;
0 Otherwise,
(3.18)
where x could be nrm, int or adv i.e., the normal, intermediate or advanced nodes
respectively and Q is an additional quantity that can be dened as a function of the
ratio of the residual energy of each node or just a constant value. We refer to Eq.
(3.18) as a generic probabilistic-based model. For example, the authors in Heinzelman
and Chandrakasan (2002); Smaragdakis et al. (2004); Aderohunmu et al. (2011a) set
Q to 1. Haase and Timmermann (2002) estimated Q to be a deterministic quotient
that is computed every round for all the nodes in order to achieve improvements on
the LEACH protocol.
We modify the set-up phase in the probabilistic-based protocols, but we keep the
steady-state phase the same. Since nodes energy level can be determined a priori, the
cluster-head (CH) election process is reorganized to use only the information about
the residual energy (RE) of each node. The DEC owchart for this process is shown
in Figure 3.6. In DEC, at round m, the sink elects N
opt
cluster-heads for the network.
The sink can take part in the election of the CHs if and only if m = 1. The elected
CHs advertise their role using CSMA MAC just as in LEACH. However, in DEC unlike
in LEACH, the join-request message shown in Figure 3.7 will contain cluster-member
ID (CM-ID), CH-ID, CM-RE (cluster member-residual energy) and the header that
indicates the packet as a request. This way the residual energy (RE) information of
the cluster members (CMs) are known by their respective CHs, thus localized and can
be utilized for CH rotation in the subsequent rounds. When the setup phase ends,
the steady phase begins; but before the end of this phase the current CHs checks the
piggy-backed CM-REs information received to decide whether they will remain as
CHs or relinquish their roles by choosing any node in their clusters with the highest
RE as the new CHs. For example in Figure 3.7, the green colored node has the highest
RE and hence will be the new CH for the next round, note the information exchange
is carried-out using a unicast packet-type shown with the curve arrow in the gure.
After this decision is made for the new CHs and all the data from the current round is
communicated to the sink, the current round (r = m) ends (a perfect synchronization
is assumed, just as in LEACH). The next round r = m + 1 begins; but since the new
CHs have already been chosen in the previous round, they broadcast their role in the
new round and CMs join their cluster as previously explained above. The steady phase
begins again. This process continues in each round until the last node dies.
48
0 20 40 60 80 100
0
20
40
60
80
100
Sink
node
Advanced
node
Normal
node
Intermediate
node
Figure 3.8: Wireless Sensor Network; this is the setting of a hetero-
geneous setup showing dierent types of nodes in a three-energy level
hierarchy.
0 20 40 60 80 100
0
10
20
30
40
50
60
70
80
90
100
Figure 3.9: Voronoi regions resulted from the cluster formation. Here

indicates a cluster member,


a cluster-heads, and

a base
station (BS).
49
3.5.5 Energy Derivation
Given a eld of uniformly and randomly distributed nodes in an area of M M m
2
shown in Figure 3.8 with n nodes and c clusters in both homogeneous and heterogeneous
set-ups, on average there would be
n
c
nodes per cluster, one cluster-head and
n
c
1 non-
cluster heads, shown in Figure 3.9. Every cluster-head will dissipate energy receiving k
bits of data packet from the associated cluster members and transmitting the same to
the sink. Similarly, data aggregation prior to transmission will also cost energy, which
per bit is denoted as E
DA
. In a nutshell, the energy dissipated by each cluster-head is:
E
CH
= kE
elec
(
n
c
1) + kE
DA
n
c
+ E
Tx
(k, d
tosink
), (3.19)
where d
tosink
is the distance from cluster-head node to the sink. If we proceed by
estimating the energy expended at each node to be a function of the distance between
the transmitter and the receiver, by using the Euclidean metric as shown below, the
area occupied by each cluster will be A =
M
2
c
with a node distribution of (x, y)
E[d
2
toCH
] =
_ _
(x
2
+ y
2
)(x, y)dxdy =
_ _
r
2
(r, )rdrd (3.20)
From Geometry, assuming the area is a circle with radius R = M/

c, and (r, ) is
constant and density is uniform in the cluster area = (1/(M
2
/c)), we can simplify as
follows:
E[d
2
toCH
] =
_
2
=0
_
M/

c
r=0
r
3
drd. (3.21)
E[d
2
toCH
] =
_ _
(x
2
+ y
2
)(x, y)dxdy = M
2
/2c. (3.22)
In the same manner, the non-cluster heads, will expend energy to transmit k bits of
data to the respective cluster-heads, while a free space path-loss d
2
is adopted since
normally d
toCH
< d
o
in Eq.(3.1):
E
nonCH
= kE
elec
+ k
fs
d
2
toCH
, (3.23)
where d
toCH
is the distance from each node to their respective cluster-heads and
fs
is
the amplier energy that depend on the receiver and the bit-error rate.
The energy dissipated in a cluster per round can be estimated as:
E
cluster
E
CH
+
n
c
E
nonCH
(3.24)
50
The total energy dissipation in the network per round will be the sum of the energy
dissipated by all clusters, i.e.,
E
total
= cE
cluster
(3.25)
If the average of d
tosink
is greater than d
o
, the total energy can be calculated as:
E
total
= (kE
elec
(
n
c
1) + kE
DA
n
c
+ kE
elec
+ k
mp
d
4
tosink
)
+(kE
elec
+ k
fs
M
2
/2c).
(3.26)
Otherwise, when d
tosink
< d
o
applies, the total energy becomes:
E
total
= k
_
2nE
elec
+ nE
DA
+
fs
(cd
2
tosink
+ nd
2
toCH
)
_
. (3.27)
As discussed in Heinzelman and Chandrakasan (2002); Smaragdakis et al. (2004),
the optimal number of clusters can be found by letting
E
total
c
= 0.
c
opt
=
_
n
2
M
d
toBS
. (3.28)
The dierent forms of the E
total
calculation will lead to dierent optimal c
opt
settings
depending on the values of d
o
. The optimal probability for becoming a cluster-head
can also be computed as p
opt
=
c
opt
n
.
Figure 3.10: Variation of energy consumption pattern on the changes
to the number of clusters c formed. Energy values in log-scale are in
the unit of Joules.
In Figure 3.10, we show the average energy consumption by each individual non-CH
sensor node and CH sensor node, and the total energy consumed in each round, plotted
51
against varying numbers of clusters (c) for a typical clustered network setting. While
the total energy hits the bottom with c
opt
= 10, it is not too sensitive to the setting
of c as shown on the log-scale plot. However, it is clearly shown that for each node
the energy consumption for a CH is much more signicant than a non-CH node, about
an order of magnitude more over a wide range of c values. The energy consumption
pattern given in Figure 3.10 has a clear implication. In order to guarantee a prolonged
network lifetime, the election of cluster-heads is therefore crucial, as inadequate control
of the election process may lead to excessive consumption of energy, resulting in early
death of nodes especially when a node with very low energy is chosen to be a CH.
A more recent study by Islam et al. (2010) provided a mathematical bound on the
election probability for the LEACH protocol. The study presented a new mathematical
model to explain the optimal percentage of cluster-head for LEACH. Their work uses
a stochastic probability formulation called the Renewal Reward Process (RRP) and
the energy consumption is assumed to be the same with the concept of reward in the
RRP. Their work showed that the optimal probability for cluster-head election that
will optimize the energy consumption in a node is [0.044, 0.048] inclusive. However,
this work is based on a homogeneous situation. When energy heterogeneity exists,
the unbalanced energy consumption problem becomes even more pronounced. Thus,
our DEC protocol is designed to improve the network lifetime by ensuring that the
desired cluster-heads are chosen at every round resulting in a more balanced energy
consumption in the network.
3.5.6 Analysis of Cluster-head Election and Energy Consump-
tion
We present here both theoretical and experimental methods for the optimal cluster-
head elections.
Theoretical Analysis
For any given homogeneous and heterogeneous networks, we can re-write the optimal
probability p
opt
of cluster-head election in a closed form. Hence, we formulate it for
all the protocols to follow a probability mass function. We summarize the probability
p
elect
of a node to be elected as cluster-head for each protocol we considered according
to their improvements, hence we have:
52
LEACH: P
elect
= p
opt
=
c
opt
n
: n N (3.29)
LEACH-D: P
elect
= p
opt
=
c
opt
n
: n N (3.30)
SEP: P
elect
=
_
P
opt
/(1 + m) : for all n normal nodes
P
opt
(1 + )/(1 + m) : for all n advanced nodes
(3.31)
SEP-E: P
elect
=
_

_
P
opt
/(1 + m + b) : for all n normal nodes
P
opt
(1 + )/(1 + m + b) : for all n intermediate nodes
P
opt
(1 + )/(1 + m + b) : for all n advanced nodes
(3.32)
DEC: P
elect
=
_
1 : n (most powerful nodes) N
0 : otherwise
(3.33)
where m is the proportion of the advanced nodes with times more energy than the
normal nodes, b is the proportion of the intermediate nodes with times more energy
than the normal nodes. All these protocols try to maximize the probability P
elect
, such
that, high energy nodes are elected as long as possible to be cluster-heads. Therefore,
choosing this probability for each node will determine how long the network can last.
First, we make an assumption on the energy consumption at each node. Since, the
longevity of the network depends on how the cluster-head are elected, we can safely
equate the energy consumption of non-cluster heads to be negligible in order to compute
an approximate rate of energy consumption. The reason being that, as a cluster-
head the most energy is consumed for data aggregation and frequent transmission
(Aderohunmu et al., 2011a). Mathematically we can re-write P
elect
as a function of the
rate of the energy consumption, given as:
p
elect
= G(E
n
/

E)P
opt
: n N (3.34)
where

E is the average residual energy and E
n
is the residual energy of each node i.e.,
nrm, int and adv for normal node, intermediate node and advanced node respectively.
We will show later the eect of this rate of energy consumption on the lifetime of the
nodes, for now we defer the analysis for later section. Thus, for each protocol if we
substitute Eqs. (3.29), (3.31), (3.32) into Eq. (3.34), we have:
53
LEACH: G(E
n
/

E) = 1 (3.35)
SEP: G(E
n
/

E) =
_
1/(1 + m) : for E
nrm
<

E at r= 0
(1 + )/(1 + m) : for E
adv
>

E at r= 0
(3.36)
SEP-E: G(E
n
/

E) =
_

_
1/(1 + m + b) : for E
nrm
<

E at r= 0
(1 + )/(1 + m + b) : for E
int
>

E at r= 0
(1 + )/(1 + m + b) : for E
adv
>

E at r= 0
(3.37)
DEC: G(E
n
/

E) =
_
1/P
opt
:
E
(nrm,int,adv)

E
(the most powerful nodes) N
0 : otherwise
(3.38)
Consequently, choosing the function G(E
n
/

E), will determine how long the most
energy-limited node n
Emin
will last. In DEC, we aim at preserving the nodes that are
n
Emin
by ensuring that nodes with higher energy level n
Emax
are frequently elected
as CHs. Hence, our algorithm design takes into consideration the fact that the most
energy consuming task i.e., data aggregation and frequent transmissions should be
done by a selected n
opt
n
Emax
at all times. Following this consideration, we derive
an approximate bound on the improvements in terms of lifetime for each protocol.
Experimental Analysis
The DEC clustering algorithm is proposed to guarantee that the expected number of
cluster-heads per round is xed as N
opt
, which can be set a priori. In Figure 3.11, we
conduct a comparison of our DEC model with a probabilistic-based model. We use
LEACH protocol to represent the probabilistic-based models that uses the simulation
annealing algorithm. This analysis compares the number of elected cluster-heads per
round for DEC and LEACH. The solid line represents LEACH protocol, which reveals
the inherent uncertainties in these type of models, the consequence is that the required
xed optimal number N
opt
of cluster-heads election can not be guaranteed per round.
Although this N
opt
is reported in the empirical results in Heinzelman et al. (2000) to
be averaged, a protocol design that can guarantee a more precise N
opt
per round will
be more preferable. For example in LEACH, from this same gure very few cluster-
heads are elected in some rounds, resulting in the cluster-members transmitting at
54
0 200 400 600 800 1000
5
10
15
20
Rounds
N
u
m
b
e
r

o
f

c
l
u
s
t
e
r

h
e
a
d
s
Clusterheads elected per round


Figure 3.11: Number of cluster-heads per round. The solid line repre-
sents probabilistic-based models, which do not guarantee the election
of stable number of CH per round. The dotted line represents the
DEC protocol (deterministic-based), which guarantees a more stable
number of CH election per round.
much longer distances to reach the few elected cluster-heads for that round. If the
number of rounds where few cluster-heads are elected is high, the direct consequence
is that the energy consumption in the network will be equally high. Likewise, if the
number of elected cluster-heads is higher, not much data aggregation will be done
since the cluster size is smaller. Thus more energy will be used for transmitting. This
is one of the major drawbacks of this model. Another disadvantage of this model is
that the energy consumption across nodes becomes increasingly uneven as the network
progresses. This phenomenon is explained in the following subsection.
Taking a closer look at Figure 3.11, the dotted line represents our DEC protocol
which reveals that the uncertainties in the cluster-head election have been completely
eliminated. This ensures that for any network size, once the N
opt
is decided at the
beginning of the network operation, our DEC protocol guarantees that the number of
cluster-head election remains xed at N
opt
(Aderohunmu et al., 2011b). This behavior
of DEC equally guarantees that the energy distribution of the nodes is evenly spread
out as the network evolves. For the majority of the time the cluster-members will
have on average, shorter distances to transmit to their respective cluster-heads. Hence,
this provides a close form on the optimal available energy in the network deployment.
Overall, the energy gain is reected in the simulation results in favor of the DEC
55
protocol. This makes DEC to be very close to an ideal clustering solution for WSNs
compared with the existing protocols in the same domain.
3.5.7 Lifetime Analysis
Recall, in Subsection 3.5.6, we showed how the rate of energy consumption for each node
could have impact on the behavior of the protocols. Thus, we provide a mathematical
analysis of the protocols with respect to the theoretical lifetime that can be achieved
while considering the implication of the choice of each node as a cluster-head. The
bottleneck for a protocol design relies on how the energy consumption is utilized on
the normal nodes or on the nodes with the minimum energy level n
Emin
, as we have
previously mentioned, since, the majority of the time the energy consumed at each
node is largely due to being elected as a cluster-head. Hence, the lifetime of a node
governs the overall resultant lifetime of the network. For example, we can estimate the
lifetime L of a normal node in a LEACH settings as:
L =
E
o
E
CH
P
opt
(3.39)
where E
o
is the initial energy of the normal node and E
CH
is the energy dissipated by
a cluster-head node. In both SEP (Smaragdakis et al., 2004) and SEP-E (Aderohunmu
et al., 2011a), the nodes election probabilities are modied to cater for a heterogeneous
setup. Therefore, for SEP protocol, according to Eq. (3.31) (recall P
nrm
= P
opt
/(1+)
for normal nodes in SEP), the lifetime of both normal and advanced nodes can be
expressed as:
L

=
E
o
E
CH
P
nrm
= (1 + m)L, (3.40)
which indicates an extended lifetime of the normal nodes in SEP compared with
LEACH. For advanced nodes in SEP, we have:
L

a
=
(1 + )E
o
E
CH
P
adv
= (1 + m)L, (3.41)
Similarly, for SEP-E, from Eq. (3.32), the lifetime of the normal nodes can be
estimated as:
L

=
E
o
E
CH
P
nrm
= (1 + m + b)L, (3.42)
56
Clearly this indicates an extended lifetime for normal nodes in SEP-E compared with
both SEP and the LEACH protocols. Similarly, for intermediate and advanced nodes
in SEP-E (note that they have elevated initial energy), we can work out the relevant
lifetimes:
L

i
=
(1 + )E
o
E
CH
P
int
= (1 + m + b)L, (3.43)
L

a
=
(1 + )E
o
E
CH
P
adv
= (1 + m + b)L, (3.44)
suggesting that L

> L

> L, thus, the normal nodes for SEP-E enjoys prolonged


lifetime compared with SEP and LEACH. The same analysis follows for SEP nodes
when compared with LEACH. For our DEC protocol we expect the estimate of the
lifetime of the nodes to be more improved than these protocols. Recall, from Eq.
(3.38) that p
opt
can be expressed as a function G(E
n
/

E) i.e., the ratio of the initial
energy and the average energy in the network at each round r. Hence, we express this
lifetime as:
L

=
E
o
E
CH
G(E
n
/

E) = L, (3.45)
Thus, we expect L

> L

> L

> L for the nodes in DEC. Since our DEC protocol


is not probabilistic-based, we expect the value of to reect the resultant increment in
lifetime as an improvement to LEACH, SEP and SEP-E. We show empirically that our
DEC protocol yielded the expected improved lifetime. Particularly, from our simulation
studies we quantify the value of to be bounded as 1.2 2. Clearly if this
condition holds, DEC protocol will enjoy a prolonged network lifetime compared with
the other protocols in the same domain.
3.6 Simulation and Analysis of Results
In this section we discuss our experimental setup, the parameters and the performance
metrics. Finally, we present the results and we remark on the possible extensions to
these protocols.
57
3.6.1 Simulation Setup
Similar to the experimental studies conducted in the previous studies, such as Heinzel-
man and Chandrakasan (2002); Smaragdakis et al. (2004), we assume a 100m100m
region with 100 sensor nodes scattered randomly within. We use MATLAB
1
to imple-
ment the simulations of four protocols: LEACH, SEP, SEP-E and DEC. The MATLAB
source codes for the protocols are presented in Appendix A. Their simulation results are
then compared. The common parameters used in the simulation are shown in Table
3.1.
Parameter Values
E
elec
50nJ/bit
E
DA
5nJ/bit/message
E
o
0.5J
k 4000
P
opt
0.1

fs
10pJ/bit/m
2

mp
0.0013pJ/bit/m
4
n 100
Table 3.1: Parameter settings
We dene similar performance metrics as used in previous studies, such as Haase
and Timmermann (2002); Heinzelman and Chandrakasan (2002); Smaragdakis et al.
(2004); Aderohunmu et al. (2011a). They are dened as: 1) FND (First Node Dies,
also known as stability period); 2) PNA (90, Percent Nodes Alive) and 3) LND (Last
Node Dies). As explained in Smaragdakis et al. (2004) the larger the stability period
(FND) and the smaller the LND period are, the better the reliability of the clustering
process of the network. However, we need to note the trade-o between the reliability
and lifetime of the network system. In some cases the last alive node can still provide
some useful feedback, but this could in most cases be unreliable. We expect a balance
between these trade-os, which is reected in both the stability and instability periods
(i.e., the period between the FND and the LND).
These protocols are compared both in homogeneous and heterogeneous setups. The
LEACH protocol is used as a representation of a homogeneous scenario, because this
is the purpose for which it was designed by Heinzelman et al. (2000). For the het-
erogeneous setup we compared DEC with SEP, SEP-E and LEACH. For the sake of
completeness we introduce heterogeneity into the LEACH setup, thus, the setup has
1
http://www.mathworks.com
58
the same total energy as the other protocols. Likewise, both SEP and SEP-E are
designed by their authors Smaragdakis et al. (2004) and Aderohunmu et al. (2011a) re-
spectively, to be robust to heterogeneity, hence, it is fair to use them as representations
of heterogeneous-aware protocols.
The performance of the protocols are tested using two setups:
1. Setup 1: A 100m100m of randomly dispersed homogeneous nodes, each with
0.5J of energy and the BS located at the center of the network system.
2. Setup 2: A 100m 100m of randomly dispersed heterogeneous nodes with the
initial energies varying between 0.5J to 2.25J and BS located at the center of
the network system. To be fair, the total energy of the system for each protocol
are ensured to be the same; we use a total energy of 102.5J. In LEACH, SEP-E
and DEC, 20% of the nodes are equipped with 2J of energy, 30% with 1.25J of
energy and 50% with 0.5J of energy. However, in SEP two types of nodes are
assumed. In order to be complete, we have 30% of the nodes equipped with
2.25J of energy and 70% with 0.5J of energy and the total energy of the system
is 102.5J. Also, the optimal parameters of these protocols are utilized in order to
yield their respective best performance.
First, we provide an empirical result for the optimal number of cluster-head N
opt
for
our DEC protocol shown in Figure 3.12. The number of cluster-heads is varied between
1 and 30. This gure reveals that as the cluster-heads increases from 0 to 10, the FND
improves signicantly. The DEC curve is at between 10 and 20 cluster-heads with
little spikes in-between. Beyond 20 cluster-heads, the curve starts descending. The
optimality of N
opt
lies around 16 cluster-heads for our setup. As explained previously
in Subsection 3.5.6, when there are few cluster-heads, non-cluster head nodes will often
transmit data large distances to their cluster-heads; this drains their energy faster.
When there are more cluster-heads (from 10 to 20), non-cluster head nodes can easily
locate a nearby cluster-head. But when the number of CHs increases beyond 20, there
is not much local data aggregation being performed. More energy will be expended
due to the smaller sizes of the clusters formed. DEC is stable when the number of
cluster-head varies between 10 to 20, this shows the robustness of DEC to variable
number of cluster-head election, hence degrades gracefully.
59
0 5 10 15 20 25 30
900
950
1000
1050
1100
1150
Number of clusterheads per round
F
N
D
FND per number of clusterheads for DCE


DEC
Figure 3.12: FND in DEC as the number of cluster-head varies from
1 to 30. This graph shows that DEC is more ecient when cluster-
heads are between 10 and 20 and the optimality lies around 16 clusters
in homogeneous setup.
3.6.2 Energy Consumption Analysis
In this section, we take a close look at how each node consumes its individual residual
energy in the network. We then analyze this behavior using the standard deviation
statistic. The residual energy of each node is analyzed during the network operation,
by observing the variation of energy levels between the nodes at 100-round intervals
from round 100 to 1000. We use the standard deviation to verify these dierences
among the nodes in Setup 1 and 2.
We aim to verify the relative energy consumption pattern across the sensor nodes.
This can be an indication on whether the energy in the system is evenly consumed
across the nodes or it is poorly managed. For example, in a homogeneous setup, if
the disparity in energy levels between node n
Emin
and node n
Emax
is continuously
increasing, this is an indication of the inability of the clustering protocol to balance
the energy consumption. Using Setup 1 conguration, as shown in Figure 3.13, DEC
has a at and much lower standard deviation over time compared with LEACH which
increases consistently as the network progresses from 100 to 1000 rounds. This clearly
shows that the energy is not evenly consumed among the nodes as the network evolves
in LEACH. This is a result of the randomized cluster-head election process in LEACH,
which might elect the least energetic nodes as cluster-heads, making the entire network
operation to be very unstable.
60
100 200 300 400 500 600 700 800 900 1000
0.01
0
0.01
0.02
0.03
0.04
Rounds
S
t
a
n
d
a
r
d

d
e
v
i
a
t
i
o
n


LEACH
DEC
Figure 3.13: The residual energy standard deviation across the sensor
nodes at rounds 100, 200...1000, in Setup 1.
Similarly, in Setup 2 conguration, we observe the same behavior using DEC, SEP-
E, SEP and LEACH. In a heterogeneous energy setting, the energy levels of the nodes
are dierent. Hence, we would expect a robust clustering protocol to balance the en-
ergy consumption over time, such that n
Emin

= n
Emax
is achieved. To verify this, we
compute the standard deviations for the residual energy among the nodes for each pro-
tocol as shown in Figure 3.14. The sharp decrease in the DEC curve from 100 to 1000
rounds reveals that our DEC protocol is able to balance the energy consumption in
the network better than the other protocols by adapting well to heterogeneity. This is
as a result of the localized method of selecting an optimal cluster-head, thus achieving
a more desirable result. As the network progresses from 100 to 1000, DEC reduces
the energy disparity (measured as standard deviation) within the network by ensuring
that nodes with higher residual energy are elected often than nodes with lower residual
energy. Consequently, a lower standard deviation at 1000 round is achieved in DEC
compared with the other protocols. SEP-E and SEP are able to adapt to the energy
heterogeneity; however, they are much slower in coping with this phenomenon. It is
obvious that the LEACH protocol is indierent to heterogeneity. As it can be seen,
the LEACH curve is at and there is no response to the dierent energy levels in the
network. This means that nodes with low residual energy in LEACH have equal proba-
bility of being elected as cluster-heads. These characteristics are not desirable for most
real-world applications, where energy heterogeneity is a strong component of WSNs.
Overall, the performance of DEC compared with the other protocols is signicant. The
61
100 200 300 400 500 600 700 800 900 1000
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
Rounds
S
t
a
n
d
a
r
d

d
e
v
i
a
t
i
o
n


DEC LEACH SEP SEPE
Figure 3.14: The residual energy standard deviation across the sensor
nodes at rounds 100, 200...1000 in Setup 2.
0 500 1000 1500 2000 2500
0
10
20
30
40
50
60
70
80
90
100
Rounds
N
u
m
b
e
r

o
f

l
i
v
e

n
o
d
e
s
Live nodes per round


DEC
LEACH
Figure 3.15: Performance of the protocols using Setup 1.
62
0 1000 2000 3000 4000 5000 6000
0
10
20
30
40
50
60
70
80
90
100
Rounds
N
u
m
b
e
r

o
f

l
i
v
e

n
o
d
e
s
Live nodes per round


DEC
LEACH
SEP
SEPE
Figure 3.16: Performance of the protocols using Setup 2, with the
proposed optimal parameters. This is done in order to have complete
fairness for all the protocols.
DEC protocol has achieved our goal of a well balanced energy consumption pattern
across the nodes regardless of the energy hierarchies in the network system. This result
supports our model of a xed elected number N
opt
of cluster-heads in each round as
used by the DEC protocol to balance the energy consumption among the nodes.
Protocols FND PNA LND
LEACH 995 1089 4585
SEP 1385 1423 5050
SEP-E 1450 1650 3751
DEC 1839 2100 2350
Table 3.2: Average of network lifetime of the sensors for 50 trials
with total energy of 102.5J, when the BS is located inside the sensing
region.
For further analysis, we investigate other performance metrics such as, the num-
ber of live nodes per round for both homogeneous and heterogeneous setups. The
simulation results are discussed below.
Setup 1: Figure 3.15 shows the network lifetime of DEC and LEACH. Since the
LEACH protocol is designed to be robust with respect to a homogeneous setup,
we test the performance of DEC against this criteria. Based on our experimen-
tal results, we conclude that DEC has a superior performance compared with
LEACH as shown in this same gure. DEC mimics the ideal solution shown
63
in Figure 3.5 by extending the knee point as desired by our model estimation.
The performance of LEACH is also acceptable, however, for a critical application
that requires about 80-100% full monitoring requirements, DEC proves to be
more suitable. But for less critical applications, with less than 70% monitoring
requirements, the LEACH protocol could still be useful. The practical applicabil-
ity for LEACH scenario is quite limited as most often new nodes will be deployed
to replace dead nodes and/or nodes might be equipped with energy harvesting
capabilities such as nodes considered in Brunelli et al. (2008). This means that
the rate of recharging would dier across the network. Making heterogeneity a
very important factor to be considered when designing a network protocol. Simi-
larly, it is worth mentioning here that when the intermediate and advanced nodes
are removed from both SEP and SEP-E, they perform exactly the same as the
LEACH protocol and hence they yield the same results. On the contrary, when
the intermediate and advanced nodes are removed from DEC, it still provides an
improvement on the LEACH protocol. This is quite an important result for the
DEC protocol and it is one of the key dierences between the DEC and the other
protocols.
Setup 2: Network lifetime analysis is performed with the protocols we consid-
ered using Setup 2. The summary in Table 3.2 shows some signicant results
in favor of the DEC protocol. Overall, DEC improves the WSN lifetime com-
pared with LEACH, SEP and SEP-E up to a magnitude of 85%, 33% and 27%
respectively. Figure 3.16, shows the behavior of these protocols with respect to
energy heterogeneity. It is worthy of note that DEC curve is at right angle to
the knee point; the gradual decent at the beginning is a result of the dierent
energy levels of the nodes in the network at the beginning. DEC proves to be
superior up to when 50% of the nodes are alive. The curve of SEP-E, SEP and
LEACH descends slowly until the end of the network because these protocols
cope slowly with heterogeneity. However, based on our experiments both SEP-E
and SEP outperformed the LEACH protocol. This is expected because LEACH
is designed for a homogeneous scenario. For applications that have minimal mon-
itoring requirements LEACH, SEP and SEP-E could still be desirable. However,
it is expected that most application will introduce new nodes as the network
evolves, which makes DEC a more ideal protocol for most WSNs deployment
scenario. Notice that under this setup, when the energy gap in SEP becomes
64
considerably large between the advanced nodes and the normal nodes, the insta-
bility of SEP is also increased, as shown in Table 3.2. This leads to a problem of
energy gap, which is more pronounced in SEP when compared with the other
protocols. For instance, if the advanced nodes are much more powerful than the
normal nodes then there is a high tendency of all normal nodes dying out faster
than expected, without the death of any advanced nodes. Hence, as the network
evolves, this leaves the majority of the advanced nodes with high residual energy.
The eect of this is a high instability region of SEP-E, SEP and LEACH. One of
the advantages of the DEC protocol is that it elects the cluster-heads based on
their respective residual energies; hence, it is able to cope well with the problem
of energy gaps. Finally, a good justication for the dierent energy levels used in
this set-up could be: 1) A practical application where nodes are equipped with
energy harvesting capabilities and they scavenge dierent energy levels at various
time intervals; 2) A test of the eect of updated energy into existing network and
designing an optimal energy scavenging solution.
It should be noted that all the simulations conducted do not account for the
setup time or the energy consumed during the update processes. The results
do however, give an approximation of the network lifetime that can be achieved
using these protocols (Aderohunmu et al., 2011a).
Exploiting Heterogeneity
Following the studies conducted by comparing the performance of the protocols, we
explore the parameter space for the protocols with respect to the eect of heterogene-
ity. From these experiments, we keep m, b and n constant. Recall, that m, b and n are
the percentages of the advanced, intermediate and normal nodes respectively. Vary-
ing these percentages, could lead to dierent improvements on the network lifetime.
However, the main parameters of interest are the energy weight factors for the nodes.
For example, in a WSN deployment powered by energy harvesting capability such as
the FP7 3ENCULT
2
deployment, the nodes will scavenge energy at dierent rates.
Although the number of nodes with various energy levels could be many, the multiple
energy levels could be bounded into a three-level energy setup as we have considered.
Hence, the interesting question would be how a protocol designed for a three-energy
level setup reacts to small changes in the extra scavenge energy to achieve a prolonged
2
Wireless Intelligent Self-Powered Electronic Systems: http://137.204.213.210/
65
1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6
800
1000
1200
1400
1600
1800
2000
2200
Energy weight factor for advanced nodes ()
N
e
t
w
o
r
k

L
i
f
e
t
i
m
e


DEC
SEPE
SEP
LEACH
(a)
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
800
1000
1200
1400
1600
1800
2000
Energy weight factor for intermediate nodes ()
N
e
t
w
o
r
k

L
i
f
e
t
i
m
e


DEC
SEPE
LEACH
(b)
Figure 3.17: Exploiting Heterogeneity: (a) Tuning dierent hetero-
geneity parameters (b) Network lifetime for dierent when m = 0.2
(b) Network lifetime for dierent when n = 0.5, m = 0.2 and b =
0.3.
66
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
800
1000
1200
1400
1600
1800
2000
2200
N
e
t
w
o
r
k

L
i
f
e
t
i
m
e


relative total extra energy ( m + b)
DEC
LEACH
SEPE
SEP
(a)
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
0
20
40
60
80
100
relative total extra energy ( m + b)
%

F
N
D

g
a
i
n

f
o
r

e
a
c
h

p
r
o
t
o
c
o
l

Percentage of FND gain for each protocol by varying heterogeneity


LEACH
SEP
SEPE
DEC
(b)
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
10
20
30
40
50
60
70
80
90
100
Percentage of FND gain between two protocols by varying heterogeneity
relative total extra energy ( m + b)
%

F
N
D

g
a
i
n

b
e
t
w
e
e
n

t
w
o


p
r
o
t
o
c
o
l
s


%Gain (DEC,LEACH)
%Gain (DEC,SEP)
%Gain (DEC, SEPE)
(c)
Figure 3.18: Exploiting Heterogeneity: (a) Performance of the proto-
cols as the energy load increases (b) Percentage gain of the protocols
(c) Relative gain of DEC with other protocols.
67
network lifetime. Thus we look closely into these energy heterogeneity parameters and
their eects on the protocol designs.
Figure 3.17(a) depicts the eect of varying the advanced nodes energy weight factor
in the DEC, SEP-E, SEP and LEACH. From this gure, we can see how each protocol
reacts to the small extra energies introduced. In particular, notice how the protocols
all react to the little extra energies introduced except the LEACH protocol. Similarly,
in Figure 3.17(b), we vary the energy weight factor for intermediate nodes. Since
there exist no intermediate nodes in the SEP protocol, we omit the comparison in
this gure. We can observe the behavior of DEC, SEP-E and LEACH. This gure
reveals that the intermediate node energy level also have an impact on the lifetime of
the heterogeneous-aware protocols. In all, LEACH behavior is indierent. This is also
expected as it is designed for a homogeneous setup.
From both Figures 3.17(a) and 3.17(b), we made two key observations: 1) The net-
work lifetime can be improved for the heterogeneous-aware protocols and 2) The overall
improvement in lifetime does not depend alone on individual energy-weight factors i.e.,
and , but instead on the interactions of these weight factors. Consequently, we
conducted a further investigation by computing the total extra energy introduced into
the network. This way it is easy to observe the overall eect of heterogeneity on the
nodes. Figure 3.18(a) shows the performance by varying the heterogeneity parameters
i.e., , and keeping n, b and m constant. Hence, we plot the network lifetime versus
m + b (extra total energy) introduced by both the intermediate and advanced
nodes. From this graph, DEC is more resilient than SEP-E, SEP and LEACH in ju-
diciously consuming the extra energy of the higher energy nodes i.e., advanced and
intermediate nodes. DEC yields a longer stability region for higher values of the extra
energy. When m + b = 0.4 and 0.5, both the performance of SEP and SEP-E
are close and signicantly better than the LEACH protocol (heterogeneous-oblivious).
In Figure 3.18(b), we show the FND gain of each protocols to heterogeneity relative
to a homogeneous setup i.e., when and = 0. Likewise, Figure 3.18(c) depicts the
relative gain of DEC when compared with the other protocols. Particularly, at m
+ b = 0.9, DEC extends the improvement on the other protocols. For example, up
to 95%, 42% and 38% improvements are achieved over the LEACH, SEP and SEP-E
protocols respectively. As far as the ecient use of the extra energy introduced into
the network is concerned, the percentage gain is maximized under the DEC protocol.
It is worthy of note that when heterogeneity does not exist i.e., m + b = 0,
68
LEACH, SEP and SEP-E are the same with respect to the performance and the net-
work lifetime. This means, the SEP and SEP-E protocols are not able to extend the
network lifetime of LEACH, as shown in Figure 3.18(a) (at point x=0); yet DEC is
able to improve the network lifetime of LEACH up to 12%. From this analysis we can
quantify the value of to be bounded as 1.2 2, when DEC lifetime is compared
with the LEACH protocol lifetime. Similarly, DEC improvements on SEP and SEP-E
protocol falls within this range.
Furthermore, due to the extended stability region, the throughput of DEC would be
equally higher than the other protocols we have compared it with. In general, the curve
of DEC protocol consistently increases as the heterogeneity in the network increases,
meaning, it is very robust to higher levels of heterogeneity. This characteristic could be
particularly useful in a network that makes use of relay nodes for multi-level hierarchy
architecture. Our analysis, points to the fact that energy-heterogeneity should be
exploited for an improved network lifetime, instead of being considered as a drawback
to wireless sensor network operations. Hence, our DEC protocol has been able to
achieve this feat.
3.6.3 Remarks
In this Chapter we proposed a purely deterministic-based protocol referred to DEC
that oers better utilization of the energy resource for low-energy sensor nodes. Both
theoretical and experimental analysis are conducted to verify the performance of the
DEC protocol. The main contributions are:
1. DEC has successfully extended the stable region vis-a-vis network lifetime by
being aware of heterogeneity and assigning cluster-head role to more capable
nodes.
2. DEC is able to achieve a stable election of cluster-heads, leading to an improved
throughput in the network.
3. DEC is able to exploit and better distribute the additional energy introduced
into the network by judiciously consuming the extra energy to enhance network
lifetime better than the other protocols we compared it with.
4. DEC oers a guaranteed performance and close to an ideal solution of a uniform
energy spread across the network. Hence, the nodes die out almost at the same
time.
69
5. Finally, DEC degrades gracefully in response to changes in the number of elected
cluster-heads. Therefore it is able to oer more performance stability than the
existing homogeneous and heterogeneous-aware protocols we have compared it
with in the same domain.
Overall, based on our experimental study DEC improves the lifetime of wireless sen-
sor networks signicantly when compared with LEACH, SEP and SEP-E. DEC takes
advantage of the local information i.e., the residual energy of each node to optimize
the energy consumption in both homogeneous and heterogeneous scenarios we have
considered, regardless of the level of energy hierarchies in the network.
3.6.4 Summary
In this chapter we discussed the dierent underlying models of WSN: the network ar-
chitecture, path-loss model, data aggregation model and energy models were presented.
This was followed by a proof of concept of our design strategies, which covers both the
theoretical and experimental evaluation of our method. The mathematical analysis
for the network lifetime was also presented thereafter. The proposed protocol DEC as
improvement to existing schemes, LEACH, SEP, SEP-E was discussed. Finally, the
detailed results of the experiments, validation and performance indices were presented.
From the studies conducted in this chapter, the results revealed that DEC extends
signicantly the stability period (FND) of the network more than that of LEACH, SEP
and SEP-E. In addition, DEC reduces signicantly the LND and hence, the instability
region compared with the existing LEACH, SEP and SEP-E protocols in a clustered
heterogeneous WSNs. This means DEC has a better control of the energy distribution
among its sensor nodes than LEACH, SEP and SEP-E protocols. From the simulation
results, it is clear that energy heterogeneity can be an enhancement to network lifetime
of WSNs if it is properly exploited. The behaviors of these protocols with respect to
energy spread and coverage presevation, will be further analyzed in Chapter 4 in order
to reach a more constructive conclusion.
70
Chapter 4
Coverage Awareness and Spatial
Analysis
The quest for enhancements of the performance of WSN, has driven lots of research
on developing various schemes that can compensate for the limited lifetime of wireless
sensor network deployments. Today, these advances in wireless and sensing technologies
have opened up new doors for variety of applications. To fully realize the potentials of
wireless sensor networks, however, a few challenging issues need to be addressed. In the
past lots of research attention has been focused on energy preservation schemes, with
not much attention given to coverage preservation as a quality of service requirement.
In this chapter, we conduct a study on some improved heterogeneity-aware cluster-
ing protocols. We dene full coverage time, as well as a spatial uniformity measurement.
Simulation results demonstrate the superiority of the new protocols in this respect.
Our conclusion is that energy heterogeneity can be harnessed to guarantee quality
of service requirements and it is promising to nd optimized solutions for a prolonged
network lifetime and coverage preservation simultaneously in a cluster-based network.
4.1 Introduction
Many studies on WSNs have been carried out and there have been some comprehen-
sive surveys e.g., Akyildiz et al. (2002a). Apart from the increasing academic interest,
WSNs seem promising for nding new applications in other elds, such as in forest mon-
itoring
1
, patient monitoring in hospital wards (Jamthe et al., 2013; Daz-Ramrez et al.,
2013), intelligent building monitoring (Aderohunmu, Paci, Brunelli, Deng, Benini, and
1
http://re.az.gov/site-page/southwest-forests-and-air-quality
71
Purvis, 2013b) and in ambient intelligent agricultural monitoring
2
.
To provide robust functionality in these applications, limited battery life for the
sensor nodes is the rst hurdle to overcome. Another criterion that is tightly coupled
with energy consumption is the coverage maintenance. This poses the question: how
well do sensors observe the physical space? (Cardei and Wu, 2006). A survey on the
coverage problems in WSNs is presented by Meguerdichian et al. (2001), followed by
a more recent survey in Chen and Koutsoukos (2007). These studies re-armed the
concept of coverage as a measure of quality of service (QoS) requirement. Often, the
objective is to have at least one sensor to completely cover a physical space. Sometimes,
it is possible to place these nodes at specic locations that is predetermined e.g., for
body area sensing such as in Ghasemzadeh et al. (2009). Hence, for the purpose of our
study we refer this type of deployment as being deterministic. Also, the deployment
could also be random, this often is the case when the environment is not easily accessible
or the deployment is a very large eld running to hundreds of nodes. In a random
deployment, the problem of coverage becomes obvious due to the need for each node
to provide at-least maximum coverage of the monitored physical space. The problem
of coverage preservation is directly coupled with energy preservation in the sense that,
if the nodes die out non-uniformly, the network will loose coverage. This leads to a
very important concept, which we introduce as the spatial distribution of energy in
the network. If the spatial distribution of energy is not even during the operation, the
network can quickly lose coverage to certain regions of the monitoring. This is highly
undesirable for most surveillance applications. A persistent coverage is necessary for
an application that requires continuous surveillance in order to satisfy a specic quality
of service (QoS) constraint. Thus, both energy preservation and coverage maintenance
remain vital requirements for WSN deployments.
Interestingly, the eect of energy heterogeneity on coverage maintenance in WSNs
has not received much discussion in the literature either. In Chapter 3, we have revealed
the impact of such phenomenon on network lifetime. Overlooking such a factor may
result in not only reduced network lifetime, but also accelerated failure in maintaining
network coverage.
Motivated by earlier works by Smaragdakis et al. (2004); Soro and Heinzelman
(2009); Aderohunmu et al. (2011a), we investigate the eect of energy heterogeneity
in clustering protocols that favor both energy preservation and coverage maintenance.
In a nutshell, we model the energy imbalance existing in the network with a three-tier
2
www3.uni.it/midra/goodfood
72
hierarchy and we analyze the performance of the protocols with respect to coverage
preservation. We further highlight the need to investigate the spatial uniformity of
live node distribution and nally, we dene a quantitative metric for the performance
evaluation.
4.2 Coverage Issues in WSN
In the majority of the literature, most discussed coverage problems cover the following:
1) Area coverage; 2) Barrier coverage and 3) Point coverage. The objective of the
area coverage is to monitor an area or region; this is the most studied coverage type.
The barrier coverage is widely dened as minimizing the probability of undetected
penetration through the barrier i.e., a sensor network (Cardei and Wu, 2006). Finally,
the point coverage has the objective to completely cover some key points of interest.
The point coverage has been considered in body sensing applications (Ghasemzadeh
et al., 2009) where the deployment is deterministic. All these coverage problems can be
reformulated to cover dierent aspects of WSNs. The reason being that, depending on
the application at hand, coverage problems could relate directly to any of the following
issues:
1. Algorithm design: One of the key issues relating to coverage maintenance is
how the algorithm is designed. For example, if heterogeneity exist in the network,
the algorithm should be able to cope well with it in order to avoid coverage
loss i.e., holes in the network. Also, the issue of centralized versus distributed
algorithms needs to be considered if the goal is to satisfy coverage requirements.
2. Deployment type: Another related concern is how the network is deployed,
that is, whether it is a random or deterministic deployment. If the network is
randomly deployed, the protocol design should be able to maximize the coverage
regardless of the positions of high-energy nodes. In addition, random deploy-
ment is often encountered in hostile environments, hence, bearing in mind the
deployment type could help with how the network procotol should be designed.
On the other hand, a deterministic deployment could impose its on coverage re-
quirements. As mentioned earlier, this type is often encountered in the body area
sensing applications; hence, the discussion is out-of-scope for our work since our
application scenario is tuned towards cyber-physical space, hence dierent. Also
the choice of the deployment may be either static or mobile. The case where the
73
deployment is mobile, the coverage formulation problem maybe dicult to ac-
complish. Hence, for the remainder of this study we will concentrate on a random
and static deployment scenario.
3. Network lifetime maximization: The goal of maximizing the network lifetime
raises the concern of how the protocol design can guarantee simultaneously cov-
erage and prolonged lifetime. An example strategy in place to ensure maximum
network lifetime could be to switch-o some nodes when there is no useful event
and at the same time ensure that there exists a neighbor within the same sensing
range that is able to provide coverage requirements.
4. Application design: If the application requires full coverage, the protocol de-
sign must ensure that the physical space is all covered for the longest time as
possible. Thus, for the remainder of this study, we will consider such an applica-
tion, where full coverage must be provided for the longest time possible.
All the above issues have been addressed in research literature under dierent topics.
For example, Cardei and Wu (2006) surveyed recent contributions addressing energy-
ecient coverage problems in the context of static network deployment. Similarly, in
an older study Meguerdichian et al. (2001), extensively discussed coverage problems;
the study established both computational geometry and graph theoretical techniques to
address this problem. A similar approach is covered in a more recent study by Chen and
Koutsoukos (2007); they surveyed some algorithm designs for coverage problems while
raising some open research problems. Dong et al. (2012) established a graph theoreti-
cal framework for connectivity-based coverage with congurable coverage granularity.
A novel coverage criterion and scheduling method based on cycle partition is then
proposed. This work combined the application requirements with coverage problems.
Similarly, Kasbekar et al. (2009) proposed a distributed algorithm for maximizing the
lifetime of sensor nodes through sensor activation methods. In this work, the authors
attempted capturing the maximum lifetime that could be attained while guaranteeing
full coverage. This work made use of the scheduling approach and range measurements
to meet the coverage needs. A design and analysis of coverage problems is discussed
by Thai et al. (2008), the study covered the state-of-the-art coverage formulation prob-
lems. Likewise, Liu and Cao (2011) presented a spatial-temporal coverage approach
that maximizes network lifetime by scheduling sensors activity. Following that, a dis-
tributed parallel optimization protocol (POP) was proposed for this purpose. Both
analytical and simulation results are presented to support their claim. Needless to
74
say, the majority of these studies focused mostly on maximizing network lifetime and
coverage preservation without considering the eect of heterogeneity in their analytical
formulations. Moreover, none of the above work considers coverage issues as it relates
to cluster-based networks.
One of the few studies conducted in recent years that attempts to design an elec-
tion technique for coverage preservation in WSNs is Soro and Heinzelman (2009). This
work discussed coverage maintenance, where few coverage-aware cost metrics are de-
ned. In these approaches, sensors that are important to the coverage task are less
likely to be selected as cluster leaders. However, the authors have only considered a
homogeneous networks, hence, their work has limited applicability. Their work how-
ever, re-emphasizes the need for energy preservation and coverage maintenance in WSN
deployments.
Another strategy using integer linear programming model was formulated by Chamam
and Pierre (2008) for cluster-based WSNs under coverage constraint. In this work, an
optimal state allocation method is used with the aim to maximize the network lifetime,
while ensuring simultaneously that full area coverage and connectivity of the nodes is
guaranteed. One of the key missing gaps in these works is that, the majority of the
existing cluster-based approach have not considered the networks requirement for full
coverage that maximizes lifetime under a heterogeneous WSN. Thus, the premise for
our work, is to investigate some cluster-based protocol designs both for homogeneous
and heterogeneous setup with respect to coverage and network lifetime requirements
under a tight-energy budget. In a nutshell, our approach will touch the four key areas
mentioned previously i.e., algorithm design, deployment type, network lifetime and the
application design.
4.3 Coverage Preservation and Spatial Energy Dis-
tribution Analysis
4.3.1 Network Coverage
In this section we present a formulation of the network coverage problem often encoun-
tered in previous studies. Let us consider a sensor network with N sensors n
i
, i = 1...N
that are randomly deployed in a sensing eld. Often, sensors have three states, namely;
75
20 0 20 40 60 80 100 120
0
10
20
30
40
50
60
70
80
90
100
Figure 4.1: A network snapshot showing the network coverage formed
by live nodes of all types: normal, intermediate, and advanced.
sleep, transmit and receive. Examples of such nodes are WISPES W24TH
3
. The sleep
state is when the radio is o, but sensing continues. Assuming each sensor n
i
can be
continuously active for a maximum of t
max
period, N nodes are deployed to monitor a
physical space. Let us denote r
i
and R
i
to be the sensing range and the communication
range of a node n
i
N respectively. A sensor n
i
covers a target x, if and only if the
target x is in the sensing range of n
i
. Without any specic application in mind, we as-
sume a scenario that is delay tolerant with a continuous data delivery and at the same
time, it is mission critical to maintain the full coverage within a tight-error budget.
We further assume that each sensor node does not move once deployed (static), and it
is equipped with an omni-directional antenna that monitors its own range. Note that,
due to the random deployment of sensor nodes in the experiment, it is possible for the
network to start with a coverage less than 100%, but normally the uniform distribution
of the nodes allow the coverage to be above 95% at the start of our simulations.
Thus, we dene the network coverage as the summation of the coverage of each
individual node n
i
modeled as a circular area of radius r
i
with the sensor node sitting at
the center of the disk shown in Figure 4.1. This coverage denition has two implications.
First, it deviates from the assumption used in LEACH (Heinzelman et al., 2000) that
3
www.wispes.com
76
sensor nodes of the same cluster detect the same event. In LEACH it was assumed
that the distance between nodes within a cluster is small compared with the distance
from which events can be sensed. The robustness of coverage is inherent under this
condition: one or two nodes death will not cause coverage loss because other nodes in
the same cluster can still sense the same event (Aderohunmu et al., 2012). Under the
new denition, however, even though there may be overlapped areas between sensor
nodes, the death of one node will potentially cause coverage loss. It is therefore a more
stringent denition. Furthermore, it is likely that the sensor nodes will sense dierent
events; this scenario is therefore more appropriate for modeling monitoring applications
that demand localized information, e.g., in wildre monitoring (Aderohunmu, Paci,
Benini, Deng, and Brunelli, 2013), in-situ soil moisture monitoring (Wu and Liu, 2012)
or motion detection in a vast open space.
This deduction, leads us to dene a new metric that integrates the coverage main-
tenance with network lifetime under heterogeneity conditions, the so called the full
coverage-time (FCT):
Denition 1 Full Coverage-Time: Mathematically, we can express FCT as;
given a network consisting of N nodes and an area of interest p, nd an ordered pair
(D
j
, t
j
), such that the

p
i=1
t
i
is maximized, where D
j
is a set of sensors that completely
covers the interest area and t
j
is the time when all D
j
provide coverage and where
j = 1...p.
In more simple terms, this denition implies that FCT is the time from the be-
ginning of the network operation until the network suers from coverage loss in a
heterogeneous setup. This is dierent from the previous denition of network lifetime,
which is only indirectly related to coverage preservation. As initial node death may
or may not cause coverage loss, we have network lifetime FCT. Since we are deal-
ing with area coverage, we will neglect the implication of the above denition on the
point coverage requirement. For the remainder of this experimental study, we will keep
with this denition and conduct the analysis of all the protocols considered under this
framework.
Denition 2 Cluster Communication: A node n
i
belongs to a cluster and can
communicate directly with their respective cluster-heads n
c
if and only if d(n
i
, n
c
) r
c
(cluster-head radius) and d(n
c
, n
i
) r
i
(node radius), meaning, they can only commu-
nicate if they are within the same communication distance d.
The implication of Denitions 1 and 2 is that, we can successfully model the impact
of coverage preservation and the energy spread of each cluster-based protocol design
77
that we will consider under the dened frameworks.
4.3.2 Spatial Uniformity
In some application setups that tolerate sporadic sensor deaths, strict coverage preser-
vation is not important. Live nodes evenly distributed across the entire monitoring
area can roughly maintain an eective sensing coverage. However, it is possible for
a large number of nodes of a certain monitoring region to all die out suddenly, and
that region becomes lost in coverage. Thus, along with energy consumption over time
and potential node deaths, how evenly the network manages to maintain its sensors
energy across the monitoring area is also relevant to maintaining eective coverage.
Consequently, we measure the spatial uniformity of coverage as the network evolves.
A robust protocol design is expected to maintain spatial uniformity of coverage, which
implies that energy consumption is more even, and it is less likely for the network to
suer from coverage loss due to early node deaths.
We employ a statistical methodology to access the spatial uniformity measurements
accross the nodes. To evaluate how energy consumption occurs spatially over time, we
choose a cutting point during the simulation where the amount of dead nodes reaches
50%. The entire sensing area is split by a s s grid, and live nodes within each of
the (M/s)
2
cells can be summed up. We use the variance of the number of live nodes
across all cells as a measure of the spatial uniformity of sensory coverage. Obviously,
the smaller the variance is, the more uniformly energy is consumed across the network,
resulting in live nodes more evenly spread over the sensing eld. This idea is shown
in Figure 4.2. We can then carry out an F-test to determine whether the dierence on
the variance measurement is signicant across dierent protocols.
4.4 Simulation Study and Statistical Analysis
4.4.1 Experiment Setup
Following the scenario used in Chapter 3, we adopt a square region of 100m100m with
100 sensor nodes scattered randomly and uniformly distributed in the physical space.
We conducted both coverage and spatial analysis with respect to our dened metrics
for four cluster-based protocols: LEACH, SEP, SEP-E and DEC. Their simulation
results are then compared. Common parameters used in the simulation are shown
78
0 20 40 60 80 100
0
20
40
60
80
100
A 5x5 grid at 50% network operation time
dead node
live node
Figure 4.2: Live node distribution can be examined, e.g., by using a
5 5 grid.
Table 4.1: Common parameter settings for all experiments.
Parameter Values
E
elec
50nJ/bit
E
DA
5nJ/bit/message
E
o
0.5J
k 4000
P
opt
0.1

fs
10pJ/bit/m
2

mp
0.0013pJ/bit/m
4
R 10/15m
n 100
in Table 4.1. The heterogeneity congurations that are tested for the protocols is
m = 0.2, b = 0.3, = 3 and = 1.5, recall that m is the proportion of the advanced
nodes with times more energy than the normal nodes, b is the proportion of the
intermediate nodes with times more energy than the normal nodes. p
opt
is the
initial probability of a node to become cluster-head in a homogeneous setup as used
in LEACH. Dierent settings will aect the operation of the network; however, the
protocols should have similar behaviour as we have seen in Chapter 3. For example, we
let 20% and 30% of the nodes be advanced nodes and intermediate nodes respectively
with additional energy weight factors (3 and 1.5 times to that of the normal nodes,
respectively). For the probabilistic-based protocols, the new heterogeneous epoch for
cluster-head election is
1
P
opt
(1 + m + b). Since P
opt
= 0.1 on average, numerically,
there should be a total of 10 nodes becoming cluster-heads per round. This means
79
by the new heterogeneous epoch there should be, on average, n(1 m b)P
nrm
= 2
normal nodes becoming cluster-heads per round. Similarly, we should have nbP
int
= 4
intermediate nodes as cluster-heads per round and nmP
adv
= 4 advanced nodes as
cluster-heads per round.
Since the LEACH protocol is proposed for a homogeneous energy setup, for fair
comparison, we initialize the network with the same energy conguration with the
other protocols and we run it with LEACH so as to assess how it copes with the
heterogeneous setting under the coverage constraint. To run SEP simulations under
similar conditions, the setting is congured in a way that maintains the same total
energy as that of LEACH, SEP-E and DEC. Despite the dierences on the internal
settings of the four protocols, it is reasonable to compare their performance as they
start with the same amount of initial total energy.
4.4.2 Simulation Results
Performance metrics
The following metrics are adopted to assess the performance of all clustering protocols
involved:
1. Full Coverage-Time (FCT): the period from the start of the network operation
until full coverage is no longer maintained.
2. Spatial uniformity of energy distribution in the network; this measures how the
energy is distributed overtime. This metric directly measures the network lifetime
with respect to coverage maintenance under the heterogeneity condition.
Multiple simulation runs are conducted for all the four protocols: LEACH, SEP,
SEP-E and DEC. We rst examine network coverage performance using our dened
FCT measure under energy heterogeneity conditions, and nally, we examine the spa-
tial uniformity by using visual comparison of the nodes heatmaps, and through the
evaluation of spatial uniformity statistic tests.
80
1000 2000 3000 4000 5000 6000 7000
0
10
20
30
40
50
60
70
80
90
100
Rounds
C
o
v
e
r
a
g
e
(
%
)


LEACH
SEPE
DEC
SEP
Figure 4.3: Comparing coverage performance of DEC, SEP-E,
LEACH (m = 0.2, b = 0.3, = 3 and = 1.5) and SEP (m =
0.3, b = 0, = 3.5 and = 0), E
total
= 102.5J.
1
2
0
0
1
4
0
0
1
6
0
0
1
8
0
0
2
0
0
0
2
2
0
0
Protocols
F
C
T
LEACH SEPE SEP DEC
1
2
0
0
1
4
0
0
1
6
0
0
1
8
0
0
2
0
0
0
2
2
0
0
1
2
0
0
1
4
0
0
1
6
0
0
1
8
0
0
2
0
0
0
2
2
0
0
1
2
0
0
1
4
0
0
1
6
0
0
1
8
0
0
2
0
0
0
2
2
0
0
Figure 4.4: Comparison of FCT for DEC, SEP-E, SEP and LEACH.
The boxplot is generated by 30 simulation runs for each protocol.
81
4.4.3 Network Lifetime Under Coverage Constraint and Het-
erogeneity
In Figure 4.3 we show the coverage evolution over time in one set of the simulations.
Obviously, DEC keeps the full coverage for the longest time. The ability to maintain
coverage by the DEC protocol could be very important for some surveillance applica-
tions with strict coverage requirements, such as in situation management for disaster
response (George et al., 2010) or in a wildre monitoring application
4
(Aderohunmu,
Paci, Benini, Deng, and Brunelli, 2013). If the coverage requirement is relaxed down
to 80% coverage, DEC still performs the best. Similarly, SEP-E performs better than
both SEP and LEACH up till about 75%. Furthermore, LEACH seems to take over
SEP-E after around 2000 rounds, while SEP stands out for coverage as low as 60% up
to almost 3000 rounds. One may note that LEACH and SEP manages to keep around
20% coverage as long as 4500 rounds of simulation time; however, the reliability of the
sensing result is already in question. Overall, while SEP-E continues to perform better
than LEACH and SEP; DEC gains more apparent competence as shown in the same
gure. When less coverage is required for some applications, down to 60% for instance,
SEP and LEACH outruns both DEC and SEP-E; this could still be desirable in some
instances. The implication of a high instability period i.e., the time period between the
rst dead node and the last alive node, could mean that the quality of data reported to
the sink is signicantly reduced and the coverage provided by the network is negligible.
Although, this could be acceptable for some applications but also detrimental to other
applications. It is more useful to have a prolonged network lifetime where all nodes
die out relatively close to each other than to have a shorter network lifetime where few
nodes are alive for an extended period of time. This clearly has a strong implication
on the coverage provision.
When the network contains energy heterogeneity, both DEC and SEP-E enjoy pro-
longed coverage period, as shown in Figure 4.4, where the full coverage-time (FCT)
is plotted out for all four protocols. LEACH has a shorter coverage period compared
with the other protocols.
FCT values are measured over 30 simulation runs respectively for the four protocols,
and the statistics are reported in Figure 4.4. Both DEC and SEP-E have a clear-
cut advantage over SEP and LEACH. What our results here have revealed is that
energy heterogeneity can enhance both coverage maintenance and network lifetime
4
http://www.futuregov.asia/articles/2012/jan/18/china-pilots-wildre-detection-sensor-network/
82
simultaneously if properly exploited in a WSN deployment. In order to have conclusive
evidence on the relationship between coverage, network lifetime and heterogeneity, we
examine further the spatial distribution of energy in the network. This is presented in
the following subsection.
4.4.4 Spatial Uniformity Heatmaps and Statistic Test
To visualize the energy distribution within the network over time under coverage con-
straint, we plot out the heatmap of the sensor node energy at three points interval:
Round 1500 and Rounds (2200,3500) roughly located at the stable (FND) and instable
periods respectively. The heatmaps are shown in Figure 4.5, Figure 4.6 and Figure
4.7. A red pixel on the map indicates proximity to a live node and it is within a full
coverage. When the red is fading away, it means the spot is still covered by a live
node despite an increasing distance. The blue color indicates the spot is not covered
by any live nodes. These behaviors are captured as the network evolves using the same
deployment setting and node positions.
From these gures, we observe that both DEC and SEP-E oer the best coverage
with a guaranteed network lifetime compared with LEACH and SEP at Round 1500,
while SEP also outperforms LEACH. Also, when we examine the coverage in the early
part of the instability period at Round 2200, DEC still shows a more robust perfor-
mance than the rest of the protocols. There does not seem to be a clear winner between
SEP-E and LEACH during this phase; SEP performed least. However, when going fur-
ther into the instability period at Round 3500, the coverage of SEP looks better than
both SEP-E and LEACH, while DEC has already run out of live nodes. This aligns
with the coverage performance presented earlier. This is because at the later stage,
DEC is able to evenly balance the energy consumption among the nodes resulting to a
prolonged FCT and hence the nodes die out close to the same time. But in SEP-E, SEP
and LEACH the majority of the normal nodes are dead but advanced nodes are well
preserved and are left with high residual energy; hence, a prolonged instability period,
especially observed in SEP. It is worth re-emphasizing that the behaviors of SEP-E,
SEP and LEACH (in terms of coverage) could still be useful to some applications with
minimal coverage requirements, but for a mission-critical application with full coverage
requirements, DEC proves to be superior to SEP-E, SEP and LEACH based on our
experiments.
For the purpose of quantitative analysis we use the spatial uniformity measure
83
10 20 30 40 50 60 70 80 90 100
10
20
30
40
50
60
70
80
90
100
(a)
20 40 60 80 100
10
20
30
40
50
60
70
80
90
100
(b)
20 40 60 80 100
10
20
30
40
50
60
70
80
90
100
(c)
20 40 60 80 100
10
20
30
40
50
60
70
80
90
100
(d)
Figure 4.5: The heatmap at Round=1500 for (a) DEC coverage, (b)
SEP-E coverage, (c) SEP coverage, and (d) LEACH coverage.
10 20 30 40 50 60 70 80 90 100
10
20
30
40
50
60
70
80
90
100
(a)
10 20 30 40 50 60 70 80 90 100
10
20
30
40
50
60
70
80
90
100
(b)
10 20 30 40 50 60 70 80 90 100
10
20
30
40
50
60
70
80
90
100
(c)
10 20 30 40 50 60 70 80 90 100
10
20
30
40
50
60
70
80
90
100
(d)
Figure 4.6: The heatmap at Round=2200 for (a) DEC coverage, (b)
SEP-E coverage, (c) SEP coverage and (d) LEACH coverage.
84
20 40 60 80 100
10
20
30
40
50
60
70
80
90
100
(a)
20 40 60 80 100
10
20
30
40
50
60
70
80
90
100
(b)
20 40 60 80 100
10
20
30
40
50
60
70
80
90
100
(c)
Figure 4.7: The heatmap at Round=3500 for (a) SEP-E coverage, (b)
SEP coverage, and (c) LEACH coverage.
Metrics SEP-E LEACH
Sample size 25 25
Arithmetic mean 0.4977 0.5425
95% CI for the mean 0.3888 to 0.6066 0.3776 to 0.7073
Variance 0.06962 0.1595
Standard deviation 0.2639 0.3993
Standard error of mean 0.05277 0.07987
Variance ratio 2.2905
signicance level p=0.048
Table 4.2: SEP-E vs. LEACH F-test Result.
85
Metrics DEC SEP
Sample size 16 16
Arithmetic mean 0.4592 0.4530
95% CI for the mean 0.3247 to 0.5936 0.2307 to 0.6754
Variance 0.06365 0.1741
Standard deviation 0.2523 0.4173
Standard error of mean 0.06307 0.1043
Variance ratio 2.7353
signicance level p=0.060
Table 4.3: DEC vs. SEP F-test Result.
Metrics DEC LEACH
Sample size 25 25
Arithmetic mean 0.5425 0.4953
95% CI for the mean 0.3776 to 0.7073 0.3805 to 0.6102
Variance 0.1595 0.07745
Standard deviation 0.3993 0.2783
Standard error of mean 0.07987 0.05566
Variance ratio 2.0589
signicance level p=0.083
Table 4.4: DEC vs. LEACH F-test Result.
Metrics DEC SEP-E
Sample size 16 16
Arithmetic mean 0.4592 0.5801
95% CI for the mean 0.3776 to 0.7073 0.3247 to 0.5936
Variance 0.06365 0.1610
Standard deviation 0.2523 0.4013
Standard error of mean 0.06307 0.1003
Variance ratio 2.5302
signicance level p=0.082
Table 4.5: DEC vs. SEP-E F-test Result.
Metrics SEP-E SEP
Sample size 16 16
Arithmetic mean 0.4580 0.4799
95% CI for the mean 0.3436 to 0.5724 0.2942 to 0.6656
Variance 0.04605 0.1214
Standard deviation 0.2146 0.3484
Standard error of mean 0.05365 0.08711
Variance ratio 2.6364
signicance level p=0.07
Table 4.6: SEP-E vs. SEP F-test Result
86
dened in Section 4.3.2. Grids of 44 and 55 granularities are used to get the variance
of live nodes in cells as the spatial uniformity measure. The smaller the variance is,
the more uniform the live nodes distribute themselves across the monitored region.
To assess the dierence on the variance values obtained by the dierent protocols,
we resort to the F-test, where the F-ratio (i.e., variance-ratio) indicates the degree of
equality of the two variances. If the the F-ratio is 1.00, the two variances are almost
the same, i.e., no statistical dierence between the two values. The bigger the ratio is,
the more likely the two variances are dierent. Usually it is expected that the p-value
should have less than or equal to 0.05 for a high statistical signicance level. Due to
the pair-wise nature of the test, we conduct few comparisons e.g., DEC vs. SEP-E,
SEP-E vs. LEACH, and SEP-E vs. SEP etc. As it makes little sense to compare
the early stages of the network operation, we choose the 50% network operation time,
i.e., when the network reaches the point with only 50% nodes still alive, as the cutting
point of the simulation.
For example, the variance ratio in Table 4.2 indicates a high level of signicant
dierence in favor of SEP-E, showing that at the 50% operation time the spatial dis-
tribution of the live nodes are more uniform for SEP-E compared with LEACH. The
dierence is signicant on a p = 0.05 level. A similar behavior is observed for DEC in
Tables 4.3, 4.4 and 4.5. DEC showed a more uniform spatial distribution of live nodes
at 50% compared with SEP, LEACH and SEP-E. On the other hand, the variance ratio
computed for DEC vs. SEP and SEP-E vs. SEP protocols is as high as 2.7353 and
2.636 shown in Table 4.3 and 4.6 respectively. This dierence is still signicant but on
a slightly lower levels (p = 0.06) and (p = 0.07) correspondingly in favor of DEC and
SEP-E.
Figure 4.8 gives us a clue about the dierence in variances. The live node propor-
tions in each grid (each starting at 100%) collected at 50% operation time are plotted
out across all cells in a 4 4 and 5 5 grids. It is clear that SEP-E in Figure 4.8(a)
produces smooth energy consumption across the cells, resulting in less all-dead cells
(and all-alive cells) and more cells with energy-reduced live nodes, while for LEACH
more cells lie on two extremities (with nodes within either all-alive or all-dead). Simi-
larly, in Figure 4.8(b) DEC tend to produce smoother energy consumption across the
cells than SEP-E when compared in the same scenario. The spatial distribution of live
nodes in DEC is therefore more even.
To put the performance of the four protocols together, we conducted the F-test
for 20 independent experiments and we collect the pair-wise F-ratios, as shown in the
87
(a)
(b)
Figure 4.8: The live node distribution at 50% interval for (a) SEP-E
vs. LEACH, (b) DEC vs. SEP-E.
88
2
.
0
2
.
2
2
.
4
2
.
6
Protocols
V
a
r
i
a
n
c
e

R
a
t
i
o
DEC vs. SEP DEC vs. LEACH DEC vs. SEPE
2
.
0
2
.
2
2
.
4
2
.
6
2
.
0
2
.
2
2
.
4
2
.
6
(a)
1
.
5
2
.
0
2
.
5
Protocols
V
a
r
i
a
n
c
e

R
a
t
i
o
SEP vs. LEACH SEPE vs.SEP SEPE vs. LEACH
1
.
5
2
.
0
2
.
5
1
.
5
2
.
0
2
.
5
(b)
Figure 4.9: Comparison of spatial uniformity of the protocols. The
boxplot is generated from pairwise F-ratios averaged over 20 indepen-
dent experiments.
89
boxplot in Figure 4.9. DEC has high variance ratios compared with the other protocols
with medium sit between 2.2 and 2.4 from Figure 4.9(a). Likewise, in Figure 4.9(b)
compared with SEP and LEACH protocols, SEP-E achieves quite high variance ratios
(with the mediums sit above 2.0 and 2.3, the minimum over 1.8). The SEP-E vs.
LEACH box has a wider span, but the variance ratio medium lies high at 2.4. SEP-E
is also a clear winner against SEP, covering a very narrow span with the medium sitting
around 2.0. On the other hand, the superiority of SEP vs. LEACH is not so convincing
in this respect. Overall, the dierence is however only statistically signicant on the p
= 0.10 level.
To summarize, we have used two methods to assess the network coverage under
heterogeneity conditions: visual assessment of coverage heatmaps, and F-test on de-
ned spatial uniformity measure. In all the experiments conducted, DEC and SEP-E
reports better spatial uniformity among the sensor nodes than both LEACH and SEP.
This result is reasonable, as the DEC model guarantees that the nodes with the high-
est residual energy get elected as cluster-head. DEC is able to completely tackle the
eect of energy-heterogeneity under coverage constraint to a larger extent. In the same
manner, three-level energy setting in SEP-E gives rened modeling of the energy het-
erogeneity, thus allowing improved control on cluster-head election (i.e probability of
election) for coverage preservation and enhancing the energy consumption across the
network to be smoother. Consequently, the lifetime and the coverage preservation are
all much improved.
4.5 Remarks
The clustering scheme, originally inspired by Heinzelman et al. (2000) and further
enhanced by Smaragdakis et al. (2004), was proposed to cope with energy distribu-
tion in WSNs. Following this thought, this chapter introduced an experimental-based
study on coverage preservation and network maintenance of four protocols LEACH,
SEP, SEP-E and DEC; adaptive and distributive clustering algorithms that are self-
organizing in a two-level hierarchy using three types of nodes, namely: advanced nodes,
intermediate nodes and normal nodes are veried under homogeneous and heteroge-
neous settings. Nodes in LEACH, SEP and SEP-E elect themselves as cluster-heads
stochastically, based on their energy levels with the aim of retaining more uniform dis-
tribution of energy among sensor nodes vis-a-vis coverage preservation. While nodes in
DEC uses a deterministic approach to elect themselves as cluster-heads, thus, revealing
90
a better performance than the other protocols, our results show that DEC and SEP-E
are more robust with respect to coverage-awareness with network lifetime and resource
sharing compared with SEP and LEACH. From the simulation studies and analysis
carried out, the DEC and SEP-E models prove to yield better QoS than the LEACH
and SEP protocols with respect to our dened full coverage-time (FCT) metric. In
most of the cases, DEC and SEP-E yielded a balanced and more uniform spread of
energy. The results are evident in the spatial uniformity of the energy-based approach
discussed earlier. To sum up, realizing the relationship between the energy hetero-
geneity, clustering and spatial uniformity of energy; a deterministic model that solely
uses the residual energy of nodes for cluster-head election was used in DEC, while
intermediate nodes were used in the SEP-E design to leverage on this relationship.
Both DEC and the SEP-E model designs could be very important for applications that
requires continuous re-energization of nodes throughout the data retrieval processes,
by introducing new nodes to replace dead ones. Similarly, our designs could be useful
for testing the eect of introducing updated sensor nodes into an existing network or
perhaps to test the energy harvesting models on the nodes/network.
This study establishes a strong link between the energy heterogeneity of nodes
in cluster-based WSNs and the performance of a protocol design under two inter-
related issues; coverage awareness with spatial energy distribution and network lifetime.
By integrating our results, it is evident that a protocol that is heterogeneity-aware,
i.e., with full awareness to energy-diversity of sensor nodes, proves to oer better
coverage preservation and network lifetime maintenance compared with a protocol
that is heterogeneous oblivious (single-node type energy setting) i.e., homogeneous in
a hierarchically clustered WSNs.
4.5.1 Summary
In the past, majority of the studies on coverage and network lifetime have been focused
on theoretical bounds and derivations. None of these studies provide an experimental
approach on the existing clustered-based WSN protocols. Realizing this gap, we investi-
gated using simulation and statistical methods some well-known cluster-based protocols
oering improved network lifetime. It should be noted that we have not specically
attempted any mathematical framework for coverage optimization problems, as there
are already a number of existing proposed solutions. We have however, demonstrated
that it is possible to simultaneously take advantage of the energy heterogeneity in
91
WSNs for both energy and coverage preservation. In addition, the limitations of this
work are that, we have not exhaustively tried out dierent heterogeneity settings and
the simulations are conducted in a limited application scenario. A real-world testbed
deployment of the cluster-based protocols on nodes equipped with energy harvesting
capabilities can provide more insight on the operation of these networks and the im-
plication of tuning each parameter on a real-world scenario. We believe this could be
an interesting open research direction for the future investigation.
92
Chapter 5
Intelligent and Control Monitoring
Solution: WSN Design Architecture
5.1 Introduction
This chapter provides a background for the next chapters of this thesis namely Chap-
ters 6 and 7. The work presented in this chapter covers an example application scenario
of our deployment using the WISPES W24TH node prototype. We cover the deploy-
ment characteristics and the design architecture. The goal is to be able to assess the
performance of our design strategies in Chapters 6 and 7 with a focus on realistic ap-
plications. Hence we look at the fundamentals of a real-world WSN deployment as
it applies to our application while considering the practical network lifetime that can
be achieved for a continuous data acquisition process. Based on these characteristics
we propose in the next chapters methods that can signicantly optimize this network
lifetime. We hope an understanding of our deployment framework will lay the founda-
tion for the potential improvements on existing strategies in place when considering a
real-world WSN deployment.
In recent years intelligent monitoring of the structural health of historic buildings
has become an important research problem domain, particularly, due to the lack of
pre-existing monitoring models and the constraints associated with measurement de-
vices. With the increasing ease of fast prototyping, cheap cost and the fabrication of
miniaturized gadgets such as the sensor nodes and the Raspberry Pi
1
etc., individ-
uals can easily program some of these boards with sensors on-board for monitoring
purposes. The challenge is however, the ability to get these nodes to work in a col-
laborative manner over a long period of time without much user intervention. In most
instances, the development of such architectures will require a cross layer design from
1
Raspberry Pi: http://www.raspberrypi.org
93
the network perspective to the application layer designs. In this chapter we introduce
our application scenario, our design testbed and the platform implementation strate-
gies for a rapid, accurate and low cost intelligent monitoring solution. The selected
hardware allows low-power consumption and long distance peer-to-peer data transmis-
sion. The software design is an open source built on the NXP Jennic platform. It
supports star, tree and linear network topologies. An integrated prototype has been
deployed (Aderohunmu, Balsamo, Paci, and Brunelli, 2013) in a 36-node WSN testbed
in a four-storey renaissance building at the center of Bologna, Italy (see Figure 5.1),
which was deployed in March 2012 for the FP7 3ENCULT project (the operation of
the deployment is still ongoing).
Figure 5.1: Cross-section of the Deployment Building Testbed
5.2 Application Scenario
Structural health monitoring of building is a critical component of the civil infrastruc-
ture system. For instance, heritage buildings are often subjects of health monitoring by
civil engineers due to their touristic value. The safety of such buildings is paramount
in order to limit the danger they pose to the economic vitality of the society especially
during damaging events such as earthquakes. Similarly, renaissance buildings are a
particular type of architectural designs that are common in most regions of Europe.
They are known for their design style that places emphasis on symmetry, proportion,
geometry and the regularity of parts as they are demonstrated in the architecture of
classical antiquity and in particular, in the ancient Roman architecture. The conser-
vation of such structures for the future generations is one of the main tasks of the
European Union (EU). It is increasingly important to understand the deteroriation
processes which aect artworks in museums and historic buildings (DAmato et al.,
94
2012; Zonta et al., 2008). Preserving the health of such structures requires a continu-
ous monitoring process of the building (Anastasi et al., 2009). Some of the parameters
of interest are environmental variables such as temperature, humidity, etc. Apart from
monitoring the health of the building structures, some of the heritage buildings contain
some historical artifacts and frescoes that require a certain temperature and humidity
levels for easy preservation.
Most of the time the temperature and humidity measurements in a building vary.
In high relative humidity conditions, metals corrode, insects and moulds thrive and the
building deteriorate more quickly. Fluctuations in temperature can cause expansion
and contraction of structural areas, resulting in physical damage and distortion to the
building and its contents. Thus, it is very important for these two parameters to be
well controlled and if possible manipulated to yield the desired environment in order
to maintain the health of heritage buildings and its contents.
The development in the elds of micro-electromechanical systems (MEMS) and
wireless communications have introduced easy and low cost monitoring of such build-
ings (Abrardo et al., 2010) and (Lynch, 2004). Therefore, it is possible to develop
low-power, easy to install and miniaturized gadgets to sense and transmit data at a
reasonable distance to more powerful gateway nodes equipped with high computational
capabilities in place of the common commercial cabling system that are often utilized.
In the next section, we describe the hardware unit for our monitoring application.
Figure 5.2: A rear view of 32-bit WISPES W24TH prototype
95
Figure 5.3: Hardware Unit Design Architecture
5.3 Sensing Unit and Hardware Design
For the purpose of our study, we have selected the WISPES W24TH shown in Figure
5.2. The W24TH nodes are equipped with on-board sensors Temperature (0.01
o
C res-
olution; -40 to +90
o
C. range), Humidity (0.04
o
C resolution; 0 to 100%rh range), Light
sensor (0.23 lx resolution; 0 to 100,000lx range), 3-axis accelerometer (1mg resolution;
0 to 6g) and MOX Gas sensor interface (10% resolution). Our prototype incorporates
an integrated hardware and software designs that are capable of supporting both tree
and star topologies shown in Figure 5.4 and in Figure 5.5 respectively. For simplicity
of our implementation, we used a star topology with multiple sensing units all trans-
mitting to a coordinator node and then to a central server. From our implementation,
a W24TH node could serve as a coordinator node, sleep-end node or router depending
on the chosen topology. Through the wireless communication channel, the coordinator
node can broadcast packets to the entire network, and the network can be organized.
The sensing units are able to sense all the previously mentioned parameters, store the
data, analyze and transmit the data when necessary. A diagram of the hardware unit
from WISPES is shown in Figure 5.2. It consists of three modules: the sensing unit, the
power unit and the communication interface shown in Figure 5.3. The sensing unit is
capable of sampling data from the sensing interface while the wireless communication
module is in operation.
At the core of the system is a 32-bit microcontroller with a 2.4Ghz radio transceiver
that can achieve about 100m communication range in an indoor-environment. With
the Universal Asynchronous Receiver and Transmitter (UART) interface, the compu-
tational core is able to communicate with the wireless transceiver. This provides a
96
Figure 5.4: A tree topology network
Figure 5.5: A star topology network
wireless connection between the hardware unit and other wireless devices (Sleep-End
nodes) or the base station device (Coordinator node). The 32Mhz CPU clock permits
the development of distributed data processing applications with the possibility of at-
taching an external memory slot i.e., W24TH is equipped with a microSD card reader
for local storage, data logging and backups. The 20-pin expansion connector features
UART bus, SPI bus, I2C bus, 10 GPIOs, 12bit ADC and 3V power supply. This al-
lows the W24TH to be connected to several expansion boards such as multi-channels
acquisition interfaces, actuators, USB, KNX devices, energy harvesters and more.
5.4 Wireless Communication
Often in the eld of wireless sensor networks, wireless communication is known to
be one of the major sources of power consumption. Long range communication is
normally avoided as it increases the power drainage of the transceiver. In an ambient
monitoring application communication range could be up to hundreds of meters. The
W24TH node is equipped with the Jennic JN5148 transceiver that consumes a relatively
modest amount of battery energy even at long distance transmission. However, it is
97
imperative to avoid constant transmission when possible in order to prolong the battery
life. It is possible to achieve local data processing such as aggregation from cluster-
heads or coordinator node due to the support of a peer-to-peer communication oered
by the W24TH nodes. The W24TH uses an aggressive power management method
using 8A in sleep mode, 17mA in transmit mode and 23mA in receive mode which
guarantees a longer battery lifetime and it is comparable in performance to a TelosB
2
mote. The raw data transfer rate of the transceiver is up to 26kps when used on
the communication protocol and it includes reliable re-transmission/acknowledgement
procedure according to the IEEE 802.15.4 standard.
Figure 5.6: State machine
Table 5.1: Summary of the energy consumption for one cycle of the
state machine
SAMPLE RATE NO TRANSMISSION (mJ) TRANSMISSION (mJ)
10 secs 8.184 27.894
1 min 9.5 29.21
10 mins 23.72 43.43
2
http://openwsn.berkeley.edu/wiki/TelosB
98
5.5 Power Consumption
One of the major critical factors in WSNs design is the power consumption. Gener-
ally, the power consumption is the function of the voltage drawn and the amount of
the current supplied at each component. When the wireless sensing unit is in active
mode, it performs sensing and transmission of data, this phase consumes huge amount
of power since the radio component is in the ON mode. However, it is possible to
limit the radio from going into the transmission or receiving state depending on the
information processing strategy in place and the application in mind. For example, let
us consider the state machine shown in Figure 5.6, for an environmental monitoring
application, where we can apply a data reduction strategy such as, prediction. Using
the WISPES nodes, assuming we sample an environment at 10 minutes interval, the
energy consumption for transmission is estimated to be 43.43mJ and for a no trans-
mission is 23.72mJ; shown in Table 5.1. For this particular scenario, this is about 50%
energy savings if transmission can be avoided. It is clear that keeping the radio in
SLEEP state could amount to huge energy savings, but at the same time we want to
be able to meet the application requirements. It becomes non-trivial to nd a balance,
if the solution is meant for a continuous monitoring application.
For the WISPES W24TH node design, all the hardware components are internally
referenced to a maximum output power of 1.5Watt at 3V as output voltage. If we
consider each component e.g., when the transceiver is powered-on, on average the
total power drawn is 40mA i.e., 40mA 3V = 120mW. However, this is not the mean
sensor node unit power consumption since the micro-controller can be in dierent states
during operation. Therefore, we measured the total WISPES W24TH node mean power
consumption when powered-on using a multi-meter; it is found to be 30mA i.e., E
mean
=
30mA 3V = 90mW. The current prototype of WISPES nodes can be powered by two
AA batteries with 1.5V each. A single AA battery is capable of producing 2000mAh
or 3000mAh total energy capacity E
capacity
depending on the type. We can roughly
estimate the total lifetime T
operation
of a WISPES unit for a continuous operation as:
T
operation
=
E
capacity
E
mean
=
2000mAh
30mA
= 66.67hrs 3days
When the WISPES node is in the sleep mode, the total lifetime is much longer,
which can be expressed as:
T
sleep
=
E
capacity
E
sleep
=
2000mAh
8A
= 250000hrs 10417days
99
This result reveals that the bottle-neck is the frequent operation of the radio. There
is a huge potential gain if we can avoid frequent usage of the radio together with
exploiting other strategies to reduce the energy consumption on the sensor nodes.
Given a monitoring application scenario that requires a continuous sampling at every
10 minutes interval, we can estimate the expected lifetime that would be achieved by
a WISPES node. An example of such application could be, the strategic positioning of
sensors for intelligent monitoring of environmental parameters in a home environment
with an AC system. This could be required to test the performance of the ventilation
systems operation over time. At the given sample rate (SR), the sensor node will turn
on for 144 times per day i.e., 2.4hrs/day. The lifetime T
10minsSR/day
can be estimated
for an unattended unit as:
T
10minsSR/day
=
E
capacity
E
lifetime2.4hrs/day
+ E
sleep21.6hrs/day
(5.1)
Assume we estimate a period in Eq. (5.1) to be 10 minutes (600 seconds), the
sensor node will keep the radio active for 144 periods in a day. We have:
Q
(charge/period)
= Q
active1period
+ Q
sleep1period
=
30mA 0.2s + 8A 599.8s
600s
= 16.6A
(5.2)
The nodes consumes a constant charge Q
(charge/period)
equal to 16.6A/period,
hence, we have T
10minsSR/day
to be:
T
10minsSR/day
=
E
capacity
Q
(charge/period)
=
2000mA
0.0166mA/period
= 120482periods (5.3)
=
120482periods
144periods/day
= 836.68days = 2years, 3months.
Thus, if we deploy the WISPES nodes for a monitoring application with sampling
rate of 10 minutes, we expect the deployment, if unattended, to last for approximately
2 years and 3 months for a 2000mAh battery type. The lifetime would be higher for
a 3000mAh battery type; it should be roughly 3 years and 4 months. It is worth
mentioning that this is a theoretical estimate for a star topology deployment. This is
a conservative estimate; duty-cycle strategies and other data reduction strategies can
allow the system to reach an equilibrium and thus, further extend the lifetime of the
system. Our real-world deployment testbed of WISPES W24TH nodes running on two
100
AA non-rechargeable batteries has currently reached 12 months since deployment and
it is still going. We hope that our test deployment will support the theoretical lifetime
bound.
5.6 Software and Protocol Stack Architecture
The Jennic network protocol stack is designed to work with various types of wireless
microcontrollers and modules. It allows wireless sensor networks to be easily built
from a simple point-to-point cable replacement to complex tree networks. The proto-
col stack design for our intelligent monitoring application uses a simple star topology
built on the NXP Jennic platform developed on the IEEE802.15.4 standard, which
operates in the globally unlicensed 2.4GHz band. Our network design consists of a
Figure 5.7: Jennic protocol stack
3
Coordinator node which serves as the sink node (connected to a central server) and
several Sleep-End nodes also known as the leaf nodes. The Coordinator node is respon-
sible for coordinating all the leaf nodes, performing synchronization with the clocks of
the sensor nodes and gathering data from each node for processing and storage into
an SD card or external system e.g., PC. In addition, the Coordinator node ensures
seamless communication between the nodes by initiating communication and sending
ACK/retry packets for data transmission and reception. The Jennic platform ensures
real-time data logging at the Coordinator node due to the memory management strat-
egy in place. Figure 5.7 depicts the Jennic protocol stack design. The design has the
following features: 1) Network load balancing to avoid data throughput congestion; 2)
Oers support to the Sleeping End nodes for extended battery life; 3) Provides end-to-
end message acknowledgment; 4) Allows over-the-air download; 5) Provides statistics
101
for network maintenance 6) Supports automatic route formation and repair in-case of
routing and 7) Finally, it provides network re-shaping to reduce network depth. In
addition to these features, one of the main characteristics of the Jennic software is that
the networking software can eciently handle all the network trac and can manage
network faults with a self-healing mechanism. All these features make Jennic platform
a choice for our WISPES node prototype.
5.7 Time Synchronization
Synchronization is an important aspect of a successful data gathering and communi-
cation process in WSN stack design. The data gathered from each individual node
must be synchronized. This can be achieved by the coordinator node that broadcast
beacon signals for all nodes in the network to synchronize their time-stamp. This
beacon-based approach suers from low scalability since the super-frame structure of
the IEEE 802.15.4 MAC only operates in a star topology network. Since the goal of our
platform design is also to support other topologies, our design strategy deviates from
the beacon-enabled approach. We instead use a non-beacon-based approach, which
does not provide synchronization and it does not support the active/sleep scheduling
and Guarantee Time Slot (GTS) mechanism. It however, exhibits certain features such
as high scalability and low complexity that makes it a method of choice for our de-
sign. In order to be able to use the non-beacon-based approach, we need to re-design a
method to synchronize the network. As a result, we used an Energy-ecient Service-
Packet-based (ESS) transmission scheduling algorithm. This method is based on a
centralized approach that is capable of providing synchronization by using the non-
beacon-enabled IEEE 802.15.4 standard. The algorithm is designed to avoid collision
in the network during packet transmission through a TDMA technique. The service-
packet contains the time stamp and other necessary network information such as the
active sensors on the network. The service-packet transmission across the network is
achieved by using a novel method based on constructive interference of IEEE 802.15.4
symbols for fast network ooding and implicit time synchronization used in Ferrari
et al. (2011). The overall idea is that interference is considered an advantage rather
than a problem. Based on this intuition, the simultaneous transmission of packet in the
network becomes constructive. This method has proven to achieve a ooding reliability
above 99% (Ferrari et al., 2011) which is quite close to the theoretical lower latency
bound. Our method proves to achieve a network-wide time synchronization at no cost
102
since it implicitly synchronizes the nodes as the ooding packets propagate through
the network. Similarly, with this same strategy the network can achieve an over-the-air
software update procedure, where the Coordinator node collects information such as
the link quality (LQ) from each node to build a virtual topology map for the overall
network. To summarize, the network node achieves synchronization by using service
packets and the coordinator denes the network topology for the deployment based on
the available LQ and nally, schedules each node to their given time-slot.
5.8 Continuous Real-time Data Acquisition
For our deployment to achieve a continuous real-time data acquisition, the time syn-
chronization is an important aspect of this goal. Thus, the Coordinator node is re-
sponsible for organizing and reorganizing the network in case of node failure or when
new nodes are introduced into the deployment. The Coordinator node collects data
from the network and delivers the samples to a database hosted on a PC or mini lap-
top connected via UART with access to a LAN. Following the description of the time
synchronization from the previous subsection, upon power up of a node, if it is within
a transmission distance to the Coordinator node, each Sleep-End node receives the
service-packet broadcasted by the Coordinator node and then the Sleep-End node goes
to sleep for a delay of 10ms. It wakes up to sense data using a scheduler and then goes
to sleep according to the given time-slot from the Coordinator node before waking up
to transmit the data. Finally, the node goes back to sleep for the duration of the user
dened sample interval and only wakes up 100ms before the sample interval elapses in
readiness to receive the new broadcasted service-packet from the coordinator for the
next round of data collection. In order for the Coordinator to accomplish its tasks,
two processes run simultaneously on the Coordinator: 1) The rst process manages the
whole network and gathers data from the network and 2) The second process connects
to the database server located on the PC and stores the samples. Since the data is
expected to be utilized by the end-users, we have used CACTI
4
for the front-end data
visualization. CACTI is an open source engine that allows data visualization, storage
and management using MySQL database as the back-end. With this process in place,
we are able to achieve a robust and real-time data collection operation.
4
http://www.cacti.net/
103
5.9 Summary
In summary, this chapter presents our intelligent and control monitoring solution for
a heritage building with the goal of: 1) Mitigating and retrotting new energy designs
which are particularly important to building and civil engineers and 2) Providing con-
tinuous monitoring in real-time for the structural health monitoring of the heritage
building. For this kind of monitoring, WSNs represent an alternative approach to the
traditional method that involves using measurement instrumentation and/or cabling.
We expect our deployment to span over two years in lifetime. However, we envision
that the energy consumption vis-a-vis lifetime can be further improved. As a result,
we dedicate the next chapters of this thesis to our novel approaches that promise to
signicantly extend further, the overall robustness of our deployment.
104
Chapter 6
Data Reduction Strategies in
Energy-limited WSNs
In this chapter, we discuss extensively data reduction strategies for energy management
in WSNs. First, a review of previous work in this area and the relevance of this method
is highlighted, followed by a discussion on the data reduction methods often used in
the literature. Secondly, this work presents an analysis of these methods by providing
a new understanding of the research problem on forecasting models employed in WSNs
and hence, presents substantial evidence on the claims of previous studies done in this
area. In addition, we conduct a comparative assessment of the state-of-the-art data
reduction models using both a simulation and a real-world deployment testbed that
is implemented on an o-the-shelf node platform. This thesis further proposes a new
method to tackle this problem in WSNs using a realistic application scenario. The
results of the experiments and the parameters for assessment are presented thereafter.
6.1 Introduction
In Chapter 2, some of the challenges of designing WSNs were briey discussed. A key
objective of WSNs should be to limit the overall energy consumption, which can be
achieved through data reduction methods. In literature (Anastasi et al., 2009), there
are three main methods: 1) Data aggregation approach 2) Prediction approach and
3) Compressed sensing approach. All these methods are employed on either temporal
data traces or on spatial data traces. The choice of any of these methods depends on
the application and the design architecture of the WSN deployment. In the following
subsection we present a brief review of these methods from existing works.
105
6.1.1 Background
Several authors have used data reduction methods to limit the amount of energy waste
in WSNs. The concept of data aggregation is hardly new. Data aggregation technique,
one of the data reduction methods, enables data from multiple sensors to be fused
together, either to achieve a more specic inference or to minimize the overall com-
munication with the aim of reducing energy consumption in the network. While this
concept is not new, the emergence of the advances in hardware architecture, enhanced
sensor devices, improved information processing techniques and fast converging algo-
rithms, have made real-time aggregation a possibility. Madden et al. (2002), proposed a
query-based data aggregation method called TAG, which operates on data aggregation
queries posed by users. TAG uses operators to implement the queries in a distributive
manner. Sensors route data back towards the user, while performing aggregation using
an aggregative function which could be either MEAN, MAX or AVERAGE and/or a
combination of more complex functions. Similarly, in Supporting aggregate queries
over ad-hoc wireless sensor networks (Madden et al., 2002), the authors presented
ways to eciently compute group aggregate. Yao and Gehrke (2003) proposed a query
layer that accepts queries in a declarative language that are then optimized to gener-
ate ecient query execution plans with in-network processing, which can signicantly
reduce resource requirements. Other works such as Heinzelman and Chandrakasan
(2002); Haase and Timmermann (2002); Smaragdakis et al. (2004); Qing et al. (2006);
Aderohunmu (2010) etc., combined this data aggregation scheme with routing tech-
niques in order to further achieve a reduced energy consumption in a clustered network
architecture.
Similarly, another key data reduction strategy often employed to reduce energy
consumption and transmission in WSNs is by using a prediction method. Prediction,
also known as forecasting in many Statistic texts, has been around for a while and has
been widely applied to stock market data, energy usage pattern for future demands,
on-line social site usage etc. Thus, prediction is required in many areas. There is the
increasing use of prediction in the area of telecommunication and networking, due to
the ease of nding a simple but yet powerful model for scheduling and routing problems
in the eld. In general, some time series are easier to predict than others depending on
the characteristic of the time series data. Hence, the predictability of an event depends
on how much data is available, what factors contribute to it. In the eld of wireless
sensor network, prediction has been applied to in-network data processing. The essence
is that if the sensed signal can be predicted up to a user specied accuracy
max
, some
106
data can be suppressed based on a prediction model. Often the sampled data does not
change signicantly over time, hence, could exhibit some local linearity that users can
approximate and it is possible users can tolerate some degree of inaccuracy. Regardless
of whatever model is used, the prediction condition is:
[y
t
y
t
[ >
max
(6.1)
where y
t
is the predicted value of the observed y
t
using a dened model. Thus, a good
prediction model captures the way events are changing, hence, prediction normally
assumes the way the phenomenon is changing and how it will continue into the future.
For instance a highly volatile environment will continue to be volatile and similarly,
a slow changing environment will continue to be slow changing into the future. A
prediction model is intended to capture the way things move and not just where things
are. One rule of the thumb is that, no prediction model can t all situations (Hyndman
and Athanasopoulos, 2012). In general, it has been shown that prediction method is an
eective way to optimize energy consumption in WSNs. Several authors have proposed
dierent prediction models to optimize energy consumption in the resource limited-
WSNs. For example, Jain et al. (2004) proposed using a Dual Kalman Filter (DKF)
architecture as a solution for data transmission reduction strategy. Also Jiang et al.
(2011), raised a vital question on the need to predict, hence, they proposed an adaptive
scheme to control whether to predict or not in WSNs. Similarly, Aderohunmu, Paci,
Brunelli, Deng, and Benini (2013) and Le Borgne et al. (2007), carried-out comparative
analysis of some selected prediction models and they used a selection scheme to choose
the best model on a real-world dataset.
Finally, the concept of compressed sensing, popularly called CS, has been around
for a while; this work rst appeared in Donoho (2006) and Candes et al. (2006). Since
then dierent authors have proposed ways to use this simple but yet powerful theory
to perform signal compression, a type of in-network processing in WSNs. Chou et al.
(2009); Luo et al. (2009); Caione et al. (2010), proposed using CS for temporal-spatial
signals designed for very large networks. Their results proved to be promising for
wireless sensor network applications that are delay tolerant. Thus, CS holds promising
feature that can signicantly reduce energy consumption with high accuracy in WSNs.
6.2 Prediction-based Data Reduction Methods
In this section we present an application specic light-weight algorithm and a compar-
ative study of some well-known linear regression models using our application scenario;
107
intelligent and control solution for historic buildings. Such scenario comprises of two
key data traces: 1) Monitoring in-door building temperature and 2) Monitoring in-door
humidity level. Following this comparative analysis, we show that a Naive prediction
model, while simple, still oers excellent accuracy on sensor nodes in some monitoring
applications often used in the literature such as in Liu et al. (2005); Santini and Romer
(2006); Le Borgne et al. (2007) etc. These models maintained by the sensor nodes
must be light-weight and computationally tractable, due to the nodes limited energy
resource capability. Hence, the local models are designed with these energy restrictions
in mind. Overall, our results reveal up to 96% communication reduction within 0.2
o
C
to 0.5
o
C i.e., less than 2% error bound with no signicant loss in accuracy. The data
streams used for the experiments are taken from the FP7 3ENCULT Palazzina della
Viola project in Bologna, Italy and from the Intel Laboratory
1
. Finally, we present the
real-world implementation of these algorithms on a commercially o-the-shelf platform.
In the next subsection, we discuss briey some of the patterns that constitute the time
series that are dealt with in our work.
6.2.1 Adaptive Light-weight Models
Time series are inherently governed by dierent kinds of patterns. Often, when de-
ploying WSNs for monitoring with the intention of using a prediction model as a data
reduction strategy, it is important to understand the type of pattern that exists in
the series to be forecasted. Assuming there is availability of some data set about a
phenomenon, in general, the following patterns exist:
Trend, it exists whenever there is a long-term increase or decrease in the data.
Seasonality, when a series is inuenced by several factors e.g., the time of the
year, week or month normally of xed and known period.
Cycle, relates to rises or falls in the data sequence with unknown xed period.
This behavioral uctuation must be at-least 2 years (Hyndman and Athanasopou-
los, 2012).
However, often there are no existing data traces about a phenomenon; in this instance
detecting these patterns becomes non-trivial. From the application point of view used
in this thesis, it is easy to eliminate both seasonality and cycle eects since sensor
nodes might not be capable of storing long history data e.g., for weeks or years and
1
http://db.lcs.mit.edu/labdata/labdata.html
108
0 100 200 300 400 500
26.5
27
27.5
28
28.5
29
3day sample
T
e
m
p
e
r
a
t
u
r
e
(
D
e
g
.

C
e
l
s
i
u
s
)
0 20 40 60 80 100 120 140
27
27.5
28
28.5
29
1day sample
Figure 6.1: Time series data taken from our deployment from the FP7
3ENCULT Project in Bologna
109
even if they can store long history data, it is highly possible that we do not want to
trade-o information processing and storage for our deployment lifetime. Hence, we
limit the discussion to any time series that exhibit trend patterns such as in the testbed
data set used in this thesis, the Intel lab and the GoodFood project
2
etc. Figure 6.1
depicts the type of time series used in this work. If the time series is decomposed into
days, then it is easier to see some increasing or decreasing trend for a particular day
and perhaps have insight on the local linearity of the data.
This thesis applied some well-known prediction models to the two key data traces
from our application that we mentioned previously. The models used are presented
here according to their simplicity:
Naive model: If given a dataset up to y
t
, the prediction is y
t+1
= y
t
; meaning
the forecasts of all future values are set to be y
t
, where y
t
is the last observed
value. This method has shown to work remarkably well for many economic and
nancial time series, (Hyndman and Athanasopoulos, 2012).
Moving Average (MA): If given a dataset up to y
t
of size N, assuming y
t
is com-
pletely constant, the best estimate would be to take the average of all observation
up to y
t
. However, y
t
is expected to vary slowly, this means we need to focus
on the most recent values. The idea of moving average method is to take the
average of all the N most recent values. The prediction is obtained as:
y
t+1|N
=
N

i=0
(y
ti
)/N (6.2)
The value of N is dependent on how slow the value of y
t
is varying, and on
the size of the stochastic deviations
t
. If y
t
is varying slowly and the stochastic
deviations are larger, a large N would be required. This limits the inuence of the
stochastic deviations on y
t
. Similarly, if y
t
is varying rapidly and the stochastic
variations are small, a smaller value of N would suce, which allows us to follow
the variations in y
t
in a better way (Axs ater, 2007).
Fixed-Weighted Moving Average (WMA): Given n set moving window at y
t
, the
prediction is:
y
t+1
= y
t
+
1
n

n1

i=1
(y
ti+1
y
ti
) w
i
(6.3)
2
www3.uni.it/midra/goodfood
110
Assuming n=4,
n
i=1
w
(i)
= 0.125, 0.125, 0.25 and 0.5 (xed weights). The sum
of the weights should be approximately one. Each value of y
t+1
can be thought
of as a weighted moving average of the past few forecast errors. Changing the
w
(i)
parameter results in dierent time series patterns.
Least-Mean-Square (LMS) : The algorithm has three parts as discussed by Haykin
(2008) namely:
1. The training sample: This includes the input signal vector denoted as x(n)
and the desired response denoted as d(n).
2. User-selected parameter: This includes the learning rate denoted as the
and the weight initialization w, which is set as w(0) = 0.
3. The computation: This includes the computation of the error signal, the
weight adaptation and the prediction.
The error signal is calculated as:
e[n] = d[n] w
T
[n]x[n] (6.4)
The weight vector is then updated as:
w[n + 1] = w[n] + x[n]e[n] (6.5)
And the prediction, as the output of the LMS lter, is:
y[n] = w
T
[n]x[n] (6.6)
LMS is a class of adaptive lters that are well-known as an alternative solution
to perform prediction on time series data without requiring knowledge of the
statistical properties of the phenomenon being monitored. Basically, an adaptive
lter takes in a sample x[n] of input signal x at each step n to compute the lter
output y[n] given as:
y[n] =
N1

i=0
w
i+1
[n] x[k i] (6.7)
A prediction algorithm can be constructed with a linear combination of the past
N samples of the input signals with the weight adaptation w
i
[n] from the lter.
The output signal y[n] is then compared with the desired signal d[n] which the
lter tries to adapt to. These weights are computed to satisfy the optimality
111
criterion which is normally the minimization of the Mean-Squared-Error (MSE).
The weights are updated at each n step with the aim to iteratively converge at
the minimum. The error signal e[n] is used in the adaptation rule in Eq. (6.5)
in order to reduce the errors in the subsequent step n + 1. According to Haykin
(2008), in order to guarantee convergence to the optimal minimum the learning
rate must satisfy the following condition:
0 1/E (6.8)
where E is the mean input power, which is calculated as:
E =
1
N
iter
N
iter

n=1
x[k]
2
(6.9)
where N
iter
is the number of iterations required to train the lter (Haykin, 2008).
The learning rate should be chosen to be as small as possible. To compute
the upper bound in Eq. (6.9), an approximation of

E can be computed from the
rst N samples. According to Moschytz and Hofbauer (2000), in most practi-
cal scenarios choosing two orders of magnitude smaller than this bound will
guarantee the eectiveness of the adaptive lter.
Exponential Weighted Moving Average (EWMA): This forecasting method, also
known as Simple Exponential Smoothing, is one of the simplest forms of Exponen-
tial Smoothing (ETS) models. EWMA is normally ecient for time series data
that exhibit no trend or seasonality. Forecast y
t+1
is calculated using weighted
averages where the weights decrease exponentially, such that
y
t+1
= y
t
+ (1 )y
t1
(6.10)
where is a smoothing parameter. We can generate the forecast equation for
N > 1 as:
y
t+1
=
N1

n=0
(1 )
n
y
tn
(6.11)
The smoothing parameter can be calculated adaptively by minimizing the sum
of squared errors (SSE) or it can be chosen as a constant normally between
0 1. Throughout this thesis, we refer to the method as Simple Exponential
Smoothing (SES) when the window size N = 1, and to EWMA whenever N > 1.
112
Damped Trend: This method is one of the variants of Exponential Smoothing
(ETS) models originally proposed by Gardner (1985). The idea is to introduce a
parameter that dampens the trend to a at line. A benet of using this method,
is in eort to decrease the slope component by leveling o the trend for any
time series that exhibit trend pattern (Hyndman and Athanasopoulos, 2012).
We represent this method as ETS(A,Ad,N), i.e., an ETS with additive error,
additive damped trends with no seasonality. The recursive state space model is
given below as:
Forecast equation: y
t
=
t1
+ b
t1
+
t
(6.12)
Level equation:
t
=
t1
+ b
t1
+
t
(6.13)
Slope equation: b
t
= b
t1
+
t
(6.14)
where is the damping parameter, and (0 < , < 1) are the smoothing
parameters. These values could be chosen to be xed or calculated by minimizing
SSE yields optimal results. The additive error term is given as
t
= y
t
- y
t1
.
ARIMA (r,d,q) model: Given n moving window at P
t
, the prediction is:

P
t
= c +
1

P
t1
+ ... +
r

P
tr
+
1
e
t1
+ ... +
q
e
tq
+ e
t
, (6.15)
where

P
t
is the dierenced series, r is the order of the autoregressive part; d is the
degree of rst dierencing involved; q is the order of the moving average part and
e is the error term. Both and are parameters of the AR terms and the MA
terms respectively. ARIMA models form an important part of the Box-Jenkins
(Box et al., 2008) approach to time series modelling. They are applied in some
cases where the data trace shows evidence of non-stationarity, the dierencing
d step (corresponding to the integrated part of the model) can be applied to
remove the non-stationarity.
6.3 Model Evaluation and Selection
6.3.1 Motivation
Here we present the model selection process and how a models performance with re-
spect to energy savings and accuracy is assessed. The work in this section is largely
113
0 50 100 150 200 250 300 350 400 450
25
30
35
40
45
50
55
Samples
H
u
m
i
d
i
t
y
3 days humidity data from different parts of the building


Node 1
Node 2
Node 3
Figure 6.2: Humidity data trace taking from the rst-oor (Node
1), attic (Node 1) and basement (Node 1) from our FP7 3ENCULT
deployment in Bologna
motivated by our own needs, to develop an intelligent monitoring control system for
heritage buildings that can be coupled with wireless sensor networks equipped with
energy harvesting capabilities such as the nodes used in (Brunelli et al., 2008; Dondi
et al., 2008; Carli et al., 2010; Porcarelli et al., 2012). For example, usually the tem-
perature and humidity measurements in a building vary dierently over time. In high
relative humidity conditions metals corrode, insects and moulds thrive and hence the
building and the contents deteriorate more quickly. Fluctuations in temperature can
cause expansion and contraction of structural areas causing physical damage and dis-
tortion. Thus, it is very important for these two parameters to be well controlled and if
possible manipulated to yield the desired environment in order to maintain the health
of heritage buildings and their contents.
Furthermore, a knowledge of the building temperature and humidity helps the civil
and control engineers to understand and model the thermal behavior of the building
structure. This knowledge could be useful for projects where it is necessary to scavenge
energy from the thermal gradients and make it available to the WSN. For example,
from our deployment of WSN in a four-storey building, the temperature measurements
in the attic with no ventilation system exhibit a high variance compared with the
temperature measurements in the rst-oor, which exhibit moderate variance due to
114
lots of human presence and their interaction with the ventilation system on the rst-
oor. Similarly, the temperature measurements in the basement exhibit low variance
due to little human interaction and the proximity to the ground. Similar variations
exist for the humidity data trace. Figure 6.2 shows the humidity measurements from
the attic, rst-oor and the basement of the building. Node 1 represents nodes in
the rst-oor, Node 2 represents nodes in the attic and Node 3 represents nodes in
the basement. These nodes will consume dierent levels of energy depending on the
variability that exists in the monitored environment. Overall, we envisage that if we
can predict these data traces based on our own dened error bound, then considerable
energy could be saved in the network.
Hence, to meet these needs, the goal is to design an adaptive light-weight prediction
algorithm that can minimize the overall energy consumption and memory footprint of
the sensor nodes. In a nutshell, the WSN should be autonomous and capable of running
for years with a minimum human intervention. Hence, there is need to search for very
light-weight prediction models. Next, we discuss how these models are being assessed
in the light of our in-house monitoring application scenario.
Model evaluation and assessment method
Normally during the WSN operation, all sensor nodes are programmed to send their
raw data at every time stamp to the Sink node or to the cluster-head. Accurate data
acquisition could be very dicult and sometimes not necessary, in the sense that sensor
readings only represent a sample of the true state of the physical space and most likely
users can tolerate some level of inaccuracy, as we mentioned previously. Thus, we have
used the well-known forecast accuracy measures, mathematically expressed below:
Mean Absolute Error (MAE): Given a forecast error
i
= [y
i
y
i
[. The MAE is
given as;
MAE = E([
i
[) (6.16)
Root Mean Square Error (RMSE): This is given as;
RMSE =
_
E(
2
i
) (6.17)
Relative Error (RE): This is given as;
RE =
[
i
[
y
i
(6.18)
115
symmetric Mean Absolute Percentage Error (sMAPE):
sMAPE = E
_
200[y
i
y
i
[
y
i
+ y
i
_
(6.19)
The lower these error metrics are, the better the prediction accuracy of the model.
Similarly, a preliminary analysis is carried out to select among the regression predictors
and particularly to estimate the order of the ARIMA model. For this purpose, the
corrected Akaikes Information Criterion AICc (Hyndman and Athanasopoulos, 2012)
is used. In this case the assumption is that there is enough existing data trace of the
monitored phenomenon; this could be a strong assumption as in some instances there
might be no existing data set. The AICc can be computed as:
AIC
c
= AIC +
2(p + q + k + 1)(p + q + k + 2)
L p q k 2
(6.20)
where AIC can be written as:
AIC = 2log(L) + 2(p + q + k + 1) (6.21)
where p and q are the autoregressive and moving average terms respectively, L is the
likelihood of the data, k=1, if c ,= 0 and k=0, if c = 0. The last term in parenthesis
in Eq. (6.21), denotes the number of parameters in the model. There is also the
possibility of using the Bayesian Information Criterion (BIC), which can be expressed
as:
BIC = AIC + log(L)(p + q + k 1) (6.22)
Minimizing the AIC, AICc or BIC will yield a good model choice. To accomplish the
model selection, two days dataset are used as training set to select the order of the
ARIMA model.
After estimating the dierent parameters of the predictors, e.g., ARIMA, we then
select among the predictors based on energy consumption for our deployment. We use
the ratio of the percentage of the transmitted samples to the total number of samples.
Likewise, the computational cost is measured as the cost to evaluate the algorithm at
each time t needed to compute the prediction. We have not considered the additional
cost incurred to compute the model parameters and to re-transmit whenever the model
is outdated; this is a special case for the ARIMA model. It is necessary to consider
these trade-os when deciding which model is appropriate. Based on this intuition,
116
the appropriate model should aim to minimize the prediction metric. We refer to the
prediction metric as Prediction Cost (PC), dened as the cost of a model prediction
operation as used in (Aderohunmu, Paci, Brunelli, Deng, and Benini, 2013):
PC = [f(e) + (1 )r]E
c
(6.23)
where is a weight factor, f(e) is the function of dierent accuracy measures dened
above, e.g., if e is MAE, then the accuracy measure is a function of the MAE, r
is the percentage transmission and E
c
is the computational cost. The value of E
c
depends on the computation of each algorithm on the sensor node with respect to the
memory footprint, CPU usage and the available bandwidth/bus trac, assuming all
other parameters are already computed at the Sink node and transmitted to the leaf
nodes for prediction. The weight factor reects the user desired level of accuracy
f(e) with respect to the energy consumption. It can be chosen as 0 1. A higher
emphasizes a higher accuracy with lower energy spent and vice versa. The value of r
can be expressed as (
transmittedpacket
totalpacket
100). The choice of f(e) and depends strictly
on the users preference and the application in mind.
Since all models discussed above are linear, the worst case complexity is considered.
The E
c
for the Naive model will have O(1) time complexity i.e a constant time, since n
will always be 1, and the other models will have at-least O(n) time complexities. This
means that, for the models with O(n) time complexity the cost will increase linearly as
n becomes larger. If we are to consider computing the model parameters on the source
nodes, they will eventually run out of memory especially in the case of the ARIMA
model where a long history data and a matrix inversion could be required to t an
appropriate model that can signicantly give a better accuracy for the out-of-sample
data. Hence, it is always assumed in the previous research literature that the Sink
node can compute the model parameters and inject them into the network. However,
this is also at the expense of the available bandwidth. There is high probability that
the medium will be lossy in nature and hence the results might be counter-productive.
The goal of using a prediction model might be defeated with respect to the energy
savings.
6.3.2 Parameter Selection
There are dierent methods for calculating the model parameters such as Yule-Walker
equations, least square estimation (LSE) and maximum likelihood estimation (MLE).
There are dierent computer programs that are available to estimate these parameters.
117
Algorithm 1 Hyndman-Khandakar algorithm
1. The number of dierences d is determined using repeated KPSS tests.
2. The values of p and q are then chosen by minimizing the AICc after dierencing
the data d times. Rather than considering every possible combination of p and
q, the algorithm uses a stepwise search to traverse the model space.
(a) The best model (with smallest AICc) is selected from the following four:
ARIMA(2,d,2),
ARIMA(0,d,0),
ARIMA(1,d,0),
ARIMA(0,d,1).
If d = 0 then the constant c is included; if d 1 then the constant c is
set to zero. This is called the the current model.
(b) Variations on the current model are considered:
i. vary p and/or q from the current model by 1
ii. include/exclude c from the current model
The best model considered so far (either the current model, or one of
these variations) becomes the new current model.
(c) Repeat Step 2(b) until no lower AICc can be found.
118
For instance, in this thesis the R package
3
is used to compute the parameters using the
MLE method. The MLE technique nds the values of the parameter that maximizes the
probability of obtaining the data we have observed. For most regression method MLE
will give exact parameter estimates as the LSE. For ARIMA models, MLE will yield
slightly dierent parameter estimates to LSE that would be obtained by minimizing
(Hyndman and Athanasopoulos, 2012):
T

t=1
e
2
t
In practice, the Hyndman-Khandakar algorithm labeled as Algorithm 1 will report the
value of the log likelihood of the data; that is, the logarithm of the probability of the
observed data coming from the estimated model. For given values of p, d and q, the
algorithm with try to maximize the log likelihood when nding parameter estimates
(Hyndman and Athanasopoulos, 2012). Algorithm 1 reports the estimate of what
ARIMA model can t any of the time series data we want to model. This algorithm
is also capable of automatically estimating the ARIMA parameters. The algorithm
combines the unit root tests, minimization of the AICc and MLE to obtain the best
ARIMA model from the pool of the ARIMA models. In statistics, to use the MLE,
one needs to rst specify the joint density function for all observations. Suppose there
are x
1
, x
2
, ...x
n
samples of n that are independent and identically distributed (i.i.d)
from an unknown probability density function f
0
(). The joint density function can be
expressed as:
f (x
1
, x
2
, ..., x
n
[) = f (x
1
[) f (x
2
[) ... f (x
n
[) . (6.24)
where is a vector of parameters from the distribution f ([) , . Thus, if we
consider the samples x
1
, x
2
, ...x
n
to be xed parameters of Eq. (6.24) and we let to
vary freely, the resulting function is known as the likelihood function and it is expressed
as:
([x
1
, ..., x
n
) = f (x
1
, x
2
, ..., x
n
[) =
n

i=1
f (x
i
[) . (6.25)
MLE estimates
0
by nding the value of that maximizes the likelihood

([x).
Mathematically, the MLE can therefore be expressed as:
_

MLE
_

_
argmax

([x
1
, ..., x
n
)
_
(6.26)
3
http://www.r-project.org/
119
where

=
1
n
ln denoting the log-likelihood. Therefore, as long as the data are inde-
pendent and identically distributed we can successfully use MLE to estimate the model
parameters.
Discussion on model choice
At rst glance, light-weight models such as Naive, seem very simple without any cost
and with low memory footprint. It is well-known by forecasting experts that the Naive
model is considered to be a surprisingly good forecast for many things. It could be
very dicult to beat; it is known to be optimal for ecient stock market
4
. This model
is often used as a bench-mark in other elds for most of the newer and more complex
models that heavily depend on the statistical properties of the historical data and in
most cases they will involve huge computational overhead. However, the usefulness
of this model has not really been considered in the literature dealing with WSN real-
world applications, possibly due to the attraction towards more complex models. Also,
models such as the xed-Weighted Moving Average and Least-Mean-Square adaptive
lter combined with AR models could provide a good t to time series data similar
to the Naive model, except they impose dierent computational cost and convergence
rate. Another good property of Naive model is that it does not rely on long history
or the statistical properties of the environment, which could be useful to some data
acquisition protocols, unlike the well-known complex models, especially when used as
predictors on energy-constrained WSN.
On the other hand, ARIMA model is well-known to provide a good forecasting ac-
curacy to time series data. It is very useful for highly dynamic environments especially,
since the integrated term is introduced to remove the impact of non-stationarity by
dierencing the original time series data. Notwithstanding how good it is, this model
depends heavily on the statistical properties of the data set.
When applying a prediction model to WSN, it is necessary to be mindful of the
resources required at the sensor nodes to carry out computation if the goal is to achieve
a long term monitoring process with minimal human intervention. It is true that most
existing WSN platforms can easily meet the requirements for implementing some of
these complex models in terms of memory usage and computation for a small testbed.
However, choosing the right model for an application scenario becomes non-trivial
most especially for larger deployments and where the lifetime of the WSN deployment
becomes the priority as in most real-world deployment cases. The question is: Is it
4
http://robjhyndman.com/
120
practically feasible to implement such complex models, especially when simple models
can give comparable performance in the same domain? For simplicity, one of the
obvious bottle-necks with complex models on WSN is that it cannot be easily achieved
practically considering the fact that model updates are required for accurate prediction
and model synchronization in a reasonable sized network deployment. An important
open research direction was raised by Anastasi et al. (2009), To this end, a research
direction would focus on assessing if a specic solution is ecient for a certain class of
applications in a real-world scenario, so that it can be taken as a reference for further
study and possible improvements. Therefore, we carried-out a detailed comparative
analysis of such solutions on a real-world application specic setting.
The trade-o in question is therefore between prediction accuracy, energy con-
sumption, which translate to WSN lifetime, practicability, computational overhead
and prediction delay. It is our goal to verify some of these models with respect to
these trade-os. In addition, our aim is to show that a very simple linear predictor
is sucient to capture temporal correlation in real-world WSN deployments, such as
our intelligent and control solution deployed for a historic Building monitoring applica-
tion or perhaps for any other applications such as the Goodfood project that exhibits
similar characteristics in data traces to our deployment scenario.
6.3.3 Model Analysis
Here we use similar analysis conducted in Aderohunmu, Paci, Brunelli, Deng, and
Benini (2013). The robustness of the light-weight models depends on the linearity of
the data samples at the execution time. We need to be guaranteed that the signal or
time series Y exhibit a variance
2
Y
that is not signicantly larger than zero. Hence, we
show that light-weight models are capable of handling prediction for our deployment
as long as the data traces remain locally linear. Thus, given our application scenario,
one of the two cases below applies:
CASE 1: Given a signal Y with size N up to time t; the variance
2
Y
can easily
be computed.
CASE 2: If the signal Y is unknown, then the
2
Y
is also unknown. However, we
can estimate
2
Y
.
From CASE 1, it is easy to compute the variance of Y , since we know a priori what
the value of
2
Y
is. Unfortunately, this is not our scenario, because we do not know the
signal beforehand.
121
According to CASE 2, the real-world distribution of a phenomenon is typically
unknown, hence we can only provide an estimate of
2
Y
. A good way to approximate
it is using an unbiased estimator, assuming we extract n samples with values y
1
, ...y
n
from the entire sample N , n < N, as:
s
2
=
1
n 1
n

i=1
(y
i
y)
2
(6.27)
where y =
1
n

n
i=1
(y
i
). Using this unbiased estimator means that the E[s
2
] is equal
to the true variance of the sampled random variable. Following Cochrans theorem
(Cochran, 1934), a direct consequence is, E[s
2
] =
2
Y
. If y
i
are independently dis-
tributed, then:
V ar[s
2
] =
4
Y
_
2
n 1
+

n
_
(6.28)
where is the excess kurtosis of the distribution. Therefore, if the law of large number
holds, from Eq. (6.28), s
2
is a consistent estimator of
2
Y
, indeed the variance of the
estimator tends asymptotically to zero. Thus, we are condent that if
2
Y
> 0 and

2
Y
0 with time t; the Naive model is guaranteed to remain robust. Hence, given a
K-order linear model,

K
i=1
abs(
i
) 1 is true, if and only if n-step prediction error
() is less than n times the one-step prediction error (Jiang et al., 2011). This means,
the cumulative error of n-step prediction is not signicant. The variance of n-step
prediction error is obtained as:
V ar[e(n)] n
2

2
(6.29)
substituting our estimator s in Eq. (6.27) into Eq. (6.29), if we let V ar
(UB)
=
n
2
n1

n
i=1
(y
i
y)
2
, i.e., the upper-bound of the variance of the signal Y , then V ar[e(n)]
V ar
(UB)
. Clearly, as long as this condition holds, our model is guaranteed to remain
robust (Aderohunmu, Paci, Brunelli, Deng, and Benini, 2013).
6.4 Simulation Evaluation
The results presented here are from extensive simulations conducted on the FP7 3EN-
CULT and Intel Lab deployments. First, the simulation study is done in order to ease
the testing of the performance of the dierent models on the same datasets. Secondly,
it limits the time consumption normally associated with real-world testing. Third, it
aords us the opportunity to test large datasets from other similar available public
deployments.
122
Algorithm 2 Generic prediction algorithm
1: Input: Array of history data, error dened by user, Array of observed data
2: Call predictive model at P(t + 1) time t for any model
3: if [ prediction - observed data [ > error bound then
4: Transmit
5: Update history table with observed data
6: Count the number of transmission
7: else
8: Update the history table with prediction
9: end if
6.4.1 Simulation Study
The discussion here is focused on the simulation implementation of the prediction
models. In a later section, we provide the results and discussion from the real-world
deployment of the WSN platform. The results of the in-door temperature monitoring
are presented rst, followed by the analysis of the data traces from the humidity level
monitoring application.
0 500 1000 1500 2000 2500 3000
16
18
20
22
24
26
samples
T
e
m
p
e
r
a
t
u
r
e
(
D
e
g
.

C
e
l
s
u
i
s
)
Intel Berkeley Research Data source from mote 11
Figure 6.3: Intel data source
MATLAB is used for the simulation. The generic structure of the predictive al-
gorithm is given in Algorithm 2 when applied to WSNs. For this scenario some as-
sumptions are made similar to the one used in previous studies such as (Matos et al.,
2010) and (Santini and Romer, 2006) for the simulation study; e.g., the Sink node can
synchronize with the source nodes at each time stamp, hence, if data is received from
the source node, the Sink updates its history table at time t. Otherwise, it predicts the
value with the same model at the source node. Firstly, for the sake of validation, the
123
Naive model is compared with the work in (Santini and Romer, 2006) using the same
data source, i.e., the real-world testbed data from 54 Mica2Dot
5
sensor nodes deployed
in the Intel Berkeley Research lab
6
between February 28 and April 5, 2004. The deploy-
ment samples Temperature, Humidity, Light and Voltage data every 31 seconds. The
data traces from one of the nodes, viz. mote 11, is used for the purpose of comparison.
It should however be noted that the other nodes exhibit similar characteristics in the
data traces. The prediction models are applied to this sensor data from March 6 to 9.
This data set is shown in Figure 6.3.
Figure 6.4: Deployment of the First oor
Secondly, for further analysis, we use the data from our deployment of a 36-node
WSN testbed in a 4-storey renaissance building at the center of Bologna, Italy, which
was deployed in March 2012 for the FP7 3ENCULT project (the operation of the
deployment is still ongoing). The deployment oers some interesting scenarios. For
instance the dataset from the attic to the basement of the building exhibit dierent
temperature and humidity variations. Figure 6.4 depicts the rst oor of the building;
here node 6 is the cluster-head node and all other nodes transmit their data at each
sample interval to the cluster-head. From our deployment, samples are collected every
10 minutes for the simulation dataset over the period of the deployment. Two features
are considered viz, temperature and humidity measurements. The models are applied
5
Crossbow: www.xbow.com
6
http://db.lcs.mit.edu/labdata/labdata.html
124
to the data collected from the 36-node deployment which are subject to several vari-
ations. This yielded similar results the reason being that these type of datasets are
locally linear and could exhibit the following characteristics: 1) A sudden and unpre-
dictable change in direction; 2) Long period of apparent trends up or down; 3) Random
walk with a slow steady change and/or deterministic trends. Therefore, if a model is
performing well on a set of data trace, it is highly possible it will continue to perform
well on the other set of data traces, as long as they are taken from the same application.
Particularly, nodes are selected from three main locations of the building; the attic, the
rst-oor and the basement. To be precise we selected data from three representative
nodes
7
: node ID 1 positioned on the rst-oor, node ID 2 positioned in the attic, and
node ID 3 positioned at the basement. It should be noted that these nodes are only
representations of the location of the other nodes for the sake of experimental analysis.
The reason for the choice of these nodes is in order to assess the performance of the
prediction models in the presence of dierent temperature and humidity variations in
the building. For example, with respect to the temperature measurements, node 2
exhibits the highest variance, followed by node 1 and then node 3. The position of
node 1 is quite interesting due to the interaction of people with the ventilation system
in the room, as it is shown by the variations on the graph in Figure 6.1. For each of
the models presented previously, computing the parameters to build the models might
require the availability of existing data traces. In some instances such existing data
traces might not be available and even if they are available we might be limited by
the available resources on the nodes. Hence, for this particular scenario, the following
assumptions are made:
1. There is an existing data set to build the models.
2. The sink node has innite storage and battery power.
3. The sink node is powerful enough to compute the model parameters and inject
these weights into the network by using a ooding mechanism.
4. There is perfect synchronization in the network hence, the communication medium
is lossless in nature.
5. The sink node is able to maintain a history window or buer size N for each
sensor node to keep the latest states of the corresponding time series.
7
Note they have been renamed for easy referencing
125
We acknowledge that some of these assumptions are quite strong, however we prefer
to proceed with our analysis since the same assumptions have been used in a number of
previous studies on prediction models such as in Matos et al. (2010), Santini and Romer
(2006), Tulone and Madden (2006), Askari Moghadam and Keshmirpour (2011), Liu
et al. (2005) and Le Borgne et al. (2007).
6.4.2 Simulation Results: Cross Validation with Adaptive Fil-
ters
For the purpose of cross-validation with existing proposed models such as in Santini
and Romer (2006), the results for Naive and LMS predictive algorithms are presented
and their performances are compared using similar analytical metrics used by these
authors. For LMS the parameters are N = 4 i.e., the number of past history data also
known as lter length, and the learning rate = 1.2e 05. Usually, is a critical
parameter since it tunes the convergence speed of the algorithm. The detailed operation
of the how the LMS scheme is designed to operate on the nodes is presented in Santini
and Romer (2006); instead we focus on the comparison of the results obtained by the
authors. For this purpose we select the parameters used in Santini and Romer (2006)
that are reported to give the best performance on the data trace. In Figures 6.5(a),
we t the Naive model to the Intel data from mote-11 as discussed previously and
Figure 6.5(b) shows the performance of Naive prediction compared with LMS model.
Based on our experiments, it is obvious that the performance of the Naive prediction
is better than the LMS model in terms of energy savings and convergence rate given a
user dened error budget between 0
o
C and 5
o
C (chosen for the sake of experiments).
Looking closely at this gure, it can be seen that the interesting bit for the Naive model
is within the 0
o
C and 0.5
o
C error bound, i.e., < 2%, shown with the green oval dotted
line; this equally justies the error bound range used, which we will adopt for the rest
of the experiments. Hence, for the rest of the experiments we will keep within these
range of values.
Continuing with the discussion of the results, the advantage of the Naive model over
LMS model is that it incurs no computational cost and it keeps only the last previous
value. In addition, it converges faster than the LMS model. From Figure 6.5(b) it can
be seen that as the user error budget increases, the LMS model after about 1
o
C does
not react signicantly to any change in the percentage transmission i.e. %transmission.
This is partly because the algorithm keeps learning by using the weight adaptation that
could be very slow to converge, unlike in the case of the Naive model, which captures
126
0 500 1000 1500 2000 2500 3000
16
18
20
22
24
26
Sample
T
e
m
p
e
r
a
t
u
r
e
(
D
e
g
.

C
e
l
s
i
u
s
)
Using Naive prediction on Intel Data source


Original data
Naive prediction
(a) Fitting Naive model to Intel data
(b) mote 11: Naive model vs LMS
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
0
10
20
30
40
50
60
70
80
90
100
user defined error bound
%

o
f

T
r
a
n
s
m
i
t
t
e
d

d
a
t
a
Percentage of Transmitted Data (mote 19)


Naive prediction (NP)
MLMS, N=4 u=1.5e05
LMS, N=4 u=2.9e05
(c) mote 19: Naive model vs LMS
Figure 6.5: Simulation study, Naive prediction: (a) Fitting Naive
model to Intel data (b) mote 11: Naive model vs LMS (c) mote 19:
Naive model vs LMS
127
the changes in the data trend for the cases where it violates the given user error bound.
Since we do not know the signal and the learning rate a priori, we are not guaranteed
of a fast convergence and this is one of the major drawbacks of LMS algorithm, because
it is sensitive to the scaling of its input. This makes it hard, if not impossible to choose
a learning rate that guarantees the stability of the LMS algorithm (Haykin, 2008).
For example, in Figure 6.5(c) we demonstrate using manual-LMS (M-LMS) that it is
possible to improve the performance of the LMS, supposing we know the signal a priori
and we tune the learning rate manually. For this method we select mote-19 from the
Intel Lab Data. It can been seen that M-LMS performs signicantly better than LMS.
This means, the result from LMS is not optimal for the data trace, although, the Naive
model still performs better than both models.
According to the study conducted by Santini and Romer (2006), adaptive lters
are able to provide a tracking capability, since they are able, in a non-stationary
environment, to track time variations in the statistics of the input data, provided that
these variations are suciently slow. Meaning, as long as the signal is not varying
rapidly over a short period of time, adaptive lters can achieve robust results. It
is therefore imperative to analyse how much gain can be achieved when we apply
such lters to energy-limited WSNs. Although, LMS has proven to reduce energy
consumption when compared with a traditional sense-transmit approach, but, is this
performance much better than a simple Naive model in the same domain? Based on our
experimental results, Naive prediction proves to be more robust than the LMS model
for an ambient temperature monitoring application. We devote the next subsections to
more results by comparing the performance of the Naive prediction to other well-known
models that we presented previously using dierent data traces from our deployment
and from the intel lab.
Optimality of the Naive Model
We verify the optimality of the Naive model on our dataset using an improved version
of the LMS algorithm called, the normalized least mean square lters (NLMS). The
NLMS is a variant of LMS algorithm that oers guaranteed convergence by normalizing
the lter with the power of the input. The NLMS algorithm (Honig et al., 1987), is
similar to the LMS algorithm presented in Subsection 6.2.1, except that this algorithm
reduces the number of recursions, hence making the algorithm computationally more
attractive than the LMS. The computation is given as:
128
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
0
20
40
60
80
100
User error bound
%

o
f

T
r
a
n
s
m
i
t
t
e
d

d
a
t
a
Temperature dataset mote 11 at 31secs sampling interval


NLMS
LMS
Naive
(a)
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
0
10
20
30
40
50
60
70
80
90
100
User error bound
%

o
f

T
r
a
n
s
m
i
t
t
e
d

d
a
t
a
Humidity dataset node 3 at 10min sampling interval


LMS
NLMS
Naive
(b)
Figure 6.6: Simulation study, Naive model, NLMS and LMS: (a) Intel
data: mote 11 (b) FP7 data: node 3
129
e(n) = d(n) w
T
(n)x(n): error signal (6.30)
w(n + 1) = w(n) +
x(n)e(n)
|x(n)|
2
: weight adaptation (6.31)
We implemented the NLMS algorithm using both the Intel Lab and FP7 datasets to
verify the performance improvement on LMS (see the LMS denition for the explana-
tion of parameters to Eqs. 6.30 and 6.31). Figure 6.6(a) and Figure 6.6(b) reveal that
the NLMS is able to converge with an optimal learning rate. This result is very close
to the Naive model. This veries the optimality of using the Naive model for certain
monitoring applications without the need of training a model as used in Santini and
Romer (2006).
6.4.3 Further Simulation Results: Naive vs. ARIMA, WMA,
LMS and NLMS
Temperature dataset
The Naive model is compared here with other predictive models such as ARIMA and
WMA including LMS. For the temperature dataset, two days history data is used as
training set to build the model parameters by the MLE method. These parameters
are then injected into the network for the following day predictions. From Node 1, by
tting the FP7 dataset in R, ARIMA(4,1,1) model proved to be the best. The following
coecients are obtained: AR(1 4) term chosen as 0.5110; 0.0417; 0.2538; 0.0451 and
the MA(1) term chosen as 0.715. Similarly, for the sake of further comparison with
existing dataset from other publicly available deployment, we use the Intel dataset,
mote-11. ARIMA(5,1,1) model proved to be the best after tting ARIMA models to
Intel dataset, with parameters for AR(1 5) term chosen as 1.0334; 0.0031; 0.0836;
0.0396; 0.0234 and the MA(1) term chosen as 0.7732 respectively. Furthermore, for
evaluating the gains achieved by any of the models, we specify the traditional sense-
and-transmit paradigm as NoPred, i.e., all sensed data are transmitted to the Sink
node at each time stamp t. We take a look at more performance results in the next
subsections.
Discussion of Results
From the experiments conducted, the Naive model is very simple with virtually no
cost and easier to compute than the LMS, NLMS, WMA and ARIMA. The advantage
130
0 50 100 150
17
18
19
20
21
Naive model fitted to FP7 3ENCULT data source
samples
T
e
m
p
e
r
a
t
u
r
e
(
D
e
g
.

C
e
l
s
i
u
s
)


Original data
Naive model
(a)
0 50 100 150
17
18
19
20
21
WMA model fitted to FP7 3ENCULT data source
Sample
T
e
m
p
e
r
a
t
u
r
e
(
D
e
g
.

C
e
l
s
i
u
s
)


Sensed data
WMA
(b)
Figure 6.7: Simulation study, Naive and WMA models: (a) Fitting
Naive model to FP7 data (b) Fitting WMA model to FP7 data
131
(a)
(b)
Figure 6.8: FP7 Temperature data: Performance of all models using
dierent error bound.
132
of using a model like Naive over ARIMA is that the computation is light-weight and
the Sink will not need to compute any predictor training set. In addition, it can
be practically implemented on the network. When compared with the other powerful
algorithms, the accuracy of the Naive prediction could be slightly lower (which could be
insignicant as seen in our case). However, the question is: Is the increased accuracy
of other methods worth the additional resources especially with the energy constrained
WSNs?.
Figures 6.7(a) and 6.7(b) depict example experiments for a 1-day temperature pre-
diction. In these Figures we tted both Naive and WMA models to the sensed tem-
perature data. The sampling rate is set to 10 minutes and the error bound to 0.3
o
C,
which falls within the range of 0.5
o
C normally used by the building engineers we
interacted with. We show a summary of the performance of these models using two
separate datasets. First, we discuss the dataset from our testbed and then we carry-out
a similar analysis on an external dataset taken from the Intel Lab testbed. In Table
6.1(a), the Naive model performs a little better than both WMA and ARIMA models
as it is able to achieve up to 96% transmission reduction which translates into energy
savings, with a considerable level of accuracy compared with the other models. Figure
6.8 shows the performance of all the models using dierent error bounds on the FP7
temperature dataset. Using our previously dened cost function PC to evaluate what
model achieves a higher energy-eciency, the Naive model performs the best. Recall
that the PC
8
is calculated as a function of the accuracy, percentage ratio of samples
transmitted to the total samples and the computational cost to run the model. In this
instance we put 50% i.e = 0.5 weight on both f() and r. Since the Naive model
incurs virtually no cost, we set n = 1 for Naive model, n = 5 for WMA model and n is
5 and 6 for the respective ARIMA models used. Utilizing any of the accuracy measures
in this case MAE, the PC for Naive is much better compared with all the other models
at dierent level signicance.
Similarly, from Table 6.1(b), the Naive model achieves a slightly higher transmission
reduction with no loss in accuracy compared with ARIMA, WMA and LMS models.
Although, the LMS models performance is the worst of all the models, its overhead is
much lower than the WMA and ARIMA models. One of the other advantages of the
Naive model over all the models is that it costs nothing since it requires no a priori
knowledge of the statistical properties of the data to correctly model the expected
8
All the results are presented without the 15% extra energy budget required to run ARIMA and
WMA models on the nodes.
133
Table 6.1: Summary of performance of the predictive models: FP7
data source
(a) 0.5
o
C error bound
Models MAE sMAPE RE RMSE % transmission PC with MAE
NAIVE 0.1869 0.9605 0.01 0.2287 4.6% 2.52O(1)
WMA(N=5) 0.2648 1.3800 0.014 0.3 6% 3.132O(n)
ARIMA(4,1,1) 0.1973 1.0205 0.0104 0.2490 6% 3.098O(n)
LMS(N=4, =2.9e-05) 0.2203 1.164 0.0116 0.269 6.25% 3.235O(n)
NLMS(N=4) 0.231 1.213 0.012 0.283 4.8611% 2.564O(n)
NoPred 0 0 0 0 100% 50
(b) 0.3
o
C error bound
Models MAE sMAPE RE RMSE % transmission PC with MAE
NAIVE 0.110 0.5765 0.0058 0.1516 7.6% 3.874O(1)
WMA(N=5) 0.1318 0.6893 0.0057 0.15869 8% 4.069O(n)
ARIMA(4,1,1) 0.1393 0.7289 0.0073 0.1689 8% 4.065O(n)
LMS(N=4, =2.9e-05) 0.1544 0.804 0.0081 0.186 9.02% 4.59O(n)
NLMS(N=4) 0.117 0.608 0.0062 0.155 9.02% 4.57O(n)
NoPred 0 0 0 0 100% 50
values. From this point of view, the assumption normally associated with ARIMA
models is that there are existing data available to compute the model parameters before
deployment. This is not always the case in some real applications. Similarly, WMA
performance is also slightly better than the ARIMA model in this regard, because the
WMA uses the moving window of history data with xed weights to compute a drift
pattern, which is added to the last received observed value (logically the mathematical
computation is close to Naive model). In addition, the computational over-head for
WMA using xed weight vector over ARIMA model is much lower.
The ARIMA model on the other hand requires enough history data to compute
weights for more accurate predictions. Hence, we used a two-day data as a training set
for ARIMA model. Figures 6.9(a) and 6.9(b) show examples of tting ARIMA models
to both the FP7 data and the Intel Berkeley data sources. Another disadvantage of
using ARIMA models for our WSN application scenario is that when the model becomes
outdated it starts performing poorly and this will require a new set of parameters to
be re-computed. This process is very costly for WSNs with minimal energy budgets.
Similarly, an ARIMA model can perform well on the training set and then perform
poorly when used on the out-of-sample data i.e., forecasting future trends. It is worth
mentioning here that, majority of the existing literature, assumes that the parameters
will be computed at the Sink node which is presumed to have enough energy and
memory resources, and then the model will be broadcasted to the network. This process
will require network resources - energy, network bandwidth, cost of re-synchronization
and CPU usage, especially in the case of lossy medium. It is not so practical to achieve
134
0 50 100 150
17
18
19
20
21
ARIMA model fitted to FP7 3ENCULT data source
Sample
T
e
m
p
e
r
a
t
u
r
e
(
D
e
g
.

C
e
l
s
i
u
s
)


Original data
ARIMA(4,1,1) model
(a)
0 500 1000 1500 2000 2500 3000
16
18
20
22
24
26
ARIMA model fitted to Intel Berkeley Research Data source
Sample
T
e
m
p
e
r
a
t
u
r
e
(
D
e
g
.

C
e
l
s
i
u
s
)


Original data
ARIMA(5,1,1) model
(b)
Figure 6.9: Simulation study, ARIMA prediction: (a) Fitting
ARIMA(4,1,1) model to FP7 data (b) ARIMA(5,1,1) model to In-
tel data
135
Table 6.2: Summary of performance of the predictive models: Intel
Berkeley Data source
(a) 0.5
o
C error bound
Models MAE sMAPE RE RMSE % transmission PC with MAE
NAIVE 0.237 1.15 0.011 0.2804 1% 0.63O(1)
WMA(N=5) 0.2101 1.027 0.0103 0.258 1% 0.588O(n)
ARIMA(5,1,1) 0.2219 1.0873 0.0109 0.2646 1% 0.5943O(n)
LMS(N=4, =1.2e-05) 0.2499 1.2244 0.0123 0.3086 8.13% 4.189O(n)
NoPred 0 0 0 0 100% 50
(b) 0.3
o
C error bound
Models MAE sMAPE RE RMSE % transmission PC with MAE
NAIVE 0.1396 0.68 0.0069 0.1661 1.9% 1.05O(1)
WMA(N=5) 0.1161 0.566 0.0057 0.1462 1.7% 0.93O(n)
ARIMA(5,1,1) 0.1278 0.622 0.0063 0.1556 2% 0.863O(n)
LMS(N=4, =1.2e-05) 0.146 0.7149 0.0072 0.1842 11% 5.57O(n)
NoPred 0 0 0 0 100% 50
this on a real-world deployment. While ARIMA models are very powerful to predict
a few samples of future data, they however, suer from performance losses when the
model (weights) become outdated, and are known not to follow ne grained changes
in the sensor readings (Santini and Romer, 2006). To be fair, since we are dealing
with WSNs, it becomes important to manage the resources eectively, especially with
respect to memory and computational cost. Hence, the Naive model is very suitable
for a variety of real-world applications without prior knowledge of the environment
characteristics.
Tables 6.2(a) and 6.2(b) show a summary performance of the models using the
Intel data source. Two error bounds are used, so we can verify how much accuracy we
lose from these changes. From these Tables, there are no signicant losses in accuracy
in this respect and the Naive model compares favorably with ARIMA, WMA, LMS
and NLMS. Using our previously dened cost metric, the Naive model has the lowest
PC. It is important to mention a vital point about the accuracy metric used; it is not
always advisable to use the MAPE accuracy measure, since it is based on percentage
errors, which have the disadvantage of being innite or undened if y
i
= 0 for any i
in the period of interest, and they have extreme values when any y
i
is close to zero.
Another problem with percentage errors that is often overlooked is that they assume
a meaningful zero. They also have the disadvantage that they put a heavier penalty
on positive errors than on negative errors (Hyndman and Athanasopoulos, 2012). Due
to this observation, a symmetric MAPE (sMAPE) is proposed in Armstrong (1985).
Hence, we have used the sMAPE instead. It is worth stressing that although energy
saving is at the cost of information accuracy, the deviation of predicted values from
136
actual values is bounded by the user dened error tolerance threshold. Therefore, once
the deviation is beyond users error tolerance, actual values will be transmitted; this is
the case for all the models we implemented.
Humidity dataset: NAIVE vs. ARIMA, WMA, LMS and NLMS
Similarly, we compare the performance of the Naive model with the ARIMA, WMA,
LMS and NLMS models using the humidity dataset from our in-house deployment.
Using the Hyndman-Khandakar algorithm to select among the various ARIMA models,
ARIMA(2,1,2) is the best for the data trace from node 1. ARIMA(1,1,1) is the best
for the data trace from node 2 and ARIMA(3,1,1) is the best for the data trace from
node 3. The ARIMA model parameters are given in Table 6.3. Recall, for the WMA
models the parameters are xed as discussed in Subsection 6.2.1.
Table 6.3: ARIMA model weights/parameters
ARIMA AR1 AR2 AR3 MA1 MA2
3,1,1 0.0702 0.2664 0.4051 0.3462 0
2,1,2 1.6408 -0.6687 0 -1.2387 0.5102
1,1,1 0.9480 0 0 -0.7236 0
Discussion of Results
The results achieved from the humidity dataset is in line with the experiments con-
ducted for the temperature datasets. The only dierence between these data traces
is that the humidity dataset exhibits higher variance than the temperature dataset,
hence it is reasonable to test the performance of all the prediction models to a higher
varying dataset. Tables 6.4(a), 6.4(b) and 6.4(c) show a summary performance of all
the models. From these Tables it can be seen that the performance are quite close for
the Naive, WMA and ARIMA models. There seem not to be a clear winner, however,
using the PC metric, the Naive model will be selected a majority of the time. Re-
call that the WMA and ARIMA models will still need to incur the 15% more energy
budget on top of the PC for the synchronization processes as discussed in Subsection
6.5.1. Similarly, according to our experiments the adaptive lters viz, LMS and NLMS
are outperformed by the Naive model. Although, the NLMS performed much better
than the LMS due to the better automatic selection of the learning rate, hence faster
convergence. Figures 6.10(a), 6.10(b) and 6.10(c) show results from some of the ex-
periments. The Naive, WMA and ARIMA models are tted on the data traces from
137
Table 6.4: Summary of performance of the predictive models: FP7
Humidity data source
(a) Node 1 at 0.2
o
C error bound
Models MAE RE sMAPE RMSE % transmission(r) PC with MAE
NAIVE 0.139 0.0044 0.44 0.163 21.5% 10.83
WMA(N=6) 0.117 0.0037 0.373 0.1415 21.7% 10.9
ARIMA(2,1,2) 0.103 0.0033 0.327 0.129 21.7% 10.9
LMS(N=6, =9.4e-06) 0.1373 0.0044 0.4355 0.1689 25.4% 12.8
NLMS(N=6) 0.14 0.0045 0.443 0.165 22.45% 11.29
NoPred 0 0 0 0 100% 50
(b) Node 2 at 0.2
o
C error bound
Models MAE RE sMAPE RMSE % transmission(r) PC with MAE
NAIVE 0.189 0.0046 0.458 0.2316 34.7% 17.45
WMA(N=6) 0.1683 0.0041 0.4082 0.2115 33.5% 16.88
ARIMA(1,1,1) 0.2315 0.0056 0.56 0.1188 51.6% 25.95
LMS(N=6, =4.6e-06) 0.238 0.0058 0.582 0.320 47.2% 23.7
NLMS(N=6) 0.181 0.0044 0.44 0.223 38.1% 19.18
NoPred 0 0 0 0 100% 50
(c) Node 3 at 0.2
o
C error bound
Models MAE RE sMAPE RMSE % transmission(r) PC with MAE
NAIVE 0.1321 0.0029 0.2512 0.194 22.04% 11.08
WMA(N=6) 0.1501 0.0033 0.3234 0.1924 27.14% 13.64
ARIMA(3,1,1) 0.1365 0.0030 0.293 0.187 24.3% 12.25
LMS(N=6, =3.7e-06) 0.229 0.0050 0.496 0.304 46.8% 23.5
NLMS(N=6) 0.161 0.0035 0.349 0.202 30.6% 15.39
NoPred 0 0 0 0 100% 50
138
0 50 100 150 200 250 300 350 400 450
28
29
30
31
32
33
34
35
Samples
H
u
m
i
d
i
t
y


Original data
Naive
WMA
ARIMA(2,1,2)
(a)
0 50 100 150 200 250 300 350 400 450
36
38
40
42
44
46
48
50
Samples
H
u
m
i
d
i
t
y


Original data
ARIMA(1,1,1)
Naive
WMA
(b)
0 50 100 150 200 250 300 350 400 450
38
40
42
44
46
48
50
52
54
Sample
H
u
m
i
d
i
t
y


Original data
ARIMA(3,1,1)
Naive
WMA
(c)
Figure 6.10: Simulation study, ARIMA, WMA and NAIVE predic-
tion: (a) Node 1 (b) Node 2 (c) Node 3
139
node 1, node 2 and node 3. These gures reveal how these models are adequate for
ambient monitoring application without loss in accuracy over a user specied error
limits. In conclusion, based on our experiments Naive model seem sucient for our
monitoring application. To have a conclusive evidence, in the next section we compare
the Naive model to other light-weight prediction models i.e., Exponential Smoothing
models often encountered in research literature.
0 50 100 150 200 250 300 350 400 450
27.4
27.5
27.6
27.7
27.8
27.9
28
28.1
Node 3 with lowest variance, e=0.1 at 10mins sample rate
samples
T
e
m
p
e
r
a
t
u
r
e

(
o
C
)


Original data
EWMA, N=6
SES, N=1
(a)
0 50 100 150 200 250 300 350 400 450
27.4
27.5
27.6
27.7
27.8
27.9
28
28.1
Node 3 with lowest variance, e=0.1 at 10mins sample rate
samples
T
e
m
p
e
r
a
t
u
r
e

(
o
C
)


Original data
Naive
MA, N=6
(b)
Figure 6.11: Simulation study, prediction models: (a) Fitting SES and
EWMA models to observed data (b) Fitting Naive and MA models
to observed data
6.4.4 Simulation Results: Naive vs Exponential Smoothing
Models
In this subsection we compare the performance of the Naive model with the exponential
smoothing models using the in-door temperature data and the humidity data from our
FP7 3ENCULT deployment.
The Naive model is compared with exponential smoothing models namely SES,
EWMA, ETS(A,Ad,N). In Figure 6.11(a) we show an example experiment from node 3.
140
0 50 100 150 200 250 300 350 400 450
26
27
28
29
Node 1 with moderate variance, e=0.2 at 10mins sample rate
T
e
m
p
e
r
a
t
u
r
e

(
o
C
)


0 50 100 150 200 250 300 350 400 450
26
27
28
29
samples


Original data Naive
Original data ETS(A,Ad,N)
(a)
Figure 6.12: Simulation study, prediction models: (a) Fitting Naive
and ETS(A,Ad,N) models to observed data
Most of the models performed very well because of the low variation in the data stream.
At rst glance, SES model looks the same as the Naive model, but a closer look at
the graph shows dierent gradients for the tted models on the observed phenomenon.
The summary of these performances is shown in Table 6.5(c). From this Table, SES
and EWMA models performed slightly better than the Naive and the ETS(A,Ad,N)
models, due to the very low variance of the observed phenomenon captured by node
3. We explain the phenomenon in a later Subsection 6.4.5, where we discuss the eect
of window sizes on the models. Although this eect can be seen in Table 6.5(b),
from node 2 data stream, the performance of SES, EWMA and ETS(A,Ad,N) are
the same even with dierent window lengths. However, when the variance in the
observed phenomenon is moderate the Naive model and the ETS(A,Ad,N) models
perform better. As shown in Table 6.5(a) and from Figure 6.12(a), the data stream
from node 1 reveals a moderate variance of the monitored environment. However, a
closer look at the graphs reveals a dierence in gradient and rate of convergence for
both models.
In general, all the models behave very close to the Naive model apart from the MA
model that performed poorly. For the temperature dataset, Table 6.5(a), 6.5(b) and
6.5(c) give the summary performance for all the selected models using our performance
indicators i.e., percentage transmission (r), dierent error metrics and the selection
criteria (recall Eq. (6.23) i.e., Prediction cost (PC)). Furthermore, we denote the
worst case model as NoPred i.e., the normal WSN operation without performing any
prediction. This helps to clearly see the lower and the upper bounds for our metrics.
Similarly, from the humidity dataset, a slightly dierent result is observed. The result
141
Table 6.5: Summary of performance of the predictive models: FP7
Temperature data source
(a) Node 1 at 0.2
o
C error bound
Models MAE MAPE RMSE % transmission(r) PC with MAE
NAIVE 0.1065 0.3818 0.1253 9.7% 4.9
MA 0.1532 0.5490 0.1731 28.5% 14.4
EWMA(N=6) 0.1005 0.3603 0.1210 10.18% 5.14
ETS(A,Ad,N) 0.1068 0.3828 0.1251 9.5% 4.7
SES(N=1) 0.1007 0.3609 0.1212 10% 5.15
NoPred 0 0 0 100% 50.0
(b) Node 2 at 0.2
o
C error bound
Models MAE MAPE RMSE % transmission(r) PC with MAE
NAIVE 0.150 0.473 0.1707 25.23% 12.69
MA 0.269 0.849 0.306 73.85% 36.7
EWMA(N=6) 0.145 0.457 0.167 27% 13.61
ETS(A,Ad,N) 0.145 0.457 0.166 27% 13.61
SES(N=1) 0.145 0.4579 0.1670 27% 13.61
(c) Node 3 at 0.1
o
C error bound
Models MAE MAPE RMSE % transmission(r) PC with MAE
NAIVE 0.0432 0.1559 0.054 4.4% 2.2
MA 0.0635 0.2287 0.0726 12.3% 6.18
EWMA(N=6) 0.0444 0.1601 0.0544 4.17% 2.11
ETS(A,Ad,N) 0.0441 0.1589 0.0542 4.6% 2.34
SES(N=1) 0.0415 0.1495 0.0517 3.9% 1.99
Table 6.6: Summary of performance of the predictive models: FP7
Humidity data source
(a) Node 1 at 0.2
o
C error bound
Models MAE RE sMAPE RMSE % transmission(r) PC with MAE
NAIVE 0.139 0.0044 0.44 0.163 21.5% 10.83
MA(N=6) 0.2638 0.0084 0.835 0.3177 59.9% 30.1
EWMA(N=6) 0.1356 0.0043 0.43 0.1611 24.07% 12.10
ETS(A,Ad,N) 0.159 0.0051 0.5060 0.184 23.37% 11.76
SES(N=1) 0.1422 0.0045 0.45 0.1644 23.6% 11.87
NoPred 0 0 0 0 100% 50
(b) Node 2 at 0.2
o
C error bound
Models MAE RE sMAPE RMSE % transmission(r) PC with MAE
NAIVE 0.189 0.0046 0.458 0.2316 34.7% 17.45
MA(N=6) 0.3817 0.0092 0.934 0.4734 72.9% 36.64
EWMA(N=6) 0.1815 0.0044 0.4405 0.2225 39.12% 19.65
ETS(A,Ad,N) 0.2194 0.0053 0.5352 0.2747 38.6% 19.43
SES(N=1) 0.1859 0.0045 0.451 0.2254 39.12% 19.65
NoPred 0 0 0 0 100% 50
(c) Node 3 at 0.2
o
C error bound
Models MAE RE sMAPE RMSE % transmission(r) PC with MAE
NAIVE 0.1321 0.0029 0.2512 0.194 22.04% 11.08
MA(N=6) 0.3356 0.0073 0.7197 0.4228 71.4% 35.89
EWMA(N=6) 0.1657 0.0036 0.358 0.2079 30.16% 15.16
ETS(A,Ad,N) 0.1972 0.0043 0.4240 0.2682 30.16% 15.17
SES(N=1) 0.1725 0.0038 0.372 0.2238 31.55% 15.86
NoPred 0 0 0 0 100% 50
142
Figure 6.13: Humidity Dataset: Summary model performance at less
than 1% error bound
is shown in Tables 6.6(a), 6.6(b) and 6.6(c), from these Tables it seems the Naive model
outperformed all the exponential smoothing models in the presence of higher variance
in the data traces. These evidence looks conclusive that a Naive model is invariable
robust on our monitoring application viz, intelligent and control monitoring solution
for heritage buildings. To summarize this performance we plot PC for all the models
discussed in this chapter as shown in Figure 6.13. From this gure it can be seen that
all the xed weighted models such as, the WMA and the exponential smoothing (ETS)
models behave very close to the Naive model, and represent good candidate models.
Driven by the performance of the Naive model which utilizes N = 1 and = 1,
we adapted the ETS model to use similar characteristics by adaptively updating the
weights i.e., , , , which are calculated by minimizing the SSE with N = 2 window
size. This method proves to generate near optimal performance similar to the Naive
model. Overall, our selection criteria will on average choose the Naive model over the
other models. However, it is important to state that this choice depends strictly on
the application scenario and the proper pre-evaluation of the intended environment to
be monitored. From our studies the Naive model is suitable for Building monitoring
applications like ours and to any data trace that exhibits similar behavior, and it can
be particularly suitable for environments where there is no pre-existing knowledge or
to applications where the energy budget is tight.
In addition, the Naive model can be coupled with the complex models such as in
a case where the monitored environment exhibits fast-changing high variances (maybe
a chaotic system) and where the application is not tight on energy budget. In this
instance, the Naive model can still be utilized for the initial data gathering phase by
143
the nodes. This will allow us to build more complex models for the future prediction,
since it will still outperform the NoPred. Another advantage of the Naive model is that
it is easy to implement practically on real sensor nodes at no additional computational
cost. We would like to also mention here that there are other specic applications
where the Naive model will always be desirable. For example, in a wildre monitoring
application it would be dicult or counter-productive to build a complex model for the
physical system since a re disaster in period A will exhibit dierent behavior such as
duration and intensity of burn compared with a re disaster in period B. Consequently,
gathering datasets to build a complex model would amount to delays that can results
to loss of lives and properties worth millions. We examine such applications in Chapter
7, where we present some of our on-going work in this direction and we show how a
Naive prediction can be useful to such scenario.
6.4.5 Eect of History Window on Models
In this subsection we show experimentally the eect of the history window i.e., buer
size (N), on the performance of the models without using a model selection approach
such as a racing algorithm used in Le Borgne et al. (2007). The aim is to test the
performance of the models implemented on a sensor node using variable window sizes
and to observe this eect. For example, in Figure 6.14 both MA and EWMA models
1 2 3 4 5 6
0
10
20
30
Node 1 with moderate variance, e=0.2 at 10mins sample rate
Window size (N)
%
T
r
a
n
s
m
i
s
s
i
o
n



1 2 3 4 5 6
0.1
0.12
0.14
0.16
Window size (N)
M
A
E

e
r
r
o
r


MA model
EWMA model
MA model
EWMA model
Figure 6.14: Eect of window size on MA and EWMA models: Per-
centage Transmission vs window size(N) and Accuracy (MAE) vs win-
dow size(N)
are used to demonstrate this eect. From this gure, the MA model performance in
terms of accuracy and energy savings reduces as N increases. Recall that a lower
percentage transmission r, favors energy savings on the sensor nodes. The explanation
for the poor performance of MA model as N increases is obvious; since equal weights
144
are given to all the past N, with large N we have to keep all previous readings in the
memory until they are nally removed from the average even when the sensed value
deviates from
max
. This makes the model slow to converge to the monitored event. A
dierent behavior is seen with the EWMA model; the change in N does not necessarily
improve the performance. This is because if is large (i.e., close to 1), more weight is
given to the more recent observations, and this yields better performance than small
. This further explains the optimality of the Naive model as it converges very fast
to the changing environment since is automatically chosen to be 1. Based on our
application scenario, a model that can use small N will eventually turn out to be close to
our benchmark Naive model. With this knowledge in mind, we trained predictors such
as ETS(A,Ad,N) using N = 2, and all smoothing parameters are computed adaptively
on the sensor node. It is worth mentioning that similar results to this were obtained
in Santini and Romer (2006) and Tulone and Madden (2006) while using LMS and AR
models for WSN prediction respectively.
6.5 Real-world Testbed-based Evaluation
The real-world implementation of our algorithm design is carried-out in order to verify
our model build-up process used in the simulation study. In addition, it provides the
proof of concept and the evidence that it is possible to deploy our algorithm design on
large-scale real-world applications and on the existing o-the shelf node platforms. Sim-
ilarly, it provides a dierent approach that deviates from simulation methods normally
used in existing studies that applied prediction method to data reduction problems
in WSNs. Finally, the real-world deployment provides us with new understanding of
the research problem on forecasting models employed in WSNs and hence, it provides
substantial evidence for the claims of previous studies done in this area.
6.5.1 Setup and Deployment
The real-world implementation is quite dierent from the simulation scenario. The
models are programmed on the Wispes W24TH node-type described in Chapter 5.
To recap, such node-type is based on Jennic microprocessor, one of the few 32-bit
architectures available on the market with a power consumption comparable to a
TelosB. It is equipped with 128KB RAM, 512KB FLASH with 2.4Ghz radio transceiver
(IEEE802.15.4 compliant) and Zigbee Pro compliant. It uses an aggressive power man-
agement method using 8A in sleep mode, 17mA in transmit mode and 23mA in receive
145
mode, this guarantees a longer battery lifetime. The W24TH nodes are equipped with
on-board sensors Temperature (0.01
o
C resolution; -40 to +90
o
C. range), Humidity
(0.04
o
C resolution; 0 to 100%rh range), Light sensor (0.23 lx resolution; 0 to 100,000lx
range), 3-axis accelerometer (1mg resolution; 0 to 6g) and MOX Gas sensor interface
(10% resolution). There is also a possibility for energy scavenging connectivity to solar
cell, vibration and wind generators. The details of our deployment scenario and the
stack architecture were presented in Chapter 5. However, in order to be able to imple-
ment the prediction algorithm, we develop a monitoring application using a simplied
state machine. This way our algorithm design can work perfectly with the architectural
design.
Similar to the simulation scenario, the prediction algorithm uses two features i.e.
temperature and humidity. The temperature data was collected between 1-Oct-2012 to
14-Oct-2012 with sampling intervals between 10 seconds to 5 minutes for the real-world
implementation of the prediction models. These data traces have similar characteristics
to the data traces used for the simulation. Hence, the duration of our implementation
is enough to test the practicability of the models on the real node platforms. Also, the
data traces collected outside these dates from the nodes exhibit similar behaviors. We
implemented Naive, WMA and ARIMA models on 15 Wispes W24TH nodes using a
star topology and we report the performances in the next sections. It should be noted
that this work has addressed some of the practical implementation concerns raised in
Le Borgne et al. (2007), Liu et al. (2005), Santini and Romer (2006) and Yang et al.
(2011).
We implemented a FIFO data structure at both the Sink and source (leaf) nodes.
We minimize all the assumptions often made with simulation study, such as the model
update between the Sink and source nodes are synchronized. One of the dangers of
unsynchronized communication between the transmitting node and the receiving node
is that the prediction at the receiver might be very slow to adapt to the changes
in the real-time phenomenon and this could result in serious aws in the entire WSN
deployment. Similarly, synchronization requires that at a given time instance, both the
transmitter and receiver must be in the same mode. Thus, any error or mistiming leads
to failure of the model. Hence, it is necessary to ensure synchronization between the
communicating nodes. To solve this problem, upon power-up the source nodes transmit
data to the Sink node for the full length of the history table without performing any
predictions; in our case we use a window size of ve. After ve data are transmitted,
both the Sink node and the source nodes start prediction with a predictive model; the
146
Algorithm 3 Pseudocode for source (leaf) node: real-world implementation
1: Call Task START
2: Initialize parameters
3: Call Task sense
(data)
4: Call Task Transmit
5: Count++
6: Call Task Sleep
7: Repeat every sample interval [
8: if Count > SizeofHistorytable then
9: Call predictive model
10: if [ prediction sense
(data)
[ > error bound then
11: Call Task Transmit
12: Update history table with sense
(data)
13: Call Task Sleep
14: end if
15: else
16: Update the history table with prediction
17: Discard sense
(data)
18: Call Task Sleep
19: end if
20: ]
Algorithm 4 Pseudocode for Sink node: real-world implementation
1: Call Task START
2: Initialize parameters
3: Wait to receive sense
(data)
from leaf nodes
4: if sense
(data)
is received
5: Count++
6: Repeat every sample interval [
7: if Count < SizeofHistorytable then
8: Update history table with sense
(data)
received
9: else if Count SizeofHistorytable then
10: Update history table with sense
(data)
11: else
12: Call predictive model
13: Update the history table with prediction
14: end if
15: ]
147
Figure 6.15: State machine
Sinks prediction interval is equivalent to the leafs sampling intervals. The prediction
and updates are done on-line.
To ensure synchronization, the Sink node keeps a structure for all the leaf nodes
that join the network with their IDs and then it runs the prediction model at the
specied time stamps e.g., every 10 seconds or 10 minutes depending on the sampling
interval; hence, the same sampling interval must be specied for both the Sink and
source nodes. The Sink node scans through all the leaf nodes and performs updates
on the current data. Next the Sink node creates a TDMA schedule and broadcasts
the service-packets for the next round of data collection, as we already explained in
Chapter 5. If there is a deviation greater than
max
and data is received from any
of the leaf nodes, it updates the history table with the data received. The algorithm
that runs at the source nodes and at the Sink node are labeled as Algorithm 3 and
Algorithm 4 respectively. From Algorithm 4, at the Sink node we only capture the
stage where all source (leaf) nodes have already joined the network. From Line 7, until
the history table is full no prediction is done. Whenever the Sink node receives data
from the source nodes, it automatically updates the history table (buer) with the
received data. Similarly, at the source node after all parameters are initialized, the
sensing task starts on Line 3 in Algorithm 3 and the source node transmits all data
until the history table is full. This ensures the same data stream is available at the
Sink and source nodes. As long as the error bound is not violated, the sensed data is
148
discarded and the predicted value is used to update the history table. This way the
Sink and the source nodes will have the same history table at all time. Lines 6 and 7
are repeated every sampling interval at the Sink and source nodes respectively.
Table 6.7: Summary of the energy consumption for one cycle of the
state machine
SAMPLE RATE NO TRANSMISSION (mJ) TRANSMISSION (mJ)
10 secs 8.184 27.894
1 min 9.5 29.21
10 mins 23.72 43.43
We implement a simplied state machine for each leaf node depicted in Figure 6.15.
In this gure, the blue line depicts the path that is more energy ecient and the red line
shows the expensive path. Basically, we would like to avoid transmission where possible
and instead perform more prediction as long as we are within the user specied error
bound. Table 6.7 captures the total energy consumed in running this state machine for
dierent sampling rates for one cycle. To summarize, from our experiment, 1 packet
transmission suppressed is equivalent to approximately 13 minutes of added life-time
for each node. This result revealed that it is benecial to run the prediction models on
our WSN deployment.
Here we present a recap of our implementation stack on the NXP Jennic plat-
form
9
. To avoid collisions in the network, a non-persistent carrier sense multiple access
(CSMA) MAC protocol is used in our stack architecture. A TDMA-like access scheme
is implemented, at the beginning of the set-up, each node joins the network at slightly
dierent times. This dierence in time further reduces the probability of collision since
the nodes timings to access the medium will have dierent time stamps. A star topol-
ogy is used as depicted in Figure 6.4, where each node continuously delivers streams of
sensor data to the Sink. Meaning, intra-cluster interference is limited and the cost of
receiving ACK packets from the Sink node is minimized. Hence, all nodes have their
transceivers in OFF mode most of the time except when they have packets to transmit.
Equally, our prediction model design can easily be implemented on both clustered and
tree topologies.
In order to ensure the Sink node is not out of synchronization for ARIMA and
WMA models, the leaf nodes send their entire history table after every specied time
stamp, e.g., every hour the source nodes might be required to send their entire data
stream to the Sink node. This is a special case for the implementation of both ARIMA
9
http://www.jennic.com/index.php
149
and WMA models. This is not required by the Naive model, since it uses just one last
past value for prediction. For example, if we are to carry-out a one-hour data collection
round with 1 minute sampling interval at a user specied
max
: assuming there is no
signicant change in the observed phenomenon beyond
max
, using the energy reference
in Table 6.7, for the normal operation of the network, the energy consumption for this
period would be 29.21 60 (transmitted samples), which is 1752.2mJ. With Naive
model this will be 9.5 60 (i.e time), which is 570mJ and for n=5 using ARIMA
or WMA model the consumption will be 5 29.21 + 9.5 55 (i.e un-transmitted
sample), which is 668.55mJ. This results to approximately 15% more energy usage by
WMA and ARIMA to complete the same cycle on top of the PC cost. To recap, our
goal is to nd a light-weight prediction model for our intelligent and control system
for building monitoring application that will minimize the overall energy-cost that is
normally associated with WSN deployments. We further aim to analyze and compare
the dierent models with respect to how much energy saving is achieved by avoiding
transmissions if the sink node can predict the sensed data at the leaf nodes within a
user specied error bound e
max
which is known by both the Sink and source nodes.
In this case we use between 0 to 0.5
o
C i.e. with less than 2% error bound for the
experiments, which is in the range used by the building engineers we interacted with.
In the next subsection, both the simulation results and the real-world testbed results
are presented.
6.5.2 Testbed Results
All the simulation results are promising for the Naive model, hence we embarked on
a real-world implementation to test the practicability of some of the models discussed
earlier. The results from the real-world implementation proves to be quite promising;
the data from hours of sampling reveals how much temporal correlation exists in an
ambient monitoring dataset such as our deployment. We report the results from the
implementation of the Naive, WMA and ARIMA prediction models on the sensor
nodes. For the sake of completeness, we used dierent sampling rates and user error
bounds to assess the model performance. For example, in Figure 6.16 we show the
Naive prediction performance. Subgure 6.16(a) depicts the overlapping plot with
sensed data. About 95% transmission reduction is achieved for the four hours data
collection round. From this gure, the Sink is able to predict the sensed data at the
source node with a very high degree of accuracy; both lines in the gure are quite close.
Subgure 6.16(b) shows the prediction error of the dataset; the mark highlights
150
0 500 1000 1500
24
24.5
25
25.5
26
26.5
4hrs data collection at 10 secs. sampling with 0.02 error
samples
T
e
m
p
e
r
a
t
u
r
e
(
D
e
g
.

C
e
l
s
i
u
s
)


Sensed Data
Sink Prediction
(a)
(b)
Figure 6.16: Real-world testbed-Naive prediction: (a) Prediction at
sink and sensed data at node (b) prediction error
151
some of the readings that exceeded the error bound of 0.02
o
C, and hence are reported
to the Sink. The behavior of the Naive prediction model is expected because the sample
interval (10 seconds) is quite small and the Sink node is able to adapt very well to the
small changes in the data and since the correlation in the dataset is quite high during
this period, the prediction remains stable. We expect the behavior to be close to the
simulation scenario if the sample interval is increased accordingly as shown in subgure
6.17(a).
Table 6.8: Summary of performance of the predictive models: Real-
world deployment
(a) 0.3
o
C error bound at 2mins. sampling interval
Models MAE sMAPE MAPE RMSE % transmission PC with MAE
Naive 0.1353 0.6153 0.1874 0.1656 5% 2.567
WMA 0.1296 0.6323 0.3529 0.1603 6% 3.064
ARIMA(5,1,1) 0.1301 0.7179 0.0453 0.1559 6% 3.065
(b) 0.3
o
C error bound at 5mins. sampling interval
Models MAE sMAPE MAPE RMSE % transmission PC with MAE
Naive 0.1453 0.6931 0.1553 0.1780 7% 3.572
WMA 0.1375 0.7146 0.0872 0.1714 8% 4.068
ARIMA(5,1,1) 0.1545 0.8456 0.0279 0.1863 11% 5.577
Tables 6.8(a) and 6.8(b) show the performance of the Naive, WMA and ARIMA
models for dierent sampling intervals. The percentage transmission and PC are much
better for the Naive model, and the change in accuracy by reducing the sampling inter-
val is not signicant. This highlights the concerns often associated with oversampling
of temperature data when deploying WSNs. For instance with a Building temperature
monitoring application, it will be more energy-ecient to reduce the sampling interval,
because keeping the nodes i.e., radio in an ON mode to sample and transmit data at
frequent intervals, could also result into huge energy usage across the entire lifetime
of the deployment as already shown in Table 6.7 (Subsection 6.5.1). Thus, a well con-
trolled sampling interval can signicantly reduce the energy consumption in a WSN
deployment. A study on an application-specic deployment to test dierent sampling
intervals in order to nd an optimal sampling rate could be an interesting research
direction to pursue. Hence, we leave this as an open research issue for future work.
Continuing with our analysis, Figure 6.17 shows a real-world performance for both the
Naive and WMA models. Subgure 6.17(b) shows the absolute value of the prediction
error for the Naive model; the on the graph depicts when the error bound is violated
and there is transmission, thus, the model is updated with the current sensed value;
in some instances it resets to less than
max
when there is no huge dierence between
the next sensed value until it is violated and the spike goes above
max
. About 95%
152
(a)
(b)
0 100 200 300 400 500 600 700
16
18
20
22
24
22hrs data collection at 2mins sampling with 0.3 deg. error bound
samples
T
e
m
p
e
r
a
t
u
r
e
(
D
e
g
.

C
e
l
s
i
u
s
)


Sensed data
Siink prediction
(c)
Figure 6.17: Real-world testbed: (a) Naive prediction, (b) Naive pre-
diction error (Absolute value) (c) WMA prediction
153
transmission is suppressed and the accuracy is much better than the WMA as shown
in Table 6.8(a).
Subgures 6.17(a) and 6.17(c) depict example experiments from our real-world de-
ployment by tting both the Naive and WMA models to the observed data. In some
cases the WMA model behaves like the Naive model in the sense that when there is a
slow change in the phenomenon being sensed, the WMA model converges to the Naive
Model; this can be seen in Figure 6.17(c), the curve dropping gradually like a staircase.
This is the reason why Naive model could be dicult to beat for predictions of some
phenomena. Overall, the Naive model is quite robust in this instance compared with
both ARIMA and WMA models in terms of memory print, computational cost, energy
consumption and accuracy. Our real-world implementation supports the simulation
analysis we highlighted in previous sections. This clearly demonstrates the practica-
bility of using the Naive model, known to be simple and very light-weight to conserve
network resources on energy-constrained WSNs in a building temperature monitoring
application.
6.6 Summary
In this chapter the three main data reduction strategies are discussed. Particularly,
this chapter addressed the problem of energy consumption in WSNs by utilizing one of
the data reduction strategies i.e., prediction. This was aimed at prolonging the lifetime
of a WSN deployment by using adaptive light-weight models to minimize the energy
consumption in WSNs. Furthermore, a comparative study on light-weight prediction
models such as the Naive, ARIMA, WMA, ETS, EWMA, MA, LMS and NLMS for
an application-specic WSN monitoring is presented. The study revealed the benets
of using a simple but yet powerful Naive prediction model over these other models
for an ambient intelligent and control monitoring application. Furthermore, based on
the characteristics of the Naive model, which proved to signicantly enhance network
lifetime with little computation and memory footprint, an ETS(A,Ad,N) model is
adopted. Overall, the result is promising for both the Naive and ETS(A,Ad,N) models
that is evisioned for on large-scale real-world deployment that can span into years.
Results from both simulation and real-word deployment testbed are presented. The
experience from these experiments points to the fact that light-weight models such as
a Naive model are generally suitable for some linearly evolving phenomena, such as the
monitoring scenario of historic buildings, without losing much accuracy.
154
Although simple methods could be by-passed due to the attraction towards more
complex models, however, in this study we have demonstrated that for a monitoring
processes such as, a building monitoring application, a simple Naive model and an ETS
model with additive damped trends are attractive choices when compared with complex
models such as, ARIMA etc. The Naive model incurs virtually no computational cost
with minimum memory footprint on the sensor nodes. In order to further verify if
there is a signicant gain in performance over the Naive model when using smoothing
parameters and longer window sizes, other methods were implemented. The results
indicate that using a history window does not necessarily improve energy consumption
rather it could add to the overhead. This justies the performance of the Naive model
for the WSN monitoring application used. To sum up, on average about 96% energy
savings within the user dened error bound of less than 2% is achieved. The analytical
and simulations results are well supported by the results obtained from the testbed
experiments.
In conclusion, this study reveals that the network lifetime of a WSN deployment
can be signicantly prolonged by using simple and yet powerful models such as the
Naive and ETS(A,Ad,N) models. These algorithm design incurs minimal cost and
require no prior existing knowledge of the monitoring phenomenon. Hence, they are
easily scalable and can practically be implemented for very large deployments that are
envisaged to span into decades with little or no human intervention. An extension of
the study in this chapter is presented in the next chapter.
155
Chapter 7
Combining Data-Driven Strategies
for an Improved Network Lifetime
in WSNs
In recent years wireless sensor networks are continuously gaining attention particularly
due to their increasing capabilities to sense, store, process and communicate informa-
tion at low cost. For example, sensor nodes such as W24TH from WISPES
1
and the
TelosB from Crossbow
2
, and the software platforms from TinyOs
3
and NXP Jennic
4
have facilitated the building of real-world testbeds both for convenient testing and in
the evaluation of various application scenarios. The demand for the use of WSNs for
applications such as health, habitat, seismic and wildre monitoring has driven the
growth of WSNs over the years especially due to the new era of Internet-of-Things
(IoT). We can expect that the use of WSNs in these elds will grow dramatically in
the coming years.
In the past, various data-driven strategies have been proposed to optimize the
energy consumption in WSNs. Recall from Chapter 2, about the taxonomy of the
data-driven approaches shown in Figure 7.1. The majority of the previous studies in
this domain are concentrated on the distinct methods of data reduction strategies and
energy-ecient data acquisition methods such as: 1) Data compression schemes: e.g.,
Madden, Franklin, Hellerstein, and Hong (2002); Sadler and Martonosi (2006); Caione
et al. (2010); Min et al. (2012); Li and Qi (2013); 2) In-network processing: e.g., Madden
and Franklin (2002); Yao and Gehrke (2002, 2003); Gehrke and Madden (2004); Liggins
et al. (2008); Malhotra et al. (2011); 3) Data prediction: e.g., Liu et al. (2005); Tulone
1
www.wispes.com
2
www.xbow.com
3
http://www.tinyos.net/
4
http://www.jennic.com/index.php
156
and Madden (2006); Santini and Romer (2006); Raza et al. (2012), Aderohunmu, Paci,
Brunelli, Deng, Benini, and Purvis (2013a) and 4) Adaptive sampling: e.g., Marbini
and Sacks (2003); Jain et al. (2004); Willett et al. (2004); Alippi et al. (2007) etc.
However, none of these studies provides a holistic method that combines data reduction
method with energy-ecient data acquisition schemes.
Figure 7.1: Data reduction strategies
Limiting energy consumption is one of the primary aims for most real-world deploy-
ments of wireless sensor networks. Unfortunately, energy eciency is often in conict
with the demand for network reactiveness for alarms and urgent messages. In this
Chapter, we propose SWIFTNET: a fast-reactive data acquisition scheme. SWIFT-
NET is built on the synergies arising from a combination of the data reduction methods
and the energy-ecient data acquisition schemes. Particularly, SWIFTNET combines
compressed sensing, data prediction and adaptive sampling depicted with the red oval
in Figure 7.1. We show how this approach dramatically reduces the amount of com-
munication required to monitor the sensor readings in environmental monitoring and
surveillance networks. We present a wildre monitoring application that requires high
reactiveness with continuous data updates of the monitoring process and we show how
SWIFTNET can be used for such an application. One advantage from such integration
is that it exploits a complete knowledge about the application characteristics to make
data collection more energy ecient.
To test the performance of this method, we present a real-world testbed for a wild-
re monitoring application as a case study. The results from our in-house deployment
testbed have proven to be favorable. On average over 50% communication reduction
is achieved without loss in accuracy over a default adaptive prediction method. In
157
addition, SWIFTNET is able to guarantee reactiveness by adjusting the sampling in-
terval from 5 minutes up to 15 seconds in our application (Aderohunmu, Paci, Benini,
Deng, and Brunelli, 2013). To summarize, the contribution of this work is as follows:
1) We propose a data acquisition scheme for a fast-reactive network that combines
compressed sensing and prediction algorithms; 2) We introduce an adaptive sampling
technique with a feedback from the monitored event; 3) We describe a complete imple-
mentation of SWIFTNET on W24TH nodes (a commercial o-the-shelf node) that uses
the 32-bit Jennic platform; 4) We describe a testbed that demonstrates the ecacy of
SWIFTNET in a wildre monitoring application.
This chapter presents an extension to the work we conducted in Chapter 6, and
the majority of the experiments presented in this chapter are limited to our in-house
real-world deployment testbed conducted using few sensor nodes to test the practica-
bility of our approach. We envision that this work can be pursued further and hence
deployed for other application scenarios with hundreds of sensor nodes. The goal of
this approach is to reduce energy consumption by limiting the data transmission with-
out necessarily jeopardizing the monitored events in the case of fast-changes in the
monitored environment.
7.1 Background
Previous works have proposed the use of wireless sensor networks as a solution to
wildre monitoring scenarios. For example, Sha et al. (2006) proposed FireNet, a WSN
architecture for re rescue application. The work addresses some requirements and
challenges for wildre application. Similarly, in Li et al. (2006), the authors described
a framework that included the system architecture, hardware and software designs.
Although, the work provides an insight on the necessary requirements for wildre
monitoring, it did not oer the framework implementation.
Also Doolin and Sitar (2005) proposed a design for wildre monitoring using wireless
sensor networks. They back their approach with eld testing prescribed as test burns.
The majority of their test is focused on how the sensor node is able to cope with high
temperature degrees without losing much of the sensed data. Hartung et al. (2006)
proposed FireWxNet, a multi-tiered portable wireless system for monitoring weather
conditions in a wild-land re. All these works focus on framework and deployment
architectures of WSN. They do not address the data acquisition protocol that runs on
the sensor node devices.
158
Due to the energy spent in receiving and forwarding data, advanced hardware and
software solutions have been proposed recently. From the hardware point of view,
energy neutral designs have been increasing in the development of WSNs, such as in
Brunelli et al. (2008) and Dondi et al. (2008), while from the software point of view, an
application-specic approach is proposed in Zhou and De Roure (2007). Their method
combines adaptive sampling and an energy-aware routing strategy for a ood warning
system called FloodNet.
A survey on energy conservation in WSNs was carried out by Anastasi et al. (2009).
The study highlighted various design methods and the state-of-the-art techniques em-
ployed in this domain. Similarly, in recent literature Wu and Liu (2012) proposed the
use of compressed sensing with a scheduling approach. They used compressed sensing
with measurement scheduling and estimation on in-situ soil moisture sensing. Their
work focused on the selection of two matrices, namely, the measurement matrix and a
representation basis; this is due to the nature of their application and the need to satisfy
the physical constraint associated with soil moisture sensing. Also Shen et al. (2013)
proposed a non-uniform compressed sensing (NCS) method that exploits compressibil-
ity and heterogeneity for an improved performance. Their approach is compared with
the traditional CS using a rain-forest application that monitors wind speed and direc-
tion. Although these works addressed the problem of how to apply CS to soil moisture
processes and NCS to rain forest restoration processes in a non-real-time fashion, this
is dierent from our work. Indeed, given any averagely sparse signal with reconstruc-
tion matrices, we are interested in designing a real-time data acquisition scheme that
allows fast-detection of interesting events. This requires each node to sample data
autonomously depending on how fast the signal is changing, while keeping energy con-
sumption low in the entire network. Consequently, to achieve this goal, our method
uses a combination of CS, prediction and adaptive sampling.
Similarly, a more recent study by Alippi et al. (2010) used an adaptive sampling
technique for a snow monitoring application. Their work revealed improvements on
energy consumption compared with a xed-rate sampling method. However, their
approach is computationally intensive. In addition, the algorithm is executed at the
sink for each sensor node, hence centralized. Sending frequent updates to several nodes
in a lossy medium could be counter-productive. Moreover, their work focused on how
to reduce oversampling in their application scenario and in some instances the nodes
are switched o. This is dierent from our work, where the nodes are autonomous
and where the goal is to achieve a continuous sampling while limiting unnecessary
159
communication without jeopardizing useful events in the monitored environment.
In a nutshell, we focus on the implementation of the software architecture that runs
on the sensor nodes particularly designed to meet the requirements of a fast-reactive
network. In addition, our algorithm design can also be useful to any application that
requires fast-responsiveness together with a low data communication without neces-
sarily missing any useful event throughout the monitoring operations. Furthermore,
our approach can be implemented together with any of the frameworks described in
Li et al. (2006) and Sha et al. (2006). For the purpose of experiments and due to the
ease of testing our method, we present a wildre monitoring application as a use-case.
We believe our design approach can easily be extended to other similar event-based
application scenarios.
7.2 SWIFTNET: A Data Acquisition Protocol for
a Fast-reactive Wireless Sensor Network Mon-
itoring Application
SWIFTNET is an algorithm that combines two well-known algorithms, that is, a com-
pressed sensing algorithm and a prediction algorithm together with an adaptive sam-
pling strategy that is designed to achieve fast-reactiveness and a prolonged network
lifetime for WSNs. To meet the need for an adaptive sampling strategy, we devi-
ate from the traditional prediction approach with xed sampling rate. Instead we
make the prediction algorithm to be adaptive, hence able to adjust the sampling rate
depending on the incoming sensed data. With respect to the wildre monitoring ap-
plication, SWIFTNET is able to react quickly to high temperatures, can adaptively
adjust the sampling rate depending on the monitored environment, oers a measure for
false alarms, limits the unnecessary data transmission and yet provides high accurate
reconstruction of signals. In particular, a wildre monitoring application scenario is
presented using SWIFTNET as the data acquisition scheme. In the next subsection,
the theory that underlies the SWIFTNET design is discussed in detail.
7.2.1 Compressed Sensing
The basic theory of CS emerged in the works of Donoho (2006) and Candes et al.
(2006). CS is a simple and yet an ecient data acquisition paradigm. Precisely, CS
exploits the fact that many natural signals are sparse in the sense that they can be
compressed as long as they can be represented in their proper basis . CS is governed
160
by two principles i.e., sparsity and incoherence.
Sparsity suggests that the information rate of a continuous signal may be smaller
than its bandwidth. On the other hand, incoherency as explained in Candes and Wakin
(2008), extends the duality between time and frequency and therefore it expresses
that idea that objects having a sparse representation in must be spread out in the
domain in which they are acquired. Thus, with this knowledge, it is possible to design
an algorithm or sensing protocol that captures useful events that are contained in a
sparse signal and then compress it into a smaller amount of data before transmission.
It is on these premises that we argue to use CS in combination with other strategies
as a data acquisition scheme for a surveillance application. Let us consider a discrete-
time signal x, viewed as a column N 1 vector in a R
n
domain. The signal can be
represented in terms of a basis of N1 vectors
N
i=1
. For simplicity sparsity oers that
many natural signals can have a concise representation when expressed in a convenient
basis. Mathematically, the vector x R
n
can be expanded in an orthonormal basis
such as DCT or wavelet given as:
x(t) =
N

i=1
y
i

i
(t), (7.1)
where y is a coecient of x in the domain y
i
=[x,
i
]. Similarly, can be expressed as
an N N matrix with [
1

2
...
N
] as columns. The implication is that when a signal
has a sparse expansion, one can discard the small coecients without much perceptual
loss (Donoho, 2006). Generally, any basis can be formed without assuming a prior
knowledge of the signal, apart from the size, since the size determines the size of the
measurement matrix .
The theory of CS demonstrates that a signal can be compressed using a proper
measurement matrix = [
1
,
2
, ...,
N
] of size M N, with M < N. Having said
this, we are interested in under-sampled situations where the number of measurements
M available are much smaller than the dimension N of a signal y. Assuming y is the
compressed form of f, then the matrix form is given as:
y = f, (7.2)
where y is an M 1 column vector. The recovery process of the original signal f can
be achieved through optimization. According to Candes and Wakin (2008), suppose
a given pair of orthobases of R
n
given as (, ), where is used for the sensing
phenomenon and is used to represent x, then the coherence between the sensing
161
basis and the representation basis can be expressed as:
(, ) =

N max
1k,jN
[
k
,
j
[ (7.3)
Hence, if and contain correlated elements, we say the coherence is large. It follows
that the smaller the coherency, the better the reconstruction would be. From linear
algebra, the upper and lower limit is bounded as (, ) [1,

n] (Candes and Wakin,


2008).
Recovering sparse signal
In general there are the following classes of sparse signal recovering methods. The rst
class solves

b with the smallest l
0
norm:
min

bR
n
_
_
_

b
_
_
_
l
0
subject to y
k
=

b, (7.4)
Solving Eq. (7.4) above is intractable (Candes and Tao, 2005). There are other faster
algorithms designed to solve this set of problem using the smoothed l
0
norm, e.g.
SL0 method proposed by Mohimani et al. (2009). Their experimental results revealed
that the proposed algorithm is about two to three orders of magnitude faster than
the state-of-the-art interior-point linear programming (LP) solvers such as the Basis
Pursuit (BP) (Chen et al., 1998), (Candes and Romberg, 2005).
The second class seeks to solve the l
1
-minimization problem (also known as the Ba-
sis Pursuit problem) through linear programming. Apart from the LP solution, other
methods exist such as the Iterative Re-weighted Least Squares (IRWL) (Gorodnitsky
and Rao, 1997), Orthogonal Matching Pursuit (OMP) (Tropp et al., 2007), Regular-
ized Orthogonal Matching Pursuit (ROMP) (Needell and Vershynin, 2010). They are
considered faster than LP but with worse estimation quality, especially if the signal
is not suciently sparse (Wu and Liu, 2012). For example using the second class ap-
proach, the result from Donoho (2006) asserts that if x is suciently sparse, recovery
via l
1
-minimization is possible. Normally, we would like to sample all the n coecients
of x, however, we can only get to sample a subset of these, such that, we can recover
the data through Eq. (7.5) given below:
y
k
= x,
k
, k M, (7.5)
here M 1,..., n is a cardinality constraint M < n. Thus the reconstruction of x
is either through a greedy algorithm as proposed in Tropp et al. (2007) or using l
1
-
norm minimization. The proposed reconstruction of x through l
1
-norm minimization
162
is given by x

= b

, where b

is the solution to the convex optimization problem


(|b|
l
1
:=

i
[b
i
[) (Candes and Wakin, 2008):
min

bR
n
_
_
_

b
_
_
_
l
1
subject to y
k
=
_

k
,

b
_
, k M (7.6)
From Eq. (7.6), minimizing l
1
subject to linear equality constraints can be solved using
linear programming. Hence the following theorem follows:
THEOREM 1 (Candes and Romberg, 2007)
Fix x R
n
and suppose that the coecient sequence b of x in the basis is K-sparse.
Select m measurements in the domain uniformly at random. Then if,
m C
2
(, ) K logn (7.7)
for some positive constant C, the solution to (7.7) is exact with overwhelming prob-
ability (Candes and Wakin, 2008), see proof of Theorem 1 in (Candes and Romberg,
2007). With the concept of sparsity and incoherency in mind, the problem of CS is
therefore reduced to: 1) Finding a stable measurement matrix such that the im-
portant information embedded in any K-sparse signal can be recovered easily and 2)
Finding an algorithm that can recover the x from any m K measurements. It follows
that:
No information is lost by measuring any set of m coecients that is far less than
the signal size. If (, ) is close or equal to one, the order of Klog n samples is
enough.
The role of incoherency becomes transparent i.e., the smaller the coherency, the
fewer the samples that will be needed for reconstruction.
We just run the algorithm; if the signal is well sparse, exact reconstruction is
possible i.e., the signal x is exactly recoverable from set m by minimizing a
convex function without assuming knowledge of the non-zero coordinates of b, the
amplitude or locations, which are unknown a priori. In real-world applications
the signal will be invariably corrupted by some level of noise, however, a small
perturbation in the signal should cause small perturbation in the recovery process.
From the above signal recovery analysis, the task of nding and implementing a
stable measurement matrix on a 32-bit node platform such as the WISPES W24TH is
non-trivial, since the nodes are limited in memory and the requirement of a wildre
163
monitoring necessitates a real-time update of the events, hence a real-time signal re-
covery method. In light of these limitations posed by the application and the hardware
unit, the key question is whether it is still possible to exploit the powerful CS theory for
a real-time data recovery application. Next we examine the components of a sensing
matrix that are required for a sparse signal reconstruction.
Sensing matrix
Given a sensing matrix M = , where is an m n measurement matrix drawn
randomly from suitable distribution and is an arbitrary orthobasis, it has been
shown by Candes and Wakin (2008) that to have a robust signal recovery the sensing
matrices must obey the restricted isometric property (RIP) condition, i.e. matrices with
the property that column vectors taken from arbitrary subsets are nearly orthogonal.
Thus, the larger these subsets, the better the recovery process. According to Candes
and Wakin (2008), it has been proven that any random matrix generation that obeys the
RIP condition (Candes and Tao, 2005) is suitable for signal recovery process, provided
that
m C Klog(n/K) (7.8)
where C is a constant chosen depending on the instance. Consider the following matrix
generation processes:
1. Generate matrix M by sampling n column vectors uniformly at random on the
unit sphere of R
m
.
2. Generate matrix M by sampling i.i.d entries from a normal distribution with
variance = 1/m and mean = 0.
3. Generate matrix M by a random projection P as in Incoherent Sampling and
normalize: M =
_
n/mP.
4. Generate matrix M by sampling i.i.d entries from a symmetric Bernoulli distri-
bution (P(M
i,j
= 1/

m) = 1/2).
For all these example matrices, the probability of sampling a matrix not obeying
RIP when (7.8) holds is exponentially small in m (Candes and Wakin, 2008). The
authors further asserted that using a randomized matrix together with l
1
minimiza-
tion can oer a near-optimal sensing strategy. Alternatively, if we x the orthobasis
and generate a measurement matrix according to any of the rules in i)-iv), then
164
with an overwhelming probability the matrix M obeys the RIP constraint provided
condition (7.8) is met (Candes and Wakin, 2008). Meaning, we can accurately recon-
struct nearly sparse signals from an under-sampled data in an incoherent domain. We
therefore anchor the design of SWIFTNET on these assertions by generating matrix
M by sampling n column vectors uniformly at random on the unit sphere of R
m
with
the hope that we can solve the convex optimization problem using the l
1
minimization
method. One key contribution of our approach is that we have been able to successfully
apply practically these theories to achieve an energy-ecient data acquisition method
that is more robust than the traditional sense-transmit or prediction approaches. Next
we present the prediction algorithm we have used in our design.
7.2.2 Prediction Algorithms
We present a recap on the prediction algorithms that was extensively covered in Chap-
ter 6. One of the data management strategies employed to reduce energy consumption
and transmission in WSNs is using a prediction method. In a normal operation of
WSN deployment, sensor nodes send their data at every time interval to the sink node
or cluster-head. Often the sampled data do not change signicantly over time and
it is possible users can tolerate some degree of inaccuracy (Santini and Romer, 2006;
Liu et al., 2005), due to the fact that the data captured at the sensor nodes are not
exactly the true representation of the physical world. The idea is that some data can
be suppressed based on a prediction model. For instance, given an error bound
max
,
a node sends its value if this condition holds, [y
t
y
t
[ >
max
, where y
t
is the pre-
dicted value of y
t
based on a model choice such as AR (Tulone and Madden, 2006),
ARIMA (Liu et al., 2005), ETS(A,Ad,N) (Aderohunmu, Paci, Brunelli, Deng, and
Benini, 2013), LMS (Santini and Romer, 2006), Naive (Aderohunmu, Paci, Brunelli,
Deng, Benini, and Purvis, 2013a) or Kalman Filter (Jain et al., 2004) etc. Overall, the
results from these previous studies reveal that prediction can signicantly reduce the
energy consumption in WSNs.
Having discussed the two main algorithms that serve as the foundation for our work,
we present in the next subsection the integrated approach, the motivation behind our
work and the drawbacks of using any of the two algorithms separately in our application
scenario.
165
0 50 100 150 200 250 300 350 400 450
38
40
42
44
46
48
50
52
54
Sample
H
u
m
i
d
i
t
y
CS vs Prediction reconstruction on a 3day dataset at 10 mins sampling interval


Original Signal
CS reconstruction
Prediction
Figure 7.2: CS vs. Prediction method
7.2.3 Combining CS and Prediction Methods
In the past, CS has been employed in applications that are delay tolerant but require a
high level of reconstruction quality. In the eld of WSNs, it has been used for temporal-
spatial measurements that are taken from several cluster-heads or sink nodes for a very
large network such as in Caione et al. (2010); Chou et al. (2009); Luo et al. (2009); Li
and Qi (2013). It has been proven that CS yields good results for applications that
are delay-tolerant (non real-time) where data can be sampled from few cluster-heads
or nodes and then compressed. However, the question is: Can the CS approach be
applied to a non-delay tolerant application, such as wildre monitoring, by sampling
just temporal signals, i.e. by acquiring data from a single node over a period of time
while taking few samples?
On the other hand, we have shown by our studies in Chapter 6 that the prediction
method can be an eective data collection mechanism. Prediction has proven to be an
ecient data gathering scheme, but for a continuous data collection application over a
long period of time, the energy consumption of prediction method can be huge due to
the radio characteristics and can be much larger than CS, since it is much less eective
in reducing the amount of transmitted data. The question then is: Is it possible to
signicantly optimize this energy consumption?
166
To better understand the motivation for our approach we present the distinct fea-
tures of both methods, viz CS and Prediction. Figure 7.2 shows an example humidity
signal trace from a micro-climate monitoring application. This is a 3-day temporal
data trace sampled at 10 minutes interval. Assuming we have a data acquisition pro-
tocol that uses only compressive sensing with 25% sparsity rate for the data gathering
process. CS will acquire this data samples for a 3-day period without transmitting
any packet until the entire 432 samples are collected and then compressed into 108
samples, which can be transmitted in one packet on our W24TH node platform. Us-
ing CS the signal can be reconstructed with very high accuracy and with huge energy
savings i.e., 99% energy savings can be achieved since the radio will be ON once for
the transmission process and for the remaining period it will be in SLEEP state. It is
obvious that this approach would have been an eective sensing paradigm except that
the system will only report data after three days. This is quite a large delay for some
specic monitoring and surveillance applications.
Similarly, assuming we instead have a prediction protocol with 1% error bound for
a data acquisition process designed for the same micro-climate monitoring application,
then from Figure 7.2 it shows that prediction method can equally achieve a high accu-
racy, which is comparable to the CS method. However, to achieve this much accuracy
about 131 packets will need to be transmitted over the 3-day period, i.e., about 70%
energy savings on the network with less delay compared with the CS, since the data
would be transmitted once the error budget is violated as explained in Chapter 6. Put
into perspective, it means the radio would be in ON mode for 131 times in order
to send each packet, since the error bound violation would occur at the dierent time
intervals. Thus, this paradigm seems to be an eective data acquisition method, except
that this method imposes its own energy budget. For an application that requires a
frequent update process such as wildre monitoring, the energy consumption would be
huge.
Interestingly for such an application, an ecient data acquisition paradigm would be
to have a real-time data collection with a low energy budget imposed and can capture
useful events. To address the above questions, we combine the synergies between:
1) CS, a delay inherent approach yet yields high quality recovery and 2) Adaptive
prediction approach, a real-time data recovery method with near optimal accuracy.
This work argues that by combining these algorithms, energy consumption in WSN
deployments such as in wildre monitoring can be signicantly reduced and yet oers
a real-time update of the phenomenon without jeopardizing any event of interest in
167
the monitored environment.
Our method is achieved by implementing a mix of algorithms- an adaptive pre-
diction algorithm as a layer on top of the CS algorithm. The idea is to use CS for
aggressively minimizing the radio usage wherever possible and the adaptive prediction
algorithm for high-rate sampling when necessary. For the successful implementation of
SWIFTNET, we made a few key assumptions:
the signal is sparse in the monitored domain,
there exists a stable measurement matrix such that the salient information in a
K-sparse signal is not damaged by the dimensionality reduction,
there exists a matrix M that obeys the restricted isometry property (RIP) (Can-
des and Tao, 2005), such that it can easily be implemented on our platform,
the position of the nodes are known due to the pre-knowledge of the deployment.
This assumption is particularly suited to wildre scenarios, where the location of
data reporting is vital.
In the next section we examine an application scenario where the SWIFTNET
protocol could be applied.
7.3 Application Scenario
The applicability of our design strategy is vast e.g., it can be applied to any event
detection application such as, seismic monitoring (Suzuki et al., 2007), soil moisture
measurement for rainfall detection (Wu and Liu, 2012), wildre monitoring
5
, ood
warning system (Zhou and De Roure, 2007) etc. For easy testing and implementation
of our approach, we present a wildre monitoring application as a use-case.
7.3.1 Wildre Characteristics
Often in a forest reserve or wild-land there is frequent surveillance from towers, ground
and aerial patrols for wildre. Sometimes there is a eet of airplanes regularly patrolling
over the forest looking out for wildres or for any abrupt changes in the environmental
conditions that could trigger re event at various time intervals of the day or week,
especially in re-prone regions such as in Australia, Greece, Alabama etc. In addition,
5
http://www.futuregov.asia/articles/2012/jan/18/china-pilots-wildre-detection-sensor-network/
168
the public can often report wildres 24 hours a day through a toll-free telephone sys-
tem
6
. When a re is reported, a dispatch center sends re-ghters and volunteer re
departments as needed to suppress it. For example, the case of the Black Saturday
bushres; a series of re that engulfed part of Victoria, Australia
7
in 2009, the back-
ground temperature reached 46
o
C with north-westerly winds reaching a speed over
100km/h. The res occurred during extreme bushre-weather conditions and resulted
in one of Australias highest ever loss of life and properties from a bushre. Lots of
similar incidents have occurred in dierent parts of the world in the past and recently.
Thus in this kind of situation the rst approach is to prevent the occurrence, and if it
does occur the next task is how to successfully supress it in order to minimize losses.
For a wildre monitoring there are normally two stages: 1) A re alarm is triggered
either manually or automatically and 2) A rescue operation is enforced to suppress
it. In the former case, environmental variables such as air temperature, the wind
speed, humidity and atmospheric pressure are monitored. One of the most monitored
characteristics is the air temperature, often of particular interest is the range between
40
o
C to 46
o
C, termed the emergency zone. In this zone, there is the possibility for
the alarm to be set-o and/or a trigger of immediate observation of the environment.
In the latter stage, assuming an alarm is set-o, combating the situation is non-
trivial especially in a case of series of bushres; this could continue for days before
it is eventually suppressed completely. At this stage lots of eorts are put in place,
the ability to easily combat the bushre will increase the number of lives and proper-
ties that can be salvaged including the lives of the re-ghters. For example, in some
circumstances where several homes are threatened by a wildre, the Forestry Commis-
sion
8
can call-in helicopters with large water buckets. These buckets do not put out the
re, but reduce its intensity so that the re-ghters can more easily suppress it. The
helicopter service is extremely expensive and it is only done in severe re conditions.
Hence an early warning system that can provide continuous updates with an accu-
rate view of the incident as the re-ghters battle on is very crucial to the successful
operation of combating the re incident.
The Alabama Forestry Commission
9
has argued that an integrated approach of
multiple systems can be used to merge satellite data, aerial imagery, and personnel
position via Global Positioning System (GPS) into a collective whole for near real-time
6
http://www.forestry.state.al.us/WildreControl.aspx?bv=1&s=0
7
www.bom.gov.au/climate/current/statements/scs17d.pdf
8
http://www.forestry.state.al.us/WildreControl.aspx?bv=1s=0
9
http://www.forestry.state.al.us
169
wireless interaction with the Incident Command Centers (ICC). We believe that the
use of WSNs together with these systems is crucial. Thus a complete solution viz an
early warning system that reports a wildre right from the time the re-alarm is set-
o to the time the rescue team or re-ghters successfully carry-out the operation is
crucial. The use of wireless sensor networks could play a very important role in such
an operation.
7.3.2 Challenges and Solutions
We can easily infer some of the expected requirements that should be met in order
to use WSNs for a wildre monitoring application. These include 1) high reactiveness
and real-time updates 2) accurate view for resource allocation 3) client control services
among the other sub-categorizations.
These three requirements are often inter-related. For example, a high reactiveness
and real-time updates will facilitate the action to be taken, and the decision making
process on resource allocation to the re eld and/or whether reinforcements will be
needed on a particular site. The Incident Command Centers require continuous in-
formation about the re incident. This provides them with an accurate view on the
intensity of the wildre/burn and simultaneously helps the decision on how to allocate
resources to combat the situation. The amount of the information available about the
environmental variables, such as the wind speed and the air temperature of the re
eld plays an important role on the success of the operation. Similarly, a software
tool such as the client-control services that is equipped with a high-end data mining
capability is important for a real-time analysis of the raw data gathered from the eld.
The client-control tool should process the raw data into the required information that
can be easy to understand and interpret by the ICCs.
These requirements mentioned above sum up into a problem domain for a wildre
environment. Therefore, the following features are required when using WSNs for
wildre monitoring purposes: fast-reactiveness, prolonged network lifetime, network
reliability and fault tolerance. Some of the existing solutions, such as the Satellite
imagery system, GIS-GPS systems have achieved some of these features, but in general
they remain expensive. For example in the Insight Robotics wildre detection system
10
,
it was noted that the Satellite imagery system is only able to detect large scale re,
rather than occurrences in their early stages; in addition, analysing infrared images is a
10
http://www.insightrobotics.com/content/insight-robotics-launched-early-wildre-detection-
network
170
Figure 7.3: SWIFTNET: design illustration
dicult task, sometimes taking the operators more than one hour to locate the exact re
scene. They are non-real-time, they do not provide an accurate view of the incident,
and they suer from unreliable communication links. Recently other solutions such
as WSNs have been proposed, FireNet (Sha et al., 2006), FireWxNet (Hartung et al.,
2006) etc. However, these approaches are frameworks with no real implementation of
the designs. We devote the next section to describe the SWIFTNET design framework,
followed by the real-world implementation.
7.4 SWIFTNET Design Illustration
Figure 7.3 illustrates our design strategy. The points of interest between 50 to 400 sam-
ple points are shown with the dotted lines. This gure shows an air temperature data
trace from a wildre monitoring application. To illustrate, the diagram is partitioned
into two zones of interest:
1. The Normal zone: In this zone, since the temperature is below the threat level
or potential re hazard, low sampling rate would suce. Hence, in SWIFTNET,
this zone is controlled by the CS algorithm.
2. The Fire zone: In this zone, locations A and B are the major points of interest
in the event of a combat operation during a wildre disaster. A higher sampling
rate would be necessary; the more information gathered during these periods, the
more successful the operation is likely to be. Similarly, the longer the network
171
lifetime achieved during the re incident, the better the information that would
be gathered. Consequently, we strive for high quality information reporting and
longer lifetime deployment. To achieve our goal, in SWIFTNET, this zone is
automatically controlled by our adaptive prediction algorithm.
From Figure 7.3, the emergency threshold
o
C is introduced to dynamically switch
between CS and prediction. This threshold temperature can be set by the users,
depending on the previous history of wildre events. When the air temperature is
below
o
C i.e., in the Normal zone, the CS algorithm is invoked, which samples the
environment at xed sample interval . In our case, we set to 5 minutes, which
amounts to 288 samples in a 24-hour period. The sparsity K is set to 25%, which is
72 non-zero samples collected and transmitted in one packet every 24-hour period.
Similarly, when the algorithm switches to prediction, the prediction uses a user
dened error bound
max
, which we set to 0.5
o
C i.e., < 1% error. The error bound
controls whether data is transmitted or suppressed. In addition, our prediction uses
an adaptive sampling strategy that helps to cater for the reactivity of the network. We
use an adaptive sampling interval , with units in seconds, that is controlled by the
feedback from the monitored air temperature given as:
= 2
min(t)
/T
sense
(7.9)
where
min(t)
is a constant denoting the minimum xed temperature that could be at-
tained within a particular period of time during a wild-land monitoring scenario. T
sense
is the sensed temperature at time t. Both
min(t)
and values can be set by the user.
In our case, we set
min(t)
to 2
o
C, obviously the lower this value is, the smaller would
be, hence the higher the sampling interval. The intuition behind this approach is that,
during a wildre incident, air temperature is bound to increase or decrease at a par-
ticular location depending on whether the rescue operation is successful or will require
reinforcement. Thus, from Eq. (7.9), an increasing air temperature automatically in-
creases the sampling rate and vice versa. With this design, the prediction algorithm
is adaptive and highly responsive to changes in the air temperature signal. Similarly,
in order to prevent false alarms, SWIFTNET uses a buer window size n inside the
prediction model. As mentioned previously, once the threshold
o
C is reached and
if the user error bound
max
is reached within the computed sampling interval, an
alarm is automatically invoked and data transmission starts. However, if this condition
is not met, the prediction phase does not start at the sensor nodes until the window
size n is full, which is then transmitted to the sink node without invoking a re alarm.
172
Figure 7.4: SWIFNET algorithm owchart
For example, in Figure 7.3 we note the few spikes between 90 to 100 sample points,
where the temperature rose above the
o
C but quickly dropped below the emergency
zone, hence, no alarm is triggered. From our experiments, during a wildre event,
uctuates between 15 to 30 seconds. Apart from the reactivity of the network being
controlled by T
sense
, decreasing the user error bound equally increases the reactiveness
of the network and vice versa. The additional advantage of SWIFTNET is that, it re-
quires no prior knowledge of the monitored environment. The algorithm is light-weight
and can be practically implemented on any existing node platform that is currently
available in the market.
In summary, since the majority of the time the air temperature could be signif-
icantly lower than the threat level, by using CS for the data gathering during this
period, huge energy resources can be saved by the energy-limited sensor nodes without
a signicant loss in accuracy. Thus sensing will continue at a low sample rate as long as
the signal is below the emergency threshold. On the other hand, if the air temperature
increases above the threat level, we can detect any event of interest by using an adap-
tive prediction algorithm, which also amounts to additional energy savings compared
with a traditional sense-and-transmit paradigm. In Figure 7.4 we show the owchart
173
implementation of SWIFTNET algorithm design. The gure depicts how we have been
able to achieve a mix of CS and prediction method in our implementation.
Figure 7.5: A front view of a WISPES W24TH node prototype
7.4.1 Hardware Platform
The SWIFTNET algorithm is implemented on WISPES W24TH nodes, shown in
Figure 7.5. To recap, it is based on the Jennic microprocessor, one of the few 32-
bit architectures available in the market with a power consumption comparable to a
TelosB. It is equipped with 128KB RAM, 512KB FLASH with 2.4GHz radio transceiver
(IEEE802.15.4 compliant) and Zigbee Pro compliant. It uses an aggressive power man-
agement method using 8A in sleep mode, 17mA in transmit mode and 23mA in receive
mode; this guarantees a longer battery lifetime. The details of the hardware design
and the stack was presented in Chapter 5.
7.4.2 Client Control Platform
A dual client control platform is used that consists of MATLAB for the high-end recon-
struction algorithm and the CACTI
11
a powerful network graphic tool for visualization,
data management and storage. An example snapshot from one of our real-time data
trace is shown in Figure 7.6. With these tools it is easy for users or the ICC to have a
complete view of the situation at the forest park or wildland in the event of a wildre
outbreak. With the fast-reactiveness of the network and the real-time update infor-
mation, the ICCs can easily combat the wildre by providing quick reinforcement to
areas that need immediate attention.
11
http://www.cacti.net/
174
Figure 7.6: Real-time data trace from CACTI
Figure 7.7: Experimental testbed topology
175
7.4.3 Real-world Test-bed Implementation of SWIFTNET
The ecacy of SWIFTNET is tested with air temperature data using our in-house
deployment testbed of 6 sensor nodes powered by batteries in a star topology shown in
Figure 7.7 for our application scenario. Although, nodes are multi-modal, meaning they
could sense other parameters such as humidity, wind speed etc., we prefer to concentrate
on the air temperature as it oers easy testing on the reactiveness of our testbed. We
implemented SWIFTNET on the WISPES W24TH nodes, and the pseudo-code is given
in Algorithm 5. Each leaf node runs this algorithm. Upon startup, a node initializes its
parameters shown in Lines 2 and 3, and it starts sensing the phenomenon. The sensed
data is acquired at every data collection round in Line 4. Then the algorithm switches
between CS and prediction at every data collection round and the alarm condition is
checked for violation. If the sensed data is up to a dangerous level predened by the
user shown in Line 5, it calls the prediction algorithm shown in Line 7, which is built on
an adaptive sampling strategy in Eq. (7.9), and it triggers an immediate reporting of
the phenomenon depending on how fast the air temperature is changing in the case of a
wildre application. From our experiments, the reporting uctuates between 15 to 30
seconds. When the air temperature drops below the threat level, the node calls the CS
algorithm shown in Lines 10 to 24 and thus proceeds with data compression depending
on the size of the history table. When the history table is full, the data is transmitted in
one or a few packets. This way the radio usage is signicantly minimized, since it only
turns ON when transmitting. In order to realize the functioning of our application,
we implemented Algorithm 5 on the stack architecture presented in Chapter 5.
Next we present the measurement matrix followed by the presentation of the de-
sign of the signal recovery algorithm as implemented on the WISPES W24TH node
platform.
7.5 Design of Measurement and Representation Ba-
sis
In this section we cover the discussion on the selection of the measurement matrix
on our W24TH node platform. The measurement matrix corresponds to the basis
for which matrix y corresponds to the compressed form of a signal f, whereas the
representation basis is used in the reconstruction algorithm corresponding to the
sparsity of the original signal f during the recovery process.
176
Algorithm 5 SWIFTNET algorithm
1: Call Task START
2: Initialize parameters (LFSR seed)
3: Parameters: Count, comp
(vector)
, CS
(vector)
, SizeofHistorytable
4: Call Task sense
(data)
5: if (sense
(data)
Alarm
threshold
) then
6: Call prediction algorithm
7: else
8: re-Initialize sample interval
9: CS
(vector)
sense
(data)
10: Call Task Sleep
11: if Count SizeofHistorytable then
12: for (i in 1 : Sizeofcomp
(vector)
) do
13: buer 0
14: for (j in 1 : SizeofHistorytable) do
15: buer rand() CS
(vector)
[j]
16: end for
17: comp
(vector)
[i] buer;
18: end for
19: Call Task Transmit comp
(vector)
20: Call Task Sleep
21: re-initialize LFSR with seed
22: Count 0
23: end if
24: Count++
25: end if
7.5.1 Measurement Matrix and Sparse Representation
Recall from Subsection 7.2.1, that one of the aims is to nd a sensing matrix with
the property that column vectors taken from arbitrary subsets are nearly orthogonal.
Hence, the larger these subsets are then the better will be the reconstruction. In
general, random matrices are largely incoherent with any xed basis . For example,
it is proven by Candes and Wakin (2008) that if we select an orthobasis uniformly
at random, which can be done by orthonormalizing n vectors sampled independently
and uniformly on the unit sphere, then with a high probability, the coherence between
and is about

2logn. To achieve this, we used the Linear Feedback Shift Register


popularly known as LFSR in the eld of electronics. Next we explain how the LFSR
works and its suitability on our platform.
Linear Feedback Shift Register
An LFSR is a shift register that is capable of generating pseudo-random numbers, which
when clocked advances the signal through the register from one bit to the next most
signicant bit. Linear feedback shift registers make extremely good pseudo-random
177
Figure 7.8: A 16-Bit LFSR
pattern generators
12
. An LFSR can be formed by performing an exclusive-or (XOR)
on two or more of the ip-op outputs and feeding them back as inputs into one of
the ip-ops shown in Figure 7.8. This gure shows a 16-bit LFSR. The feedback tap
numbers in white correspond to a primitive polynomial so the register cycles through
the maximum number of 65535 states excluding the all-zeroes state. The bit positions
that aects the next state are called taps. From this gure the taps are [16, 14, 13, 11],
the rightmost bit of the LFSR is the output bit. One way of implementing LFSRs is to
have the taps XORed sequentially and then fed back into the leftmost bit. This way
the XOR is external from the shift register. Another way of implementing the LFSR is
by making the XOR internal to the register. In our implementation, we have utilized
the external XOR method with a 16-bit feedback polynomial of maximal period 65535
(i.e., 2
n
1)). The output is initially loaded with a seed value (in our case 0xACE1u),
also known as the initial state and when the register is clocked it will generate a random
pattern of 0s and 1s.
In the past LFSR have been applied both to hardware and software solutions, e.g.
pseudo-random numbers, pseudo noise sequences
13
in crytography, fast digital coun-
ters, and in scrambling (randomizer) widely used in satellite communication. Although
it has been used in some elds such as Cryptography, where applications require the
output to also be unpredictable. In these type of applications other pseudo-random
number generators (PRNG) have been proposed based on computational hardness as-
sumptions as described by Woeginger (2003). Some of the algorithms used in cryptog-
raphy include the Blum Blum Shub (Blum et al., 1986), Mersenne Twister (Matsumoto
and Nishimura, 1998) algorithms etc. The genuiness of randomness has been the sub-
ject of debate in the past, although statistical randomness does not necessarily imply
true randomness, i.e., objective unpredictability. Pseudo-randomness is sucient for
many uses, such as in statistics, hence the name statistical randomness. Since our goal
12
Texas Instrument: http://www.ti.com/lit/an/scta036a/scta036a.pdf
13
LA Airforce Base: http://www.losangeles.af.mil/library/factsheets/factsheet.asp?id=8618
178
is not to compare the performance of the dierent PRNGs for matrix generation or
to compare the dierent measurement matrices for the signal recovery as conducted
in Wu and Liu (2012), we limit our discussion on this. Instead we focus on how to
generate one of these matrices to suit our needs, and it should be practical to im-
plement on our platform. Our method implies that given any measurement matrix
with a proper representation basis, we are able to design a fast-reactive algorithm that
achieves a minimum energy consumption without losing any interesting event in the
monitored environment. One of the key design choices requires that the chosen matrix
should be easily implemented on our W24TH node prototype without incuring huge
computational overhead and memory usage.
As explained under the CS theory, recovering sparse signals requires random ma-
trices. Recall from Subsection 7.2.1 that one of the potential methods that obeys the
RIP condition method is to generate a matrix uniformly at random. How to generate
these random matrices require generating a sequence of random numbers and storing
them into arrays of size M N. The LFSR is a potential solution for this since it is
possible to easily generate uniform random numbers with low complexity, considering
the limited memory capacity of our 32-bit WISPES W24TH node platform. In pre-
vious study by Yu (see 2011, pp. 8-11), it was shown that it is possible to generate
deterministic sensing matrices from an additive character sequence using an LFSR.
Their results revealed that the sensing matrix generated using the LFSR has better
eigenvalues statistics than the Gaussian random matrices, hence more suitable for CS
matrices. Similarly, the study by Wijesinghe et al. (2006) revealed that LFSR is suit-
able for generating uniform random numbers and they further showed some hardware
implementations of the LFSR. In Duarte and Eldar (see 2011, pp. 4064) LFSR was
used to generate a Toeplitz matrix for a special-purpose light sensor application, then
the output is fed into an accumulator. The output is then sampled in a pseudo-random
fashion and it was shown to meet the requirement of a CS matrix. From these previous
studies and from our observation LFSR is sucient for generating column vectors of a
matrix that is sampled uniformly at random. Hence it meets our needs viz CS matri-
ces, as we shall see from our experiments, especially since our aim is only to perform
compression on the streams of signals and then reproduce the same matrix using any
of the xed basis such as the DCT at the sink node for the reconstruction. Next
we examine how we are able to achieve this together with the recovery process on our
platform.
179
Algorithm 6 Reconstruction algorithm using LFSR measurement matrix
1: lfsr 44257 #Initialize LFSR seed
2: comp
(vector)
; SizeofHistorytable;
3: #Create the measurement matrix by sampling n column LFSR vector:
4: for (i in 1 : len(comp
(vector)
)) do
5: for (i in 1 : SizeofHistorytable) do
6: #Generate the LFSR vector used for compression at the source nodes:
7: bit := ((lfsr >> 0) (lfsr >> 2) (lfsr >> 3) (lfsr >> 5) ) & 1;
8: lfsr := (lfsr >> 1) [ (bit << 15);
9: matrix(i,j) := lfsr;
10: end for
11: end for
12: #Signal reconstruction using LFSR generated matrix:
13: CompA := matrix comp
(vector)
;
14: B
rec
:= dctmtx(matrix) len(comp
(vector)
);
15: CoefBP := SolveBP(matrix B

rec
, CompA, len(comp
(vector)
));
16: Recon := (B

rec
CoefBP);
7.5.2 Signal Reconstruction Algorithm
Algorithm 6
14
shows the exact algorithm used for the signal reconstruction. We assume
the sink to be suciently powerful e.g., a node directly connected to a laptop or to a
high-end PC with enough computational resources. The sink node should be capable
of recovering the compressed packets received stored in a vector comp
vector
shown in
Line 2 of the algorithm. On Lines 4 to 11 the LFSR measurement matrix is generated.
Following this the signal is reconstructed shown on Lines 13 to 16. The function
dctmtx represents the DCT basis and the SolveBP function executes the linear
programming (LP) code written in MATLAB obtained from Sparselab
15
. However, to
be able to recover the signals, the sink node must have a knowledge of the sensing
matrix used by the node for compression. To achieve this, the nodes must be able to
generate such a matrix and then communicate it with the sink. Unfortunately, the leaf
nodes have limited memory capabilities to store the matrix. Moreover, transmitting
several columns of vectors will equally require the radio to be in ON mode, and
this would be counter-productive to the goal of minimizing energy consumption in the
network. A solution to the above problem will be to nd a matrix that we can construct
without storing it on the leaf nodes or transmitting it to the sink. Thus we generated
the measurement matrix by sampling n column vectors from a uniform distribution
using the LFSR with a seed as described in the previous subsection. Consequently,
the matrix can be generated on the leaf nodes with a seed and simultaneously we can
perform data compression. Hence, we do not need to store it, rather the LFSR matrix
14
The MATLAB source code is given in Appendix A
15
Sparse Lab: http://sparselab.stanford.edu/
180
using the same seed can be utilized for the reconstruction process using a proper
basis at the sink node. Simply put, the compression phase is accomplished within
the network using Eq. (7.2). Whereas the decompression of the signal is performed at
the sink using Algorithm 6, just by having the knowledge of the measurement matrix
. Hence, by using the seed for the matrix generation at the sink, the memory usage
is optimized on the leaf nodes, as we have been able to avoid storing the n n matrix
for transmission to the sink.
One observation is that, if the signal is averagely sparse, the signals can be recovered
at a high accuracy. In particular, the solution to the problem of reconstruction requires
N cK random projections, with c(S) = O(log(1/S)) and S = K/N denoting the
sparsity rate of the signal. Obviously, the recovery error depends on the number of
samples taken, and ideally, the error decreases for an increasing value of N. Candes
and Tao (2007) provided a statistical estimation for when K is far less than N; they
asserted that the data can be reconstructed with a high probability when c [3, 4],
i.e., taking N 3K 4K random measurements should suce. Thus, we set K to be
25% of the original signal.
It is worthy of note that although we have tested SWIFTNET on a star topology,
SWIFTNET can easily be extended to any other network topologies, such as a tree
topology or a clustered architecture. The evaluation of the impact of our framework
on the dierent topologies is out of scope for this study, hence it is left as an open
research issue. The adaptive prediction algorithm implemented on top of the CS is
invoked when a user dened threshold
o
C is reached; this value can be chosen by
the user depending on the previous history of wildre incidents. It should be noted
that depending on the application at hand, any of the prediction models presented in
Subsection 6.2.1 could be used. However, this choice should be well guided, and we
shall discuss later on the practicability of using some of these models on a wildre
monitoring application.
Once the sink node receives the data packet with the sampling interval piggy-
backed, it starts the prediction phase by using the appropriate prediction model chosen
a priori by the user, and hence, a perfect synchronization is achieved. After the tem-
perature drops below
o
C, this temperature value is transmitted to the sink and the
prediction phase terminates. In the next section we describe the experimental testbed
and the evaluation of our results.
181
Figure 7.9: A Steiner
16
Heat Gun
7.6 Experimental Setup and Evaluation of SWIFT-
NET
The air temperature for testing SWIFTNET is generated using a heat gun shown in
Figure 7.9. The heat gun is capable of generating a regulated hot air up to 200
o
C
in a short time. Recall that SWIFTNET combines two algorithms; hence the cut-
o temperature threshold (
o
C) is set to 40
o
C. When this temperature is reached,
the prediction algorithm is automatically invoked, and when the temperature drops
below this threshold the CS algorithm starts operation. This way the monitoring
application uses the CS algorithm for the data acquisition protocol as long as the air
temperature ow is within the specied threshold. For example, we show the data
collection from two nodes (recall we used a 6-node testbed Subsection 7.4.3) from our
test burn at various times. These nodes reveal some interesting behaviors; the data
logged by Node 1 is less sparse than the data logged by Node 2. We compare the
results between a default prediction algorithm and SWIFTNET. The Naive model is
used for the prediction algorithm. This is partly due to the ease of implementation on
the in-house testbed and also partly due to performance as we have seen in section 6.2
of Chapter 6. In order to be fair and to be able to eectively use the default prediction
method as a data acquisition protocol in a wildre monitoring scenario, the prediction
method adaptively computes its sampling interval once it reaches the emergency zone
just as in SWIFTNET. Henceforth, the term prediction method will be interchanged
with adaptive prediction method in the rest of the discussion.
The air temperature is sampled at 5 minute intervals, which amounts to 288 samples
in 24 hours, the sparsity K is set to 25%, which is roughly about 72 non-zero samples
collected and transmitted in one packet every 24-hour period. Figure 7.10 and Figure
182
7.11 capture the air temperature data trace from two separate nodes; the temperature
rise is captured by CS up to the set threshold value, and then the algorithm starts
running the prediction model until the air temperature drops below the threshold.
No transmission of data was done until the 0.5
o
C at sampling interval condition
was met and the alarm signal was transmitted. During this phase, the sampling rate is
adaptively computed based on the incoming air temperature given in Eq. (7.9). This is
dierent from the feedback control mechanism proposed by Marbini and Sacks (2003),
where the error margin is used to decide when to sample at a higher rate or not.
Next we briey examine the choice of the prediction models used for the wildre
application.
0 100 200 300 400
0
20
40
60
80
Samples
A
i
r

T
e
m
p
e
r
a
t
u
r
e

(
o
C
)
Node 1


Original signal
SWIFTNET reconstruction
0 100 200 300 400
30
35
40
45
50
55
60
Node 2


Figure 7.10: Data trace from SWIFTNET
7.6.1 Choice of Prediction Model
Considering that there are several candidate prediction models as we have seen in Chap-
ter 6, here we examine what model is suitable for a wildre monitoring environment.
When there is a re disaster, there is a high possibility that the wildre characteristics,
such as the intensity of the re, location, sensing needs, duration of the burn etc., will
be dierent from the previous re disasters. Hence, it is insucient to use existing
datasets to build an ecient prediction model for the future re disasters. Also, since
fast responsiveness is highly desirable in such an application, preliminary gathering of
datasets to build a complex model would be undesirable. Especially, when the model
ceases to properly t the data, re-learning a new model would be time consuming. The
183
0 100 200 300 400
0
20
40
60
80
Samples
A
i
r

T
e
m
p
e
r
a
t
u
r
e

(
o
C
)
Node 1


Original signal
Prediction reconstruction
0 100 200 300 400
30
35
40
45
50
55
60
Node 2
Figure 7.11: Data trace from default adaptive prediction
delays associated with gathering of the training dataset could result in loss of lives and
property. Based on these considerations and due to the nature of the wildre events, we
eliminate models such as ARIMA (Liu et al., 2005), multi-variate Gaussian (Deshpande
et al., 2004), DKF (Jain et al., 2004) and the likes. The prediction model should be
computationally inexpensive and should report readings that are outliers with high
responsiveness. Hence, models such as Naive and Fixed-Weighted Moving Averages
(WMA) (Aderohunmu, Paci, Brunelli, Deng, Benini, and Purvis, 2013a) meet the re-
quired characteristics in our wildre monitoring application. For this particular work,
we chose Naive model as the prediction model. This choice is motivated by its simplic-
ity and ease of implementation on our platform. In Chapter 6 and in (Aderohunmu,
Paci, Brunelli, Deng, and Benini, 2013; Aderohunmu, Paci, Brunelli, Deng, Benini, and
Purvis, 2013a) it has been shown that a Naive model, while simple, still oers excellent
accuracy and high data reduction in WSNs for some monitoring applications.
7.6.2 Performance Metric
The performance metric used to assess our method is dened below:
Relative update rate (R
update
): This is the ratio of the number of transmissions
using SWIFTNET to the number of transmitted packets when using a default
adaptive prediction algorithm for the entire monitoring period. The relative
update rate for the default adaptive prediction model is 1, since all updates will
be sent when required. It is expected that the relative update rate R
update
is
184
bounded as 0 R
update
1; the lower this value is, the better the gain in terms
of energy savings.
Accuracy: The accuracies of the methods are measured using both the relative
error (RE) and the mean absolute error (MAE) metrics. This reects the accuracy
of the reconstructed samples with respect to the corresponding observation.
Reactivity: This is the measure of how much the protocol is able to react to
changes in the monitored phenomenon. This implies the adaptability of the
sample rate to the changes in the signal.
Table 7.1: Performance summary of SWIFTNET
(a) Result from 6 nodes, - signies accuracy
loss for SWIFTNET compared with the de-
fault adaptive prediction method
Node R
update
MAE
diff
RE
diff
1 0.42 -0.0659 -0.0062
2 0.54 0.019 0.0023
3 0.51 0.082 0.0021
4 0.44 -0.0312 -0.0047
5 0.48 0.075 0.0018
6 0.47 0.065 0.0015
7.6.3 Discussion of Results
The main goal of SWIFTNET is to minimize the overall energy consumption by limiting
the unnecessary updates where possible. For example, from Figure 7.10, Node 1 reveals
the entire signal trace that is captured by SWIFTNET; a re event is generated using
the heat gun, and throughout the operation 64 samples are collected in addition to the
288 samples that are collected over a 24-hour period at 5 minutes sampling interval.
In total 352 samples are logged. Similarly, Node 2 captures 47 samples during the
re event in addition to the 288 samples over a 24-hour period; this gives a total of
335 samples logged. Still from this gure, using SWIFTNET, Node 1 transmitted 40
packets out of the 352 packets and Node 2 transmitted 19 packets out of the 335 packets.
We observe the same phenomenon using the default adaptive prediction algorithm
shown in Figure 7.11. From this gure, Node 1 transmitted 96 packets out of 352
packets and Node 2 transmitted 35 packets out of 335 packets.
By comparing the performance of SWIFTNET and the default adaptive prediction
from the two Figures, from Node 1 SWIFTNET achieved (a) an R
update
0.42, which
185
0 10 20 30 40 50 60
0
50
100
150
200
250
300
350
400
Temperature (
o
C)
S
a
m
p
l
e

i
n
t
e
r
v
a
l

(
s
e
c
o
n
d
s
)
Reactivity of SWIFTNET
Figure 7.12: Dynamic sampling rate SWIFTNET
is more than half the percentage improvement with RE of 0.026 and (b) MAE of 0.5794
compared with the default adaptive prediction having RE of 0.0198 and MAE of 0.5135.
Although, the accuracy of the default prediction is slightly better than SWIFTNET,
the default prediction transmitted more data to achieve that level of accuracy. We
believe that the dierence in accuracy is not signicant compared to the amount of
energy saved by using SWIFTNET.
Similarly, from Node 2, SWIFTNET achieved an R
update
0.54 , RE of 0.0032 and
MAE of 0.121 compared with the default adaptive prediction having R
update
of 1, RE of
0.0055 and MAE of 0.212. Due to the higher level of sparsity that existed in the signal
logged by Node 2, SWIFTNET reconstruction is much better in terms of accuracy than
the default adaptive prediction; overall, both the energy saving and accuracy are in
favor of SWIFTNET; however, the dierence in accuracy is not signicant. Table 7.1(a)
shows an average summary result comparing SWIFTNET with the default prediction
method. The results are taken from 6 nodes chosen from our testbed. On average
SWIFTNET achieved over 50% improvement over the default prediction method used
without loss in accuracy. Both RE
diff
and MAE
diff
reect accuracy loss or gain
of SWIFTNET relative to the default prediction. A minus, i.e. - value, indicates
SWIFTNETs loss in accuracy relative to the default adaptive prediction. To have a
complete performance of the SWIFTNET protocol, we examine its reactivity to changes
in the signal trace.
186
Reactivity of SWIFTNET
Figure 7.12 depicts the reactivity of SWIFTNET using a real-world data trace from
one of our experiments. It can be seen that the sampling interval remains xed at
300 seconds during the CS data acquisition phase and changes immediately once a re
event signal is sensed at 40
o
C and above. The sampling rate automatically adapts to
the signal, in this case, the sampling interval increases and uctuates between 15 and
30 seconds. Similar performance on the reactivity of SWIFTNET is observed from
the other nodes. We expect that this behavior should be valid for a larger network
since our algorithm design is distributed and autonomous. Consequently all nodes can
adaptively adjust their sampling rate according to the respective phenomenon that
they monitor. It is worth mentioning here that, other adaptive sampling approaches
such as (Marbini and Sacks, 2003) can also be used on top of the prediction algorithm.
However, we believe that our approach is suitable for the wildre application use-case
and on our stack architecture framework. An open research direction in this area could
be to try out dierent adaptive sampling strategies on top of the prediction method for
dierent application setups. The goal could be to nd the optimal performance that
can be achieved with respect to the reactiveness and fault-tolerance. This could serve
as a guide to WSN developers and researchers in the eld.
7.6.4 Limitation of Approach
One of the few limitations of our experimental set-up is that in order to test the ecacy
of SWIFTNET, the re sources are generated using the heat gun. The reservation here
would be that the heat gun re source does not exhibit exactly the same intensity
as in a real wildre scenario, in which case the amplitude of the temperature may be
fast-changing within a short period of time. In addition, in the event of intense wildre
disasters, the air temperature might be very high over (100
o
C); as a consequence some
of the nodes could be physically damaged as a result of the very high temperature and
the data could be lost. To avoid this, it is envisaged that a very good thermal protective
cover would be used and the deployment could be dense, such that packet loss from
a few nodes would not greatly impact the information gathering process. Moreover,
we acknowledge that the experiments have been conducted on a small testbed of a few
nodes. In the future, it is our intention to extend this work to cover several nodes while
using a dierent application setup such as a micro-climate monitoring application.
187
7.7 Summary
This chapter is anchored on the improvement oered by using the prediction method
for data reduction as discussed in Chapter 6. This chapter proposed and implemented
a light-weight data acquisition algorithm termed SWIFTNET. One of the main contri-
butions of this work is that we have successfully employed a mix of two major elds of
data driven methods, i.e. 1) a data reduction method and 2) an energy-ecient data
acquisition method. Both categories have been widely used separately in various do-
mains. However, we have provided a holistic approach that combines a mix of ecient
algorithms in these categories to further optimize the energy consumption in a wire-
less sensor network deployment. This is achieved by building an adaptive prediction
method as a layer on top of a compressed sensing algorithm.
Unfortunately, attempts to optimize energy eciency is often in conict with the
goals of network reactiveness for alarms and urgent messages. Thus we presented
SWIFTNET, a data acquisition protocol for a fast-reactive network application. A
wildre monitoring application has been presented as a use-case for our design frame-
work to test the performance of SWIFTNET using a real-world deployment testbed.
The design method and implementation has been presented, followed by the perfor-
mance analysis. In summary, the performance of SWIFTNET proved to signicantly
improve the network lifetime of a WSN deployment compared with a default adaptive
prediction approach. On average over 50% improvement is achieved in terms of energy
savings, with no loss in accuracy over the default adaptive prediction approach that is
widely studied in literature. It is worth mentioning that, although, the signal sources
used are nearly sparse or exhibit an average sparsity rate, it is possible to reconstruct
the original signal using SWIFTNET at a desirable level of accuracy without signicant
loss.
In conclusion, this study reveals that the network lifetime of a WSN deployment
can be signicantly prolonged by using simple and yet powerful algorithms such as
SWIFTNET. These algorithm designs incur minimal cost and require no prior existing
knowledge of the monitoring phenomenon. Hence they are easily scalable for very large
deployments that are envisaged to span into decades with little or no human interven-
tion. An interesting future direction for this study would be to test the capability
of SWIFTNET on a larger network comprising hundreds of nodes and with respect
to dierent application scenarios, such as monitoring drastic changes in micro-climate
conditions indicating occupancy in a building. Similarly, as we mentioned previously,
188
a test of SWIFTNET on dierent network topologies could be an interesting direction.
However, we leave these topics as open research directions for the future.
189
Chapter 8
Conclusion and Future Work
8.1 Conclusion
Limiting energy consumption is one of the most pressing problems for many real-world
deployments of wireless sensor networks. Unfortunately, energy-eciency is often at the
expense of performance. Since sensor nodes are battery-powered, energy optimization
has been one of the main objectives for a robust protocol design. This thesis examined
some energy optimization methods viz, clustering schemes that have been employed
in both homogeneous and heterogeneous WSNs to improve the energy-eciency in a
hierarchically clustered deployment. Unfortunately, one of the main bottlenecks often
encountered in order to achieve a robust protocol design is energy-heterogeneity. If
energy-heterogeneity is not properly managed in the network, it can result in shorter
lifetime and to an uneven spread of energy consumption, thus facilitating coverage loss
in the network. This could be most detrimental to some real-world applications. In or-
der to overcome this bottleneck, various studies such as Heinzelman and Chandrakasan
(2002), Smaragdakis et al. (2004), Younis and Fahmy (2004), Qing et al. (2006), Adero-
hunmu (2010) etc., have proposed methods using probabilistic-based models that oer
promising performance for a clustered network. Although these protocols have been
able to reduce energy-heterogeneity in the network to some extent, such problems still
persist.
It is against this background that we proposed and developed a novel approach
called DEC: an adaptive and distributive clustering algorithm that is self-organizing
in a two-level hierarchy and it is suitable for both energy homogeneous and hetero-
geneous network settings. This idea particularly improved the LEACH protocol (a
pioneering scheme) by considering an energy heterogeneous environment, since the
LEACH protocol is designed for homogeneous application setup. As we have seen, the
190
LEACH design proves to be sub-optimal for an heterogeneous energy setup.
Although, both SEP (Smaragdakis et al., 2004) and SEP-E (Aderohunmu, 2010)
are proposed as improvements on the LEACH protocol, we have also shown from our
DEC protocol design in Chapter 3, that it is still possible to signicantly improve the
performance of these protocols in the presence of heterogeneity. The DEC protocol
is designed to better adapt the additional energy that could exist as a result of re-
energizing the network, hence, oers a longer network lifetime. The results and the
further analysis on coverage preservation and spatial analysis conducted in Chapter
4 strengthen the claim that DEC is more robust than the SEP-E, SEP and LEACH
protocols. Overall, we can summarize the behavior of DEC as follows:
1. DEC improves on some well-known clustering protocols by considering three-
energy node levels (a type of heterogeneity) in a single-hop communication net-
work among the cluster-heads. This approach extends the overall network lifetime
in the presence of both energy homogeneity and heterogeneity.
2. DEC solves the problem of energy gap that occurs especially in high energy
heterogeneity between the advanced nodes, intermediate nodes and the normal
nodes in LEACH, SEP and SEP-E by ensuring that only high energy nodes are
elected in each round as cluster-heads.
3. DEC elects cluster-heads using a deterministic approach. This is a deviation from
the probabilistic-based approach often used in the previous studies.
4. DEC oers that, the cluster-head election should be locally decided based on
each nodes residual energy, meaning each round should be independent from the
subsequent round unlike in LEACH, SEP and SEP-E;
5. DEC guarantees that an average of N
opt
cluster-heads is chosen throughout the
lifetime of the network operation.
In conclusion, the results revealed a better performance in favor of the DEC protocol
in all the cases considered.
Similarly, having realized the importance of coverage preservation and spatial dis-
tribution of energy as a quality of service (QoS) metric in WSNs, we investigated
empirically some well-known cluster-based protocols oering improved network life-
time in our domain. We integrated these metrics in our analysis and we presented
the performance of the DEC, SEP-E, SEP and LEACH protocols in Chapter 4. Our
191
experimental results revealed that DEC is able to oer better QoS in this respect com-
pared with SEP-E, SEP and LEACH. Similarly, SEP-E performs better than both
SEP and LEACH. This study further revealed that an energy heterogeneous-aware
protocol design is able to oer a prolonged coverage preservation and energy main-
tenance in the network. In addition, in order to test the level of signicance of the
performance of DEC and SEP-E over the other protocols, we conducted an analysis
of variance. Majority of the results favors DEC and SEP-E. This therefore points to
an important nding that, energy spread, coverage maintenance and network lifetime
are directly correlated with energy heterogeneity. Consequently, a robust protocol de-
sign should aim at balancing these components while taking into consideration the
problem of energy heterogeneity. Hence, an energy heterogeneous-aware protocol per-
forms better than energy homogeneous-aware protocols in terms of QoS as shown in
our experiments. It is worth mentioning here that we have not specically attempted
any mathematical framework for coverage optimization problems, as there are already
a number of existing proposed solutions. We have however demonstrated empirically
that it is possible to take advantage of energy heterogeneity in WSNs to achieve both
energy maintenance and coverage preservation simultaneously.
In order to further realize our goal of achieving an energy-ecient optimized proto-
col, we embarked on designing a light-weight forecasting algorithm for our application-
specic scenario in Chapter 6. A detailed comparison of existing schemes was conducted
and a Naive model was proposed as a solution. For the purpose of cross-validation,
we conducted extensive simulation studies using similar data traces often utilized in
previous literature. The results revealed that a simple but yet powerful Naive predic-
tion model is comparable in performance to the more complex models such as ARIMA,
LMS, ETS, WMA, AR etc., on our intelligent building and control monitoring ap-
plication presented in Chapter 5. In addition, for the proof of concept of our design
strategy, we implemented our algorithm design on a real-world deployment testbed by
using a 32-bit mote class device currently available in the market with an open source
Jennic software platform.
Since not much real-world implementation and testing is reported in existing stud-
ies, by conducting a real-world implementation, we have been able to show the prac-
ticability of these forecasting models often reported in literature. And we provided
new understanding of the research problem on forecasting models often employed in
WSN and hence, provided key substantial evidence on claims of the previous studies
done in this area. The results from our deployment support the simulation studies we
192
conducted. The experience from our experiments points to the fact that light-weight
models such as the Naive model are generally suitable for temperature and humid-
ity monitoring in buildings or ambient monitoring without losing much accuracy when
compared with more complex models. Furthermore, it is possible to limit oversampling
of data in such applications since most of the time, sampling between 10 seconds and
10 minutes does not necessarily translate into signicant loss in accuracy. However, a
higher sampling rate could lead to a higher energy consumption in the network. There-
fore, it is appropriate for engineers to have a balance between the sampling interval and
the performance requirement in mind, especially for long-term monitoring applications
that could span into decades with little or no constant human intervention.
Following our results in Chapter 6, we further optimized the energy consumption for
a monitoring application by over an additional 50% in Chapter 7. Our novel approach
called SWIFTNET was derived from a combination of a prediction method in Chapter
6 and a mix of compressive sensing and adaptive sampling techniques. In order to test
the performance of our method, a wildre monitoring application is adopted as a use-
case. The result is quite promising for our data acquisition protocol and it oers
that for any fast-reactive or event detection monitoring application, it is possible to
signicantly extend the network lifetime up to over 50% compared with an adaptive
prediction method. This is particularly an important result per se considering that
energy-eciency is one of the most pressing issues in the majority of the real-world
deployments. In order to verify our approach, a real-world deployment testbed was
used and the results are well justied. Enthused by the results from the performance of
SWIFTNET, it is our intention to pursue this further in a dierent practical application
scenario using hundreds of nodes.
8.2 Remarks
Here we remark on some likely implications of all our design methods as regards to
the system design and WSN deployment scenarios covered in this thesis. First, the
approaches and model designs adopted in this study clearly indicate that the network
lifetime of a WSN deployment can be signicantly extended using simple light-weight
prediction models in large-scale real-world deployments. Secondly, this study reveals
that WSN planners and engineers can easily adapt and/or reprogram the existing
commercially-o-the-shelf node platforms, such as the WISPES W24TH to achieve a
robust, self-congured and distributed wireless sensor network system using the open
193
source NXP/Jennic middleware. Our deployment indicates that a fast prototyping that
guarantees energy-eciency on the nodes is achievable. Lastly, our study serves as a
benchmark and a valuable tool for the current and future advances in this eld. As an
example, with the choice of a prediction model, researchers can refer to our solution for
a certain class of applications and/or deployment in a real-world scenario, such that
it can be taken as reference for further study and possible improvements. We believe
such reference point can drive further research and push the boundary for innovative
eorts on ways the use of WSN can benet users across several elds.
8.3 Future Research Direction
In this section we briey outline some promising areas that are open research issues
directly relevant to this thesis:
1. Generally, the majority of the solutions that oer clustering techniques for WSNs
justify their results with simulation studies. An interesting research direction
would be to explore a real-world implementation of these protocol designs. Sim-
ilarly, we have not exhaustively tried out dierent heterogeneity setups for DEC
and the simulations were conducted in a limited application scenario. A real-
world testbed deployment of the cluster-based protocols on nodes equipped with
energy harvesting capabilities can provide more insight on the operation of these
networks. In addition, it could shed more light on the implication of tuning each
parameter on a real-world scenario.
2. Similarly, following the DEC protocol design it is possible to extend DEC to
a multi-hierarchy and multi-level system where the communication method is
multi-hop or dual-hop instead of a single-hop. Here the intermediate nodes at
dierent stages of hierarchy can perform various functions such as ltering and
other signal processing tasks depending on the objectives in mind. An interesting
direction could be a combination of the data reduction methods such as prediction
with routing schemes such as clustering protocols.
3. A good exploitation of the system parameters in DEC i.e., transmission range,
node density and system-epoch, to nd the best possible optimal setting, could
also be researched further.
4. In light of the data reduction strategies, an interesting theme could be to design
and implement a dynamic online selection algorithm that further exploits Naive
194
prediction for a distributive WSN deployment. One way to accomplish this will be
to establish a switch between two modes i.e., the safe mode and help mode. The
Naive prediction model can be used as a xed model in the safe mode. However, if
the prediction continuously deviates from the sensed value which could be upper
bounded by the variance V ar
(UB)
of the data trace on n moving window, the
network can go into the help mode. In the help mode the operation will work
in a sense-transmit paradigm until the V ar
(UB)
condition is met and the network
will switch back to the safe mode. This way the WSN deployment can achieve
a further autonomous and distributed operation. However, the trade-o of using
only Naive prediction model should be compared with this approach. Obviously,
one of the advantages of using a dynamic online selection algorithm is that the
process becomes more general and can accomodate several application scenarios
rather than just using a pure prediction method.
5. Another interesting direction that can be explored could be to try out SWIFT-
NET on other network topologies such as tree topology or a clustered architecture.
The evaluation of the impact of SWIFTNET on these dierent topologies can be
useful for the actualization of this strategy on a larger network size.
6. Similarly, we have tested SWIFTNET on a wildre application using few nodes.
A study of SWIFTNET can be conducted in a dierent application scenarios
such as, testing drastic changes in micro-climate conditions indicating occupancy
in a building. This can further be deployed and tested on a larger number of
nodes. We evisage that the ndings can provide useful insights for Building and
Civil engineers. Similarly, another interesting open research direction in this area
can be to try out dierent adaptive sampling strategies on top of the prediction
method for dierent application setups. This could be aimed at nding an optimal
performance with respect to the reactiveness and the fault-tolerance that can be
achieved by integrating other existing adaptive sampling strategies. This can
serve as a guide to WSN developers.
7. An important future direction to further improve energy consumption in WSN
deployment would be to integrate some of the energy optimization approaches in
a cross-layered design fashion as we have done in Chapter 7 of this thesis. For
example, it has been shown that data reduction strategy can provide improve-
ment on network lifetime. Similarly, energy-ecient data acquisition is equally
195
promising to achieve an improved lifetime. An integration of some of the sub-
categories of these methods could be novel and promising to the future of the
WSN development.
8. Currently, the commercialization of wireless charging technology is growing. Hence,
a realization of such technology could provide a better solution to the energy is-
sues associated with WSN deployments. For example, WiTricity (Soljacic et al.,
2007) successfully demonstrated this idea and showed the possibilities of wire-
lessly charging gadgets such as mobile phones, TVs etc., without the need for a
battery source. Similarly, DELL technology
1
has successfully applied a similar
technique to their range of laptops. Other corporations such as POWERMAT
2
have been working on similar projects for other personal appliances. One way
this wireless charging technology can benet WSNs could be to use mobile relay
nodes as recharging hotspot, since the key constraint is battery-drainage of the
sensor nodes as the network evolves. One way to accomplish this is to use a
mobile sink or BS (since it is assumed to have unlimited power source) to period-
ically charge the sensor nodes at close proximity. The mobility of the sink could
be randomized or could be triggered by an event such as a dying sensor node,
depending on the optimization strategy in place. It is worth mentioning that the
mobility of the sensor nodes is currently a hot topic that deserves more atten-
tion. In the same fashion, the evolution of wireless charging technology promises
a long-term breakthrough for WSNs if properly leveraged and could drive new
research directions in the eld of wireless sensor networks.
As briey explained above, the robustness of any protocol design, whether in the
network layer or in the application layer, cannot be fully generalized, but it is most
likely that the application scenarios may dier signicantly especially in some instances
where it maybe impossible to access the sensor nodes after deployment. Hence, a robust
protocol design should be adapted to meet the requirements of the application in mind.
1
http://www.techradar.com/news/mobile-computing/laptops/dell-s-wireless-charging-laptop-
breaks-cover-639135
2
http://powermat.com/
196
References
Abrardo, A., Balucanti, L., Belleschi, M., Carretti, C., and Mecocci, A. (2010). Health
monitoring of architectural heritage: the case study of San Gimignano. In Environ-
mental Energy and Structural Monitoring Systems (EESMS), 2010 IEEE Workshop
on, 98102.
Aderohunmu, F., Balsamo, D., Paci, G., and Brunelli, D. (2013). Long Term WSN
Monitoring for Energy Eciency in EU Cultural Heritage Buildings. Technical re-
port, University of Otago, New Zealand and University of Bologna, Italy.
Aderohunmu, F., Deng, J., and Purvis, M. (2012). Optimization of Energy-ecient
Protocols with Energy-heterogeneity for Coverage Preservation in Wireless Sensor
Networks: An Empirical Study. In High Performance Computing and Communica-
tion 2012 IEEE 9th International Conference on Embedded Software and Systems
(HPCC-ICESS), 2012 IEEE 14th International Conference on, 11731178.
Aderohunmu, F., Paci, G., Benini, L., Deng, J., and Brunelli, D. (2013). SWIFTNET:
A data acquisition protocol for fast-reactive monitoring applications. In Industrial
Embedded Systems (SIES), 2013 8th IEEE International Symposium on, 9396.
Aderohunmu, F., Paci, G., Brunelli, D., Deng, J., and Benini, L. (2013). Prolonging
the lifetime of wireless sensor networks using light-weight forecasting algorithms. In
Intelligent Sensors, Sensor Networks and Information Processing, 2013 IEEE Eighth
International Conference on, 461466.
Aderohunmu, F. A. (2010). Energy Management Techniques in Wireless Sensor Net-
works: Protocol Design and Evaluation. Masters thesis, University of Otago, New
Zealand.
197
Aderohunmu, F. A., Deng, J. D., and Purvis, M. (2011a). Enhancing Clustering in
Wireless Sensor Networks with Energy Heterogeneity. Int. J. Bus. Data Commun.
Netw., 7(4), 1831.
Aderohunmu, F. A., Deng, J. D., and Purvis, M. K. (2011b). A Deterministic Energy-
ecient Clustering Protocol for Wireless Sensor Networks. In Seventh International
Conference on Intelligent Sensors, Sensor Networks and Information Processing
(ISSNIP), 341 346.
Aderohunmu, F. A., Paci, G., Brunelli, D., Deng, J., Benini, L., and Purvis, M. (2013a).
Trade-os of Forecasting Algorithm for Extending WSN Lifetime in a Real-World
Deployment. In Distributed Computing in Sensor Systems (DCOSS), 2013 IEEE
International Conference on, 283285.
Aderohunmu, F. A., Paci, G., Brunelli, D., Deng, J. D., Benini, L., and Purvis, M.
(2013b). An Application-Specic Forecasting Algorithm for Extending WSN Life-
time. In Distributed Computing in Sensor Systems (DCOSS), 2013 IEEE Interna-
tional Conference on, 374381.
Agrawal, D. and Zeng, Q. (2010). Introduction to Wireless and Mobile Systems. Cen-
gage Learning.
Akyildiz, I. F., Su, W., Sankarasubramaniam, Y., and Cayirci, E. (2002a). A Survey
on Sensor Networks. IEEE Communications Magazine, 40, 102114.
Akyildiz, I. F., Su, W., Sankarasubramaniam, Y., and Cayirci, E. (2002b). Wireless
sensor networks: a survey. Computer Networks, 38, 393422.
Al-karaki, J. N. and Kamal, A. E. (2004). Routing Techniques in Wireless Sensor
Networks: A Survey. IEEE Wireless Communications, 11, 628.
Alippi, C., Anastasi, G., Di Francesco, M., and Roveri, M. (2010). An Adaptive
Sampling Algorithm for Eective Energy Management in Wireless Sensor Networks
With Energy-Hungry Sensors. Instrumentation and Measurement, IEEE Transac-
tions on, 59(2), 335344.
198
Alippi, C., Anastasi, G., Galperti, C., Mancini, F., and Roveri, M. (2007). Adaptive
Sampling for Energy Conservation in Wireless Sensor Networks for Snow Monitor-
ing Applications. In Mobile Adhoc and Sensor Systems, 2007. MASS 2007. IEEE
Internatonal Conference on, 16.
Anastasi, G., Conti, M., Di Francesco, M., and Passarella, A. (2009). Energy Conser-
vation in Wireless Sensor Networks: A Survey. Ad Hoc Networks, 7(3), 537568.
Anastasi, G., Lo Re, G., and Ortolani, M. (2009). WSNs for Structural Health Mon-
itoring of Historical Buildings. In Human System Interactions, 2009. HSI 09. 2nd
Conference on, 574579.
Armstrong, J. S. (1985). Long-Range Forecasting: From Crystal Ball to Computer
(2nd Edition ed.). New York: John Wiley.
Askari Moghadam, R. and Keshmirpour, M. (2011). Hybrid ARIMA and Neural Net-
work Model for Measurement Estimation in Energy-Ecient Wireless Sensor Net-
works. In Informatics Engineering and Information Science, Volume 253 of Commu-
nications in Computer and Information Science, 3548. Springer Berlin Heidelberg.
Axs ater, S. (2007). Inventory Control. International series in operations research &
management science. Springer.
Baek, S. J., De Veciana, G., and Su, X. (2004). Minimizing energy consumption in
large-scale sensor networks through distributed data compression and hierarchical
aggregation. Selected Areas in Communications, IEEE Journal on, 22(6), 1130
1140.
Bandyopadhyay, S. and Coyle, E. J. (April 2003). An Energy Ecient Hierarchical
Clustering Algorithm for Wireless Sensor Networks. In Proceedings of IEEE INFO-
COM, 17131723.
Baronti, P., Pillai, P., Chook, V. W. C., Chessa, S., Gotta, A., and Hu, Y. F. (2007).
Wireless sensor networks: A survey on the state of the art and the 802.15.4 and
ZigBee standards. Computer Communication, 30(7), 16551695.
199
Blum, L., Blum, M., and Shub, M. (1986). A simple unpredictable pseudo random
number generator. SIAM J. Comput., 15(2), 364383.
Box, G., Jenkins, G. M., and Reinsel, G. C. (June 30, 2008). Time Series Analysis:
Forecasting and Control (Wiley Series in Probability and Statistics). Wiley Series, 4
edition.
Braginsky, D. and Estrin, D. (2002). Rumor Routing Algorithm for Sensor Networks.
In First Workshop on Sensor Networks and Application (WSNA), 2231.
Brunelli, D., Dondi, D., Bertacchini, A., Larcher, L., Pavan, P., and Benini, L. (2008).
Photovoltaic Scavenging Systems: Modeling and Optimization. Microelectronics
Journal , 40(9), 1337 1344.
Caione, C., Brunelli, D., and Benini, L. (2010). Compressive sensing optimization
over ZigBee networks. In Industrial Embedded Systems (SIES), 2010 International
Symposium on, 36 44.
Candes, E. and Romberg, J. (2005). l
1
-magic: Recovery of Sparse Signals via Convex
Programming. Technical report, California Institute of Technology, USA.
Candes, E. and Romberg, J. (2007). Sparsity and incoherence in compressive sampling.
Inverse Problems, 23, 969985.
Candes, E., Romberg, J., and Tao, T. (2006). Robust uncertainty principles: exact
signal reconstruction from highly incomplete frequency information. Information
Theory, IEEE Transactions on, 52(2), 489 509.
Candes, E. and Tao, T. (2005). Decoding by linear programming. Information Theory,
IEEE Transactions on, 51(12), 42034215.
Candes, E. and Tao, T. (2007). The Dantzig selector: Statistical estimation when p is
much larger than n. The Annals of Statistics, 35(6), 23132351.
Candes, E. and Wakin, M. (2008). An Introduction To Compressive Sampling. Signal
Processing Magazine, IEEE, 25(2), 21 30.
200
Cardei, M. and Wu, J. (2006). Energy-ecient coverage problems in wireless ad-hoc
sensor networks. Computer Communications, 29(4), 413 420.
Carli, D., Brunelli, D., Bertozzi, D., and Benini, L. (2010). A high-eciency wind-
ow energy harvester using micro turbine. In Power Electronics Electrical Drives
Automation and Motion (SPEEDAM), 2010 International Symposium on, 778 783.
Chamam, A. and Pierre, S. (2008). Power-Ecient Clustering in Wireless Sensor
Networks under Coverage Constraint. In Networking and Communications, 2008.
WIMOB 08. IEEE International Conference on Wireless and Mobile Computing,,
460465.
Chen, J. and Koutsoukos, X. (2007). Survey on Coverage Problems in Wireless Ad
Hoc Sensor Networks. Technical report, California Institute of Technology, USA.
Chen, S. S., Donoho, D. L., Michael, and Saunders, A. (1998). Atomic decomposition
by basis pursuit. SIAM Journal on Scientic Computing, 20, 3361.
Chen, Y. P., Liestman, A. L., and Liu, J. (2005). Energy-Ecient Data Aggregation
Hierarchy for Wireless Sensor Networks. In Proceedings of the Second International
Conference on Quality of Service in Heterogeneous Wired/Wireless Networks, Wash-
ington, DC, USA, 7. IEEE Computer Society.
Chou, C. T., Rana, R., and Hu, W. (2009). Energy ecient information collection
in wireless sensor networks using adaptive compressive sensing. In Local Computer
Networks, 2009. LCN 2009. IEEE 34th Conference on, 443 450.
Cochran, W. G. (1934). The distribution of quadratic forms in a normal system, with
applications to the analysis of covariance. Mathematical Proceedings of the Cambridge
Philosophical Society, 30(2), 178191.
Comeau, F. (2008). Optimal Clustering in Wireless Sensor Networks Employing Dier-
ent Propagation Models And Data Aggregation Techniques. Ph. D. thesis, Dalhousie
University, Halifax, Nova Scotia.
201
DAmato, F., Gamba, P., and Goldoni, E. (2012). Monitoring heritage buildings and
artworks with Wireless Sensor Networks. In Environmental Energy and Structural
Monitoring Systems (EESMS), 2012 IEEE Workshop on, 16.
Daz-Ramrez, A., Murrieta, F. N., Atempa, J. A., and Bonino, F. A. (2013). Non-
intrusive Tracking of Patients With Dementia Using a Wireless Sensor Network. In
The 7th International Workshop on Wireless Sensor, Actuator and Robot Networks
(WiSARN) held in conjunction with IEEE DCOSS 2013, 460465.
Deshpande, A., Guestrin, C., Madden, S. R., Hellerstein, J. M., and Hong, W. (2004).
Model-driven data acquisition in sensor networks. In Proceedings of the Thirtieth
international conference on Very large data bases - Volume 30, VLDB 04, 588599.
VLDB Endowment.
Di Paola, D., Naso, D., Milella, A., Cicirelli, G., and Distante, A. (2008). Multi-
Sensor Surveillance of Indoor Environments by an Autonomous Mobile Robot. In
Mechatronics and Machine Vision in Practice, 2008. M2VIP 2008. 15th Interna-
tional Conference on, 2328.
Ding, J. (2002). Design and Analysis of an Integrated MAC and Routing Protocol
Framework for Large-Scale Multi-Hop Wireless Sensor Network. Technical report,
University of Maryland, Baltimore.
Dondi, D., Bertacchini, A., Larcher, L., Pavan, P., Brunelli, D., and Benini, L. (2008).
A solar energy harvesting circuit for low power applications. In Sustainable Energy
Technologies, 2008. ICSET 2008. IEEE International Conference on, 945 949.
Dong, D., Liao, X., Liu, K., Liu, Y., and Xu, W. (2012). Distributed Coverage in Wire-
less Ad Hoc and Sensor Networks by Topological Graph Approaches. Computers,
IEEE Transactions on, 61(10), 14171428.
Donoho, D. L. (2006). Compressed sensing. IEEE Transactions on Information The-
ory, 52(4), 12891306.
Doolin, D. M. and Sitar, N. (2005). Wireless sensors for wildre monitoring. In
SPIE 5765, Smart Structures and Materials 2005: Sensors and Smart Structures
Technologies for Civil, Mechanical, and Aerospace Systems, 477484.
202
Duarte, M. and Eldar, Y. (2011). Structured Compressed Sensing: From Theory to
Applications. Signal Processing, IEEE Transactions on, 59(9), 40534085.
Edara, P., Limaye, A., and Ramamritham, K. (2008). Asynchronous In-network Pre-
diction: Ecient Aggregation in Sensor Networks. ACM Trans. Sen. Netw., 4(4),
25:125:34.
Ferrari, F., Zimmerling, M., Thiele, L., and Saukh, O. (2011). Ecient network ooding
and time synchronization with Glossy. In IPSN, 7384.
Gamwarige, S. and Kulasekere, C. (2005). An algorithm for energy driven cluster head
rotation in a distributed wireless sensor network. In Proceeding of the International
Conference on Information and Automation, 354359.
Gardner, E. S. (1985). CUSUM vs Smoothed-Error Forecast Monitoring Schemes:
Some Simulation Results. The Journal of the Operational Research Society, 36(1),
4347.
Gehrke, J. and Madden, S. (2004). Query processing in sensor networks. Pervasive
Computing, IEEE, 3(1), 4655.
George, S., Zhou, W., Chenji, H., Won, M., Lee, Y. O., Pazarloglou, A., Stoleru, R.,
and Barooah, P. (2010). DistressNet: a wireless ad hoc and sensor network archi-
tecture for situation management in disaster response. Communications Magazine,
IEEE, 48(3), 128 136.
Ghasemzadeh, H., Guenterberg, E., and Jafari, R. (2009). Energy-ecient information-
driven coverage for physical movement monitoring in body sensor networks. IEEE
J.Sel. A. Commun., 27(1), 5869.
Gorodnitsky, I. and Rao, B. (1997). Sparse signal reconstruction from limited data
using FOCUSS: a re-weighted minimum norm algorithm. Signal Processing, IEEE
Transactions on, 45(3), 600616.
Haase, M. and Timmermann, D. (2002). Low energy adaptive clustering hierarchy with
deterministic cluster-head selection. In Proceedings of IEEE Conference on Mobile
and Wireless Communications Networks, (MWCN), 02, 368372. IEEE.
203
Hartung, C., Han, R., Seielstad, C., and Holbrook, S. (2006). FireWxNet: a multi-
tiered portable wireless system for monitoring weather conditions in wildland re
environments. In Proceedings of the 4th international conference on Mobile systems,
applications and services, MobiSys 06, New York, NY, USA, 2841. ACM.
Haykin, S. (2008). Neural Networks and Learning Machines (3 ed.). Prentice Hall.
Heinzelman, W., Chandrakasan, A., and Balakrishnan, H. (2000). Energy-ecient
communication protocol for wireless microsensor networks. In System Sciences, 2000.
Proceedings of the 33rd Annual Hawaii International Conference on, 10 pp. vol.2.
Heinzelman, W. R. and Chandrakasan, P. (2002). An Application-Specic Protocol
Architectures for Wireless Networks. IEEE Transactions on Wireless Communica-
tions, 1, 660670.
Heinzelman, W. R., Kulik, J., and Balakrishnan, H. (1999). Adaptive protocols for
information dissemination in wireless sensor networks. In Proceedings of the 5th
annual ACM/IEEE international conference on Mobile computing and networking,
MobiCom 99, New York, NY, USA, 174185. ACM.
Honig, M., Messerschmitt, D., Kirsteins, I., and Quazi, A. (1987). Adaptive Filters;
Structures, Algorithms, and Applications by M. Honig and D. Messerschmitt. The
Journal of the Acoustical Society of America, 81(2), 578578.
Hu, W., Dinh, T. L., Corke, P., and Jha, S. (2012). Outdoor Sensornet Design and
Deployment: Experiences from a Sugar Farm. Pervasive Computing, IEEE, 11(2),
8291.
Hyndman, R. J. and Athanasopoulos, G. (2012). Forecasting: principles and practice.
An online textbook; http://otexts.com/fpp/2/5/ [Online; accessed 2-Sept-2012] .
Intanagonwiwat, C., Govindan, R., Estrin, D., Heidemann, J., and Silva, F. (2003).
Directed diusion for wireless sensor networking. IEEE/ACM Trans. Netw., 11(1),
216.
204
Islam, A. B. M. A. A., Hyder, C. S., Kabir, H., and Naznin, M. (2010). Finding
the Optimal Percentage of Cluster Heads from a New and Complete Mathematical
Model on LEACH. Wireless Sensor Network, 2(2), 129140.
Jain, A. and Chang, E. Y. (2004). Adaptive sampling for sensor networks. In Proceeed-
ings of the 1st international workshop on Data management for sensor networks: in
conjunction with VLDB 2004, DMSN 04, New York, NY, USA, 1016. ACM.
Jain, A., Chang, E. Y., and Wang, Y.-F. (2004). Adaptive stream resource manage-
ment using Kalman Filters. In Proceedings of the 2004 ACM SIGMOD international
conference on Management of data, SIGMOD 04, New York, NY, USA, 1122.
ACM.
Jamthe, A., Chakraborty, S., Ghosh, S. K., and Agrawal, D. P. (2013). An imple-
mentation of Wireless Sensor Networks in monitoring of Parkinsons Patients using
Received Signal Strength Indicator. In The 7th International Workshop on Wireless
Sensor, Actuator and Robot Networks (WiSARN) held in conjunction with IEEE
DCOSS 2013, 442447.
Jiang, H., Jin, S., and Wang, C. (2011). Prediction or Not? An Energy-Ecient Frame-
work for Clustering-Based Data Collection in Wireless Sensor Networks. Parallel and
Distributed Systems, IEEE Transactions on, 22(6), 1064 1071.
Kasbekar, G. S., Bejerano, Y., and Sarkar, S. (2009). Lifetime and coverage guarantees
through distributed coordinate-free sensor activation. In Proceedings of the 15th
annual international conference on Mobile computing and networking, MobiCom 09,
New York, NY, USA, 169180. ACM.
Kijewski-correa, T., Haenggi, M., and Antsaklis, P. (2006). Multi-Scale Wireless Sensor
Networks for Structural Health Monitoring. In Proceedings of SHM-II05, 1618.
Kim, K. T. and Youn, H. Y. (2005). Energy-Driven Adaptive Clustering Hierarchy
EDACH for Wireless Sensor Networks. In EUC Workshops, 10981107.
Kim, S., Pakzad, S., Culler, D., Demmel, J., Fenves, G., Glaser, S., and Turon, M.
(2007). Health monitoring of civil infrastructures using wireless sensor networks. In
205
Proceedings of the 6th international conference on Information processing in sensor
networks, IPSN 07, New York, NY, USA, 254263. ACM.
Kirkpatrick, S., Gelatt, C. D., and Vecchi, M. P. (1983). Optimization by Simulated
Annealing. Science, 220(4598), 671680.
Krishnamachari, B., Estrin, D., and Wicker, S. B. (2002). The Impact of Data Ag-
gregation in Wireless Sensor Networks. In ICDCSW 02: Proceedings of the 22nd
International Conference on Distributed Computing Systems, Washington, DC, USA,
575578. IEEE Computer Society.
Le Borgne, Y.-A., Santini, S., and Bontempi, G. (2007). Adaptive model selection for
time series prediction in wireless sensor networks. Signal Process., 87(12), 30103020.
Li, C., Ye, M., and Chen, G. (2005). An Energy-Ecient Unequal Clustering Mecha-
nism for Wireless Sensor Networks. In Proceeding of IEEE MASS, 317.
Li, S. and Qi, H. (2013). Distributed Data Aggregation for Sparse Recovery in Wireless
Sensor Networks. In The IEEE International Conference on Distributed Computing
in Sensor Systems (DCOSS), 6269.
Li, Y., Wang, Z., and Song, Y. (2006). Wireless Sensor Network Design for Wildre
Monitoring. In Intelligent Control and Automation, 2006. WCICA 2006. The Sixth
World Congress on, Volume 1, 109 113.
Liggins, M., Hall, D., and Llinas, J. (2008). Handbook of Multisensor Data Fusion:
Theory and Practice, Second Edition. Electrical Engineering & Applied Signal Pro-
cessing Series. Taylor & Francis.
Liu, C. and Cao, G. (2011). Spatial-Temporal Coverage Optimization in Wireless
Sensor Networks. Mobile Computing, IEEE Transactions on, 10(4), 465478.
Liu, C., Wu, K., and Tsao, M. (2005). Energy ecient information collection with the
ARIMA model in wireless sensor networks. In Global Telecommunications Confer-
ence, 2005. GLOBECOM 05. IEEE, Volume 5, 5 pp.2474.
Luo, C., Wu, F., Sun, J., and Chen, C. W. (2009). Compressive data gathering for
large-scale wireless sensor networks. In Proceedings of the 15th annual international
206
conference on Mobile computing and networking, MobiCom 09, New York, NY, USA,
145156. ACM.
Lynch, J. P. (2004). Overview of wireless sensors for real-time health monitoring of
civil structures. In The 4th International Workshop on Structural Control.
Madden, S. and Franklin, M. (2002). Fjording the stream: an architecture for queries
over streaming sensor data. In Data Engineering, 2002. Proceedings. 18th Interna-
tional Conference on, 555 566.
Madden, S., Franklin, M. J., Hellerstein, J. M., and Hong, W. (2002). TAG: a Tiny
AGgregation service for ad-hoc sensor networks. SIGOPS Oper. Syst. Rev., 36(SI),
131146.
Madden, S., Szewczyk, R., Franklin, M., and Culler, D. (2002). Supporting aggregate
queries over ad-hoc wireless sensor networks. In Mobile Computing Systems and
Applications, 2002. Proceedings Fourth IEEE Workshop on, 49 58.
Malhotra, B., Nascimento, M., and Nikolaidis, I. (2011). Exact Top-K Queries in
Wireless Sensor Networks. Knowledge and Data Engineering, IEEE Transactions
on, 23(10), 15131525.
Marbini, A. D. and Sacks, L. E. (2003). Adaptive sampling mechanisms in sensor
networks. Technical report, University College London, UK.
Martinez, K., Hart, J., and Ong, R. (2004). Environmental sensor networks. Com-
puter, 37(8), 5056.
Matos, T. B., Brayner, A., and Maia, J. E. B. (2010). Towards in-network data
prediction in wireless sensor networks. In Proceedings of the 2010 ACM Symposium
on Applied Computing, SAC 10, New York, NY, USA, 592596. ACM.
Matsumoto, M. and Nishimura, T. (1998). Mersenne twister: a 623-dimensionally
equidistributed uniform pseudo-random number generator. ACM Trans. Model.
Comput. Simul., 8(1), 330.
Meguerdichian, S., Koushanfar, F., Potkonjak, M., and Srivastava, M. B. (2001). Cov-
erage problems in wireless ad-hoc sensor networks. In INFOCOM 2001. Twentieth
207
Annual Joint Conference of the IEEE Computer and Communications Societies.
Proceedings. IEEE, Volume 3, 13801387.
Mhatre, V. and Rosenberg, C. (2004). Design guidelines for wireless sensor networks:
communication, clustering and aggregation. Ad Hoc Networks Journal, Elsevier
Science, 2, 4563.
Min, J., Kim, J., and Kwon, Y. (2012). Data Compression Technique for Wireless
Sensor Networks. In G. Lee, D. Howard, J. Kang, and D. lzak (Eds.), Convergence
and Hybrid Information Technology, Volume 7425 of Lecture Notes in Computer
Science, 916. Springer Berlin Heidelberg.
Mohimani, H., Babaie-Zadeh, M., and Jutten, C. (2009). A Fast Approach for Over-
complete Sparse Decomposition Based on Smoothed l
0
Norm. Signal Processing,
IEEE Transactions on, 57(1), 289301.
Moschytz, G. and Hofbauer, M. (2000). Adaptive Filters. Berlin: Springer Verlag.
Needell, D. and Vershynin, R. (2010). Signal Recovery From Incomplete and Inaccurate
Measurements Via Regularized Orthogonal Matching Pursuit. Selected Topics in
Signal Processing, IEEE Journal of , 4(2), 310316.
Padhy, P., Dash, R., Martinez, K., and Jennings, N. R. (2006). A utility-based sens-
ing and communication model for a glacial sensor network. In 5th Int. Conf. on
Autonomous Agents and Multi-Agent Systems, 13531360.
Porcarelli, D., Brunelli, D., Magno, M., and Benini, L. (2012). A Multi-Harvester ar-
chitecture with hybrid storage devices and smart capabilities for low power systems.
In Power Electronics, Electrical Drives, Automation and Motion (SPEEDAM), 2012
International Symposium on, 946 951.
Qing, L., Zhu, Q., and Wang, M. (2006). Design of a distributed energy-ecient
clustering algorithm for heterogeneous wireless sensor networks. Computer Commu-
nication, 29, 22302237.
208
Raty, T. (2010). Survey on Contemporary Remote Surveillance Systems for Public
Safety. Systems, Man, and Cybernetics, Part C: Applications and Reviews, IEEE
Transactions on, 40(5), 493515.
Raza, U., Camerra, A., Murphy, A., Palpanas, T., and Picco, G. (2012). What does
model-driven data acquisition really achieve in wireless sensor networks? In Perva-
sive Computing and Communications (PerCom), 2012 IEEE International Confer-
ence on, 85 94.
Sadler, C. M. and Martonosi, M. (2006). Data Compression Algorithms for Energy-
Constrained Devices in Delay Tolerant Networks. In Proceedings of the ACM Con-
ference on Embedded Networked Sensor Systems (SenSys), 265278.
Santini, S. and Romer, K. (2006). An Adaptive Strategy for Quality-Based Data
Reduction in Wireless Sensor Networks. In Proceedings of the 3rd International
Conference on Networked Sensing Systems (INSS), 2936.
Schurgers, C. and Srivastava, M. (2001). Energy ecient routing in wireless sensor
networks. In Military Communications Conference, 2001. MILCOM 2001. Commu-
nications for Network-Centric Operations: Creating the Information Force. IEEE,
Volume 1, 357361 vol.1.
Sha, K., Shi, W., and Watkins, O. (2006). Using Wireless Sensor Networks for Fire Res-
cue Applications: Requirements and Challenges. In Electro/information Technology,
2006 IEEE International Conference on, 239 244.
Shah, R. and Rabaey, J. (2002). Energy aware routing for low energy ad hoc sensor net-
works. In Wireless Communications and Networking Conference, 2002. WCNC2002.
2002 IEEE, Volume 1, 350355 vol.1.
Shen, Y., Hu, W., Rana, R., and Chou, C. (2013). Nonuniform Compressive Sensing for
Heterogeneous Wireless Sensor Networks. Sensors Journal, IEEE, 13(6), 21202128.
Shepard, T. J. (1996). A Channel Access Scheme for Large Dense Packet Radio Net-
works. In In Proceeding ACM SIGCOMM, 219230.
209
Shnayder, V., rong Chen, B., Lorincz, K., Fulford-Jones, T. R. F., and Welsh, M.
(2005). Sensor Networks for Medical Care. Report tr-08-05, Harvard University.
Simon, G., Mar oti, M., Ledeczi, A., Balogh, G., Kusy, B., N adas, A., Pap, G., Sallai,
J., and Frampton, K. (2004). Sensor network-based countersniper system. In Pro-
ceedings of the 2nd international conference on Embedded networked sensor systems,
SenSys 04, New York, NY, USA, 112. ACM.
Sin, H., Lee, S., Lee, J., Yoo, S., Lee, S., Lee, J., and Kim, S. (2008). Self-organized
Cluster Based Multi-hop Routing for Wireless Sensor Networks. In APNOMS 08:
Proceedings of the 11th Asia-Pacic Symposium on Network Operations and Man-
agement, Berlin, Heidelberg, 499502. Springer-Verlag.
Smaragdakis, G., Matta, I., and Bestavros, A. (2004). SEP: A Stable Election Protocol
for clustered heterogeneous wireless sensor networks. In Proceeding of the Interna-
tional Workshop on SANPA.
Soljacic, M., Kurs, A., Karalis, A., Moatt, R., Fisher, P., and Joannopoulos, J.
(2007). Goodbye wires. Technical report, Massachusetts Institute of Technology.
www.web.mit.edu/newsoce/2007/wireless-0607.html.
Soro, S. and Heinzelman, W. B. (2009). Cluster head election techniques for coverage
preservation in wireless sensor networks. Ad Hoc Netw., 7(5), 955972.
Suzuki, M., Saruwatari, S., Kurata, N., and Morikawa, H. (2007). A high-density
earthquake monitoring system using wireless sensor networks. In Proceedings of the
5th international conference on Embedded networked sensor systems, SenSys 07,
New York, NY, USA, 373374. ACM.
Thai, M. T., Wang, F., Du, D. H., and Jia, X. (2008). Coverage problems in wire-
less sensor networks: designs and analysis. International Journal of Sensor Net-
works, 3(3), 191200.
Thanh, M. H., Lee, K. Y., Lee, Y. W., and Kim, M. (2009). Processing Top-k Monitor-
ing Queries in Wireless Sensor Networks. In Sensor Technologies and Applications,
2009. SENSORCOMM 09. Third International Conference on, 545552.
210
Tropp, J. A., Anna, and Gilbert, C. (2007). Signal recovery from random measurements
via Orthogonal Matching Pursuit. IEEE Trans. Inform. Theory, 53, 46554666.
Tseng, Y.-C., Wang, Y.-C., Cheng, K.-Y., and Hsieh, Y.-Y. (2007). iMouse: An
Integrated Mobile Surveillance and Wireless Sensor System. Computer, 40(6), 60
66.
Tulone, D. and Madden, S. (2006). PAQ: Time Series Forecasting for Approximate
Query Answering in Sensor Networks. In Wireless Sensor Networks, Volume 3868,
2137. Springer Berlin Heidelberg.
Vaidyanathan, K., Sur, S., Narravula, S., and Sinha, P. (2004). Data Aggregation
techniques in Sensor Networks. Osu-cisrc-11/04-tr60, The Ohio State University.
Vincze, Z. and Vida, R. (2005). Multi-hop wireless sensor networks with mobile sink.
In CoNEXT 05: Proceedings of the 2005 ACM conference on Emerging network
experiment and technology, New York, NY, USA, 302303. ACM.
Wark, T., Corke, P., Sikka, P., Klingbeil, L., Guo, Y., Crossman, C., Valencia, P.,
Swain, D., and Bishop-Hurley, G. (2007). Transforming agriculture through pervasive
wireless sensor networks. IEEE Pervasive Computing, 6(2), 5057.
Wijesinghe, W., Jayananda, M., and Sonnadara, D. (2006). Hardware implementation
of random number generators. Technical report, Institute of Physics, Sri Lanka.
Willett, R., Martin, A., and Nowak, R. (2004). Backcasting: adaptive sampling for
sensor networks. In Information Processing in Sensor Networks, 2004. IPSN 2004.
Third International Symposium on, 124133.
Woeginger, G. J. (2003). Exact algorithms for NP-hard problems: a survey. In
M. J unger, G. Reinelt, and G. Rinaldi (Eds.), Combinatorial optimization - Eureka,
you shrink!, 185207. New York, NY, USA: Springer-Verlag New York, Inc.
Wood, A., Virone, G., Doan, T., Cao, Q., Selavo, L., Wu, Y., Fang, L., He, Z., Lin, S.,
and Stankovic, J. (2006). ALARM-NET: Wireless sensor networks for assisted-living
and residential monitoring. Technical report, University of Virginia.
211
Wu, X. and Liu, M. (2012). In-situ soil moisture sensing: measurement scheduling
and estimation using compressive sensing. In Proceedings of the 11th international
conference on Information Processing in Sensor Networks, IPSN 12, New York, NY,
USA, 112. ACM.
Xiangning, F. and Yulin, S. (2007). Improvement on LEACH Protocol of Wireless
Sensor Network. In SENSORCOMM 07: Proceedings of the 2007 International
Conference on Sensor Technologies and Applications, Washington, DC, USA, 260
264. IEEE Computer Society.
Yang, C., Cardell-Oliver, R., and McDonald, C. (2011). Combining temporal and
spatial data suppression for accuracy and eciency. In Intelligent Sensors, Sensor
Networks and Information Processing (ISSNIP), 2011 Seventh International Con-
ference on, 347 352.
Yao, Y. and Gehrke, J. (2002). The cougar approach to in-network query processing
in sensor networks. SIGMOD Rec., 31(3), 918.
Yao, Y. and Gehrke, J. (2003). Query Processing for Sensor Networks. In Proceedings
of the 2003 CIDR Conference.
Younis, O. and Fahmy, S. (2004). HEED: A Hybrid, Energy-Ecient, Distributed
Clustering Approach for Ad Hoc Sensor Networks. IEEE Transactions on Mobile
Computing, 3, 366379.
Yu, N. Y. (2011). Additive Character Sequences with Small Alphabets for Compressed
Sensing Matrices. In Acoustics, Speech and Signal Processing (ICASSP), 2011 IEEE
International Conference on, 29322935.
Zhang, H. and Shen, H. (2010). Energy-Ecient Beaconless Geographic Routing in
Wireless Sensor Networks. Parallel and Distributed Systems, IEEE Transactions
on, 21(6), 881896.
Zhang, H., Shen, H., and Tan, Y. (2007). Optimal Energy Balanced Data Gathering in
Wireless Sensor Networks. In Parallel and Distributed Processing Symposium, 2007.
IPDPS 2007. IEEE International, 110.
212
Zhou, J. and De Roure, D. (2007). FloodNet: coupling adaptive sampling with energy
aware routing in a ood warning system. J. Comput. Sci. Technol., 22(1), 121130.
Zonta, D., Pozzi, M., and Zanon, P. (2008). Managing the Historical Heritage Using
Distributed Technologies. International Journal of Architectural Heritage, 2(3), 200
225.
213
Appendix A
Source Code for Experiments
A.1 MATLAB scripts
A.1.1 DEC code
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% DEC: A Deterministic Energy-efficient Clustering Protocol for %
% wireless sensor networks %
% %
% (c) Femi Aderohunmu : 2011 @IEEE ISSNIP %
% Information Science Department, University of otago. %
% %
% To report your comment or any bug please send e-mail to: %
10 % afemi@infoscience.otago.ac.zn %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Field Dimensions - x and y maximum (in meters)
xm=100;
20 ym=100;
%x and y Coordinates of the Sink
sink.x=0.5*xm;
sink.y=0.5*ym;
%Number of Nodes in the field
n=100;
%Optimal Election Probability of a node to become cluster head
30 p=0.1;
%Energy Model (all values in Joules) Initial Energy
Eo=0.5;
%Eelec=Etx=Erx
ETX=50*0.000000001;
ERX=50*0.000000001;
%Transmit Amplifier types
Efs=10*0.000000000001;
Emp=0.0013*0.000000000001;
%Data Aggregation Energy
40 EDA=5*0.000000001;
%Values for Hetereogeneity
%Percentage of nodes than are advanced
m=0.2;
%Percentage of nodes than are intermediate
214
x=0.3;
%\alpha
a=3;
%Beta
50 b=1.5;
%maximum number of rounds
rmax=4000;
%variables
Ave_CH=0;
sum=0;
count_ch=0;
Throughput=0;
% packets size
Packet=4000;
60 %%%%%%%%%%%%%%%%%%%%%%%%% END OF PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%
%Computation of do
do=sqrt(Efs/Emp);
%Creation of the random Sensor Network
figure(1);
rand(seed,777) %You can change the seed to have different positions for the node
for i=1:1:n
S(i).xd=rand(1,1)*xm;
70 XR(i)=S(i).xd;
S(i).yd=rand(1,1)*ym;
YR(i)=S(i).yd;
S(i).G=0;
S(i).E=0;
%initially there are no cluster heads only nodes
S(i).type=N;
keep(i)=i;
temp_rnd0=i;
%Random Election of Normal Nodes
80 if (temp_rnd0>=(x+m)*n+1)
S(i).E=Eo;
S(i).ENERGY=0;
%%%%plot(S(i).xd,S(i).yd,o);
hold on;
end
%Random Election of intermediate Nodes
if (temp_rnd0<(m+x)*n+1) && (temp_rnd0>m*n)
S(i).E=Eo*(1+b);
S(i).ENERGY=0.5;
90 %%%%plot(S(i).xd,S(i).yd,*);
hold on;
end
%Random Election of Advanced Nodes
if (temp_rnd0<m*n+1)
S(i).E=Eo*(1+a);
S(i).ENERGY=1;
%%%%plot(S(i).xd,S(i).yd,D);
hold on;
end
100
end
S(n+1).xd=sink.x;
S(n+1).yd=sink.y;
%%plot(S(n+1).xd,S(n+1).yd,x);
%First Iteration
figure(1);
110
%counter for CHs
countCHs=0;
%counter for CHs per round
rcountCHs=0;
215
cluster=1;
countCHs;
rcountCHs=rcountCHs+countCHs;
flag_first_dead=0;
120 flag_first_Hdead=0;
flag_last_dead=0;
c=1;
total=0;
average=0;
%open a file
fid = fopen(parameters_DECmorenode.txt,a); %Write result into a file
fprintf(fid,\nfirst_dead,Instability\n);
for r=0:1:rmax
for i=1:1:n
130 if(S(i).E>0)
holder(i)=S(i).E;
id(i)=keep(i);
node= struct(energy, holder, id,id);
[energy,index] = sort([node.energy],descend); % Sort all energy values, largest first
end
end
total=0;
for k=1:length(node.energy)
140 energy_level=sort(node.energy, descend);
total=total + node.energy(k);
end
average=total/length(node.energy);
TEnergy(r+1)=total;
AveEnergy(r+1)=average;
150 r
%Election Probability for Normal Nodes
pnrm=( p/ (1+a*m+b*x) );
%Election Probability for intermediate Nodes
pint=( p*(1+b)/ (1+a*m+b*x) );
%Election Probability for Advanced Nodes
padv= ( p*(1+a)/(1+a*m+b*x) );
%Operation for heterogeneous epoch
if(mod(r, round(1/pnrm) )==0)
160 for i=1:1:n
S(i).G=0;
S(i).cl=0;
end
end
%Operations for sub-epochs
if(mod(r, round(1/padv) )==0)
for i=1:1:n
if(S(i).ENERGY==1)
170 S(i).G=0;
S(i).cl=0;
end
end
end
%Operations for sub-epochs
if(mod(r, round(1/pint) )==0)
for i=1:1:n
if(S(i).ENERGY==0.5)
180 S(i).G=0;
S(i).cl=0;
end
end
216
end
hold off;
%Number of Half dead nodes
Hdead=0;
%Number of half dead Advanced Nodes
190 Hdead_a=0;
%Number of half dead Normal Nodes
Hdead_n=0;
%Number of half dead intermediate Nodes
Hdead_in=0;
%Number of dead nodes
dead=0;
%Number of dead Advanced Nodes
dead_a=0;
%Number of dead Normal Nodes
200 dead_n=0;
%Number of dead intermediate Nodes
dead_in=0;
%counter for bit transmitted to Bases Station and to Cluster Heads
packets_TO_BS=0;
packets_TO_CH=0;
%counter for bit transmitted to Bases Station and to Cluster Heads
%per round
PACKETS_TO_CH(r+1)=0;
210 PACKETS_TO_BS(r+1)=0;
figure(1);
for i=1:1:n
%Checking if the energy is less or reduced by half
if (S(i).E<=(Eo/2)) && (S(i).E>0)
plot(S(i).xd,S(i).yd,yellow .);
Hdead=Hdead+1;
if(S(i).ENERGY==1)
220 Hdead_a=Hdead_a+1;
end
if(S(i).ENERGY==0.5)
Hdead_in=Hdead_in+1;
end
if(S(i).ENERGY==0)
Hdead_n=Hdead_n+1;
end
hold on;
end
230
%checking the rate of energy dissipation in normal, intermediate and advance nodes
if (S(i).E<=Eo)||(S(i).E>Eo)
if(S(i).ENERGY==0)
RnEnergy(r+1)=S(i).E;
end
if (S(i).ENERGY==0.5)
RINEnergy(r+1)=S(i).E;
end
240 if (S(i).ENERGY==1)
RAEnergy(r+1)=S(i).E;
end
end
%checking if there is a dead node
if (S(i).E<=0)
plot(S(i).xd,S(i).yd,red .);
dead=dead+1;
if(S(i).ENERGY==1)
250 dead_a=dead_a+1;
end
if(S(i).ENERGY==0)
217
dead_n=dead_n+1;
end
if(S(i).ENERGY==0.5)
dead_in=dead_in+1;
end
hold on;
end
260 if S(i).E>0
S(i).type=N;
if (S(i).ENERGY==0)
plot(S(i).xd,S(i).yd,o);
end
if (S(i).ENERGY==0.5)
plot(S(i).xd,S(i).yd,p);
end
if (S(i).ENERGY==1)
plot(S(i).xd,S(i).yd,D);
270 end
hold on;
end
end
plot(S(n+1).xd,S(n+1).yd,x);
HSTATISTICS(r+1).DEAD=Hdead;
HDEAD(r+1)=Hdead;
HDEAD_N(r+1)=Hdead_n;
280 HDEAD_IN(r+1)=Hdead_in;
HDEAD_A(r+1)=Hdead_a;
%When the first node is half dead
if (Hdead==1)
if(flag_first_Hdead==0)
first_Hdead=r;
flag_first_Hdead=1;
end
end
290
STATISTICS(r+1).DEAD=dead;
DEAD(r+1)=dead;
DEAD_N(r+1)=dead_n;
DEAD_IN(r+1)=dead_in;
DEAD_A(r+1)=dead_a;
%When the first node dies
if (dead==1)
if(flag_first_dead==0)
300 first_dead=r;
flag_first_dead=1;
end
end
%Number of alive Nodes
alive=0;
%Number of alive Normal Nodes
alive_n=0;
%Number of alive intermediate Nodes
310 alive_in=0;
%Number of alive advance Nodes
alive_a=0;
for i=1:1:n
%checking number of alive node per round
if (S(i).E>0)
alive=alive+1;
if(S(i).ENERGY==1)
alive_a=alive_a+1;
320 end
if(S(i).ENERGY==0.5)
218
alive_in=alive_in+1;
end
if(S(i).ENERGY==0)
alive_n=alive_n+1;
end
hold on;
end
%checking nodes status
330 if (S(i).E>0)
nodes_status=1;
end
if (S(i).E<0)
nodes_status=0;
end
STATISTICS(i).Status=nodes_status;
Status(i)=nodes_status;
ASTATISTICS(r+1).Live=alive;
340 Live(r+1)=alive;
Live_n(r+1)=alive_n;
Live_in(r+1)=alive_in;
Live_a(r+1)=alive_a;
end
for i=1:1:n
%checking for last dead or alive node
if (alive==1 && S(i).E>0)
if (S(i).ENERGY==1||S(i).ENERGY==0||S(i).ENERGY==0.5)
350 plot(S(i).xd,S(i).yd,green .);
last_dead=r;
Instability=last_dead-first_dead;
flag_last_dead=1;
end
end
end
countCHs=0;
360 cluster=1;
%election of cluster-head for all node
%Choosing cluster head deterministically
countCHs=countCHs+1;
if r<=10000
N = 10; % N initial number of cluster-heads, depending on your numerical solution for Nopt.
[energy,index] = sort([node.energy],descend); % Sort all energy values, largest first
for k=1:N
topNid(k) = {node.id(index(k))}; % Get N energy with the largest values, depending on Nopt chosen
370 Head=struct(head,topNid);
if (S(Head(k).head).E)>0
countCHs=countCHs+1;
packets_TO_BS=packets_TO_BS+1;
PACKETS_TO_BS(r+1)=packets_TO_BS;
throughput=4000*packets_TO_BS;
throughput_BS(r+1)=throughput;
S(Head(k).head).type=C;
C(cluster).xd=S(Head(k).head).xd;
C(cluster).yd=S(Head(k).head).yd;
380 plot(S(Head(k).head).xd,S(Head(k).head).yd,k*);
distance=sqrt( (S(Head(k).head).xd-(S(n+1).xd) )^2 + (S(Head(k).head).yd-(S(n+1).yd) )^2 );
C(cluster).distance=distance;
C(cluster).id=Head(k).head;
X(cluster)=S(Head(k).head).xd;
Y(cluster)=S(Head(k).head).yd;
cluster=cluster+1;
%Calculation of Energy dissipated
distance;
if (distance>do)
390 S(Head(k).head).E=S(Head(k).head).E- ( (ETX+EDA)*(Packet) + Emp*Packet*( distance*distance*distance*distance ));
219
Energy_CH=(ETX+EDA)*(Packet) + Emp*Packet*( distance*distance*distance*distance );
end
if (distance<=do)
S(Head(k).head).E=S(Head(k).head).E- ( (ETX+EDA)*(Packet) + Efs*Packet*( distance * distance ));
Energy_CH=(ETX+EDA)*(Packet) + Efs*Packet*( distance*distance);
for i=1:1:n
if(S(Head(k).head).E>0)
holder(i)=S(i).E;
id(i)=keep(i);
400 node= struct(energy, holder, id,keep);
S(i).type=N;
end
end
[energy,index] = sort([node.energy],descend);
end
end
410 end
%write into file
% if (dead==1)
% fprintf(fidd,%d\n,first_dead);
% end
% if (alive==1)
% fprintf(fid,%d\n,Instability);
% end
end
420 %Checking average number of ClusterHeads per epoch
sum=sum+cluster;
count_ch=count_ch+1;
if count_ch==N
Ave_CH=(sum*0.1)/(1+(m*a)+(b*x));
Throughput=Ave_CH*4;
STATISTICS(r+1).ave_clustHd=Ave_CH;
430 ave_ch(r+1)=Ave_CH;
STATISTICS(r+1).throughput=Throughput;
Clust_throughput(r+1)=Throughput;
Ave_CH=0;
sum=0;
count_ch=0;
end
STATISTICS(r+1).CLUSTERHEADS=cluster-1;
440 CLUSTERHS(r+1)=cluster-1;
countmember=0;
%Election of Associated Cluster Head for Normal Nodes
for i=1:1:n
if ( S(i).type==N && S(i).E>0 )
if(cluster-1>=1)
min_dis=9999;
min_dis_cluster=1;
for c=1:1:cluster-1
450 temp=min(min_dis,sqrt( (S(i).xd-C(c).xd)^2 + (S(i).yd-C(c).yd)^2 ) );
if ( temp<min_dis )
min_dis=temp;
min_dis_cluster=c;
countmember=countmember+1;
end
CLUSTERMEM(r+1)=countmember;
end
220
460 countmember=0;
%Energy dissipated by associated Cluster Head
min_dis;
if (min_dis>do)
S(i).E=S(i).E- ( ETX*(Packet) + Emp*Packet*( min_dis * min_dis * min_dis * min_dis));
Energy_member=ETX*(Packet) + Emp*Packet*( min_dis * min_dis * min_dis * min_dis);
end
if (min_dis<=do)
S(i).E=S(i).E- ( ETX*(Packet) + Efs*Packet*( min_dis * min_dis));
Energy_member=ETX*(Packet) + Emp*Packet*( min_dis * min_dis);
470 end
%Energy dissipated
if(min_dis>0)
S(C(min_dis_cluster).id).E = S(C(min_dis_cluster).id).E- ( (ERX + EDA)*Packet );
PACKETS_TO_CH(r+1)=n-dead-cluster+1;
end
S(i).min_dis=min_dis;
S(i).min_dis_cluster=min_dis_cluster;
480 end
end
end
hold on;
countCHs;
rcountCHs=rcountCHs+countCHs;
%Code for Voronoi Cells
%Unfortunately if there is a small
490 %number of cells, Matlabs voronoi
%procedure has some problems
% [vx,vy]=voronoi(X,Y);
% plot(X,Y,r*,vx,vy,b-);
% hold on;
% voronoi(X,Y);
% axis([0 xm 0 ym]);
if r==3500
fprintf(fid,%d,%d\n,first_dead, Instability); % writes into a file parameters_DEC.txt
500 end
end
fclose(fid);
510
221
A.1.2 SEP-E code
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% SEP-E: An Enhanced Stable Election Protocol for clustered %
% heterogeneous wireless sensor networks %
% %
% (c) Femi Aderohunmu %
% Information Science Department, University of Otago. %
% %
% %
10 % To report your comment or any bug please send e-mail to: %
% afemi@infoscience.otago.ac.nz %
%This is the SEP-E code used. %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%%%%%
20 %Field Dimensions - x and y maximum (in meters)
xm=100;
ym=100;
%x and y Coordinates of the Sink
sink.x=0.5*xm;
sink.y=0.5*ym;
%Number of Nodes in the field
n=100;
30
%Optimal Election Probability of a node
%to become cluster head
p=0.1;
%Energy Model (all values in Joules)
%Initial Energy
Eo=0.5;
%Eelec=Etx=Erx
ETX=50*0.000000001;
40 ERX=50*0.000000001;
%Transmit Amplifier types
Efs=10*0.000000000001;
Emp=0.0013*0.000000000001;
%Data Aggregation Energy
EDA=5*0.000000001;
%Values for Hetereogeneity
%Percentage of nodes than are advanced
m=0.2;
50 %Percentage of nodes than are intermediate
x=0.3;
%\alpha
a=3;
%Beta
b=1.5;
%maximum number of rounds
rmax=8000;
%variables
Ave_CH=0;
60 sum=0;
count_ch=0;
Throughput=0;
% packets size
Packet=4000;
%%%%%%%%%%%%%%%%%%%%%%%%% END OF PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%
%Computation of do
do=sqrt(Efs/Emp);
222
70 %Creation of the random Sensor Network
figure(1);
rand(seed,13)
for i=1:1:n
S(i).xd=rand(1,1)*xm;
XR(i)=S(i).xd;
S(i).yd=rand(1,1)*ym;
YR(i)=S(i).yd;
S(i).G=0;
S(i).E=0;
80 %initially there are no cluster heads only nodes
S(i).type=N;
temp_rnd0=i;
%Random Election of Normal Nodes
if (temp_rnd0>=(x+m)*n+1)
S(i).E=Eo;
S(i).ENERGY=0;
%%%%plot(S(i).xd,S(i).yd,o);
hold on;
90 end
%Random Election of intermediate Nodes
if (temp_rnd0<(m+x)*n+1) && (temp_rnd0>m*n)
S(i).E=Eo*(1+b);
S(i).ENERGY=0.5;
%%%%plot(S(i).xd,S(i).yd,*);
hold on;
end
%Random Election of Advanced Nodes
if (temp_rnd0<m*n+1)
100 S(i).E=Eo*(1+a);
S(i).ENERGY=1;
%%%%plot(S(i).xd,S(i).yd,D);
hold on;
end
end
S(n+1).xd=sink.x;
S(n+1).yd=sink.y;
110 %%plot(S(n+1).xd,S(n+1).yd,x);
%First Iteration
figure(1);
%counter for CHs
countCHs=0;
%counter for CHs per round
rcountCHs=0;
120 cluster=1;
countCHs;
rcountCHs=rcountCHs+countCHs;
flag_first_dead=0;
flag_first_Hdead=0;
flag_last_dead=0;
c=1;
for r=0:1:rmax
130
r
%Election Probability for Normal Nodes
pnrm=( p/ (1+a*m+b*x) );
%Election Probability for intermediate Nodes
pint=( p*(1+b)/ (1+a*m+b*x) );
%Election Probability for Advanced Nodes
223
padv= ( p*(1+a)/(1+a*m+b*x) );
140 %Operation for heterogeneous epoch
if(mod(r, round(1/pnrm) )==0)
for i=1:1:n
S(i).G=0;
S(i).cl=0;
end
end
%Operations for sub-epochs
if(mod(r, round(1/padv) )==0)
150 for i=1:1:n
if(S(i).ENERGY==1)
S(i).G=0;
S(i).cl=0;
end
end
end
%Operations for sub-epochs
if(mod(r, round(1/pint) )==0)
160 for i=1:1:n
if(S(i).ENERGY==0.5)
S(i).G=0;
S(i).cl=0;
end
end
end
hold off;
%Number of Half dead nodes
170 Hdead=0;
%Number of half dead Advanced Nodes
Hdead_a=0;
%Number of half dead Normal Nodes
Hdead_n=0;
%Number of half dead intermediate Nodes
Hdead_in=0;
%Number of dead nodes
dead=0;
%Number of dead Advanced Nodes
180 dead_a=0;
%Number of dead Normal Nodes
dead_n=0;
%Number of dead intermediate Nodes
dead_in=0;
%counter for bit transmitted to Bases Station and to Cluster Heads
packets_TO_BS=0;
packets_TO_CH=0;
%counter for bit transmitted to Bases Station and to Cluster Heads
190 %per round
PACKETS_TO_CH(r+1)=0;
PACKETS_TO_BS(r+1)=0;
figure(1);
for i=1:1:n
%Checking if the energy is less or reduced by half
if (S(i).E<=(Eo/2)) && (S(i).E>0)
plot(S(i).xd,S(i).yd,yellow .);
200 Hdead=Hdead+1;
if(S(i).ENERGY==1)
Hdead_a=Hdead_a+1;
end
if(S(i).ENERGY==0.5)
Hdead_in=Hdead_in+1;
end
224
if(S(i).ENERGY==0)
Hdead_n=Hdead_n+1;
end
210 hold on;
end
%checking the rate of energy dissipation in normal, intermediate and
%advance nodes
if (S(i).E<=Eo)||(S(i).E>Eo)
if(S(i).ENERGY==0)
RnEnergy(r+1)=S(i).E;
end
220 if (S(i).ENERGY==0.5)
RINEnergy(r+1)=S(i).E;
end
if (S(i).ENERGY==1)
RAEnergy(r+1)=S(i).E;
end
end
%checking if there is a dead node
if (S(i).E<=0)
230 plot(S(i).xd,S(i).yd,red .);
dead=dead+1;
if(S(i).ENERGY==1)
dead_a=dead_a+1;
end
if(S(i).ENERGY==0)
dead_n=dead_n+1;
end
if(S(i).ENERGY==0.5)
dead_in=dead_in+1;
240 end
hold on;
end
if S(i).E>0
S(i).type=N;
if (S(i).ENERGY==0)
plot(S(i).xd,S(i).yd,o);
end
if (S(i).ENERGY==0.5)
plot(S(i).xd,S(i).yd,p);
250 end
if (S(i).ENERGY==1)
plot(S(i).xd,S(i).yd,D);
end
hold on;
end
end
plot(S(n+1).xd,S(n+1).yd,x);
260 HSTATISTICS(r+1).DEAD=Hdead;
HDEAD(r+1)=Hdead;
HDEAD_N(r+1)=Hdead_n;
HDEAD_IN(r+1)=Hdead_in;
HDEAD_A(r+1)=Hdead_a;
%When the first node is half dead
if (Hdead==1)
if(flag_first_Hdead==0)
first_Hdead=r;
270 flag_first_Hdead=1;
end
end
STATISTICS(r+1).DEAD=dead;
DEAD(r+1)=dead;
225
DEAD_N(r+1)=dead_n;
DEAD_IN(r+1)=dead_in;
DEAD_A(r+1)=dead_a;
280 %When the first node dies
if (dead==1)
if(flag_first_dead==0)
first_dead=r;
flag_first_dead=1;
end
end
%Number of alive Nodes
alive=0;
290 %Number of alive Normal Nodes
alive_n=0;
%Number of alive intermediate Nodes
alive_in=0;
%Number of alive advance Nodes
alive_a=0;
for i=1:1:n
300 %checking number of alive node per round
if (S(i).E>0)
alive=alive+1;
if(S(i).ENERGY==1)
alive_a=alive_a+1;
end
if(S(i).ENERGY==0.5)
alive_in=alive_in+1;
end
if(S(i).ENERGY==0)
310 alive_n=alive_n+1;
end
hold on;
end
%checking nodes status
if (S(i).E>0)
nodes_status=1;
end
if (S(i).E<0)
nodes_status=0;
320 end
STATISTICS(i).Status=nodes_status;
Status(i)=nodes_status;
ASTATISTICS(r+1).Live=alive;
Live(r+1)=alive;
Live_n(r+1)=alive_n;
Live_in(r+1)=alive_in;
Live_a(r+1)=alive_a;
end
330 for i=1:1:n
%checking for last dead or alive node
if (alive==1 && S(i).E>0)
if (S(i).ENERGY==1||S(i).ENERGY==0||S(i).ENERGY==0.5)
plot(S(i).xd,S(i).yd,green .);
last_dead=r;
Instability=last_dead-first_dead;
flag_last_dead=1;
end
340 end
end
countCHs=0;
226
cluster=1;
for i=1:1:n
if(S(i).E>0)
temp_rand=rand;
if ( (S(i).G)<=0)
350
%Election of Cluster Heads for normal nodes
if( ( S(i).ENERGY==0 && ( temp_rand <= ( pnrm / ( 1 - pnrm * mod(r,round(1/pnrm)) )) ) ) )
countCHs=countCHs+1;
packets_TO_BS=packets_TO_BS+1;
PACKETS_TO_BS(r+1)=packets_TO_BS;
S(i).type=C;
S(i).G=100;
360 C(cluster).xd=S(i).xd;
C(cluster).yd=S(i).yd;
plot(S(i).xd,S(i).yd,k*);
distance=sqrt( (S(i).xd-(S(n+1).xd) )^2 + (S(i).yd-(S(n+1).yd) )^2 );
C(cluster).distance=distance;
C(cluster).id=i;
X(cluster)=S(i).xd;
Y(cluster)=S(i).yd;
cluster=cluster+1;
370
%Calculation of Energy dissipated
distance;
if (distance>do)
S(i).E=S(i).E- ( (ETX+EDA)*(Packet) + Emp*Packet*( distance*distance*distance*distance ));
Energy_CH_N=(ETX+EDA)*(Packet) + Emp*Packet*( distance*distance*distance*distance );
end
if (distance<=do)
S(i).E=S(i).E- ( (ETX+EDA)*(Packet) + Efs*Packet*( distance * distance ));
Energy_CH_N=(ETX+EDA)*(Packet) + Emp*Packet*( distance*distance);
380 end
end
%Election of Cluster Heads for intermediate nodes
if( ( S(i).ENERGY==0.5 && ( temp_rand <= ( pint / ( 1 - pint * mod(r,round(1/pint)) )) ) ) )
countCHs=countCHs+1;
packets_TO_BS=packets_TO_BS+1;
PACKETS_TO_BS(r+1)=packets_TO_BS;
390
S(i).type=C;
S(i).G=100;
C(cluster).xd=S(i).xd;
C(cluster).yd=S(i).yd;
plot(S(i).xd,S(i).yd,k*);
distance=sqrt( (S(i).xd-(S(n+1).xd) )^2 + (S(i).yd-(S(n+1).yd) )^2 );
C(cluster).distance=distance;
C(cluster).id=i;
400 X(cluster)=S(i).xd;
Y(cluster)=S(i).yd;
cluster=cluster+1;
%Calculation of Energy dissipated
distance;
if (distance>do)
S(i).E=S(i).E- ( (ETX+EDA)*(Packet) + Emp*Packet*( distance*distance*distance*distance ));
Energy_CH_I=(ETX+EDA)*(Packet) + Emp*Packet*( distance*distance*distance*distance );
end
410 if (distance<=do)
S(i).E=S(i).E- ( (ETX+EDA)*(Packet) + Efs*Packet*( distance * distance ));
Energy_CH_I=(ETX+EDA)*(Packet) + Emp*Packet*( distance*distance);
end
227
end
%Election of Cluster Heads for Advanced nodes
if( ( S(i).ENERGY==1 && ( temp_rand <= ( padv / ( 1 - padv * mod(r,round(1/padv)) )) ) ) )
420 countCHs=countCHs+1;
packets_TO_BS=packets_TO_BS+1;
PACKETS_TO_BS(r+1)=packets_TO_BS;
S(i).type=C;
S(i).G=100;
C(cluster).xd=S(i).xd;
C(cluster).yd=S(i).yd;
plot(S(i).xd,S(i).yd,k*);
430 distance=sqrt( (S(i).xd-(S(n+1).xd) )^2 + (S(i).yd-(S(n+1).yd) )^2 );
C(cluster).distance=distance;
C(cluster).id=i;
X(cluster)=S(i).xd;
Y(cluster)=S(i).yd;
cluster=cluster+1;
%Calculation of Energy dissipated
distance;
if (distance>do)
440 S(i).E=S(i).E- ( (ETX+EDA)*(Packet) + Emp*Packet*( distance*distance*distance*distance ));
Energy_CH_A=(ETX+EDA)*(Packet) + Emp*Packet*( distance*distance*distance*distance );
end
if (distance<=do)
S(i).E=S(i).E- ( (ETX+EDA)*(Packet) + Efs*Packet*( distance * distance ));
Energy_CH_A=(ETX+EDA)*(Packet) + Emp*Packet*( distance*distance);
end
end
end
450 end
end
%Checking average number of ClusterHeads per epoch
sum=sum+cluster;
count_ch=count_ch+1;
if count_ch==10
Ave_CH=(sum*0.1)/(1+(m*a)+(b*x));
460 Throughput=Ave_CH*4;
STATISTICS(r+1).ave_clustHd=Ave_CH;
ave_ch(r+1)=Ave_CH;
STATISTICS(r+1).throughput=Throughput;
Clust_throughput(r+1)=Throughput;
Ave_CH=0;
sum=0;
count_ch=0;
470 end
STATISTICS(r+1).CLUSTERHEADS=cluster-1;
CLUSTERHS(r+1)=cluster-1;
countmember=0;
%Election of Associated Cluster Head for Normal Nodes
for i=1:1:n
if ( S(i).type==N && S(i).E>0 )
if(cluster-1>=1)
480 min_dis=9999;
min_dis_cluster=1;
for c=1:1:cluster-1
228
temp=min(min_dis,sqrt( (S(i).xd-C(c).xd)^2 + (S(i).yd-C(c).yd)^2 ) );
if ( temp<min_dis )
min_dis=temp;
min_dis_cluster=c;
countmember=countmember+1;
end
490
CLUSTERMEM(r+1)=countmember;
end
countmember=0;
%Energy dissipated by associated Cluster Head
min_dis;
if (min_dis>do)
S(i).E=S(i).E- ( ETX*(Packet) + Emp*Packet*( min_dis * min_dis * min_dis * min_dis));
500 Energy_member=ETX*(Packet) + Emp*Packet*( min_dis * min_dis * min_dis * min_dis);
end
if (min_dis<=do)
S(i).E=S(i).E- ( ETX*(Packet) + Efs*Packet*( min_dis * min_dis));
Energy_member=ETX*(Packet) + Emp*Packet*( min_dis * min_dis);
end
%Energy dissipated
if(min_dis>0)
S(C(min_dis_cluster).id).E = S(C(min_dis_cluster).id).E- ( (ERX + EDA)*Packet );
PACKETS_TO_CH(r+1)=n-dead-cluster+1;
510 end
S(i).min_dis=min_dis;
S(i).min_dis_cluster=min_dis_cluster;
end
end
end
hold on;
520 countCHs;
rcountCHs=rcountCHs+countCHs;
% %finding live or dead node in each 4x4 grid
ni=20;
cell=zeros(5,5);
if alive ==100
for i=1:1:n
530 for j=1:1:n
u(i)=(S(i).xd);
a=int32(S(i).xd);
u_grid(i)=idivide(a,ni,ceil);
v(j)=(S(j).yd);
b=int32(S(j).yd);
v_grid(j)=idivide(b,ni,ceil);
end
540
end
for i =1:1:n
%
if (Status(i) == 1)
ai= u_grid(i);
if (ai == 0)
ai = 1;
550 end;
bi= v_grid(i);
229
if (bi == 0)
bi = 1;
end;
cell(ai,bi)= cell(ai,bi)+ 1;
%
end
end
560
%stop
end
%Code for Voronoi Cells
%Unfortunately if there is a small
%number of cells, Matlabs voronoi
%procedure has some problems
570
%[vx,vy]=voronoi(X,Y);
%plot(X,Y,r*,vx,vy,b-);
%hold on;
%voronoi(X,Y);
%axis([0 xm 0 ym]);
end
580
A.1.3 LEACH Homogeneous code
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% Energy Management Techniques for Protocol Designs in WSN %
% %
% (c) Femi A. Aderohunmu %
% Information Science Department, University of Otago, New Zealand %
% %
% To report your comment or any bug please send e-mail to: %
10 % afemi@infoscience.otago.ac.nz %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% This is the LEACH [1] code used. %
% %
% [1] W.R.Heinzelman, A.P.Chandrakasan and H.Balakrishnan, %
% "An application-specific protocol architecture for wireless %
% microsensor networks" %
20 % IEEE Transactions on Wireless Communications, 1(4):660-670,2002 %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Field Dimensions - x and y maximum (in meters)
xm=100;
30 ym=100;
%x and y Coordinates of the Sink
230
sink.x=0.5*xm;
sink.y=0.5*ym;
%Number of Nodes in the field
n=100;
%Optimal Election Probability of a node
40 %to become cluster head
p=0.1;
%Energy Model (all values in Joules)
%Initial Energy
Eo=0.5;
%Eelec=Etx=Erx
ETX=50*0.000000001;
ERX=50*0.000000001;
%Transmit Amplifier types
50 Efs=10*0.000000000001;
Emp=0.0013*0.000000000001;
%Data Aggregation Energy
EDA=5*0.000000001;
%Values for Hetereogeneity
%Percentage of nodes than are advanced
m=0;
%\alpha
a=0;
60 Ave_CH=0;
sum=0;
count_ch=0;
Throughput=0;
%maximum number of rounds
rmax=10000;
%%%%%%%%%%%%%%%%%%%%%%%%% END OF PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%
%Computation of do
70 do=sqrt(Efs/Emp);
%Creation of the random Sensor Network
figure(1);
rand(seed,13)
for i=1:1:n
S(i).xd=rand(1,1)*xm;
XR(i)=S(i).xd;
S(i).yd=rand(1,1)*ym;
YR(i)=S(i).yd;
80 S(i).G=0;
%initially there are no cluster heads only nodes
S(i).type=N;
temp_rnd0=i;
%Random Election of Normal Nodes
if (temp_rnd0>=m*n+1)
S(i).E=Eo;
S(i).ENERGY=0;
plot(S(i).xd,S(i).yd,o);
90 hold on;
end
%Random Election of Advanced Nodes
if (temp_rnd0<m*n+1)
S(i).E=Eo*(1+a);
S(i).ENERGY=1;
plot(S(i).xd,S(i).yd,+);
hold on;
end
end
100
S(n+1).xd=sink.x;
231
S(n+1).yd=sink.y;
plot(S(n+1).xd,S(n+1).yd,x);
%First Iteration
figure(1);
%counter for CHs
110 countCHs=0;
%counter for CHs per round
rcountCHs=0;
cluster=1;
countCHs;
rcountCHs=rcountCHs+countCHs;
flag_first_dead=0;
for r=0:1:rmax
120 r
% radii = 20;
% frequency = 20;
%
% del_y = sin((r*frequency)/pi)*radii;
% del_x = cos((r*frequency)/pi)*radii;
% S(n+1).xd=sink.x+del_x;
% S(n+1).yd=sink.y+del_y;
%Operation for epoch
130 if(mod(r, round(1/p) )==0)
for i=1:1:n
S(i).G=0;
S(i).cl=0;
end
end
hold off;
140 %Number of dead nodes
dead=0;
%Number of dead Advanced Nodes
dead_a=0;
%Number of dead Normal Nodes
dead_n=0;
%counter for bit transmitted to Bases Station and to Cluster Heads
packets_TO_BS=0;
packets_TO_CH=0;
150 %counter for bit transmitted to Bases Station and to Cluster Heads
%per round
PACKETS_TO_CH(r+1)=0;
PACKETS_TO_BS(r+1)=0;
figure(1);
for i=1:1:n
%checking if there is a dead node
if (S(i).E<=0)
160 plot(S(i).xd,S(i).yd,red .);
dead=dead+1;
if(S(i).ENERGY==1)
dead_a=dead_a+1;
end
if(S(i).ENERGY==0)
dead_n=dead_n+1;
end
hold on;
end
170 if S(i).E>0
232
S(i).type=N;
if (S(i).ENERGY==0)
plot(S(i).xd,S(i).yd,o);
end
if (S(i).ENERGY==1)
plot(S(i).xd,S(i).yd,+);
end
hold on;
end
180 end
plot(S(n+1).xd,S(n+1).yd,x);
STATISTICS(r+1).DEAD=dead;
DEAD(r+1)=dead;
DEAD_N(r+1)=dead_n;
DEAD_A(r+1)=dead_a;
%When the first node dies
190 if (dead==1)
if(flag_first_dead==0)
first_dead=r;
flag_first_dead=1;
end
end
%Number of alive Nodes
alive=0;
%Number of alive Normal Nodes
200 alive_n=0;
%Number of alive advance Nodes
alive_a=0;
for i=1:1:n
%checking number of alive node per round
if (S(i).E>0)
alive=alive+1;
if(S(i).ENERGY==1)
alive_a=alive_a+1;
210 end
if(S(i).ENERGY==0)
alive_n=alive_n+1;
end
hold on;
end
%checking nodes status
if (S(i).E>0)
nodes_status=1;
end
220 if (S(i).E<0)
nodes_status=0;
end
STATISTICS(i).Status=nodes_status;
Status(i)=nodes_status;
ASTATISTICS(r+1).Live=alive;
Live(r+1)=alive;
Live_n(r+1)=alive_n;
Live_a(r+1)=alive_a;
230 end
%checking for last dead or alive node
for i=1:1:n
if (alive==1 && S(i).E>0)
if (S(i).ENERGY==1||S(i).ENERGY==0)
plot(S(i).xd,S(i).yd,green .)
last_dead=r;
Instability=last_dead-first_dead;
flag_last_dead=1;
233
240 end
end
end
% countCHs=0;
cluster=1;
for i=1:1:n
if(S(i).E>0)
temp_rand=rand;
250 if ( (S(i).G)<=0)
%Election of Cluster Heads
if(temp_rand<= (p/(1-p*mod(r,round(1/p)))))
countCHs=countCHs+1;
packets_TO_BS=packets_TO_BS+1;
PACKETS_TO_BS(r+1)=packets_TO_BS;
S(i).type=C;
S(i).G=round(1/p)-1;
260 C(cluster).xd=S(i).xd;
C(cluster).yd=S(i).yd;
plot(S(i).xd,S(i).yd,k*);
distance=sqrt( (S(i).xd-(S(n+1).xd) )^2 + (S(i).yd-(S(n+1).yd) )^2 );
C(cluster).distance=distance;
C(cluster).id=i;
X(cluster)=S(i).xd;
Y(cluster)=S(i).yd;
cluster=cluster+1;
270
%Calculation of Energy dissipated
distance;
if (distance>do)
S(i).E=S(i).E- ( (ETX+EDA)*(4000) + Emp*4000*( distance*distance*distance*distance ));
end
if (distance<=do)
S(i).E=S(i).E- ( (ETX+EDA)*(4000) + Efs*4000*( distance * distance ));
end
280 end
end
end
end
%Checking average number of ClusterHeads per epoch
sum=sum+(cluster-1);
count_ch=count_ch+1;
% count_object=zeros(1,r);
l=100;
290 if count_ch==10
Ave_CH=(sum*0.1)/(1+(m*a));
Throughput=Ave_CH*4;
STATISTICS(r+1).ave_clustHd=Ave_CH;
ave_ch(r+1)=Ave_CH;
STATISTICS(r+1).throughput=Throughput;
Clust_throughput(r+1)=Throughput;
if Ave_CH~=0
count_object(l)=Ave_CH ;
300 end
Ave_CH=0;
sum=0;
count_ch=0;
end
STATISTICS(r+1).CLUSTERHEADS=cluster-1;
234
CLUSTERHS(r+1)=cluster-1;
310
%Election of Associated Cluster Head for Normal Nodes
for i=1:1:n
if ( S(i).type==N && S(i).E>0 )
if(cluster-1>=1)
% min_dis=sqrt( (S(i).xd-S(n+1).xd)^2 + (S(i).yd-S(n+1).yd)^2 );
min_dis=9999;
min_dis_cluster=1;
for c=1:1:cluster-1
temp=min(min_dis,sqrt( (S(i).xd-C(c).xd)^2 + (S(i).yd-C(c).yd)^2 ) );
320 if ( temp<min_dis )
min_dis=temp;
min_dis_cluster=c;
end
end
%Energy dissipated by associated Cluster Head
min_dis;
if (min_dis>do)
S(i).E=S(i).E- ( ETX*(4000) + Emp*4000*( min_dis * min_dis * min_dis * min_dis));
330 end
if (min_dis<=do)
S(i).E=S(i).E- ( ETX*(4000) + Efs*4000*( min_dis * min_dis));
end
%Energy dissipated
if(min_dis>0)
S(C(min_dis_cluster).id).E = S(C(min_dis_cluster).id).E- ( (ERX + EDA)*4000 );
PACKETS_TO_CH(r+1)=n-dead-cluster+1;
end
340 S(i).min_dis=min_dis;
S(i).min_dis_cluster=min_dis_cluster;
end
end
end
hold on;
countCHs;
rcountCHs=rcountCHs+countCHs;
350 %finding live or dead node in each 4x4 grid
ni=20;
cell=zeros(5,5);
if alive ==50
for i=1:1:n
for j=1:1:n
u(i)=(S(i).xd);
360 a=int32(S(i).xd);
u_grid(i)=idivide(a,ni,ceil);
v(j)=(S(j).yd);
b=int32(S(j).yd);
v_grid(j)=idivide(b,ni,ceil);
end
end
370
for i =1:1:n
%
if (Status(i) == 1)
ai= u_grid(i);
if (ai == 0)
ai = 1;
235
end;
bi= v_grid(i);
380 if (bi == 0)
bi = 1;
end;
cell(ai,bi)= cell(ai,bi)+ 1;
%
end
end
390 stop
end
%Code for Voronoi Cells
%Unfortynately if there is a small
%number of cells, Matlabs voronoi
%procedure has some problems
%[vx,vy]=voronoi(X,Y);
%plot(X,Y,r*,vx,vy,b-);
400 % hold on;
% voronoi(X,Y);
% axis([0 xm 0 ym]);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% STATISTICS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% DEAD : a rmax x 1 array of number of dead nodes/round %
% DEAD_A : a rmax x 1 array of number of dead Advanced nodes/round %
410 % DEAD_N : a rmax x 1 array of number of dead Normal nodes/round %
% CLUSTERHS : a rmax x 1 array of number of Cluster Heads/round %
% PACKETS_TO_BS : a rmax x 1 array of number packets send to Base Station/round %
% PACKETS_TO_CH : a rmax x 1 array of number of packets send to ClusterHeads/round %
% first_dead: the round where the first node died %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
420
A.1.4 LEACH Heterogeneous code
1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% LEACH Heterogeneous wireless sensor networks %
% %
% (c) Femi Aderohunmu %
% Information Science Department, University of otago. %
% %
10 % To report your comment or any bug please send e-mail to: %
% afemi@infoscience.otago.ac.nz %
% This is the LEACH Heterogeneous code used %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Field Dimensions - x and y maximum (in meters)
xm=100;
ym=100;
236
20 %x and y Coordinates of the Sink
sink.x=0.5*xm;
sink.y=0.5*ym;
%Number of Nodes in the field
n=100;
%Optimal Election Probability of a node
%to become cluster head
p=0.1;
%Energy Model (all values in Joules)
%Initial Energy
30 Eo=0.5;
%Eelec=Etx=Erx
ETX=50*0.000000001;
ERX=50*0.000000001;
%Transmit Amplifier types
Efs=10*0.000000000001;
Emp=0.0013*0.000000000001;
%Data Aggregation Energy
EDA=5*0.000000001;
%Values for Hetereogeneity
40 %Percentage of nodes than are advanced
m=0.2;
%\alpha
a=3;
%Percentage of nodes than are intermediate
x=0.3;
%mhu
b=1.5;
%maximum number of rounds
rmax=8000;
50 %variables
Ave_CH=0;
sum=0;
count_ch=0;
Throughput=0;
%communication Range
radius=30;
%control
epoch=0;
%packet size
60 Packet=4000;
%%%%%%%%%%%%%%%%%%%%%%%%% END OF PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%
%Computation of do
do=sqrt(Efs/Emp);
%Creation of the random Sensor Network
figure(1);
rand(seed,13)
for i=1:1:n
S(i).xd=rand(1,1)*xm;
XR(i)=S(i).xd;
70 S(i).yd=rand(1,1)*ym;
YR(i)=S(i).yd;
S(i).G=0;
%initially there are no cluster heads only nodes
S(i).type=N;
temp_rnd0=i;
%Random Election of Normal Nodes
if (temp_rnd0>=(x+m)*n+1)
S(i).E=Eo;
S(i).ENERGY=0;
80 plot(S(i).xd,S(i).yd,o);
hold on;
end
%Random Election of intermediate Nodes
if (temp_rnd0<(m+x)*n+1) && (temp_rnd0>m*n)
S(i).E=Eo*(1+b);
S(i).ENERGY=0.5;
plot(S(i).xd,S(i).yd,*);
hold on;
237
end
90 %Random Election of Advanced Nodes
if (temp_rnd0<m*n+1)
S(i).E=Eo*(1+a);
S(i).ENERGY=1;
%%%%plot(S(i).xd,S(i).yd,D);
hold on;
end
end
S(n+1).xd=sink.x;
S(n+1).yd=sink.y;
100 plot(S(n+1).xd,S(n+1).yd,x);
%First Iteration
figure(1);
%counter for CHs
countCHs=0;
%counter for CHs per round
rcountCHs=0;
cluster=1;
countCHs;
rcountCHs=rcountCHs+countCHs;
110 flag_first_dead=0;
flag_first_Hdead=0;
flag_last_dead=0;
temp_rnd0=0;
for r=0:1:rmax
r
%Operation for epochs
if(mod(r, round(1/p) )==0)
120 for i=1:1:n
S(i).G=0;
S(i).cl=0;
end
end
hold off;
%Number of Half dead nodes
Hdead=0;
%Number of half dead Advanced Nodes
130 Hdead_a=0;
%Number of half dead intermediate Nodes
Hdead_in=0;
%Number of half dead Normal Nodes
Hdead_n=0;
%Number of dead nodes
dead=0;
%Number of dead Advanced Nodes
dead_a=0;
140 %Number of dead Normal Nodes
dead_n=0;
%counter for bit transmitted to Bases Station and to Cluster Heads
packets_TO_BS=0;
packets_TO_CH=0;
%counter for bit transmitted to Bases Station and to Cluster Heads
%per round
PACKETS_TO_CH(r+1)=0;
PACKETS_TO_BS(r+1)=0;
figure(1);
150 for i=1:1:n
%Checking if the energy is less or reduced by half
if (S(i).E<=(Eo/2)) && (S(i).E>0)
plot(S(i).xd,S(i).yd,yellow .);
Hdead=Hdead+1;
if(S(i).ENERGY==1)
Hdead_a=Hdead_a+1;
end
238
if(S(i).ENERGY==0.5)
Hdead_in=Hdead_in+1;
160 end
if(S(i).ENERGY==0)
Hdead_n=Hdead_n+1;
end
hold on;
end
%checking the rate of energy dissipation in normal and advance nodes
if (S(i).E<=Eo)||(S(i).E>Eo)
if(S(i).ENERGY==0)
170 RnEnergy(r+1)=S(i).E;
end
if (S(i).ENERGY==0.5)
RINEnergy(r+1)=S(i).E;
end
if (S(i).ENERGY==1)
RAEnergy(r+1)=S(i).E;
end
end
%checking if there is a dead node
180 if (S(i).E<=0)
plot(S(i).xd,S(i).yd,red .);
dead=dead+1;
if(S(i).ENERGY==1)
dead_a=dead_a+1;
end
if(S(i).ENERGY==0)
dead_n=dead_n+1;
end
hold on;
190 end
if S(i).E>0
S(i).type=N;
if (S(i).ENERGY==0)
plot(S(i).xd,S(i).yd,o);
end
if (S(i).ENERGY==0.5)
plot(S(i).xd,S(i).yd,*);
end
if (S(i).ENERGY==1)
200 plot(S(i).xd,S(i).yd,D);
end
hold on;
end
end
plot(S(n+1).xd,S(n+1).yd,x);
HSTATISTICS(r+1).DEAD=Hdead;
HDEAD(r+1)=Hdead;
HDEAD_N(r+1)=Hdead_n;
210 HDEAD_IN(r+1)=Hdead_in;
HDEAD_A(r+1)=Hdead_a;
%When the first node is half dead
if (Hdead==1)
if(flag_first_Hdead==0)
first_Hdead=r;
flag_first_Hdead=1;
end
end
220
STATISTICS(r+1).DEAD=dead;
DEAD(r+1)=dead;
DEAD_N(r+1)=dead_n;
DEAD_A(r+1)=dead_a;
239
%When the first node dies
if (dead==1)
if(flag_first_dead==0)
230 first_dead=r;
flag_first_dead=1;
end
end
%Number of alive Nodes
alive=0;
%Number of alive Normal Nodes
alive_n=0;
%Number of alive advance Nodes
240 alive_a=0;
for i=1:1:n
%checking number of alive node per round
if (S(i).E>0)
alive=alive+1;
if(S(i).ENERGY==1)
alive_a=alive_a+1;
end
if(S(i).ENERGY==0)
250 alive_n=alive_n+1;
end
hold on;
end
%checking nodes status
if (S(i).E>0)
nodes_status=1;
end
if (S(i).E<0)
nodes_status=0;
260 end
STATISTICS(i).Status=nodes_status;
Status(i)=nodes_status;
ASTATISTICS(r+1).Live=alive;
Live(r+1)=alive;
Live_n(r+1)=alive_n;
Live_a(r+1)=alive_a;
end
%checking for last dead or alive node
270 for i=1:1:n
if (alive==1 && S(i).E>0)
if (S(i).ENERGY==1||S(i).ENERGY==0)
plot(S(i).xd,S(i).yd,green .)
last_dead=r;
Instability=last_dead-first_dead;
flag_last_dead=1;
end
end
280 end
countCHs=0;
cluster=1;
for i=1:1:n
if(S(i).E>0)
temp_rand=rand;
if ( (S(i).G)<=0)
%Election of Cluster Heads
if(temp_rand<= (p/(1-p*mod(r,round(1/p)))))
countCHs=countCHs+1;
290 packets_TO_BS=packets_TO_BS+1;
PACKETS_TO_BS(r+1)=packets_TO_BS;
S(i).type=C;
S(i).G=round(1/p)-1;
C(cluster).xd=S(i).xd;
C(cluster).yd=S(i).yd;
240
plot(S(i).xd,S(i).yd,k*);
distance=sqrt( (S(i).xd-(S(n+1).xd) )^2 + (S(i).yd-(S(n+1).yd) )^2 );
C(cluster).distance=distance;
C(cluster).id=i;
300 X(cluster)=S(i).xd;
Y(cluster)=S(i).yd;
cluster=cluster+1;
%Calculation of Energy dissipated
distance;
if (distance>do)
S(i).E=S(i).E- ( (ETX+EDA)*(Packet) + Emp*Packet*( distance*distance*distance*distance ));
end
if (distance<=do)
S(i).E=S(i).E- ( (ETX+EDA)*(Packet) + Efs*Packet*( distance * distance ));
310 end
end
end
end
end
%Checking average number of ClusterHeads per epoch
sum=sum+cluster;
320 count_ch=count_ch+1;
if count_ch==10
Ave_CH=(sum*0.1)/(1+(m*a)+(b*x));
Throughput=Ave_CH*4;
STATISTICS(r+1).ave_clustHd=Ave_CH;
ave_ch(r+1)=Ave_CH;
STATISTICS(r+1).throughput=Throughput;
Clust_throughput(r+1)=Throughput;
330 Ave_CH=0;
sum=0;
count_ch=0;
end
STATISTICS(r+1).CLUSTERHEADS=cluster-1;
CLUSTERHS(r+1)=cluster-1;
%Election of Associated Cluster Head for Normal Nodes
for i=1:1:n
340 if ( S(i).type==N && S(i).E>0 )
if(cluster-1>=1)
min_dis=9999;
min_dis_cluster=1;
for c=1:1:cluster-1
temp=min(min_dis,sqrt( (S(i).xd-C(c).xd)^2 + (S(i).yd-C(c).yd)^2 ) );
if ( temp<min_dis )
min_dis=temp;
min_dis_cluster=c;
end
350 end
%Energy dissipated by associated Cluster Head
min_dis;
if (min_dis>do)
S(i).E=S(i).E- ( ETX*(Packet) + Emp*Packet*( min_dis * min_dis * min_dis * min_dis));
end
if (min_dis<=do)
S(i).E=S(i).E- ( ETX*(Packet) + Efs*Packet*( min_dis * min_dis));
end
360 %Energy dissipated
if(min_dis>0)
S(C(min_dis_cluster).id).E = S(C(min_dis_cluster).id).E- ( (ERX + EDA)*Packet );
PACKETS_TO_CH(r+1)=n-dead-cluster+1;
end
241
S(i).min_dis=min_dis;
S(i).min_dis_cluster=min_dis_cluster;
end
end
end
370
hold on;
countCHs;
rcountCHs=rcountCHs+countCHs;
CSTATISTICS(r+1)=r;
Rcount(r+1)=r;
%%finding live or dead node in each 4x4 grid
ni=25;
380 cell=zeros(4,4);
if alive ==50
for i=1:1:n
for j=1:1:n
u(i)=(S(i).xd);
a=int32(S(i).xd);
u_grid(i)=idivide(a,ni,ceil);
v(j)=(S(j).yd);
b=int32(S(j).yd);
390 v_grid(j)=idivide(b,ni,ceil);
end
end
for i =1:1:n
%
if (Status(i) == 1)
ai= u_grid(i);
400 if (ai == 0)
ai = 1;
end;
bi= v_grid(i);
if (bi == 0)
bi = 1;
end;
cell(ai,bi)= cell(ai,bi)+ 1;
end
end
410
stop
end
%Code for Voronoi Cells
%Unfortunately if there is a small
%number of cells, Matlabs voronoi
%procedure has some problems
%[vx,vy]=voronoi(X,Y);
%plot(X,Y,r*,vx,vy,b-);
420 %hold on;
%voronoi(X,Y);
%axis([0 xm 0 ym]);
end
242
A.1.5 SEP code
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% SEP-E: An Enhanced Stable Election Protocol for clustered %
% heterogeneous wireless sensor networks %
% %
% (c) Femi Aderohunmu %
% Information Science Department, University of Otago. %
% %
% To report your comment or any bug please send e-mail to: %
10 % afemi@infoscience.otago.ac.nz %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% This is the SEP [1] code used. %
% %
% [1] Georgios Smaragdakis, Ibrahim Matta and Azer bestavros, %
20 % "SEP: A Stable Election Protocol for clustered %
% heterogeneous wireless sensor networks", %
% Second International Workshop on Sensor and Actor Network %
% Protocols and Applications (SANPA 2004),Boston MA, August %
% 2004. %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear;
30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Field Dimensions - x and y maximum (in meters)
xm=100;
ym=100;
%x and y Coordinates of the Sink
sink.x=0.5*xm;
sink.y=0.5*ym;
40 %Number of Nodes in the field
n=100;
%Optimal Election Probability of a node
%to become cluster head
p=0.1;
%Energy Model (all values in Joules)
%Initial Energy
Eo=0.5;
50 %Eelec=Etx=Erx
ETX=50*0.000000001;
ERX=50*0.000000001;
%Transmit Amplifier types
Efs=10*0.000000000001;
Emp=0.0013*0.000000000001;
%Data Aggregation Energy
EDA=5*0.000000001;
%Values for Hetereogeneity
60 %Percentage of nodes than are advanced node
m=0.3;
%\alpha
a=3.5;
%Percentage of nodes than are intermediate node
b=0;
%mhu
x=0;
%maximum number of rounds
243
rmax=8000;
70 %%%%%%%%%%%%%%%%%%%%%%%%% END OF PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%
%Computation of do
do=sqrt(Efs/Emp);
%variables
Ave_CH=0;
sum=0;
count_ch=0;
Throughput=0;
%Creation of the random Sensor Network
80 figure(1);
rand(seed,13)
for i=1:1:n
S(i).xd=rand(1,1)*xm;
XR(i)=S(i).xd;
S(i).yd=rand(1,1)*ym;
YR(i)=S(i).yd;
S(i).G=0;
S(i).E=0;
%initially there are no cluster heads only nodes
90 S(i).type=N;
temp_rnd0=i;
%Random Election of Normal Nodes
if (temp_rnd0>=m*n+1)
S(i).E=Eo;
S(i).ENERGY=0;
%%%%plot(S(i).xd,S(i).yd,o);
hold on;
end
100 %Random Election of Advanced Nodes
if (temp_rnd0<m*n+1)
S(i).E=Eo*(1+a);
S(i).ENERGY=1;
%%%%plot(S(i).xd,S(i).yd,D);
hold on;
end
end
S(n+1).xd=sink.x;
110 S(n+1).yd=sink.y;
%%plot(S(n+1).xd,S(n+1).yd,x);
%First Iteration
figure(1);
%counter for CHs
countCHs=0;
%counter for CHs per round
120 rcountCHs=0;
cluster=1;
countCHs;
rcountCHs=rcountCHs+countCHs;
flag_first_dead=0;
flag_first_Hdead=0;
flag_last_dead=0;
first_dead=0;
130 for r=0:1:rmax
r
%Random packets
% Packet=rand(1);
% Packet=Packet*10000;
% STATISTICS_Packet(r+1)=Packet;
% Packet_size(r+1)=Packet;
Packet=4000;
244
%Election Probability for Normal Nodes
pnrm=( p/ (1+a*m) );
140 %Election Probability for Advanced Nodes
padv= ( p*(1+a)/(1+a*m) );
%Operation for heterogeneous epoch
if(mod(r, round(1/pnrm) )==0)
for i=1:1:n
S(i).G=0;
S(i).cl=0;
end
end
150
%Operations for sub-epochs
if(mod(r, round(1/padv) )==0)
for i=1:1:n
if(S(i).ENERGY==1)
S(i).G=0;
S(i).cl=0;
end
end
end
160
hold off;
%Number of Half dead nodes
Hdead=0;
%Number of half dead Advanced Nodes
Hdead_a=0;
%Number of half dead Normal Nodes
Hdead_n=0;
170 %Number of dead nodes
dead=0;
%Number of dead Advanced Nodes
dead_a=0;
%Number of dead Normal Nodes
dead_n=0;
%counter for bit transmitted to Bases Station and to Cluster Heads
packets_TO_BS=0;
180 packets_TO_CH=0;
%counter for bit transmitted to Bases Station and to Cluster Heads
%per round
PACKETS_TO_CH(r+1)=0;
PACKETS_TO_BS(r+1)=0;
figure(1);
for i=1:1:n
%Checking if the energy is less or reduced by half
190 if (S(i).E<=(Eo/2)) && (S(i).E>0)
plot(S(i).xd,S(i).yd,yellow .);
Hdead=Hdead+1;
if(S(i).ENERGY==1)
Hdead_a=Hdead_a+1;
end
if(S(i).ENERGY==0)
Hdead_n=Hdead_n+1;
end
hold on;
200 end
%checking the rate of energy dissipation in normal and advance nodes
if (S(i).E<=Eo)||(S(i).E>Eo)
if(S(i).ENERGY==0)
RnEnergy(r+1)=S(i).E;
end
245
if (S(i).ENERGY==1)
RAEnergy(r+1)=S(i).E;
end
210 end
%checking if there is a dead node
if (S(i).E<=0)
plot(S(i).xd,S(i).yd,red .);
dead=dead+1;
if(S(i).ENERGY==1)
dead_a=dead_a+1;
end
if(S(i).ENERGY==0)
220 dead_n=dead_n+1;
end
hold on;
end
if S(i).E>0
S(i).type=N;
if (S(i).ENERGY==0)
plot(S(i).xd,S(i).yd,o);
end
if (S(i).ENERGY==1)
230 plot(S(i).xd,S(i).yd,D);
end
hold on;
end
end
plot(S(n+1).xd,S(n+1).yd,x);
HSTATISTICS(r+1).DEAD=Hdead;
HDEAD(r+1)=Hdead;
240 HDEAD_N(r+1)=Hdead_n;
HDEAD_A(r+1)=Hdead_a;
%When the first node is half dead
if (Hdead==1)
if(flag_first_Hdead==0)
first_Hdead=r;
flag_first_Hdead=1;
end
end
250
STATISTICS(r+1).DEAD=dead;
DEAD(r+1)=dead;
DEAD_N(r+1)=dead_n;
DEAD_A(r+1)=dead_a;
%When the first node dies
if (dead==1)
if(flag_first_dead==0)
first_dead=r;
260 flag_first_dead=1;
end
end
%Number of alive Nodes
alive=0;
%Number of alive Normal Nodes
alive_n=0;
%Number of alive advance Nodes
alive_a=0;
270
for i=1:1:n
%checking number of alive node per round
if (S(i).E>0)
246
alive=alive+1;
if(S(i).ENERGY==1)
alive_a=alive_a+1;
end
280 if(S(i).ENERGY==0)
alive_n=alive_n+1;
end
hold on;
end
%checking nodes status
if (S(i).E>0)
nodes_status=1;
end
290 if (S(i).E<0)
nodes_status=0;
end
STATISTICS(i).Status=nodes_status;
Status(i)=nodes_status;
ASTATISTICS(r+1).Live=alive;
Live(r+1)=alive;
Live_n(r+1)=alive_n;
Live_a(r+1)=alive_a;
300 end
for i=1:1:n
%checking for last dead or alive node
if (alive==1 && S(i).E>0)
if (S(i).ENERGY==1||S(i).ENERGY==0)
plot(S(i).xd,S(i).yd,green .)
last_dead=r;
Instability=last_dead-first_dead;
flag_last_dead=1;
end
310
end
end
countCHs=0;
cluster=1;
for i=1:1:n
if(S(i).E>0)
temp_rand=rand;
320 if ( (S(i).G)<=0)
%Election of Cluster Heads for normal nodes
if( ( S(i).ENERGY==0 && ( temp_rand <= ( pnrm / ( 1 - pnrm * mod(r,round(1/pnrm)) )) ) ) )
countCHs=countCHs+1;
packets_TO_BS=packets_TO_BS+1;
PACKETS_TO_BS(r+1)=packets_TO_BS;
S(i).type=C;
S(i).G=100;
330 C(cluster).xd=S(i).xd;
C(cluster).yd=S(i).yd;
plot(S(i).xd,S(i).yd,k*);
distance=sqrt( (S(i).xd-(S(n+1).xd) )^2 + (S(i).yd-(S(n+1).yd) )^2 );
C(cluster).distance=distance;
C(cluster).id=i;
X(cluster)=S(i).xd;
Y(cluster)=S(i).yd;
cluster=cluster+1;
340
%Calculation of Energy dissipated
distance;
if (distance>do)
S(i).E=S(i).E- ( (ETX+EDA)*(Packet) + Emp*Packet*( distance*distance*distance*distance ));
247
end
if (distance<=do)
S(i).E=S(i).E- ( (ETX+EDA)*(Packet) + Efs*Packet*( distance * distance ));
end
end
350
%Election of Cluster Heads for Advanced nodes
if( ( S(i).ENERGY==1 && ( temp_rand <= ( padv / ( 1 - padv * mod(r,round(1/padv)) )) ) ) )
countCHs=countCHs+1;
packets_TO_BS=packets_TO_BS+1;
PACKETS_TO_BS(r+1)=packets_TO_BS;
360 S(i).type=C;
S(i).G=100;
C(cluster).xd=S(i).xd;
C(cluster).yd=S(i).yd;
plot(S(i).xd,S(i).yd,k*);
distance=sqrt( (S(i).xd-(S(n+1).xd) )^2 + (S(i).yd-(S(n+1).yd) )^2 );
C(cluster).distance=distance;
C(cluster).id=i;
X(cluster)=S(i).xd;
370 Y(cluster)=S(i).yd;
cluster=cluster+1;
%Calculation of Energy dissipated
distance;
if (distance>do)
S(i).E=S(i).E- ( (ETX+EDA)*(Packet) + Emp*Packet*( distance*distance*distance*distance ));
end
if (distance<=do)
S(i).E=S(i).E- ( (ETX+EDA)*(Packet) + Efs*Packet*( distance * distance ));
380 end
end
end
end
end
%Checking average number of ClusterHeads per epoch
sum=sum+cluster;
390 count_ch=count_ch+1;
if count_ch==10
Ave_CH=(sum*0.1)/(1+(m*a)+(b*x));
Throughput=Ave_CH*4;
STATISTICS(r+1).ave_clustHd=Ave_CH;
ave_ch(r+1)=Ave_CH;
STATISTICS(r+1).throughput=Throughput;
Clust_throughput(r+1)=Throughput;
400 Ave_CH=0;
sum=0;
count_ch=0;
end
STATISTICS(r+1).CLUSTERHEADS=cluster-1;
CLUSTERHS(r+1)=cluster-1;
%Election of Associated Cluster Head for Normal Nodes
for i=1:1:n
410 if ( S(i).type==N && S(i).E>0 )
if(cluster-1>=1)
min_dis=9999;
min_dis_cluster=1;
248
for c=1:1:cluster-1
temp=min(min_dis,sqrt( (S(i).xd-C(c).xd)^2 + (S(i).yd-C(c).yd)^2 ) );
if ( temp<min_dis )
min_dis=temp;
min_dis_cluster=c;
end
420 end
%Energy dissipated by associated Cluster Head
min_dis;
if (min_dis>do)
S(i).E=S(i).E- ( ETX*(Packet) + Emp*Packet*( min_dis * min_dis * min_dis * min_dis));
end
if (min_dis<=do)
S(i).E=S(i).E- ( ETX*(Packet) + Efs*Packet*( min_dis * min_dis));
end
430 %Energy dissipated
if(min_dis>0)
S(C(min_dis_cluster).id).E = S(C(min_dis_cluster).id).E- ( (ERX + EDA)*Packet);
PACKETS_TO_CH(r+1)=n-dead-cluster+1;
end
S(i).min_dis=min_dis;
S(i).min_dis_cluster=min_dis_cluster;
end
440 end
end
hold on;
countCHs;
rcountCHs=rcountCHs+countCHs;
CSTATISTICS(r+1)=r;
Rcount(r+1)=r;
%stop(r)
450
% %finding live or dead node in each 4x4 grid
ni=20;
cell=zeros(5,5);
if alive ==50
for i=1:1:n
for j=1:1:n
u(i)=(S(i).xd);
460 a=int32(S(i).xd);
u_grid(i)=idivide(a,ni,ceil);
v(j)=(S(j).yd);
b=int32(S(j).yd);
v_grid(j)=idivide(b,ni,ceil);
end
end
470
for i =1:1:n
%
if (Status(i) == 1)
ai= u_grid(i);
if (ai == 0)
ai = 1;
end;
bi= v_grid(i);
480 if (bi == 0)
bi = 1;
end;
249
cell(ai,bi)= cell(ai,bi)+ 1;
end
end
stop
490 end
%Code for Voronoi Cells
%Unfortynately if there is a small
%number of cells, Matlabs voronoi
%procedure has some problems
%[vx,vy]=voronoi(X,Y);
%plot(X,Y,r*,vx,vy,b-);
500 %hold on;
%voronoi(X,Y);
%axis([0 xm 0 ym]);
end
510
A.1.6 SWIFTNET Signal Recovery Algorithm code
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% SWIFTNET: Signal Recovery Algorithm using LFSR measurement matrix %
% %
% %
% (c) Femi Aderohunmu : 2013 @IEEE SIES %
% Information Science Department, University of otago. %
% %
% To report your comment or any bug please send e-mail to: %
10 % afemi@infoscience.otago.ac.nz %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Inititialize parameters
20 n=80; %size of compressed sample
z=n*q;
y=44257;
a=1;
%Generate LFSR Matrix
for i=1:z
A=bitshift(y,0);
B=bitshift(y,-2);
C=bitshift(y,-3);
D=bitshift(y,-5);
30 E=bitxor(A, B);
F=bitxor(E, C);
I=bitxor(F, D);
bit=bitand(I,1);
G=bitshift(y,-1);
H=bitshift(bit,15);
250
y= bitor(G,H);
k(i)=y;
end
40 for i=1:n
for j=1:q
matrix(i,j)= k(a);
a=a+1;
end
end
%%%% %Reconstruction process requires the Sparslab package environment to execute
compA = (matrix) * Compvector;
B_rec = dctmtx(q);
50 coefMP2 = SolveBP(matrix*B_rec, compA, q);
Grecon = (B_rec*coefMP2); %Reconstructed signal
%%% visit http://sparselab.stanford.edu/ to download Sparselab
251