0% found this document useful (0 votes)
116 views72 pages

AClustering Algorithm Enhancementin Wireless Sensor Networks Using Fuzzy Logic

This thesis aims to enhance clustering algorithms in wireless sensor networks. The key challenges are finding an effective clustering technique to form optimal clusters and addressing the "hotspot" problem where sensors near the base station consume high energy due to continuous data transmission. The thesis proposes using an unequal clustering approach that forms clusters with fewer sensors when the distance to the base station is close, to reduce intra-cluster energy consumption. However, finding the ideal cluster size remains a challenge. Fuzzy logic is introduced to help determine optimal cluster sizes.

Uploaded by

fahim6285
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views72 pages

AClustering Algorithm Enhancementin Wireless Sensor Networks Using Fuzzy Logic

This thesis aims to enhance clustering algorithms in wireless sensor networks. The key challenges are finding an effective clustering technique to form optimal clusters and addressing the "hotspot" problem where sensors near the base station consume high energy due to continuous data transmission. The thesis proposes using an unequal clustering approach that forms clusters with fewer sensors when the distance to the base station is close, to reduce intra-cluster energy consumption. However, finding the ideal cluster size remains a challenge. Fuzzy logic is introduced to help determine optimal cluster sizes.

Uploaded by

fahim6285
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 72

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/320271752

A Clustering Algorithm Enhancement in Wireless Sensor Networks Using


Fuzzy Logic

Thesis · September 2017


DOI: 10.13140/RG.2.2.23448.49921

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:

MSc Research View project

Network Fundamentals Labs View project

All content following this page was uploaded by Ahmed Elnaggar on 08 October 2017.

The user has requested enhancement of the downloaded file.


Alexandria University
Institute of Graduate Studies and Researches
Department of Information Technology

A Clustering Algorithm Enhancement in


Wireless Sensor Networks Using Fuzzy Logic

A Thesis Submitted to Department of Information Technology


Institute of Graduate Studies and Researches - Alexandria University
In partial fulfillment of the requirements for the degree of

Master of Science

in
Information Technology

by

Ahmed Atef Mohamed Elnaggar


B.Sc. in Engineering, 2004
Diploma in Electronics, 2008
Faculty of Engineering
Alexandria University

2017
Alexandria University
Institute of Graduate Studies and Researches
Department of Information Technology

A Clustering Algorithm Enhancement in


Wireless Sensor Networks Using Fuzzy Logic

Presented by

Ahmed Atef Mohamed Elnaggar

For the Degree of


Master of Science
in
Information Technology
------------------------------------------

Examiners' Committee: Approved

Prof. Walaa Mohamed Hassan Sheta ---------------


Prof. Amani Anwar Ahmed Saad ---------------
Prof. Shawkat Kmal Guirguis ---------------

Date / /
Advisors Committee Approved

Prof. Shawkat K. Guirguis ----------------


Professor of Computer Science & Informatics,
Department of Information Technology,
Institute of Graduate Studies & Research (IGSR),
Alexandria University

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)
Declaration

I declare that no part of the work referred to in this thesis had been

submitted in support of an application for another degree or qualification of this

or any other University or other Institution of learning.

Name: Ahmed Atef Elnaggar

Signature:
Publications

Shawkat K. Guirguis, Mohamed A. Abdou, Ahmed A. Elnaggar, “A Hybrid


Fuzzy Multi-hop Unequal Clustering Algorithm for Dense Wireless Sensor
Networks”, International Journal of Computational Intelligence Systems, Vol.
10, Issue 1, PP: 951-961, June-2017.
doi:10.2991/ijcis.2017.10.1.63

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

ACO Ant Colony Optimization


AI Artificial Intelligence
AOI Area Of Interest
BS Base Station
CH Cluster Head

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

RAM Random Access Memory

RComp Competition Range for tentative CH


REC Rate of Energy Consumption
RF Radio Frequency
RL Reinforcement Learning
RSSI Received Signal Strength Indication
S.Prob Small Probability
SEP Stable Election Protocol
SNR Signal-To-Noise Ratio
SOSUS Sound Surveillance System
TDMA Time Division Multiple Access
UCS Unequal Clustering Scheme
WLAN Wireless Local Area Network
WSN Wireless Sensor Network

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

Figure 1.1: Sensor node architecture. ......................................................................................... 1


Figure 2.1: Transmission to the BS. ........................................................................................... 6
Figure 2.2: Clustering process in WSN ...................................................................................... 7
Figure 2.3: The Phases of communication for WSN ................................................................. 7
Figure 2.4: Clustering objectives in a general view. .................................................................. 8
Figure 2.5: Clustering approaches classification...................................................................... 10
Figure 2.6: Fundamental block digram of fuzzy system .......................................................... 12
Figure 3.1: Round processes .................................................................................................... 15
Figure 3.2: First order radio model .......................................................................................... 18
Figure 3.3: The flowchart of LEACH ...................................................................................... 19
Figure 3.4: The flowchart of HEED ......................................................................................... 21
Figure 3.5: The flowchart of EEUC ......................................................................................... 22
Figure 3.6: MOFCA fuzzy system ........................................................................................... 23
Figure 4.1: HFMUC fuzzy system ........................................................................................... 25
Figure 4.2: Membership function of DBS ................................................................................ 25
Figure 4.3: Membership function of DC .................................................................................. 26
Figure 4.4: Membership function of DRE ............................................................................... 26
Figure 4.5: Membership function of CHprob ............................................................................. 27
Figure 4.6: Membership function of Rcomp ............................................................................... 27
Figure 4.7: The flowchart of HFMUC ..................................................................................... 29
Figure 4.8: HFMUC pseudo-code. ........................................................................................... 30
Figure 4.9: Tentative CH list competition ................................................................................ 31
Figure 4.10: The competion among three tentative CHs ......................................................... 32
Figure 4.11: Repeated Multi-Hop communication between CHs. ........................................... 32
Figure 4.12: HFMUC algorithm model.................................................................................... 33
Figure 5.1: Network throughput ............................................................................................... 34
Figure 5.2: Mod-LEACH flow chart ........................................................................................ 35
Figure 5.3: Average remaining energy of the network ............................................................ 37
Figure 5.4: Determine the optimum CR ................................................................................... 38
Figure 5.5: Existance of hotspot ............................................................................................... 39
Figure 5.6: Number of alive nodes per round for six simulated methods compared to HFMUC.
.................................................................................................................................................. 40
Figure 5.7: Stability period of six simulated methods compared to HFMUC. ........................ 41
Figure 5.8: Average of the entire remaining energy until FDN per round............................... 42
Figure 5.9: Energy level at FDN for each algorithm................................................................ 42
Figure 5.10: Energy consumption of data transmission vs overhead. ...................................... 43

vi
List of Tables

Table 1.1: Comparison of traditional networks and WSNs. ...................................................... 2


