You are on page 1of 65

AN UNMANNED AERIAL VEHICLE ASSISTED NODE LOCALIZATION

IN WIRELESS SENSOR NETWORKS

Submitted in partial fulfillment of the requirements for the degree of

Bachelor of Technology
In
ELECTRONICS AND COMMUNICATION ENGINEERING

by
P.G.S ADITYA – 16BEC0303
D.DHANUSH KUMAR – 16BEC0560
ABDUL AAQIL – 16BEC0042

Under the guidance of


Prof. Kalapraveen Bagadi
Associate professor (Senior)
SENSE
VIT, Vellore.

May, 2020

1
DECLARATION

I hereby declare that the thesis entitled “An Unmanned aerial vehicle assisted node
localization in wireless sensor networks " submitted by P.G.S Aditya, D. Dhanush
Kumar, Abdul Aaqil for the award of the degree of Bachelor of Technology in
Electronics & Communication Engineering to VIT is a record of bonafide work
carried out by me under the supervision of Prof. Kalapraveen Bagadi.

I further declare that the work reported in this thesis has not been submitted and will
not be submitted, either in part or in full, for the award of any other degree or diploma
in this institute or any other institute or university.

Place : Vellore
Date :

Signature of the Candidate

2
CERTIFICATE

This is to certify that the thesis entitled “An Unmanned aerial vehicle assisted node localization in wireless
sensor networks” submitted by P.G.S Aditya (16BEC0303), D. Dhanush Kumar (16BEC0560), Abdul
Aaqil (16BEC0042) School of Electronics and Communication Engineering, VIT University for the award
of the degree of Bachelor of Technology in Electronics & Communication Engineering, is a record of
bonafide work carried out by him under my supervision during the period, 02. 12. 2018 to 30.04.2019, as
per the VIT code of academic and research ethics.

The contents of this report have not been submitted and will not be submitted either in part or in full, for
the award of any other degree or diploma in this institute or any other institute or university. The thesis
fulfills the requirements and regulations of the University and in my opinion meets the necessary standards
for submission.

Place : Vellore
Date :

Signature of the Guide

Internal Examiner External Examiner

Thanikaiselvan V
Electronics & Communication Engineering

3
ACKNOWLEDGEMENT

We want to thank VELLORE INSTITUTE OF TECHNOLOGY (VELLORE) for giving us a chance to


improve our technical skills. We wish to convey our most profound obligation and sincere thanks to our
guide Prof. KALAPRAVEEN BAGADI, ASSOCIATE PROFESSOR (SENIOR), for the encouragement
and guidance he provides us. This project delivers insight into various uses of Communication, using which
a wide range of innovative ideas can bring out for the betterment of the society, and evoked a great sense
of interest in finding creative solutions to regular problems faced by human beings in today’s society. We
would also like to thank the Dean of the School of Electronics and Communication Engineering (SENSE)
for giving us this opportunity to do this project and to pursue our careers as budding engineers in this
prestigious university. We want to thank our Chancellor for providing us with the platform to perform the
project work. We would also like to acknowledge our University Management for their cooperation and
support.

P.G.S ADITYA
D.DHANUSH KUMAR
ABDUL AAQIL

4
EXECUTIVE SUMMARY

The technique of Finding the physical coordinates of a node is known as localization. It is vital because of
the need to tag sensed data and identify events with their place of occurrence using GPS. You can receive
location information on a sensor node. But, installing GPS in every node is not a feasible solution. In this
thesis, we have attempted to address localization in static and mobile sensor networks. For a static node by
varying the anchor nodes, we calculated the results and estimated the localization accuracy.

For a mobile sensor network, an unmanned aerial vehicle is used, which is fixed with GPS to it. We also
estimated the trajectory and calculated the optimized height using various optimization techniques.

5
CONTENTS

Acknowledgement 4
Executive Summary 5
Table of Contents 6
List of Tables 8
List of Figures 9
Abbreviations 10
Symbols and Notations 11
1 INTRODUCTION 12
1.1 Wireless Sensor Networks 12
1.2 Motivation 13
1.3 Objective 14
2 PROJECT DESCRIPTION AND GOALS 15
3 LITERATURE SURVEY
3.1 Localization in WSN 16

3.2 Classification of Localization Techniques 16

3.3 Range-Based Algorithms 19

3.4 Range free Algorithms 20

4 TECHNICAL SPECIFICATIONS
4.1 Localization of Unknown Node Using Fixed
Terrestrial Anchors 21
4.2 Received signal strength indicator (RSSI) 23
4.3 Localization Error 23

6
5 DESIGN APPROACH AND DETAILS 27

5.1 Localization of Unknown Node Using


Mobile Aerial Anchors Nodes 27
5.2 Multilateration 28

5.3 Trajectory path 30


5.4 Flying height of UAV 33

5.5 Optimization-based least square localization(OLSL) 34

5.5.1 Differential Evolutionary Algorithm 35

5.5.2 Procedure for localization of mth UN

using SA–MCDEA 36

5.6 Codes and Standards 40


6 SCHEDULE, TASKS AND MILESTONES 55
7 PROJECT DEMONSTRATION 56
8 RESULT & DISCUSSION 57
9 SUMMARY 62
10 REFERENCES 63

7
LIST OF TABLES
1 Literature survey 17

2 Simulation Parameters of terrestrial anchor nodes 24

3 Performance comparisons of RSSI localization for different number

of terrestrial anchor nodes 27

4 Simulation Parameters of mobile anchor nodes 32

5 Performance comparisons of RSSI localization for various UAV trajectories 32

8
LIST OF FIGURES
1 Classification of Localization Schemes 17

2 System model of terrestrial ANs assisted node localization 21

3 Deployment of terrestrial ANs, UNs and estimated locations of UNs using


RSSI multilateration for different AN configurations (a) N = 4 (b) N = 9 (c)N=13 (d) N=36 26

4 System model of UAV assisted node localization 28

5 Trajectories of UAV in a (120 × 120) m sensor field (a) SCAN (b) DOUBLE SCAN (c) HILBERT 31

6 Localization accuracy comparison of RSSI localization using aerial ANs for different
broadcast frequencies in Scan trajectory 33

7 Average localization error of multilateration when an UAV is flying at different heights 34

8 Flowchart of DEA 38

9 Schedule division of our project 55


10 Deployment of 9 ANs, UNs and estimated locations of UNs using RSSI 57
11 Localization error of each UN with FTANs using RSSI localization techniques 57
12 Deployment of 9 ANs, UNs and estimated locations of UNs using DEA 58
13 Localization error of each UN with FTANs using DEA 58
14 UN localization with 9 aerial anchor nodes using RSSI 59
15 Localization error of each UN with aerial anchor nodes using RSSI localization technique 60

16 UN localization with 9 aerial anchor nodes using DEA 60

17 Localization error of each UN with MAANs using DEA 61

9
ABBREVIATIONS

WSN …………………………………. Wireless Sensor Network


UAV …………………………………. Unmanned Aerial Vehicle
AN ………………………………….. Anchor node
UN …………………………………… Unknown node
GPS …………………………………… Global Positioning System
RSS …………………………………… Received Signal Strength
TDOA ………………………………… Time difference of arrival
TOA …………………………………... Time of arrival
AOA …………………………………… Angle of arrival
LOS ……………………………………. Line of sight
2-D ……………………………………. 2 Dimensional
RSSI …………………………………… Received signal strength indicator
LNSM …………………………………. Log normal shadowing model
LE ……………………………………. Localization error
ALE ……………………………………. Average Localization error
RMSE ………………………………….. Root mean square error
G-G ……………………………………. Ground to Ground
A-G ……………………………………. Air to Ground
OLSL …………………………………. Optimized least square localization
DEA …………………………………… Differential evolutionary algorithm

10
SYMBOLS AND NOTATIONS
T…………………… Transpose
-1 …………………… Inverse
𝑑0…………………… reference distance
𝑃0 ………………….. received signal strength at reference distance 𝑑0
𝑑𝑛𝑚 ………………… actual distance between mth unknown node and nth anchor node

𝛾 ………………….. path loss exponent

𝑋𝜎 …………………. log-normal shadowing effects


ℎ𝑜𝑝𝑡 ……………… optimized height

hmin ………………… minimum height


hmax ……………… maximum height

𝑑̂𝑞 ………………… distance from UAV placed at qth trajectory position to the reference node (𝑥𝑟 , 𝑦𝑟 )

𝑑̂𝑞𝑚 ……………… distance from UAV situated at qth trajectory position and mth UN

11
1 Introduction
This introduces the problem approach and the motivation, and formulates the objectives of this thesis.
Moreover, the outline of the dissertation is described as well as the main contributions.

1.1 WIRELESS SENSOR NETWORK

Wireless sensor networks (WSNs) are the technology which has gained a considerable research interest
over the past few years. Recent research in wireless sensor communications and electronics have enabled
the development of low-power, low-cost and versatile sensors that are small in size and communicate in
short distances. These sensors, networked through wireless links and deployed in large numbers, provide
unprecedented opportunities for monitoring and controlling homes, cities, and the environment. By
definition, a wireless sensor network is a large-scale, multi-hop, unpartitioned network of largely
homogeneous, tiny (hardly noticeable), resource-constrained, low-complexity, mostly immobile (after
deployment) sensor nodes that would be randomly deployed in the area of interest and which communicate
in the short distance either directly or through other nodes by a wireless medium. A sensor node is a low-
power device capable of interacting with its environment through various sensors, processing information
locally, and communicating this information wirelessly with its neighbors. This device typically consists of
three components. It can be either an individual board or embedded into a single system: wireless modules
or modes which possess the communication capabilities and the programmable a memory where the
application code resides; a sensor board is mounted on the mote and embedded with multiple sensors and
a programming board that provides various interfaces for connecting the motes to PC or laptop.

