Indonesi an  Journa l  of El ect ri cal Engineer ing  an d  Comp ut er  Scie nce   Vo l.   1 3 ,  No.   2 ,  Febr uar y   201 9 , pp.  591 ~ 59 7   IS S N: 25 02 - 4752, DO I: 10 .11 591/ijeecs .v1 3 .i 2 .pp 591 - 59 7          591       Journ al h om e page :  http: // ia es core.c om/j ourn als/i ndex. ph p/ij eecs   Perform ance ev alu atio n  of arithm etic codi ng data  co mp re s sion  for inte rn et of thi ngs app lications       No r  A sil ah   K ha ir i ,  Asr al Bahari J am bek ,  Riz alafa nde  Ch e I smail   School  of  Mi cro el e ct roni c Engi n ee ring ,   Univ ersiti  Mal a y s ia Perl is ,   Mal a y s ia       Art ic le  In f o     ABSTR A CT   Art ic le  history:   Re cei ved   Sep   3 , 2 018   Re vised  N ov   10 , 2 018   Accepte d  Nov   2 4 , 201 8       W ire le ss   Sensor  Network (W SN )   is  known  for its  aut onom ous  sensors ,   where   it   h as  b ee n   foun d  to   be   usefu l  d uring  the  dev el o pm ent   of   Int ern e t  of   Th ings   (IoT )  d evi c es.   H oweve r,  W SN   is  al so  known   for   its   li m it ed   ene rg y   suppl y   and   m emory   spac e, as   it  c arr i es  sm al l - size d   batter ie s   a nd  m emor y   spac e.  Henc e, a  dat a   compress io n  appr oa ch  h as  b ee n  int rodu ce d   i n  thi s  p ape r   with   the  purpose   of  solving  thi s  p art i cul ar   issue.   T his  pape r  fo cuse d  on  the   p erf orm anc e  of   the  Arithmeti c  Cod ing  al gor it hm .   Te m per at ur e  (T emp),  Sea - L evel  Press ure   (Press ure ),   strid e  interva l  (Strid e),   and  h ea rt   ra t e  (BPM )  were   c hosen  as  th e   dat ase t  in   thi s   p roje c t.  Based   on   th e  r esult s,   the  compress ion  rati o  of   T emp,  Press ure ,   Stride,   and  BP M  were   0. 428,   0 . 255,   0. 217,   and   0. 159   r espe ctive l y .   From   thi s  ana l y s is,  BP M  produc e d  the   best  compress ion  rat io .   Undenia b l y ,   th e   Arithmeti c   Codi ng  al gor it hm   is  one  of  the   b est  m et hods  to  com pre ss   rea l - world  dataset s.   Henc e,  b y   using   thi s   appr oa ch,  it   ca n   red u ce  th e  usag e  of   ene rg y   and  m emor y   spac e .   Ke yw or d s :   Ar it hm et ic  Cod in g   Data com pr ess ion   In te r net  of Th i ng s  (IoT )   Re al - world   dat aset s   W i reless  Senso r  N et w ork  ( WSN)   Copyright   ©   201 9   Instit ut e  o f Ad vanc ed   Engi n ee r ing  and  S cienc e .     Al l   rights re serv ed .   Corres pond in g  Aut h or :   Nor Asil ah K ha iri,    School  of Mi cr oelect ronic E nginee rin g,   Un i ver sit i M al ay sia  Per li s,   Pauh   P utra  Cam pu s,  02 600 A rau, Pe rlis, Ma la ysi a.   Em a il : asi la h. kh ai ri9 1@gm ai l .co m       1.   INTROD U CTION   I nter net  of  T hin gs  ( I oT)  can   be   de fine d  as   th e  ne xt  gen e rati on  of  t he  i nternet   ev olu ti on,  w her e   de vice s   and  obj ect s   c onnecte d  via   th e  inter net   al lo w  i nfo rm ation   to  be   delive re d  th rou gh  a   dig i ta l  sign al   [ 1].   By   the  ye ar 2020,  t he nu m ber   of   de vices co nn ect e d via the I oT  m ay  b e as h i gh  a s  7 5 bil li on   [2 ] . Ho we ver, b il li on s  of  dev ic es   co nnec te d  th rou gh  the   inter net  pro duce  a  la r ge   am ou nt   of  data  t o  be   sto red.  Vural   et   al .  [ 3]  sta te d  t hat  bill ion s   of  IoT  de vices   co nnect ed   via   the   inter net  th at   al so  ge ne rate  lo w - rate  tra ffi c  of  m easur e m ent,   m on it or ing,  an d aut om at ion   da ta   are  now a   m ajo r c halle ng e  for n et w ork p rovide rs a nd   t he   internet  as  a  whole.   Accor ding to  t hem , altho ugh ea ch  I oT has a  low rate  o f  t raffic , th e e ntire s um  o f  traff ic   on the c or e  net work is  exp ect e d  to   be   la rg e,   w hich  can  obviously   disru pt  re gu la r  data  tra ff ic .  A  num ber   of   researc hers  ha d  al s o  discusse d  the   possibil it y  of  im plem enting  the   com pr essi on  a lgo rithm   into  I oT   de vices,   w he re  it   ca n  m ini m ise  bo t h  st or a ge re qu i rem ents an d i nput/o utput  proces ses  [4 ] .   The   W irel ess   Sensor   Netw ork  ( WSN)   is  c omm on ly   us ed   in   the   m i li ta r y,  in du st rial ,  m edical ,  a nd   agr ic ultur al   se ct or s   due   to  it s   wireless   ca pa bili ti es.  It  i s  al so   know n  for   it s  auto nom ou s   sen sors  t hat  ha ve  t he  abili ty   to  m on it or   physi cal   or   env i ronm ental   conditi ons.   Th eref or e ,  WSN  i s  use f ul  durin g  the   de velo pme nt  of   Io T  de vices.  H ow e ve r,   se nsor   node  dev ic es  are  kn own  to  ha ve  a  lim it ed  energy  sup ply,  as  they   c arr y  s m al l - siz ed  batte ries.   Alth ough   it   ha s  li m it ed  energy  to   f unct ion,   it   re qu i res  a   l ow  op e rati ng  powe r  i n  orde r  t o  sa ve   energy an d  e xtend  t he  li fetim e o f  t he  sen sor  node [4]. Besi des  that, Jam bek , a nd   K hairi  [5 ]  m entioned   that t he   transm issi on   m odule   ha s   t he  l arg est   power  c on s um ption  co m par ed  to   oth e r  c om po ne nts   of  the   se nsor   node .   It   is  due   to   the   la rg e   am ou nt   of  energy  require d  t o  operate   th e  wi reless  tra nsm it te r  to  tra nsm it   data.  T her e fore,   a   Evaluation Warning : The document was created with Spire.PDF for Python.
                          IS S N :   2502 - 4752   Ind on esi a n  J  E le c Eng &   Co m p  Sci,   Vo l.   1 3 , N o.   2 ,  Fe bru ary  201 9   :   591   –   59 7   592   data  com pr essi on   m et ho d  is  hi gh ly   rec omm e nd e d  to  overc om e  t hese  prob l e m s.  In   this  pa per,  the  Ar it hm et ic  Cod i ng alg or it hm  is p rop os e d t o pro ve  that i t  can p rod uce a hig her com pr e ssion rati o an d bett er  perform ance.     1. 1.       Arithme tic C od in g   Ar it hm et ic   Cod in g  is   known   as  a   m et ho d  for   re placi ng  e ve r y  input  sym bo l  with   a   co de word.  A  stream   of  in put  sym bo ls  a re  re placed  with   a   sin gle  fl oating  po i nt   num ber   as   th e  outp ut   [ 6].    Accor ding  t o  J acob,   So m van s hi,  a nd  To r nek a r  [ 7],  the  Ar it hm et ic   al go rith m   is  a  ver y  eff ect ive  m echan ism   in  el im inati ng   redu nd a ncy  i n  the  e nc od i ng of   data.   Ba sed  on  t he   ex planati on o f   the  A rith m et ic   Cod in g  in p a per [6 ] ,   the   m ai n  obj ect ive   of  t he   A rithm etic  Cod i ng  is  to   al lo cat e  an  i nter va l  to  eac h  po te nt ia l  sy m bo l.  Th e  decim al   nu m ber  is  la te r  assigne d  t o  the  inte rv al ,  wh e re  the  rang e  of   t he  inter va l  is   0. 0  t o  1.0 .  Af te r  t he  pr oce ss  of   rea ding  th e  input  of   t he  sym bo l  is  com plete d,   th e  interval  is  s ubdi vid e d  int o  s m al le r  intervals  in  pr opor ti on   to  the  in put  sym bo l’s   pro bab il it y.  T hi s  subinte rv al   i s  div ide d  int o  par ts   acc ordin g  t o  the   pr ob a bili ty   of  the   sy m bo ls  from   th e  in put.  This  ste p  is  re peated  for  e very   sing le   in put  sy m bo l.  Finall y,  any  fl oating  po i nt  num ber   f ro m   the  final  i nter val  un i qu el y  deter m ines the in pu t data.     1. 2.       Pre vious  A ri t hmetic  C od in g Rese arc h R e ferences   Ar it hm et ic   Cod in g  is  recog nised   as   one   of   th e  best  data  c ompressi on  a ppr oa ch.  T he   re fer e nces   f or  t he   Ar it hm et ic   al go rithm   are  li m i te d  an d  dif ficul t  to  obta in   beca us e  of  pate nt  is su es.   He nce,   only   4  su it able  jour nals   wer e  selec te d f or r e fer e nces.   Sh a nm ug asu nd aram ,  and  L ou rdusam y  [6 ]   pro p os ed   a   tra di ti on al   Ar it hm et ic   Cod i ng  m et hod.  T his   pap e r   is  fo c us e d  on  surveyi ng   the   di ff e ren t   ba sic   lossless   da ta   com pr essio n  al gorithm s.  Ba sed  on  t his  pap e r ,   the  e xperim ental   resu lt s   an d  com par iso n  of  t he  l os sle ss   com pr essio n  a lgorit hm s  us ed   the   Stat ist ic al -   a nd  Dict ion a ry - ba s ed  a ppr oac hes.  H oweve r,  the   Stat ist ic al   ap proac hes  we re   ch os e n  a s  a   r efere nce  due  t o  t he  com par ison  bet ween  the  Ar it hm et ic   app r oaches  to  oth e r  data  com pr essio ns ,  wh e reas  t he  Dict ion ary  a ppr oa ches   on ly   us ed   the  Lem pel  Ziv.  In  this  pro j ect ,  t he   auth ors  only   us e d  12  dif fer e nt  ty pes  of   te xt  file s  as  the  dat aset s.   Fr om   the  obser vation,  this  Ar i thm e ti c  al go rithm   has  been   prov e n  to  be  on e  of   t he  best  perf or m ers  am on g  oth e r   m et ho ds  by  ac hieving  t he  range  of   0.5 7  to   0. 76  in  te rm s  of   c om pr essio n   a nd  5.15  in  a ver a ge  of   bits  per   c har act e r   (BPC).   Pape r  [7 ]   st ud i ed  t he  c om par at ive  analy sis  i n  te rm s  of  the   com pr essio n  e f fici ency.  T he  a uthors  de al t   with   lossless   c om pr essio n  a ppr oac hes   su c h  as  the   Huff m an,  A rithm et ic ,  LZ - 78,  a nd   G ol om b  Cod i ng.   En glish  t ext  file s,  Lo g  file s,  Sorte d  w ord  li sts,  an d  ge om et rically   di stribu te d  data  t ext  file s  were  us e d  in  the  pro j ect   as   dataset s,  as  we ll   as  the   M AT LAB  softwa re  durin g  the   im p lem entat ion   process.   Accor din g  to   th e  a utho rs,  th e   Ar it hm et ic   Co ding  was  su it a ble  f or   m od er at e  and   high  f reque ncy  oper at ion .  Howe ve r,   the  al gorith m   al so   pro du ce d hig h com pu ta ti on al   com plexity  an d  sl ow   com pr e ssion spe ed  com par ed  to t he Huffm an  ap pro ach.    Ba sed  on  pa pe r  [8 ] ,   P orwal,   Chau dhary,   J oshi,  an d  Jai n  f ocused   on  the   lossless  data  c om p ressio n  m et ho dolo gies   an d  c om par is on  of  their   pe rfor m ances.  The   aut hors  us e d  a   tradit io nal  Ar i thm e ti c  al go rit hm   in   their  pro j ect ,  wh ic h  was  sim il ar  with  pro j e ct s  [6 ]   a nd  [7 ] .   H ow e ve r,   t he y  on ly   us e d  si ng le - data  c ompressi on   durin g  the  c om par at ive  per f or m anc e,  su c h  as  the  H uffm an  m et ho d.   Te xts,  vid e os ,  a udios ,  an d  im ages  were   us e d  as   dataset s.  Acc ordin g  t o  the   res earc hers,  t he  Ar it hm et ic   al gorithm   produce d  a   high   com pr essio n  ra ti o  an d  us e d  le ss   m e mo ry  sp ace .  Howev e r,  the   wea kn e ss  of  this   al gorithm   is  si m i la r  to   pre vious  pro j ect   [ 7],  w hi ch  ha d  slow   com pr ess ion  a nd  deco m pr essi on  proce sses.    Pr oject   [ 9]  was   qu it e  dif fer e nt  from   the  pr evi ou s  pro j ect s  in  te rm   of   it s  us ag e  of   a  m od ifie d  Ar it hm et ic  appr oach.  T he  researc her  f oc us e d  on  pro pos ing   a  ne w  al go rithm   cal le d  the  j - bit  enc odin g  (JB E),  w her e   it   has  the  abili ty   to  m ini m ise   the  siz e  of   data.  This  m od ifie d  al gor it h m   is  a  com b inati on   of  the  Ar it hm et ic   (A RI)  with   the  Ru n - Len gt h  E nc od i ng  ( RLE),  B urr ows - Wh eel er   Tra ns f or m   (B W T ) ,  Mo ve - To - F r on t  (MTF ),   an d  JBE .   Durin g  the  co m par at ive  proc ess,  the  resea rc her   us e d  f our  a ppr oach es:   a  c om bin at ion   of   t he  AR I  with  R LE,  the   ARI   with   B WT ,  a nd  MTF ,  th e  ARI   with   B WT ,  a nd  RLE   an d  the  ARI   wit h  R LE,  B WT,  MT F,  a nd  RLE .  Im ages,   te xts,  bin a ries,  and  a ud i os   we r e  us e d  as  datas et s.  Ba sed   on  t he  obser vatio n,  the   pro pose d  a lgorit hm   pr od uc ed  a   high c om pr ession rati o i n 5 da ta set s.     1. 3.       Co m pari so n  of the Per fo rm an ce  of P reviou s  Arith metic C od in g Rese arch Refe rences   Seve ral  data  c om pr essio n  proj ect s   in  t he  pa st  ha ve  us ed   the  A rithm et ic  ap proac h,   t hough  not  as   fr e qu e ntly   as  ot her   ap proac he s  su c h  as  the  H uffm an  and   Le m pel - Ziv - W el ch  (LZ W).  Howev e r,   s om e  of   these   pro j ect s  us e d  a  m od ifie d  A rithm e ti c  app r oa ch  in  orde r  to  achieve  a  bett er  pe rfo rm ance.  Table  1  s ho ws  the   su m m arisation   of the c om par ison b e twee n  th e Ari thm etic al gorithm s:           Evaluation Warning : The document was created with Spire.PDF for Python.