Table 2.1: The summary of reviewed protocols ....................................................................... 14
Table 3.1: Summary of parameter definitions and their values ............................................... 17
Table 4.1: HFMUC fuzzy rules. ............................................................................................... 28
Table 4.2: Neighborhood table ................................................................................................. 30
Table 4.3: The states of nodes and control messages ............................................................... 31
Table 5.1: Scenario (1) network failures of LEACH ............................................................... 36
Table 5.2: Scenario (1) network failure of Mod-LEACH at first fail ...................................... 36
Table 5.3: Scenario (2) network failures of LEACH ............................................................... 36
Table 5.4: Scenario (2) network failure of Mod-LEACH at nalive= N/2................................... 36
Table 5.5: Scenario (2) network failure of Mod-LEACH at first fail ...................................... 37
Table 5.6: Determine the optimum CR .................................................................................... 38
Table 5.7: Remaining energy of the nearest and the farthest nodes to the BS ......................... 39
Table 5.8: Stability period comparison between simulated algorithms. .................................. 40
Table 5.9: Percentage of gain in stability period when using HFMUC vs other techniques. .. 41
Table 5.10: Comparing energy consumption and distribution within stability period............. 43
Table 5.11: Percentage of overhead energy consumption for entire network. ......................... 44

vii
Abstract

Clustering is an important research activity carried out to explore and solve


power dissipation problem in Wireless Sensor Network (WSN) where nodes are often
grouped into disjoint and mostly non-overlapping clusters. Hierarchical network's
architecture should reduce the communication energy consumption, balance traffic
load, improve scalability, and prolong network lifetime. The multi-hop clustering is
preferred to the single-hop because it reduces the nodes' transmission level and thus
consumes less energy. However, the multi-hop communication clustering faces two
main challenges: searching for effective techniques to perform clustering; and the
hotspot problem that appears when a closer cluster heads to the Base Station (BS) tend
to die earlier (heavy inter-cluster relay). Unequal clustering techniques generate
clusters in smaller sizes when approaching the BS in order to decrease the intra-cluster
relay. However, finding appropriate clusters' radii remains a challenge to achieve an
optimized balancing degree.
This thesis presents a hybrid fuzzy multi-hop unequal clustering technique
(HFMUC) that aims at optimizing wireless sensors’ lifetime considering the distance
to the BS, the cluster density, and the deviation of the node’s residual energy from the
average network entire energy. The thesis applies fuzzy unequal clustering for
heterogeneous dense WSNs to obtain both final cluster heads and related radii. Our
objectives are to: prolong the network lifetime, distribute energy fairly, and reduce the
energy consumption. To evaluate the proposed HFMUC, five related work algorithms
are simulated. Obtained results are analyzed, monitored, and compared to prove the
outstanding performance of our work.

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

Figure 1.1: Sensor node architecture.

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.

Table 1.1: Comparison of traditional networks and WSNs.

Traditional Networks Wireless Sensor Networks


General-purpose design; serving many Single-purpose design; serving one
applications. specific application.
Typical primary design concerns are Energy is the main constraint in the design
network performance and latencies; energy of all node and network components.
is not a primary concern.
Networks are designed and engineered Deployment, network structure, and
according to plans. resource use are often ad-hoc (without
planning).
Devices and networks operate in controlled Sensor networks often operate in
and mild environments. environments with harsh conditions.
Maintenance and repair are common and Physical access to sensor nodes is often
networks are typically easy to access. difficult or even impossible.

Component failure is addressed through Component failure is expected and


maintenance and repair. addressed in the design of the network.
Obtaining global network knowledge is Most decisions are made localized without
typically feasible and centralized the support of a central manager.
management is possible.

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).

1.3 Problem Definition


One of the most popular solutions in making WSNs energy-efficient, which has turned
into an interesting issue for the research community, is to cluster the networks. Clustering is a
cross - cutting technique that can be used in nearly all layers of the protocol stack, while the
primary idea behind clustering is grouping the nodes into some clusters and then some nodes-
called Cluster Heads (CHs)- are selected to be the head of each cluster. In a typical clustered
WSN, the regular nodes sense the field and send their data to the CH; then, after gathering and
aggregating the data, the CH transmits them to the BS. Clustering mechanisms with
hierarchical structures were applied to enhance the network performance while reducing the
necessary energy consumption.
Clustering the nodes in WSNs has several key limitations; Cluster formation, selection
of CHs, and their competition radii with rotating the role of CHs in an efficient manner.

1.4 Thesis Objectives


In this research, a comprehensive and state-of-the-art survey are presented on clustering
approaches in WSNs and their objectives. The clustering characteristics are introduced, the
relevant clustering algorithms are implemented, and then the merits and the drawbacks of
each algorithm are explored. Our objective aims to achieve:

 An adequate solution for unequal clustering issues based on a fuzzy system.


 Enhancement the energy consumption of communication and prolong the network
lifetime.

1.5 Thesis Organization


The rest of the thesis is organized as follows:
In Chapter 2, definitions of WSNs and clustering features are presented, relation between
Artificial Intelligence (AI) methods and WSN is surveyed, and then focus on Fuzzy Logic
(FL) advantages and the most distinguished algorithms in this area are introduced in a form of
3
general taxonomy. In addition, we differentiate between different toolkit simulators to clarify
our decision and build our proposed algorithm.

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.

2.1 History And Fundamentals of WSN


Dargie W. W. and Poellabauer C. (8) presented WSN history, where its roots emerged
during the cold war. A variety of projects- that can be seen as prototypes of modern sensor
networks- were developed in the United States. These include the Sound Surveillance System
(SOSUS); a system of acoustic sensors in the oceans was used to monitor Soviet submarine
movement, and several radar networks for air defense. Some of the sensors of SOSUS are still
used for seismic activity surveillance. The impulse to researches on sensor networks started in
the early 1980s with programs initiated by the Defense Advanced Research Projects Agency
(DARPA), an agency of the United States Department of Defense. Now a day, advances in
computing and communication that were made in the late 1990s and early 2000s led to a new
horizon in the evolution of sensor network technology. More and more researches discovered
the enormous potential of WSNs for commercial applications and standardization.
Younis M., Senturk I. F., Akkaya K., Lee S., and Senel F. (9) defined WSNs as a
composition of hundreds or thousands of sensor nodes that are randomly dispersed in harsh
environments. Each of these nodes collects data and its purpose is to route this information
back to a sink. Due to the limited access to the nodes and the difficulty to access them,
topology management and self-organization are primary requirements in WSNs, where groups
of nodes cooperate to disseminate information gathered in their vicinity to the BS.
Akyildiz I. F., Su W., Sankarasubramaniam Y., and Cayirci E. (2) clarified that the
communication architecture for sensor networks is pertaining to all layers of the protocol
stack: physical, data link, network, transport, and application layers. Previously, WSNs have
found their ways into a wide variety of applications and systems with vastly varying
requirements and characteristics (10). The sensor networks can be used in military situation
awareness (11), target tracking applications (12), battlefield surveillance (13, 14), emergency
situations like active volcano disaster (15), environmental monitoring (16), habit monitoring(17),
medical and health (18, 19), monitoring and control of industrial equipment (20), home appliances
(21)
, coordinated vehicle tracking, intelligent transportation (22, 23), and Internet of Things (IOT)
based smart homes (24).
The energy consumption model may be defined as designing and analyzing a
mathematical representation of a WSN to study the effect of changing the system parameters.
There were several attempts to model energy consumption for sensor node. Stanley-Marbell
P., Basten T., Rousselot J., Oliver R. S., Karl H., and Geilen M. (25) summarized common
energy consumption parameters that are considered by various energy models as follows:
 Communication power: energy consumption per second for transmitting or receiving one