WSNs make use of many different types of sensors, e.g., magnetic, thermal, acoustic, etc., which can
monitor a wide variety of ambient conditions that include temperature, humidity, pressure, speed, direction,
movement, light, soil makeup, noise levels, the presence or absence of certain kinds of objects, and
mechanical stress levels on attached objects. As a result, a broad range of applications are possible:
homeland security, ground based monitoring of land and water, intelligence gathering for defense,
environmental monitoring, urban warfare, weather and climate analysis and prediction, biomedical health
monitoring, battlefield monitoring and surveillance, monitoring of seismic acceleration. Even though
WSNs have characteristics that make them highly desirable for a range of applications, they have their
design and resource constraints. Some of the more restrictive resource constraints are the limited amount
of energy, the short communication range, the low bandwidth, and the limited processing and storage
capabilities. Otherwise, the design constraints are application dependent and based on the monitored
environment. That plays a crucial role in defining network size, deployment scheme, and topology of the

12
network. Network size changes with the mentioned environment. for indoor environments Nodes shall form
a network in a limited space, whereas outdoor environments more nodes can be needed to cover a larger
area. When needed deployment over expected deployment is favored when the environment is inaccessible
to humans, even when there are hundreds or thousands of nodes on the network. Environmental obstructions
may also restrict communication between nodes, which affects network connectivity. WSN research aims
to overcome the above limitations by incorporating new design principles, developing or enhancing existing
protocols, and designing new applications, and developing new algorithms.

1.2 Motivation

In the last 17 years, India has faced more than 300 natural disasters which resulted in 76,031 deaths in this
millennium, according to the International Disaster Database (IDD). The estimated damage sustained by
India in the last 17 years due to these disasters amounts to USD 63.6 billion, according to the database. This
damage is mainly due to lack of proper surveillance. In addition, disaster management, military
surveillance, environmental monitoring, medical observations, home applications and so on require a
system to monitor. So, a wireless sensor network (WSN) formed by connecting several sensor nodes is
particularly useful for detecting such event. WSN’s use several signal and images processing techniques
while detecting an event. During sensing certain event each node in a WSN is supposed to know its location
in physical world. If the location of the event is unknown, detection of that event is not particularly useful.
For the purposes of biological research and animal behavior studies, it is very useful to track animals over
time and over very wide spaces. Such tracking can answer questions about animal behavior and interactions
within their own and with other species. consider deploying a sensor network in an office building,
manufacturing floor, and warehouse. Sensors already play a very important role in manufacturing.
Monitoring and control of machinery has traditionally been wired, but making these sensors wireless
reduces the high cost of cabling and makes the manufacturing floor more dynamic. Automatic localization
of these sensors further increases automation.

13
1.3 Objective

The localization of a sensor node, i.e. identification of a source node's location in a wireless sensor network,
is a challenging problem. The objective of this research is to come up with accurate, cost effective and
novel localization algorithms for localization in WSN’s. The objective of this thesis includes:

(i)Localization using lesser number of location-aware nodes.


(ii)Develop a localization algorithm with no extra hardware cost.
(iii)Reduce the localization error.
(iv)To defining an algorithm for optimizing flying height of the UAV.
(v)To plan trajectory path of UAV movement for achieving uniform coverage with minimum computational
complexity.

1.3 Background

To come across this thesis, one should have prior knowledge about localization. What does localization
means, how it is used in our day to day life and how it is measured. They should have basic knowledge of
techniques used for localization such as Global positioning system (GPS). And one can know about all
other localization techniques that are used for improving the accuracy of localization. To understand more
precisely they need prior knowledge about Unmanned Aerial Vehicle (UAV) and it’s working and
challenges faced. They are challenges like localization error and height optimization. We have used
optimized least square localization techniques such as DEA to get accurate results. Prior knowledge in
matlab helps you to understand the project effectively.

14
2.Project Description and Goals

We have studied the localization of unknown nodes with anchor nodes (known nodes) by various
techniques. We have studied it in terrestrial region as well as in aerial. We have used RSSI localization
technique for localization of unknown nodes. At first, we have deployed few unknown nodes and few
anchor nodes on a sensor field. And by multilateration and RSSI we got position of unknown nodes. We
have varied the number of anchor nodes and calculated the localization accuracy for each case.

And implemented the same process in aerial region. Here we will deploy a anchor node in UAV and it
moves aerially. Depending on the broadcast frequency it gives a signal to unknown node and moves in its
trajectory. We have studied few trajectories namely ‘scan’, ‘double scan’, ‘Hilbert’ and have calculated
localization accuracy in each case and confirmed to take scan as it’s trajectory path. The height at which
UAV moves also alters the localization accuracy of unknown nodes. Thus, by using Optimized least square
localization technique we have obtained the optimized height at which UAV will be moving. We studied
DEA algorithm to optimized the height and LNSW effect. Thus, we have obtained the position of unknown
nodes.

We have given all the information as input in MATLAB code and calculated the localization accuracy and
estimated position of unknown nodes. We observed that with DEA algorithm we obtained more accurate
results. We observed that with DEA algorithm we got 50-70 % more accurate positions compared to before
used techniques. If we can implement this system it helps in various sectors such as surveillance, disaster
management.

15
3 Literature Survey

3.1 Localization in WSN

Localization is the process of finding the physical or relative location of a sensor node as data and
information are useless if the nodes have no idea of their geographical positions. GPS (global
positioning system) is the simplest method for localization of nodes, but it becomes very expensive if
large number of nodes exists in a given network.

Anchor Nodes: Sensor nodes with known location information are called “Anchor nodes‟. Typically,
anchor nodes obtain their location information by using a global positioning system (GPS), or by
manually being placed at defined coordinates.

Unknown Nodes: Sensor nodes with unknown location information are called “Non-Anchor nodes”
or “Unknown nodes”. Localization is estimated through communication between localized node and
unknown node for determining their geometrical placement or position. Location is determined by
means of distance and angle between nodes.

3.2 Classification of Localization Techniques

At present, many approaches have been proposed for node localization in WSNs. According to whether
or not the network needs to measure the actual distances/angles between network nodes and based on
whether accurate ranging is required, WSN localization algorithm can be divided into two categories
known as range-based algorithm and range-free algorithm. The range-based algorithms are more
accurate than range-free.

16
Localization of WSNs

Classical Methods Soft Computing Methods

Range - Based Range - Free OTs Fuzzy Logic ANNs Hybrid

GPS RSS TDoA ToA AoA Centroid Hop Count APIT Gradient Pattern Match

Fig.1 Classification of Localization Schemes

Table 1: Literature survey


s.no. Paper Title Methodology
(Type of localization)
1 Geolocation and Assisted GPS GPS

2 Collaborative Localization with Received-Signal RSS


Strength in wireless sensor networks

3 An Approximately Efficient TDOA Localization TDOA


Algorithm in Closed Form for Locating Multiple
Disjoint Sources with Erroneous Sensor Positions

4 Source Localization in Wireless Sensor Networks from TOA


Signal Time of-Arrival Measurements
5 Distributed Angle Estimation for Localization in AOA
Wireless Sensor Networks

6 GPS-less Low-Cost Outdoor Localization for Very centroid


Small Devices

7 Experimental Results for and Theoretical Analysis of a gradient


Self-Organizing a Global Coordinate System from Ad
Hoc Sensor Networks

8 SSD: A Robust RF Location Fingerprint Addressing pattern match


Mobile Devices' Heterogeneity

17
9 Improved APIT localization algorithm based on APIT
wireless sensor network

10 Reference Anchor Selection and Global Optimized hop count


Solution for DV-Hop Localization in Wireless Sensor
Networks

11 Bio Inspired Distributed WSN Localization Based on OTs


Chicken Swarm Optimization

12 A comparative investigation of deterministic and OTs


metaheuristic algorithms for node localization in
wireless sensor networks

13 Amorphous localization algorithm based on BP ANN


artificial neural network

14 Accurate Wireless Sensor Localization Technique Fuzzy


Based on Hybrid PSO-ANN Algorithm for Indoor and
Outdoor Track Cycling

15 Vision-based target detection and localization via a hybrid


team of cooperative UAV and UGV

16 Design, Analysis, and Field Testing of an Innovative Multiple UAVs


Drone-Assisted Zero Configuration Localization
Framework for Wireless Sensor Networks

17 An energy efficient joint localization and Multiple UAVs


synchronization solution for wireless sensor networks
using unmanned aerial vehicle
18 A collaborative UAV-WSN network for monitoring Single UAVs
large areas

19 Aerial Anchors Positioning for Reliable RSS-Based Single UAV


Outdoor Localization in Urban Environments

20 Design and Performance evaluation of Sugeno fuzzy RSSI UAV


inference system for multi-disciplinary WSNs
applications with optimized network structure

18
3.3 Range-Based Algorithms:

Range-based systems, or fine-grained localization systems, utilize timing-based, directionality-based,