Ind on esi a n  J  E le c Eng &  Co m p  Sci     IS S N:  25 02 - 4752       Perf orma nce e valu ation of  a r it hm et ic  codin g da t a  c ompre ssion f or i ntern et …   ( Nor Asila h  K ha iri )   593   Table  1.  C om par iso n of t he A rithm etic Cod i ng A l gorithm  i n  P re vious Pr oject s   Descripti o n   [ 6 ]   [ 7 ]   [ 8 ]   [ 9 ]   Year   2011   2012   2013   2012   Fo cu s   Su rvey  o f  dif f erent  bas ic  lo ss less  data  co m p ressio n  algo rith m s   Co m p a rative  an al y sis  in  ter m s  of  their co m p ressio n   ef f icien cy  and  sp eed   Fo cu s o n  los sles s  d ata  co m p ressio n   m e th o d o lo g ies an d   co m p a res thei r  p erfo r m an ce   Prop o sed  new algo rith m   th at can  m in i m ise t h e  size o f  data   Architectu re/   Alg o rith m   Alg o rith m   Alg o rith m   Alg o rith m   Alg o rith m   Ty p e of  Data   Co m p r ess io n   Arith m eti c Co d in g   Arith m eti c Co d in g   Arith m eti c Co d in g   RLE  +  BW T  +  M TF  +  JB E  + AR I   Co m p a ri - so n  of   Oth er  Dat a  Co m p r ess io n   Sh an n o n - Fan o  Co d in g ,  Hu f f m an ,  Ad ap tiv e  Hu f f m an ,  Ru n - Len g th   Enco d in g   Hu f f m an ,  L Z - 8 ,  G o lo m b   Co d in g   Hu f f m an   RLE  +  ARI ,  B W T  +  MT F  + AR I,  B W T  +  RLE  +  ARI ,  RL E  +  BWT  +  MT F  +  R LE  +   ARI   Dataset   Text d ata   Eng lish  text f iles, log  f iles,  so rted wo rd lists ,  a n d   g eo m et ricall y  dis tr ib u ted   d ata text f ile   Text, vid eo ,  au d io ,  an d   i m ag e   I m ag e,  text, bin ar y ,  an d   au d io   Ad v an tag e   Bes t perf o r m an ce i n  the  co m p ressio n  r atio   an d   lo w bits  per chara c ter   Can  perf o r m  well  f o r  tex ts  th at con tain  hig h ly  sk ewed  p rob ab ility  sy m b o l s   Hig h  co m p ressio n  r atio ,  less   m e m o r y  sp ace   Hig h  co m p ressio n  r atio   in  5 ty p es o f  f iles   Disad v an tag e   No t   stated   Hig h  co m p u tatio n al  co m p lex it y ,  less sp eed   Slo w co m p ressio n   an d   d eco m p r ess io n   No t stated       Ba sed  on  the  data  colle ct ed   in  t able  1 ,  pro j ect   [ 6]  wa s  t he  m os t  su it ab le   pro j ect   to  be   us e d  as   a   ref e ren ce .  O ne  of  the   sim il ariti es  of  proj ect   [ 6]   with   the   oth er   pr oj ect s   is   in   the  im ple m entation  of   the   Ar it hm et ic   al gorithm   m eth od  in  t he  pr oject .  Proj ect   [6 ]   us e d  the  tra diti on al   A rithm etic  appro ac h,   w hich  was  al so   s i m i la r  with  proj ect s  [ 7]  an d  [ 8].  Eac h  of   t hese  project s  us e d  the  t ext  file   as  the   dataset .  A ut ho r s  in  [ 6]  use d  m ulti ple  ty pes  of   te xt  file s  in  orde r  to  pro duce  dive rse  resu lt s.  Be side s  that,  the  ad va ntage  of   pro j ec t  [6 ]   is  alm os t  s i m i la r   to o t her p roject s,  in  which  it  had  bette r  c om pr essio n rati o.   Ba sed  on  the  obser vatio n,   pa per   [6 ]   was  s el ect ed  as   a  ref e r ence  not  only   f or   it s  sim il arit i es,  but  al so   for  it s  own  uniqu e ness .  T he  m easur em ent  m et ho d  i n  pa pe r  [ 6]  is  dif fer e nt  to  ot her   pa pe rs  because   it   us e d  the   com pr essio n  ra ti o  an d  BPC   m easur em ent  to   m easur e  t he  pe rfor m ance  of  da ta   com pr essio n,  w herea s  m os t  of   the  pr oj ect s   us e d  on ly   t he  c ompressi on  rati o  t o  m easur e  t he  pe rfor m ance  of  com pr essio n.   T her e fore,   it   pro du ce d  a  wide   ra nge  of  res ults.  Howe ve r,   pro j ect   [ 6]  pe rfor m ed  the  e xp e rim ent  qu it e  dif fer e ntly   from   the  oth e r  proj ect s .   This  pa per  divi ded  the   data  c om pr essio n  i nto   t wo  cat e gories:   sta ti sti cal -   and  dicti on a ry - base d  com pr e ssi on   te chn iq ues .  Th e  aut hors   di d  no t   lum p  them   to gethe r  i n  on e  gr oup  due   to   their   a bili ti es.  I n  sp it e   of  t his,  t he  resu lt s  of   this  pap e r  had   m ore  releva nce,  as   it   did   not  m ix  th e  res ults  of   s ta ti sti ca l  data  com pr essio n  wi th  the   dicti on a ry - ba s ed data  co m pr e ssion.   Pape r  [6 ]   wa s  chosen   as   the   best  ref e re nce  pap e r   beca us e   it   is  nea rly   si m il ar  with  t he   pr opos e d  pro j ect .  Alth ough  it   was  ch os e n  as  a  refe ren ce   paper,  the  Ar it hm et ic  Cod in g  in  [6]   req uire d  a   m inor   m od ific at ion   t o  m eet   the  re qu i rem ents.  O ne  of  the   exa m ples  was  a  m od ifie d  ve rsi on  of  t he  Ar it hm etic   al gorithm . T he   Ar it hm etic  al go rithm   require d s om e m od ific at ion   to   s uppo rt  real - w or ld   da ta set s. M os t  of  these   pr e vious   pro j e ct s  did   no t   use   a  num ber ing  te xt  file   dataset ,  hen ce   re quiri ng  certai n  al te rati on s   to   al lo w  t he  com piler  to  process  the  num ber i ng   data.  T his  pro pose d  pro j ect   is  f ocu s ed  on  c ollec ti ng   real - w or l d  da ta set s .   Ther e f or e,  the   env i ronm ental  an d bi om edical d at aset s  wer e   s el ect ed  f or it s  un i qu e  p at te r ns.       2.   RESEA R CH MET HO D   The   proc ess  of  t he  Ar it hm etic  Co ding  al gorithm   is  e xp l ai ned  in   this   s ect ion   us i ng  t he  flo wc har t  appr oach.  T his   al gorithm   can   on ly   sup port  num ber ing  du e   t o  t he  us e   of  th e  do ub le   da ta   t ype.  The   str uct ur e   of   the  al go rithm   was  buil t  in   th e  C  pro gr am m i ng  la ng uag e .  I n  t his  pro j ect ,  i t  is  c on si der e d  as  1  byte   f or  a   sing le   char act e r,   incl ud i ng  a  new  li ne  of   c ha racter s. T he  ou t pu t  of  the  c om pr essi on  was   pri nte d  in  the  te xt  file   form a t   (. txt)   by  ass umi ng   t he  f or m at   o f  file   that  will   be  im ple m ent ed  in  t he  WSN   durin g  t he  tra ns fe rr i ng  of  th e  data.   More ov e r, t he a lgorit hm  o f  A rithm etic w as  m od ifie d  to s ui t wit h  the  r e quirem ent.   The  flo wch a rt   of  the  A rithm etic  al go rit hm   was  div i ded  into   tw o  par ts:   c om pr essio n  a nd  deco m pr es si on.  Fig ure  1  il lus trat es  the  proc ess  of  data  c om pr ession  for  the  A rithm et ic  Co ding  a pproach.  I n  com pr essio n,   t he  raw  data   f rom   the  .txt  f or m at   file   was   inse rted i nto  ar ray1.  I n t he   nex t  s te p,   a rr ay 2 c opie d t he   data  from   arr a y1  to   pr e ser ve  the  or i gin al it y   of  the   a rr ay 1  s equ e nce.   T he   l ist s  of  data  i nsi de  a rr ay 1  were  the n  div ide d i nt o  10  data  an d st ore d col um n t o co lum n.   The dat a   inside  the  c olum ns   wer e  arr a ng e d i n a n asc e ndi ng   Evaluation Warning : The document was created with Spire.PDF for Python.
                          IS S N :   2502 - 4752   Ind on esi a n  J  E le c Eng &   Co m p  Sci,   Vo l.   1 3 , N o.   2 ,  Fe bru ary  201 9   :   591   –   59 7   594   order,  si nce  it   was  ea sie r  for   the  c om piler  to   co unt  the   re pe ti ti on   of  t he  da ta .  The   fr e qu e ncy,  pro bab il it y,  an d  range  of the  re petit ion s  of the  d at a  wer e  lat er  coun te d  a nd st or e d  i nto  a rr ay 3.             Fig ur e  1.  Fl owcha rt  of   A rithm etic Cod in g com pr essio n  a lgorit hm       The  pro ba bili t y  an d  range   of  the   rep et it io ns   we re  cal c ulate d  base d  on  the   eq uatio ns  ( 1)  a nd  ( 2) .   Eq uation  ( 1)  was  div i ded  by   10  du e   to   a  sing le   c olu m n  requirin g  10  da ta .  O n  t he  ot her  ha nd,   eq ua ti on   (2)  consi sts o f  tw o eq uations:  L owRa nge a nd  H igh Ra ng e . E qu at ion   (2) was a dap te d from  Salom on ’s boo k [ 10 ] .     Pr oba bili ty  = Fr eq ue ncy ÷ 1 0   (1)     Lo wRan ge  =  P rev i ou s HighRa ng e ;  HighRa nge = L ow Ra ng e  + Freq ue ncy   (2)     Fo r   t he  ne xt  st ep,  the   c om pil er  l oope d  a rr a y2  un ti l  t he  i ndex   becam e  zero  value.  Fi rst,   the   c om piler  chec ke d  the  e xi ste nce  of   valu e  0  in  the  i nd e x  of  ar ray2.  T he  com pr essi on  proc ess  will   occur  if  the  va lue  di d  no t  e qual   to  0.  The  c om piler  us ed  the  A rithm et ic   equ at io ns   and   t he  data  in side  ar ray3  dur ing   th e  com pr e ssion  process .  Be f or e  the  c om piler  us e d  the   e qu a ti on,  t he  sim il ari ti es  of  the   val ue s  in  ar ray2  a nd  a rr ay 3  wer e   r equ i red.   The  c om piler  cou l d  the n  exec ute  the   proce ss  by  obta ini ng  th e  data  from   arra y3  an d  determ ine  the   cu rr e nt  ind e x  value   of  a rr ay 2  by  m odulo  wi th  2.   If  the   value  was   eq ual  t o  0,  it   will   us e   eq uatio n  (3).  Othe rw ise ,   it   will   us e   the m od ifie d  e qu at io n ( 4) .  E quat ions ( 3) a nd (4)   we re a dap t ed fr om  b ook [ 10 ] .   St ar t   In p u t  da t a  i n t o  array 1 .  Co p y  dat a  i n t o  array 2 .  D i v i d e d at a  i n s i d e array 1  into   1 0  da t a f o r  ev ery  inde x  i n  array 1  and   a rra n g e   d a t a  i n s i d e array 1  i n  a s ce n d i n g  or d er     Co u n t  fre q u en cy ,  p ro b a b i l i t y ,  an d  ra n g e of  value a n d  s t o r e da t a  i n t o  n ew  array ,  array 3   Co m p res s   d a t a by  us e  A ri t h m et i c eq u a t i o n ,  an d   array 3  data   Is  i n d ex   o f arr ay 2   %  2 = 0 ?   N ew L o w  =  O l d L o w   + (O l d H i g h   -   O l d L o w ) *  L o w Ran g e   N ew H i g h  =  O l d L o w  +  (O l d H i g h   –   O l d L o w ) *  N ew L o w  =  (O l d L o w   *  1 0 ) +  ((O l d H i g h  *  1 0 )  –   (O l d L o w * 1 0 ))  *   L o w Ran g e   N ew H i g h  =  (O l d L o w   *  1 0 ) +  ((O l d H i g h  *  1 0 )  –   (O l d L o w   *  1 0 ))   *  H i g h R an g e   D ecrem en t  of i n d e x   array 2   Pri n t   o u t p u t  of  d a t a  c o m p res s i o n   i n t o  . t x t   fo rm at   L o o p  array 2  u n t i l  en d   Is  i n d ex   o f arr ay 2   = 0 ?   St o re o u t p u t   o f c o m p res s  da t a  i n t o   n ew   array   E n d   Y es   No   Y es   No   Evaluation Warning : The document was created with Spire.PDF for Python.
