[ieee 2012 ieee 10th international new circuits and systems conference (newcas) - montreal, qc,...

4
An Approach to Localization Scheme of Wireless Sensor Networks Based on Artificial Neural Networks and Genetic Algorithms Stephan H. Chagas and Jo˜ ao B. Martins UFSM PPGI Santa Maria, Brazil [email protected] [email protected] Leonardo L. de Oliveira UFSM GMICRO Santa Maria, Brazil [email protected] Abstract— Localization of nodes in wireless sensor networks without the use of GPS is important for applications such as mi- litary surveillance, environmental monitoring, robotics, domotics, animal tracking, and many others. Low cost and energy efficient sensors require methods that compute their position using indi- rect information such as RSSI (Received Signal Strength Indi- cator). This work presents an artificial neural networks (ANNs) approach to localization in wireless sensor networks through the adjustment of the ANNs structures using Genetic Algorithms. A population of feedforward ANNs containing their structure in a genetic code is evolved during 20 generations. Each individual is evaluated through the training of the artificial neural network and further calculation of its root mean square error for all the testing set. The RSSI measurements were used as the artificial neural networks inputs to localize the nodes. The approach was tested using the MATLAB-based Probabilistic Wireless Network Simulator (Prowler) to collect the artificial neural networks input data, under simulated static indoor network environment of 26x26 meters with 8 anchor nodes, i.e., nodes with awareness of their positions. The MATLAB’s genetic algorithms and artificial neural networks toolboxes were used. Results using the best artificial neural network structure found after optimization had a root mean square error of 0.41 meters, a maximum error of 1.07 meters and a minimum error of 0.014 meters. I. I NTRODUCTION Due to several enhancements on sensing technology, em- bedded systems and wireless communication technologies, the wireless sensor networks (WSNs) field is experiencing an interest growth from the scientific community. The sensor nodes are now capable of operating with a 3 Volt DC coin- sized battery that can work for many years depending on the sample rate. Among other characteristics, these tiny sensors are portable, unobtrusive and can be easily integrated into small devices. There are many applications where these sensor nodes can be used, such as residential, commercial, industrial, medical and military. One of the most significant problems to be solved is the localization of network nodes without using Global Posi- tioning System (GPS) devices. In most cases, sensor nodes are low-cost small form factor equipment and therefore have several constraints related to computational power and energy consumption. In order to solve this problem, several localization schemes have been proposed in recent years [1]. The goal of a loca- lization scheme (or algorithm) is to estimate the coordinates of network nodes in a coordinate system. Several sources of information can be used to estimate the nodes location in a network. The schemes can use only connectivity information (content of the message which is exchanged among the nodes), only signal measurements, which is obtained by specific hard- ware modules (acoustic signal strength, RF signal strength, and others), or both connectivity and signal measurements. The source type of the input data used on the localization task usually determines the classification of the localization algorithm as range-free or range-based system. Range-free approaches are energy efficient, but are only suited for net- works with high connectivity. APIT [2] and Centroid [3] are examples of range-free localization schemes. The Range- based type does not require extra hardware and therefore is energy efficient and low cost. On this type, distance between nodes can be estimated using, for example, Time Difference of Arrival (TDOA) [4], Angle of Arrival (AOA) [5] and Received Signal Strength Indicator (RSSI) [6]. In addition to those, hybrid algorithms also can be implemented in order to seek improvements on the localization estimation. Despite of the plurality of localization schemes, few of them use the capabilities of machine learning algorithms (such as artificial neural networks) as their operating principle. Arti- ficial neural networks (ANNs) are interconnection structures between artificial neurons (also called nodes). The artificial neurons are modelled in order to mimic biological neurons through the use of activation functions. Each node has an activation function which is responsible for mapping the inputs of the neuron to its output. The way the artificial neurons connect to each other determines the artificial neural network structure. These connections are made through weights that are adjusted during the training procedure, which is performed by feeding the network with the correct answers for a set of inputs. This type of learning process is called supervised learning. When the answers provided by the artificial neural network are under a specific error limit, it is ready to be used. 978-1-4673-0859-5/12/$31.00 ©2012 IEEE 137

Upload: leonardo-l

Post on 11-Oct-2016

214 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: [IEEE 2012 IEEE 10th International New Circuits and Systems Conference (NEWCAS) - Montreal, QC, Canada (2012.06.17-2012.06.20)] 10th IEEE International NEWCAS Conference - An approach

An Approach to Localization Scheme of Wireless

Sensor Networks Based on Artificial Neural

Networks and Genetic Algorithms

Stephan H. Chagas and Joao B. Martins

UFSM PPGI

Santa Maria, Brazil

[email protected]

[email protected]

Leonardo L. de Oliveira

UFSM GMICRO

Santa Maria, Brazil

[email protected]

Abstract— Localization of nodes in wireless sensor networkswithout the use of GPS is important for applications such as mi-litary surveillance, environmental monitoring, robotics, domotics,animal tracking, and many others. Low cost and energy efficientsensors require methods that compute their position using indi-rect information such as RSSI (Received Signal Strength Indi-cator). This work presents an artificial neural networks (ANNs)approach to localization in wireless sensor networks through theadjustment of the ANNs structures using Genetic Algorithms. Apopulation of feedforward ANNs containing their structure in agenetic code is evolved during 20 generations. Each individual isevaluated through the training of the artificial neural networkand further calculation of its root mean square error for all thetesting set. The RSSI measurements were used as the artificialneural networks inputs to localize the nodes. The approach wastested using the MATLAB-based Probabilistic Wireless NetworkSimulator (Prowler) to collect the artificial neural networks inputdata, under simulated static indoor network environment of26x26 meters with 8 anchor nodes, i.e., nodes with awareness oftheir positions. The MATLAB’s genetic algorithms and artificialneural networks toolboxes were used. Results using the bestartificial neural network structure found after optimization hada root mean square error of 0.41 meters, a maximum error of1.07 meters and a minimum error of 0.014 meters.

I. INTRODUCTION

Due to several enhancements on sensing technology, em-

bedded systems and wireless communication technologies, the

wireless sensor networks (WSNs) field is experiencing an

interest growth from the scientific community. The sensor

nodes are now capable of operating with a 3 Volt DC coin-

sized battery that can work for many years depending on the

sample rate. Among other characteristics, these tiny sensors

are portable, unobtrusive and can be easily integrated into

small devices. There are many applications where these sensor

nodes can be used, such as residential, commercial, industrial,

medical and military.

One of the most significant problems to be solved is the

localization of network nodes without using Global Posi-

tioning System (GPS) devices. In most cases, sensor nodes

are low-cost small form factor equipment and therefore have

several constraints related to computational power and energy

consumption.

In order to solve this problem, several localization schemes

have been proposed in recent years [1]. The goal of a loca-

lization scheme (or algorithm) is to estimate the coordinates

of network nodes in a coordinate system. Several sources of

information can be used to estimate the nodes location in a

network. The schemes can use only connectivity information

(content of the message which is exchanged among the nodes),

only signal measurements, which is obtained by specific hard-

ware modules (acoustic signal strength, RF signal strength,

and others), or both connectivity and signal measurements.

The source type of the input data used on the localization

task usually determines the classification of the localization

algorithm as range-free or range-based system. Range-free

approaches are energy efficient, but are only suited for net-

works with high connectivity. APIT [2] and Centroid [3]

are examples of range-free localization schemes. The Range-

based type does not require extra hardware and therefore is

energy efficient and low cost. On this type, distance between

nodes can be estimated using, for example, Time Difference of

Arrival (TDOA) [4], Angle of Arrival (AOA) [5] and Received

Signal Strength Indicator (RSSI) [6]. In addition to those,

hybrid algorithms also can be implemented in order to seek

improvements on the localization estimation.

Despite of the plurality of localization schemes, few of them

use the capabilities of machine learning algorithms (such as

artificial neural networks) as their operating principle. Arti-

ficial neural networks (ANNs) are interconnection structures

between artificial neurons (also called nodes). The artificial

neurons are modelled in order to mimic biological neurons

through the use of activation functions. Each node has an

activation function which is responsible for mapping the inputs

of the neuron to its output. The way the artificial neurons

connect to each other determines the artificial neural network

structure. These connections are made through weights that are

adjusted during the training procedure, which is performed

by feeding the network with the correct answers for a set

of inputs. This type of learning process is called supervised

learning. When the answers provided by the artificial neural

network are under a specific error limit, it is ready to be used.

978-1-4673-0859-5/12/$31.00 ©2012 IEEE

137

Page 2: [IEEE 2012 IEEE 10th International New Circuits and Systems Conference (NEWCAS) - Montreal, QC, Canada (2012.06.17-2012.06.20)] 10th IEEE International NEWCAS Conference - An approach

In the field of artificial intelligence, the use of artificial neural

networks aims to provide solutions for specific tasks, such as

pattern recognition and nonlinear mapping.

The use of ANNs has been tested in WSN localization tasks

with good simulation results [7] [8] [9]. Their performance

for any application depends on the selection of its main

parameters: number of hidden layers, number of nodes per

layer and transfer functions. The previous approaches relied

only on the designer’s experience to choose these parameters

and therefore could not be easily applied to new situations.

This work proposes an artificial neural networks approach

to the localization problem with self-adjusting structure para-

meters. Using a population-based metaheuristic (genetic algo-

rithm) several structures of ANNs can evolve to the optimum

set of parameters for the problem. The evolution applied on the

ANNs uses techniques inspired by natural evolution, such as

mutation, selection, and crossover. This allows the solution to

be robust to various situations other than the initially predicted

by the network designer. The best structure found can be used

in MICAz motes for real world applications by replicating the

ANN and its parameters in the mote’s firmware.

The reminder of this work is organized as follows. In the

next section, some related work regarding localization with

and without the use of ANNs will be presented. Section III

will describe the simulation design, the instruments used in

this work and the results. This article is concluded in section

IV.

II. RELATED WORK

Some of the previous approaches to localization schemes

for WSNs are discussed in this section. As can be seen, only

a few of them use artificial neural networks in order to provide

learning functionality to the localization process.

The Active Badge Location System [10] is an indoor sensor

network used to localize a mobile node. This system was

only capable of localizing the room where the mobile node

was. The Active Badge Location System, which uses infrared,

was the base for the development of many other proposed

approaches in localizing nodes. Frequently, this system is

credited as one of the earliest implementations when talking

about localizing nodes at an indoor sensor network.

The Cricket location System [11] was developed by MIT

researchers and uses a combination of RF and ultrasound

technologies to make distance readings in order to localize

the nodes. The difference in propagation speeds between RF

(speed of light) and ultrasound (speed of sound) is the main

source of input data for distance calculating. Cricket System is

based on Extended Kalman filter, Least Square Minimization

(to reset the Kalman filter), and Outlier Rejection (to eliminate

bad distance readings).

RADAR location system [6] uses IEEE 802.11b WLAN

(Wireless Local Area Network) technology, and was proposed

by Microsoft Research. The operation of this system is based

on RSSI, which is used for determining distance between

AP (Acces Point) and mobile terminal. Then, the position is

calculated by triangulation using signal strength information

gathered at multiple receiver locations. The triangulation is

done with both an empirically-determined and a theoretically-

computed signal strength information.

Also using RSSI, [8] proposed a location system based

on artificial neural networks. The training data was obtained

from a grid sensor arrangement, where every sensor had its

own position awareness. As shown by the simulation results

using MATLAB, the location accuracy can be increased by

increasing the grid sensor density and the number of anchor

nodes.

Another approach using ANNs was developed in [9], and

also uses RSSI as the network inputs. The distance between

unknown nodes and anchors nodes could be used to feed the

artificial neural network inputs as well. The simulations were

conducted under MATLAB environment, and obtained results

indicate that this location system requires less anchor nodes to

get good accuracy levels compared to traditional localization

schemes. Furthermore, this proposed scheme is not affected

by the non-line-of-sight environment and the irregularity of

the transmitted radio power.

A localization performance comparison among some fami-

lies of artificial neural networks was done by [7]. The ANNs

families tested include Multi-Layers Perceptron (MLP), Radial

Basis Function (RBF) and Recurrent Neural Networks (RNN).

Also, two variants of the Kalman filter were addressed. The

testbed used was based on Cricket sensors from MIT, and

results indicated that Radial Basis Function are more accu-

rate when localizing nodes. However, Multi-Layer Perceptron

had the best trade-off between accuracy and computational

resource requirements.

While the previous approaches using ANNs needed hun-

dreds [9] or even thousands [7] artificial neurons to operate,

this work needs only 38 in this simulation. Due to the non-

deterministic nature of the process, this number could be

smaller in other occasion. Furthermore, unlike the previous

approaches, the best ANN selection is automated using a

metaheuristic.

III. SIMULATION DESIGN AND RESULTS

The goal of this simulation is to validate a metaheuristic

way to select the best suited structure of a feedforward

ANN to localize nodes in WSNs. Furthermore, this method

is able to be applied in several types of WSNs (real world

applications included) while simultaneously avoiding the slow

and designer-based trial and error procedure when selecting

the best ANN parameters.

All simulations made in this work were performed using

MATLAB from MathWorks and the WSN toolbox Prowler

[12], designed by Vanderbilt University. MATLAB is an

efficient tool for this type of simulation as it can combine

toolboxes in ANNs and optimization while still make use

of problem-specific tools such as Prowler. Although Prowler

provides a generic simulation environment, its current target

platform is the Berkeley MICA mote running TinyOS. It is

capable of simulating the behaviour of the devices, from the

application to the physical communication layer, taking into

138

Page 3: [IEEE 2012 IEEE 10th International New Circuits and Systems Conference (NEWCAS) - Montreal, QC, Canada (2012.06.17-2012.06.20)] 10th IEEE International NEWCAS Conference - An approach

account the nonlinear effects of the communication channel. It

is event driven and can be set to operate either in deterministic

or probabilistic mode. Prowler can operate simulating static

or dynamic topologies and have good visualization and cus-

tomization capabilities. Furthermore, it can have an arbitrary

number of nodes. In this simulation, Prowler was customized

to fit the Crossbow MICAz platform. The channel propagation

model used was the well-known log-normal shadowing path

loss [13], which is different from the Prowler’s default model.

The adopted model can be seen in (1), where L is the

attenuation for distance d, L0 is the loss on the reference

distance d0, γ is the path loss exponent and Xσ is a zero-

mean Gaussian random variable with standard deviation σ. The

values used in this simulation were extracted from empirical

measurements made in [14]. The reference distance was 0.1

meter with Pout = -25dBm, L0 is 30 dBm, γ is 2.5 and σ =

4.

L(d) = L0 + 10γlog10d

d0+Xσ (1)

The simulated scenario was an indoor squared area of 26x26

meters. A total of 8 anchor nodes were distributed on the edges

of the area. A set of 81 grid sensors with known positions were

used in order to collect training data for the ANNs. Random

positions for testing nodes could have been used. However, in

order to test ANNs against the worst case, a set of 64 nodes

uniformly placed inside the area covered by the training grid

was used. Fig. 1 shows the location of these motes.

Each of the training grid nodes collected a set of samples.

An input sample contains the RSSI, x and y position from

all of the anchor nodes. In the simulation environment, the

anchor nodes sent 30 beacons each, from which the first 10

were collected and saved by every training grid mote. This

resulted in a data set with 810 samples for training purposes.

The parameters of ANNs that were allowed to be modified by

the genetic algorithm were: number of hidden layers, number

of nodes on each hidden layer, transfer function of each hidden

layer. Table I shows the boundaries for each of these variables.

The optimization flow for the artificial neural network

structure can be seen in Fig. 2.

0 5 10 15 20 250

5

10

15

20

25

Distance (m)

Dis

tance (

m)

Training grid

Testing grid

Anchor Nodes

Fig. 1. Training set and testing set.

TABLE I

BOUNDARIES OF ARTIFICIAL NEURAL NETWORKS

STRUCTURE VARIABLES

Structure Parameter Range

Number of hidden layers [0-3]

Number of nodes per layer [1-16]

Transfer function for each hidden layer [tansig,logsig,purelin,radbas]

Fig. 2. Optimization flow for the ANN Structure using Genetic Algorithm.

The designer initially selects the boundaries of the parame-

ters of the ANNs, and then the genetic algorithm creates a

population of solutions uniformly distributed from the lower

to the upper boundaries. For each of the proposed solutions,

a feedforward artificial neural network is created, trained and

tested to evaluate how well its structure is performing. The

evaluation is done by calculating the root mean square error

(RMSE) between the real position and the estimated position

for all the testing samples. The formula used for the RMSE

calculation can be seen in (2), where n is the number of testing

nodes, xi and yi are the real node coordinates, xi and yi are

the estimated node coordinates and i is the node index.

RMSE =

1

n

n∑

i=1

[(xi − xi)2 + (yi − yi)2] (2)

Table II shows the configuration used for the genetic algo-

rithm optimization method.

All simulations and optimizations were done using an Intel

Core i3 3.1 GHz and 4Gb of RAM memory. Total processing

time for the 20 generations was about 240 minutes. After

all generations were completed, the best ANN structure was

TABLE II

GENETIC ALGORITHM CONFIGURATION PARAMETERS

Parameter Value

Population Size 50

Number of generations 20

Elite Count 1

Crossover rate 0.8

Mutation rate 0.1

139

Page 4: [IEEE 2012 IEEE 10th International New Circuits and Systems Conference (NEWCAS) - Montreal, QC, Canada (2012.06.17-2012.06.20)] 10th IEEE International NEWCAS Conference - An approach

0 5 10 15 20 250

5

10

15

20

25

Distance (m)

Dis

tan

ce

(m

)

Unknown Nodes

Estimated Positions

Anchor Nodes

Fig. 3. Estimated positions and real positions for the testing data set.

510

1520

510

1520

0

0.5

1

X space (meters)Y space (meters)

err

or

(me

ters

)

Fig. 4. Location error for testing sensors positions.

found. It can be seen in Table III. The results using the

best structure had a root mean square error of 0.41 meters,

a maximum error of 1.07 meters and a minimum error of

0.014 meters. The real positions and estimated positions for

this test are illustrated in Fig. 3. The localization error obtained

is plotted as a function of the position in Fig. 4.

IV. CONCLUSION

This paper presented an approach to localization scheme for

WSNs using artificial neural networks as the machine learning

algorithm and genetic algorithms to select the best ANN

structure. A population of ANNs containing their structure

in a genetic code is evolved during 20 generations in order

TABLE III

BEST ANN FOUND AFTER OPTIMIZATION

Parameter Value

Number of hidden layers 2

Number of nodes on input layer 6

Number of nodes on hidden layer 1 14

Number of nodes on hidden layer 2 14

Number of nodes on output layer 2

Transfer function on input layer purelin

Transfer function on hidden layer 1 tansig

Transfer function on hidden layer 2 logsig

Transfer function on output layer purelin

to select the best parameters for a particular simulated WSN.

The method was tested in an indoor simulation environment

of 26x26 meters with 8 anchors. Results using the best ANN

structure had a RMSE of 0.41 meters, a maximum error of 1.07

meters and a minimum error of 0.014 meters. The optimization

was performed in approximately 240 minutes. The results

indicate that this approach is effective and can be used as

a way to reduce the dependency of the designer’s experience

when selecting the ANN parameters. Aiming field application,

the input data for training ANNs can be acquired via MICAz

motes. After optimization execution in a computer, the selected

ANN and its parameters (transfer functions, number of hidden

layers and nodes per layer) can be replicated on motes’

firmware.

REFERENCES

[1] S. Jauregui and M. Siller, “A big picture on localization algorithmsconsidering sensor logic location,” in Systems, Man and Cybernetics,

2009. SMC 2009. IEEE International Conference on, oct. 2009, pp. 734–739.

[2] T. He, C. Huang, B. M. Blum, J. A. Stankovic, and T. Abdelzaher,“Range-free localization schemes for large scale sensor networks,” inProceedings of the 9th annual international conference on Mobile

computing and networking, ser. MobiCom ’03. New York, NY, USA:ACM, 2003, pp. 81–95.

[3] N. Bulusu, J. Heidemann, and D. Estrin, “Gps-less low-cost outdoorlocalization for very small devices,” Personal Communications, IEEE,vol. 7, no. 5, pp. 28 –34, oct 2000.

[4] X. Cheng, A. Thaeler, G. Xue, and D. Chen, “Tps: A time-basedpositioning scheme for outdoor wireless sensor networks,” in IEEE

INFOCOM, 2004, pp. 2685–2696.[5] D. Niculescu and B. Nath, “Ad hoc positioning system (aps) using aoa,”

in INFOCOM 2003. Twenty-Second Annual Joint Conference of the

IEEE Computer and Communications. IEEE Societies, vol. 3, march-3 april 2003, pp. 1734 – 1743 vol.3.

[6] P. Bahl and V. N. Padmanabhan, “Radar: an in-building rf-based userlocation and tracking system,” 2000, pp. 775–784.

[7] A. Shareef, Y. Zhu, and M. Musavi, “Localization using neural networksin wireless sensor networks,” in MOBILWARE’08: Proceedings of the 1st

international conference on MOBILe Wireless MiddleWARE, Operating

Systems, and Applications. Brussels, Belgium: ICST, 2007, pp. 1–7.[8] M. S. Rahman, Y. Park, and K.-D. Kim, “Localization of wireless

sensor network using artificial neural network,” in Proceedings of

the 9th international conference on Communications and information

technologies, ser. ISCIT’09. Piscataway, NJ, USA: IEEE Press, 2009,pp. 639–642.

[9] J.-P. Tian and H.-C. Shi, “Study of localization scheme base on neuralnetwork for wireless sensor networks,” in Wireless, Mobile and Sensor

Networks, 2007. (CCWMSN07). IET Conference on, dec. 2007, pp. 64–67.

[10] R. Want, A. Hopper, V. Falcao, and J. Gibbons, “The active badgelocation system,” ACM Trans. Inf. Syst., vol. 10, pp. 91–102, Jan. 1992.

[11] A. Smith, H. Balakrishnan, M. Goraczko, and N. B. Priyantha, “TrackingMoving Devices with the Cricket Location System,” in 2nd International

Conference on Mobile Systems, Applications and Services (Mobisys

2004), Boston, MA, June 2004.[12] G. Simon, P. Volgyesi, M. Maroti, and A. Ledeczi, “Simulation-based

optimization of communication protocols for large-scale wireless sensornetworks,” in Aerospace Conference, 2003. Proceedings. 2003 IEEE,vol. 3, 8-15, 2003, pp. 1339 – 1346.

[13] T. Rappaport, Wireless Communications: Principles and Practice,2nd ed. Upper Saddle River, NJ, USA: Prentice Hall PTR, 2001.

[14] A. Barberis, L. Barboni, and M. Valle, “Evaluating energy consumptionin wireless sensor networks applications,” in Digital System Design

Architectures, Methods and Tools, 2007. DSD 2007. 10th Euromicro

Conference on, aug. 2007, pp. 455 –462.

140