or signal-strength based techniques for distance estimation, and the position of the node is computed
using multilateration or triangulation. Systems that fall into this category are. As distance estimates
are fairly accurate, refinement may not yield a great deal of improvement in the initial position
estimates. The range-based algorithms are more accurate than range-free.

Equipping every sensor with a GPS receiver. Sensors can locate themselves individually using the GPS
signals. However, installing a GPS receiver for every sensor node greatly increase the total cost of the
sensor network. In addition, the introduction of GPS receiver increases the energy consumption of a
node and hence shortens its life time. Lastly, the location obtained from GPS-receiver may not be
precise enough for certain applications and the accuracy of GPS is affected by various environmental
factors. Accuracy can be of tenths of meters for general GPS. The error can be lowered to less than ten
meters for GPS augmentation systems like Differential GPS (DGPS) but with a higher cost.

The time of arrival (TOA) is the one way propagation time taken for the signal to travel from the source
to the receiver. In order to obtain the TOA measurement at more than one receiver, it is required that
the source and receivers precisely be synchronized. This can be avoided by measuring the round-trip
or two-way TOA. The product of the TOAs by the known propagation speed, denoted by c, results in
the distance between source sensor and receiver sensor.

To overcome the time synchronization error in the TOA measurement. The time difference of arrival
(TDOA) is the difference in TOAs of the received signal at a pair of receiver sensors, with respect to
one of those receivers. Similar to TOA, this also requires synchronization among receivers, but it does
not require synchronization at the source sensor to the same context as with TOA. Similar to TOA the
product of the known propagation speed leads to the range difference between the source and the two
receives.

Time of arrival (AOA) is the arrival angle of the emitted source signal observed at a receiver. From
each AOA, a line of bearing (LOB) can be drawn from the source sensor to the receiver sensor, and
the intersection of two LOB will provide the possible location estimation for the unknown sensor node.
Although this scheme does not require any clock synchronization, it requires expensive antenna arrays
at each receiver, for AOA measurement estimation.

19
Localization based on Received Signal Strength (RSS) is a key method for locating objects in Wireless
Sensor Networks (WSNs). By measuring the received-signal-strength (RSS) at three or more known
sensor nodes, trilateration can be used to estimate the location of the unknown source.Among these
techniques, RSS and TDOA are more popular in WSNs due to the ease of implementation. On the
other hand, while AOA in general produces fairly good results even at only two known receivers, it
requires expensive antenna arrays at each receiver. For the TOA-based methods, synchronization
between the serving receivers and the source side is required, which makes it an obstacle for
localization in WSNs.

3.4 Range free Algorithms

In range free schemes, special hardware for distance estimation are not used. APIT is an area based
range free scheme which assumes that some of nodes those are aware of their positions outfitted with
high powered transmitters.

APIT is located in area to carry out position estimation by separating the area into triangular zones
between anchors. Each node’s presence inside or outside the triangle regions allows declining the
viable location until and unless every possible sets have reached to an acceptable accuracy.

DV-Hop localization uses a mechanism similar to the classical distance vector routing method. One
anchor node broadcasts a message which contains the anchors’ positions with hop count. Each
receiving node keeps the minimum value, which it receives. After that it ignores the other message
with higher values. Messages broadcasted out with hop count values incremented at every middle hop.
In this scheme, all nodes in the network and other anchors obtain the shortest distance in hops.

Multi Hop techniques are able to compute a connectivity graph. The multidimensional scaling (MDS)
uses connectivity information considering the nodes are within the communication range. This scheme
has three steps as follows:

• In the first step, the distance estimation between each viable pair of nodes is done.
• In the second step, MDS is used for deriving the locations to fit the estimated distance.
• Finally, in the last step, optimization is done by putting the known locations into account.

20
In large scale sensor networks, there are several kind of MDS methods are used such as metric, non
metric, classical, weighted. The multi hop based multilateration process allows multi hop nodes to
collaborate in finding better position estimates.

Centroid scheme uses proximity based grained localization algorithm. In centroid localization
algorithm , node’s location is computed on the basis of several reference node positions. The centroid
localization algorithm uses the location (xi , yi) of anchor nodes (reference node).

In gradient algorithm, unknown nodes obtain their locations through multilateration. It also uses hop
count which is initially set to zero and incremented as it propagates to other nearby nodes. Gradient
algorithm follows certain steps such as the following:

• In the first step, anchor nodes broad casts a message containing its coordinated and hop count
value.
• In the second step, unknown node determines the shortest path between itself and anchor node
from which it receives beacon message
• In the third step, minimum error in which node calculates its coordinate.

4. Technical Specifications

4.1 Localization of Unknown Node Using Fixed Terrestrial Anchors


Sensor nodes are randomly deployed in 2-D area with L position conscious anchor nodes (ANs) with
GPS modules and M unknown nodes (UNs). Out of 'L' ANs, we anticipate that 'N' ANs are within the
range 'R' of mth UN. The mth UN incorporates Euclidean distance 𝑑̂𝑛𝑚 from nth AN. The positions of
nth AN and mth UN are given as (xn, yn) and (𝑥̃𝑚 , 𝑦̃𝑚 ) respectively.

x - axis
AN - 2
dˆ2 m dˆ1m AN -1

dˆnm
UN - m
AN - n
y - axis
Fig.2 System model of terrestrial ANs assisted node localization

21
The distance computed between all ANs and mth UN the use of RSSI multilateration is received from

(𝑥1 − 𝑥̃𝑚 )2 + (𝑦1 − 𝑦̃𝑚 )2 = 𝑑̂1𝑚


2

(𝑥2 − 𝑥̃𝑚 )2 + (𝑦2 − 𝑦̃𝑚 )2 = 𝑑̂2𝑚


2

.
.
(1)
.

(𝑥𝑁 − 𝑥̃𝑚 )2 + (𝑦𝑁 − 𝑦̃𝑚 )2 = 𝑑̂𝑁𝑚


2

To solve this set of equations, it is more convenient to write them as a set of linear equations in terms of
̃𝒎 and ̃𝒚𝒎 .
𝒙

2(𝑥1 − 𝑥𝑁 ) 𝑥̃𝑚 + 2(𝑦1 − 𝑦𝑁 ) 𝑦̃𝑚 = 𝑑̂𝑁𝑚


2
− 𝑑̂1𝑚
2
+ 𝑥12 − 𝑥𝑁2 + 𝑦12 − 𝑦𝑁2

2(𝑥2 − 𝑥𝑁 ) 𝑥̃𝑚 + 2(𝑦2 − 𝑦𝑁 ) 𝑦̃𝑚 = 𝑑̂𝑁𝑚


2
− 𝑑̂2𝑚
2
+ 𝑥22 − 𝑥𝑁2 + 𝑦22 − 𝑦𝑁2
.
.
(2)
.

2(𝑥𝑁−1 − 𝑥𝑁 ) 𝑥̃𝑚 + 2(𝑦𝑁−1 − 𝑦𝑁 ) 𝑦̃𝑚 = 𝑑̂𝑁𝑚


2
− 𝑑̂𝑁−1𝑚
2 2
+ 𝑥𝑁−1 − 𝑥𝑁2 + 𝑦𝑁−1
2
− 𝑦𝑁2

Let 𝑆𝒎 = [𝑥̃𝑚 , ̃𝑦𝑚 ]𝑇

(𝑥1 − 𝑥𝑁 ) (𝑦1 − 𝑦𝑁 )
(𝑥2 − 𝑥𝑁 ) (𝑦2 − 𝑦𝑁 )
.
A= 2 and
.
.
[(𝑥𝑁−1 − 𝑥𝑁 ) (𝑦𝑁−1 − 𝑦𝑁 )]

𝑑̂𝑁𝑚
2
− 𝑑̂1𝑚
2
+ 𝑥12 − 𝑥𝑁2 + 𝑦12 − 𝑦𝑁2
𝑑̂𝑁𝑚
2
− 𝑑̂2𝑚
2
+ 𝑥22 − 𝑥𝑁2 + 𝑦22 − 𝑦𝑁2
B= .
.
.
[𝑑̂𝑁𝑚
2
− 𝑑̂𝑁−1𝑚
2 2
+ 𝑥𝑁−1 − 𝑥𝑁2 + 𝑦𝑁−1
2
− 𝑦𝑁2 ]

22
then the position of the unknown nodes can be obtained by multidimensional scaling 𝐴𝑆𝑚 = 𝐵 and solving
further to obtain the correction vector
𝑆𝑚 = (𝐴𝑇 𝐴)−1 𝐴𝑇 𝐵
(3)

4.2 Received signal strength indicator (RSSI)


Received signal strength indicator (RSSI) is a measurement of the power present in a received radio signal.
RSSI is usually invisible to a user of a receiving device. However, because signal strength can vary greatly
and affect functionality in wireless networking, devices often make the measurement available to users.
Signal is measured by the receive signal strength indicator (RSSI), which in most cases indicates how well
a particular radio can hear the remote connected client radios.

This approach estimates the distance from AN to UN the usage of the RSSI measurements recorded at the
UN, that's acquired from the classic radio-propagation path loss model

The RSSI measured in dBm within the log-normal shadow-fading model (LNSM) is given by way of:

RSSI[𝑑nm]𝑑𝐵𝑚=𝑃0[𝑑0] 𝑑𝐵m−10𝛾𝑙𝑜𝑔10 [𝑑nm/ 𝑑0]− 𝑋𝜎 (4)

Where, 𝑃0 is the received signal strength at reference distance 𝑑0,


