TELKOM NIKA , Vol.12, No .4, Dece mbe r  2014, pp. 78 7~7 9 4   ISSN: 1693-6 930,  accredited  A  by DIKTI, De cree No: 58/DIK T I/Kep/2013   DOI :  10.12928/TELKOMNIKA.v12i4.497    787      Re cei v ed Au gust 18, 20 14 ; Revi sed O c t ober 8, 20 14;  Accept ed O c tober 25, 20 1 4   Pre-Timed and Coordinated Traffic Controller Systems   Based on AVR Microcontroller      Fredd y  Kurnia w a n 1 , Den n y  Derm a w a n 1 , Okto Din a ry anto 2 , Mardiana Ira w a t i Department o f  Electrical Eng i ne erin g,  Sekol ah T i nggi T e knolo g i Adis utji pto  Department o f  Mechanic a l E ngi neer in g, Sekola h T i nggi T e kno l og i Adis utjipto   Department o f  Informatics Engi neer in g, Sekola h T i nggi T e kno l og i Adis utjipto   Jln. Janti, Blok  R, Kompleks L anu d Adis utjipt o , Yo g y akart a , Ph. + 62-274- 4 512 62, F a x. + 6 2-27 4-45 12 65   *Co rre sp ondi ng autho r , email: fredd yk urni a w a n @stta.ac.id       A b st r a ct     T he ma jor w e a k nesses of traffic controllers i n   Indon esia ar e una ble to ac commod a te the variet y   of traffic volu me an d un abl e to be co ord i nat ed. T o  so lve th e pro b le m, a p r e-timed a nd c oord i nate d  traffi c   control l er system is b u ilt. The system  cons ists of a master and a loc a control l er. Eac h  control l er ha s a   datab ase c ont aini ng s i gn al-ti m i ng p l a n s. T o  synchro ni z e   th e sig nal-ti m i ng,  the master co ntroll er sen d s th e   synchro ni z a ti o n  data to the lo cal contro ller w i reless ly , and t he loc a l contro l l er can  mo dify a cycle le ngth  by  add ing or su btracting the gr e en interv al of a n y phas es . T he transitio n time for synchron i z a ti on o n ly tak e one to sev e ral  cycles. The al gorith m  for co ntrolli ng t he tr affic inclu d in coord i nati on c an be d o n e  by  an  AVR  microc on troller. Me mor y  usag of the  micr oc ontrol l e r is l o w e r th an 1 0 %,  me a n w h ile t he C P utili z a ti on is n o  more th an 1%,  and thus  the s ystems co uld b e  w i dely dev el ope d.    Ke y w ords : traffic controll er, pre-timed, coor d i nate d , AVR mi crocontro ller       1. Introduc tion  1.1 Bac k gro und of th e Problem  Traffic j a ms i n  mo st majo r citie s  i n  In done sia  have  re sulted  in l o sin g  millio n  rupi ah every ho ur. T r affic  con g e s tion is  ca used  by many fa ct ors.  One  of th e facto r s i s  th e cu rrent traff i controlle can not a c commo date the  vari e t y of traffic vo lume. T r affic  con g e s tion  h appe ns u s ual ly  at the mai n  j unctio n s in th e mo rning,  b e fore th offi ce  hou rs (6.0 0 a.m. to 8.0 0  a.m.)  and i n  the   evening, after  the office h ours (3.00   p. m.  to  5.00  p . m.). Mean while, at mid n i ght, som e tim e s   many vehicle s  have to wai t  even thoug h there a r e n o  others vehi cle s  pa ss at the interse c tio n Bec a us e the traffic  s i gnal remains   red for the  fixed  perio d, the  vehicle  sho u l d  wait until t h e   sign al turn s to gree n.  Many re se arch  studie s   h a ve bee n d o ne to im p r ov e the traffic  controlle r in  orde r to  accomm odat e the t r affic v a riation.  Fa zli  obtain ed  ve h i cle s   cla ssifi cation b a se o n  neu ral  netwo rks   for an intelli gent traffic controlle r sy stem  [1]. Khan and Aske rzad e implem ented an im ag e   pro c e ssi ng  a nd fu zzy lo gi control, the n  sent the  re sult to  a mi croco n tro ller to drive the traffic   sign al in the  desi r ed  ma nner [2]-[3]. Hon g jin Zh pre s ente d  a  moving vehi cle dete c tion  and   tracking  syst em,  which  compri sin g   of hori z ont al  ed ge d e tectio method  and   auto  co rrel a tion.  The re sult sh ows that it is pos sible to detect ea ch i ndividual veh i cle even if the vehicle s  a r overlap p ing  [4]. Although   vehicle  dete c tion ha bee n imp r oved, t here  is no  gu arante e  that  the   pro c e ss  gives the a c curat e  re sult. To o v erco me  the  probl em, the traffic co ntroll er should  hav e a  sign al-timing   plan that  sho u ld be  used i f  there i s  an i n valid re sult f r om d e tectio n  pro g re ss. Th plan can be d e fined from traffic volume variation.   Some resea r ch  studi es  ha ve bee n do ne  to imp r ove v ehicl e flow at  the ro ad  network. Xi pre s ente d  a sched ule-driv en co ordi nati on for real -ti m e traffic net work [5], and  Shamshi r ba nd   pre s ente d  an  improveme n t of control ab ility by  using  a neural net work Q - lea r ni ng app roa c as  on Gam e  Th eory [6]. Lei  Wu p r e s ente d  a be e inspir ed zonal vehi cle routing  al gorithm to  provide   a rea s on abl e and effect ive optimal route for  th e Dynami c  Route Gui d a n ce System  [7].  Acco rdi ng to  Dotoli, one of the effective methods  t o  improve traffic flow in the network is to  synchro n ize t he traffic  sig nals at all  int e rsecti on s esp e c ia lly a t  adja c en t in ter s ec tio n s  [8 ]. T h e   obje c tive of the co ordi nati ng is to provi de co nti nuo u s  flow of traffic alon g stre ets or hig h ways.  The  M anu al on Uniform   T r affic Cont rol   De vi ce  (M UTCD)  also re comm end s th at traffic  sign als  within  800 m e ters  must b e  coo r dinated  und e r  a  comm on  cycle l ength.   O t h e r  r e as ons   to   Evaluation Warning : The document was created with Spire.PDF for Python.
                          ISSN: 16 93-6 930   TELKOM NIKA   Vol. 12, No. 4, Dece mb er 201 4:  787  – 794   788 establi s coo r dinatio n are  when the in terse c ti on s a r e in clo s e p r oximity to one anoth e r a n d   traffic volum e s b e twe en th em a r e l a rg e .  Coo r din a te d traffic co nt rolle can  pe rmit continu o u s   movement al ong an  arte ri al or throug h out a net work of majo r streets with  min i mum stop and  delays. By minimizin g  the amount  of accele ration a n d  brea kin g , the air polluta nt emitted by the   vehicle  will  b e  redu ced  [9 ]. It can  be  see n  from  th e p r eviou s   rese arch  that  the b enefits of  coo r din a tion  depe nd  on th e unifo rmity o f  traffic flo w Ho wever,  in t he  scena rio  that the  flow is no t   uniform, som e  improvem e n ts ca n be do ne in the future [10].  The mo dern  traffic controller  system  gene rally is based o n   32-bit p r o c e s sor and   coo r din a ted  b y  comp uter systems that a c t a s  a  se rve r  [11]. Mea n while, present t r affic  co ntroll ers  in Indone sia  are b a se d on  MCS-5 1  8-bi t micro c ont rol l er. It is difficult to build the system o n  the   last microcon troller du e to the limitation of  CPU spe ed and mem o ry spa c e. T he com p lexity of  the algorith m  for coo r di nati ng traffic cont rolle rs   coul d not be don e b y  a MCS-51  microcontroll er.   Several rese arch  studie s  have be en  introdu ce to  meet the traffic ch aract e risti c  in  Indone sia. Primantary pre s ente d  a co ordin a tion  of  the traffic signal mod e l [12] and Jatmiko   pre s ente d  th e archite c ture of de ce ntra lized  self -o rg anizi ng traffic cont rol in  re al situatio n e v en  on no n-stru ct ure inte rse c tion like in  Ja karta  [13 ]. Howeve r, it is found n o  st udie s  ab out  the   coo r din a ted  sign al con c e r ned with the  traffic c ontro ller syste m  in Indone sia that is ba sed  on  microcontroll er.   The p u rpo s e  of the  re sea r ch  is to b u il d a  pre - time d an coo r di nated traffic  controlle system  ba se d on  an  AVR  microc ontroll er. Ba sed  on   the si gnal -tim ing pl an, the   new alg o rith m for  controlling traffic can a ccommod a te the traffic  volu me variation  and coordina te anothe r traffic  controlle r. The algorithm i s  tested on an  ATmega1 2 8 A  AVR 8-bit microcontroll er that has m u ch  faster o n  the CPU an d larg er memo ry sp ace.       1.2 Pre-Time d and Coor d i nated Tr affic Con t roller   A traffic controller is u s ed t o  swit ch the traffic sig nal. The sig nal se quen ce is  red ,  green,  yellow, a nd  red-clea ra nce.  The  main  va riable s   i n   sig nal-timin g a r e  cycl e le ngth  and  gre e n  sp lit.  Cycle length  ( ) is the time in secon d s that it takes a signal to  compl e te on e full cycle of  indication s. One cy cle is th e sum  of the duratio n of th e gre en inte rval ( ) plus the yellow interval   plus th e red - clea ran c e  int e rval. It also i ndicates th e t i me interval  b e twee n the  st arting  of green   for o ne  app ro ach  until th next time the   gree start s Gree split fo r a  si gnal  in a  given  dire cti on  is define d  as  the fraction of  cycle len g th wh e n  the sig nal is green i n  that directio n.   Pre-time d traffic cont roll ers  ope rate  in a pred etermin ed a nd reg u la rly repeate d   seq uen ce  of  sign al in dications.  Gen e rally, this ty pe  o f  traffic  cont roller is chea p e r to  pu rcha se,  and ea sie r  to  install an d m a intain than t he othe type s such as  act uated traffic  controlle rs. Th eir   repetitive nat ure al so facili tates co ordi n a tion wi th adj ace n t signal s, and they are useful whe r prog re ssion i s  de sire d [11].    An additional  variable of  coo r din a tion is offset. The offset ( ) can  be defined as the  interval from  an offset refe ren c e p o int a t  one si g nal t o  the followi n g  nea re st on e at the othe r   sign al.   The  of fset refe re nce point i s   a p o int wh ere th e controll er  make a d e ci sion  to termi nate   the coo r din a ted pha se. Th e cycle le ngt h can b e  me asu r ed from the su cce ssiv e  offset reference   point define d  by the operat or [11].       2. Rese arch  Metho d   2.1 The Sy st em Hard w a r e  and Soft w a re   The prototype of the sy stem con s i s ts  of two traffic cont rolle rs, o ne actin g  as  a maste r   controlle r a n d  the  other  as  a lo cal  controlle r.  As use d   by pre v ious re sea r che r [6],[13],  the  system  u s es a di strib u ted  syste m s ap proa ch  fo r b u ilding  a tim e -ba s e d   coo r dination. A t r affic  controlle r can  be operated  for stand -alo ne or coor din a ted mode.  Each traffic  controlle r ha s all  the  featu r e s   d e sired  f o r sig nal cont rol at the  in te rsecti on su ch as  CPU,  a c curate  clo c ge nerator,   and commu n i cation mo du le as sho w n  in Figure 1 .  Each traffic controll er h a s a data b a s contai ning si gnal-timi ng pl ans that will be allocat ed to manag e vehicle flows in  the lane for the  sign alized intersectio n . Each ho ur of the  wee k  is cove red by the sig nal-timin g pla n .     Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM NIKA   ISSN:  1693-6 930       Pre-Timed and Coordinated Tra ffic  Cont roller Sy s t em s  bas ed on  AVR .... (Freddy  Kurniawan)  789      Figure 1. Th e system blo c k diag ram       At the heart  of the traffic controll er  i s  an ATm e g a128A AVR  microcontroll er. Th e   microcontroll er is  ru nning  at  a clo c k freque ncy of 1 1 .0592M Hz. The mi cro c o n trolle r conta i n s   main pe rip h e r als:  an 8 - bit  RISC mi croproce s so r,  128 kB flash me mory spa c e,  4kB SRAM,  and   4kB EEPROM. The  algorithm for  cont rolling traffic  is impl ement ed to be a Traffic  Cont roll er  Program written in C la ngu age u s ing  Co deVisio AVR 2.05.3 Sta ndard Versio n. The progra m  is  store d  in th e  flash m e mo ry and th e d a taba se  c ont aining  sig nal-timing plan i s  sto r e d  in t he  EEPROM of  the microcontroller.  In order to save the memo ry  resource and reduce the  comp utation  load, all vari able s  are formatted  a s   8 or 16 -bit i n teger  and  all mathemat ical  comp utation s  are pe rform e d usin g integ e r ope ratio n s.   A KYL-200 wirel e ss  com m unication m odule i s  u s e d  for  commu ni cation  at ea ch traffic  controlle r a n d  op erato r  te rminal.  The  o perato r  te rmi nal  can  do wn load th sign al-timing  pla n  to  each traffic controlle r and  read the pla n  from each tr affic controlle r. In order to  coordinate the  local  co ntrolle r, the ma ster  controlle r also se nd syn c hroni zatio n  d a ta to the lo cal co ntrolle r. The   module tra n smits the data usin g Freq ue ncy Shi ft Keying modul atio n at baud rat e  of 9600bp s.   frame  of the  data  contai ns  of 8 - bit  d a ta, a  start  bit,  a stop bi t,  and no pa rity.  All  types  of  comm uni cati on are d one  wirel e ssly at a freque ncy o f  433MHz wit h  different he ader d a ta.      2.2 Signal-ti ming Plan  The re se arch  is focu sed o n  a coupl e of a four -way intersectio n  (cro ssroa d with a traffic  sign al at each intersectio n .  For each in terse c tion  with a set of entry and exit r oad s, the traffic  sign al cycl es  throug h a fixed seq uen ce  o f  phase s . Wit h  a sig nal-tim ing plan, a d a y  is segm ent ed  to ten time sl ots. To a c co mmodate  da y-varian ce  of traffic volum e  in a  wee k ,  there  are  th ree   sign al-timing   plan s avail abl e that  ca n b e  allo cate d  to  several type s of d a y: we ekdays, Satu rd ay,  and Sun day. All plans o f  the master and the lo cal controller are defin ed  at the Traffic  Manag eme n t Ce nter  pro g ram  in th e  ope rato r te rminal  an can  be  do wnload ed to   both   controlle rs  wi rele ssly  as  shown in Fi gu re 1. A ll inte rse c tion s in th e area  can  b e  co ntroll ed  by  different timin g -pla ns  simul t aneou sly tha t  were me rge d  into an ove r all sa map horic cycl e. Once  the plan are  set, they re main fixed u n t il they  are  ch ange d ma nu ally from the   terminal. T abl e 1  sho w s the sig nal-timin g pla n  for wee k d a y s that is use d  for experim ent.                      Synchronizatio n  data D o w n l o a d   s i g n a l - t i m i n g   p l a n R e a d   s i g n a l - t i m i n g   p l a n D o w n l o a d   s i g n a l - t i m i n g   p l a n R e a d   s i g n a l - t i m i n g   p l a n Th e opera t or ter m inal K Y L- 200U Commu nication  mo dule RT C  DS 13 0 7 C l ock generat or AT mega128A micro c ontr o ller In terface T he master contro ller KYL-200U Co mmunication  module KYL- 200U Communication   modu le RTC  DS1307 Clo c k gener ator AT mega128A micr ocon troller Interfa c e The local contr o ller T r affic light T r affic light Evaluation Warning : The document was created with Spire.PDF for Python.
                          ISSN: 16 93-6 930   TELKOM NIKA   Vol. 12, No. 4, Dece mb er 201 4:  787  – 794   790 Table 1. A sig nal-timin g pla n  for the mast er and the lo cal controlle Parameter   Ti me  slot  Ti me  Master control l er     Local co ntrol l er   P 1  P 2  P 3  P 4     P 1  P 2  P 3  P 4     G r een interv al  ( g )   4:30  a.m. 10   10  10  10     10   10   10   10   6:00  a.m. 12   15  20  15     12   14   20   15   6:30  a.m. 15   20   30   20     15  19   30  20  20  40   7:10  a.m. 17   20   26   20     17  19   26  20  20  20   8:00  a.m. 20   22  26  20     20   20   27   20   20   10:00  a.m. 25   25  25  25     21   25   28   25   20   3:30  p.m. 30   25   22   25     29  25   22  25  10  20   6:00  p.m. 25   25   20   25     22  22   20  22  10  20   9:30  p.m. 15   15   15   15     0 0  0 0 0 0  10   12:00  p.m.   0 0  0 0 0 0  Yello w int e rv al ( )   All  time   3 3 3        Red-c l ear ance i n te rval ( )   All  time   5 5 5            A time sl ot o f  the ma ster  controlle co nsi s ts   of tim e  to  start th e  time  slot an d green  interval ( g )   of all phase s , while a time slot of the local controller h a s an ad ditio nal offset (   )   and   limit data ( p ) .  The r e a r some timing  constraints for safety an d f a irne ss at  ph ase   i   (P i )   : t he  gree n split ( g i ) ru ns fo a variabl e in terval that can ra nge  bet wee n  a mini mum ( G min ) and  maximum ( G max whil e the  yellow  and  red-clea ra nce   splits ru n fo a fixed inte rval ( Y i  and  R i ). If   the green int e rval of  all  phases at a ti me sl ot is zero, the  c ontroll er  will not control the traffi c at  the time slot and the sig nal displ a ys  flashin g -ye llo w. Offset ca n vary from zero to the cycle  length. All values h a ve bee n roun ded int o  numbe rs of time step of o ne-se con d  re solutio n .   As mentione d previou s ly, in order to  sync h r oni ze  the local controlle r, the maste r   controlle r se n d s the  synch r oni zation  dat a (syn c).  Wh en re ceivin g the data, the  local  controll er   read s the tim e  from the  RTC then  save s the time a s   . Afterward, a t  the end of l o cal  cycl e ( ),  the microcon troller of the  local  control l er ex e c ute s  algorith m  1 for syn c h r oni zing the  sig n a l- timing of the local  controlle r to the si gnal -timing of the maste r  co ntro ller.       Algorithm 1: S y n c hronize the signal-timing of the local controller to the master   =  read_time( R T C)   4 1    .         if   =  0 or   >   then return   if   >  0  then go to 13   if  ξ   , then  ξ      4 1 ξ   ξ ξ  4 1   ξ       for i =1 to 4 do    return  if  ξ –  , then       4 1 ξ   ξ ξ  4 1   ξ       for i =1 to 4 do    return       Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM NIKA   ISSN:  1693-6 930       Pre-Timed and Coordinated Tra ffic  Cont roller Sy s t em s  bas ed on  AVR .... (Freddy  Kurniawan)  791 The first ste p  of the algorithm (line 1 )  is to  read the time from the  RTC a nd sto r e it as  16-bit inte ger  . After that, line 2 compute s  a total of the gre en inte rval of all pha se s ( G ). Line  3   comp utes th e      that will be  used to limit  the maximu m amount of  adjustm ent that can  be   made in one  cycle. The  para m eter i s  used to  pre v ent an exce ssive g r ee n interval or g r een  intervals  that are  to o sho r t durin tra n siti oning.  If a lim it is impo se d, the si gnal  m a y not be  abl to compl e te  offset tran sition within  on e cycl e.  The  algorith m  co n s train s  to a d d  or  subtract  the   gree n inte rval  no mo re th a n  a  certai n p e rcentag e of    that range s f r om 0  to 99.  The valu e of  0   mean s the lo cal controll er  is not sy n c hronized to the maste r  co ntro ller.  Line 4 comp utes the  current offset tha t  is  defined a s  the time dif f eren ce b e tween the  end of the m a ster  cycl e ( ) and the e n d  of the local  cycle  ( ). The value is  store d  in a 16 -bit   unsi gne d inte ger  ( ). If the cu rrent offse t  is e qual  to  t he offset defi ned i n  the  da tabase ( ), th sign al-timing   of the local controlle r h a been  syn c hronized to the  sign al-timin g  of the ma ster  controlle r. A synchroni zed l o cal timing  ca n be sh own a s  ca se 1 in    Figure  2 .   Let   den otes the time diff eren ce  bet we en   and    in line  5. If   is le ss than  zero,  t L   is  leadin g , then  lines 8 –  12  shift next  t progre s sively la ter by timin g   the next  cycl e len g th  sligh t ly  longe r than  th e programme d cycl e len g th . Synchro n izi ng a le adin g  l o cal timi ng  ca n be  sho w n  a s   ca se 2 in    Figure  2 . On  the other h a n d , if   is grea ter than zero,   t is lagging,  then lines 1 4  – 18  s h ift next  t progre s sively e a rlie r by timing the next cy cle  len g th sli g htly shorte r. T he ca se  ca n be   s h ow n  as  ca se  3  in    Figure  2               Figure 2. Shifting the end o f  local cycl e       Whe n  the ne xt  t will be shifted progressively later, li ne 9 di stributes extra  green interval   prop ortio nally among st all  pha se s. T he highe r the green interval o f  a phase ( ) thus the high e r   the addition in the green interval ( g i ). The equatio n  in line 9  is  done by multiplying  and  ξ   first, then the corre s po nd ing re sult in an 16 bit integer i s  divided by   . Note that the  comp utation i s  perfo rme d  usin g intege r division. An  8-bit intege r part of the division re sult i s  a  cha nge in th e value of the gree n interval ( h i ); me anwhile the remaind e r i s  distrib u ted to  the  addition  of a n y gre en i n terval  startin g  from th e ph ase  that h a s the g r eate s t  value of  gre en  interval. Final ly, line 12 co mputes the g r een interv al t hat will be all o cate d to the next cycle.   Line s 14 – 1 8  are to shift  t prog re ssive ly earlier by subtra cting tim e  from one o r  more  gree n inte rval  in the  seq u e n ce i n  the  si milar  m anne r. When  this  method i s  u s ed, the ne g r een  interval may  be  clo s e to  the minim u m pha se  gre en inte rval ( G min ), meani ng only  a small  adju s tment in  cycl e len g th  can  be  made  by sh orte ni ng. In the  c a se, it may tak e  many  c y c l es to  c o mplete an  offs et trans i tion.      3. Results a nd Discu ssi on  Ma st er  tim i n g A  sy nc hr on i z e d   local  timing (c as e 1 ) ’=   ’=   ’=   Synchronize  a  le ading  local  t i ming (c as e 2 ) ’<   (lead ing) ’=   ’=   is longer Synchronize  a  la gging  local  t i ming (c as e 3 ) ’>   (lagging) ’=   ’=   is shorter = cycle lengt h = l ocal off s et  d e fi ned in plan = current local  of fse t = t he end of   master cycle = t he end of   l o cal  cycle Sinc data S inc  data S inc data Evaluation Warning : The document was created with Spire.PDF for Python.
                          ISSN: 16 93-6 930   TELKOM NIKA   Vol. 12, No. 4, Dece mb er 201 4:  787  – 794   792 The syst em is tested u s in g a sign al-tim ing pl an for th e maste r  and  the local  cont rolle r as  sho w n in T a b l e 1. The ma ster co ntrolle controls th e vehicl e flow at  time slot 1 un til 9 (4.30 a.m .   ~ 11.5 9  p.m.) and the l o cal  cont rolle r co ntrols at ti me  slot 1 u n til 8 (4.30 a.m. ~  9 . 29 p.m.). Ti me   slot 1 and 2 o f  the local co ntrolle r are n o t c oordinate d  to the master co ntroll er b e ca use    = 0  an d   p  = 0.      3.1 Transitio n  Time  In orde r to m easure th e p e rform a n c e, the sy stem is  tested by o p e r ating it on  di fference   value of offset error  ( ). It operates  usi ng time sl ot 5 that  the co rre sp ondi ng time is from 8 . 00   a.m. to 9.59 a.m. Both controlle rs  call  a 120-se co nd  cycle len g th while the lo cal controlle r also   call s for a 40 -se c o nd offse t. The master controll er re start s  at 08:00:00 and the  local controll er  resta r ts at  08 :00:40. In th e  ca se,   the  cu rrent l o cal offset is  equ al to   the offset  defi ned  at the  time   slot. A dashe d-g r ay line in    Figure  3  sho w s th e diag ra m of the cycl e length of  th e ca se. Th ere is no tran si tion time  becau se there is no offset  error value o c curs in the tra n sition (  = 0s ).        Figure 3. The  fluctuation of  cycle len g th versu s  differe nt of        In the  se con d  ca se, th e lo cal controll er  rest art s  at  08: 00:55 th us it  has  a 55-se cond  l o cal  offset. The  of fset e rro r val ue  ( ) i s  15  seco nd s. In  order to  sy nchronize the  timi ng of  the l o cal   controlle r, the following  cycle is su btra cted by 15 seco nd s to be 105 se con d s . The tran sit i on  time is 105 seco nd s.  In the n e xt ca se s, the l o cal  controll er  re s t art s  latter thus  the current loc a offs et   respe c tively,  are 30, 45, 7 5 , 90, and 10 5 se con d s. It can b e  sh own in   Figure  3  that the diagra m  of the cy cle l ength at the tran sition time  vary with the offset  error  . When the offs et error   is le ss or eq ual to a  half of  a cycl e length, the  next cycle le ngth   is d e crea se in order to  sh ift the next en d-of-a-cyc le  e a rlie r. On th e  other ha nd,  whe n  the  offset  error   is g r ea te r  th an  a ha lf o f  th e   c y c l e  le ng th the  next cycl e le ngth i s  in cre a se d in  orde r to  shift the next end-of-a -cy c l e  later.     Figure  4  shows the  comparison  of th e transition time  will be  taken versus t he  current  offset in the d i fference of  p .  The value  of   p  will limit the amount of t he change in  the total green  interval. Whe n  the  system  use s  the   p  va lue of 20%,  G lim it  is 16 se con d (comp u ted on li ne  3 of   algorith m  1). The amou nt of addition or  subtra ction o f  the cycle length ( ) will be no more than  16 se co nd s. It can be sho w n in the    90 100 110 120 130 140 150 8:0 0 :00 8:0 1 :00 8:0 2 :00 8:0 3 :00 8:0 4 :00 8:0 5 :00 8:0 6 :00 8:0 7 :00 Cycl e   le ng t h   (s ) Ti m e   (a . m . ) = 0s = 15s = 30s = 45s = 75s = 90s = 1 05s Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM NIKA   ISSN:  1693-6 930       Pre-Timed and Coordinated Tra ffic  Cont roller Sy s t em s  bas ed on  AVR .... (Freddy  Kurniawan)  793 Figure  4  (c a s p  = 2 0 %), when the o ffset erro r ( ) is greate r  th an 16 secon d s, the  transitio will  take  mo re t han  one  cy cl e. In ge ne ral,  wh en   is e qual  or l e ss t han  a h a lf of  the   cycle l ength,  the larg er th e  value of  , the longer the transition  will  take. In the  case, the  cycle  will be  slightl y  short e r duri ng t he transition. Otherwi s e, when   is  greate r  tha n   a half of the  cycle  length, the l a rge r  the val u e of  , the shorter the transition  will ta ke. In the  case, the next cy cles   will be sli ghtly longer d u ri ng  the transition .          Figure 4. The  transition tim e  versu s  offset        Figure  4  also  sho w s th at the larger the  value of  p , the shorter the tr ansition will take.  Whe n  the   system  co nstrai ned to  a dd  or su btra ct  the   total green  in tervals no  mo re th an  10%,  a  900-se co nd s is  req u ire d   to achieve ti ming  synchronization  wh en the  value  of   is from  60   se con d s t o  6 8  se con d s.  H o wev e r,  a low e r v a lue of   p  will make the transition sm oother.       3.2 Memor y   Usage and  CPU Utiliz ation  The Traffic  Controlle r Progra m  at the master  cont rolle r use s  6 . 5% of flash memory   spa c e  an d 6. 2% of SRAM  sp ace o n ly  as  sh own  in   Table  2. Th e  memo ry u s a ge of th e lo cal  controlle r is  greate r  tha n   the ma ster b e ca use  there  is a  coo r din a tion alg o rith m at the lo cal  controlle r. M ean while, the  databa se  co ntains th sig nal-timin g pla n s of  ma ster  controlle r takes  place 4.7% of EEPROM space only  and the database  at the local c ontroller takes pl ace a larger  spa c e d ue to the addition d a ta for offset ( θ ) and limite r  ( p ). The re p o rt of memory usage  can  be   sho w n in Ta b l e 2.      Table 2. Mem o ry usa ge of the micro c ontroller  Memory types   Capac ity   (Byte)  Memory use d   Master  Local   (Byte) (%)  (Byte)  (%)   Flash   1310 72   8574   6.5 1091 4  8.3  SRAM  4351   271   6.2  337   7.7  EEPROM 4096   192   4.7  252   6.2      In general, when exe c utin g the Traffic  Contro lle r Progra m , in the period of on e-second  interval avail able, the CP U only spends l e ss  than 10 milli seco nds on processing the T r affi Controlle r Progra m . The CPU utilizatio n is less than   1%; this means that in most of the tim e  the  0 10 0 20 0 30 0 40 0 50 0 60 0 70 0 80 0 90 0 0 2 04 06 08 0 1 0 0 1 2 0 Tr a n s i t i o n   Tim e   (s ) C u rre n t   Of f s e t   (s ) Evaluation Warning : The document was created with Spire.PDF for Python.
                          ISSN: 16 93-6 930   TELKOM NIKA   Vol. 12, No. 4, Dece mb er 201 4:  787  – 794   794 CPU in idl e   state. From t he fa ct that  memory  usage and  CPU  utilization are low, it can be  con c lu ded th at Traffic Con t roller Prog ra m can b e   exp ande d wid e ly by adding  a n y  features of t h e   traffic co ntroll er sy stem wit hout  ch angi n g  the microco n trolle r.      4. Conclusio n     A pre-tim ed a nd coordinate d  traffic cont roller  system  can  be impl e m ented b a se d on an   ATmega1 28A  micro c ont rol l er. Th syst em u s e s   th e  sig nal -timing  plan s f o da ily and  we ekl y   basi s  in a databa se that will be allocated to  manage vehicl e flow. The timing of the loca l   controlle r ca n be synchro n ize d  to the timing of  the master  cont rolle r. The transitio n time for   synchro n ization only take s one to several cycle s . Th e memory u s age of the micro c o n troll e r i s   lowe r than 1 0 %, while the  CPU utilization is no  m o re than 1%, thus the  syste m  can b e  wi dely  develop ed.       Ackn o w l e dg ement  The re sea r ch  is fully supp orted by The  Mi nistry of Educatio an d Culture Indone sia  unde r g r ant  Hiba h Bersai ng  Dikti ”. T h e  autho rs woul d like  to tha n k  to  Kopertis Wilayah V ” a nd  STT Adisutjipto ” for thei r sup port.       Referen ces   [1]  F a zli S., Moha mmadia S., R ahma n i M. Ne ural N e t w ork b a sed V ehic l Classific a tio n  for Intelli ge nt   T r affic Control.   Internation a l J ourn a l of Softw are Eng i n eeri n g & Applic atio n s . 2012; 3(3): 1 7 -22.   [2]  Khan BA, La i  NS. An Advance d  F u zz y   Log ic bas ed  T r affic Control l er.  Internatio n a l Jour nal  of  Innovati on i n  the Digit al Econ o m y .   20 14;  5(1) : 31-40.   [3]  Askerzad e IN,  Mahmo od M.  Contro l the E x tensio n T i me o f   T r affic Light i n  Sin g le  Juncti on b y   Usin g   Fuzz y  Logic.  In ternatio nal J o u r nal of El ectrical  & Co mp uter  Scienc es IJECS – IJENS . 2010; 10(2): 4 8 - 55   [4]  Z hu H, F a n H,  Guo S. M o vin g  Ve hicl e D e te ction  and  T r acking  in  T r affic Images  bas ed   on  Horiz onta l   Edges.  T E LKOMNIKA Indone sian Jo urna l of Electrical E ngi neer ing . 2 013;  11(1 1 ): 647 7-6 483.   [5]  Xi XF , Smith  S, Barl o w  G.  Sche dul e-Driv en  Coor din a tio n  for  Rea l -T ime T r af c Net w ork Co ntrol.   Procee din g s 2 2 nd  Internation a l Co nferenc on Auto mat ed  Plan nin g  an d Sched uli ng  (ICAPS). Atibaia,   Sao Pau l o, Bra z il. 201 2: 323- 331.   [6]  Shamsh irba nd  SS. A Distributed Ap proac h  for  Coordi nati on bet w e e n  T r affic Lights b a s ed on Gam e   T heor y .   T he Internati ona l Arab  Journa l of Informati on T e ch n o lo gy . 201 2; 9(2): 148-1 53.   [7]  W u  L, Yang L ,  Liu H, Z han g Y. Bee Insp ired  Z o n a l V e hicle  Ro uting  Algorit hm in U r ban T r affic.   T E LKOMNIKA Indon esi an Jou r nal of Electric al Eng i ne eri n g .  2014; 1 2 (9): 6 699- 671 0.   [8]  Dotoli M, F anti  MP, Meloni C .  Coordi natio n  and  Re al T i me Optimizatio n  of Signal-timi ng pl ans for   Urba n T r affic  Contro l.  IEEE International Conf erence on Networking,  S ensing and  Control . 20 04; 2 :   106 9-10 74.   [9]  Dobr e C. Usi ng Intel l i gent  T r affic signa ls  to Red u ce V ehicl e Emiss i o n s.  Internati o n a l Jo urna l o f   Innovativ e Co mp utin g, In formati on a nd C o ntrol . 201 2; 8(9 ) : 6283-6 3 0 2 [10]  W ang K, Hua n g  L, Z hai Y, W ang  Y. T r affic  Sign al S y nc hro n izati on i n  Do u b le R i ngs  Roa d  Structure.   Journ a l of Infor m ati on  & Co mputatio na l Scie nce . 201 2; 9(2) : 395-40 2.  [11]  F edera l  Hi gh w a y  A d min i strati on.  T r affic Sig nal-ti m i ng Ma n ual .  F e d e r a l  H i g hw ay   A d mi ni stration. U.S.  Dep a rtment of T r ansportation.  2008; 6 1-6 49.  [12] Primantari  LF A.  Koordin a si   Pengat uran  Lamp u  La lu L i ntas (Studi  k a sus: Ruas J a la n Prof. Dr.   Sorhars o  - A d Sucipto - A.Yani - A d i S oemarmo).  Jurnal T e knik S i pil  dan Arsitektur . 20 10; 8( 12): 1 3 - 30.   [13]  Jatmiko W ,  Azurat A, W i bo w o  AH, Marih o t H,  W i caksana  M,  T a kaga w a  I, Seki y a m a  K, F u kuda T .   Self-Organizing Ur ban T r affic  Control Arc h it ecture  w i th S w a rm-Self Organizing M a p in  J a karta: Signal  Contro l S y ste m  and Simul a tor,  Internation a l  Journ a l on S m art Sens in g a nd Intell ige n t Systems . 20 10;   3(3): 443- 46 5.  Evaluation Warning : The document was created with Spire.PDF for Python.