Intern ati o n a Journ a l of  Re con f igur able  and Embe dded  Sys t ems  (I JRES)  V o l.  3, N o . 3 ,  N o v e m b er  2 014 , pp . 11 9 ~ 13 I S SN : 208 9-4 8 6 4           1 19     Jo urn a l  h o me pa ge : h ttp ://iaesjo u r na l.com/ o n lin e/ind e x.ph p / IJRES  Development of Wireless Se nsor Network for Traffic  Monitoring Systems        Sanket Dess ai *, N.D.  Gang adhar * , M.P. Bheema Rao*    * Departement o f  Computer  Engin eering ,  M.S. Ramaiah School of  Advanced Stud ies, Bang alor       Article Info    A B STRAC T Article histo r y:  Received  May 14, 2013  Rev i sed  Ju l 25 20 13  Accepted Aug 18, 2013      Traffic cong estion has been  a major  problem on roads around th e world. I n   addition ,  ther e is increase in volu m e of  traffic veh i cl e densit y at a  stead y   rat e .   Thus traff i c  on  m a jor roads h a to be  contro ll ed  to ke ep th traff i c flowing  a t   an ac cept a bl e r a te . S e ver a l s c h e m e s   for replacing the pr edominantly  used   Round Robin (RR) scheme for r e ducing  c ongestion at  traffic jun c tions hav e   been proposed.  D y namic tr affic control  schemes adapt to th e changing traff i b y  m onitor i ng t h e s t at e (s uch  as  the  number  queued up on  each lane). Th ese  need appropriate sensing and monitori ng s y stems. In this paper a traffic  monitoring and  control s y s t em ba sed on AMR (Anistro pic Magneto   Re sistive )  ve hic l e se nsors,  wire le ss sensor network and  a proiritised   Weighted Roun d Robin (WRR ) schedu ling technique, is dev e loped.AMR  se nsors insta l le d in roa d  pa vement detect  the nu mber  of veh i cles waiting in  a  traffi c l a ne The  AM R s e ns ors  are conn ect ed  to t h e m a s t er  contro ller  to for m   a Zigbee based  sensor networ k. Th master  node  consists of an ARM  proces s o r int e gr ated wi th a  Zigb ee m a s t ernod e.   The tr affi c con t r o l algor ithm   is implemented at master node whic h is responsible for taking traffic  signaling d e cision. It r e ceiv es sensor  dat a  from  all  the  lan e s.  A two lev e l   priority   algor ith m with weighted r ound robin  scheduling, wh er e first and   second maximu m weighted lane are to pa ss the signal is develop e d, To avoid   starving the leas t loaded lanes, a cy cle of normal round robin scheduling is   perform ed af ter   four rounds of pr oiritised  weigh t ed round robin  schedule.    The proposed  algorithm is simulated  and  compar ed with  the stan dard round   robin algorithm. The developed  algorith m  decr eas es  the aver age w a iting  tim for a commuter while maintain ing the aver age throughput up to averag loads .  The de velopm ent traf fic m onitoring  s y s t em  is  succes s f ul l y   demonstrated  for  a fou r  lane junction. Keyword:  AM ARM   RR  WRR  Zi gbee   Copyright ©  201 4 Institut e  o f   Ad vanced  Engin eer ing and S c i e nce.  All rights re se rve d Co rresp ond i ng  Autho r Sanket De ssai,    Depa rt em ent  of C o m put er  En gi nee r i n g, M . S .  R a m a i a h Sch ool   o f   Ad va nc ed St udi es ,   # 470 - P ,Peen y a In du str i al  A r ea,4 th  Phase  Bangal o re  560058,  Ka rnata k a,India    Em a il: san k e tdessai@g m ail.c o m         1.   INTRODUCTION  Th g a th ering o f  traffic info rm atio n  is a  b a se  for all k i n d s  of traffic  m o d e llin g ,  si m u la tio n  and  pre d i c t i on  f o r t a sks l i k e em i ssi on  red u ct i o n,  effi ci ent   use  of  i n f r ast r uct u re   or e x t e n s i o n pl anni ng  o f  t h r o ad   network as  we ll as the intervention a n d res o urce pla n ni ng. Auto accide nts injure at least 10 m i llion people   each year, a nd  two  or three m i llion of  them  s e riously. The hosp ital  bill, da maged  propert y , and  other costs are   expect e d  t o  a d d u p  t o  1% - 3 % of t h wo rl d’s  g r oss  d o m e st i c  pro d u ct W i t h  t h e ai m   of  red u ci n g  i n j u ry  a n d   accident se veri ty, pre-c r as h se nsing is bec o m i ng a n   area  of  active researc h  am ong a u tom o tive m a nufact ure r s,   suppliers and unive r sities. Ve hicle accide nt  statistics disclo se that t h e m a i n  t h reats a   driver is  facing a r e  from   ot he r ve hi cl es.  In t h e s e sy st em s, robust  a n d  rel i a bl e ve hi cl e det ect i on i s  t h e fi rst  st e p A succe ssf ul  v e hi cl e   d e tectio n   algorith m  will p a ve th way fo r v e h i cle reco gn itio n ,  v e h i cle track i n g, an d co llisio n avo i d a n c e.  Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 089 -48 64  I J RES Vo l. 3 ,  N o . 3 ,  No v e m b er  201  1 19   13 12 0 C u r r ent   hi g h w a y   m oni t o ri n g   appl i cat i o ns re qui re t h e i n st al l a t i on o f  b u l k y   m a gnet i c  l o o p  det ect or s o r  si ngl e   m ount  hi g h   res o l u t i o vi de o c a m e ras i n  o r de r t o   det ect  pass i ng  ve hi cl es. T h ese  devi ces a r e b o t h  c u m b ersom e   and expe nsive   to install and  maintain. It is  propose d  t h at s e ns or  ne tworks  be  use d  as  a  replacem ent for these   cu rren t techno lo g i es, sin ce these are  m u ch  si m p ler to  in stall an d   m a y b e   less co stly to   main tain  in  th e lo n g   run.  The t r affic param e ters on the  differe n sections  of the  roa d  a r e not  uniform ,  becaus e  the propa gation  of  traffic fl o w  is v u l n e rab l e to  th e in fl u e n ce  of d r i v er s’ p e rso n a lity an d  skill, p e d e strian s cro ssi n g  th ro ads,  intersections of minor roa d s, accidents and so on.  The  precision and robustne ss of tra d itional  traffic   forecasting m e thods ca nnot m eet the re quire m ents of  de vel opi ng traffic c ont rol  a n d gui dance  tec h nologies.          Fig u re  1 .  Sen s o r s u s ed   fo r Road  Traffic Monitirin g  (Carlo Sun   2 000 )       C u r r ent l y , roa d -t ra ffi c m oni t o ri ng rel i e s o n  t h e t echnol og y  of sens ors  b a sed o n  ra dar,  m i crowa v es,   tu b e s or  loop   detecto r s as show n in   Figu r e  1.  Ra dar :  For ac curately m easuring  vehicle s p eed   Microwave Detectors:  Th ese ar u s u a lly mo un ted on  a br i d g e  or   g a n t ry su ch th at they po in v e rtically d o wn   ove r a  lane  of t r affic. T h de vice emits  m i cr owa v es  wh ich  are re flected on the  roa d  s u rface and  bounc e bac k   to ward s th e sen s or.  v e h i cle p a ssi n g   un d e r th e sen s o r  will cau se in terferen ce t o  th e reflected  m i cro w aves  whic h e n ables   the ve hicle to be detected.  Tubes:   A rubber t ube  fixe to the roa d  s u rface across t h e  wi dth of a la ne of tra ffic  form s the basis of t h is  sens or.  One e n d of the tube is closed and the othe r is  connecte d  to a pressure sensor. As each whe e l of a   vehi cl ru ns  o v e r t h e  t u be i t  c a uses a  p r ess u r e W i rel e ss se ns o r  n e t w or ks  ( W SN)  are  ne w i n t e g r at i v e t ech nol ogi es  ari s i n g f r o m  t h e dev e l opm ent  of  w i rel e s s   com m uni cat i on an d t i n y  sens ors .   W S N i s  a ki n d  o f  m oni t o ri n g  net w or ks  con s i s t i ng o f  a l a rge n u m b er o f  l o w - cost po we r-sa v i n g,  hi g h l y  i n t e grat i v e a n d s e l f-o r g ani z e d  s e ns or  n odes  an net w or k   co ord i n a tor s . W S Ns  own  br oa d a n d  va l u abl e  a p pl i cat i on  out l o o k  i n cl u d i n g m i l itary ur ban  m a nagem e nt bi om edi cal  t r eat m e nt ,   envi ro nm ent a l   m oni t o ri ng a n d rem o t e   m oni tori ng o f  da n g e r o u s areas W S Ns i n st al l e d o n  road s i n  a swe e pi n g   manner can not only  obtain the traffic flow  param e ters of  the en tries and  ex its of in tersectio n s , bu t also  o f  t h forks ,  cross w al ks,  bus stati ons  and  othe r s p ec ial places. The r efore,  w ith  WSNs cove ring road net w orks over a   great a r ea, the   globe tra ffic inform ati on ca be o b se r v ed i n  det a i l s  i n  t h e t r af fi c m oni t o ri ng c e nt re . T h i s  t r en will certain ly bring   g r eat  b r eak t hroug h s  in  t h e traffic m o n ito ri n g  techn o l og ies.  Ty pi cal l y , sens or  n o d es a r o r gani ze d as  se n s i n g   nod es and agg r eg ator   nod es.  W h ile a  sen s ing   no d e   i s  respo n si bl e fo r sensi ng  da t a , an agg r e g a t or n ode i s  us ed t o  pr ocess  dat a  fr om  sen s i ng n o d es an d sen d   Evaluation Warning : The document was created with Spire.PDF for Python.
I J RES I S SN 208 8-8 7 0 8     Developme nt  of Wireless Se nsor Netw ork  for Traffic M onitoring Syste m s   ( S anket  Dess ai )   12 1 resu lts d a ta  to a  b a se  statio n. A b a se  station  is  u s ed   t o  col l e ct  dat a  f r om  t h e ent i r e se ns or   net w or k a n d re po rt th e d a ta t o  an  en d u s er.  The sy st em   i s   m a de up  of t h r ee com pone nt s for  det ect i ng a nd t r ac ki n g  t h e   m ovi n g  o b ject s. The  fi rs t   com pone nt  co nsi s t s  o f  i n e x p e nsi v of f-t he  shel wi rel e ss  sens or  de vi ces, suc h  as M i ca Z m o t e s, capabl e  o f   m easuri n g aco ust i c  and m a gn et i c  si gnal s  generat e d by  ve h i cl es. The seco nd c o m pone nt  i s  respo n si bl e for t h e   dat a  ag g r egat i o n.  The  t h i r d c o m ponent   of  t h e  sy st em  i s  resp onsi b l e  f o dat a  f u si o n  al g o r i t h m s         Fig u re 2 .   Th e Arch itectu r of  th e Hybrid  Nod e  (W allin  20 04     Fi gu re  2 s h ow s t h at  t h e  t o and  m i ddl e l a y e rs o f   the arc h itecture a r e c onsiste nt to  present tra ffic   in fo rm atio n  network. Th b o tto m  layer  mak e s u p   o f   WSNs,  wh ich are v e ry flex ib le.  W i t h  the rap i d   d e v e l o p i n g   WSN techn o l o g i es, all k i n d s  of in form at io n  of th e p h y sical wo rl d  aroun d   u s   will b e  tran sferred  to   th e presen t in fo rm atio n  system at a fin e  level an d   with   h i gh  sp eed. As a resu lt, th u r b a n  traffic network   with  d i stribu ted   p a ra m e ters will b e co m e   m o re m e asu r ab le an d co n t ro llab l e.  The a d vant a g of  usi n g   WSN   1 )   WSN  can mo n itor and  ev alu a te th ro ad au to m a tical ly a n d con tinu o u s l y , with  little human  effort  2)   WSN  can  w o r k  i n   ni g h t s  a n d  ab om i n abl e  weat he r,  w h e n  t h ere  i s  f o or  dust   3)  WSN is abl e  to accurately record  t h e tra ffic fl ow  data  of t h e road fo r furthe r analys is whic h is ha rd for  vide o cam eras  4)  WSN is  be com i ng chea per and ca be  depl oyed i n  a  fine-graine d   mode  for  real time and “re a l space”  traffic m o n itorin g       2.   DESIG N    Fu nct i onal   bl o c k di a g ram  of  t h e Tra ffi c M oni t o ri n g  sy st e m  i s  show n i n  fi g u re  3;  t h sy st em  has  m a i n l y  t w o bl o c ks o f  m a st er  no de an d sl ave  no de. M a st er  no de co nsi s t s   of  AR M  based  pr ocess o r ca p a bl e of   p e rform i n g  m u ltitask in g   o p e ratio n s Sl ave n ode c o nsi s t s  of v e hi c l e det ect i on senso r  an d zi g b e e  R F   m odul e. Sens or c o l l ect s t h e vehi cl det ect ed  dat a  and  sen d s t o  m a st er n o d e t h r o ug h R F  m o dule. Based  on efficient al g o rithm Master n ode will   allow the  vehi cle denser la ne  to  be cleare d   Traffic Mo n itoring  System  b l o c k con s ists  o f   a Jun c tio n with   Lanes  (N ort h   Lane,  So ut L a ne, Ea st  Lane W e st  La ne) .   M a gnet i c  Se ns ors a r e m ount ed o n  eac h La ne i n   reg u l a fashi o n  based  o n  ef fi ci ent  sensi n of t h e ve hi cl e. Sl ave co nt r o l l e r co nsi s t s  o f  t w o z o nes zo ne -1  a n d   zone - 2 Zo ne- 1  i s  co n n ect ed  t o   No rt h  an W e st  l a ne se ns or s an Zo ne- 2  i s  co n n ect ed t o   So ut h a n d Ea st  La n e   Sens ors .  Ve hi c l es passi n g  f r o m  t h ese l a nes are det ect ed t h r o u g h  sen s o r s a nd se ns or  dat a   are sen d i n g t o   zi gbe e   m odules conne c ted at two zones. Master  node consists  of RF Transcei ve r and Tra ffic s i gnal controlling is   do ne  usi n g e ffi ci ent  al go ri t h m .  R F   dat a  sent   f r om  sl ave (z on e-1 a n d z one - 2 ) i s  col l ect ed  b y   m a st er depe n d i n g   on  t h sens o r   wei g ht  act i v d eci si on i s  t a ke n as  a re su lt the lan e   with   h i gh   d e nsity is allo wed  t o   p a ss.    Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 089 -48 64  I J RES Vo l. 3 ,  N o . 3 ,  No v e m b er  201  1 19   13 12 2       Fi gu re  3.  B l oc Di ag ram  of  Traf fi c M o ni t o ri n g  Sy st em s       a.   Hardw a re De sign and  Impl ementati on   As s h ow n i n  Fi gu re  hi g h  l e v e l  desi g n   of  t r a ffi c m oni t o ri ng  sy st em  consi s t  of  a  ju nct i o whe r fo u r   lan e s m eets  an d  it is rep r esen ted  as  North   Lan e , Sou t h  Lan e , East lan e  an d   West lane. Each  lan e   will b e   havi ng  vehi cl e  det ect i on sens or nam e d as NS (n ort h  sens o r), SS  (so u th s e ns or ), ES (ea s t senso r),  WS  (east  sen s o r ) in  turn th e co rresp ond ing  lan e  traffi c lig h t   are re present as TL-N, TL-S, T L -E , TL-W. As algorithm   dem a nds i t  ha s bee n   su di vi de d i n t o   fo u r  l a ne  j u nct i o wi t h  t w o  zo nes as  z one -1  an d z o ne- 2 ,   zone - 1   cor r es po n d  t o   no rt h  an west   l a ne si m i l a rl y  zone - 2  c o r r esp o n d s t o  s o ut h a n d  east  l a ne .   This section consist  of im ple m enting m a ste r  node   which i n cludes ARM  process o r, Zigbee recei ve and T r af fi c co nt r o l l i ng si g n a l s as sho w n i n  Fi gu re 5 .  Sa m s ung S3C 2 4 4 0 A  ( A R M 9 2 0 T)  base d AR M  boar d   m i ni 244 0 has  been   u s ed   w h i c h ru ns  at  5 3 3  M H z, has 6 4 M   SDR A M ,  1 2 8 M   Na nd   Fl ash ,   2M  N o r Fl ash   wi t h   B I OS  i n st al l e d ,  S 3 C 2 4 4 0  su p p o r t   bo ot  m ode  Nan d   Fl ash  b oot  a n No Fl ash  b oot .  M e m o ry   m a p and  ch i p   sel ect i on i s  di ffe rent  b a sed  on  di f f ere n t  b oot  m ode. It   sup p o rt OS  p o rt i n g com p at i b l e  wi t h  Li n u x  2 . 6 ,   An dr oi d a n d   W i nC E.           Fi gu re 4.   Hi gh  Level  Desi g n  o f   t h e   Tra ffi M oni t o ri n g  Sy st em   Evaluation Warning : The document was created with Spire.PDF for Python.
I J RES I S SN 208 8-8 7 0 8     Developme nt  of Wireless Se nsor Netw ork  for Traffic Monitoring Syste m s   ( S anket  Dess ai )   12 3     Fi gu re  5.  B l oc Di ag ram  of t h e M a st er  N o d e           Fi gu re  6.a .  M a st er N o de Fl o w  C h art       Master no d e   fl o w  ch art h a been  sh own  in   fig u re 6.a to   6 . d .  Fi rst all th in itializat io n s  fo r t h e port  pins  a r e done  a nd othe r neces sary settings li ke UART, sensor  port a r e don e.  Next ste p  i s  to recei ving  RF data  fr om  zone-1 a n d zo ne- 2  sl ave  no des ,  t h ere i s   part i c ul a r  fo rm at  fol l o we d i n   reco g n i z i ng t h e exact  zone  d a t a , i f   start o f  p a ck et  is ‘$ ’ th en  d a ta b e lo ng s to  zon e -1  and  if  start o f  p a ck et is ‘# ’ th en  d a ta  b e lo ng s to  zon e -2 .Now  once  data is received, m a ster cont roller  will  decode the  pac k et and calculate for fi rst m a x i m u m  weighted lane   and t h en sec o n d  m a xim u m  w e i ght ed l a ne.  As a res u l t  t h e lan e  p a rticu l ar to  first m a x i m u m lan e  is a llo wed  first an d th en  seco nd  m a x i m u m   lan e  is allo wed  to p a ss  n e x t Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 089 -48 64  I J RES Vo l. 3 ,  N o . 3 ,  No v e m b er  201  1 19   13 12 4     Fi gu re 6. b.   B l o c k Di ag ram   of M a st er  N o de           Fi gu re 6.c .   B l o c k Di ag ram   of M a st er  N o de     Evaluation Warning : The document was created with Spire.PDF for Python.
I J RES I S SN 208 8-8 7 0 8     Developme nt  of Wireless Se nsor Netw ork  for Traffic Monitoring Syste m s   ( S anket  Dess ai )   12 5     Fi gu re 6. d.   B l o c k Di ag ram   of M a st er  N o de        b.   Algorithmic I m plementati on  Th is section  ex p l ains abou t th e algo rith m  i m p l e m en ted  in  p e rform i n g  efficien t traffi m o n ito ri n g   and signaling.  As explaine d in earlie r section the syste m  c onsist of thre e  weighte d  sens ors locate d  in each  lane and t h ere  is traffic signal  (Red , Yello w,  Gree n) co rre s p o n d ing  to  each  lan e . By d e fau lt th e traffic sig n a l   p a ssing  sequ en ce  fo llowed   at th e jun c tion is No rt h ,   East W e st and  So u t h  lan e  i.e  ‘N’  ‘E’  ‘W’‘S’ th is is  sho w e d  i n  Fi g u re  8 an d 9 re prese n t i n g R o u nd  ro bi n se que nce an d wei g h t ed ro u nd r o bi n. Fi g u r e 7 sh o w s t h e   zones and its cycles of tra ffic  flow for sender and m a ster data r ecepti on with  round robin and  wei ghted  round  r o b i n algo r ithm .           Fi gu re  7.  R o un d R obi Al g o ri t h m  and  W e i g ht ed R o un d R o bi Al g o r i t h m     Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 089 -48 64  I J RES Vo l. 3 ,  N o . 3 ,  No v e m b er  201  1 19   13 12 6     Fig u r e   8 .  Flow D i agr a m  Rep r esen ting  Round  R o b i n   A l go r i th       Fi gu re  9.  Fl o w  Di ag ram  R e pr esent i n Wei g ht ed R o un d R o bi Al g o r i t h m       c.   Schem a tic Circuit Diagram  for   Mas t er Node  Al gori t hmi c  Implementation  The schem a t i c  ci rcui t  di agra m  of t h e Traff i m oni t o ri n g  sy st em  for  m a st er no de i s  sh ow n   i n  Fi g u re  10 a nd  1 1 . It  c onsi s t  of c o n n ect i n g zi g b ee m odu l e  t h ro u gh  UA R T  po rt  fr om   AR M  b o a r d   and traffic signal lights are c o nnect e d  t o  p o r t  pi n s   of  AR M   boa r d .   Evaluation Warning : The document was created with Spire.PDF for Python.
I J RES I S SN 208 8-8 7 0 8     Developme nt  of Wireless Se nsor Netw ork  for Traffic M onitoring Syste m s   ( S anket  Dess ai )   12 7   Figu re  1 0 Sch e m a tic Diagra m  for M a ster  No de           Figu re  1 1 Sch e m a tic Diagra m  for M a ster  No de   Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 089 -48 64  I J RES Vo l. 3 ,  N o . 3 ,  No v e m b er  201  1 19   13 12 8 3.   R E SU LTS AN D ANA LY SIS    Fi gu re  12  sh o w s sl a v e zo ne  n ode al o ng  w i t h  sens or  an d  ad ded  wei ght , t h ere  are t h r ee m a gnet i c   sens ors  whic h are in yellow color as shown  whic h is in terfaced to zone-1  PIC micr ocont r oller through  GPIO,  whe n  any m e tal piece is detected it sends  the data. Fo r e xpe rim e ntal process m e tal washer a nd m e tal slab   piece is used.  Once the c o m p lete set-up is ready and  work ing prope rly, we can ensure  the wireless module to  b e   w o rk ing  in  g ood  co nd ition b y  ch eck i ng  an d d i ag no si n g   th ro ugh   H y p e rTer m i n a l set- up Th e m a ster  w ill   sche dul e t h e si gnal i n pr oces s of al l o wi n g  t h e ve hi cl es ba sed o n  se nso r  i n p u t  bel o w fi g u re  14   sho w s  N o r t h,   So ut h, Ea st West  W e i g ht  and  i t s  corres p on d i ng t r a ffi c l i ght  si gnal s  s h o w i ng i n  Hy pe rTe r m i nal  and fi g u re  1 5   shows the zone-1 one recei ved data on  hyperterm i nal.  Vehicles are be en sense d  through sensor laid on  pavem e nt from  slave  node , it  fram e s the coll ected RF  data   and se nds  to t h e m a ster  for  f u rther  p r ocessin g  the  R F  dat a   bee n   col l ect ed i s  s h ow n i n  Fi gu re  13 .   Based   o n  th weigh t s sh own th e Master con t ro ller will allow  t h e si gnal   fo t h e l a ne i n  se que nce  of Eas t  l a ne t h en S o ut h La ne, t h e n  No rt h La ne, t h en  West  La n e , t h i s   sequence   is  fol l owe d  for four cycles  t h en  o n e  R o un d R obi n  i s  exec ut ed .         Fi gu re  1 2 Im pl em ent a t i on o f   t h e Tra ffi c  M o ni t o ri ng  Sy st em  Set up        Fig u re  13 Im p l e m en tatio n  of  th e Slav e Nod e  with  t h Weigh t ed   Sensor  Evaluation Warning : The document was created with Spire.PDF for Python.