𝑑𝑛𝑚 refers to the actual distance between mth unknown node and nth anchor node,
𝛾 denotes the path loss exponent,
and log-normal shadowing effects is defined with 𝑋𝜎, which is Gaussian distributed with zero mean
and 𝜎2 variance.
The distance 𝑑̂𝑛𝑚 is estimated from the RSSI

𝑃 [𝑑 ]−RSSI[𝑑 ]
𝑑̂𝑛𝑚 = 𝑑0 10 [ 0 0 10𝛾 𝑛𝑚 ] (5)

4.3 Localization Error

The act of localization is the estimation of the true location of an object in space and is characterized by a
certain amount of inherent uncertainty and operational bias that results in estimation errors. The type and

23
size of the estimation errors depend on the properties of the emitted sound, the characteristics of the
surrounding environment, the specific localization task, and the abilities of the listener.

The localization accuracy can be measured by mth node localization error (LEm), average localization error
(ALE) and root mean square error (RMSE), which are defined as follows.

2 2
𝐿𝐸𝑚 = √(𝑥̂
𝑚−𝑥
̃𝑚 ) + (𝑦
̂𝑚−𝑦
̃𝑚)
(6)

1
𝐴𝐿𝐸 = 𝑀 ∑𝑀 ̂
𝑚=1 √(𝑥𝑚−𝑥
̃ 2
𝑚 ) + (𝑦
̂𝑚−𝑦
̃𝑚)
2

(7)

1
𝑅𝑀𝑆𝐸 = √ ∑𝑀 ̂
𝑚=1 √(𝑥𝑚−𝑥
̃ 2
𝑚 ) + (𝑦
̂𝑚−𝑦
̃𝑚)
2 (8)
𝑀

Table 2: Simulation Parameters

Parameter Value
WSN Parameters
Ground Node Dimension (D) 2
Number of UNs (M) 100
Sensor field size 120 x 120 m2
GG channel Parameters
Reference distance (d0) 1m
Path-loss at reference distance (P0[d0]) -30.446dBm
Standard deviation (𝝈) 5.3
Path-loss exponent (𝜸) 2.835

24
120 Anchor Locations
Node True Location
Node Estimated Location
100
X-Position (in meters)

80

60

40

20

0
0 20 40 60 80 100 120
X-Position (in meters)
a)

120
Anchor Locations
Node True Location
100 Node Estimated Location
X-Position (in meters)

80

60

40

20

0
0 20 40 60 80 100 120
X-Position (in meters)
b)

25
120
Anchor Locations
Node True Location
100 Node Estimated Location
X-Position (in meters)

80

60

40

20

0
0 20 40 60 80 100 120
X-Position (in meters)
c)

120 Anchor Locations


Node True Location
Node Estimated Location
100
X-Position (in meters)

80

60

40

20

0
0 20 40 60 80 100 120
X-Position (in meters)
d)
Fig.3 Deployment of terrestrial ANs, UNs and estimated locations of UNs using RSSI multilateration for different
AN configurations (a) N = 4 (b) N = 9 (c)N=13 (d) N=36

26
Table 3: Performance comparisons of RSSI localization for different number of terrestrial ANs

N ALE in meters RMSE in meters


4 5.6895 6.7011
9 5.0162 6.3718
13 4.1921 4.9833
36 3.2949 4.1772

With these results we have finalized to use 9 Anchor nodes for rest of our work because ALE AND
RMSE values for 9 Anchor nodes is reasonable and their estimated position is also more accurate
compared to remaining cases.

5 Design approach and details


After formulating the location coordinates of UN nodes by terrestrial anchor nodes using multilateration
and RSSI technique. Now we are going to apply same techniques for Aerial anchor nodes and mobile anchor
nodes as UAV continuously monitors the region. And we have also estimated the path trajectory the UAV
should move in-order to get more accurate and efficient position of unknown nodes. We also estimated the
height at which UAV should fly so we get least localization error and more accurate position.

5.1 Localization of Unknown Node Using Mobile Aerial Anchors


The machine model for localization of UNs in MAAN-assisted MWSN is depicted in Fig 4. The unmanned
aerial vehicle (UAV) is used to carry the aerial ANs. The UAV travels with predefined speed and in touch
with UNs with predefined large casting frequency. Based on the broadcasting frequency, the UAV, the
number of trajectory points is decided. Each trajectory factor acts as one virtual AN. As the variety of
trajectory points will increase, the localization accuracy will increase.

The MAAN-based localization device also considered a two-dimensional terrestrial sensor vicinity. The
‘M’ unknown multimodal sensor nodes are placed randomly. The UAV is operated at a most optimal height.
The UAV monitors the entire sensor field as depicted in Fig.4. The UAV ensures to offer communique
from AN to all UNs. So, enhanced localization accuracy is predicted from UAV-based localization. Each
UN obtains message from UAV located at various trajectory positions 𝑇𝑞 ,q = 1, 2,…, Q, wherein Q
represents the number of trajectory points. The number of trajectory positions may additionally range in
keeping with broadcasting frequency. The positions of UNs are estimated after reaching UAV to the landing
point. The positioning accuracy especially depends on the flying peak of the UAV. Hence, the flying height

27
of the UAV is optimized. After optimizing the flying top, the positions of the UNs are anticipated the use
of this optimized top.

Aerial Vehicle

hopt dˆqm
x − axis
Remote Station

90o
( xq , yq ) rˆqm UN - m

y − axis
Fig.4 System model of UAV assisted node localization

5.2 Multilateration
Let the distance measurements from all AN trajectory points to mth UN are given as:
2
(𝑥1 − 𝑥̃𝑚 )2 + (𝑦1 − 𝑦̃𝑚 )2 = 𝑟̂1𝑚

(𝑥2 − 𝑥̃𝑚 )2 + (𝑦2 − 𝑦̃𝑚 )2 = 𝑟̂22 𝑚

. 2
𝑟̂𝑞𝑚 = 𝑑̂1𝑚
2 2
− ℎ𝑜𝑃𝑡 q=1,2….Q

.
(9)

2
(𝑥𝑁 − 𝑥̃𝑚 )2 + (𝑦𝑁 − 𝑦̃𝑚 )2 = 𝑟̂𝑄𝑚

To solve this set of equations, it is more convenient to write them as a set of linear equations in terms of
̃𝒎 and ̃𝒚𝒎
𝒙
2 2
2(𝑥1 − 𝑥𝑄 ) 𝑥̃𝑚 + 2(𝑦1 − 𝑦𝑄 ) 𝑦̃𝑚 = 𝑟̂𝑄𝑚 − 𝑟̂1𝑚 + 𝑥12 − 𝑥𝑄2 + 𝑦12 − 𝑦𝑄2

28
2 2
2(𝑥2 − 𝑥𝑄 ) 𝑥̃𝑚 + 2(𝑦2 − 𝑦𝑄 ) 𝑦̃𝑚 = 𝑟̂𝑄𝑚 − 𝑟̂2𝑚 + 𝑥22 − 𝑥𝑄2 + 𝑦22 − 𝑦𝑄2
.
(10)
.
2 2 2
2(𝑥𝑄−1 − 𝑥𝑄 ) 𝑥̃𝑚 + 2(𝑦𝑄−1 − 𝑦𝑄 ) 𝑦̃𝑚 = 𝑟̂𝑄𝑚 − 𝑟̂𝑄−1𝑚 + 𝑥𝑄−1 − 𝑥𝑄2 + 𝑦𝑄−1
2
− 𝑦𝑄2
Let 𝑆𝒎 = [𝑥̃𝑚 , ̃𝑦𝑚 ]𝑇

(𝑥1 − 𝑥𝑄 ) (𝑦1 − 𝑦𝑄 )
(𝑥2 − 𝑥𝑄 ) (𝑦2 − 𝑦𝑄 )
A= 2 . and
.
.
[(𝑥𝑁−1 − 𝑥𝑄 ) (𝑦𝑄−1 − 𝑦𝑄 )]

2 2
𝑟̂𝑄𝑚 − 𝑟̂1𝑚 + 𝑥12 − 𝑥𝑄2 + 𝑦12 − 𝑦𝑄2
2 2
𝑟̂𝑄𝑚 − 𝑟̂2𝑚 + 𝑥22 − 𝑥𝑄2 + 𝑦22 − 𝑦𝑄2
B= .
.
.
2 2 2 2 2 2
[𝑟̂𝑄𝑚 − 𝑟̂𝑄−1𝑚 + 𝑥𝑄−1 − 𝑥𝑄 + 𝑦𝑄−1 − 𝑦𝑄 ]

then we can write ASm = B and we can obtain:


𝑆𝑚 = (𝐴𝑇 𝐴)−1 𝐴𝑇 𝐵

The RSSI measurements recorded at the UN is based on the classic radio-propagation path loss model.
The RSSI measured in dBm in the classical LNSM is given by:

𝑑𝑞𝑚
RSSI[𝑑𝑞𝑚 ]𝑑𝐵𝑚 = 𝑃0 [𝑑0 ]𝑑𝐵𝑚 − 10𝛾𝑙𝑜𝑔10 [ 𝑑0
] − 𝑋𝜎 (11)

where P0 is the RSS measured at reference distance d0

dqm is the true distance between mth UN and qth AN

γ is path loss exponent

Xσ is the parameter that represents log-normal shadowing effects (attenuation coefficient).