unit of data from node to another node or to BS.
 Energy for sensing: energy consumption for sensing one bit from the field.
 Link data rate: average flow of traffic (bits per second) between nodes.
 Physical layer overhead: redundancy bits in packet at physical layer.
 Collision: occurs when two nodes transmit at the same time.
 Media Access Control (MAC) layer Overhead: the overhead at MAC layer which
depends on type of MAC protocol.
5
Saving communication power is more urgent in WSNs. Consequently, to extend the
sensor network lifetime, it is very important to manage carefully the very scarce battery power
by limiting communications. This can be done through notably efficient routing protocols that
optimize energy consumption. Communication energy consumption can be due to either
“useful” or “wasteful” operations. The useful energy consumption includes transmitting or
receiving data messages, and processing query requests. An energy efficient approach should
minimize wasteful energy consumption and utilize useful energy as sufficiently as possible.

2.2 Clustering Concept


Abbasi A. A. and Younis M. (26) proved that clustering is an effective scheme in
increasing the scalability and lifetime of WSNs. Clustering means partitioning the network
into groups called clusters; thus, giving a hierarchical structure. With clustering, nodes
transmit their information to their CHs. A CH aggregates the received information and
forwards it over to the observer, and then the periodic re-clustering can select nodes in
specific criteria to act as CHs. Figure 2.1 depicts an application where sensors periodically
transmit information to a remote observer (BS). The figure illustrates how clustering can
reduce the communication overhead for both single-hop and multi-hop networks.

Single-hop without Multi-hop without Single-hop with Multi-hop with


clustering clustering clustering clustering
Figure 2.1: Transmission to the BS.

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).

1- Setup phase 2- Steady State Phase 3- Data transmission Phase

Figure 2.3: The Phases of communication for WSN

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.

2.3 Objectives of Clustering


Katiyar V., Chand N., and Soni S. (31) mentioned the important role of clustering schemes
in WSN, while clustering has numerous objectives and purposes. The energy conservation is
the most important and common issue of all these objectives. These objectives were divided
as primary and secondary. The primary objectives indicate the objectives that are the most
vital. On the other hand, the secondary objectives are indirectly achieved by clustering the
nodes. Figure 2.4 provides an overview on some most common clustering objectives.

7
Clustering objectives

Primary Secondary

Reduced routing Increased Collision


Prolong lifetime Scalability Data fusion Fault-tolerance Load balancing
delay connectivity avoidance
Figure 2.4: Clustering objectives in a general view.

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.

2.4 Challenges of Clustering


Boyinbode O., Le H., and Takizawa M. (4) presented several key limitations in WSNs that
clustering schemes must consider, which are:
 Energy limitation: Sensor have a small size battery, so they have limited energy resource.
It is not practical to recharge or replace their batteries after exhaustion. The clustering
algorithms are more energy efficient compared to the direct routing algorithms. This can be
achieved by balancing the energy consumption in sensor nodes by optimizing the cluster
formation, periodically re-electing CHs based on their residual energy, and efficient intra-
cluster and inter-cluster communication.
 Network lifetime: The energy limitation on nodes results in a limited network lifetime.
Clustering schemes help to prolong the network lifetime of WSNs by reducing the energy
usage in the communication within and outside clusters.

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.

2.5 Clustering Taxonomy


Afsar M. M. and Tayarani-N M.-H. (1) presented a state-of-the-art and comprehensive
survey on the clustering algorithms, and performed a classification on the existing clustering
algorithms. A possible classification of clustering algorithms is to divide all approaches into
distributed or centralized methods. Since centralized design is not scalable and consequently
is not suitable for WSNs, most of existing popular approaches are distributed so this
categorization is very general. Another common way is to classify the approaches based on
the CH selection algorithm. The reviewed clustering approaches are usually classified into
two major taxonomies: equal-sized and unequal-sized clustering approaches. The main idea in
equal-sized clustering algorithms is to form the clusters with relatively equal sizes, keep the
number of clusters as small as possible, distribute them across the network, and provide
minimum overlapping among them.
However, equal-sized clustering has a major problem: the distance between the nodes
and the BS does not affect the size of clusters; consequently, the traffic load is not evenly
distributed among all the nodes. Typically, in unequal clustering, the size of clusters is
determined according to the distance to the BS. This because the closer CHs to the BS should
afford intra and inter-communications; consequently they consume a lot of energy than the
farther ones. This problem is typically known as the hotspot problem.
It is better that the closer clusters to the BS be smaller, to reduce the intra-cluster
energy consumption. This is the basic idea behind all the unequal based approaches.

9
Furthermore, clustering algorithms could be divided into: probabilistic and deterministic as
shown in Figure 2.5.

Clustering Algorithms
(Equal/Unequal sized)

Probabilistic Deterministic

Random Hybird Fuzzy-based Weighted Heuristic Compound

Figure 2.5: Clustering approaches classification.

2.5.1 Equal-Sized Clustering Algorithms


