Vous êtes sur la page 1sur 9

Cluster Head Election Using WSN

Kevin Driver, Russell Glasser, Oswin Housty


December 7, 2006
University of Texas, Austin, TX, USA
Abstract:
Wireless microsensor networks have been ienti!ie as one o! the most im"ortant
technolo#ies !or the 2$st century% &he iea o! creatin# an automate network o!
intelli#ent a#ents that can interact with their environment an re"ort unusual conitions
has stimulate the ima#ination o! com"uter scientists everywhere%
However, it is wiely known that sensor networks are i!!icult to "ro#ram an even
harer to ebu#, ue to the istribute nature o! the network an the limite out"ut
resources an means o! interaction o! the evices themselves% We have ecie that
creatin# a rich #ra"hical simulation woul be an e'cellent !irst ste" in alleviatin# these
"roblems% &his simulation woul allow evelo"ers to irectly observe the entire
environment at once, while also "roviin# access to all the ebu##in# tools o! a moern
com"iler environment%
(n this "ro)ect, we have create a simulation with a #ra"hical user inter!ace in *ava% Our
"ro#ram attem"ts to mi' the simulation o! communication an routin# "rotocols amon#
sensors with virtual re"resentations o! a real worl ob)ect, such as the sensors an other
entities in the environment%
Introduction:
(n our simulation, each sensory evice is moele as a se"arate ob)ect runnin# in its own
threa% +lements o! the environment are moele as aitional ob)ects, an the sensors
may ,uery as"ects o! the environment base u"on their "hysical "osition an sensor ty"e
to etermine in!ormation about environmental ob)ects% +lements moele by our
simulation inclue the !ollowin#-
Routin# al#orithms
&rackin# tar#ete ob)ects
Detection an alertin# o! anomalous conitions
We base the behaviors on al#orithms "resente in e'istin# "a"ers on sensor networks%
We have constructe a Gra"hical .ser (nter!ace that has three "hases% (n the setu" "hase,
the user selects various ty"es o! sensor a#ents, such as vibration, li#ht, soun, etc% .sers
create instances o! these a#ents by clickin# on the area ma"%
(n the simulation "hase, routin# "aths amon# the sensors are set u" an visually
is"laye, an sensors which notice unusual events mi#ht chan#e color%
(n the re"lay "hase, the inter"olate "ath o! an anomaly throu#h the environment is
#ra"hically is"laye%
Motivation:
Our #oal is to simulate not only a sensor network, but also the "hysical environment in
which it o"erates% We reviewe several sam"les o! e'istin# literature to etermine
whether anyone ha "reviously attem"te this kin o! "ro)ect% /or etails, see the
0Relate work1 section% We !oun that there were several "acka#es !or simulatin#
wireless networks, but in #eneral they seem to rely on e'ternal in"ut !or the si#nals that
woul occur in a real worl environment%
(n a time when "hysics stuents are hire to make increasin#ly realistic #ames, we see no
reason why the "hysical events in a ty"ical environment shoul not also be simulate%
One avanta#e o! this a""roach is that a evelo"er coul essentially create any event that
he or she wishes to test, without #oin# throu#h the trouble o! "urchasin# 2!or e'am"le3
real tanks an air"lanes to etect% 4 robust system woul, o! course, be ca"able o!
switchin# between in"ut !rom a simulate ob)ect an real ata retrieve !rom sensors%
5roviin# a state o! the art "hysics simulation is obviously beyon the sco"e o! this
"a"er6 we are only concerne here with moelin# an is"layin# a sim"le worl
simulation%
&he #oal !or the sensor network routin# "rotocol moele was to achieve low messa#e
overhea, scalability an a relatively sim"le im"lementation% &hese #oals allow our
simulation to accurately moel a real worl sensor network routin# "rotocol% We
consiere three ty"es o! sensor network "rotocols, 07ulti8ho" routin# "rotocols1, 09one
:ase routin#1 an ;ow +ner#y 4a"tive <luster Hea routin# "rotocol 2;+4<H3 =$>%
O! these, the ;+4<H "rotocol was the most suitable !or our im"lementation% /or more
etails, see the 0Relate work1%
Architecture:
We create the !ollowin# class hierarchy-
Figure 1: Class Hierarchy
Our "hysical worl is re"resente by the +nvironment class, which serves as an all8seein#
observer% &he environment contains all instances o! 0+ntities1, which are our term !or
any ob)ect that has a s"atial location% &he car starts in a !i'e location6 the 7onitor is an
omniscient +ntity not re"resente on the screen6 all sensors are create ynamically by
the user a!ter the "ro#ram starts%
Middleare E!tensibility:
&he esi#n #oals !or the "ro)ect inclue the ability to have our simulation !ramework be
a""licable to is"arate unerlyin# sensor networks% 7any measures were taken in orer
to ensure mileware "ortability o! the coe, an this "ays iviens to the simulation
technolo#y as a whole%
4n elaborate an hi#hly e'tensible hierarchy, as escribe above, sets a "receent by
incor"oratin# robust, e'tensible !unctionality at i!!erent levels o! the 45(, allowin# !or
intuitive an ra"i evelo"ment% ?ensors natively su""ort mana#ement o! nei#hbors%
&his allows !or s"eci!ic ?ensor subty"es to be im"lemente easily which have innate
nei#hbor8relational !unctionality% One level above them, @oes inclue abstractions !or
messa#in# A senin#, hanlin#, en,ueuin# an e,ueuin#% &his layer allows !or the
abstraction o! i!!erent networkin# "rotocols an services as well as the messa#e ty"es
an !ormats that are sent between network noes% ?ome ar#ue that "ublish subscribe
moel !or mileware is more relevant, an our moel is in line with this statement =2>,
yet also su""orts abstraction o! more traitional (58base communication% /inally the
+ntity inclues basic location in!ormation, which is a common to nearly every element o!
the simulation an shoul be very use!ul to other im"lementations usin# this mileware%
:ecause o! these relations, our coe lens itsel! si#ni!icantly to reuse, encoura#es other
"rotocols to be teste, an allows !or the "artici"ants in the simulation to be altere
anBor e'tene in orer to evelo" vastly i!!erent simulation scenarios%
"ra#hical $e#resentation:
Figure %: &rogra' e!ecution
&he "ro#ram runs in three "hases- $% ?ensor "lacement, 2% 7ovement trackin#, C%
7onitor re"lay%
Durin# the !irst "hase, the user may click the screen anywhere to create new sensors% &he
ty"e o! sensor create e"ens on the o"tion selecte in the ro" bo'%
Durin# the secon "hase 2see !i#ure 23 noes are )oine in clusters via the ;+4<H
"rotocol, an the user can move the 0car1 aroun the screen by clickin# anywhere on the
is"lay area% 4s the car rives aroun, nearby sensors li#ht u" to inicate that they have
etecte a 0"ro'imity violation1% &he sensors transmit "ro'imity violations to the
7onitor%
Durin# the thir "hase, the 7onitor uses the messa#es collecte to re"lay the "ath taken
by the car in "hase two% &he ?ensor reain#s are re"resente by a series o! oran#e circles
re"resentin# the istance inter"rete via volume, vibration, an li#ht intensity%
&he sensors are moele as threas, so each one e'ecutes ine"enently o! the others%
&he only communication they have with each other is throu#h a sim"le messa#e "assin#
moel% When a @oe wishes to transmit a messa#e, it calls the metho 0sen7s#1,
which re,uires as in"uts a hanle on another @oe an a ?trin# to transmit% 2We i not
moel raio broacasts, so we have sim"li!ie by assumin# that @oes can ienti!y other
noes within a limite raius%3 ?ince the real worl woul involve some la# between the
time a messa#e is sent an the time it is receive, a @oe which receives a messa#e oes
not "rocess it immeiately% (nstea, the messa#e is "lace in a ,ueue, an one messa#e is
e,ueue on each 0tick1 2currently set at $00 millisecons3%
?ensor reain#s are "rovie via the +nvironment ob)ect% /or instance, when a
?oun?ensor is "olle to check its volume level, it ,ueries a metho in the +nvironment
to see what it can hear% &he +nvironment checks location o! the <ar 2which is currently
the only noisy +ntity in the simulation3 an then a volume level in ecibels can be
calculate% 4 similar "rocess occurs !or a Dibration?ensor or ;i#ht?ensor%
Si'ulated Sensor Netor(:
&he sensor network we simulate enables communication by or#aniEin# sensors into
clusters that "ass messa#es to a centraliEe cluster8hea% 4 cluster is a collection o! noes
or#aniEe by "ro'imity to sen messa#es to a central "oint 2cluster8hea3% 4 cluster8hea
is a noe that has been ienti!ie by other noes to !orwar messa#es to a base station%
4!ter or#aniEation, the cluster8heas stay awake to receive messa#es !rom cluster
members% &he other cluster members wake "erioically to check !or a "ro'imity
violation%
&he sensor network consists o! three main "arts- cluster8hea election, cluster !ormation
an messa#e communication%
<luster8hea election takes "lace urin# 0?imulation 5hase1% ?ensors elect a cluster8hea
by calculatin# the istance 2cluster raius3 between its "osition an other sensor noes% (!
a noe is within the cluster raius, it is consiere as "art o! the same cluster% (! the
sensor is "art o! the same cluster, the current cluster8hea ienti!ication is com"are
a#ainst the new sensorFs ienti!ication% (! the new sensor has a lower ienti!ication, it is
consiere to be the cluster8hea%
<luster !ormation is only carrie out by cluster8heas% (! a sensor ienti!ies itsel! as a
cluster8hea, it searches throu#h the list o! sensor noes to ienti!y cluster members% &his
is one by calculatin# the cluster raius between the cluster8hea an each sensor% (! a
sensor is less than the cluster raius, it is ae to the cluster% ?ensors o not carry a list
o! other cluster members6 they only ienti!y the cluster8hea%
7essa#e communication in the sensor network is etermine by the ty"e o! sensor noe
initiatin# the communication% (! a sensor etects an intruer, it initiates communication
by senin# an intruer etection messa#e to its cluster8hea% On receivin# the messa#e
!rom the sensor, the cluster8hea !orwars the messa#e to the monitor% (! the cluster8hea
etects an intruer, it sens an intruer etection messa#e irectly to the monitor%
Monitoring the Environ'ent:
Our subset o! ;+4<H em"loys cluster8heas to re"ort in!ormation, in the !orm o!
messa#es, about the state an "ro"erties o! the environments an ob)ects within% With
the cluster8heas su""lyin# this in!ormation, ;+4<H ty"ically has a 0:ase ?tation1 or, in
our case, a 7onitor to "rocess, recor, store, an ,uery messa#es an events #enerate in
the system% &he 7onitor we im"lement receives messa#es !rom the cluster8heas,
"rocesses them, an stores the in!ormation in such a way that it is "ossible to recreate the
state o! the environment in #iven 0sna"shots1 thus allowin# the strikin# water8ro" e!!ect
o! watchin# the rin#s show u" aroun the sensors in "hase C% 4#ain, throu#h the robust
architectin# o! our sensor network moelin# mileware, we are able to e!ine this
7onitor 2an even the 0tar#et1 traversin# the environment3 in terms o! @oes an
+ntities% We believe this to be a minute e'am"le o! the "otential environmental
monitorin#Btar#et moelin# "ossible%
)rac(ing an Ano'aly:
:uilin# on the stren#ths o! each layer in our !ramework, an lastly the 7onitor, it is
now "ossible to recreate the "ath o! an anomaly throu#h the environment% 4s the
7onitor receives messa#es !rom the cluster8heas noti!yin# it o! activity, it then ,ueries
the s"eci!ic sensor ty"es which are members o! the cluster !or their res"ective reain#s o!
vibration, ecibel8level, an luminosity% :ase on these reain#s, the 7onitor is able to
a""ly sim"le "hysics calculations to convert the reain#s into a measure o! a""ro'imate
"ro'imity% (t stores these 0bli"s1 an their raii into a ata structure to lo# successive
movements o! the anomaly throu#h the environment% &his is somewhat relate to the
"a"er on tar#et trackin# al#orithms in that our anomaly can be ranomly 0riven1
throu#h the environment an is recore as it oes so% 7ore about these al#orithms can
be !oun in the section on 0Relate Work%1 Our moel oes not account !or multi"le
tar#ets or !alse8alarm etection6 however we have not observe any irect evience o!
!alse alarms in our simulations%
Conclusion:
Our simulation oes inee succee at the challen#es it set out to aress% Our sensor
network simulation "rovies 45(s which enable ra"i sensor network evelo"ment, an
the #ra"hical toolin# enables real8time visual ebu##in#% (t is our belie! that the
architecture o! this "rouct is su!!iciently in the realm o! e'tensibility an aa"tability
that it !orms a valuable !ramework !or evelo"ment o! sensor network simulations !or all
ty"es o! environmental anomalies, network "rotocols, an noe ty"es%
Future or(:
Here are some ieas !or ways that this "ro)ect coul be e'tene in the !uture-
7ore realistic "hysics shoul be em"loye in the simulation, incluin# better
moelin# o! how soun an vibrations work, etc%
7ore than one ob)ect coul be tracke at once, or three8imensional trackin# o!
!lyin# ob)ects such as "lanes%
:attery li!e o! non8wire noes%
+'tensibility to allow !or i!!erent routin# al#orithms%
Our simulation o! the ;+4<H "rotocol mae some attem"t to moel the !act that
sensors have limite communication ran#e6 however, they are allowe to !reely
communicate with the 7onitor !rom any location% 4 more thorou#h simulation o!
this or other "rotocols woul have re,uire a network "ath to a base station, rather
than a isemboie monitor which all cluster8heas can reach irectly%

$elated or(:
)arget )rac(ing Algorith's
&he 0hierarchical multi"le trackin# 4l#orithm1=C> im"lemente ranomiEation o! tar#ets
an !ocuse on trackin# multi"le tar#ets% &he al#orithm took !alse alarms an noise into
consieration !or a more realistic a""lication% &he esi#n was scalable, autonomous, an
su""orte low communication% &he al#orithm use a wei#hte sum in con)unction with a
shortest "ath calculation% 4ll ata was sent to 0su"er8noes1 that were use to convey
in!ormation% &his im"lementation is similar to our a""roach, but oes not im"lement
clusters%
Netor( Si'ulators
We consiere three e'istin# e'am"les o! sensor network simulations- &O??(7, *8?im,
an 5tolemy ((% While these "ro)ects containe im"ortant ieas, none o! them were
concerne with the #oal that we were tryin# to accom"lish% (n their own wors-
TOSSIM -
0&O??(7 ca"tures the behavior an interactions o! networks o! thousans o!
&inyO? motes at network bit #ranularityG &he &O??(7 architecture is
com"ose o! !ive "arts- su""ort !or com"ilin# &inyO? com"onent #ra"hs into the
simulation in!rastructure, a iscrete event ,ueue, a small number o! re8
im"lemente &inyO? harware abstraction com"onents, mechanisms !or
e'tensible raio an 4D< moels, an communication services !or e'ternal
"ro#rams to interact with a simulation%1=H>
Ptolemy II -
0&he 5tolemy (( "ro)ect stuies hetero#eneous moelin#, simulation, an esi#n
o! concurrent systems% &he 5tolemy (( so!tware has the ability to moel com"le'
systems throu#h a sim"le actorBcom"onent base user inter!ace%1=6>
&hese two a""lications were esi#ne to moel communication within a network, but o
not moel "hysical ob)ects in the real worl% &O??(7 oes allow e'ternal in"ut to
hanle simulate "hysical ob)ects, but oes not "rovie its own metho !or moelin#
these ob)ects% 5tolemy simulates sensor noes at a very low level, ealin# with "orts an
battery li!e% Our im"lementation is not concerne with the low level behavior o! the
sensor noes% (nstea, we are workin# at a level that mi#ht best be escribe as
mileware%
&he "a"er on *8?im=7> oes mention several scenarios where tar#et trackin# is moele,
but in each case they rely on in"ut ca"ture !rom vieo or other re"resentations o! real
events%
Sensor Netor(s
(n constructin# the simulation environment, we consiere three sensor network routin#
"rotocols- 07ulti8ho" routin# "rotocols1, 09one :ase routin#1 an ;ow +ner#y
4a"tive <luster Hea routin# "rotocol 2;+4<H3 =$>%
Multi-hop routing protocols or static clustering -
&he 07ulti8ho" routin# "rotocols or static clusterin#1 =I, J> use clusters to broacast
in!ormation about ener#y to static members o! the cluster% We !oun that this
im"lementation was not very scalable, so we coul not moel lar#e sensor networks%
one !ase" routing -
&he 09one :ase routin#1 =I, $0> is a hierarchical a""roach to routin# in sensor networks
which #rou"s noes into #eo#ra"hic Eones to control routin#% (t uses ener#y estimation
base on ata transmission irection% &his im"lementation was not chosen because
#eo#ra"hic networks were not bein# simulate%
#$A%& -
&he ;+4<H routin# "rotocol was esi#ne to save "ower by ranomiEin# the ener#y
istribution in sensor networks% &he sensor noes !orm 0clusters1 an elect a 0cluster8
hea1 base on "robability% We !oun this "rotocol most suitable to our im"lementation%
(t "rovie low messa#e overhea, scalability, an was easy to simulate% Our
im"lementation i!!ers !rom ;+4<H because we o not simulate ener#y consum"tion or
the ranomiEation o! cluster8heas% &his a""lies most irectly to sensor networks with
wire sensors% Otherwise it aheres to ;+4<H, in that we im"lement similar cluster8hea
election, cluster !ormation, an cluster communication%
$e*erences:
=$> HeinEelman , Weni6 <hanrakasan, 4nantha6 :alakrishnan, Hari- ;ow +ner#y8
+!!icient <ommunication 5rotocol !or Wireless 7icrosensor @etworks% Massachusetts
Institute of Technology, %am'ri"ge(
=2> <u#ola, G6 *acobsen, H4% 0.sin# "ublishBsubscribe mileware !or mobile
systems%1 4<7 ?(G7O:(;+ 7obile <om"utin# an <ommunications Review, 2002%
=C> Oh, ?on#hwai an ?astry, ?hankar% A hierarchical multiple trac)ing Algorithm for
Sensor net*or)s( :erkeley <4, *an 200H% htt"-BBwebs%cs%berkeley%euBretreat8$8
0HBsliesBson#hwaiKoh8hmttKnest8retreat0H%""t
=H> ;evis, 5hili"6 ;ee, @elson6 Welsh, 7att6 an <uller, Davi% TOSSIM+ Accurate an"
Scala'le Simulation of $ntire TinyOS Applications(
htt"-BBwww%cs%berkeley%euBL"alB"ubsBtossim8sensys0C%"!
=M> ;evis, 5hili" an ;ee, @elson% TOSSIM+ A Simulator for TinyOS ,et*or)s(
htt"-BBwww%cs%berkeley%euBL"alB"ubsBnio%"!
=6> :alwin, 5hili" *% Sensor net*or) Mo"eling an" Simulation in Ptolemy -( :erkeley
<4, 4u# 200C% htt"-BBchess%eecs%berkeley%euB"ro)ectsB(&RB200CB:alwin5a"er%"!
=7> 4hme ?obeih, Wei85en# <hen, *enni!er <% Hou, ;u8<huan Kun#, @in# ;i, Hyuk
;im, Hun#8Nin# &yan, an Hon#hai 9han#% .-Sim+ A Simulation an" $mulation
$nvironment for /ireless Sensor ,et*or)s
htt"-BBwww%)8sim%or#Bv$%CBsensorB*?im%"!
=I> Kyatham, Ra#havenra% Algorithms in sensor net*or)s(
htt"-BBran#er%uta%euBL#asB<oursesB/all200HBav4l#osB!inal5resentationsBRa#havenraK
4l#orithmsO20inO20sensorO20networks%""tP2M6
=J> Woo, 4le6 &on#, &errence6 <uller, Davi% Taming the un"erlying %hallenges of
0elia'le Multihop 0outing in Sensor net*or)s% :erkeley <4, 4<7 200C%
htt"-BBwww%cs%berkeley%euBLawooBsensysKawoo0C%"!
=$0> ;i, Qun6 4slam, *ave6 Rus, Daniella% &ierarchical Po*er-a*are 0outing in Sensor
,et*or)s
Rut#ers .niversity, 7ay 2$, 200$%
htt"-BBwww%cs%wm%euBLli,unB"a"erBimacs%"!

Vous aimerez peut-être aussi