𝑃 [𝑑 ]−RSSI[𝑑 ]
𝑑̂𝑞𝑚 = 𝑑0 10 [ 0 0 10𝛾 𝑞𝑚 ] (12)

29
5.3 Trajectory path of UAV
Initially we have chosen three trajectory paths for UAV to move. Scan, Double Scan, Hilbert are the three
trajectory paths. In these different paths, UAV will have different number of trajectory points and covers
different distances. And by calculating LE, ALE, RMSE from equations [6,7,8] we have observed that Scan
trajectory is giving more accurate positions and also number of trajectory points are also less compared to
others trajectory paths. Hence we have continued our rest of the work considering UAV moving in Scan
trajectory.

120

110
TQ
100
Take - off Landing
Point Point
90

80

70
Tq
60

50

40

30
T1 T2
20
Take - off Landing
10 Point Point

0 10 20 30 40 50 60 70 80 90 100 110 120

a)

30
120

110

100

90

80

70
Tq
60

50

40

30
T1 T2
20
TQ
Take - off Landing
10 Point Point

0 10 20 30 40 50 60 70 80 90 100 110 120

b)
120

110

100

90

80
Tq
70

60

50

40

30 T2
T1
20
Take - off Landing
10 Point Point

0 10 20 30 40 50 60 70 80 90 100 110 120

c)
Fig. 5 Trajectories of UAV in a (120 × 120) m sensor field (a) SCAN (b) DOUBLE SCAN (c) HILBERT

31
Table 4: Simulation Parameters

Parameter value
UAV PARAMETERS

UAV speed 40 m/sec

Broad casting frequency 1/sec


Optimal Flying height 41.663 m

Ground node Dimension (D) 2

Number of UNs 100

hmin & hmax 20 m and 100 m


AG channel parameters

Reference distance (d0) 1m


Path loss at reference distance (P0[d0]) -34.906 dBm

Standard Deviation 2.15


Path-loss exponent 2.6533

Table 5: Performance comparisons of RSSI localization for various UAV trajectories

Trajectory Number of trajectory Distance covered in ALE


points meters
Scan 9 320 2.9697
Double Scan 17 640 2.3368
Hilbert 17 680 2.1351

From these results, we came to a conclusion that taking localization accuracy and number of trajectory
points into consideration we can say ‘scan’ trajectory path is the best one.

32
Fig. 6 Localization accuracy comparison of RSSI localization using aerial ANs for different broadcast
frequencies in Scan trajectory

5.4 Flying height of UAV

The positioning accuracy mainly depends on flying height of the UAV. Hence, the flying height of the
UAV is optimized. After optimizing flying height, the positions of the UNs are estimated using this
optimized height. The height optimizing problem for the UAV flies from minimum height hmin to maximum
height hmax is specified as:
2
ℎ𝑜𝑝𝑡 = arg min [√∑𝑄𝑞=1 |√𝑑̂𝑞2 − ℎ2 − 𝑟𝑞 | ] (13)
ℎ∈(ℎ𝑚𝑖𝑛 ,ℎ𝑚𝑎𝑥 )

Where 𝑑̂𝑞 is the envisioned distance from UAV placed at qth trajectory position to the reference node
(𝑥𝑟 , 𝑦𝑟 ) which if acquired from RSSI measurement. The reference point has expertise approximately its
function and it's far usually situated at the center of sensor plan. And here 𝑟𝑞 represents the gap between
the reference node and the projection of UAV on the ground sensor plane, which is as expressed follows:

2 2
𝑟𝑞 = √(𝑥𝑞 − 𝑥𝑟 ) + (𝑦𝑞 − 𝑦𝑟 ) (14)

33
The common localization errors are plotted when UAV is flying from 3 to 20 m even as the UAV is
broadcasting messages at frequencies 0.5, 1, and 2. In widespread, the shortest path between UAV and UN
will provide minimal localization errors, while in real environments when the UAV flies at low altitude,
excessive absorptions in the surrounding can also occur and additionally clear LOS won't available. this
results in a huge localization error. However, as flying altitude multiplied the localization error regularly
decreases and at most useful altitude minimal error occurs. Thereafter, the error again will increase with
flying altitude as seen in this discern.

Fig. 7 Average localization error of multilateration when an UAV is flying at different heights

Distance measurement is obtained from RSSI recorded at UNs through the classical Log Normal
Shadowing Model (LNSM). The classical RSSI technique has limited localization accuracy. To improve
accuracy of RSSI technique, localization problem is defined as optimization based least square localization
(OLSL) problem and it is solved by several optimization techniques (OTs).

5.5 Optimization-based least square localization (OLSL)

Least squares method is a kind of mathematical optimization techniques. It is a kind of approximate


calculating method of unknown equation. It is use to minimize the square sum of error to find a set of data
the best function matching. Therefore, on many issues, especially some engineering problems or practical

34
applications, usually do not consider the optimal solution or optimal solution does not exist, you can use
the least squares method to get a minimum error solution. The basic idea of the least squares method is to
make minimum sum of squared deviations.

5.5.1 Differential Evolutionary Algorithm

Differential Evolution (DE) algorithm, first proposed by Price and Store, has become one of the most
famous classical algorithms in the field of evolutionary computation due to its advantages of fast speed,
few parameters and easy realization. Differential evolution belongs to evolutionary algorithm, including
mutation, crossover, selection, updating and other basic structures. First, the initial solution is randomly
generated in the whole search space, followed by the mutation operation, and then it is the crossover
operation. The generated mutation vectors are crossed with the individual vectors to get the experimental
vectors. The crossover operation consists of binomial crossover and exponential crossover. In general, the
method used more commonly is binomial crossover, and the binomial operation is used here.

The Differential Evaluation Algorithm (DEA) is a widespread optimization technique like Genetic
Algorithm (GA) that uses the identical operatives such as crossover, mutation, selection, and reproduction
to find global solution. The DEA has low complexity over GA, because DEA computes all operations in
decimal notion instead of binary notion. The key variance in discovery of optimal solutions is that GAs
relying on crossover process, whereas DEA relying on mutation process. This techniques primarily has
three returns such as finding actual global optima irrespective of initial parameters, rapid convergence and
consisting of limited control parameters. The DEA is first suggested by Storn and this has been extensively
utilized in many antenna design problems. The basic operations involved in differential evolution
localization algorithm are converting sensor node localization problem into differential evolution
optimization problem, mutation, recombination or cross over and selection.

Self adaptive mutation factor and cross-over probability based Differential Evolution Algorithm (SA–
MCDEA) has been introduced, which has a self-adaptive mechanism to adjust MF and CoP. SA–MCDEA
is used to optimize lease square localization problem by taking optimized height.

35
5.5.2 Procedure for localization of mth UN using SA–MCDEA
Initialization:

𝑔,𝑝 𝑔,𝑝 𝑔,𝑝


𝑤𝑚 = [ 𝑥𝑚 , 𝑦𝑚 ]T , p = 1,2,……P , g =1,2,……P (15)

where, m refers to index of UN.

Mutation:

𝑔,𝑝 𝑔,𝑟2
𝑔,𝑝 𝑔,𝑟3
𝑣𝑚 = 𝑤𝑚 + F(𝑊𝑚 - 𝑊𝑚 ) (16)

The mutation factor F ϵ (0, 1] is a positive real-valued number. The randomly chosen integers r1,
r2 and r3 are taken to be different from the running index p and r1, r2, r3 ϵ{1, 2,…, P}.

Cross-over:
𝑔,𝑝,𝑑
𝑣𝑚 randd (0,1) ≤ Cp or d = drand

𝑔,𝑝,𝑑
𝑢𝑚 =
(17)
𝑔,𝑝,𝑑
𝑤𝑚 otherwise

Adaptive Mutation and Cross-over:


The self-adaptive control parameters and are obtained in the generation g + 1 as:

F1 + rand1F2 , if rand2 < Г1


Fg+1 =
Fg , otherwise (18)

rand3 , if rand4 < Г2


𝑔+1
𝐶𝑝 = (19)

𝑔
𝐶𝑝 otherwise

36
where randj, j {1, 2, 3, 4}, are uniform pseudo-random values lies between 0 and 1, τ1 and τ2 are
constants that are used to define F and Cp respectively.

Fitness Evaluation:

𝑔,𝑝 𝑔,𝑝
f𝑢𝑚 = ∑𝑞 | Fqm( 𝑢𝑚 ) |2 (20)

f𝑤𝑚𝑔,𝑝 = ∑𝑞 | Fqm( 𝑤𝑚𝑔,𝑝 ) |2 (21)

Selection:
𝑔,𝑝 𝑔,𝑝 𝑔,𝑝
𝑢𝑚 f𝑢𝑚 ≤ f𝑤𝑚

𝑔+1,𝑝
𝑤𝑝 = (22)
𝑔,𝑝
𝑤𝑚 otherwise

The whole procedure is repeated from mutation till maximum number of generations met.

Optimal Solution:

𝑠̂ 𝑚 = argmin[ ∑𝑞 | Fqm( 𝑤𝑚𝑔,𝑝 ) |2] ,p=1,2,…………….P (23)


𝑝

Similarly, the entire procedure is repeated for finding the optimal positions of remaining M – 1
nodes.

37
Use the Least Square Distance
Function as the Cost Function

Start ADEA
g =1

Initialize ( P  2 ) Population
wmg , p

Fitness Evaluation
fwmg , p

Adaptive Mutation & Crossover


umg , p
Fitness Evaluation

fumg , p