2.5.1.1 Low-Energy Adaptive Clustering Hierarchy (LEACH)
Heinzelman W. R., Chandrakasan A., and Balakrishnan H. (32) designed the first
hierarchical clustering protocol for making sensor networks energy efficient (LEACH). This
protocol selects CHs randomly based on predefined threshold value and then rotates this
process to equilibrate the energy consumption, combines TDMA style contention-free
communication with a clustering algorithm for WSNs. LEACH operates in rounds consisting
of two phases: a set-up phase and a steady-state phase. LEACH was introduced for prolong
the network lifetime and proved to be 4 to 8 more effective than direct communication or
minimum energy transfer (the shortest path multi-hop routing).
From this work, three advantages for LEACH are observed: load is shared between
nodes, CHs are kept away from unnecessary collisions, and a lot of energy dissipation is
avoided. On the other hand, LEACH has limitations such as: not providing actual load
balancing, using single-hop communication, non-uniform energy distribution, and finally
neglecting heterogeneity factor.
2.5.1.2 Stable Election Protocol (SEP)
Smaragdakis G., Matta I., and Bestavros A. (33) used LEACH in heterogeneous WSNs
and created SEP protocol. SEP considered the energy heterogeneity, which is more applicable
to real life scenario for WSN. Thus, energy heterogeneity should therefore be one of the key
factors to be considered when designing a protocol that is robust for WSN. A good protocol
design should be able to scale well between both energy heterogeneous and homogeneous
settings, meet the demands of different application scenarios and guarantee reliability.
Conventional protocol designs do not address these situations. SEP studied the impact of
heterogeneity in terms of energy of the nodes. To elect the CHs, SEP used a weighted
probability method based on remaining energy in the nodes. One major characteristic in this
approach is that it rotates the CH to adapt the election probability to suit the heterogeneous
settings. The authors exploited the capabilities of LEACH to develop an adaptive and well
distributed model to cater for extra energy introduced into the network, which is a source of
heterogeneity. Under the model development of SEP, two kinds of nodes with different
energy levels were used, constituting a two-level hierarchical WSN in a single-hop setting.
The assumption is that the nodes are not mobile and are uniformly distributed over the
sensing region. This led to prolong the stability period of the networks. In SEP an adjustable
percentage of the nodes had higher energy than the other nodes. Accordingly, a modified
probability was defined to consider the residual energy. Based on this probability, the length
of used epoch was increased. One of the main advantages of SEP is that sensor nodes did not
need any global knowledge of energy, whereas the SEP strategy still suffers from the
randomization of CHs selection and its dependency on single-hop communication, which
causes the faraway nodes from BS to die faster than the nearest nodes.
10
2.5.1.3 Hybrid Energy-Efficient Distributed clustering (HEED)
Younis O. and Fahmy S. (34) build a hybrid clustering approach (HEED) which
extends LEACH by incorporating communication range limits and intra-cluster
communication cost information. The initial probability for each node to become a tentative
CH depends on its residual energy, and final CHs are selected according to the cost. This
results in a reduction in the number of CHs in the network so the routing latency is reduced
and the network lifetime is increased. In the implementation of HEED, The inter-cluster
communication is based on a simple multi-hop strategy, which allows all CHs to send the data
directly to the BS or to send it to a CH even closer to the BS based on threshold distance
otherwise. The Main goals of HEED are extending the lifetime of the WSN by evenly
distributing energy consumption, formation of well-distributed CHs and compact clusters
HEED protocol is implemented in TinyOS which is an operating system developed for
Berkeley motes. Experiments that are employed for evaluating HEED protocol show that
clustering and data aggregation at least double the lifetime of the WSN. However, the authors
have not considered the hotspot problem when multi-hop forwarding model is adopted.
HEED is a fully distributed cluster-based routing technique that achieves load balancing,
uniform CH distribution, high-energy efficiency and scalability. On the other hand, the CHs
that were created by HEED, generate massive overhead, and estimates large iterations than
necessary.
Pure probabilistic clustering approaches are useful for CH election, but they are not
sufficient. In order to make a more accurate CH election, some additional parameters such as
node degree, residual energy, and local distance should be taken into consideration.

2.5.2 Unequal-Sized Clustering Algorithms


Li C., Ye M., Chen G., and Wu J. (35) proposed one of the major algorithms in this area
which is Energy Efficient Unequal Clustering protocol (EEUC), which was considered a
probabilistic algorithm. The objective is minimizing energy usage, while extending network
lifetime. EEUC is a distributed competitive algorithm proposed for periodical data gathering.
CHs are elected by localized competition. It partitions the nodes into unequal clusters, where
the closer clusters to the BS are smaller than the farther ones. The idea of the scheme for
using unequal cluster sizes is to allow the CH closer to the BS to preserve their energy for
inter-cluster data forwarding in case of multi-hop network. While clusters farther away have
larger sizes, hence reducing communication cost. First, some tentative CHs are elected from
the regular nodes with a specific probability. In order to save more energy, the nodes that fail
to be the tentative CHs, stay in a sleep mode until the CH election process finishes. Then
different competition ranges are used in order to achieve unequal clustering. A tentative CH is
elected as a final CH, only if it has greater residual energy than other nodes in its competition
range. EEUC removes the hotspot problem and prolong the network lifetime. However,
EEUC has some drawbacks: firstly, EEUC algorithm is a probabilistic clustering algorithm,
which is considered insufficient selection criteria and causes in not appropriate final CH.
Secondly, defining the optimum value of some parameters is not easy, especially in large-
scale WSNs. EEUC only considers distance to the BS parameter in calculat competition
radius. Finally, broadcasting the beacon messages by the CHs results in more energy
consumption than conventional shortest path multi-hop approaches.

2.5.3 Deterministic Unequal-Sized Clustering Algorithms


Unlike probabilistic unequal clustering algorithms, some approaches use more
confident metrics to elect the CHs. Usually, these metrics are achieved locally based on node
conditions. The most conventional metrics in CH election are the residual energy, proximity
(to neighbors/ BS), node degree (the number of neighbors in cluster range) and node
centrality. These methods are called deterministic clustering algorithms, due to the criteria of
electing CHs, and consequently, the formed unequal clusters are more controllable.
11
There are different types of deterministic algorithms: the well-known method of
clustering in WSNs, and some protocols combine some metrics into a weight then use them to
produce balanced clusters. Some other protocols employ fuzzy-logic to handle uncertainties in
CH election. Furthermore, heuristic based clustering methods have increasingly gained
popularity, because of their optimal solutions. Other methods use different metrics, including
the node degree, proximity, mobility, link conditions, etc., to achieve their objectives. These
groups are presented as compound algorithms. In the following, we are focusing on fuzzy
logic in an organized manner (36).

2.5.3.1 Fuzzy unequal clustering algorithms


With the development of Computational Intelligence (CI), routing protocols are now
based on Reinforcement Learning (RL), Ant Colony Optimization (ACO), Fuzzy Logic (FL),
Genetic Algorithm (GA), and Neural Networks (NNs) (37).
In this section, one of the most important approaches in the area of fuzzy-logic-based
clustering is reviewed. To improve global network performance, some approaches such as ant
colonies require a large number of messages being automatically discarded for their use in
WSNs. Neural networks require a complete training data of the WSN prior working, and GA
and machine learning require high computational capabilities. Since the evaluation of node
conditions in an efficient manner is our target, our approach makes use of fuzzy logic, which
requires low computation capabilities, and is able to support these decision-making processes
to improve efficiency while prolong the overall network lifetime (38).
FL imitates the logic model of human reasoning, experience and the human decision
making behavior, which is much less rigid than the calculations computers generally perform.
Diverse approaches using fuzzy-logic presented improvement in cluster-based routing
approaches, and endorsed the use of fuzzy logic in WSNs. These approaches take advantage
of the use of fuzzy information treatment in order to get efficient routing, since WSNs need
simple and fast methods to make decisions, fuzzy logic appears as an appropriate approach
due to its ability to calculate results fast and precisely. Moreover, the user-friendly nature to
define node conditions provided by this approach and the need for low processing resources
make this technique a suitable method to make decisions in WSNs. In order to improve the
efficiency and accuracy of the route creation process and to speed it up, the evaluation of node
conditions through fuzzy logic is required (39).
The execution of a fuzzy logic system requires less computational power than
conventional mathematical computational methods. Furthermore, only few data samples are
required in order to extract the final accurate result. In addition, FL is suitable for clustering
heuristic like CH selection. Besides, fuzzy logic is a handy technique since it uses human
language to describe inputs and outputs (40).
In a fuzzy-logic-based system, calculations are performed by an inference engine. In order to
select the inference engine, a two widespread approaches in the literature are presented:
Mandani(41), and TSK (42). Both of them proceed in a similar way, consisting of four phases:
fuzzification, rule evaluation, combination or aggregation of rules, and deffuzification as
shown in Figure 2.6.
Fuzzy rules

Fuzzy Inference
Fuzzifier Defuzzifier
engine

Figure 2.6: Fundamental block digram of fuzzy system

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).

2.5.3.2 Energy Aware Fuzzy Unequal Clustering (EAUCF)


