I nd o ne s ia n J o urna l o f   E lect rica l En g ineering   a nd   Co m pu t er   Science   Vo l.   37 ,   No .   2 Feb r u ar y   20 25 ,   p p .   758 ~ 770   I SS N:  2 502 - 4 7 52 ,   DOI : 1 0 . 1 1 5 9 1 /ijee cs .v 37 . i 2 . p p 758 - 7 7 0          758     J o ur na l ho m ep a g e h ttp : //ij ee cs . ia esco r e. co m   Na tural sm a rt  ho me a utom a tion sy stem using  LSTM  bas ed on  ho useho ld behav io ur       M o cha m a d Sus a nto k 1, 2 ,   F a r ha na   Ahm a d P o a d 1 ,   Arif f u dd in J o re t 1 ,   M a uli na   H ilwa   Sa ls a bil la h 2   1 F a c u l t y   o f   El e c t r i c a l   a n d   El e c t r o n i c   En g i n e e r i n g U n i v e r si t i   Tu n   H u sse i n   O n n   M a l a y s i a ,   P a r i t   R a j a ,   M a l a y s i a   2 P r o g r a m St u d i   Te k n i k   E l e k t r o n i k a   T e l e k o mu n i k a si P o l i t e k n i k   C a l t e x   R i a u ,   P e k a n b a r u ,   I n d o n e si a       Art icle  I nfo     AB S T RAC T   A r ticle  his to r y:   R ec eiv ed   J u l   16 ,   2 0 2 4   R ev is ed   Sep   18 ,   2 0 2 4   Acc ep ted   Sep   30 ,   2 0 2 4       sm a rt  h o m e   a u to m a ti o n   sy ste m   (S HA S u ti li z in g   d a ta - d riv e n   lea rn in g   i s   a n   a d v a n c e d   in tern e o t h in g ( Io T )   a p p li c a ti o n   a ime d   to   lea rn   h o u se h o l d   b e h a v i o to   p re v e n m in iatu r   c ir c u it   b re a k e (M CB)  tri p d u e   to   o v e rlo a d .   Un li k e   trad i ti o n a d e term in isti c   m e th o d s,  t h is  stu d y   lev e ra g e a   l a y e re d   AI  m o d e l,   fe a tu ri n g   re a l - ti m e   d a ta  c o ll e c ti o n ,   l o n g   sh o r t - term   m e m o ry   (LS T M )   b a se d   lea rn i n g ,   a n d   a n   a u to m a ti c   c o n tro l   sy ste m .   Th e   LS T M   c l a s sifica ti o n   m o d e g e n e ra tes   p re c ise   ON /OF F   c o n tro l   sig n a ls  se n t   to   Io s m a rtp lu g s,   o p ti m izi n g   a p p li a n c e   u sa g e   a n d   r e d u c in g   th e   ris k   o f   e lec tri c a o v e r lo a d .   Da ta   fro m   sm a rtp lu g   se n so rs,  in c lu d in g   a p p li a n c e   sta tu a n d   e n v ir o n m e n tal   fa c to rs  li k e   p o we c o n su m p ti o n ,   tem p e ra tu re ,   a n d   h u m id it y ,   we re   c o ll e c ted   e v e ry   m in u te  o v e th re e   m o n th s ,   y ield in g   8 0 , 8 1 8   d a ta  p o i n ts.  T h e   sy ste m ' s   p e rfo rm a n c e   wa e v a lu a ted   o n   th r e e   a p p li a n c e s:  Air  Co n d it i o n e r,   T e lev isio n ,   a n d   Wate P u m p   M a c h in e .   Re su l ts  sh o we d   h i g h   a c c u ra c y   fo Tel e v isio n   a t   9 8 %   a n d   Wate P u m p   M a c h i n e   a 9 7 . 6 % ,   with   sli g h t ly   lo we r   a c c u ra c y   fo r   Air  Co n d it io n e a 8 1 . 9 % .   T h is  d e m o n stra tes   th e   sy ste m ' e ffe c ti v e n e ss   in   re a l - wo rld   a p p li c a ti o n s.  T h e   sc a lab il it y   a n d   a d a p ta b il it y   o t h e   Na tu ra S HA S   m o d e l   to   d iffere n a p p li a n c e a n d   e n v ir o n m e n ts   m a rk   a   sig n ifi c a n t   a d v a n c e m e n in   sm a rt  h o m e   a u t o m a ti o n ,   o ffe ri n g   a   p ra c ti c a so l u ti o n   f o r   p re v e n ti n g   e lec tri c a o v e rl o a d   a n d   imp r o v in g   h o u se h o l d   e n e rg y   m a n a g e m e n t.   K ey w o r d s :   E lectr ical  o v er lo ad   p r ev e n tio n   Ho u s eh o ld   en e r g y   m an ag e m e n t   I o T   s m ar tp lu g s   L STM   R ea l - tim d ata  co llectio n   Sm ar t h o m au t o m atio n   s y s te m   T h is i a n   o p e n   a c c e ss   a rticle   u n d e r th e   CC B Y - SA   li c e n se .     C o r r e s p o nd ing   A uth o r :   Far h an Ah m ad   Po ad   Facu lty   E lectr ical  an d   E lectr o n ic  E n g in ee r in g ,   U n iv er s iti T u n   Hu s s ein   On n   Ma lay s ia   Par it R aja ,   J o h o r ,   8 6 4 0 0 ,   Ma la y s ia    E m ail: f ar h an a@ u th m . e d u . m y       1.   I NT RO D UCT I O N   Ho u s eh o ld s   in   I n d o n esia  ar c ateg o r ized   in to   s ev er al  cu s to m er   g r o u p s   b y   Per u s ah aa n   L is tr ik   Neg ar ( PLN) ,   th s tate  o wn ed   elec tr icity   co m p an y ,   in   ter m s   o f   elec tr icity   co n s u m p tio n   [ 1 ] .   Fo r   ex am p le,   th R - 1 /TR   ca teg o r y   lim it  elec tr icity   c o n s u m p tio n   to   m a x im u m   o f   1 , 3 0 0   VA  with   a   tar if f   o f   R p .   1 , 4 4 4 . 7 0   p e r   k W h .   T h is   m ea n s   th at   th e   to tal  el ec tr icity   co n s u m p tio n   f r o m   all  ap p lian ce s   s h o u ld   n o t   ex ce ed   1 , 3 0 0   watts,   ass u m in g   p o wer   f ac to r   ( c o s   p h i)   o f   1 .   Ho wev er ,   in   r e ality ,   m an y   h o u s eh o ld s   h a v e   v ar io u s   elec tr ical  ap p lian ce s   with   to tal  p o wer   co n s u m p tio n   ex ce e d in g   t h is   s u b s cr ip tio n   lim it.  C o n s eq u en tly ,   wh en   m u ltip le   ap p lian ce s   ar e   u s ed   s im u ltan eo u s ly ,   ex ce e d in g   th e   to tal  p o wer   lim it,  it  ca u s th e   m in i atu r cir cu it   b r ea k er   ( MCB )   to   tr ip .   W h en   th MC B   tr ip s ,   th elec tr ical  co n n ec ti o n   f r o m   th m ain   PLN  lin to   th h o u s is   cu o f f ,   ca u s in g   all  elec tr ical  ap p lian c es  in   th h o u s to   s h u d o wn .   T h is   co n d itio n   lead s   t o   th e   o cc u r r en ce   o f   in r u s h   cu r r en i n   elec tr ical  a p p lian c es  wh en   th e   MCB   is   s witch ed   b ac k   o n .   T h in r u s h   c u r r en p h e n o m en o n   is   d is ad v an tag eo u s   as  it  in c r ea s es  elec tr icity   co n s u m p tio n   at  th b eg in n i n g   o f   o p e r atio n   d u to   th e   lar g e   m o m e n t a r y   c u r r e n t   a n d   c a n   als o   d a m a g e   e le c t r ic a l   e q u i p m e n t   b e c a u s o f   t h e   la r g e   s t a r t i n g   t o r q u e   r e q u i r e d   [ 2 ] .   Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esian   J   E lec  E n g   &   C o m p   Sci     I SS N:   2 5 0 2 - 4 7 52       N a tu r a l sma r t h o me  a u to ma tio n   s ystem  u s in g   LS TM   b a s ed   o n   h o u s eh o ld   b eh a vi o u r   ( Mo c h a ma d   S u s a n to k )   759   Ad d itio n ally ,   f r eq u e n o v er lo ad in g   a n d   s u b s eq u en tr i p p in g   o f   th MCB   p o s s af ety   r is k s   to   th h o u s eh o ld   [ 3 ] ,   as e lectr ical  eq u ip m en t m ay   b d am a g ed   [ 4 ] ,   p o ten tially   lead in g   to   d an g er o u s   s itu atio n s   [ 5 ] .   Fu r th er m o r e,   th is   f r eq u en ON - OFF  cy clin g   o f   elec tr ic ity   ca n   d is r u p en er g y   m a n ag em e n in   th h o m e,   ca u s in g   in ef f icien cies a n d   in c o n v e n ien ce   [ 6 ] .   T o   ad d r ess   th is   is s u e,   au to m atic  co n tr o s y s tem s   b ased   o n   lo ad   p r io r itizatio n   [ 3 ]   an d   th elim in atio n   o f   h ig h - co n s u m p tio n   ap p lian c es   [ 7 ]   h av b ee n   im p lem en te d .   Ho w ev er ,   th ese  ap p r o ac h es  ar o f ten   s tatic  an d   lack   ad ap ta b ilit y   to   n atu r al   e n v ir o n m en tal  f ac t o r s .   I n   c o n t r ast,  h o m e o wn er s   wh o   ar e   a war o f   th eir   to tal  p o wer   co n s u m p tio n   ty p ically   d ev elo p   h a b its   o f   tu r n in g   ap p l ian ce s   ON  an d   OF F a s   n ee d ed   to   av o id   ex ce ed in g   th m ax im u m   lo ad   lim it.  T h is   b eh av io r   r ef lects  m o r d y n am ic  an d   r esp o n s iv a p p r o ac h   to   en er g y   m an ag em en t   with in   th h o m e .   T h is   s tu d y   f o cu s es  o n   th b eh av io r   o f   h o u s eh o l d   r esid en t s   as  th o b ject  o f   r esear ch   to   p r o v i d s o lu tio n s   f o r   p r e v en tin g   o v e r lo ad s .   T h e   m eth o d   u s es  an   elec tr ical  ap p r o ac h   b y   lev er a g in g   in ter n et  o f   th in g s   ( I o T )   tech n o lo g y   to   ca p tu r e   d ata  o n   r esid e n ts '   b eh av io r   an d   AI   d ee p   lear n in g   tech n o lo g y   t o   au to m atica lly   co n tr o l th ON - OFF s tate  o f   elec tr ical  ap p lian ce s   b ased   o n   th r esid en ts '   b eh av io r .   T h in teg r atio n   o f   AI   an d   I o T   k n o wn   as  AI o T   h as  r esu lted   in   im p r ess iv tech n o lo g y   w h er d ee p   lear n in g   ca n   d er iv n ew  in s ig h ts   f r o m   co n tin u o u s ly   u p d ated   d ata  f r o m   v a r io u s   s o u r ce s .   T h is   ad v an ce m en t h as   b r o u g h p r o g r ess   to   v ar io u s   f i eld s ,   s u ch   as  s m ar h o m e s   [ 8 ] ,   s m ar cities   [ 9 ] ,   in d u s tr y ,   h e alth ca r e   [ 1 0 ] [ 1 1 ] ,   an d   tr an s p o r tatio n   [ 1 2 ] .   I n   t h co n tex o f   s m ar h o m es,   th ap p licatio n   o f   th is   tech n o lo g y   ex ten d s   to   en h an cin g   th f u n ctio n ality   a n d   co m f o r o f   h o u s eh o l d   r esid en ts .   T h is   in clu d es  th ev o l u tio n   f r o m   r em o te   ac ce s s   an d   co n tr o to   au to m a tic  s y s tem   co n tr o b ased   o n   lear n in g   d ata   [ 1 3 ] ,   th er e b y   im p r o v in g   r esid en ts co m f o r t i n   u s in g   elec tr ical  ap p lian ce s   wh ile  ac h iev in g   en e r g y   s av in g s   [ 1 4 ] .   R ef er r in g   to   I o T   tech n o lo g y ,   elec tr ical  ap p lian ce s   with   s m ar s o ck e ts   ca n   tr an s m it  d ata  o n   th s tatu s   o f   an   ap p lian ce ,   in clu d i n g   p o wer   co n s u m p tio n ,   c u r r en t,   v o l tag e,   en er g y ,   p o wer   f ac to r   [ 7 ] ,   [ 1 5 ] ,   an d   ON/OFF  s tatu s   [ 1 6 ]   to   o th er   d ev ices  a n d   th clo u d   with in   an   I o T   n et wo r k .   Similar ly ,   o th er   s m ar h o m d e v ices  s u ch   as  th er m o s tats ,   PIR  s en s o r s   f o r   d etec tin g   h u m an   p r esen ce   in   r o o m ,   an d   wate r   tan k   lev el   s en s o r s   to   tr ig g er   t h e   wate r   p u m p   ca n   s er v e   as  d ata   s o u r ce s   f o r   s m ar s y s tem s   lik th s m ar h o m au t o m atio n   s y s tem   ( SHAS)  to   u n d er s tan d   h o u s eh o ld   b e h av i o r   p atter n s   in   o p er at in g   elec tr ical  ap p lian ce s .   Fu r th er m o r e,   as  to   em b ed d in g   AI   tech n o lo g y   in   t h I o T   s y s tem ,   Dee p   lear n in g   m o d els  s u ch   as  lo n g   s h o r t - ter m   m em o r y   ( L STM )   ca n   b e   im p lem en ted   as  it  s u itab le  f o r   lear n in g   d atasets   with   tim e   s er ies  d ata,   lik h o u s eh o ld   b eh av io r   p atte r n s   th at  f o llo d aily   c y cles   [ 1 7 ] - [ 1 8 ] .   On ce   p atter n s   ar e   id en tifie d   th r o u g h   d ee p   lear n i n g ,   o r   wh at   is   r ef er r ed   to   as  th e   m o d el,   SHAS  will  u s th is   m o d el  to   p r ed ict  o u tp u ts   in   th e   f o r m   o f   au to m atic   co n tr o ls ,   s u ch   as  tu r n i n g   a n   elec tr ical  ap p lian ce   ON  o r   OF F.  T h u s ,   au to m atic  co n tr o h a p p en s   n atu r ally   r ath e r   th a n   d et er m in is tically   [ 1 9 ] ,   th r o u g h   co n d itio n in g   o r   s ch ed u lin g ,   s u ch   as  th s ch ed u le d   ON/OFF  co n tr o o f   lig h ts   [ 2 0 ] .   T h is   ad d s   v al u to   SHAS with   th ap p licatio n   o f   AI   in   an   I o T   en v ir o n m en t.   B ased   o n   an   AI o T   s y s tem ,   th i s   s tu d y   co n tr ib u tes  to   th e   d esig n   o f   a   lay er ed   SHAS  m o d el  u s in g   th e   L STM   alg o r ith m   with   d atasets   f r o m   I o T   d ev ices  in   h o u s e,   in clu d in g   th ON - OFF  s tatu s   o f   elec tr ical   ap p lian ce s   an d   o t h er   s u p p o r tin g   s en s o r   d ata.   T h e   f o llo win g   s ec tio n s   o f   t h is   p ap er   will  co v er   th e   m eth o d o lo g y   o f   th b u ilt  s y s tem   an d   its   wo r k f lo w,   f o llo wed   b y   d is cu s s io n   o f   th r esu lts ,   wh ich   will  p r esen th d ataset  ch ar ac ter is tics   an d   th p e r f o r m an ce   ev alu atio n   o f   L STM   in   p r ed ictin g   th ON  o r   OFF  s tatu s   o f   elec tr ical   ap p li an ce s   u s in g   th c o n f u s io n   m atr ix   p a r am eter .       2.   M E T H O D   T h is   s tu d y   p r o p o s es  SHAS  lay er ed   m o d el,   as  d ep icted   in   Fig u r 1 ,   wh ich   in teg r ates  AI   with in   an   I o T   e n v ir o n m en t.   T h e   SHAS  d ev elo p e d   in   th is   r esear ch   u til izes  L STM   as  th AI   f ea tu r e   t o   co n tr o elec tr ical  ap p lian ce s   b ased   o n   h o u s eh o ld   b eh av i o r   d ata.   I n   th p h y s ical  lay er ,   s en s o r s   g en er ate  d ata  s u ch   as  th ON/OFF   s tatu s   o f   s m ar tp lu g s   o r   s m ar s o ck ets  f o r   elec tr ical  ap p lian ce s ,   to tal  elec tr icity   co n s u m p tio n   f r o m   s m ar p o wer   m eter s ,   air   q u ality   d ata  in clu d in g   tem p e r atu r a n d   h u m id ity ,   wate r   tan k   lev el  d ata  in d i ca tin g   th e   p er ce n tag o f   wate r   h eig h in   th tan k ,   an d   m o tio n   d ata  d et ec tin g   h u m an   p r esen ce   in   r o o m .   T h ese  s en s o r s   wir eless ly   tr an s m it  th eir   d ata  with in   an   I o T   n etwo r k   to   a n   ed g d ev ice,   f u n ctio n i n g   a s   s en s o r   h u b   th at   ag g r eg ates  all  s en s o r   d ata   in t o   s tr ea m in g   d ataset  n am ed   th au to m atio n   h o m e   elec tr ical  ap p lian ce   co n tr o s y s tem   ( AHE AC S).   T h d ataset  d u r atio n   is   p er   m in u te,   c o llected   o v er   t h r ee   m o n th s   f r o m   Feb r u ar y   t o   Ap r il   2 0 2 4 ,   to talin g   8 0 , 8 1 8   d ata  p o i n ts .   I n   th m a n ag em e n lay er ,   L STM   p r o ce s s es  th d ataset  to   l ea r n ,   ev al u ate  th m o d el' s   p er f o r m an ce ,   an d   p r o d u ce   th e   m o s o p tim al  p r ed ictiv e   m o d el   to   b u s ed   in   t h p r o p o s ed   SHAS  m o d el.   T h m o d el' s   p r ed ictio n   r esu lts ,   in   t h f o r m   o f   ON/OFF  co m m an d s ,   a r s en to   th s en s o r   d e v ice s ,   s p ec if ically   th s m ar tp lu g s   co n tain in g   r elay s   co n n ec ted   to   th elec tr ical  ap p lian ce   s o ck ets.  T h is   co m m u n icatio n   ca n   b e   ca r r ied   o u th r o u g h   lo ca I o T   n etwo r k   s u ch   as  wir eless   lo ca ar ea   n etwo r k   ( W L AN)   an d   b y   u s in g   m ac h in e - to - m ac h in e   co m m u n icatio n   p r o to co ls   lik m ess ag q u eu i n g   telem etr y   t r an s p o r t   ( MQ T T ) .   I n   th ca s o f   co m m u n icatio n   b etwe en   I o T   d ev ices,  s u ch   as  AI   d ev ices  an d   s m ar tp lu g s ,   th ey   ac as  M QT T   clien ts   with   an   MQ T T   b r o k er   d e v ice  th at  is   al s o   co n n ec ted   lo ca lly   with in   th s am W L A N.   T h is   AI   p r o ce s s   ca n   b ex ec u ted   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4 7 52   I n d o n esian   J   E lec  E n g   &   C o m p   Sci ,   Vo l.  3 7 ,   No .   2 Feb r u a r y   20 25 7 5 8 - 7 7 0   760   at  th e   e d g e,   en s u r i n g   th at  t h au t o m atic  co n tr o l   p r o ce s s   d o es  n o r ely   o n   in ter n et   co n n ec tiv ity   [ 2 1 ] Me an wh ile,   th ap p licatio n   la y er   r esid es  in   th clo u d ,   p r o v id in g   u s er s   with   th o p tio n   t o   m o n ito r   s en s o r   d ata   an d   m an u ally   r em o te - co n t r o elec tr ical  ap p lian ce s   v ia  th in ter n et.   T h is   wo r k   p r esen ts   th p er f o r m an ce   o f   L STM   as  th AI   co m p o n e n in   th I o T   SHAS  ap p licatio n   o n   th ed g e   s id o f   an   I o T   n etwo r k ,   as   s h o wn   i n   Fig u r 1 .   T h m eth o d o l o g y   co n s is ts   o f   th r ee   p ar ts th e   s tu d y   o f   p r o p o s ed   d ataset  c h ar ac ter is tics ,   th d esig n   o f   th e   L STM   m o d el  f o r   ea c h   s m ar t p lu g   co n n e cted   to   a n   elec tr ical   ap p lian ce   an d   also   p er f o r m a n c an aly s is   o f   th L STM   alg o r ith m   in   Go o g le  C o lab   en v ir o n m en t u s in g   p y th o n .           Fig u r 1 .   SHAS lay er ed   m o d e l       2 . 1 .     SH AS da t a s et   s t re a m in g   T h r o le  o f   th e   s en s o r   h u b   in   th SHAS  lay er ed   m o d el  d esig n   o f   th is   r esear c h   s h o wed   in   Fig u r 1   is   to   f o r m   s tr ea m in g   AHE AC d ataset  f r o m   v ar io u s   s en s o r s   in   s m ar h o m ap p licatio n .   T h is   s tu d y   u s es  a   s m ar p o wer   m eter   to   g en e r ate  to tal  p o wer   ( T P)  d ata,   i n d icatin g   to tal  elec tr icity   co n s u m p tio n .   Fiv s m ar tp lu g s   p r o v id ON/OFF  s tatu s   d ata  f o r   ea ch   elec tr ical   ap p lian ce ,   s u c h   as  an   air   co n d itio n er   (S - AC ) ,   R ef r ig er ato r   ( S - K) ,   W ater   Pu m p   ( S - W PM) ,   W ash in g   Ma ch in ( S - MC),   an d   T elev is io n   ( S - T V) .   Ad d itio n ally ,   en v ir o n m en tal  s en s o r s   th at   r elate d   to   th e   h o m e' s   co n d itio n   ar u s ed   as  f ac t o r s   in f lu e n cin g   th e   r esid en ts d ec is io n   to   tu r n   elec tr ical  a p p lian ce s   ON  o r   OFF.  T h ese  in clu d s en s o r s   f o r   tem p e r atu r e   ( T ) ,   h u m id ity   ( H) ,   m o tio n   in   th b e d r o o m   ( Pb ) ,   m o tio n   in   th liv in g   r o o m   ( P g )   wh er th telev is io n   is   lo c ated ,   an d   wate r   tan k   lev el  ( W ) ,   in d icatin g   th e   wate r   lev el  in   th wate r   tan k   o f   th ch o s en   h o u s e.   T ab le  1   s h o ws  th d esig n   o f   t h s tr ea m in g   d ataset  co lu m n s ,   wh er th tim estam p   ( T S)  r ep r esen ts   th e   d ata  co llectio n   tim e,   s et  p er   m in u te.   S - X   r ep r esen ts   s m ar t p lu g   s tatu s   wh ic h   co n tain   S - AC ,   S - K,   S - W PM,   S - MC,  an d   S - T V,   with   th p o s s ib ilit y   o f   a d d in g   o th e r   elec tr i ca ap p lian ce s   in   th f u tu r e.   I n   th is   s tu d y ,   T is   d etailed   to   r ef lect  th in f l u en ce   o f   wee k d a y s   ( Mo n d a y - Fri d ay )   an d   wee k en d s   ( Satu r d ay - Su n d ay ) ,   as  well  as   o p er atio n al  h o u r s   ( m o r n in g - a f ter n o o n - ev en i n g ) .   T h u s ,   T i s   ex tr ac ted   in to   y ea r ,   m o n th ,   d ay ,   h o u r ,   m in u te,   an d   s ec o n d   v alu es,  wh ich   ar co n v er ted   i n to   n u m er ic  f o r m .   Yea r   an d   m o n th   r em ain   n u m e r ic,   wh ile  th d ay   is   r ep r esen ted   as  ( D) ,   wh er M o n d ay = 1 ,   T u esd a y =2 ,   an d   s o   o n   u n til  Su n d ay =7 .   H o u r s ,   m in u tes,  an d   s ec o n d s   ar co n v er ted   i n to   th e   n u m b e r   o f   s ec o n d s   s in ce   m id n ig h ( NSM) ,   v alu th at   r ep ea ts   d aily .   T o   d is tin g u is h   b etwe en   wee k d ay s   an d   wee k e n d s ,   th v ar ia b le  ( W S)  is   u s ed : 0   f o r   wee k d ay s   a n d   1   f o r   wee k en d s .   Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esian   J   E lec  E n g   &   C o m p   Sci     I SS N:   2 5 0 2 - 4 7 52       N a tu r a l sma r t h o me  a u to ma tio n   s ystem  u s in g   LS TM   b a s ed   o n   h o u s eh o ld   b eh a vi o u r   ( Mo c h a ma d   S u s a n to k )   761   T ab le  1 .   Data s et  lab elin g   V a r i a b l e   D e scri p t i o n   Ty p e   o f   d a t a   TS   Ti mes t a m p   D a t e   a n d   Ti m e   N S M   N u mb e r   o f   S e c o n d s   si n c e   M i d n i g h t ,   c o n v e r t   a l l   t i me   i n   a   d a y   t o   b e c o me  n u mb e r   o f   se c o n d   N u meri c a l   WS   W e e k d a y   st a t u s   B o o l e a n   ( w e e k d a y = 0 ,   w e e k e n d = 1 )   D   Th e   D a y   f r o m   M o n d a y   t o   S u n d a y   N u meri c a l   ( M o n d a y = 1   u n t i l   S u n d a y = 7 )   HR   D a t e   D a t e   WK   Ti me   Ti me   TP   To t a l   P o w e r   ( W a t t )   N u meri c a l   S - X   Th e   st a t e   o f   e l e c t r i c a l   a p p l i a n c e   o p e r a t i o n   B o o l e a n   ( o n = 1 ,   o f f = 0 )   T   Te mp e r a t u r e   ( ° C )   N u meri c a l   H   H u mi d i t y   ( %)   N u meri c a l   Pb   P r e sen t   p e o p l e   i n   b e d r o o m   B o o l e a n   ( p r e se n t = 1 ,   e mp t y = 0 )   Pg   P r e sen t   p e o p l e   i n   t e l e v i s i o n   r o o m   B o o l e a n   ( p r e se n t = 1 ,   e mp t y = 0 )   W   W a t e r   t a n k   l e v e l   N u meri c a l       2 . 2 .     L ST M   ba s ed  f o SH AS   T h r o le  o f   I o T   tech n o lo g y   is   h ig h ly   b en ef icial  i n   c o llectin g   r ea l - tim e   u s ag d ata  o f   elec tr ical  ap p lian ce s   in   h o m es,  wh ich   ca n   b e   co m p iled   i n to   a   d atas et.   T h is   d ata   is   th e n   p r o ce s s ed   an d   a n aly ze d   to   u n d er s tan d   u s er   u s ag h ab its ,   lead in g   to   ac tio n s   b ased   o n   n ew  in s ig h ts   o b tain ed ,   as  d em o n s tr ated   in   th e   SHAS a p p licatio n .   T h is   co n ce p t is k n o wn   as th in te r n et  o f   b eh av io r   ( I o B )   [ 2 2 ] .     I n   th co n tex o f   SHAS,  wh ich   f o c u s es  o n   th tim e - d e p en d en u s ag b eh a v io r   o f   h o u s eh o ld   elec tr ical  ap p lian ce s ,   r ec u r r en t n eu r al  n etwo r k   ( R NN) ,   an   e x ten s io n   o f   Neu r al  Netwo r k   m o d el  s p ec if ically   f o r   lear n in g   s eq u en tial  d ata  o v er   tim e,   ca n   b a p p lied   [ 2 3 ] .   T h ex p ec tatio n   f r o m   a n   R NN  is   to   ca p tu r l o n g - ter m   d ep e n d en cies  s o   th at   all  p ast  in p u ts   ca n   in f lu e n ce   th o u tp u t.   Ho wev er ,   R NNs  f ac ch allen g es  with   in p u ts   th at  ar t o o   d is tan in   t h p ast.  Fo r tu n ately ,   th ese  p r o b lem s   ca n   b a d d r ess ed   b y   ap p ly in g   a n   ev o lu tio n   o f   th R NN  k n o wn   as  th L S T m o d el   [ 2 4 ] .   T h L STM   m o d el  in clu d es  s p ec ialized   u n its   ca lled   m em o r y   ce lls ,   wh ich   ca n   s to r in f o r m atio n   f o r   an   e x ten d ed   p er io d ,   ac tin g   lik c o n v e y o r   c o n n ec tin g   L STM   b lo ck s .   T h ese  u n its   in v o lv th r ee   ty p es  o f   g ates:  in p u t,  f o r g et,   an d   o u tp u t,  wh ich   co n tr o th f lo o f   in f o r m atio n .   T h ese  g ates  ar cr u cial  as  th e y   d eter m in wh et h er   to   allo n ew  in p u t,  er ase  th c u r r e n ce ll  s tatu s ,   o r   let  th s tatu s   in f lu en ce   th o u t p u t a t a   s p ec if ic  tim s tep .   T h is   p ap er   d o es  n o ex p lain   t h g en er al  wo r k in g s   o f   L ST in   d etail,   as  L STM   its elf   is   n o n ew  in   Dee p   L ea r n in g   alg o r ith m s .   F o r   m o r d etails,  r ef e r   to   p r ev io u s   liter atu r o n   L STM   r ela ted   to   s m ar h o m e   ap p licatio n s   [ 1 8 ] [ 2 5 ] .   Her e,   th f o cu s   is   o n   th d etailed   L STM   m o d el   f o r   th e   s tr ea m i n g   d ataset  ca s as  p r ev io u s ly   e x p lain ed .   T h L S T ar ch itectu r in   th is   s tu d y ,   as  s h o wn   in   Fig u r 2 ,   co n s is ts   o f   o n e   in p u la y er ,   two   h id d en   la y er s ,   an d   o n e   o u t p u t la y er   with   f u lly   co n n ec ted   lay er .           Fig u r 2 .   L STM   ar c h itectu r f o r   SHAS   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4 7 52   I n d o n esian   J   E lec  E n g   &   C o m p   Sci ,   Vo l.  3 7 ,   No .   2 Feb r u a r y   20 25 7 5 8 - 7 7 0   762   I n   th in p u lay er   o f   t h L ST m o d el,   th n u m b er   o f   in p u f ea tu r es  is   d eter m in ed   b y   v ar i o u s   f ac to r s   th at  in f lu en ce   th ON/OFF  o p er atio n   o f   ea ch   elec tr ical  ap p l ian ce .   Fo r   ex am p le,   in   th ca s o f   co n tr o llin g   a n   Air   C o n d itio n er   ( AC ) ,   r elev a n in p u f ea tu r es  m ig h in clu d T o tal  Po wer   ( T P),   T em p e r a tu r ( T ) ,   Hu m id ity   ( H) ,   B ed r o o m   Mo tio n   ( Pb ) ,   an d   W ater   Pu m p   Statu s   ( S - W P M) .   T h u s ,   f o r   th s m ar tp lu g   c o n n ec ted   to   th AC ,   th L STM   m o d el  r ec eiv es  5   in p u f ea tu r es.  Ho wev er ,   with in   th L STM   n eu r al  n etwo r k ,   th in p u lay e r   is   s tr u ctu r ed   to   tak e   in   o n e   tim estep   o r   in p u t d im e n s io n   at  tim e.   T h is   is   b ec au s all  in p u t f ea tu r es a r m ea s u r ed   s im u ltan eo u s ly   at  s p ec if ic  tim o r   tim estep .   T h i n p u d at a,   r ep r esen ted   as  1 , 2 , 3 , . . ,   in   th d iag r a m ,   co r r esp o n d s   to   th ese  f ea tu r es f o r   ea ch   elec tr ical  ap p lian ce .   I n   t h i s   s t u d y ,   t h e   i n p u t   f e a t u r es   f o r   d i f f e r e n t   a p p l i a n c e s   v a r y   b a s e d   o n   t h e i r   o p e r a t i o n a l   c o n t e x t .   T h n o t a t i o n   S - X   i n   t h e   T a b l e   2   o   th e   s p e c i f i c   s m a r t p l u g s   c o n n e c te d   t o   d i f f e r e n t   a p p l i a n c es ,   s u c h   a s   A i r   C o n d i ti o n e r   ( S - AC ) ,   W at e r   P u m p   ( S - W PM ) ,   R e f r i g e r at o r   ( S - K ) ,   W a s h i n g   M a c h i n e   ( S - MC ) ,   a n d   S - T V   ( T e l e v is i o n ) .   T h d i a g r a m   i l l u s t r a t es   h o w   t h e s e   i n p u t s   f e e d   i n t o   t h e   L S T M   c el l s   s e q u e n t i al l y ,   w i t h   e a c h   c el l e a r n i n g   f r o m   t h e   i n p u t   d a t a   a n d   p a s s i n g   t h l e ar n e d   i n f o r m a t i o n   f o r w a r d   t h r o u g h   t h e   n e t w o r k ,   u l t i m at e l y   l ea d i n g   t o   t h e   b i n a r y   c l a s s i f ic a t i o n   o u t p u t h a c o n t r o l s   t h e   a p p li a n c e' s   ON / OFF   s t a t e .   T h is   p r o c es s   i s   c a p tu r e d   i n   t h e   L S T a r c h i t e c t u r e   s h o w n   i n   F i g u r 2 ,   w h e r e   t h i n p u t   l a y e r   f ee d s   t h e   d at a   i n t o   a   s e r i es   o f   L S T M   c e l ls ,   e ac h   m a i n t a i n i n g   a n d   u p d a t i n g   t h e   c e l l   s t a t e   ( )   a n d   h i d d e n   s t a t e   ( ) .   T h e   f i n a l   h i d d e n   s t a te   a f t e r   p r o c e s s i n g   a ll  t i m e s t e p s   i s   t h e n   u s e d   f o r   b i n a r y   c l a s s i f i ca t i o n ,   w h ic h   d e t e r m in e s   t h e   o p e r a t i o n al   c o n t r o l   s t a tu s   o f   t h e   a p p l i a n c e .   T h d eter m in at io n   o f   in p u f ea tu r es  is   b ased   o n   th th r esh o ld   v alu o f   t h co r r elatio n   co ef f icien with   th ( 1 ) :      = ( ̅ ) ( ̅ ) . )   ( 1 )     T h Pear s o n   c o r r elatio n   co ef f i cien    r an g es  f r o m   - 1   to   1 .   I f      is   p o s itiv e,   th in p u f ea tu r v ar iab les  ten d   to   m o v in   th s am d ir ec tio n ,   in d icatin g   p o s itiv co r r elati o n .   C o n v e r s ely ,   if      is   n eg ativ e,   th co r r elatio n   is   n eg ativ e,   m ea n in g   t h v ar iab les  m o v in   o p p o s ite  d ir e ctio n s .   I f      ap p r o ac h es  0 ,   t h e r is   n o   lin ier   r elatio n s h ip   b etwe en   th two   i n p u t f ea tu r v ar iab les.  Me an w h ile    r ep r esen t th to tal  n u m b e r   o f   d ata  s am p les  an d     r ep r esen t th s tan d ar d   d e v iatio n   f r o m   two   v a r iab le.   T h co r r elatio n   lev el  b etwe e n   in p u f ea tu r es  is   d etailed   in   th ex p lo r ato r y   d ata  an aly s is   ( E DA )   s ec tio n   o f   th is   p ap e r .   Fro m   th in p u la y er ,   f u lly   c o n n e cted   n etwo r k   is   cr ea te d   to   th f ir s h id d en   lay er ,   wh ich   co n s is ts   o f   2 5   L STM   c ells .   I n   th is   lay er ,   th g en er al  L STM   p r o ce s s   o cc u r s ,   wh er m em o r y   ce lls   with   th r ee   g ates  ar d esig n ed   to   r e ad ,   s to r e,   an d   u p d ate  p ast  in f o r m atio n .   E ac h   L STM   ce ll  co n n ec ts   to   th n ex L STM   ce ll th r o u g h   th ce ll st ate  ( )   an d   h i d d en   s tate  ( )   with   th ( 2 )   an d   ( 3 ) :     ( ) = ( ) . ( 1 ) + ( ) . ̃ ( )   ( 2 )     ( ) = ( ) . ta n h ( ( ) )   ( 3 )     W h er is :   ( ) f o r g et  g ate   ( ) in p u t g ate   ( ) o u tp u g ate   ̃ ( ) ca n d id ate  g ate   T h s elec tio n   o f   2 5   L STM   ce lls ,   as  s h o wn   in   Fig u r 2 ,   is   b ased   o n   th co m p le x ity   o f   th in p u t   f ea tu r v ar iab les  a n d   t h d im en s io n s   o f   th e   d ata   [ 2 6 ] .   As  p r ev io u s ly   m en tio n e d ,   t h is   s tu d y   em p l o y s   a   s in g le  in p u d im en s io n   f o r   tim e - s er ies  d ata,   aim in g   to   k ee p   th m o d el  s im p le  an d   s u itab le  f o r   im p lem en tatio n   o n   th e   ed g s id e   o f   an   I o T   n etwo r k .   T h L STM   n etwo r k   th en   co n n ec ts   to   th e   s ec o n d   h id d en   lay e r ,   wh ich   m ir r o r s   th e   fi r s lay er   in   ter m s   o f   p ar a m e ter s ,   s u ch   as  th u s o f   d r o p o u lay er   a n d   th r et u r n   s eq u en ce   s ettin g .   T h e   d r o p o u lay er   is   ap p lied   to   p r e v en o v e r f itti n g   d u r in g   tr ain i n g ,   with   d r o p o u r ate  o f   0 . 1   o r   ( 1 0 %)   o f   t h to tal  2 5   n eu r o n s   p er   h id d en   lay er .   T h r et u r n   s eq u e n ce   p ar am ete r   in   th f ir s h id d en   lay er   is   s et  to   "tr u e"   to   en s u r e   th at  th o u tp u t   s eq u en ce   at  ea ch   tim estep   alig n s   with   th e   in p u co n d itio n s .   Fo r   t h s ec o n d   h id d en   lay er ,   th is   p ar am eter   is   s et  to   "f alse"  s o   t h at  th o u tp u t   d im en s io n   b ec o m es  s in g u lar ,   m atch in g   th d esire d   f in al  o u tp u t.   I n   th o u tp u la y er ,   th e   L STM   m o d el  p e r f o r m s   b in ar y   class if icatio n ,   p r ed ictin g   wh eth er   ea ch   s m ar tp lu g   co n n ec ted   t o   an   elec tr ical  ap p l ian ce   s h o u ld   b tu r n ed   ON  ( 1 )   o r   OFF ( 0 ) .     2 . 3 .   SH AS  env iro nm ent   T h is   s tu d y   u s es  Go o g le   C o lab   to   r u n   th e   L STM   alg o r ith m   with   Py th o n   p r o g r am m in g   to   m ea s u r its   p er f o r m an ce   i n   SHAS.  T h T en s o r Flo m o d u le  s er v es  a s   th f r am ewo r k   f o r   tr ain in g   th d ee p   lear n in g   Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esian   J   E lec  E n g   &   C o m p   Sci     I SS N:   2 5 0 2 - 4 7 52       N a tu r a l sma r t h o me  a u to ma tio n   s ystem  u s in g   LS TM   b a s ed   o n   h o u s eh o ld   b eh a vi o u r   ( Mo c h a ma d   S u s a n to k )   763   m o d el,   with   Ker as  as  th e   in teg r ated   n eu r al  n etwo r k   API .   Ad d itio n ally ,   th e   P an d as  lib r ar y   i s   u s ed   f o r   th E DA   p r o ce s s   to   d eter m in th n u m b er   o f   f ea tu r es  in   th in p u la y er   f o r   ea ch   s m ar tp lu g   elec tr i ca ap p lian ce   o f   t h d ev elo p e d   SHAS  in   th is   s tu d y .   Data   is   im p o r ted   f r o m   th s en s o r   h u b   in   . csv   f o r m at  a n d   co llected   wee k ly ,   with   d im en s io n s   o f   ( 8 0 , 8 1 8 1 2 ) ,   r e p r esen tin g   8 0 , 8 1 8   r o ws  o f   d ata  a n d   1 2   c o lu m n s   o r   in p u f ea tu r es.  T h T co lu m n   is   th en   ex tr ac ted   in t o   NSM,   W S,  D,   HR ,   an d   W K,   as  s h o wn   in   T ab le  1 ,   ch an g i n g   th d im en s io n s   to   ( 8 0 , 8 1 8 ; 1 6 ) .   I n   th is   s y s tem ,   wh ich   u s es  an   AI   tech n o lo g y ,   th L STM   tr ain in g   d ata  is   tak en   wee k ly ,   ass u m in g   th h o u s eh o l d   r esid en ts '   h ab its   r ep ea ea ch   wee k   o n   n o r m al  d ay s   an d   n o d u r i n g   lo n g   h o li d ay s .   T h d ataset  is   th en   n o r m alize d   to   s p ee d   u p   c o m p u tatio n   a n d   av o id   lar g v alu r an g es  b etwe en   in p u f ea tu r es   [1 3 ]   u s in g   t h e   s cik it - lear n   lib r ar y   in   Go o g le   C o lab .   T h is   n o r m aliza tio n   p r o ce s s   in v o lv es  r em o v in g   d ata   with   NaN   o r   n u ll   v alu es  o r ig in atin g   f r o m   th s e n s o r   d ata  s o u r ce s .   T h o cc u r r en ce   o f   s u ch   v alu es  d ep e n d s   o n   th q u ality   o f   th e   s en s o r   r ea d in g s   a n d   th e   d ata  n etwo r k   d u r in g   tr an s m is s io n   to   th s en s o r   h u b .   Af ter   th is   p r o ce s s ,   th d ata  is   co n s id er ed   clea n ,   with   an   eq u al  n u m b er   o f   en tr ies  f o r   ea ch   co lu m n   o r   f ea t u r v ar ia b le.   Min - Ma x   s ca lin g   is   p er f o r m ed   d u r in g   th e   p r e p r o c ess in g   p h ase  in   E DA,   with   r an g o f   - 1   t o   1   f o r   all  in p u f ea tu r v al u es.  T h e   p u r p o s o f   th Min - Ma x   f u n ct io n   is   to   en s u r d ata  co n s is ten cy   an d   ac ce ler ate  th p er f o r m an ce   o f   alg o r ith m s   d u r i n g   t h e   l e a r n i n g   p r o c e s s .   T h i s   n o r m a l i z a ti o n   t e c h n i q u e   t r a n s f o r m s   d a t a   f r o m   a l l   f e a t u r e s   t o   a   r a n g e   o f   - 1   t o   1   [ 2 7 ] .   T h e   eq u atio n   u s ed   in   th i s   r esear ch   is   as  f o llo ws,  wh er e      is   th h ig h est  v alu e   an d     is   th lo west  v alu in   th s am p le  d ata.      = × ( 1 ( 1 ) ) + ( 1 )   ( 4 )     Af ter   n o r m alizin g   all  d ata  wit h in   th r an g o f   - 1   to   1 ,   th n e x t step   is   to   s ep ar ate  th in p u t a n d   o u tp u d ata  f o r   ea c h   s m ar tp lu g   elec tr ical  ap p lian ce   b ased   o n   th co r r elatio n   c o ef f icien    ( 1 ) .   I n   th is   s tu d y ,   th e   L STM   tr ain in g   p r o ce s s   is   s et  with   th f o llo win g   p ar am ete r s 2 5   ce ll  o r   n e u r o n s   in   ea c h   h id d en   lay e r   ( s ee   Fig u r 2 )   with   1 0 o f   o v er f itti n g ,   7 5 o f   th d ata  is   u s ed   f o r   tr ain in g ,   2 5 f o r   test in g ,   2 5   ep o ch s ,   lear n in g   r ate  o f   0 . 0 0 0 1 ,   a n d   th o p tim i za tio n   alg o r ith m   u s ed   is   Ad am .       3.   RE SU L T S AN D I SCU SS I O N   T h is   r esear ch   in v esti g ates  th im p ac o f   h o u s eh o l d   b eh a v io r   o n   th SHAS   to   p r ev e n elec tr ical  o v er lo ad .   W h ile  p r ev io u s   s tu d ies  also   aim ed   to   p r e v en o v er lo ad ,   t h eir   ap p r o ac h es  r elied   o n   d eter m in is tic   f ac to r s   with o u co n s id er i n g   en v ir o n m en tal  co n d itio n s   th a in f lu en ce   h o u s eh o ld   b eh a v io r .   T h is   s ec tio n   p r esen ts   d etailed   an aly s is   o f   th r esear ch   f in d in g s ,   s tar tin g   with   ex p lo r at o r y   d ata  an al y s is   ( E DA) ,   wh ich   p r ep r o ce s s es  r aw  d ata  in t o   a   u s ab le  d ataset.   I t   th en   id en tifi es  k ey   i n p u t   v ar iab les  f o r   th e   L STM   m o d el  f o r   ea ch   s m ar p lu g .   T h e   p er f o r m an ce   o f   SHAS  is   ev alu ated   b y   co m p ar i n g   r esu lts   f r o m   d if f er en d ev ices,  s u ch   as   S - AC ,   S - T V,   an d   S - W PM,   u s i n g   r ea l - wo r ld   d ata.     3 . 1 .     SH AS  da t a   prepro ce s s ing   I n   th is   s tu d y ,   d ata   p r ep r o ce s s in g   b eg in s   with   ex tr ac tin g   th e   AHE AC d ataset  in   C SV  f o r m at  f r o m   th d ataset  r ep o s ito r y .   T h d at is   th en   tr an s f o r m ed   an d   n o r m alize d   to   en s u r it  is   clea n ,   with   n o   n u ll  o r   NaN   v alu es,  an d   co n s is ten in   s ize,   m ea n in g   ea c h   f ea t u r c o n ta in s   th s am n u m b e r   o f   d ata   p o in ts .   A f ter war d ,   co r r elatio n   a n aly s is   is   p er f o r m ed   to   id e n tify   t h in p u f e atu r es  f o r   t h d esire d   s m ar tp lu g   o u t p u u s in g   a   h ea tm ap   v is u aliza tio n   b ased   o n   ( 1 ) .   Fig u r e   3   s h o ws  th h ea t m ap   r esu lts   o f   all  d ataset  f ea t u r es  o r   v ar iab les.   I n   th is   h ea tm ap ,   v alu e   clo s to   1   ( d ar k - r e d )   in d icate s   a   s tr o n g   p o s itiv co r r elatio n ,   wh ile  a   v alu e   clo s to   - ( d ar k   b lu e)   in d icate s   s tr o n g   n eg ativ co r r elatio n .   Fo r   th s m ar tp lu g   co n n ec ted   to   th AC   ( S - AC ) ,   1 5   ca n d id ate  in p u f ea tu r es  wer id en tifie d ,   with   an   ab s o lu te  co r r elatio n   v al u    o f   | 0 . 0 3 | .   T h is   v alu e   was  ch o s e n   to   ac c o u n t   f o r   th tim e   v ar i ab le,   in f lu e n cin g   th S - AC   o u tp u t.  I is   n o s et  s m aller   to   av o id   i n v o lv i n g   to o   m an y   v ar ia b les  an d   o v er l y   co m p le x   m o d el.   B ased   o n   th h ea tm a p   in   Fig u r 3 ,   t h in p u f ea tu r es  ar [ T P,  S - T V,   S - W PM,   S - MC,  T ,   H,   W ,   Pb ,   Pg ,   W S]  wh er W is   th tim v ar iab le.   I n   a d d itio n   to   S - AC ,   th is   s tu d y   also   ev alu ates  th S - T an d   S - WP s m ar tp lu g s .   Fo r   th ese,   an      o f   | 0 . 1 |   was  ch o o s en .   T h in p u f ea tu r es  f o r   S - T ar e   [ T P,   S - AC ,   T ,   H,   W ,   Pg ,   NSM,   W K] ,   an d   f o r   S - W PM,   th in p u t f ea t u r es a r [ T P,  S - A C ,   S - MC,  T ,   W ] .     W f o u n d   th at  tim v ar iab les  ( W K,   HR ,   D,   W S,  an d   NSM)   h av an   in f lu en c o n   c o n tr o l   v ar iab les   s u ch   as  S - AC ,   S - T V,   an d   S - W PM.   Alth o u g h   th e   co r r elati o n s   ar s m all,   r an g in g   f r o m   0 . 0 1   to   0 . 1 7 ,   tim v ar iab les  ex tr ac ted   f r o m   t h t im s er ies  d ata  ar e   p ar ticu la r ly   s ig n if ican d u e   to   t h eir   im p ac o n   h o u s eh o ld   ap p lian ce   u s ag e,   wh ich   is   in f lu en ce d   b y   tim e - b ased   p atter n s .   T h r esid en ts '   s p ec if ic  r o u tin es  f o r   u s in g   ap p lian ce s   lik air   co n d itio n er s   o r   wash in g   m ac h in es a r c r u cial  f o r   ac cu r ate  e n er g y   co n s u m p tio n   p r ed ictio n s .   Alth o u g h   th co r r elatio n s   m ay   ap p ea r   lo w,   ca p tu r i n g   th ese  tem p o r al  p atter n s   en h a n ce s   an aly s is   d ep th   co m p ar ed   to   s tatic  d eter m in i s tic  co n tr o m eth o d s   [ 1 9 ] ,   [ 2 0 ] .   T h f lex ib ilit y   in   d ete r m i n in g   t h    v alu e   allo ws f o r   ad ju s tm en ts   ac co r d in g   to   th e   d esire d   m o d el  b e h av io r   an d   d esig n .   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4 7 52   I n d o n esian   J   E lec  E n g   &   C o m p   Sci ,   Vo l.  3 7 ,   No .   2 Feb r u a r y   20 25 7 5 8 - 7 7 0   764       Fig u r 3 .   C o ef f icie n t c o r r e lati o n   b etwe en   f ea tu r in   AHE AC S d ataset       Af ter   d eter m in in g   th e   v ar iab le s   to   b u s ed   as  in p u t   f ea tu r es  f o r   ea ch   s m ar tp lu g   ( S - AC ,   S - T V,   an d   S - W PM) ,   th L STM   m o d el  lear n s   f r o m   th d ataset  to   b u ild   class if icatio n   m o d el  with   o u tp u ts   o f   eith er   ' ON'   o r   ' O FF '   f o r   ea ch   s m ar tp lu g .   T a b le  2   s h o ws  th r esu lts   o f   th e   lear n in g   p r o ce s s   co n d u cted   i n   th G o o g le   C o lab   en v ir o n m en t.   T h e   co r r elatio n   b etwe en   Fig u r e   2 ,   wh ic h   d ep i cts  th L STM   d esig n ,   an d   T ab le  2 ,   wh ich   p r esen ts   th r esu lts   o f   th im p lem en tatio n   u s in g   Py th o n ,   s h o ws  th at  th is   m o d el  h as  th r ee   lay er s L STM ,   Dr o p o u t,  a n d   Den s ( Ou tp u t) .   Fo r   ex am p le,   th im p lem en tatio n   f o r   S - AC   i s   ex p lain ed   as f o llo ws:   a)   ls tm _ 1 T h is   is   th f ir s L STM   lay er   in   th e   m o d el,   with   a n   o u tp u s h ap e   o f   ( No n e,   1 0 ,   2 5 ) .   T h is   m ea n s   th at  th lay er   h as  2 5   u n its   ( o r   m em o r y   ce lls ) ,   an d   it  p r o d u c es  s eq u en ce   o f   1 0   o u tp u v ec to r s ,   wh er e   ea ch   v ec to r   h as  2 5   elem en ts .   T h ese  o u tp u v ec to r s   ar eq u i v alen to   th n u m b er   o f   in p u f ea tu r es:  S - AC   h as  1 0   in p u f ea tu r es,  S - T h as  8   in p u f ea tu r es,  wh ile  S - WP h as  5   in p u f ea tu r es.  T h L STM   lay er   r ec eiv es in p u t f r o m   th in p u t l ay er   an d   p r o ce s s es it b y   u p d at in g   its   in ter n al  s tate,   wh ich   co n s is ts   o f   ce ll   s tate  an d   h id d en   s tate.   T h L STM   lay er   ca n   lear n   to   k ee p   o r   d is ca r d   in f o r m atio n   f r o m   th p r ev io u s   tim s t ep s ,   d ep en d in g   o n   its   r elev an ce   f o r   p r e d ictin g   th o u tp u t.   b)   d r o p o u t_ 1 : T h is   is   d r o p o u t l ay er ,   wh ich   is   u s ed   to   p r ev en t o v er f itti n g   b y   r an d o m ly   s ettin g   f r ac tio n   o f   th in p u u n its   to   ze r o   d u r in g   tr ain in g .   T h d r o p o u r ate  is   d en o ted   b y   1 0 o r   0 . 1 ,   as  m en tio n ed   b e f o r e   in   th p r ev io u s   s ec tio n .   T h o u tp u s h ap e   o f   th e   d r o p o u la y er   is   th e   s am as  th e   in p u s h ap e,   wh ic h   is   ( No n e,   1 0 ,   2 5 )   in   t h is   ca s e.   c)   ls tm _ 2 T h is   is   th s ec o n d   L S T lay er   in   th m o d el,   with   an   o u tp u s h ap o f   ( No n e,   2 5 ) .   T h is   m ea n s   th at  th l ay er   h as  2 5   u n its ,   an d   it  p r o d u ce s   s in g le  o u tp u v ec to r   f o r   ea c h   in p u s eq u e n c e.   T h is   L STM   lay er   r ec eiv es  in p u f r o m   th p r ev io u s   lay er   an d   p r o ce s s es  it  b y   u p d atin g   its   in ter n al   s tate,   wh ich   co n s is ts   o f   ce ll st ate  an d   h i d d en   s tate.   d)   d r o p o u t_ 2 T h is   is   an o th er   d r o p o u lay er ,   wh ich   is   u s ed   to   p r ev en o v er f itti n g   b y   r an d o m ly   s ettin g   f r ac tio n   o f   th e   in p u t   u n its   to   ze r o   d u r in g   tr ai n in g .   T h e   d r o p o u r ate  is   d en o ted   b y   1 0 an d   th e   o u tp u t   s h ap o f   th is   d r o p o u t la y er   is   t h s am as th in p u t sh a p e,   w h ich   is   ( No n e,   2 5 )   i n   th is   ca s e.       Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esian   J   E lec  E n g   &   C o m p   Sci     I SS N:   2 5 0 2 - 4 7 52       N a tu r a l sma r t h o me  a u to ma tio n   s ystem  u s in g   LS TM   b a s ed   o n   h o u s eh o ld   b eh a vi o u r   ( Mo c h a ma d   S u s a n to k )   765   e)   d en s e:  T h is   is   th o u tp u lay e r   o f   th m o d el,   wh ich   is   f u l ly   co n n ec ted   la y er   with   1   u n i ( o r   n eu r o n ) .   T h o u tp u s h ap o f   th d en s e   lay er   is   ( No n e,   1 ) ,   wh ic h   m e an s   th at  it  p r o d u ce s   s in g le  s ca lar   v alu f o r   ea ch   in p u s eq u en ce .   T h ac tiv atio n   f u n ctio n   o f   th d en s lay er   is   tan h ,   wh ich   is   u s ed   f o r   b in ar y   class if icatio n   task s .       T ab le  2 .   Su m m a r y   L STM   clas s if icatio n   m o d el   La y e r   S - AC   S - TV   S - WPM   O u t p u t   S h a p e   P a r a #   O u t p u t   S h a p e   P a r a #   O u t p u t   S h a p e   P a r a #   l st m _ 1   ( N o n e ,   1 0 ,   2 5 )   2 7 0 0   ( N o n e ,   8 ,   2 5 )   2 7 0 0   ( N o n e ,   5 ,   2 5 )   2 7 0 0   d r o p o u t _ 1   ( N o n e ,   1 0 ,   2 5 )   0   ( N o n e ,   8 ,   2 5 )   0   ( N o n e ,   5 ,   2 5 )   0   l st m _ 2   ( N o n e ,   2 5 )   5 1 0 0   ( N o n e ,   2 5 )   5 1 0 0   ( N o n e ,   2 5 )   5 1 0 0   d r o p o u t _ 2   ( N o n e ,   2 5 )   0   ( N o n e ,   2 5 )   0   ( N o n e ,   2 5 )   0   d e n se   ( N o n e ,   1 )   26   ( N o n e ,   1 )   26   ( N o n e ,   1 )   26                 To t a l   p a r a ms :   7 8 2 6     Tr a i n a b l e   p a r a ms :   7 8 0 0   N o n - t r a i n a b l e   p a r a ms:  2 6       T h to tal  n u m b er   o f   p ar am eter s   in   th m o d el  is   7 , 8 2 6 ,   wh ich   in clu d es 7 , 8 0 0   tr ain ab le  p ar a m eter s   an d   2 6   n o n - tr ain ab le   p ar am eter s .   T h tr ain a b le  p a r am eter s   ar e   th weig h ts   an d   b iases   o f   th e   L STM   an d   d en s lay er s ,   wh ich   ar e   lear n e d   d u r in g   tr ain in g .   T h n o n - tr ain a b l p ar am eter s   ar e   th d r o p o u t   m ask s ,   wh ich   ar e   r an d o m l y   g e n er ated   an d   f ix ed   d u r in g   tr ai n in g .   T h ese  r esu lt s   d em o n s tr ate  th e   r eliab ilit y   o f   L STM   as  o n e   o f   th b est - p er f o r m in g   d ee p   lear n in g   alg o r ith m s ,   p ar ticu lar ly   i n   h an d lin g   lar g e - s ca le  d ata  s u ch   as  in   th is   s tu d y   wh ich   u s es  m o d el  with   5   l ay er s   ( 1   in p u lay er ,   3   h id d e n   lay er s ,   an d   1   o u t p u lay er )   [ 2 8 ] .   H o wev er ,   th e   L STM   d esig n   in   th is   s tu d y ,   as  p r ev io u s ly   ex p lain ed ,   m ai n t ain s   s im p licity   to   en s u r it s   a p p licab ilit y   o n   ed g e   d ev ices  with in   I o T   n etwo r k s .   Fu r th er   r e f in e   L STM   ar ch itec tu r es  to   r ed u ce   co m p u tatio n al   co m p le x ity   wh ile   m ain tain in g   o r   ev e n   im p r o v i n g   ac cu r ac y .   R esear ch   co u ld   f o cu s   o n   p r u n in g   tech n i q u es,  q u an tizatio n ,   an ef f icien m em o r y   m an a g em e n to   m ak e   L STM   m o d els  e v en   m o r e   s u itab le  f o r   e d g e   d ev ices  with   lim ited   r eso u r ce s .     3 . 2 .     SH AS  perf o r m a nce  a na ly s is   T h is   s tu d y   u s es  L STM   in   a   SHAS   ap p licatio n   to   p r o d u ce   o u tp u in   th f o r m   o f   O o r   OF F   class if icatio n s .   T h ese  ON  o r   OFF  m ess ag es  ar th en   f o r w ar d ed   t o   th e   s m ar tp lu g   v ia  th MQ T T   p r o to co l,   wh er th ey   ar tr a n s lated   b y   t h r elay   in   th s m ar tp l u g   in to   an   ON  o r   OFF s witch   to   co n tr o l th p o w er   f l o to   th elec tr ical  ap p lian ce .   T o   ev alu ate  th p er f o r m an ce   o f   th L STM   m o d el  in   th is   SHAS,  th co n f u s io n   m atr ix   m eth o d   is   u s ed ,   wh ich   is   s tan d ar d   ap p r o ac h   in   class if icatio n   m o d elin g .   T h c o n f u s io n   m atr ix   = (     )     p r o v id es  i n s ig h in to   t h m o d el' s   ac cu r ac y   [ 2 9 ] Her e,   T r u Po s itiv ( TP )   r ep r esen t s   ca s es  wh er th e   s m ar tp lu g   is   co r r ec tly   p r ed ict ed   to   b ON,   Fals Neg ativ ( FN )   r ep r esen ts   ca s es  wh er th p lu g   is   p r ed icted   to   b OFF  wh en   it  is   ac tu ally   ON,   T r u Neg ativ ( TN )   r ep r esen ts   co r r ec p r ed ictio n s   th at  th p lu g   is   O FF ,   an d   Fals Po s itiv ( FP )   r ep r esen ts   in co r r ec t   p r ed ictio n s   wh e r th p lu g   is   p r e d icted   to   b ON  wh en   it  is   OFF.   All  th p r ed icted   d ata  f r o m   th L STM   m o d el,   o r d er ed   b y   tim e,   will  b cla s s if ied   in to   t h ese  f o u r   v ar iab les.  B elo ar th r esu lts   o f   th e   c o n f u s io n   m atr ix   f r o m   th e   L STM   m o d el  with   to tal  o f   8 0 , 8 1 8   d ata  p o in ts   o n   th e   d ataset  f o r   ea ch   S - AC ,   S - T V,   an d   S - W PM,   wh ich   wer r u n   i n   th Go o g le  C o lab   en v i r o n m en t u s in g   Py th o n      = ( 40594 4339 10418 25467 )    = ( 22273 450 1155 56940 )    = ( 5728 1044 952 73094 )     Nex t,  th co n f u s io n   m atr i x   p ar am eter s   ar ca lcu lated   u s in g   t h ( 5 ) - ( 8 )   [ 3 0 ]       =  +   +  +  +      ( 5 )      =   +    ( 6 )       =   +    ( 7 )     1  = 2     +   ( 8 )   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4 7 52   I n d o n esian   J   E lec  E n g   &   C o m p   Sci ,   Vo l.  3 7 ,   No .   2 Feb r u a r y   20 25 7 5 8 - 7 7 0   766   T h p e r f o r m an c e v alu atio n   o f   th e   SHAS  u s in g   ( 5 ) - ( 8 )   i s   s u m m ar ized   i n   T ab le   3   an d   v is u ally   r ep r esen ted   in   Fig u r 4 .   T h e v alu atio n   in d icate s   th at  th L STM   m o d el' s   lear n in g   o f   th h o u s eh o ld   b eh av io r   is   q u ite  s u cc es s f u l,  ac h iev in g   h ig h   ac cu r ac y   f o r   th s m ar tp l u g   T ( S - T V)   at  9 8 an d   th s m ar tp lu g   W ater   Pu m p   Ma ch in ( S - W PM)   at  9 7 . 6 %,  b u s lig h tly   lo wer   f o r   th s m ar tp lu g   AC   ( S - AC )   at  8 1 . 9 %.  Fo r   S - T V,   p r ec is io n   an d   r ec all  ar b o t h   v er y   h i g h   at  9 5 an d   9 8 %,  r esp ec tiv ely .   T h is   in d icate s   th at  th L STM   m o d el   ac cu r ately   p r ed icts   th ON/O FF   s tatu s   o f   th T V,   with   m in i m al  f alse  p o s itiv es  ( FP )   an d   f alse  n eg ativ es  ( FN) .   S - W PM  also   d em o n s tr ates  g o o d   p er f o r m a n ce ,   with   p r ec is io n   o f   8 5 . 7 an d   r ec all  o f   8 5 %,  m ea n in g   th at   m o s in s tan ce s   ar co r r ec tly   d etec ted ,   th o u g h   f ew  ar m is s ed .   I n   co n tr ast,  S - AC   s h o ws  a   lo wer   p r ec is io n   o f   7 9 . 5 c o m p ar e d   to   r ec all  o f   9 0 . 3 %,  s u g g esti n g   th at   wh ile  th m o d el  c o r r ec tly   p r ed icts   m o s S - AC   in s tan ce s ,   th er ar m o r f als p o s itiv es.  T h p er f o r m an ce   g ap   b etwe en   S - T an d   S - A C   co u ld   b d u to   v ar io u s   f ac to r s   af f ec tin g   ap p lian ce   u s ag p atter n s .   T h e   ac cu r ate  p r ed ictio n   o f   s m ar tp lu g   o p e r atio n s ,   p ar ticu lar ly   f o r   S - T an d   S - W PM,   d ir ec tly   co n tr ib u tes  to   p r ev en tin g   elec t r ical  o v er lo a d s .   T h is   p r ev en tio n   is   cr u cial  f o r   m ain tain in g   h o u s eh o ld   s af ety   b y   r e d u cin g   th r is k   o f   MCB   tr ip s ,   wh ich   ca n   lead   to   eq u ip m en t   d am ag o r   s af ety   h az a r d s .   Ad d itio n ally ,   th s y s tem   en s u r es  en er g y   m a n ag em e n is   o p tim ized   b y   o n ly   ac tiv atin g   ap p lian ce s   wh e n   n e ce s s ar y ,   b ased   o n   lear n ed   u s er   h ab its .   Fu tu r r esear ch   co u l d   ex p lo r co n tex tu al  an d   e n v ir o n m en tal  f ac to r s ,   s u ch   as  wea th er   co n d itio n s ,   tim o f   d ay ,   a n d   u s er   b eh av io r   p atter n s ,   th at   im p ac a p p lian ce   u s ag e.   Ad d itio n ally ,   th e   ac cu r ac y   o f   s en s o r s ,   l ik th o s d etec tin g   r o o m   o cc u p an cy ,   co u ld   b an o th e r   k ey   f ac to r   co n tr i b u tin g   to   t h is   g ap .   I m p r o v in g   s en s o r   ac cu r ac y   o r   u s in g   s en s o r   f u s io n   tech n i q u es  co u l d   en h an ce   m o d el  p r ed ictio n s ,   esp ec ially   f o r   ap p lian ce s   lik e   AC   th at  ar s en s itiv to   r o o m   o cc u p an c y .       T ab le  3 .   T h SHAS  p er f o r m a n ce   P e r f o r ma n c e   M e t r i c s   S martp l u g   S - AC   S - TV   S - WPM   A c c u r a c y   ( %)   8 1 . 9   98   9 7 . 6   P r e c i ss i o n   ( %)   7 9 . 5   95   8 5 . 7   R e c a l l   ( %)   9 0 . 3   98   85   F 1   S c o r e   ( %)   85   97   85           Fig u r 4 .   SHAS C o n f u s io n   m atr ix   p er f o r m an ce   with   co m p a r is o n   o f   th r ee   s m ar tp lu g s       3 . 3 .     SH AS  perf o r m a nce  ev a lua t io n wit h r ea l - wo rld da t a   T h p er f o r m a n ce   o f   th a b o v m o d el  was  f u r t h er   test ed   with   o u t - of - s am p le   d ata  o r   ex ter n al   v alid atio n   d ata,   s p ec if ically   d ata  o u ts id th r an g e   Feb r u ar y   to   Ap r il  2 0 2 4   as  d escr ib e d   in   th m eth o d o l o g y   Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esian   J   E lec  E n g   &   C o m p   Sci     I SS N:   2 5 0 2 - 4 7 52       N a tu r a l sma r t h o me  a u to ma tio n   s ystem  u s in g   LS TM   b a s ed   o n   h o u s eh o ld   b eh a vi o u r   ( Mo c h a ma d   S u s a n to k )   767   s ec tio n .   T h is   s tu d y   u s ed   ex ter n al  v alid atio n   d ata  f r o m   th p er io d   o f   Ma y   1 4 - 2 1 ,   2 0 2 4 ,   with   to tal  o f   5 , 5 2 0   d ata  p o i n ts .   Af ter   p r e - p r o ce s s in g ,   5 , 1 0 9   d ata   p o i n ts   r em ain ed ,   as  s h o wn   in   Fig u r 5 .   Fig u r 5 ( a)   s h o ws  th e   f ir s 6   r o ws  o f   th d ataset,   in d icatin g   s o m NaN   v alu es.  F o llo win g   p r e - p r o ce s s in g ,   in cl u d in g   tr an s f o r m atio n   o f   th T c o lu m n   an d   n o r m ali za tio n ,   th d ata  b ec am e   co n s is ten ac r o s s   all  co lu m n s   as d escr ib in   Fig u r 5 ( b )   d an   5 ( c ) .           ( a)     ( b )       ( c)     Fig u r 5 .   Pre - p r o ce s s in g   ex te r n al  v alid atio n   d ata :   ( a)   in itial  o f   ex ter n al  v alid atio n   d ata ,   ( b )   ex ter n al  v alid atio n   d ata  with   ex tr ac ted   T S ,   a n d   ( c )   ex ter n al  v alid atio n   d ata  a f ter   n o r m lizatio n   a n d   clea n in g       T h L STM   m o d el  was  t h en   te s ted   o n   t h is   ex ter n al   v alid atio n   d ata   f o r   ea ch   s m ar tp lu g   ( S - AC ,   S - T V,   an d   S - W PM) ,   with   ac c u r ac y   r esu lts   s h o wn   in   T ab le   4   a n d   Fig u r 6 .   T h e   test   was  d iv id ed   in to   t h r ee   ca teg o r ies:   wee k d ay s   ( Mo n d ay   to   Fri d ay ) ,   wee k en d s   ( Satu r d ay   an d   Su n d a y ) ,   an d   a ll  d ay s   co m b in ed .   Acc u r ac y   f o r   S - AC   was  lo wer   co m p ar ed   to   S - T V   an d   S - W PM,   p ar ticu lar ly   d u r in g   wee k d ay s ,   wh er e   S - AC   ac h iev ed   5 1 %,  S - T 6 6 . 1 %,  an d   S - W PM  8 3 . 3 %.  I n ter esti n g ly ,   th ac cu r ac y   o f   s m ar tp l u g   S - AC   in cr ea s es   d u r in g   wee k e n d s   co m p a r ed   t o   wee k d ay s ,   r ea ch in g   6 7 . 3 %,  wh ile  f o r   S - W PM,   it  r em ain s   r elativ ely   s tab le  at   ar o u n d   8 2 . 2 %.  A n o th er   in ter e s tin g   o b s er v atio n   is   th at   S - T ac h iev in g   its   lo west  ac cu r ac y   o f   o n ly   4 7 . 5 o n   wee k en d s   b u t   f air   in   wee k d a y s   at  6 6 . 1 %.  W h en   c o n s id er i n g   all  d ay s ,   S - W PM  co n s is ten tly   s h o ws  h ig h er   ac cu r ac y   c o m p ar e d   to   S - AC   an d   S - T at  a n   av e r ag s co r 8 2 . 8 %.  T h is   s u g g ests   th at  th m o d el  m a y   b e   b etter   at  p r ed ictin g   th b eh av io r   o f   th wate r   p u m p   m ac h in co m p a r ed   t o   th air   co n d itio n er   an d   telev is io n .   Ad d itio n ally ,   th m o d elin g   o f   S - W PM  is   n o i n f lu en ce d   b y   tim f ac to r s ,   as  ev id e n ce d   b y   th lo w   co r r elatio n   co ef f icien v alu es     f o r   S - W PM  with   in p u f ea tu r e   v ar iab les   in   th tim ca teg o r y   s u ch   as  [ W K,   HR ,   D,   W S,   NSM] ,   with   a   v alu e   o f   | 0 . 0 1 |   ( r ef er   b ac k   to   Fig u r e   3 ) .   T h ese   v ar iatio n s   in   ac cu r ac y ,   p ar ticu lar ly   f o r   S - AC   an d   S - T V,   h ig h lig h th e   im p o r tan ce   o f   c o n s id er in g   tim e - b as ed   u s er   h ab its   in   p r ev en tin g   o v er lo a d s .   Du r in g   wee k en d s ,   wh en   u s ag p atter n s   ar less   p r ed ictab le,   th s y s tem 's  ab ilit y   to   ad ju s to   th es ch an g es  b ec o m es  cr itical  f o r   b o th   s af ety   an d   e n er g y   e f f icien cy .   B y   d y n am i ca lly   ad ap tin g   t o   d if f er en s c en ar io s ,   th s y s tem   en s u r es  th at  ap p lian ce s   ar n o lef r u n n in g   u n n ec ess ar ily ,   th er eb y   r ed u cin g   t h r is k   o f   o v e r lo ad s   an d   o p tim izin g   p o wer   co n s u m p tio n .       T ab le  4 .   SHAS  p er f o r m an ce   u s in g   ex ter n al  v alid atio n   d ata   P e r f o r ma n c e   me t r i c s   Ty p e   o f   d a t a   S martp l u g   S - AC   S - TV   S - WPM   A c c u r a c y   ( %)   W e e k d a y s   51   6 6 . 1   8 3 . 3   W e e k e n d   6 7 . 3   4 7 , 5   8 2 . 2   A l l   D a y s   55   6 0 . 8   83   A v e r a g e   o f   a c c u r a c y   ( %)   5 7 . 8   5 8 . 1   8 2 . 8         Evaluation Warning : The document was created with Spire.PDF for Python.