Ind on esi a n  J  E le c Eng &  Co m p  Sci     IS S N:  25 02 - 4752       Perf orma nce e valu ation of  a r it hm et ic  codin g da t a  c ompre ssion f or i ntern et …   ( Nor Asila h  K ha iri )   595   NewLo w  =  O l dL ow + (Old H igh   -   OldL ow)   *  L owRa nge   NewHig h  =  O l dL ow + (Old H igh   –   OldL ow)  *   HighRa ng e   (3)       NewLo w  =  (OldL ow * 1 0) +  ( (O l dH i gh * 10 )  –   ( OldL ow *10)) * L owRa ng e   NewHig h  =  (O ldLow  * 1 0)  +   ((Old High  * 1 0)  –   ( OldL ow  * 10)) *  H i gh R ang e   (4)     Af te r   the   cal cul at ion   process   is   com plete d,   t he   in dex  in   ar ray2  decr em ented  and  lo oped   unti l  it   becam e   0.   The n  it   st or e d  th e  ou t pu t   of  the  c om pr essed  data  int o  a   ne w  a rr ay .   Finall y,  it   pr i nted   the   outp ut  of  com pr ess e d  data into  the  .t xt for m at .   The   pr ocess   of   deco m pr essi ng  wa s  dif fer e nt  a nd  qu it e   di ff ic ul t  due  t o  it s   re quirem ent  to   pro cess  a   r ow   of  se par at e  dat a  be fore   com bin in g  it   i nto   a   si ng le   li ne  of  data.  Fi gure  2  sho ws  t he  process   of  data   dec om pr essio n  us in g  t he Arith m et ic  Cod ing a ppr oach.          Figure  2 .  Flo w char t  of the  A rithm e ti c Cod in g decom pr essi on alg or it hm       The  first   ste p  of  deco m pr essi on  was   to   in pu t   the  c om pr esse d  data   into   ar ray 4.  The n  the   co m pi le r rea d  the  data  insi de  arr ay 4.  For  t he  nex t   ste p,  the   c om piler  loope d  ar ray4  r ow  by   row  unti l  the  e nd.   First,   the   co m pi le r  identifie d t he e xistence  of   val ue 0   in  in de x  of  ar ray4.  If  it   does  no t  e qu al   t o 0 , t he c om pil er  the n set   the  i ntege r  of   m yL oop  as   10,  as  t he  sys tem   was  set   by   storing  10  da ta   for  eac h  c olu m n.   The   de com pr essio n  proces s   occurre d  by   usi ng  dec om pr es sed  A rithm etic   eq uatio ns   a nd  arr ay 3  data.  T he   com p il er  wa s   re qu i red  to   ide ntify   St ar t   In p u t  da t a  i n t o  array 4 .  Read  c o m p res s i o n   d at a i n s i d e ar ray 4     D eco m p res s   d a t a by  us e A r i t h m et i c e q u at i o n ,  a n d  array 3  da t a   Is  m y L o o p   > 5 ?   N u m  =  (Co m p res s i o n Co d e  -   (L o w Ra n g e *  1 0 0 0 0 0 ))  /   Pro b ab i l i t y   N u m  =  (Co m p res s i o n Co d e  -   L o w Ran g e)  /  Pro b a b i l i t y     D ecrem en t  of m y L o o p   Pri n t   o u t p u t  of  d a t a d eco m p res s i o n  i n t o  . t x t  form at     L o o p  array 4  row  b y  r o w  u n t i l  e n d   Is  m y L o o p  =  0 ?   E n d   Y es   No   Y es   No   m y L o o p  =  1 0   St o re o u t p u t   o f  d ec o m p res s  da t a i n t o   n ew   array   D ecrem en t  of arr ay 4   Is  i n d ex   o f arr ay 4  =  0 ?   No   Y es   Evaluation Warning : The document was created with Spire.PDF for Python.
                          IS S N :   2502 - 4752   Ind on esi a n  J  E le c Eng &   Co m p  Sci,   Vo l.   1 3 , N o.   2 ,  Fe bru ary  201 9   :   591   –   59 7   596   the  values   of  m yL oop.  If  the   i nd e x  of  m yL oo p  is   bigger   t han  5,   it   th us  re quires  t he   use   of  t he   m od ifie d  eq uatio n  (5).   Othe r wise,  it  w ould  pr oce ed  to  use e qu at ion   ( 6) .  E qu at i on s  (5 ) - ( 6)  were ada pted fr om   book  [ 10 ] .     Nu m  =   (Com pr essio nCode  -   ( Lo wRan ge *  1000 00)) / P rob abili ty     (5)       Nu m  = ( Com pr essio nCode  -   Lo wRan ge) / P roba bili ty   (6)     Be fore  us in g  th is  eq uatio n,   t he   com piler  wa s  r equ i red  to   ide nt ify   the  sim il ari ti es  of  the   val ue s  in   ar ray4  with  ar ray3 .  H ence,  t he  com piler  would  be  a ble  to  e xecu te   t he  pr ocess  by  obta inin g  the  da ta   fr om   arr ay 3.   Af te r   the cal culat io n was c om plete d,  it  sto r ed  the  outp ut  of the  de com pr essed  d a ta  into  a   new a rr ay .  Th e n, the   inde x  in  m yL oop  wa s  decr em ented  and   l oope d  unt il   it   beca m e  0.   If   the  i ndex  of  m yL oo p  was  equ al   to   0,  it   woul d  then  procee d t o t he   ne xt  ste p  by  dec rem entin g  ar ray4.   T he n,   it   id entifi ed   the  i ndex   of   a rray 4.   If   it   is  e qu al   to  0,   it  w il l t hen   pro ceed  by printi ng the  outp ut  of  the d ec om pr es sed data  int o  .t xt for m at .   To   m ake  the   re su lt s  m or e  reali sti c,  real - w or l d  dataset s   f r om   var i ou s   a pp li ca ti on   dom ai ns   w ere  us e d  in   this  pa per .  Th e  dataset s  we re  te m per at ur e   m easur em ent   in  Alor  Seta r  (Tem p)   [ 11] ,  sea - le vel  pr e ssu r e   m easur em ent  in  Alor  Seta r  (Pressu re )  [ 11] ,  s tride  inte rv al   of  healt hy  hu m an  in   fa st - w al ki ng  ( Stride )  [12 ] ,  an d  hear t   rate   of   a n  el it e  at hlete   ( BPM )  [12].   Th e  reas on   Tem p,   P ress ur e ,  Stri d e,   an d  BPM   data  was   use d  in  this   exp e rim ent is b ecau se they  ha d  a  va riet y of  patte rn s .       3.   RESU LT S   A ND AN ALYSIS   This  sect ion  di scusses   the   c om pr essio n  re su lt s  ac quired   from   the  f our   dataset s.   To   es tim a ti ng   t he   perform ance  of  the  c om pr essi on  al gorithm ,  com pr essio n  rat io  cal culat io n  was  us e d  in  t hi s  resea rch.  Fi gures   3  and fi gure  4  il lustrate  the  per f or m ance of the  fo ur  dataset s in  a  ba r gr a ph for m .               Figure  3 .  Size   befor e  and a fte r  c om pr ess for   four  dataset s   Figure  4 .  Com pr essi on r at io  for f our data set s       Ba sed  on  the  f igures,  al l  data set s  decr ease d  after  bei ng   c om pr essed.   Ba s ed  on  these  da ta set s,  BPM  pro du ce d  the  l ow est   c om pr es sion   rati o  of   a bout  0.159.  This   is  fo ll owe d  by   Stride  at   0.217   and  the n  P ress ur e  at   about  0.2 55.  T e m p  dataset   pr oduce d  the  highest  com pr essi on   rati o,   w hich   was  ab out  0.4 28.  T her e fore,  BPM   achieve d  t he  be st  com pr essio n  rati o  am ong  al l  the  dataset s.   The   resu lt   i n  fi gures   3  s hows   that  the   A rithm et ic   is  on e  of   t he  best   appro ac hes  t o  com pr ess  data .  He nce,  the  A rithm etic  app r oach   is  a  s uita ble  for  a pp li ca ti on   on  real - w orl d  dat aset s.  Accor din g  to   th e  obse rv at io n,  the   re su lt s  of  the   c om pr ession  rati o  we re  a ff ect e d  by  t he  le ng th   of   num ber s .  T he refore ,  the   al gorith m   pr oduces   be tt er  res ult  in  c om pr essio n  rati o  w he n  t he  le ng t hs  of   nu m ber s  a re  long e r.   Ba se d  on   t he  res ults,   it   can  be  deduced   t hat  A rithm etic  is  on e  of   t he  best  m et hods   to   com pr ess  real - world  dataset s  by  achie ving  be tt er  com pr ession  rati o.   As a  r esult,  it   has t he   abili ty   to  redu ce  the   us a ge of  m e m or y an d  al s o  c onsu m e less ener gy.       4.   CONCL U SI O N   WSN  is   know n  f or  it s  a uton om ou s  se nsor s   an d  use f uln es s  in   the   I oT   w or l d.  H oweve r,  WSN  is   al so   known   f or  it s  li m it ed e nergy  s upply  an d  m e m or y  sp ace  due  to  t he sm al l - siz ed b at te ry  an d m e m or y.  The refor e ,   the  Ar it hm et ic   al gorithm   was  introd uced  in   t his  pr oject   i n  hope s  of  s olv i ng  just  t his  pro bl e m .  Dif fer e nt  ty pes   of   dataset s  we re  use d  i n  this   pro j ect ,  s uch  as  Tem p,   Pr es su re ,  Stri de,   a nd   B PM.  Ba se d  on  t he  re su lt s  of  the  Evaluation Warning : The document was created with Spire.PDF for Python.