Bagci H. and Yazici A. (46) proposed an unequal clustering algorithm based on fuzzy
logic to determine the cluster size according to the vicinity to the BS and node remaining
energy. The highest residual energy within the competition range is an essential factor for
determining CHs; then, the non-CH nodes join with the CH closer to them. Although,
EAUCF is a stable and energy-efficient clustering algorithm to be utilized in any real time
WSN application, EAUCF suffers from the energy depletion at the CH.

2.5.3.3 Multi-Objective Fuzzy Clustering Algorithm (MOFCA)


Sert S. A., Bagci H., and Yazici A. (47) proposed a fuzzy-based algorithm similar to
EAUCF to generate the unequal clusters is introduced to adjust the CH competition radius
according to three parameters: remaining energy, distance to BS, and density of nodes. First,
each node produces a random number between zero and one then compares it to a predefined
threshold (T). If the node finds its number less than T, it elects itself as a tentative CH. Then,
the tentative CHs with higher residual energy are elected as the final CHs. The competition
radius of each tentative CH changes dynamically according to fuzzy system output. MOFCA
did not work with a central decision node (BS) for electing process. Two drawbacks could be
observed: nodes in dense area may have large probability to become CH (wrong decision),
and rounds could end without appropriate CH election.

2.6 Reviewed Protocols


Although the summarized reviewed protocols have been presented in the literature as
shown in Table 2.1, none of them has performed coverage for both issues, which are:
determining final CHs and their radii, and eliminating dependency on probability.
Among the existing routing algorithms, LEACH is the first assumed homogeneous
dynamic clustering. SEP and HEED are among most cited equal-sized clustering algorithms.
On the other hand, EEUC is the first algorithm that overcomes the hotspot problem. Finally,
MOFCA could be considered as a recent fuzzy based unequal-sized clustering algorithm.

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

2.7 Simulation Tools


Sundani H., Li H., Devabhaktuni V., Alam M., and Bhattacharya P. (48) provided a
comprehensive survey and comparisons between various popular sensor network simulators
with a view to help researchers choose the most reliable one available for a particular
application. It also provides a detailed comparison describing the pros and cons of each
simulator. According to this survey, no single simulator is universally applicable to all
situations, but appropriate guidelines for choosing the best simulator for a particular
application environment are presented. We focused on key features of MATLAB (Matrix
Laboratory developed by Math Works Inc.) which is a software package for high performance
numerical computation and visualization. The combination of analysis capabilities, flexibility,
reliability, and powerful graphics makes MATLAB a leading software package for scientific
researchers. MATLAB provides an interactive environment with hundreds of reliable and
accurate built-in mathematical functions.

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.

3.2 Proposed Scenario Assumptions


In our scenario, the following assumptions are proposed for sensor nodes, radio
model, and the underlying network model:
1. Assume an area A = x×y square meters, and consider a sensor network is consisting of N
sensor nodes uniformly deployed over a vast field to continuously monitor the
environment.
2. The i-th sensor is denoted by si and the corresponding sensor node set S where │S│= n.
3. The operation of algorithm is broken into rounds, and each round has a set-up phase and a
steady-state phase as shown in Figure 3.1.

Set-Up Steady-State Set-Up Steady-State


Create Schedule

Create Schedule
Cluster Set-Up

Cluster Set-Up
Advertisement

Advertisement
Slot n

Slot n
Slot 1

Slot 2

Slot 1

Slot 2
……

……

……

……

… …

Round r-1 Round r


Figure 3.1: Round processes

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.

3.3 Deployment Model


In our proposed scenario, a WSN is formed of two hundreds of sensor nodes, and then
simulated clustering algorithms are applied and compared them with our proposed method. It
is quite costly to deploy hundreds of sensors to conduct experiments for clustering algorithms
evaluation. In addition, the performed implementations must be performed repeatedly to
generate better results.
Simulation starts implementing most recent existing algorithms: LEACH - SEP -
HEED - EEUC - MOFCA. This implementation is necessary for the discussion and
comparison of the results.

3.4 System Configurations and Parameters Description


 All tests were carried out on a processor Intel(R) Core(TM) i5 2450M quad-core running
at 2.5 GHz, with 8 GB of DDR3 RAM 1600- PC3 12800 MB/s., windows 7 Enterprise
edition operating system, 64-bit service back 1 version is used.
 All simulations are implemented using MATLAB R2014a 64x version (8.3.0.532).
 The performance of the proposed algorithm is compared with other protocols on the same
environment.
 The proposed scenario is described and summarized in Table 3.1 with determining the
network size, the BS location, and number of the deployed sensors. Also, the
prerequisites and initial values of parameters of each algorithm are assumed.

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

C A constant coefficient between 0 and 1 0.8


T a predefined threshold which node is used to 0.2
decide to become a tentative cluster head with
less than that probability
Proofing the effect of hotspot
NHotspot Number of nodes in simulation of hotspot 100
(x * y)Hotspot Network Size for hotspot simulation 250 * 250 m2

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

Figure 3.2: First order radio model