Yes
wmg , p = umg , p Does fumg , p  fwmg , p

No

w g,p
m = wmg , p

g = g +1

Is
Termination Criterion No

Met ( g = G )?

Yes

Finish ADEA

Take Best individual as Solution


 2
Sˆm = arg min   Fqm ( wmG , p ) 
p
 q 

Fig.8 Flowchart OF DEA

By the use this optimal height and DEA algorithm the localizing problem for mth UN with UAV is revised
as:

2
2 2
(𝑥̂
𝑚 ,𝑦
̂𝑚 ) = 𝑎𝑟𝑔 min [∑𝑄 √
𝑞=1 ( (𝑥𝑞 − 𝑥̃𝑚 ) + (𝑦𝑞 − 𝑦̃𝑚 ) − 𝑟̂𝑞𝑚 ) ] (24)
( 𝑥̃ 𝑚)
𝑚 𝑦̃

38
Where 𝑟̂𝑞𝑚 = √𝑑̂𝑞𝑚
2 − ℎ2 and 𝑑̂
𝑜𝑝𝑡 𝑞𝑚 are the distance from UAV situated at qth trajectory position and m
th

UN. The least square localization statement given in Eq. (15) is optimized with efficient OTs like DE
algorithm. DE explores the solution precisely and exploits the solution less in the beginning stage of the
algorithm. At the end of search process, it gradually increases exploitations and reduce explorations.

39
5.6 MATLAB codes
Localization of unknown nodes using DEA algorithm and calculating localization error
clc;
close all;
clear all;
NS = 120; % networkSize
M = 100; % number of mobile nodes
U = xlsread('C:\Users\HP\Downloads\UNNode.xlsx');
A = xlsread('C:\Users\HP\Downloads\Anchor1p1.xlsx');
N = size(A,1); % number of anchors
Dist = zeros(N, M);DistN = zeros(N, M);
% Distance Calculation
P0 = -30;
alfa = 3;
SD = 6;
Ntrail = 100; % No of trails for computing Average RSSI
for m = 1 : M
for n = 1 : N
Dist(n,m) = sqrt((A(n,1)-U(m,1))^2 + (A(n,2)-U(m,2))^2);
Pnm = P0-10*alfa*log10(Dist(n,m))-mean(random('norm',0,SD,Ntrail,1));
DistN(n,m)=10^((P0-Pnm)/(10*alfa));
end
end

Xi = zeros(M,2); % mobileLocEst Initial guess (random location)


Nt = 100; % Number of Trails
UN = zeros(M,2,Nt);
% repeatation

40
for j=1:Nt
j
for m = 1 : M

Xi(m,:) = MyDEA(NS,N,DistN(:,m),A);
end
UN (:,:,j)=Xi;

end
X = mean(UN,3);
LE = zeros(1,M);
SE = zeros(1,M);
for m=1:M
LE(m)= sqrt(sum((X(m,:)-U(m,:)).^2));
SE(m)= sum((X(m,:)-U(m,:)).^2);
end
ALE = mean(LE);
RMSE = sqrt(mean(SE));
[ALE RMSE]

plot(A(:,1),A(:,2),'r*','MarkerSize',8,'linewidth',2);
hold on;
plot(U(:,1),U(:,2),'ko','MarkerSize',6,'linewidth',2);
hold on;
plot(X(:,1),X(:,2),'b^','MarkerSize',6,'linewidth',2);
hold on;
plot([X(:,1) U(:,1)]',[X(:,2) U(:,2)]','-b','linewidth',1.5);
legend('Anchor locations','Node true location','Node estimated location')
axis([-0.1 1.1 -0.1 1.1]*NS)

41
figure;
bar(LE);
axis([0 100 0 10]);
xlabel('Node Index');

Localization of unknown nodes by aerial anchor nodes using RSSI and calculating localization error
clc;
close all;
clear all;
NS = 120; % networkSize
M = 100; % number of mobile nodes
% building a random location for the unkonown node
U = xlsread('C:\Users\HP\Downloads\UNNode.xlsx');
A = xlsread('C:\Users\HP\Downloads\AnchorDS.xlsx');
N = size(A,1); % number of anchors
h = 10;
Dist = zeros(N, M);DistN = zeros(N, M);DistR = zeros(N, M);
% Distance Calculation
% Open
P0 = -34.906;
alfa = 2.6533;
SD = 4.02;
% Suburban
% P0 = -30.446;
% alfa = 2.8350;
% SD = 5.3;
Ntrail = 100; % No of trails for computing Average RSSI
for m = 1 : M
for n = 1 : N
Dist(n,m) = sqrt((A(n,1)-U(m,1))^2 + (A(n,2)-U(m,2))^2 + h^2);

42
Pnm = P0-10*alfa*log10(Dist(n,m))-mean(random('norm',0,SD,Ntrail,1));
DistN(n,m)=10^((P0-Pnm)/(10*alfa));
DistR(n,m)=sqrt(DistN(n,m)^2-h^2);
end
end
%~~~~~~~~~~~~Multilateration method for determination of unknown point coordinates~~~~~~~~~~~

p = zeros(N-1,2);
An = A(N,:);
for i=1:N-1
p(i,:) = A(i,:) - An;
end
P=2*(p);

Xi = zeros(M,2);
Nt = 100; % Number of Trails
UN = zeros(M,2,Nt);
for j=1:Nt
j
for m = 1:M
d = DistR(:,m);
q = zeros(N-1,1);
for i=1:(N-1)
q(i)=d(N)^2-d(i)^2+A(i,1)^2-An(1)^2+A(i,2)^2-An(2)^2;
end
Xi(m,:)=((P'*P)\(P'*q))'; % Least Square method
end
UN (:,:,j)=Xi;
end
X = mean(UN,3);

43
LE = zeros(1,M);
SE = zeros(1,M);
for m=1:M
LE(m)= sqrt(sum((X(m,:)-U(m,:)).^2));
SE(m)= sum((X(m,:)-U(m,:)).^2);
end
ALE = mean(LE);
RMSE = sqrt(mean(SE));
[ALE RMSE]
plot(A(:,1),A(:,2),'r*','MarkerSize',8,'linewidth',2);
hold on;
plot(U(:,1),U(:,2),'ko','MarkerSize',6,'linewidth',2);
hold on;
plot(X(:,1),X(:,2),'b^','MarkerSize',6,'linewidth',2);
hold on;
plot([X(:,1) U(:,1)]',[X(:,2) U(:,2)]','-b','linewidth',1.5);
legend('Aerial Vehicle Projection','Node true location','Node estimated location')
axis([-0.1 1.1 -0.1 1.1]*NS)
xlabel('X-Position (in meters)');
ylabel('Y-Position (in meters)');
figure;
% stem(1:M,LE,'-k','linewidth',2);
bar(LE);
axis([0 100 0 20])
xlabel('Node Index');
ylabel('Localization Error');

% hold on;
% plot(X(:,1),U(:,1),'-b','linewidth',1);

44
Localization of unknown nodes by aerial anchor nodes using DEA
clc;
close all;
clear all;
NS = 120; % networkSize
M = 100; % number of mobile nodes
U = xlsread('C:\Users\HP\Downloads\UNNode.xlsx');
A = xlsread('C:\Users\HP\Downloads\Anchor1p2.xlsx');
N = size(A,1); % number of anchors
h = 10;
Dist = zeros(N, M);DistN = zeros(N, M);DistR = zeros(N, M);
% Distance Calculation
% Open
P0 = -34.906;
alfa = 2.6533;
SD = 4.02;
% Suburban
% P0 = -30.446;
% alfa = 2.8350;
% SD = 5.3;
Ntrail = 100; % No of trails for computing Average RSSI
for m = 1 : M
for n = 1 : N
Dist(n,m) = sqrt((A(n,1)-U(m,1))^2 + (A(n,2)-U(m,2))^2 + h^2);
Pnm = P0-10*alfa*log10(Dist(n,m))-mean(random('norm',0,SD,Ntrail,1));
DistN(n,m)=10^((P0-Pnm)/(10*alfa));
DistR(n,m)=sqrt(DistN(n,m)^2-h^2);
end
end

45
Xi = zeros(M,2); % mobileLocEst Initial guess (random location)
Nt = 100; % Number of Trails
UN = zeros(M,2,Nt);
% repeatation
for j=1:Nt
j
for m = 1 : M

Xi(m,:) = MyDEA(NS,N,DistR(:,m),A);
end
UN (:,:,j)=Xi;

end
X = mean(UN,3);
LE = zeros(1,M);
SE = zeros(1,M);
for m=1:M
LE(m)= sqrt(sum((X(m,:)-U(m,:)).^2));
SE(m)= sum((X(m,:)-U(m,:)).^2);
end
ALE = mean(LE);
RMSE = sqrt(mean(SE));
[ALE RMSE]

plot(A(:,1),A(:,2),'r*','MarkerSize',8,'linewidth',2);
hold on;
plot(U(:,1),U(:,2),'ko','MarkerSize',6,'linewidth',2);
hold on;
plot(X(:,1),X(:,2),'b^','MarkerSize',6,'linewidth',2);

46
hold on;
plot([X(:,1) U(:,1)]',[X(:,2) U(:,2)]','-b','linewidth',1.5);
legend('Anchor locations','Node true location','Node estimated location')
axis([-0.1 1.1 -0.1 1.1]*NS);
xlabel('X-Position (in meters)');
ylabel('Y-Position (in meters)');
figure;
bar(LE);
axis([0 100 0 10]);
xlabel('Node Index');
ylabel('Localization Error');