Ind on esi a n  J  E le c Eng &  Co m p  Sci     IS S N:  25 02 - 4752       Perf orma nce e valu ation of  a r it hm et ic  codin g da t a  c ompre ssion f or i ntern et …   ( Nor Asila h  K ha iri )   597   exp e rim ent, the  co m pr essi on  rati o of Tem p,   Pr ess ur e , St rid e, a nd BPM  w ere at  0.4 28, 0. 2 55,   0.217, a nd  0.1 59  resp ect ively .   It   sh owe d  t hat  B PM  pr oduce d  be tt er  com pr essi on  rati o  t han  th e  ot her  th ree   da ta set s.  It   al so  s howe d  that  the   Ar it hm et ic   al go rith m   is  on e   of  the   be st  m et ho ds  t o  c om pr ess   rea l - w or ld   dataset s.  T he refor e ,   by   usi ng   this al gorit hm , it should be  ab l e to m ini m ise  t he  c onsu m ption   of ene rg y a nd m e m or y spac e.       REFERE NCE S    [1]   K.  D.  Chang ,   J.   L.   Ch en,   H .   C.   C hao  and   C.   W .   L iu,   "Th e  Poten ti a l  Cloud  Appl ic a t ion  Model  for   In te rne t  of  Thi ngs  -   Case   Stud y   of   Shopping  Mall s, "  in  2014   Tenth   Inte rnat ional  C onfe renc e  on   Int el li g ent  Informa ti on  Hid ing  an d   Mult imedi a   Sign al  Proc essing  ( IIH - MSP) ,   Kita k yushu ,   2014 ,   pp .   954  –   957 .   [2]   F.  J.  Riggi ns  an d  S.F.  W amba,   " Resea rch   Dire c tions   on  the   Adop ti on,   Us ag e,   and   Im pac t  of  the   I nte rne t  of  Th i ng s   through  th e  Us e   of  Big   Data  Ana l y t ic s,"   in   2015  4 8th  Hawaii   Int ernati onal   Confe re nce   on   S yste m  S c ie nc es  ( HICSS) ,   Hawai i, 2015, p p.   1531   –   1540 .   [3]   S.  Vural ,   P.   Nav ara tn am,  N.   W a ng,   C.   W ang,  L .   Dong  and  R .   T af az ol li ,   "In - net wo rk  cachi ng   of  In t ern et - of - Thi n gs  dat a , " i n   2014  I E EE   In te rnationa l   Confe ren ce on Com municat ions ( ICC) ,   Sy dn e y ,   2014,   pp .   3185   –   3190.   [4]   S.  Sheikh   and  H .   Dakho re,  "D a t a  Com pre ss ion  Te chn ique s  for  W ire le ss   Sensor   Network , "  ( IJC SIT)   Inte rnation al  Journal  of   Computer  Sc ie nc e  and   Information  Te c hnologi es ,   vol .   6 ,   no .   1 ,   pp .   818 - 821,   Nov 2015 .   [5]   A.  Baha r i  Jam bek  and  N.   A.   Khair i ,   "P erf or m anc e  Com par i son  of  Huffm an  And  Le m pel - Zi v  W elch  Dat a  Com pre ss ion  for  W ire le ss   Sensor   Node  Appli ca t i on, "  Ame rican   J ournal  of  App li e d  Scienc es ,   vol .   11,   no.   1,   pp .   11 9 - 126,   Jan   2014.   [6]   S.  Shanm ugasunda ram  and   R.   Lo urdusam y ,   "A   C om par at ive  Stud y   Of   T ext  Com pre ss ion  Algorit h m s,"  Inte rnation al   Journal  of   Wisd om B ased  Comp uti ng ,   vol. 1 ,   no .   3,   pp.   68 - 76,   De c  2011.   [7]   N.  Jac ob ,   P.   So m vanshi  and  R .   Torne k ar,  "Co m par at ive  Anal y sis  of   Lossless  Te x t  Com pre ss ion  T ec hniqu es, "  Inte rnational   Jo urnal  of  Comput er  Applications ,   vol.   56 ,   no .   3 ,   pp .   17 - 21 ,   Oct   201 2.   [8]   S.  Porw al ,   Y.  Ch audha r y ,   J.   Jos hi  and  M.   Jain,  "D a ta   Com pre ss ion  Methodol ogie s   f or  Lossless  Dat a  and  Com par ison  bet wee n   Algor i t hm s,"  Inte rnatio nal  Journal o f  E ngine ering   Sc ie n ce  and  Inno vativ e T e chnol ogy   ( IJ ESIT) ,   vol.  2,   no .   2,   pp .   142 - 147 ,   Mar  2013.   [9]   I.   M.  A.  D.  Suar jay a ,   "A   New  Algorit hm   for  Dat a  Com pre ss ion  Optimiza ti o n, "  ( IJA CSA)   Inte rna ti onal  Journal  o f  Adv anc ed  Comp ute r Sc ie nc e  and   Applications ,   vo l.   3 ,   no .   8 ,   pp .   14 - 17,   Sept   2012.   [10]   D.  Salomon,  Da ta  Compr ession  The  Complete  R ef ere n ce ,   3rd  ed.  New  York,  NY :   Springer - Verl ag   New  York,  In c ,   2004,   pp .   110 - 1 13.   [11]   W ea the r   Underg round,   "https: // w ww . wunderground. com" .   [12]   Ph y sioNet, "ht tp s :/ /ph y s ione t . org ".       BIOGR AP HI ES OF  A UTH ORS       Nor  As il ah  Khai ri  is  cur r ent l y   pu rsuing  her   Maste r  of  Scie n ce   (M . Sc)  in  School  of   Microe l ec tron ic   Engi ne eri ng,   Un ive rsiti  Mal a y sia   Perli s   (UniMA P)  since  Janua r y  2016.   She   completed  bo th  h er   Diploma  and  Ba che lor   of  Com pute r  Sci ence  (H ons)  at   Unive rsit i  Te kno logi   MA RA  (UiTM)  in  2012  and  2015.   Her  rese ar ch  stu d y   is  Design  of  Eff icient  Data  C om pre ss ion  Algorit hm   and  Its   Im ple m ent at ion   in  Portab le   Elec t ronic   Dev ice  for   Inte rne t  of   Thi n gs Appli cations.          As ral   Baha ri  Ja m bek  is  an  As s oci a te   Profess or  at   th e  School  o f  Microe l ec t roni cs  Engi ne eri ng ,   Univer siti   Ma lay sia   Perli s  (Uni MA P),  and  was  a  Program m e  Chai rpe rson  for   the   E lectr oni cs  Engi ne eri ng   De gre e   Program m e,   UniMA P.   He   h as  m ore   tha n   15   y e ars  expe r ie nc e   in   integra t ed   ci rcu it   and  s y st e m   design  in  bot h  the   industr y   a nd  acade m ic   se c tors,   and   has  be en  invol v ed  at  var ious  l eve ls  of   VLSI  design s u ch as  tra nsistor  m odel li ng,   digit al   ci rcu it   d esign,  analogue   ci r cui t   design,  logic   sy nth esis  and   p h y sic al  pl ace   a nd   rout e,  arc hi te c ture  design   and  al gori thm  deve lopment .         Riz alafa nd e  Ch e   Ism ai l  is  an  A ss oci at e   Profess or  of  Elec tron ic  Engi n ee r ing  at  the  School   of   Microe l ec tron ic  Engi ne eri ng,   Un ive rsiti  Mal a y s ia  Perli s  (UniMA P ).   He   serve s  as  D ea n  of   School  of  Microele c tro nic   Eng ineeri ng   UniMA P.  He  o bta in ed  his  Ph. D  from   Newca stle   Univ ersity   in  Microe l ec tron ic s   S y s te m   Design .   His   rese arc h   a ctivit i es  inc lud e   hi gh  spee d   comput er  arithm et ic,  deve lopment   of   high  p erf orm ance  loga ri th m ic  ba sed  proc essor  an d  FP GA   design  pla tform,   high   ac cur acy   vide o   g rap hic c om putati on  and  b iomedical appl i cations.       Evaluation Warning : The document was created with Spire.PDF for Python.