A network of small,
low cost sensor nodes with basic functionality, spread out in an area for
sensing specific parameters of the environment and with wireless links is
generally termed as a Wireless sensor network (WSN). Each node in a WSN usually
consists of an independent power source, a sensor unit, a transceiver unit and
a processing unit making each wireless sensor node autonomous. This enables
large scale distribution of these nodes over larger areas for better and faster
data gathering. Recent technological advances have made manufacture of small,
low cost sensors nodes technologically and economically feasible 1.
Characteristics of WSN, like mobility of nodes, ease of addition
or removal nodes to the network, heterogeneity of the nodes and ability to cope
with node failure, have ensured a wide range of application of wireless sensor
networks. Precision Agriculture,
Environmental Monitoring, Vehicle Tracking, Health care Monitoring, Smart
Buildings, Military Applications, Animal Tracking are few applications of WSNs
2. The information gathered by the wireless sensor nodes, in certain
applications, becomes useful only when locations from where the data has been
collected is known. Hence, Localisation of wireless sensor nodes is equally
important as sensing, especially for applications like tracking intruders in
battlefield, locating objects in building, self-driven cars and emergency
response applications 3.
algorithms have been developed for localization of nodes in a WSN. Global
Positioning System (GPS) is currently the most commonly used positioning
systems in the world 4. However, GPS cannot be used in applications where the
wireless sensor nodes are small and it is not feasible to configure each node
with GPS and in applications where the nodes are spread out in indoors and are
heavily dense. Hence many other algorithms are used for such situations. These
algorithms can be broadly classified into Range based and Range free algorithms.
Time of Signal Arrival (TOA), Time Difference of Signal Arrival (TDOA), Angle
of Arrival and Received Signal Strength Indicator (RSSI) are few range based
localization algorithms. RSSI based localisation is more popular because it is
simple and does not require any sophisticated hardware 5.
Unlike in outdoor,
localization parameters would not remain constant in complex indoor
environments. The wireless signal is more severely affected by multipath error,
diffraction, obstacles, the direction of antennas and other factors 6.
Because of these, a huge amount of noise would be added to RSSI and would result
in error in localization. To reduce the error, feedback error control using
multiplicative distance-correction factor, Time Window Statistics, UWB Ranging and other techniques are used
789. However, all these techniques increase the computational time
required for localization.
In this paper, we discuss how the error in localization of nodes can be
reduced with help of neural networks. We first train the neural network in our
environment and then use this trained neural network for error correction. We
also compare the performance of localization with different parameters.
Estimating distance from RSSI
RSSI based localization
algorithms estimate the distance of a node from a given node, which transmits a
signal, by measuring the power of the signal received by the receiving node.
The node which transmits the signal are static and are aware of their location.
These nodes are called anchor nodes or beacon nodes. If the power received by a
node which is at a given distance from an anchor node is known, then the power
at a distance d is given as follows
Where Pr is the power received at a
distance d from the anchor node, A is the power received at a unit
distance from the anchor node and np
is the transmission factor whose value describes the environment and
is different from place to place. The parameters A and np are
constant over a given area for outdoor environment, but they vary considerably
over short distances in an indoor environment. Hence, for indoor localization,
the environment has to divided into smaller areas over which the parameters A and np can be considered constant. Each area would have a
different value for the parameters and can be estimated experimentally 4.
Once the parameters A and np are known, the distance of
a node from the anchor node by the following equation:
Predicting the location with the measured distances.
To predict the
location of a node, in a two-dimensional area, distances has to be measures
from at least three anchor nodes which do not fall in the same line. With the
locations of these anchor nodes, location of the node is the point of
intersection of the three circles, drawn with the anchor nodes as centre and
radius equal to the distances of the node from the anchor nodes. If (xa, ya), (xb,
yb) and (xc, yc) are the coordinates of three anchor nodes and da, db, dc
are the distances of a node from these anchor nodes respectively, then the
coordinates of the node (x, y) is estimated by solving the equations:
In case of a
three-dimensional localization, distances of the node from 4 anchor nodes,
which do not fall on the same plane has to be measured. Location can be
estimated by finding the intersection of the four spheres formed from the
Considering effects of noise.
Due to the presence
of noise in the signals, randomness in the indoor environment and other factors
introduce error in the distances measured by the nodes and the location data
sent by the anchor nodes. Due to these errors, the constant distance circle
from the anchor nodes a, b and c may not meet at a common point as shown in
fig1. Which means the equations may not have a single point solution. Hence, we
estimate the location to the point of intersection of lines l, m
and n, which are lines obtained by
connecting the points of intersection of a pair of circles. Equations of l, m
and n can be obtained by taking the
difference of equations 4 3, 5 4 and 3 5 respectively. Solving the so obtained
equations would give the estimated location of the node 10.
Neural networks, usually
has a finite number of discrete outputs, even when the input is continuous. The
number of outputs is equal to the number of nodes in the last layer. But for
correcting the error in localization, the output has to be continuous. Using
neural networks with regression helps us to obtain a continuous output from the
neural network. In neural networks with regression, the values in the final
layer is fed into another layer with a single node, after being multiplied by
the weights. The value of this node is treated as output, having continuous values.
This network can be
trained and the neuron values and connection weights can be manipulated during
the training phase. Once trained, these networks can be used to obtain required
Error correction using neural networks
Presence of noise, Randomness of the environment, obstacles
and other factors make sure that in an indoor environment the localization
results are erroneous most of the time. Using neural networks, the error in the
localization result can be reduced drastically. In this paper, we build a
simple feedforward neural network with regression. We train the network by
feeding it with inputs and desired outputs. These input output data are results
of RSSI based localization. Once trained, Results of localization can be passed
through this network to get highly accurate results.
A feedforward network is initialized
with required number of hidden layers, inputs and outputs. The weights of links
in the network are initialized to any random value. The outputs of this network
are connected to a single node for getting a continuous output.
For training the neural networks,
few wireless sensor nodes are uniformly spread in the environment, placed at
known locations. Localization results of these nodes are computed. These computed
values are given to the neural network as input and the corresponding actual
locations are given as desired outputs. An input to the network propagates in the
forward direction and produces an output. This output is compared with the
desired value and the error in the computed value is recorded. With the desired
output, the neural network is traced back manipulating the weights of the intermediate
connections so that the desired output is obtained for that particular input. This
process is continued for all the other values in the training data set,
completing one epoch. If the average error is greater than a prefixed
threshold, another epoch of training occurs, till the average error is at
desired levels. After training, the neural network is tested and validated with
two other sets of data. After training, testing and validation the neural
network is ready to be deployed.
The results of localization are
fed into this neural network. The output would be the error corrected output.
The amount of error correction depends on the number of hidden layers and
number of training nodes dedicated. More the number of training nodes, better
would be the performance of the neural network. However, the training time
would increase proportionately with the number of training nodes. A trained neural network would help in error
control without any additional requirements until there is drastic change in
the environment. Under such circumstances the network has to be trained again
for correct functioning.
Simulation and Results
To demonstrate and
verify the usefulness of neural networks in error control, simulations were
carried out in MATLAB and the results would be discussed in this section.
The simulation area is
a 10m by 10m square, with four beacon nodes at four corners. Wireless sensor
networks would be randomly distributed within this area. Noise is added to the
RSSI signal with SNR 20dB. The A and np values are taken as -20dB
and 1.6 respectively. The effects of obstacles in indoor environment is
simulated by adding the errors to anchor nodes. Training nodes are deployed for
training the networks which would be used for error correction in nodes.
Fig.3 shows the
average error on localization, without and with error correction using neural
networks. 10 nodes were simulated and error correction was made with the help of
a network trained with 100 nodes. It can be seen that, with help of neural networks,
the error can be reduced to a level where it can be negligible.
In Fig.4 the
variation in the average error with the number of training nodes is shown. We
can see that with the increase in the number of training nodes, the average error
Fig.5 shows that
variation in average error with the number of hidden layers in the neural
network. The average error first decreases then increases slightly and then
reduces again. Fig.6 Shows the simulation results.
In this paper, we
discussed how neural networks can used to improve the performance of indoor
localization algorithm based on RSSI. We discussed how RSSI values can be used to
determine the coordinates of a node, sources of errors during estimation and
how neural networks are used to reduce this error. We also discussed hoe to
develop the neural network by training them. We also discussed about the
simulation and results, how the performance changes with variation in different
parameters. Further, error correctio In the future are Neural networks do not
take much additional computational time or power, all they require is training
prior to deployment. Neural networks are able to reduce the error significantly
as they are non-linear. They are able to compute the output quickly as they compute
the output parallelly.