In order to achieve an acceptable SNR in transmitting a K−bit message over a distance d,
Transmission Energy is expended as a function of the distance to transceiver ( ETx (k; d) in
addition to Transmitter Electronics (ETx−elec ). Where Energy for Reception (ERx (k)) and
Energy for Transmission (ETx (k; d)) are given by Eq. 3.1, Eq. 3.2, and Eq. 3.3:
ERx (k) = ERx−elec (k) = Eelec (k) (Eq. 3.1)
where Eelec is the energy dissipated per bit to run the transmitter or the receiver circuit , while
Receiver Electronics (ERx−elec ) = ETx−elec = Eelec .
Moreover, to transmit this message, the radio expends:
ETx (k; d) = ETx−elec (k) + ETx−amp (k; d) (Eq. 3.2)
2
Eelec ∗ k + Ɛfs ∗ k ∗ d if d > d0 Ɛ
ETx (k; d) = { where d0 =√ fs (Eq. 3.3)
Eelec ∗ k + Ɛmp ∗ k ∗ d4 if d ≤ d0 Ɛmp
where Ɛfs is Energy Dissipation at Free Space, Ɛmp is Energy for Multi-Path Fading (depends
on the transmitter amplifier), and do is the threshold distance.

3.6 Core of Implemented Algorithms


3.6.1 LEACH Methodology
When Appling LEACH protocol at set-up phase to assign a CH, each node si chooses
a random number between 0 and 1. If the number is less than the threshold T(s), the node
becomes the CH for the current round. The threshold is set using Eq. 3.3:
P
1 if n ∈ G
T(s) = { 1−p×(r mod P) (Eq. 3.4)
0 otherwise
where, P is the CH probability Percentage (predefined value), r is the number of the current
round, G is the set of nodes that was not CHs in the last 1/P rounds. Thus, after 1/P -1 rounds,
T(s) =1 for all nodes that have not been a CH. We also run extensive experiments to
determine the optimal number of clusters to use in LEACH. The flowchart of LEACH is
shown in Figure 3.3, where Round is considered the time unit of the proposed simulation, and
Epoch is a set of rounds to guarantee that a node cannot be selected as a CH in the same
epoch

18
Define parameters
of WSN

Create random WSN


i=i+1 i≤n False

True

Assign
parameters values

Y N
if i≥ mn+1

Normal nodes Advanced nodes


S(i).[Energy] plot 'o' S(i).[Energy] plot '+'

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

Reset True If E > 0


N
Statistics(r) &Normal
N node
If E > 0
Reset epoch Y
Check dead nodes Y
if epoch N N N
If G ≤ 0 If Cluster ≥ 1
happen
False
i≤n
Y Y
True Y
False
i≤n N Calculate min_dis to BS
N Y If random < P
If E ≤ 0
True
Y
Reset epoch False
indicator dead+1 dead+1 Packet to BS +1 k=k+1 k ≤ Cluster
Plot o.' Plot '.' Cluster +1
True
i=i+1
Calculate distance to BS Elect min_dis between
i=i+1 BS & distance to all CHs

Y N Y N
if d > do
if d > do

Calculate Energy Calculate Energy Calculate Energy Calculate Energy


dissipated (εmp *d4) dissipated (εfs *d2) dissipated (εmp *d4) dissipated (εfs *d2)

Calculate ERx of CH &


deduct S(i).E

Calculate Average
Energy

Plot statistics

End

Figure 3.3: The flowchart of LEACH

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

In LEACH algorithm, P is replaced by the weighted probabilities to obtain the


threshold that is used to elect the CH in each round. T(snrm) is the threshold for normal nodes
and T(sadv) is the threshold for advanced nodes. Thus, for normal nodes, we have Eq. 3.6:
Pnrm
1 if snrm ∈ Gʹ
T(snrm ) = {1−Pnrm∙(r ∙ mod P nrm
) (Eq. 3.7)
0 otherwise
where r is the current round, Gʹ is the set of nodes that did not become CHs within the last
1/pnrm rounds of the epoch, and T(snrm) is the threshold applied to a population of n (1 − m)
(normal) nodes. This guarantees that each normal node will become a CH exactly once per
epoch and that the average number of CHs per round per epoch is equal to n (1 − m) ×pnrm.
Similarly, for advanced nodes, we have Eq. 3.7:
Padv
1 if sadv ∈ Gʺ
T(sadv ) = { adv mod Padv)
1−P ×(r (Eq. 3.8)
0 otherwise
where Gʺ is the set of nodes that did not become CHs within the last 1/padv rounds of the
epoch, and T(sadv) is the threshold applied to a population of n m (advanced) nodes. This
guarantees that each advanced node will become a CH exactly once every sub-epoch.

3.6.3 HEED Methodology

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

Create random WSN


i=i+1 i≤n False

True

Assign
parameters values

Y N
if i≥ mn+1

Normal nodes Advanced nodes


S(i).[Energy] plot 'o' S(i).[Energy] plot '+'

Run to rmax Phase II Nodes join their CH


Phase
Phase I
EEUC calculations Repeat III For alive
For alive iterations For alive nodes
Reset nodes nodes
Statistics(r)

Check dead nodes


Reset For alive Y
nodes If node is CH
Check all nodes [Type,min_dis,min_dis_cl If node still N
usterID,Nbr,Nbrdis,NumN doesn't have CH N Y
br, CHprob,CHindicator] N if d>do

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

Create random WSN


i=i+1 i≤n False

True

Assign
parameters values

Y N
if i≥ mn+1

Normal nodes Advanced nodes


S(i).[Energy] plot 'o' S(i).[Energy] plot '+'

Run to rmax CH election


EEUC calculations For alive
nodes N If two nodes
Reset overlap
Statistics(r)

Check dead nodes Y


Calculate Rcomp Assign NbrCH, NbrCHdis,
Check all nodes and NumNbrCH+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

Normal nodes join their


Clusters and intra clusters
energy caculations

Figure 3.5: The flowchart of EEUC


22
3.6.5 MOFCA Methodology
MOFCA is a distributed unequal fuzzy clustering algorithm, which makes use of local
decisions based on a probabilistic model used for the election of tentative CHs and final CHs
and utilizes randomized periodical rotation.
MOFCA also employs fuzzy system to estimate the competition radius for tentative
CHs by considering three parameters: distance to the sink, node remaining energy, and the
density of the nodes. In addition to these parameters with the use of fuzzy input and output
variables, uncertainties inherent in the WSN nature are handled in an effective manner.
MOFCA is based on a probabilistic model, which is used for the election of tentative CHs and
utilizes randomized periodic rotation.
In order to calculate CH Competing Radius (CR), we applied the three fuzzy input
variables (descriptors) as were represented (49). The first one is the Distance to the BS (DBS).
The linguistic variables defined for this input are: close, medium and far. A trapezoidal
membership function (MF) is chosen for close and far. On the other hand, the MF of medium
is a triangular MF. The second fuzzy input variable is the Remaining Energy of the tentative
CH (RE). The fuzzy MFs that describe this input variable are: low, medium, and high. The
low and high linguistic variables have trapezoidal MFs while the medium has a triangular
MF. The third fuzzy input variable is the Cluster Density of the tentative CH (CD). Sparse,
normal and dense are the linguistic variables of this fuzzy set. Sparse and dense linguistic
variables have a trapezoidal MFs while normal has a triangular MF, as shown in Figure 3.6.

Figure 3.6: MOFCA fuzzy system

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.

4.1 Advantages of Fuzzy System


We have chosen a fuzzy based control algorithm for electing the CHs; several reasons
support our use of fuzzy control in this regard:

 Representing the problem in mathematical (or probabilistic) model domain involves


dealing with several variables and parameters at same time. Moreover, these variables are
to be defined separately for each scenario, in order to provide a collective output on the
basis of the multiple input variables. Problem arises as the number of these variables
increases. The mathematical model becomes too complex to handle many parameters at a
time, due to the dependency of such parameters on each other. On the other hand, fuzzy
systems have got an inherent ability to integrate numeric (‘fuzzy’) and symbolic (‘logic’)
aspects of reasoning. Therefore, different parameters can be combined easily to give the
desired result by defuzzification the output fuzzy set.
 Fuzzy logic is capable of making real-time decisions, even with incomplete information.
Conventional control systems rely on an accurate representation of the environment, which
rarely exists in reality. Fuzzy logic systems, which can manipulate the linguistic rules in a
natural way, are hence suitable in this respect. In addition, it can be used for context by
blending different parameters - rules combined together to produce the suitable result.
 Fuzzy logic offers a full range of operators to combine uncertain information in a better
way than any other systems. Fuzzy controllers incorporate heuristic control knowledge in
the form of if-then rules. They have also demonstrated a good degree of robustness in face
of large variability and uncertainty in the parameters.

4.2 Proposed Fuzzy System Description


HFMUC generates the tentative CHs and their competition radii based on a fuzzy
system. This fuzzy system considers three inputs: Distance to the BS (DBS), Density of the
Cluster (DC), and Deviation of the node’s Residual Energy from the average network energy
(DRE). The system has two outputs: CH Probability (CHprob) and the Competition Radius for
tentative CHs (Rcomp).
The fuzzy system is represented in Figure 4.1. Relying on the fuzzy input and output
variables, uncertainties inherent in the WSN nature are handled in an effective manner.

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.

Figure 4.2: Membership function of DBS

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.

Figure 4.4: Membership function of DRE

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.

Figure 4.5: Membership function of CHprob

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.

Figure 4.6: Membership function of Rcomp

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.

4.3 HFMUC Operations Flow


Figure 4.7 represents the flow chart of HFMUC clustering phase.
The operation of the proposed HFMUC protocol is described as follows:
 Set-up phase
1. At the beginning of each round: the BS broadcasts a "hello" message periodically with a
certain power level which covers the whole network and contains the network average
energy and the total number of alive nodes.
2. Each node computes the approximate DBS and the value of DRE.
3. In the clustering phase, each node broadcasts a message that contains information about
its ID using a non-persistent Carrier-Sense-Multiple Access (CSMA) MAC protocol
within radio range r.
4. Each node receives the messages from all neighbors in its radio range then computes the
distances to its neighbors and the density of the nodes on its radio range (DC).

28
Implement Fuzzy Sys.
To get CHprob, Rcomp

N
CHprob ≥ 0.49

Be tentative CH

Broadcast CHprob

Receives Broadcasts
from other tentative

Y Distance betwn Si, Sj ≤


0.75(Si.Rcomp +Sj.Rcomp)

Still Receive quit from


N Receive from N Remove Sj
Add Sj to Si.SCH competitor Si.CHprob > Sj.CHprob a competitor Y
Final CH from Si.SCH
tentative CH tentative CH
Y Y
Final CH normal node

Figure 4.7: The flowchart of HFMUC

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

Figure 4.9: Tentative CH list competition

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

State or Message Description


tentative The node may be selected as a final CH.
CH The node is selected as final CH
Quit The node is normal node and quit the competition
Join_Msg Contain the ID of sender and the ID of CH
Schedule_Msg CH assigns time slots for its member nodes

Figure 4.10 illustrates that n2 is in the competitor-tentative-CH list of n1 and n3, so n1


cannot take any decision while n2 still has not decided whether to be a final CH or not.
Finally, n3 has the largest CHprob that should end the competition and assign itself as a
final CH, then n2 will be a normal node and now n1 has to assign itself as a final CH as
well.

31
n1 n2 n3

Chprob = 0.5 Chprob = 0.6 Chprob = 0.7

Figure 4.10: The competion among three tentative


CHs
 Steady-state phase
1. Each non-CH node receives advertisements from the nearest CHs. Node selects the cluster
to join based on the largest Received Signal Strength Indication (RSSI), which implies the
minimum amount of transmission energy that is needed to communicate with the selected
CH.
2. Each CH assigns a TDMA schedule for sending sensed data. The TDMA slots are
calculated based on the number of nodes present in the cluster, then broadcasted back to
the cluster nodes. This ensures that there are no collisions among data messages and also
it allows the radio components of each member node to be turned off at all times except
during their transmission time. In this way, energy consumption is reduced.
3. Each CH waits to receive data from all nodes in its cluster and then compresses and sends
the aggregated results back to the nearest CH in the direction of the BS in multi-hop
communication according to the threshold distance, which is determined by the first radio
model as shown in Figure 4.11. Then algorithm is repeated.

Determined
final CHs

For all CHs

Dis. between
Y N
CH & BS < do

Deduct transmitting
For all
energy to BS α d^2
clusters
&PACKET TO BS+1

Find closest CH and also


more nearest to BS

Deduct reception energy


from intermediate CH

Deduct transmitting
Calculation of PACKET TO
energy to BS according
normal nodes CH+1
to Dis.

Figure 4.11: Repeated Multi-Hop communication between CHs.

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

Figure 4.12: HFMUC algorithm model

 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.

4.5 Summary of HFMUC Methodology


This chapter introduced the proposed fuzzy system, determined the inputs and the
outputs of the fuzzy system and described their MFs. The fuzzy system blended three inputs:
DBS, DC, and DRE according to specific fuzzy rules. It considered eighteen conditional
statements to estimate the two outputs: CHprob and Rcomp. The sequence of our proposed
algorithm was presented into two phases: set-up phase and steady-state phase with indicated
the steps of each phase, and HFMUC pseudo-code is explained. The methodology of
competing between tentative CHs within their ranges was introduced. The HFMUC flowchart
and multi-hop communication flowchart are illustrated.
The aim of the proposed algorithm is to optimize the criteria of selection the CHs and
generate their appropriate radii in order to prolong the network lifetime and conserve the
energy consumption. The results and discussions in the next chapter should demonstrate our
objectives and achievements.

33
Chapter 5
Results and Discussions

5.1 Performance Measures


There are several metrics to evaluate the performance of the clustering protocols (1) :
 Network lifetime: Total number of the rounds from the start of the operation of a WSN to
the death of the last alive sensor.
 First-Dead Node (FDN): Number of the rounds from the start of a WSN operation to the
death of the first sensor.
 Stability period: This parameter has direct relation with the FDN parameter, where the
bigger FDN indicates the longer stability period of network to become.
 Half-Dead Node (HDN): Number of the rounds after half the number of the sensor nodes
is dead.
 Last-Dead Node (LDN): Number of the rounds after all dead sensor nodes.
 Number of alive nodes per round: This instantaneous measure reflects the number of
nodes that have not yet expended their total amount of energy.
 Throughput: It measures the total amount of data sent over the network including the rate
of data sent from CHs to the sink as well as the rate of data sent from cluster members to
their CH, as presented in Eq. 5.1.
Throughput (Packets/Round) = Packets sent to the BS + packets sent to CHs (Eq. 5.1)
In our work, we propose two new metrics that give a better evaluation for network:
 Rate of Energy Consumption (REC): Rate of the change in energy consumption per
round within the stability period.
 Energy Level at FDN (ELFND): The average remaining energy of the entire network
when the first sensor dies. This parameter has direct relation with energy distribution
parameter, i.e. the lowest ELFDN is a better energy distribution.

5.2 LEACH Failure Study


By applying LEACH algorithm on one hundred of nodes, we noticed that the
throughput of some rounds equals zero, which means network failures and always that
happens after the HDN as shown in Figure 5.1.

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.

5.2.1 The Proposed Modified-LEACH Algorithm


While simulating conventional LEACH, we observed that this method uses a constant
probability when assigning the CH, which may be a drawback. The BS should broadcast the
frequent ratio to update the probability equation. In other hand, the broadcast packets cost
more power dissipation and overhead burden. In addition, it does not make sense that LEACH
algorithm operates after value of the rest of alive nodes are equal or less than preset value of
CH probability. The LEACH Stopping condition (LEACH-SC) is proposed to stop the
operating of LEACH and consider all remaining alive nodes as CHs with transmitting their
data directly to the BS. The flow chart of modified–LEACH (Mod-LEACH) is illustrated in
Figure 5.2.
BS LEACH

Y Transition
state
N

Mod-LEACH

N
LEACH-SC

End

Figure 5.2: Mod-LEACH flow chart

5.2.2 LEACH and Mod-LEACH Simulation results


Two transition states are proposed to turn into Mod-LEACH, which are at the HDN or
at the first fail of LEACH. We simulated two scenarios to determine the optimum transition
state.
35
5.2.2.1 Scenario (1)
The BS is located at the center (50, 50), N = 100, P = 0.1. Firstly, original LEACH
with its constant CH probability is applied. Table 5.1 presents the number of alive nodes
when the failure happens. From this table we can see that first failure occurs at round 1295
and the remaining nodes are 48, then many failures happen.
Table 5.1: Scenario (1) network failures of LEACH
# of fails Alive nodes # of R Reason of fail
1 48 1295 condition
2 33 1367 condition
LEACH

. . . .
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

5.2.2.2 Scenario (2)


BS is located at far (150, 50), N = 100, P = 0.1. Table 5.3 presented the number of
alive nodes when the failure happens and the reason of the failure.
Table 5.3: Scenario (2) network failures of LEACH
LEACH
# of fails Alive nodes # of R Reason of fail
1 32 1111 condition
2 27 1135 condition
3 24 1151 condition
. . . .
272 9 1996 condition
273 9 1997 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

first fail of LEACH


# of fails Alive nodes # of R Reason of fail
LEACH 1 36 1072 Condition
Mod-LEACH 2 24 1131 epoch

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.

5.3.2 Effect of Hotspot


The results presented in this section are related to the HEED-equal-clustering
algorithm. We implemented HEED algorithm with multi-hops (MHEED) with different
values of the parameters which are 1500 rounds, where n=100 nodes in x= 250m, y= 250m,
BS at (1.5x, 0.5y).
Figure 5.5 clearly shows that the nearest nodes to the BS have lower residual energy
compared to the ones further away. The results presented are tuned with CR equals 20m in
order to exceed the multi-hop communication and exaggerate the hotspot problem.

38
0.8

Remaining Energy of Each node (Joule) 0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
100 150 200 250 300 350 400
Distance to BS (m)

Figure 5.5: Existance of hotspot

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

Description of nodes Nearest nodes to BS Farthest nodes from BS

Distance to BS (m) 132 133 140 144 157 373 374 375 376

Remaining energy (J) 0 0 0 0 0 0.48 0.65 0.45 0.63

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.

5.4 HFMUC - Simulation Compared to Existing Algorithms


5.4.1 Stability Period Scope
It is clear that the stability period is a vital metric when calibrating reliability of the
WSN, while the traditional definition of stability period is the number of rounds from the start
of a WSN operation to the death of the first sensor. However, for experimental measurements
in our simulation, the entire network works until most of the sensor nodes are dead, where the
LDN metric should not be considered since the WSNs are useless after half of the total nodes
die. Instead of caring about the LDN, new aspects will be introduced, which are the second
and the third dead nodes that may change the definition of the stability period. The incoming
paragraph demonstrates obtained results when applying the proposed HFMUC compared to
the existing 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.

Algorithm FDN 2ndDN 3rdND HDN


LEACH 515 522 523 804
SEP 578 584 584 846
HEED 732 746 753 1274
MHEED 864 900 906 1299
EEUC 951 987 995 1309
MOFCA 1024 1041 1076 1307
HFMUC 1201 1202 1202 1341
The previous table shows that HFMUC surpasses other existing algorithms regarding
all compared parameters. Furthermore, it clarifies the new proposed definition for stability
period observation in terms of percentage node failure. It also turns out that HMFUC has the
longest stability period compared with all implemented algorithms as illustrated in Figure 5.7.

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.

Algorithm LEACH SEP HEED MHEED EEUC MOFCA


% of the gain in
stability period
of HFMUC 133% 108% 64% 39% 26% 17%
over other
algorithms

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.

5.4.2 Energy Evaluation


In this section, two new performance metrics are introduced to measure the energy
consumption and estimate the energy distribution among the simulated algorithms: ELFDN
and REC.
Figure 5.8 illustrates average of the entire remaining energy until the FDN per round
for each algorithm. From this figure, we noticed that the curve of each algorithm is linear until
FDN (stability period). In addition, we concluded that HFMUC surpasses all the implemented
algorithms by its linearity with the lowest slope, and also the lowest remaining energy at the
FDN, which refers to better energy distribution.

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.

Figure 5.9: Energy level at FDN for each algorithm

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

5.4.3 Overhead Communication


The energy dissipation of the network is divided into the data-energy consumption and
the overhead-energy consumption. Figure 5.10 illustrates both consumptions for each
algorithm within the stability period. From Table 5.11, the values of the data-energy and the
overhead-energy consumptions are compared for all simulated and proposed algorithms until
the FDN.

Figure 5.10: Energy consumption of data transmission vs overhead.

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;

%x and y Coordinates of the BS


sink.x=1.5*x;
sink.y=0.5*y;

%Number of Nodes in the field n_advanced& n_normal


n=200;
n_a=40;
n_n=160;
%Optimal Election Probability of a node
%to become cluster head
p=0.2;
%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 (Free space or Multipath)
Efs=10*0.000000000001;
Emp=0.0013*0.000000000001;
%Data Aggregation Energy
EDA=5*0.000000001;
k=4000; %packet size
l=160; %Broadcast size

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,'input','CD',[0 1]); %cluster desity %(low


effect to select CH)
A=addmf(A,'input',2,'lowD','trapmf',[0 0 0.1 0.9]);
A=addmf(A,'input',2,'highD','trapmf',[0.1 .9 1 1]);

A=addvar(A,'input','DELTA',[-1 1]); % reference (difference


to average energy) for each node
A=addmf(A,'input',3,'smaller','trapmf',[-1 -1 -0.8 0]);
A=addmf(A,'input',3,'equal','trimf',[-0.8 0 0.8]);
A=addmf(A,'input',3,'higher','trapmf',[0 .8 1 1]);

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]);

A=addvar(A,'output','CR',[0 40]); % based on EEUC


A=addmf(A,'output',2,'8xs','trapmf',[0 0 2.1 4.2]);
A=addmf(A,'output',2,'7xs','trimf',[2.1 4.2 6.3]);
A=addmf(A,'output',2,'6xs','trimf',[4.2 6.3 8.4]);
A=addmf(A,'output',2,'5xs','trimf',[6.3 8.4 10.5]);
A=addmf(A,'output',2,'4xs','trimf',[8.4 10.5 12.6]);
A=addmf(A,'output',2,'3xs','trimf',[10.5 12.6 14.7]);
A=addmf(A,'output',2,'2xs','trimf',[12.6 14.7 16.8]);

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]);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 Stating the conditional statements


ruleList=[
1 1 1 1 1 1 1
1 1 2 2 2 1 1
1 1 3 3 3 1 1
1 2 1 1 4 1 1
1 2 2 2 5 1 1
1 2 3 3 6 1 1
2 1 1 1 7 1 1
2 1 2 2 8 1 1
2 1 3 3 9 1 1
2 2 1 1 10 1 1
2 2 2 2 11 1 1
2 2 3 3 12 1 1
3 1 1 1 13 1 1
3 1 2 2 14 1 1
3 1 3 3 15 1 1
3 2 1 1 16 1 1
3 2 2 2 17 1 1
3 2 3 3 18 1 1
];
A=addrule(A,ruleList);

52

View publication stats

You might also like