Localization using RSSI technique


clc;
close all;
clear all;
NS = 120; % networkSize
% UN = NS*rand(100,2);
U = xlsread('C:\Users\HP\Downloads\UNNode.xlsx');% building a random location for the unkonown node
M = 100; % number of unknown nodes
A = xlsread('C:\Users\HP\Downloads\Anchor1p2.xlsx'); % Anchor Positions
N = size(A,1);% number of anchors

Dist = zeros(N, M);


DistN = zeros(N, M);
% Distance Calculation
P0 = -30;
alfa = 3;
SD = 6;
Ntrail = 100; % No of trails for computing Average RSSI

47
for m = 1 : M
for n = 1 : N
Dist(n,m) = sqrt((A(n,1)-U(m,1)).^2 + (A(n,2)-U(m,2)).^2);
Pnm = P0-10*alfa*log10(Dist(n,m))-mean(random('norm',0,SD,Ntrail,1));
DistN(n,m)=10^((P0-Pnm)/(10*alfa));
end
end
%~~~~~~~~~~~~Least squares method for determination of unknown point coordinates~~~~~~~~~~~

p = zeros(N-1,2);
An = A(N,:);
for i=1:N-1
p(i,:) = A(i,:) - An;
end
P=2*(p);

Xi = zeros(M,2);
Nt = 100; % Number of Trails
UN = zeros(M,2,Nt);
for j=1:Nt
j
for m = 1:M
d = DistN(:,m);
q = zeros(N-1,1);
for i=1:(N-1)
q(i)=d(N)^2-d(i)^2+A(i,1)^2-An(1)^2+A(i,2)^2-An(2)^2;
end
Xi(m,:)=((P'*P)\(P'*q))'; % Least Square method
end
UN (:,:,j)=Xi;

48
end
X = mean(UN,3);
LE = zeros(1,M);
SE = zeros(1,M);
for m=1:M
LE(m)= sqrt(sum((X(m,:)-U(m,:)).^2));
SE(m)= sum((X(m,:)-U(m,:)).^2);
end
ALE = mean(LE);
RMSE = sqrt(mean(SE));
[ALE RMSE]
plot(A(:,1),A(:,2),'r*','MarkerSize',8,'linewidth',2);
hold on;
plot(U(:,1),U(:,2),'ko','MarkerSize',6,'linewidth',2);
hold on;
plot(X(:,1),X(:,2),'b^','MarkerSize',6,'linewidth',2);
hold on;
plot([X(:,1) U(:,1)]',[X(:,2) U(:,2)]','-b','linewidth',1.5);
legend('Anchor locations','Node true location','Node estimated location')
axis([-0.1 1.1 -0.1 1.1]*NS)
xlabel('X-Position (in meters)');
ylabel('Y-Position (in meters)');
figure;
% % stem(1:M,LE,'-k','linewidth',2);
bar(LE);
axis([0 100 0 20])
xlabel('Node Index');
ylabel('Localization Error');

% hold on;

49
% plot(X(:,1),U(:,1),'-b','linewidth',1);

Localization error of aerial anchor nodes


clc;
close all;
clear all;
NS = 120; % networkSize
mm = [25 50 75 100 125 150 175 200]; % number of mobile nodes
% building a random location for the unkonown node
A = xlsread('C:\Users\HP\Downloads\Anchor1p1.xlsx');
N = size(A,1); % number of anchors
h = 41.663;

% Distance Calculation
P0 = -34.906;
alfa = 2.132;
SD = 1.3;
Ntrail = 100; % No of trails for computing Average RSSIDist = zeros(N, M);
ALE =zeros(size(mm));
for k =1:length(mm)
M = mm(k)
U = NS*rand(M,2);
Dist = zeros(N, M);DistN = zeros(N, M);DistR = zeros(N, M);
for m = 1 : M
for n = 1 : N
Dist(n,m) = sqrt((A(n,1)-U(m,1))^2 + (A(n,2)-U(m,2))^2 + h^2);
Pnm = P0-10*alfa*log10(Dist(n,m))-mean(random('norm',0,SD,Ntrail,1));
DistN(n,m)=10^((P0-Pnm)/(10*alfa));
DistR(n,m)=sqrt(DistN(n,m)^2-h^2);
end

50
end
%~~~~~~~~~~~~Multilateration method for determination of unknown point coordinates~~~~~~~~~~~

p = zeros(N-1,2);
An = A(N,:);
for i=1:N-1
p(i,:) = A(i,:) - An;
end
P=2*(p);

Xi = zeros(M,2);
Nt = 100; % Number of Trails
UN = zeros(M,2,Nt);
for j=1:Nt

for m = 1:M
d = DistR(:,m);
q = zeros(N-1,1);
for i=1:(N-1)
q(i)=d(N)^2-d(i)^2+A(i,1)^2-An(1)^2+A(i,2)^2-An(2)^2;
end
Xi(m,:)=((P'*P)\(P'*q))'; % Least Square method
end
UN (:,:,j)=Xi;
end
X = mean(UN,3);
LE = zeros(1,M);
SE = zeros(1,M);
for m=1:M
LE(m)= sqrt(sum((X(m,:)-U(m,:)).^2));

51
SE(m)= sum((X(m,:)-U(m,:)).^2);
end
ALE(k) = mean(LE);

end
plot(mm,ALE,'-b','linewidth',1.5);

% hold on;
% plot(X(:,1),U(:,1),'-b','linewidth',1);

Distance covered by RSSI in G-G & A-G mediums

clc;
close all;
clear all;
Ntrail = 100; Nit=1000;
P0 = -30;
alfa = 3;
SD = 5.3;

P1 = -34.906;
alfa1 = 2.132;
SD1 = 2.15;

Dist=20:200;
RSSIGG = zeros(Nit,length(Dist));RSSIAG = zeros(Nit,length(Dist));SqErGG = zeros(Nit,length(Dist));
DistGG = zeros(Nit,length(Dist));DistAG = zeros(Nit,length(Dist));SqErAG = zeros(Nit,length(Dist));
for i=1:Nit
i
for d =1:length(Dist);

52
D = Dist(d);
RSSIGG(i,d) = P0-10*alfa*log10(D)-mean(random('norm',0,SD,Ntrail,1));
DistGG(i,d)=10^((P0-RSSIGG(i,d))/(10*alfa));
RSSIAG(i,d) = P1-10*alfa1*log10(D)-mean(random('norm',0,SD1,Ntrail,1));
DistAG(i,d)=10^((P1-RSSIAG(i,d))/(10*alfa1));
SqErGG(i,d)=(D-DistGG(i,d))^2;

end
SqErGG(i,:)=(Dist-DistGG(i,:)).^2;
SqErAG(i,:)=(Dist-DistAG(i,:)).^2;
end

rssigg=mean(RSSIGG);
distgg=mean(DistGG);
rssiag=mean(RSSIAG);
distag=mean(DistAG);
sqergg=mean(SqErGG);
sqerag=mean(SqErAG);

figure;
plot(Dist,rssigg,'r','MarkerSize',8,'linewidth',2);
hold on;
plot(Dist,rssiag,'k','MarkerSize',6,'linewidth',2);
grid on;
xlabel('Distance in meters');
ylabel('Received Signal Strength');
legend('GG', 'AG');
figure;
% plot(Dist,distgg,'r','MarkerSize',8,'linewidth',2);
% hold on;

53
% plot(Dist,distag,'k','MarkerSize',6,'linewidth',2);
% grid on;
% xlabel('True Distance');
% ylabel('Estimated Distance');
% legend('GG', 'AG');
plot(Dist,sqergg,'r','MarkerSize',8,'linewidth',2);
hold on;
plot(Dist,sqerag,'k','MarkerSize',6,'linewidth',2);
grid on;
xlabel('Distance in meters');
ylabel('Squared Distance Error');
legend('GG', 'AG');

54
6 Schedule & Tasks
Our work mainly focused on study of localization using terrestrial anchor nodes and then localization of
aerial anchor nodes. We have worked on challenges localization by UAV faces such as localization
accuracy, trajectory path and optimized height. Later we worked on MATLAB code and simulated the
results.

a)

b)
fig.9 Schedule division of our project

55
7 Project Demonstration
Our project is study on localization of nodes by an unmanned aerial vehicle. So, we have studied the
localization process of unknown nodes by anchor nodes (anchor nodes) in terrestrial as well as aerial region.
Here in unmanned aerial vehicle we have deployed and anchor node whose position is known by gps. This
UAV moves in the aerially region and thus creates virtual anchor nodes. Each time when UAV moves from
one place to another place, the new point acts as new anchor node. UAV sends a beacon signal to all the
unknown nodes deployed on the ground and by using RSSI localization technique we can get the position
of the unknown node. We also studied the trajectory path in which UAV should be moving in order to give
more accurate position. Initially we have considered three trajectory paths such as ‘scan’, ‘Double Scan’,
‘Hilbert’ and among these ‘scan’ trajectory path is giving position of unknown node with least localization
error and also has less trajectory points compared to others path which helps in energy consumption of gps.
Flying height at which UAV moves also effects the localization accuracy thus we have calculated the
optimized height at which UAV should be moving. We have taken different broadcast frequency that is at
what frequency the UAV send a beacon signal to unknown nodes and calculated the average localization
error.The distance calculated by RSSI is not accurate and has log-narrow shadow model effect. In order to
get efficient values we have used optimized least square localization techniques such as DEA and calculated
the most accurate position of the unknown nodes.

