AClustering Algorithm Enhancementin Wireless Sensor Networks Using Fuzzy Logic
AClustering Algorithm Enhancementin Wireless Sensor Networks Using Fuzzy Logic
net/publication/320271752
CITATION READS
1 732
1 author:
Ahmed Elnaggar
Information Technology Institute
24 PUBLICATIONS 3 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Ahmed Elnaggar on 08 October 2017.
Master of Science
in
Information Technology
by
2017
Alexandria University
Institute of Graduate Studies and Researches
Department of Information Technology
Presented by
Date / /
Advisors Committee Approved
I declare that no part of the work referred to in this thesis had been
Signature:
Publications
Journal Info.
Journal: International Journal of Computational Intelligence Systems.
Publisher: Atlantis Press.
Open Access Link:
http://www.atlantis-press.com/publications/ijcis/index.html
ISSN in print: 1875-6891.
ISSN on-line: 1875-6883.
Indexed by: Thomson Reuters, Scopus, Google Scholar, EI/Compendex, and
SCI.
Impact Factor: 1.140
Rank (Computer Science, Interdisciplinary Applications): 77/105
جامعة اإلسكندرية
معهد الدراسات العليا والبحوث
قسم تكنولوجيا المعلومات
رسالة مقدمة
الماجستير
في
تكنولوجيا المعلومات
من
أحمد عاطف محمد النجار
بكالوريوس هندسة2004 ،
دبلومة دراسات عليا في اإللكترونيات2008 ،
كلية الهندسة
جامعة األسكندرية
2017
جامعة اإلسكندرية
معهد الدراسات العليا والبحوث
قسم تكنولوجيا المعلومات
في
تكنولوجيا المعلومات
---------------------------------------------
أقـــر أنه ال يوجد أي جـــزء من هذا العمــل قد ســبق تقديمه لنيل درجة أخرى في
التوقـيــــــع:
المـلـخـص الـعــربـي
إن السالسل العنقودية تعتبر أحد أبرز األنشطة البحثية من أجلل إسلتطالو ومعالجلة مشلنلة ن لاذ الطاقلة فلي
مجللاش كللبناس اعستشللعار الالسلللنيةل حيللا تالبلا ع مللايتم تجميللع أجهللزع اعستشللعار فللي مجموعللاس من صلللة
ومعظمهللا تيللر متللداخلل ومللن الم تللر أن تصللميم ومعماريللة الشللبنة الالسلللنية عللل هي للة السالسللل
العنقوديللة يحللد مللن الطاقللة المسللتهلنة فللي نقللل المعلومللاس ويحقللق التللوازن بللين المسللاراس فللي حر لة نقللل
البياناسل ويعزز من قابلية إضافة أجهزع إستشعار للتوسع بالشبنة وإطالة العمر اعفتراضي للشبنة.
هذا ما أن نقل البياناس التي تم إستشعارها من الوسط المحيط إلي محطة اعستقباش مرورا ع بأ ثر ملن نقطلة
فللي السلسلللة يعتبللر أفنللل مللن نقله لا بشللنل مباكللرل حيللا يللتم تقللليي مسللتوي الطاقللة المسللتهلنة بعمليللة
اعرساش.
تحديد المشكلة
إن إرساش البياناس مرورا ع بلأ ثر ملن سلسللة يواجلة تحلديين ر يسليين :األوش هلو البحلا علن تقنيلاس فعاللة
لتشللنيل السالسللل بشللنل مثللاليل والثلللاني هللو مشللنلة اش Hotspotوالتللي تنملللن فللي ن للاذ طاقللة أجهلللزع
اعستشللعار القريبللة مللن محطللة اعسللتقباش نظللرا ع لعملهللا بص ل ة مسللتمرع فللي نقللل البيانللاس سللواء مللن داخللل
السلسلة أو من خارجها.
ما أن تقنية السالسل الغير متساوية تعتمد علي تنوين سالسل تنم عددا ع أقل من أجهزع اعستشلعار عنلدما
تنللون المسللافة بللين السلسلللة ومحطللة اعسللتقباش قريبللةل وذل ل مللن أجللل الحللد مللن الطاقللة المسللتهلنة داخللل
السلسلةل إال أن إيجاد المدي المثالي للسلسلة يظل عقبة في اععتماد علي هذه التقنية.
أهداف الرسالة
وتتمحور أهداف الرسالة في إطالة العمر اعفتراضي لشلبنة اعستشلعار الالسللنية وتحقيلق التوزيلع العلادش
للطاقة مع الحد من الطاقة المستهلنة.
منهجية الرسالة
هللذه الرسللالة تقتللرز خوارزميللة مر ب له ) (HFMUCلمواجهللة تل ل المشللنلة .هللذه الخوارزميللة تسللتخد
لتنوين سالسل تير متساوية إعتمادا ع علي المنطق الغيمي وتوجيه البياناس مرورا ع بأ ثر من سلسلة وصوالع
إلي محطة اعستقباشل بهدف تحقيق العملر اعفتراضلي األمثلل لجهلاز المستشلعر ملع األخلذ فاععتبلار ملدي
البعد عن محطة اعستقباش و ثافة السلسلة ومقدار الطاقة المتبقية لدي جهلاز اعستشلعار .ملا تقلو الرسلالة
بتطبيق المنطلق الغيملي لتوليلد سالسلل تيلر متسلاوية لشلبناس اعستشلعار الالسللنية ذاس أجهلزع إستشلعار
ثي لة العللدد وتيللر متماهللة بهللدف إختيللار قللادع السالسلل وتحديللد مللدي ن للوذ لل مللنهم .ولتقيلليم الخوارزميللة
المقترح لة تقللو الرسللالة بمحا للاع عللدد خمسللة خوارزمي لاس متقدم لة ومنشللورع ولهللا وزن بيللر فللي المجللاش
لمقارنة النتا ج .ما تم تحليل ومقارنة النتا ج التي حصلنا عليها عهباس مدي اءع وت وق العمل المقترز.
محتويات الرسالة
وتتنمن الرسالة ستة أبوابل ويمنن إيجاز ملخي هذه األبواب التالي:
الباب األول :مقدمة ومراجعة كاملة لشلبناس اعستشلعار الالسللنية والتر يلب البنلا ي لعقلد االستشلعار علن
بعد ما يتناوش أهم خصا ي كلبناس اعستشلعار الالسللنية وتحلدياتها وينتهلي هلذا البلاب بتقلديم أحلد أبلرز
الحلوش بتقسيم الشبنة إلي عدع سالسل.
الباااب الناااني :مراجعللة كللاملة للموضللوعاس المتعلقللة بالرسللالة ويسللتعر هللذا البللاب التطللور التللاريخي
لظهللور كللبناس اعستشللعار الالسلللنية ه لم اعست اضللة فللي موضللوو تقسلليم الشللبنة إلللي سالسللل مللن حيللا
مميزاتلله وتحدياتلله وتصللني اته المختل للة مللع تنللاوش بعللا الخوارزميللاس التللي سللنعتمد عليهللا فللي مقارنللة
الخوارزمية المقترحة مع تقديم المبرراس التي تم إختيار هذه الخوارزمياس بناءا عليهال وينتهلي هلذا البلاب
بتناوش أنواو المحا ياس المناسبة لتطبيق كبناس اعستشعار الالسلنية.
الباب النالث :يتنمن هذا الباب السيناريو المقتلرز وتوضليك ي يلة إحتسلاب الطاقلة المسلتهلنة ملع دراسلة
المنهجية المتبعة لنل خوارزمية.
البااب الراباع :يتنللاوش أهلم مميلزاس اععتمللاد عللي المنطلق الغيمللي ملع توضليك الهينللل المقتلرز ملع كللرز
ت صلليلي لمدخالتلله ومخرجاتلله وبيللان حللدود ودواش للل عامللل علللي حللدع .ينتقللل بعللد ذللل إلللي منهجيللة
الخوارزميلللة المقترحلللة ملللع توصللليف تسلسلللل خطواتللله إسلللتنادا ع إللللي لللود ومخطلللط الخوارزميلللةل إنتهلللاءا ع
بإستعرا عمل دورع املة للخوارزمية المقترحة.
الباب الخامس :توصليف السليناريو المقتلرز لتن يلذ محا لاع لل خوارزميلة ملع تحديلد مقلاييت اعداء التلي
سيتم اععتماد عليها للمقارنة مع إقتراز مقياسين جديدين .ما يتم إستعرا النتلا ج التلي تلم التوصلل إليهلا
قبللل تطبيللق الخوارزميللة المقترحللةل مثللل إ هللار مشللنلة اعخ للاق التللي تواجلله خوارزميللة اش LAECHل
ومللرورا ع بتحديللد المللدي المثللالي لخوارزميللة اش HEEDإنتهللاءا ع بمحا للاع سلليناريو إفتراضللي عسللتعرا
مشللنلة اش .Hotspotومللن هللم اعنتقللاش إلللي مناقشللة نتللا ج محا للاع الخوارزميللة المقترح لة ومقارنته لا مللع
الخوارزميللاس التللي تللم دراسللتهال حيللا تناولللا المقارنللاس العمللر اعفتراضللي للشللبنة ومللدي فتللرع الثبللاس
وإسللللتهالط الطاقللللة وتوزيعهللللا بشللللنل منللللتظم لنللللل خوارزميللللةل مللللع إ هللللار تللللأهير Overhead
Communicationsعلي إستهالط الطاقة لنل خوارزمية.
الباب السادس :يقد ملخي عا للرسالة واعسلتنتاجاس التلي إنتهلي إليهلا البحلا وأهلم التوصلياس والعملل
المستقبلي باعضافة إلي المراجع والمحلقاس.
Acknowledgement
First and foremost, I would like to express my deepest appreciation and endless
gratitude to Prof. Shawkat Guirguis, Professor of Computer Science & Informatics,
Department of Information Technology, Institute of Graduate Studies & Research (IGSR),
Alexandria University, for giving me the privilege of working and for his valuable
supervision, instructions, and encouragement throughout the entire work.
I am greatly indebted and appreciative to Ass. Prof. Mohamed Abd-ElRahman M.
Abdou Associate Professor of Electrical and Computer Systems Engineering, Informatics
Research Institute (IRI), City for Scientific Research and Technology Applications (SRTA-
City), for his useful suggestions, generous support, and enthusiastic cooperation which have
made completing this work possible.
I would like to extend my gratitude to all staff members and colleagues in the
Information Technology Department, Institute of Graduate Studies & Research, University of
Alexandria, for the great continuous help they offered me and also for their motivation,
enthusiasm, and immense knowledge. My sincere thanks also goes to all the staff of
Information Technology Institute for their encouragement, insightful vision, and for their
scientific research support. Last but not least, I would like to express my profound thanks to
my family for their continuous guidance and constant encouragement.
Above all, I thank the almighty God for bringing me that far and for helping me through
this journey.
i
List of Abbreviation
CHProb CH Probability
CI Computational Intelligence
CMOS Complementary Metal Oxide Semiconductor
COA Center Of Area
CR Cluster Radius
CSMA Carrier-Sense Multiple Access
DARPA Defense Advanced Research Projects Agency
DBS Distance to Base Station
DC Density of Cluster
Deviation of the node’s Residual Energy from the average
DRE
network energy
EAUCF Energy Aware Fuzzy Unequal Clustering
EDA Energy of Data Aggregation
EEUC Energy-Efficient Unequal Clustering
ELFDN Energy Level At First Dead Node
FDN First Dead Node
FL Fuzzy Logic
FPGA Field Programmable Gate Array
GA Genetic Algorithm
H.Prob High Probability
HDN Half Dead Node
HEED Hybrid Energy-Efficient Distributed Clustering
HFMUC Hybrid Fuzzy Multi-Hop Unequal Clustering
IOT Internet Of Things
ISM Industrial Science and Medical
KB Kilo Byte
LDN Last Dead Node
LEACH Low-Energy Adaptive Clustering Hierarchy
MATLAB Matrix Laboratory
ii
M.Prob Medium Probability
MAC Medium Access Control
MIPS Million Instructions Per Second
MOFCA Multi-Objective Fuzzy Clustering Algorithm
N Number of Sensor Nodes
NNs Neural Networks
QoS Quality of Service
iii
Table of Contents
Acknowledgement............................................................................................................... i
List of Abbreviation .......................................................................................................... ii
Table of Contents.............................................................................................................. iv
List of Figures ................................................................................................................... vi
List of Tables .................................................................................................................... vii
Abstract ...........................................................................................................................viii
Chapter 1 Introduction ..................................................................................................... 1
1.1 Advantages of WSNs .............................................................................................. 2
1.2 Challenges Observed in WSNs ............................................................................... 3
1.3 Problem Definition .................................................................................................. 3
1.4 Thesis Objectives .................................................................................................... 3
1.5 Thesis Organization ................................................................................................ 3
Chapter 2 Review of Literature ....................................................................................... 5
2.1 History And Fundamentals of WSN ....................................................................... 5
2.2 Clustering Concept .................................................................................................. 6
2.3 Objectives of Clustering.......................................................................................... 7
2.4 Challenges of Clustering ......................................................................................... 8
2.5 Clustering Taxonomy .............................................................................................. 9
2.5.1 Equal-Sized Clustering Algorithms ............................................................... 10
2.5.2 Unequal-Sized Clustering Algorithms ........................................................... 11
2.5.3 Deterministic Unequal-Sized Clustering Algorithms .................................... 11
2.6 Reviewed Protocols............................................................................................... 13
2.7 Simulation Tools ................................................................................................... 14
Chapter 3 Related Work ................................................................................................. 15
3.1 Introduction ........................................................................................................... 15
3.2 Proposed Scenario Assumptions ........................................................................... 15
3.3 Deployment Model ............................................................................................... 16
3.4 System Configurations and Parameters Description ............................................. 16
3.5 Frist Radio Model ................................................................................................. 18
3.6 Core of Implemented Algorithms ......................................................................... 18
3.6.1 LEACH Methodology .................................................................................... 18
3.6.2 SEP Methodology .......................................................................................... 20
3.6.3 HEED Methodology ...................................................................................... 20
3.6.4 EEUC Methodology ....................................................................................... 22
3.6.5 MOFCA Methodology ................................................................................... 23
3.7 Summary ............................................................................................................... 23
Chapter 4 The Proposed Hybrid Fuzzy Multi-Hop Unequal Clustering (HFMUC) 24
4.1 Advantages of Fuzzy System ................................................................................ 24
4.2 Proposed Fuzzy System Description..................................................................... 24
4.3 HFMUC Operations Flow ..................................................................................... 28
4.4 One Round of The Proposed HFMUC .................................................................. 33
4.5 Summary of HFMUC Methodology ..................................................................... 33
Chapter 5 Results and Discussions ................................................................................ 34
5.1 Performance Measures .......................................................................................... 34
5.2 LEACH Failure Study ........................................................................................... 34
5.2.1 The Proposed Modified-LEACH Algorithm ................................................. 35
iv
5.2.2 LEACH and Mod-LEACH Simulation results .............................................. 35
5.3 Simulating HEED ................................................................................................. 38
5.3.1 Determining HEED Cluster Radius ............................................................... 38
5.3.2 Effect of Hotspot ............................................................................................ 38
5.4 HFMUC - Simulation Compared to Existing Algorithms .................................... 39
5.4.1 Stability Period Scope .................................................................................... 39
5.4.2 Energy Evaluation .......................................................................................... 41
5.4.3 Overhead Communication ............................................................................. 43
5.5 Discussions............................................................................................................ 44
Chapter 6 Conclusions and Future Work ..................................................................... 45
References ........................................................................................................................ 46
Appendix MATLAB Scripts ........................................................................................... 49
v
List of Figures
vi
List of Tables
vii
Abstract
viii
Chapter 1
Introduction
Beyond the established technologies such as mobile phones and Wireless Local Area
Network (WLAN), new approaches to wireless communication are emerging aided with
sensor networks for their potential applications.
The recent continued advance in embedded systems-especially Complementary Metal
Oxide Semiconductor (CMOS) technology and miniaturization techniques- have resulted in
the development of small-sized devices and low cost micro sensors. A Wireless Sensor
Network (WSN) consists of a group of distributed sensor nodes interconnected wirelessly.
Each of the distributed sensor node typically consists of a data processing unit,
communication components, one or more computational sensing elements, memory with
limited storage, and a power source (usually a battery), as shown in Figure 1.1 (1).
Antenna
Processor &
Sensor module ADC Tranceiver
Storage
Power unit
Akyildiz I. F., Su W., Sankarasubramaniam Y., and Cayirci E. (2) demonstrated that
the data processing unit performs tasks, processes data, and controls the functionality of other
components within the sensor node. Other alternatives that can be used as controllers are:
general purpose desktop microprocessor, digital signal processors, Field Programmable Gate
Array (FPGA), or application-specific integrated circuit. Microcontrollers are the most
suitable choice for sensor node. Microcontrollers are preferred due to their flexibility to
connect to other devices, ability to be programed, low power consumption, as these devices
can go to sleep state and part of the controller can be active. In general-purpose
microprocessor, the power consumption is more than the microcontroller.
Communication components (Transceiver): sensor nodes make use of Industrial
Science and Medical (ISM) band, which gives free radio, huge spectrum allocation and global
availability. The various choices of wireless transmission media are radio frequency, optical
communication (Laser) and Infrared. Laser requires less energy, but needs line-of-sight for
communication and also sensitive to atmospheric conditions. Infrared like laser, needs no
antenna but is limited in its broadcasting capacity. Radio Frequency (RF) based
communication is the most relevant that fits to most of the WSN applications. WSN’s use the
communication frequencies between about 433 MHz and 2.4 GHz. The functionality of both
the transmitter and the receiver are combined into a single device known as transceivers and
used in sensor nodes. The operational states are transmit, receive, idle and sleep. Current
generation radios have built-in state machines that perform this operation automatically.
Sensing unit senses the environment through transducer. As for the External Memory,
from an energy perspective, the most relevant kinds of memory are on-chip memory of a
microcontroller, FLASH memory and off-chip Random Access Memory (RAM), which have
limited use. Flash memories are used due to their reduced cost and large storage capacity.
Memory requirements are very much application dependent.
1
1.1 Advantages of WSNs
The past few decades have witnessed interest in the potential use of WSNs, that a
world without it is no longer imaginable, which involve tremendous relationship between
both academia and industry, and also they have recently gained attention all over the world.
The fundamental importance of WSNs arises from their widely use in various civilian and
military fields. In addition, the interest in the research and development of WSNs is due to
their numerous advantages over other wireless technologies. They are easier and faster with
lower cost to deploy than wired networks or other forms of wireless networks. WSNs
revolutionize the way we live, work, and interact with the physical world in additional to their
capability for monitoring in remote and inaccessible locations, where it is not feasible to
install conventional wired infrastructure (3). Even though, sensor nodes are not very accurate
and reliable individually, their distribution in large number enhances their accuracy and
reliability, and they have a large coverage area and longer range. WSNs have higher degree of
fault tolerance than other wireless networks since a failure of one or few nodes does not affect
the operation of the network. Table 1.1 summarizes some of the key differences between
traditional networks and WSNs.
In general, the applications of WSNs can be divided into two general groups; tracking,
such as combat field reconnaissance and border protection; and monitoring, such as disaster
management…etc. Finally, they are self-configuring and self-organizing.
According to these varieties of applications, functions, capabilities, and sensing
requirements like denser level of node deployment, higher unreliability of sensor nodes,
severe energy, computation, storage constraints, and expectation to operate autonomously in
unattended environments, WSNs need further researches.
2
1.2 Challenges Observed in WSNs
Important aspects on the network architectures, protocols, algorithms, and design
requirements, in terms of network capabilities and performance, lead to impact in the
operational lifetime of the whole network. Also some of the internal and external factors
which are represented in; unique sensor characteristics, network characteristics and field
nature, present a variety of unique challenges and constraints.
In addition; energy limitation, secure communication, synchronization, data
aggregation, and Quality of Service (QoS) are to be considered (4).Since the wireless sensor
node is often placed in a hard-to-reach location, changing the battery regularly can be costly
and inconvenient. An important aspect in the development of a wireless sensor node is
ensuring that there is always adequate energy available to power the system, so energy
conservation is the core issue in these networks. Generating a node energy model that can
accurately reveal the energy consumption of sensor nodes becomes an important issue in
system design and performance evaluation for WSNs (5).
A sensor dissipates power due to three operations: sensing, communicating, and data
processing. More energy is required for data communication. For example, Pottie G. J. and
Kaiser W. J. (6) showed that the energy cost of transmitting 1 Kilo Byte (KB) message over a
distance of 100 meters is approximately equivalent to the execution of 3 million CPU
instructions by a 100 Million Instructions Per Second (MIPS) processor. Thus, there is a need
for an architecture in which the transmission to a BS is as low as possible (7).
In Chapter 3, we introduce our proposed scenario, the first radio model, and the
methodology of the surveyed algorithms.
In Chapter 4, we introduce the proposed fuzzy system, present the flow chart, and illustrate
the related pseudo code. Solution for hotspot problem is also discussed.
In Chapter 5, we describe our system model and simulation parameters. The performance
metrics, comprehensive results’ discussion regarding the stability period, the energy
consumption, the energy distribution, and the impact of overhead are all shown.
In Chapter 6, the conclusions will be drawn and some suggestions about future are also
discussed.
4
Chapter 2
Review of Literature
There are several proposed clustering algorithms for WSNs in recent years. In this
chapter, we are reviewing the history of WSNs, clustering concept, clustering challenges, and
their advantages. Then the taxonomy for clustering is serveyed and we are focusing on the
deterministic unequal-sized clustering algorithms, especially those based on fuzzy theory.
Naeimi S., Ghafghazi H., Chow C.-O., and Ishii H. (27) presented state-of-the-art and
comprehensive clustering approaches. They began with the objectives of clustering, clustering
characteristics, and then presented a classification on the clustering algorithms in WSNs.
Some of the clustering objectives are scalability, fault-tolerance, data aggregation/fusion,
increased connectivity, load balancing, and collision avoidance.
Liu X. (28) represented a survey on clustering routing protocols, where the clustering
algorithms are reviewed and divided into cluster-construction routing and data-transmission
routing methods. The research focused only on some well-known clustering approaches and
old-presented protocols, makes no review on fuzzy-based, and recently proposed approaches
in that area. The reviewed surveys are usually limited in scope, incomplete, or outdated, also
have not covered all types of clustering, especially which based on AI e.g. fuzzy-logic-based.
Nayyar A. and Gupta A. (29) proved that traditional routing protocols for WSN are not
optimal enough, in terms of energy efficiency, and load balancing clustering is introduced to
increase the lifetime of the network. Clustering is a sample of layered protocols where the
network is composed of several clusters of sensor nodes. As shown in Figure 2.2, each cluster
has a leader node which is also called CH, which takes data from all the nodes in its cluster,
then aggregates all the data received from cluster members, and send that data to the BS.
The transmission between cluster members and CH is said to be intra-cluster communication,
whereas the transmission between CH and sink is known as inter-cluster communication.
6
Cluster Head
Cluster Member
BS
Figure 2.2: Clustering process in WSN
Commonly in random selection protocol for any CH, transmissions era may be
categorized into stages or phases. This can be categorized into three phases: set-up phase,
steady-state phase, and data transmission to sink phase as shown in Figure 2.3 (30).
In Set-up phase, CHs are selected from among the regular sensor nodes based on certain
parameters (For e.g., nodes energy level and number of times this node has been selected as
CH previously). Selected CH broadcasts an advertisement message to all other nodes. All
remaining nodes get themselves associated to their nearest CHs. In Steady-state phase, during
the contention period, all nodes keep their radio on. The CH builds a Time Division Multiple
Access (TDMA) schedule and broadcasts it to all nodes within the cluster. There are some
frames and one data slot allocated to each node in each frame. Data are transferred from each
node to their respective CH within the TDMA time slot previously assigned to them. In Data
transmission phase, the collected data at each CH is forwarded to the sink. As WSNs are
energy constrained and data transmission is the most energy consumer, there is a need for an
architecture in which the transmission to a BS is as low as possible.
7
Clustering objectives
Primary Secondary
In the following, we list and briefly explain these objectives of clustering in WSNs.
Prolong lifetime: The CH can prolong the battery life of the individual sensors and the
network lifetime as well by implementing optimized management strategies.
Scalability: the ability to extend network by deploying more sensor nodes to operated
network.
Data aggregation/fusion: A CH can perform data aggregation in its cluster and avoid
transmitting repetitive data in the network. Data aggregation techniques are usually based
on signal processing methods.
Fault-tolerance: WSNs are usually dispersed in harsh environments with limited access so
that the fault-tolerance and self-configured characteristics are crucial for such networks. In
general, the failure of some nodes should not affect the overall task of a WSN.
Load balancing: Clustering can conserve communication bandwidth since it limits the
scope of inter-cluster interactions to CHs and avoids redundant exchange of messages
among sensor nodes. Thus, it is better to rotate the role of CH among all the nodes in the
network.
Reduced routing delay: Clustering reduces the size of the routing table stored in the
individual nodes by localizing the route set-up within the cluster.
Increased connectivity: This objective can be either as simple as ensuring the existing of a
path from every CH to the BS. Clustering the nodes improves the performance, especially
in large-scale WSNs.
Collision avoidance: Each collision causes some packets to be lost, so each node has to re
transmit the latest packets. Clustering utilizes some MAC layer protocols, like TDMA.
8
Limited abilities: The small physical size and small amount of stored energy in a sensor
node limits many of the abilities of nodes in terms of processing, memory, storage, and
communication.
Secure communication: The ability of a WSN to provide secure communication is ever
more important when considering these networks for critical applications. The self-
organization of a network has a huge dependence on the application it is required for. An
establishment of secure and energy efficient intra-cluster and inter-cluster communication
is one of the important challenges in designing clustering algorithms since these tiny nodes
when deployed are unattended to in the most cases.
Cluster formation and CH selection: Cluster formation and CHs selection are two of the
important operations in clustering algorithms. Energy wastage in sensors in WSN due to
direct transmission between sensors and the BS can be avoided by clustering the WSN.
Clustering further enhances scalability of WSN in real world applications. Selecting
optimum cluster size, election and re-election of CHs, and cluster maintenance are the
main issues to be addressed in designing of clustering algorithms. The selection criteria to
isolate clusters and to choose the CHs should maximize energy utilization.
Rotating CHs: Being a CH means taking over additional tasks: organizing medium access
within the cluster or participating in routing decisions. Hence, the battery of CHs will tend
to be exhausted sooner. Often, the duty of being a CH should be shared among all nodes.
To be able to rotate the CHs, the clustering algorithm cannot run only once but must be
repeatedly executed. These repetitions can happen periodically or can be triggered by node
mobility, for example.
Data Aggregation: Data aggregation eradicates duplication of data. In a large network there
are often multiple nodes sensing similar information. Data aggregation allows
differentiation between sensed data and useful data. Many clustering schemes providing
data aggregation capabilities must carefully select a suitable clustering approach.
Quality of Service (QoS): From an overall network standpoint, we can look at QoS
requirements in WSNs. Many of these requirements are application dependent such as
acceptable delay and packet loss tolerance.
9
Furthermore, clustering algorithms could be divided into: probabilistic and deterministic as
shown in Figure 2.5.
Clustering Algorithms
(Equal/Unequal sized)
Probabilistic Deterministic
Fuzzy Inference
Fuzzifier Defuzzifier
engine
12
The main difference is presented at the defuzzification stage in which TSK rule
consequents are mathematical functions (not fuzzy) (43). Moreover, as will be explained
below, rule outputs are independent from each other. In our implementation, it does not make
sense to aggregate different nature outputs with a weighted average as TSK does. In this
work, we aim to get the best match (max-min inference) and for that approach, the use of the
Mamdani makes perfect sense. The input of a Mamdani fuzzy-logic system is usually a crisp
value. To allow this value to be processed by the system, it has to be converted to natural
language, that is, it has to be fuzzified. In this way, the fuzzifier method takes numeric values
and turns them into fuzzy values, which can be processed by the inference system. These
fuzzy values represent the membership values of the input variables to the fuzzy sets.
Once values have been fuzzified, the inference system processes the fuzzy rules to get
a fuzzy output. In the case of a fuzzy rule having more than one antecedent (conditional
element), an AND (minimum) or an OR (maximum) operator is used to estimate the output
value of rule evaluation. The third step in the Mamdani inference method is the aggregation of
all outputs, where the outputs of each rule are combined to form a new fuzzy set (44).
Finally, at the defuzzification stage, the new aggregated fuzzy set is converted to a number.
Mamdani uses the centroid technique which tries to determine the point where a vertical line
divides the combined set into two equal parts (45).
13
Table 2.1: The summary of reviewed protocols
Cluster
Category Classification Protocol Motivation
Form
1st dynamic Clustering
Random LEACH
but Homogeneous
Equal- 1st Heterogeneous
Probabilistic SEP
sized dynamic clustering
Hybrid
1st Hybrid protocol &
HEED
Multi-hop
1st Unequal
Probabilistic Hybrid EEUC Dynamic to overcome
Unequal-
hotspot
sized
Cluster radius based on
Deterministic Fuzzy-based MOFCA
fuzzy system
14
Chapter 3
Related Work
3.1 Introduction
The aim of our work is to minimize the overall energy dissipated in the network,
extend network lifetime, and overcome the hotspot problem based on a proposed fuzzy
system to determine CHs and generate unequal clustering. Energy consumption of CHs is
usually high due to receiving sensed data from their member nodes, performing data
aggregation, and sending the aggregated data to the next hop node or BS. Therefore, the
operation of clustering protocols is divided into rounds and the role of the CH must be rotated
among all sensor nodes within these rounds. After surveying the state-of-the-art unequal
clustering, it was necessary to implement the picked popular protocols.
Firstly, working environment of our application is explained, and first radio model is
applied for estimating power consumption. Then LEACH-distributed protocol is
implemented. It was selected since it is the first well-known clustering-based routing protocol
and many the subsequent clustering-based protocols are based on it. Then, advanced protocols
(SEP and HEED) are applied, they are currently ones of the well-known and cited routing
protocols since they proved suitable features and good results. The implementations of SEP
and HEED are based on the pseudo-code provided in their original papers.
Furthermore, EEUC and MOFCA protocols were implemented and simulated based
on unequal clustering, also they differ in their complexity, their strength, number of
assumptions, and the goals. Finally, our proposed fuzzy system and our algorithm
methodology are explained clearly.
Create Schedule
Cluster Set-Up
Cluster Set-Up
Advertisement
Advertisement
Slot n
Slot n
Slot 1
Slot 2
Slot 1
Slot 2
……
……
……
……
… …
15
4. Base station
A single BS is fixed, immobile, and has unlimited resources.
BS is located out of the Area of Interest (AOI).
It broadcasts a synchronization packet at the beginning of each round.
5. Radio characteristics
Communication energy consumption according to first order radio model.
Radio channel is symmetric.
An ideal MAC layer and error-free communication links are assumed.
Same energy dissipation in transmit and receive circuitry for a given Signal-to-Noise
Ratio (SNR).
6. Sensors characteristics
Sense the environments at a fixed rate or no mobility.
Communicate among each other and to the BS.
Deploy in random and non-deterministic manner in a large-scale area.
Send their location information and energy level to BS during the set-up phase.
Capable of adjusting the amount of transmission power according to the distance of
the receiving nodes.
Heterogeneous but the majority of them are homogenous and have energy-constraint.
The distance between nodes can be computed based on the received signal strength.
Therefore, there is no need for the sensor nodes to know their exact locations from
each other.
7. The delay of the broadcast process and the calculation process are negligible due to the
high computation ability and the unlimited energy of the BS.
16
Table 3.1: Summary of parameter definitions and their values
Simulation parameters
Parameters Definition Values / Unit
Topology is fixed (All sensor nodes are stationary after deployment)
Energy Model (1st order radio model)
Nodes Distribution ( Randomly distributed)
Energy model (Battery)
BS Base Station Resource-rich device
rmax Simulation Rounds 1500 rounds
x*y Network Size 100 * 100 m2
n Number of nodes 200
BS Number of Gateway nodes 1
BS location Location from area of the interest (AOI) 1.5x * 0.5y
LEACH, SEP and parameters
m Heterogeneity percentage rate 20%
α Exceeded value of advanced nodes 1
P Optimal percentage of CHs 20%
Eo Initial node power 0.5 Joule
K Data Packet size 500 byte = 4000 bits
l Broadcast Packet size 20 byte = 160 bits
ETX Energy for Transmission 50 nJ/bit
ERX Energy for Reception 50 nJ/bit
Eelec Energy of Circuitry dissipation ETx-elec = ERx-elec nJ/bits
Eamp Energy of Amplifier Transmit Ɛfs OR Ɛmp
Ɛfs Energy dissipation at Free Space 10 pJ/ bit /m2
Ɛmp Energy for Multi-Path fading 0.0013 pJ/ bit /m4
do Threshold distance 2
√(Ɛfs/Ɛmp)=87.7m
EDA Energy for Data Aggregation 5 nJ/bit
i, r, k Dummy variables for node, round, and Cluster
HEED parameters
Niter Number of iterations which is required for 15
clustering process by HEED protocol
Cprob An initial percentage of cluster heads among 20%
all n nodes
CR Cluster Radius of HEED protocol 50m
Emax Reference maximum energy 1 Joule
pmin A certain threshold of the CHs percentage 10-4
EEUC parameters
R0comp The max. Competition radius of EEUC 50m
dmax ,dmin denote the maximum and minimum distance m
between sensor nodes and the BS
d(si,BS) The distance between si and the BS m
17
3.5 Frist Radio Model
The first order radio model is taken into consideration when deducting transmission
and reception of power dissipated in communication. The radio energy dissipation model is
illustrated in Figure 3.2 as introduced by Heinzelman W. R., Chandrakasan A., and
Balakrishnan H. (32).
d
ETx(d)=Eelec * k ETx-amp (k; d) ERx=Eelec * k
K bit packet K bit packet
Transmit Receive
Tx amplifier
electronics electronics
18
Define parameters
of WSN
True
Assign
parameters values
Y N
if i≥ mn+1
LEACH calculations
Node joins its CH
False CH election False
r ≥ rmax r=r+1 i=i+1 i≤n
False True
True i=i+1 i≤n
Y N Y N
if d > do
if d > do
Calculate Average
Energy
Plot statistics
End
19
3.6.2 SEP Methodology
According to SEP protocol, Eo is the initial energy of normal sensor, while Eo (1 + α) is the
initial energy of advanced node. According to heterogeneity of SEP the weighed probabilities
for normal (Pnrm ) and probabilities of advanced (Padv ) nodes are given by Eq. 3.4 and Eq. 3.5
respectively:
P
Pnrm = (Eq. 3.5)
1+α∙m
P
Padv = ∙ (1 + α) (Eq. 3.6)
1+α∙m
The pseudo code of HEED sets an initial percentage of CHs among all n nodes, Cprob
(say 20% percent), assuming that an optimal percentage cannot be computed a priori. Cprob is
only used to limit the initial CH announcements, and has no direct impact on the final
clusters. Before a node starts executing HEED, and at the initiation phase, it sets its
probability of becoming a CH, CH Probability (CHprob), as follows Eq. 3.8:
Eresidual
CHprob = C𝑝𝑟𝑜𝑏 × (Eq. 3.9)
Emax
where Eresidual is the estimated current residual energy in the node, Emax is a reference
maximum energy (corresponding to a fully charged battery); Cprob also has an effect on
number of iterations. The CHprob is the probability of node to be CH; however it is not
allowed to fall below a certain threshold pmin (e.g., 10-4), that is selected to be inversely
proportional to Emax. This constrain is essential for terminating the algorithm after repeating
determined iterations during the main processing phase, and it ends by assigning all the
uncovered nodes as CHs. The flowchart of HEED is presented in Figure 3.4.
20
Define parameters
of WSN
True
Assign
parameters values
Y N
if i≥ mn+1
N Y If CH N
If E≤0 Y
indicator is Calculate Energy Calculate Energy
21
For alive final CH dissipated (εmp *d4) dissipated (εfs *d2)
Y If node has N
nodes
If node has Nbrs.
N
dead+1 Assign node as CH Nbrs.
Plot '.' Y N Y Packet to BS+1
if d>do
Y
Assign closest Nbrs, their If one or N
N distances & their numbers N If one or
If E>0 more CH Calculate Energy Calculate Energy
more CH dissipated (εmp *d4) dissipated (εfs *d2)
Y Y
Y
Check closest Nbr,
Plot WSN Y If node still Check closest Nbr, CHID, its distance
doesn't have CH CHID, its distance Packet to CH+1
N
Calculate dmax Deduct Erx of CH
N If node still
and dmin
doesn't have CH
If Random ≤ Y Chprob=
N Generate random #
CHprob min(CHprob* 2,1)
Calculate Throughput
If Chprob = 1
Assign node as CH
& plot CH Calculate Average
Change CH indicator
Y Energy
&plot CH
Plot statistics
End
Figure 3.4: The flowchart of HEED
3.6.4 EEUC Methodology
First, several tentative CHs are selected to compete for final CHs. Every node
becomes a tentative CH with the same probability T which is a predefined threshold. Other
nodes keep sleeping until the CH selection stage ends. Suppose Si becomes a tentative CH, Si
has a Competition Range (Rcomp), which is a function of its distance to the BS. The goal is that
if Si becomes a CH at the end of the competition, there will not be another CH Sj within Si’s
competition radius.
The concept of unequal clustering, based on CHs closer to the BS, should support smaller
cluster sizes because of higher energy consumption during the inter-cluster multi-hop
forwarding communication. Thus, more clusters should be produced closer to the BS.
That is to say, the node’s competition radius should decrease as its distance to the BS
0
decreases. We need to control the range of competition radius in the network. Suppose 𝑅𝑐𝑜𝑚𝑝
is the maximum competition radius, which is predefined. We set Rcomp of Si as a function of
its distance to the BS as shown in Eq. 3.9:
𝑑 −𝑑
𝑅𝑐𝑜𝑚𝑝 = (1 − 𝑐 × 𝑚𝑎𝑥 𝑖,𝐵𝑆 )𝑅𝑐𝑜𝑚𝑝 0
(Eq. 3.10)
𝑑𝑚𝑎𝑥 −𝑑𝑖,𝐵𝑆𝑚𝑖𝑛
where dmax and dmin denote the maximum and minimum distance between sensor nodes and
the BS, di,BS is the distance between si and the BS, c is a constant coefficient between 0 and 1.
0 0
According to equation, the competition radius varies from (1 − c) 𝑅𝑐𝑜𝑚𝑝 to 𝑅𝑐𝑜𝑚𝑝 . The
flowchart of EEUC is shown in Figure 3.5.
Define parameters
of WSN
True
Assign
parameters values
Y N
if i≥ mn+1
N If Rand<T
If E≤0 If E>0 & CH N
indicator =1
Y
Y
Set CH
dead+1 Y
indicator (G=1)
Plot '.'
Y If node has Nbrs N
N If E>0 &&
If E>0
G==1
Y Y If E of node > N Assign node as CH and
E of Nbrs plot it
Plot WSN
for alive Nrbrs Assign node as CH Reset CH indicator for
&& G==1 and plot it node
Calculate dmax
and dmin Reset CH indicator
Calculate dis. between for Nbrs
node and its Nbrs
3.7 Summary
In This chapter, we gave attention to study several scenarios in order to implement
recent state of the art algorithms. The first order radio model was considered while deducting
the consumed energy. Finally, methodologies of the surveyed algorithms were presented, then
the design and methodology of our proposed algorithm will be introduced in the next chapter.
23
Chapter 4
The Proposed Hybrid Fuzzy Multi-Hop Unequal
Clustering (HFMUC)
In our proposed hybrid fuzzy multi-hop unequal clustering (HFMUC), the probability
of node to be a CH based on a local decision is a distributed algorithm, or in other words,
there is no need for a central decision node (generally the sink) for the election process. In this
chapter, the importance and need of the fuzzy system in WSNs are introduced, the proposed
fuzzy system is described, and the operation flow of our proposed algorithm is presented.
24
Figure 4.1: HFMUC fuzzy system
The first input is the distance to the BS (DBS). The fuzzy set defining this input
variable is depicted in Figure 4.2. The linguistic variables for this fuzzy set are; close,
medium and far. While the range of DBS is between 50 and 158, which is the minimum and
maximum distance between any node and the BS according to our scenario, with trapezoidal
MFs. On the other hand, medium distance is represented by a triangular MF.
The second fuzzy input variable is the DC, which is estimated by Eq. 4.1.
𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑎𝑙𝑖𝑣𝑒 𝑛𝑜𝑑𝑒𝑠 𝑖𝑛 𝑡ℎ𝑒 𝑟𝑎𝑑𝑖𝑜 𝑟𝑎𝑛𝑔𝑒 𝑜𝑓 𝑡ℎ𝑒 𝑛𝑜𝑑𝑒
𝐷𝐶 = (Eq. 4.1)
𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑎𝑙𝑙 𝐴𝑙𝑖𝑣𝑒 𝑛𝑜𝑑𝑒𝑠 𝑖𝑛 𝑡ℎ𝑒 𝑁𝑒𝑡𝑤𝑜𝑟𝑘
Usually a node knows the number of alive nodes in its radio range. However, for calculating
the node density parameter, a node should know the number of all alive nodes in the network
for the current round. Since the number of all alive nodes may change at the start of each
round and it is not possible for the node to know that value, so the BS should broadcast this
value at the start of every round. The fuzzy set that describes the density input variable is
illustrated in Figure 4.3 where Low and high are the linguistic variables of this fuzzy set. Both
linguistic variables are assumed as a trapezoidal MF. Where the range of the density
parameter is between zero and one. If the node does not have any neighbor; its density has to
be zero but in case of the node has all alive nodes in its range, its density has to be one. We
tried several MFs shape till we concluded the proposed shapes.
25
Figure 4.3: Membership function of DC
The third fuzzy input variable is the deviation of the node’s residual energy from the
average network energy (DRE). To estimate the value of DRE, first BS calculates the average
energy of the entire network per round (avg) by Eq. 4.2.
∑𝑁 𝐸
𝑎𝑣𝑔 = 𝑖=0 𝑖 (Eq. 4.2)
N
, where Ei is the residual energy of each node and N is the total number of nodes while any
dead node is considered to have zero energy, so the average value is consistent and predefined
by the BS to broadcast it at each round. Each node calculates its DRE parameter by Eq. 4.3.
𝐷𝑅𝐸 = 𝐸𝑖 – 𝑎𝑣𝑔 (Eq. 4.3)
, where Ei is the residual energy of the node and avg is the average energy of the entire
network. The result could be zero, positive, or negative. The fuzzy set that describes this input
variable is illustrated in Figure 4.4. Smaller, equal and larger are the linguistic variables of
this fuzzy set. The smaller means that the residual energy of the node is smaller than the
average energy of the entire network. While larger means that the residual energy of the node
is larger than the average energy of the whole network. Both linguistic variables have
trapezoidal MFs and 10% at the beginning and the end of the scale represents absolute smaller
or larger, while equal has a triangular MF.
Since the range of DRE is between (-1 and 1) which satisfies a normalized range, it
adapts with all modes that have random energy and random location. This makes our protocol
valid for many different scenarios as well as scalability.
26
The two fuzzy output variables are the probability of node to be a tentative CH
(CHprob) and the competition range for tentative CHs (Rcomp). The first fuzzy set output
variable refers to the CHprob, which is illustrated in Figure 4.5.
There are three linguistic variables which are: Small Probability (S.Prob), Medium
Probability (M.Prob), and High Probability (H.Prob). M.Prob has a triangular MF, while
S.Prob and H.Prob are represented by trapezoidal MFs.
The second fuzzy set output variable refers to the Rcomp, that has 18 linguistic variables
(based on MOFCA algorithm) which are 8XS (extra-small), 7XS, 6XS, 5XS, 4XS, 3XS,
2XS,XS, small, large, XL, 2XL, 3XL, 4XL, 5XL, 6XL, 7XL, 8XL (extra-large). The 8XS and
8XL are represented by trapezoidal MFs and the remaining linguistic variables have triangular
MFs. The range of Rcomp is between [0 to 40], where the value 40 is the maximum
competition radius in which the node can compete within. The function in Figure 4.6 is
asymmetric-triangular functions as shown in the previous figures because these functions
provide better results when employed in the simulation of our scenario.
27
The fuzzy rules are given in Table 4.1, in order to evaluate the rules, the Mamdani
Controller is used as a fuzzy inference technique and the Center of Area (COA) method is
employed for defuzzification of both CHprob and Rcomp based on the three fuzzy input
variables (descriptors) used.
Table 4.1: HFMUC fuzzy rules.
DBS DC DRE CHprob Rcomp
Close Low Smaller S.Prob 8XS
Close Low Equal M.Prob 7XS
Close Low Larger H.Prob 6XS
Close High Smaller S.Prob 5XS
Close High Equal M.Prob 4XS
Close High Larger H.Prob 3XS
Medium Low Smaller S.Prob 2XS
Medium Low Equal M.Prob XS
Medium Low Larger H.Prob S
Medium High Smaller S.Prob L
Medium High Equal M.Prob XL
Medium High Larger H.Prob 2XL
Far Low Smaller S.Prob 3XL
Far Low Equal M.Prob 4XL
Far Low Larger H.Prob 5XL
Far High Smaller S.Prob 6XL
Far High Equal M.Prob 7XL
Far High Larger H.Prob 8XL
The proposed variables and fuzzy sets presented in this research are reached after
several experiments. Several systems are assumed and results are compared.
28
Implement Fuzzy Sys.
To get CHprob, Rcomp
N
CHprob ≥ 0.49
Be tentative CH
Broadcast CHprob
Receives Broadcasts
from other tentative
5. The pseudo-code of the proposed algorithm is shown in Figure 4.8. The proposed fuzzy
system generates CHprob and Rcomp and satisfies line 1 in the pseudo code if (𝐶𝐻𝑝𝑟𝑜𝑏 ≥
0.49) then the nodes will be elected as a tentative CH, where electing nodes with
probability larger than 51% increases the number of tentative nodes and enhances the
selection criteria.
29
Si, Sj: A random nodes
DBS: Distance to the Base Station
DC: Density of the Cluster
DRE: Deviation of the node’s Residual Energy from the average network energy.
𝐶𝐻𝑝𝑟𝑜𝑏 : The probability of the node to be CH.
𝑅𝑐𝑜𝑚𝑝 : The competition radius for tentative CHs.
𝑆𝑖 . 𝑆𝐶𝐻 : The competitor-tentative CHs list
By using three input fuzzy system F (DBS, DC, DRE) to generate 𝐶𝐻𝑝𝑟𝑜𝑏 and 𝑅𝑐𝑜𝑚𝑝
1. IF (𝐶𝐻𝑝𝑟𝑜𝑏 ≥ 0.49) THEN
2. Be_tentative_head TRUE
3. ELSE EXIT
4. ENDIF
5. IF (Be_tentative_head = TRUE ) THEN
6. Broadcast_tentative _head_msg (ID, 𝐶𝐻𝑝𝑟𝑜𝑏 )
7. ENDIF
8. On receiving a tentative _head_msg from node 𝑆𝑗
9. IF distance ൫𝑆𝑖 𝑆𝑗 ൯ ≤ 0.75 (𝑆𝑖 . 𝑅𝑐𝑜𝑚𝑝 + 𝑆𝑗 . 𝑅𝑐𝑜𝑚𝑝 ) THEN
10. Add 𝑆𝑗 𝑡𝑜 𝑆𝑖 . 𝑆𝐶𝐻
11. ENDIF
12. WHILE (Be_tentative_head = TRUE) do
13. IF 𝑆𝑖 . 𝐶𝐻𝑝𝑟𝑜𝑏 ≥ 𝑆𝑗 . 𝐶𝐻𝑝𝑟𝑜𝑏 ⍱𝑆𝑗 ∊ 𝑆𝑖 . 𝑆𝐶𝐻 THEN
14. Broadcast_final _head_msg (ID) and then EXIT
15. ENDIF
16. On receiving a final _head_msg from node 𝑆𝑗
17. IF 𝑆𝑗 ∊ 𝑆𝑖 . 𝑆𝐶𝐻 THEN
18. Quit_election_msg (ID) and then EXIT
19. ENDIF
20. On receiving a Quit_election_msg from node 𝑆𝑗
21. IF 𝑆𝑗 ∊ 𝑆𝑖 . 𝑆𝐶𝐻 THEN
22. Remove 𝑆𝑗 from 𝑆𝑖 . 𝑆𝐶𝐻
23. ENDIF
24. ENDWHILE
Figure 4.8: HFMUC pseudo-code.
6. Now each node has to update its neighborhood table to store the information about its
neighbors as shown in Table 4.2.
Table 4.2: Neighborhood table
ID=9 State Distance (m) CHprob=0.6 Rcomp=30 Density DBS DRE
3 Tentative 14 0.64 20
5/Nalive
7 Tentative 9 0.7 32
for
6 Tentative 25 0.49 18 56 0.4
current
12 normal 39 0.25 40
round
18 normal 30 0.4 28
The ID indicates the unique identification of the neighbor nodes. State refers to the
neighbor nodes if they are tentative CHs or normal nodes. Distance represents the distance
to neighbors. CHprob refers to the probability of the node and its neighbors’ probabilities.
Rcomp represents the competition radius of the node and its neighbors’-competition radii.
This table also contains the values of DC, DBS, and DRE for the node.
30
7. Line 9 in the pseudo code satisfies the competition tentative CHs condition. Where
candidate CHs are considered as a competitor-tentative CHs only if the distance between
them is less than 75% of the summation of their radii to improve the coverage for the
whole network with achieving the minimum overlapping area. In addition, this condition
guarantees the optimum selection of the final CHs, which is illustrated in Figure 4.9,
where n1, n2, n3, and n4 are all tentative CHs, but n1 and n4 are only the competitor-
tentative CHs. It is clear that other nodes do not satisfy the condition and they can be
selected as final CHs.
n2
Rcomp =20 m
Rcomp =30 m
n4 n3
30 m 40 m
n1
8. The while loop in line 12 of the pseudo code determines the final CH ,when each tentative
CH sends an announcement message -CH message (Node ID, CHprob, Rcomp)- within its
radio range r. The competitor-tentative CH announces itself as a final CH if it has the
largest CHprob in all the competitor-tentative-CH list, or quit the election and considers
itself “covered” if a final CH announcement is sent. Otherwise, it updates its status and
the competitor-tentative-CH list until being a final CH or a normal node. Table 4.3
describes states of nodes and corresponding control messages.
Table 4.3: The states of nodes and control messages
31
n1 n2 n3
Determined
final CHs
Dis. between
Y N
CH & BS < do
Deduct transmitting
For all
energy to BS α d^2
clusters
&PACKET TO BS+1
Deduct transmitting
Calculation of PACKET TO
energy to BS according
normal nodes CH+1
to Dis.
32
4.4 One Round of The Proposed HFMUC
Figure 4.12 illustrates the modeling of our algorithm for one round operation:
CH4
CH3
n3
CH5
CH1 CH2
n2
n1
BS
n1 and n2 find that the distance to BS is smaller than any other CH, so they transmit
their data directly to BS to reduce the energy consumption.
n3 is a member of CH1 based on the largest RSSI.
According to the multi-hop concept, WSN is divided into multi-tier, so CH4 transmits
its data to CH3 that has to aggregate its data with the received data from CH4, then
sends them to CH2 that is responsible for aggregating all data then sends them to BS.
Where the multi-hop communication concept is applied when the distance to BS is
larger than the threshold distance (do), which is determined according to the first radio
model.
CH2 is the closest to the BS and its cluster size is smaller than the CH1, CH3, and
CH4 cluster sizes because of its huge responsibility of inter-cluster and intra-cluster,
which represents the hotspot problem and the role of unequal clustering concept to
overcome it.
It is clear that the cluster shape is not a sharp circle and CH is not in the center
according to members of CH when they join their CH.
33
Chapter 5
Results and Discussions
150
Throughput (Packets)
100
50
0
1000 1200 1400 1600 1800 2000
Round number
Figure 5.1: Network throughput
34
These failures could be due to one of the following:
1. LEACH prevents the node to be a CH twice in the same epoch. All nodes are
assigned as CHs in the previous iterations.
2. CH probability condition, where probability of the node to be a CH should be larger
than the predefined probability of the current round.
Two proposed solutions are introduced in the next work to treat and mitigate the network
failures:
The preset value of CH probability (P) should not be constant for all the rounds, but it
should to be a function of the alive nodes as presented in Eq. 5.2
Pnew= P * ntotal / nalive (Eq. 5.2)
where Pnew is the proposed probability, ntotal is the number of initial nodes, nalive is the
number of rest alive nodes for current round.
The criteria of CH selection should be varied and the dependency on probability has to be
eliminated.
Y Transition
state
N
Mod-LEACH
N
LEACH-SC
End
. . . .
190 10 1997 condition
191 10 1998 condition
Secondly, no network failure happens when applying Mod-LEACH when reaching
nalive= N/2=50. Finally only one failure occurs when applying Mod-LEACH at the first fail of
LEACH (i.e. at 48 alive nodes), as presented in Table 5.2.
Table 5.2: Scenario (1) network failure of Mod-LEACH at first fail
first fail of LEACH
# of fails Alive nodes # of R Reason of fail
LEACH 1 29 1384 condition
Secondly, one network failure happens when applying Mod-LEACH when reaching
nalive= N/2=50 nodes, as presented in Table 5.4.
Table 5.4: Scenario (2) network failure of Mod-LEACH at nalive= N/2
nalive = n/2
# of fails Alive nodes # of R Reason of fail
Mod-LEACH 1 24 1125 epoch
36
Finally, two failures happen when applying Mod-LEACH at the first fail of LEACH
(i.e. at 32 alive nodes), as presented in Table 5.5.
Table 5.5: Scenario (2) network failure of Mod-LEACH at first fail
We can conclude that applying Mod-LEACH at nalive= N/2 (50 dead nodes) saved the
network from failure and the first fail happens after the HDN. In other words, applying Mod-
LEACH at first fail means that the BS broadcast cost is postponed.
5.2.2.3 Optimum transition state
The decision of the transition state is taken based on eliminating the number of
failures with considering the energy consumption for each state. Figure 5.3 illustrated the
difference between the remaining energy of the network for LEACH, Mod-LEACH at first
fail, and Mod-LEACH at HDN. The value is estimated by simulation tool (fitting curve at 10th
order regression), as shown in Appendix A.
From the obtained results, LEACH has the large remaining energy but it is not
preferred due to the network failures. The network failures are reduced by applying the Mod-
LEACH and sometimes no failure happens. On the other hand, Mod-LEACH causes extra
energy consumption, when nodes receive the broadcasted packets. It is clear that the transition
state decision is critical, because it affects the energy dissipation.
0.08
0.07 LEACH
nalive=n/2
Average energy (Joule)
0.06
First fail
0.05
0.04
0.03
0.02
0.01
0
1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000
Round number
Figure 5.3: Average remaining energy of the network
From the LEACH failure study point of view, it appears that transition at first fail is less
consuming energy than transition at the HDN.
37
5.3 Simulating HEED
5.3.1 Determining HEED Cluster Radius
When repeating the simulation with different Cluster Radius (CR) from 15m to 75m
by adding 5m each time, the CR of 50m achieves the longest stability, as shown in Figure 5.4.
1400
FIRST -DEAD
HALF-DEAD
1200
1000 X: 50
Y: 864
Round Number
800
600
400
200
0
0 10 20 30 40 50 60 70 80
CR (m)
Figure 5.4: Determine the optimum CR
From Table 5.6, we can notice that at 50m the FDN occurs after 864 rounds, which
gives the network more stability and lifetime. Regarding the HDN value, the best result
occurs at CR equals 55. It could be seen also that as the CR increases, the FDN rounds
increases until reaching CR= 50m, then it returns into decrease.
Table 5.6: Determine the optimum CR
CR 15 20 25 30 35 40 45 50 55 60 65 70 75
FDN 349 376 628 618 753 776 825 864 819 823 797 841 789
HDN 1182 1243 1271 1291 1298 1303 1298 1298 1302 1289 1275 1265 1247
From our point of view, we select CR= 50m as an optimum value for cluster radius,
where it is much more important for network to remain alive for a long time.
38
0.8
0.6
0.5
0.4
0.3
0.2
0.1
0
100 150 200 250 300 350 400
Distance to BS (m)
Table 5.7 shows that when the distance from the BS increases, the residual energy of
the nodes increases. More precisely, after 1500 rounds, the nearest five nodes to the BS are
dead, where the farthest four nodes have the largest remaining energy.
Table 5.7: Remaining energy of the nearest and the farthest nodes to the BS
Distance to BS (m) 132 133 140 144 157 373 374 375 376
This phenomenon could be interpreted that closer CHs to the BS should afford intra
and inter-communications; consequently, they dissipate more energy than the farther ones.
This problem is typically known as the hotspot problem. This clarifies the necessity of
forming the nearest clusters to the BS in reduced node density. This is the main concept of the
unequal algorithms.
39
Figure 5.6 shows the simulation results of the number of alive nodes per round for the
proposed method HFMUC with other simulated algorithms LEACH, SEP, HEED, HEED,
MHEED, EEUC, and MOFCA.
200
HFMUC
MHEED
MOFCA
LEACH HEED
Number of alive nodes
EEUC
150
SEP
100
50
0 500 1000 1500
Round number
Figure 5.6: Number of alive nodes per round for six simulated methods compared to
HFMUC.
From the previous figures, it is clear that HFMUC has the longest stability period, and
then MOFCA followed it, where LEACH has the shortest stability period. From the
simulation, we got the round number of first, second, and third dead node for each algorithm
as presented in Table 5.8.
Table 5.8: Stability period comparison between simulated algorithms.
40
Figure 5.7: Stability period of six simulated methods compared to HFMUC.
Table 5.9 indicates percentage of the gain in stability period of HFMUC over the six
introduced algorithms, which is calculated by Eq. 5.3
𝐹𝐷𝑁𝐻𝐹𝑀𝑈𝐶 −𝐹𝐷𝑁𝐴𝑙𝑔𝑜𝑟𝑖ℎ𝑚
Percentage of gain in stability period of HFMUC = ( ) ∗ 100 (Eq. 5.3)
𝐹𝐷𝑁𝐴𝑙𝑔𝑜𝑟𝑖ℎ𝑚
Table 5.9: Percentage of gain in stability period when using HFMUC vs other techniques.
From this table, it is clear, that HMFUC exceeds all the compared algorithms in
different percentages, which clarifies that the new proposed algorithm has given an advantage
than LEACH, SEP, HEED, MHEED, EEUC, and MOFCA through its stability period.
41
0.7
Average of entire remaining energy (Joule) SEP
0.6
LEACH
HEED
0.5 MHEED
EEUC
0.4 MOFCA
HFMUC
0.3
0.2
0.1
0
0 200 400 600 800 1000 1200 1400
Round number
Figure 5.8: Average of the entire remaining energy until FDN per round
Figure 5.9 refers to the first new proposed metric (ELFDN), which indicates to
average of the entire remaining energy at the FDN for each protocol. We found that ELFDN
of HFMUC has the lowest value; it means the majority of entire energy is distributed before
the first sensor dies. In other words, HFMUC optimizes the energy distribution within the
stability period.
The slopes of the curves -obtained from Figure 5.8- are represented in Table 5.10, where the
second new proposed metric, the rate of energy consumption per round (REC) within the
interval of the stability period. We found that HFMUC had the least REC, which refers to
balanced energy distribution and conserved node energy. REC is calculated by Eq. 5.4.
Δ 𝐴𝑣𝑒𝑟𝑎𝑔𝑒 𝑜𝑓 𝑡ℎ𝑒 𝑒𝑛𝑡𝑖𝑟𝑒 𝑟𝑒𝑚𝑎𝑖𝑛𝑖𝑛𝑔 𝑒𝑛𝑒𝑟𝑔𝑦
𝑅𝐸𝐶 = |Slope of the curve| = | | (Eq. 5.4)
Δ 𝑅𝑜𝑢𝑛𝑑𝑠
𝐼𝑛𝑖𝑡𝑎𝑙 𝑎𝑣𝑒𝑟𝑎𝑔𝑒 𝑜𝑓 𝑡ℎ𝑒 𝑟𝑒𝑚𝑎𝑖𝑛𝑖𝑛𝑔 𝐸𝑛𝑒𝑟𝑔𝑦 − 𝐸𝐿𝐹𝐷𝑁
=
𝐹𝑁𝐷
42
Table 5.10: Comparing energy consumption and distribution within stability
period.
REC Percentage of
ELFDN uniform
Algorithm FND (µJoule /
(Joule) energy
round) sustainability
LEACH 515 0.248 683 59%
SEP 578 0.209 676 65%
HEED 732 0.249 478 59%
MHEED 864 0.199 464 67%
EEUC 951 0.155 468 74%
MOFCA 1024 0.123 465 80%
HFMUC 1201 0.061 449 90%
Then percentage of the uniform energy sustainability is calculated according to Eq. 5.5
by deducting percentage of the average remaining energy after the first sensor dies (ELFDN)
from percentage of the initial average of the entire energy.
Initial average of enire energy− ELFDN
Percentage of uniform energy sustainability = ∗ 100 (Eq. 5.5)
Initial average of entire energy
43
From Table 5.11, the energy consumption of the overhead communication in HFMUC
equals 5.9 (mJ/round), represents a moderate overhead where compared to MOFCA, EEUC,
HEED, and MHEED, and also sufficiently less than LEACH, and SEP. The data transmission
is better when compared to other algorithms due to the long stability period of HFMUC. The
consumed energy until the first sensor die is considered the reference to determine the
percentage of both data and overhead transmission for all nodes per round.
Table 5.11: Percentage of overhead energy consumption for entire network.
Algorithm LEACH SEP HEED MHEED EEUC MOFCA HFMUC
Data energy
57.06 63.45 67.99 77.6 83.68 90.93 100.77
consumption (Joule)
Rate of data
110.8 109.8 92.9 89.8 87.9 88.7 83.9
(mJ/Round)
Overhead energy
13.33 14.74 2.2 2.6 5.32 4.46 7.03
consumption (Joule)
Rate of overhead
25.9 25.5 3 3 5.6 4.4 5.9
(mJ/Round)
5.5 Discussions
The simulation started with LEACH and Mod-LEACH, the former showed network
failure and the latter did not satisfy our thesis objectives in conserving the energy and prolong
the network lifetime. It became necessary to settle an innovative technique that reduced
probability of CH selection. While the surveyed algorithms were simulated, some challenges
appeared such as determining the CR of HEED and the effect of hotspot problem. Finally, we
decided to enhance the fuzzy system of MOFCA generating both CHs and their radii from the
same fuzzy engine.
From simulation, it is clear that the proposed HFMUC surpasses studied benchmarks
methods. Regarding stability period, HFMUC surpasses MOFCA by 17% and others by
higher percentages, as shown in Table 5.9. Furthermore, Table 5.10 shows that the HFMUC
reached a 90% uniform energy sustainability, where the best-simulated algorithm (MOFCA)
reached an 80% value.
Coming to energy consumption, two observation could be seen from Table 5.11. The
data energy consumed by all simulated methods although being higher in HFMUC, it is due to
the long stability of this algorithm until the first node dies. Thus, it is important to calculate
the rate of energy consumed per round. Obviously, HFMUC has the best value. However, the
proposed HFMUC adds more overhead where compared to MOFCA, EEUC, HEED, and
MHEED.
44
Chapter 6
Conclusions and Future Work
This work introduced an HFMUC technique that incorporates a fuzzy-rule-based
paradigm engine in its decision process, and organizes sensor nodes into unequal clusters
communicating in multi-hop manner. Furthermore, to solve the hotspot problem, unequal
clustering mechanisms attempt to form more clusters with smaller sizes near the BS. As
mentioned earlier, in multi-hop sensor networks, this helps CHs to save some energy for
relaying the received data from farther clusters. Accordingly, unequal protocols should
speculate an approach to uniform energy distribution across the network.
It is possible to conclude that the proposed algorithm optimizes the formation of
unequal clusters and enhance the criteria of CHs selection so that the energy among the sensor
nodes becomes evenly distributed.
We build our simulation based on MATLAB thus provides a fast and easy way to
prototype applications, and gives clear visualization capabilities. The findings of the
simulation are quite convincing; and thus, the two new metrics are defined as: rate of energy
consumption and energy level of first dead node. Six state-of-the-art algorithms were
simulated to evaluate our proposed HFMUC. From this simulation, it was found that HFMUC
gave 17% to 133% better stability period compared to MOFCA and LEACH respectively.
Furthermore, the uniform energy sustainability was 90% compared to 80% for MOFCA, and
to 59% for LEACH. Our objectives in improving network lifetime, energy distribution, and
energy consumption were achieved. Furthermore, energy consumption of the overhead
transmission in HFMUC reached 6% versus 84% for data transmission.
It has been demonstrated that the definition of stability period should be redefined as
the time interval from the start of network operation to the death of acceptable ratio of the
total sensors, instead of the death of the first sensor and this ratio could better be determined
according to the application.
From obtained results on the peer-to-peer algorithms, the performance of our proposed
is reasonably better than the existing algorithms in all experiments simulated. Based on the
results, it can be concluded that the research into unequal clustering using fuzzy system has
achieved successful offline, real time applications, and emergent event monitor.
Future Work
Working on how to reduce overhead messages is a big challenge.
HFMUC will be simulated using NS2 for validating our results.
Real WSN experiment could give hand and solid conclusions.
Fuzzy rules membership functions study could help reach better results. Non-uniform
MFs distribution could help reaching better results. Here, optimization problems are to be
introduced.
45
References
(1) Afsar M. M. and Tayarani-N M.-H., 2014, "Clustering in sensor networks: A literature
survey", Journal of Network and Computer Applications, vol. 46, pp. 198-226.
(2) Akyildiz I. F., Su W., Sankarasubramaniam Y., and Cayirci E., 2002, "A survey on
sensor networks", Communications magazine, IEEE, vol. 40, pp. 102-114.
(3) Yick J., Mukherjee B., and Ghosal D., 2008, "Wireless sensor network survey",
Computer networks, vol. 52, pp. 2292-2330.
(4) Boyinbode O., Le H., and Takizawa M., 2011, "A survey on clustering algorithms for
wireless sensor networks", International Journal of Space-Based and Situated
Computing, vol. 1, pp. 130-136.
(5) Soua R. and Minet P., 2011, "A survey on energy efficient techniques in wireless
sensor networks", in Wireless and Mobile Networking Conference (WMNC), 2011 4th
Joint IFIP, pp. 1-9.
(6) Pottie G. J. and Kaiser W. J., 2000, "Wireless integrated network sensors",
Communications of the ACM, vol. 43, pp. 51-58.
(7) Anastasi G., Conti M., Di Francesco M., and Passarella A., 2009, "Energy
conservation in wireless sensor networks: A survey", Ad hoc networks, vol. 7, pp.
537-568.
(8) Dargie W. W. and Poellabauer C., 2010, Fundamentals of wireless sensor networks:
theory and practice: John Wiley & Sons.
(9) Younis M., Senturk I. F., Akkaya K., Lee S., and Senel F., 2014, "Topology
management techniques for tolerating node failures in wireless sensor networks: A
survey", Computer Networks, vol. 58, pp. 254-283.
(10) Rajkumar, A V. B., Jadhav K., and S V., Sept-Oct 2012, "Wireless Sensor Networks
Issues and Applications", IJCTA, vol. 3 (5), pp. 1667-1673.
(11) Shen C.-C., Srisathapornphat C., and Jaikaeo C., 2001, "Sensor information
networking architecture and applications", Personal communications, IEEE, vol. 8, pp.
52-59.
(12) de Freitas E. P., Bösch B., Allgayer R. S., Steinfeld L., Wagner F. R., Carro L., et al.,
2011, "Mobile agents model and performance analysis of a wireless sensor network
target tracking application", in Smart Spaces and Next Generation Wired/Wireless
Networking, ed: Springer, pp. 274-286.
(13) Shi E. and Perrig A., 2004, "Designing secure sensor networks", Wireless
Communications, IEEE, vol. 11, pp. 38-43.
(14) Nandhini.S., Mehzabeen S. M. M., and Swantana K. L., Jan-2014, "Object Tracking
Using Wireless Sensor Network", International Journal on Recent and Innovation
Trends in Computing and Communication (IJRITCC), vol. 2, pp. 11-16.
(15) Werner-Allen G., Lorincz K., Ruiz M., Marcillo O., Johnson J., Lees J., et al., 2006,
"Deploying a wireless sensor network on an active volcano", Internet Computing,
IEEE, vol. 10, pp. 18-25.
(16) Corke P., Wark T., Jurdak R., Hu W., Valencia P., and Moore D., 2010,
"Environmental wireless sensor networks", Proceedings of the IEEE, vol. 98, pp.
1903-1917.
(17) Mainwaring A., Culler D., Polastre J., Szewczyk R., and Anderson J., 2002, "Wireless
sensor networks for habitat monitoring", in Proceedings of the 1st ACM international
workshop on Wireless sensor networks and applications, pp. 88-97.
(18) Heinzelman W. B., Murphy A. L., Carvalho H. S., and Perillo M. A., 2004,
"Middleware to support sensor network applications", Network, IEEE, vol. 18, pp. 6-
14.
46
(19) Darwish A. and Hassanien A. E., 2011, "Wearable and implantable wireless sensor
network solutions for healthcare monitoring", Sensors, vol. 11, pp. 5561-5595.
(20) Zhao G., 2011, "Wireless sensor networks for industrial process monitoring and
control: A survey", Network Protocols and Algorithms, vol. 3, pp. 46-63.
(21) Ekshinge J. V. and Santosh S. S., 2014, "Smart Home Management Using Wireless
Sensor Network", International Journal Communication Engineering of Advanced
Research in Electronics, vol. 3, pp. 453-457.
(22) Römer K. and Mattern F., 2004, "The design space of wireless sensor networks",
Wireless Communications, IEEE, vol. 11, pp. 54-61.
(23) Qu F., Wang F.-Y., and Yang L., 2010, "Intelligent transportation spaces: vehicles,
traffic, communications, and beyond", Communications Magazine, IEEE, vol. 48, pp.
136-142.
(24) Ghayvat H., Mukhopadhyay S., Gui X., and Suryadevara N., 2015, "WSN-and IOT-
based smart homes and their extension to smart buildings", Sensors, vol. 15, pp.
10350-10379.
(25) Stanley-Marbell P., Basten T., Rousselot J., Oliver R. S., Karl H., Geilen M., et al.,
2008, "System models in wireless sensor networks", Eindhoven University of
Technology, Tech. Rep, pp. 1-29.
(26) Abbasi A. A. and Younis M., 2007, "A survey on clustering algorithms for wireless
sensor networks", Computer communications, vol. 30, pp. 2826-2841.
(27) Naeimi S., Ghafghazi H., Chow C.-O., and Ishii H., 2012, "A survey on the taxonomy
of cluster-based routing protocols for homogeneous wireless sensor networks",
Sensors, vol. 12, pp. 7350-7409.
(28) Liu X., 2012, "A survey on clustering routing protocols in wireless sensor networks",
Sensors, vol. 12, pp. 11113-11153.
(29) Nayyar A. and Gupta A., 2014, "A comprehensive review of cluster-based energy
efficient routing protocols in wireless sensor networks", IJRCCT, vol. 3, pp. 104-110.
(30) Bhadoria R. S., Tomar G. S., and Kang S., 2014, "Proficient Energy Consumption
Aware Model in Wireless Sensor Network", International Journal of Multimedia and
Ubiquitous Engineering, vol. 9, pp. 27-36.
(31) Katiyar V., Chand N., and Soni S., 2010, "Clustering algorithms for heterogeneous
wireless sensor network: A survey", International Journal of Applied Engineering
Research, vol. 1, pp. 273-288.
(32) Heinzelman W. R., Chandrakasan A., and Balakrishnan H., 2000, "Energy-efficient
communication protocol for wireless microsensor networks", in System sciences,
2000. Proceedings of the 33rd annual Hawaii international conference on, pp. 1-10.
(33) Smaragdakis G., Matta I., and Bestavros A., 2004, "SEP: A stable election protocol for
clustered heterogeneous wireless sensor networks", in Second international workshop
on sensor and actor network protocols and applications (SANPA 2004), pp. 1-10.
(34) Younis O. and Fahmy S., 2004, "HEED: a hybrid, energy-efficient, distributed
clustering approach for ad hoc sensor networks", Mobile Computing, IEEE
Transactions on, vol. 3, pp. 366-379.
(35) Li C., Ye M., Chen G., and Wu J., 2005, "An energy-efficient unequal clustering
mechanism for wireless sensor networks", in Mobile Adhoc and Sensor Systems
Conference, IEEE International Conference, pp. 604-612.
(36) K. S. and A. U., Apr. 2014, "A study on metrics based clustering algorithms in
wireless sensor networks", International Journal of Advances in Engineering Research
(IJAER), pp. 10-22.
(37) Mirsadeghi M., Mahani A., and Shojaee M., 2014, "A novel distributed clustering
protocol using fuzzy logic", Procedia Technology, vol. 17, pp. 742-748.
47
(38) Ortiz A. M., Royo F., Olivares T., Castillo J. C., Orozco-Barbosa L., and Marron P. J.,
2013, "Fuzzy-logic based routing for dense wireless sensor networks",
Telecommunication Systems, vol. 52, pp. 2687-2697.
(39) Lu J., Wang X., Zhang L., and Zhao X., 2014, "Fuzzy random multi-objective
optimization based routing for wireless sensor networks", Soft Computing, vol. 18, pp.
981-994.
(40) Lee J.-S. and Cheng W.-L., 2012, "Fuzzy-logic-based clustering approach for wireless
sensor networks using energy predication", Sensors Journal, IEEE, vol. 12, pp. 2891-
2897.
(41) Jang J.-S. R., Sun C.-T., and Mizutani E., 1997, "Neuro-fuzzy and soft computing: a
computational approach to learning and machine intelligence", IEEE Transactions On
Automatic Control, vol. 42, pp. 1482-1484.
(42) Takagi T. and Sugeno M., 1985, "Fuzzy identification of systems and its applications
to modeling and control", Systems, Man and Cybernetics, IEEE Transactions on, pp.
116-132.
(43) Wang Y. and Chen Y., 2014, "A comparison of Mamdani and Sugeno fuzzy inference
systems for traffic flow prediction", Journal of Computers, vol. 9, pp. 12-21.
(44) Hao Z., Zhang Z., and Chao H.-C., 2015, "A Cluster-Based Fuzzy Fusion Algorithm
for Event Detection in Heterogeneous Wireless Sensor Networks", Journal of Sensors,
vol. 2015, pp. 1-12.
(45) Gajjar S., Sarkar M., and Dasgupta K., 2014, "Cluster head selection protocol using
fuzzy logic for wireless sensor networks", International Journal of Computer
Applications, vol. 97, pp. 38-44.
(46) Bagci H. and Yazici A., 2013, "An energy aware fuzzy approach to unequal clustering
in wireless sensor networks", Applied Soft Computing, vol. 13, pp. 1741-1749.
(47) Sert S. A., Bagci H., and Yazici A., 2015, "MOFCA: Multi-objective fuzzy clustering
algorithm for wireless sensor networks", Applied Soft Computing, vol. 30, pp. 151-
165.
(48) Sundani H., Li H., Devabhaktuni V., Alam M., and Bhattacharya P., 2011, "Wireless
sensor network simulators a survey and comparisons", International Journal of
Computer Networks, vol. 2, pp. 249-265.
(49) Chen G., Li C., Ye M., and Wu J., 2009, "An unequal cluster-based routing protocol in
wireless sensor networks", Wireless Networks, vol. 15, pp. 193-207.
48
Appendix MATLAB Scripts
Remaining Energy Calculation (Proposed Mod-LEACH)
The remaining energy is estimated by MATLAB simulator, based on Basic fitting tool in 10th
degree polynomial and integration within the different interval for LEACH, Mod-LEACH at
the first fail, and at the half-dead node, as shown in Eq. 1, Eq. 2, and Eq. 3 respectively.
2000
Accumulation of remaining energy for LEACH = ∫1000 (7.5481𝑒 − 34 ∗ 𝑥^10 +
(−1.2771𝑒 − 29) ∗ 𝑥^9 + 1.0064𝑒 − 25 ∗ 𝑥^8 + −4.7379𝑒 − 22 ∗ 𝑥^7 + 1.4054𝑒 −
18 ∗ 𝑥^6 + −2.563𝑒 − 15 ∗ 𝑥^5 + 2.6046𝑒 − 12 ∗ 𝑥^4 + −1.1197𝑒 − 09 ∗ 𝑥^3 +
1.5𝑒 − 07 ∗ 𝑥^2 + −0.00057176 ∗ 𝑥 + 0.54929) = 23.81 joule (Eq. 1)
2000
Accumulation of remaining energy for Mod-LEACH at the first fail = ∫1000 (2.6721e −
33 ∗ x^10 + (−4.4668e − 29) ∗ x^9 + 3.2444e − 25 ∗ x^8 + (−1.3337e − 21) ∗ x^7 +
3.3724e − 18 ∗ x^6 + (−5.2925e − 15) ∗ x^5 + 4.8576e − 12 ∗ x^4 + (−2.1688e −
09) ∗ x^3 + 3.986e − 07 ∗ x^2 + (−0.00059606) ∗ x + 0.54987) = 20.7 joule (Eq. 2)
2000
Accumulation of remaining energy for Mod-LEACH at nalive= n/2 = ∫1000 (−1.3311e −
33 ∗ x^10 + 2.1414e − 29 ∗ x^9 + (−1.413e − 25) ∗ x^8 + 4.9099e − 22 ∗ x^7 +
(−9.6028e − 19) ∗ x^6 + 1.0794e − 15 ∗ x^5 + (−8.3408e − 13) ∗ x^4 + 7.3958e −
10 ∗ x^3 + (−3.6159e − 07) ∗ x^2 + (−0.00051426) ∗ x + 0.54778)=19.98joule (Eq. 3)
Defining parameters
%%%%%%%%%%%%%% system PARAMETERS %%%%%%%%%%%%%
%Field Dimensions - x and y maximum (in meters)
x=100;
y=100;
49
Cr=50; %Cluster radius
%Values for Heterogeneity
%Percentage of advanced nodes
m=0.2;
%\alpha(number times more energy than the normal nodes)
a=1;
%Election Probability for Normal Nodes(1/6)
pnrm=( p/ (1+a*m) );
%Election Probability for Advanced Nodes(1/3)
padv= ( p*(1+a)/(1+a*m) );
%maximum number of rounds
rmax=1500;
ang=0:0.01:2*pi;
%Computation of do
do=sqrt(Efs/Emp);
%%%%%%%%%%%%% END OF PARAMETERS %%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Creating WSN
%Creation of the random Sensor Network
figure(1);
for i=1:1:n
S(i).xd=rand(1,1)*xm;
S(i).yd=rand(1,1)*ym;
S(i).G=0; %initially there are no CHs
S(i).type='N';
S(i).min_dis=0;
S(i).CHid=0;
j=i; %j is a dumy variable to test the condition
%Random Election of Normal Nodes
if (j>=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 Advanced Nodes
if (j<m*n+1)
S(i).E=Eo*(1+a);
S(i).ENERGY=1;
plot(S(i).xd,S(i).yd,'+');
hold on;
end
end
S(n+1).xd=sink.x;
S(n+1).yd=sink.y;
plot(S(n+1).xd,S(n+1).yd,'o', 'MarkerSize', 12,
'MarkerFaceColor', 'r');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
50
Appling Multi-hop concept
for j=1:1:cluster-1
if(i~=j)
distance= sqrt(((S(STATISTICS_HFMUC(r).CH(i)).xd-S(STATISTICS_
HFMUC(r).CH(j)).xd).^2)+ ((S(STATISTICS_ HFMUC(r).CH(i)).yd-
S(STATISTICS_ HFMUC(r).CH(j)).yd).^2));
temp=min(S(i).min_dis_level1,distance);
if(temp < S((STATISTICS_ HFMUC(r).CH(i))).min_dis_level1 &&
S(STATISTICS_ HFMUC(r).CH(i)).dist_BS > S(STATISTICS_
HFMUC(r).CH(j)).dist_BS )
%find the nearest CH and closer to BS
S((STATISTICS_ HFMUC(r).CH(i))).min_dis_level1=temp;
S((STATISTICS_ HFMUC(r).CH(i))).min_dis_level1_cluster_id=STATISTICS_
HFMUC(r).CH(j);
end
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Building the fuzzy system and descripting its inputs and outputs
A=newfis('NEW_PRO');
A=addvar(A,'input','DBS',[50 158]);
A=addmf(A,'input',1,'close','trapmf',[50 50 60.8 104]);
%(10% of 108 try and error)
A=addmf(A,'input',1,'medium','trimf',[60.8 104 147.2]);
A=addmf(A,'input',1,'far','trapmf',[104 147.2 158 158]);
A=addvar(A,'output','CHpro',[0 1]);
A=addmf(A,'output',1,'sp','trapmf',[0 0 0.1 0.5]);
A=addmf(A,'output',1,'mp','trimf',[0.1 0.5 0.9]);
A=addmf(A,'output',1,'hp','trapmf',[0.5 0.9 1 1]);
51
A=addmf(A,'output',2,'xs','trimf',[14.7 16.8 18.9]);
A=addmf(A,'output',2,'s','trimf',[16.8 18.9 21]);
A=addmf(A,'output',2,'l','trimf',[18.9 21 23.1]);
A=addmf(A,'output',2,'xl','trimf',[21 23.1 25.2]);
A=addmf(A,'output',2,'2xl','trimf',[23.1 25.2 27.3]);
A=addmf(A,'output',2,'3xl','trimf',[25.2 27.3 29.4]);
A=addmf(A,'output',2,'4xl','trimf',[27.3 29.4 31.5]);
A=addmf(A,'output',2,'5xl','trimf',[29.4 31.5 33.6]);
A=addmf(A,'output',2,'6xl','trimf',[31.5 33.6 35.7]);
A=addmf(A,'output',2,'7xl','trimf',[33.6 35.7 37.8]);
A=addmf(A,'output',2,'8xl','trapmf',[35.7 37.8 40 40]);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
52