By using localization techniques like RSSI and OLSL techniques such as DEA the position of unknown
nodes are more accurate. With results obtained we can say that accuracy is 50-70% higher compared to
previously used techniques. So by implementing this UAV model we have advantage in disaster
management and surveillance with low man power and decreases in human loss. And this UAV model is
cost efficient and can be implemented with high precision equipment.

56
8 Results and Discussion
Localization results of terrestrial anchor nodes

120 Anchor Locations


Node True Location
Node Estimated Location
100
Y-Position (in meters)

80

60

40

20

0
0 20 40 60 80 100 120
X-Position (in meters)
Fig. 10 Deployment of 9 ANs, UNs and estimated locations of UNs using RSSI

Fig.11 Localization error of each UN with FTANs using RSSI localization techniques

57
Fig.12 Deployment of 9 ANs, UNs and estimated locations of UNs using DEA

FIG. 13 Localization error of each UN with FTANs using DEA

58
From the results we can observe that using Differential evolutionary algorithm (DEA) we obtained
more accurate localization results than using RSSI technique. Localization error in DEA method
is less compared to RSSI technique.

Localization results of aerial anchor nodes

Fig. 14 UN localization with 9 aerial anchor nodes using RSSI

59
Fig. 15 Localization error of each UN with aerial anchor nodes using RSSI localization technique

Fig. 16 UN localization with 9 aerial anchor nodes using DEA

60
Fig. 17 Localization error of each UN with MAANs using DEA

Thus, we can infer from the results that localization using DEA algorithm are more accurate with
low localization error compared to localization using RSSI technique.

So by using DEA algorithm in ideal UAV with an anchor node with optimized GPS system and
which moves in scan trajectory around the surface at an optimized height can localize the unknown
nodes accurately and can be used for various sectors.

61
9 Summary
Many networking protocol and application require appropriate localization of sensor nodes because the
Quality of Service depends on localization accuracy. for improving localisation accuracy and cost
efficiency, we have suggested UAV assisted localization. Node localization using fixed terrestrial ANs
suffers from poor localization accuracy because the Ground to Ground (GG) channel link is not reliable.
By contrast, the mobile anchor deployed in Unmanned Aerial Vehicle (UAV) provides high localization
accuracy through reliable Air to Ground (AG) channel link. The classical techniques are suffering from
poor localization accuracy as the distance measurement is noisy in LNSM. So, localization task is defined
as optimization based least square localization (OLSL) problem. Since flying height of the UAV greatly
influence the localization accuracy, we defined a least square optimization problem is to optimize the flying
height. We used Differential evolutionary algorithm (DEA) to get the optimized height and thus found the
accurate position of unknown nodes.

62
10 References
1. Harl H, Willig A (2005) Protocols and architectures for wireless sensor networks. Wiley, London
2. Chizari H, Poston T, Abd Razak S, Abdullah AH, Salleh S (2014) Local coverage measurement algorithm
in GPS-free wireless sensor networks. Ad Hoc Net 23:1–17
3. Wen F, Liang C (2015) Fine-grained indoor localization using single access point with multiple antennas.
IEEE Sens J 15:1538–1544
4. Tarrı ´o P, Bernardos AM, Casar JR (2012) An energy-efficient strategy for accurate distance estimation
in wireless sensor networks. Sensors 12:15438–15466
5. Xiong H, Chen Z, Yang B, Ni R (2015) TDoA localization algorithm with compensation of clock offset
for wireless sensor networks. China Commun 12:193–201
6. Liu Y, Hu YH, Pan Q (2012) Distributed, robust acoustic source localization in a wireless sensor
network. IEEE Trans Signal Process 60:4350–4359
7. Maddumabandara A, Leung H, Liu M (2015) Experimental evaluation of indoor localization using
wireless sensor networks. IEEE Sens J 15:5228–5237
8. Xu Y, Zhou J, Zhang P (2014) RSS-based source localization when path-loss model parameters are
unknown. IEEE Commun Lett 18:1055–1058
9. Aspnes J, Eren T, Goldenberg DK et al (2006) A theory of network localization. IEEE Trans Mob
Comput 5:1663–1678
10. Bulusu N, Heidemann J, Estrin D (2000) GPS-less low-cost outdoor localization for very small devices.
IEEE Pers Commun 7:28–34
11. Niculescu D, Nath B (2003) DV based positioning in Ad Hoc networks. Telecomm Syst 22:267–280
12. Liu Y (2011) An adaptive multi-hop distance localization algorithm in WSN. Manuf Automob 33:161–
163
13. Das ADR, Mallick DK (2017) A congestion aware, energy efficient, on demand fuzzy logic based
clustering protocol for multihop wireless sensor networks. Wirel Pers Commun 97:1445–1474
14. Lo ´pez DA, Rojas CA, Zapata DF et al (2018) Designing a MAC algorithm for equitable spectrum
allocation in cognitive radio wireless networks. Wirel Pers Commun 98:363–394
15. Cheng BH, Vandenberghe L, Yao K (2009) Distributed algorithm for node localization in wireless ad-
hoc networks. ACM Trans Sens Netw 6:8–20
16. Storn R, Price KV (1997) Differential evolution—a simple and efficient heuristic for global
optimization over continuous spaces. J Glob Optim 11:341–359
17. Harikrishnan R, Jawahar Senthil Kumar V, Sridevi Ponmalar P (2016) A comparative analysis of
intelligent algorithms for localization in wireless sensor networks. Wirel Pers Commun
87:1057–1069

63
18. Annepu V, Rajesh A (2017) An efficient differential evolutionary algorithm based localization in
wireless sensor networks. Int Conf Microelectron Dev Circ Syst. https://doi.org/10.1109/
ICMDCS.2017.8211560

19. Weatherington D (2002) Unmanned aerial vehicles roadmap: 2002–2027. Technical report
ADA414908. Office of Secretary of Defence, Washington, DC, USA

20. Xu Y, Zhenguo G, Qiang N (2017) Unmanned aerial vehicle–assisted node localization for wireless
sensor Networks. Int J
Distrib Sens Netw 13:1–13

21. Hazem S, Mohammad MA, Alessandro C, Sofie P (2018) Aerial anchors positioning for reliable RSS-
based outdoor localization in urban environments. IEEE Wirel Commun Lett 7:376–379

22. Morbidi F, Mariottini GL (2013) Active target tracking and cooperative localization for teams of aerial
vehicles. IEEE Trans Control Syst Technol 21:1694–1707

23. Minaeian S, Liu J, Son YJ (2016) Vision-based target detection and localization via a team of
cooperative UAV and UGVs. IEEE Trans Syst Man Cybern Syst 46:1005–1016

24. Subong S, Bhoram L, Jihoon K (2008) Vision-based real-time target localization for single-antenna
GPS-guided UAV. IEEE Trans Aerosp Electron Syst 44:1391–1401

25. Yan M, Du P, Wang HL et al (2012) Ground multi-target positioning algorithm for airborne
optoelectronic system. J Appl Opt 33:717–720

26. Bagadi K, Annepu V, Susmita D (2016) Recent trends in multiuser detection techniques for SDMA–
OFDM communication system. Phys Commun 20:93–108

27. Ravikumar CV, Kalapraveen B (2017) Design of MC-CDMA receiver using radial basis function
network to mitigate multiple access interference and nonlinear distortion. Neural Comput Appl.
https://doi.org/10.1007/s00521-017-3127-0

28. Ravikumar CV, Kalapraveen B (2017) MC–CDMA receiver design using recurrent neural networks for
eliminating multiple access interference and nonlinear distortion. Int J Commun Syst 30:1–13

29. Kalapraveen B, Susmita D (2013) Neural network-based adaptive multiuser detection schemes in
SDMA–OFDM system for wireless application. Neural Comput Appl 23:1071–1082

30. Guangjie H, Jinfang J, Chenyu Z, Trung Q, Duong MG, George KK (2016) A survey on mobile anchor
node assisted localization in wireless sensor networks. IEEE Commun Surv Tutor 18:2220–2242

31. Kurt H (1989) Multilayer feed forward networks are universal approximators. Neural Netw 2:359–366

32. Khawaja W, Guvenc I, Matolak D (2016) UWB channel sounding and modeling for UAV air-to-ground
propagation channels. IEEE Glob Commu Conf 2016:1–7

33. Khuwaja A, Chen Y, Zhao N, Alouini M, Dobbins P (2018) A survey of channel modeling for UAV
communications. IEEE Commu Surv Tutor 20:2804–2821

64
34. Popescu Dan et al (2018) A collaborative UAV-WSN Network for monitoring large areas. Sensors
(Basel) 18(12):4202

35. Villas Leandro A et al (2015) An energy efficient joint localization and synchronization solution for
wireless sensor networks using unmanned aerial vehicle. Wirel Netw 21(2):485–498

36. Annepu V, Rajesh A (2019) Implementation of an efficient extreme learning machine for node
localization in unmanned aerial vehicle assisted wireless sensor networks. Int J Commun Syst.
https://doi.org/10.1002/dac.4173

37. Annepu V, Rajesh A (2019) Implementation of self adaptive mutation factor and cross-over probability
based differential evolution algorithm for node localization in wireless sensor networks. Evolut Intell
12(3):469–478

65

You might also like