scieee Science in your language
[en] (orig)

A Deep Learning-Driven Self-Conscious Distributed Cyber-Physical System for Renewable Energy Communities

Author: Cicceri, Giovanni; Tricomi, Giuseppe; D'Agati, Luca; Longo, Francesco; Merlino, Giovanni; Puliafito, Antonio
Publisher: Zenodo
DOI: 10.3390/s23094549
Source: https://zenodo.org/records/17674542/files/PreprintREC2.pdf
A Deep Lea ning-D i en Sel -Conscious
Dis ibu ed Cybe -Physical Sys em o
Renewable Ene gy Communi ies
Gio anni Cicce i 1,2,4, Giuseppe T icomi1,4,*, Luca D”Aga i1,3,4,
F ancesco Longo1,4, Gio anni Me lino1,4, An onio Pulia i o1,4,*
1Depa men o Enginee ing (DI), Uni e si y o Messina, 98122 Messina, I aly;
gcicc[email p o ec ed] (G.C.);luc[email p o ec ed] (L.D.);
[email p o ec ed] (F.L.); [email p o ec ed] (G.M.)
2Depa men o Biomedicine, Neu oscience and Ad anced Diagnos ics (BiND),
Uni e si y o Pale mo, 90127 Pale mo, I aly; gio anni.cicce [email protected]
3Depa men o Biomedical and Den al Sciences, Mo phological and Func ional
Images (BIOMORF), Uni e si y o Messina, 98122 Messina, I aly
4These au ho s belong o CINI: Na ional In e uni e si y Conso ium o In o ma ics,
00185 Rome, I aly.
No embe 22, 2025
Abs ac
The In e ne o Things (IoT) is ans o ming a ious domains, includ-
ing sma ene gy managemen , by enabling he in eg a ion o complex
digi al and physical componen s in dis ibu ed cybe -physical sys ems
(DCPSs). The design o DCPSs has so a been ocused on pe o mance-
ela ed, non- unc ional equi emen s. Howe e , wi h he g owing powe
consump ion and compu a ion expenses, sus ainabili y is becoming an im-
po an aspec o conside . This has led o he concep o ene gy-awa e
DCPSs, which in eg a e con en ional non- unc ional equi emen s wi h
addi ional a ibu es o sus ainabili y, such as ene gy consump ion. This
esea ch ac i i y aimed o in es iga e and de elop ene gy-awa e a chi-
ec u al models and edge/cloud compu ing echnologies o design nex -
gene a ion, AI-enabled (and, speci ically, deep-lea ning-enhanced), sel -
conscious IoT-ex ended DCPSs. Ou key con ibu ions include ene gy-
awa e edge- o-cloud a chi ec u al models and echnologies, he o ches a-
ion o a (possibly ede a ed) edge- o-cloud in as uc u e, abs ac ions
and uni ied models o dis ibu ed he e ogeneous i ualized esou ces,
inno a i e machine lea ning algo i hms o he dynamic ealloca ion and
econ igu a ion o ene gy esou ces, and he managemen o ene gy com-
muni ies. The p oposed solu ion was alida ed h ough case s udies on op-
imizing enewable ene gy communi ies (RECs), o ene gy-awa e DCPSs,
1
which a e pa icula ly challenging due o hei unique equi emen s and
cons ain s; in mo e de ail, in his wo k, we aim o de ine he op imal
implemen a ion o an ene gy-awa e DCPS. Mo eo e , sma g ids play a
c ucial ole in de eloping ene gy-awa e DCPSs, p o iding a lexible and e -
icien powe sys em in eg a ing enewable ene gy sou ces, mic og ids, and
o he dis ibu ed ene gy esou ces. The p oposed ene gy-awa e DCPSs
con ibu e o he de elopmen o sma g ids by p o iding a sus ainable,
sel -consis en , and e icien way o manage ene gy dis ibu ion and con-
sump ion. The pe o mance demons a es ou app oach’s e ec i eness o
consump ion and p oduc ion (based on RMSE and MAE me ics). Ou
esea ch suppo s he ansi ion owa ds a mo e sus ainable u u e, whe e
communi ies adop ing REC p inciples become key playe s in he ene gy
landscape.
1 In oduc ion
The In e ne o Things (IoT) has become inc easingly p e alen ac oss
a ious applica ion domains, such as sma ci ies and Indus y 4.0, lead-
ing o a heigh ened emphasis on he design and de elopmen o dis ibu ed
cybe -physical sys ems (DCPSs). These sys ems’ beha io is signi ican ly
in luenced by hei con ex , encompassing he ex e nal physical en i on-
men and he in e nal s a es o he IT componen s and ne wo ked in-
as uc u e. In ecen yea s, DCPSs ha e been p oposed o acili a e
enewable ene gy communi ies (RECs), which p omo e sus ainable de el-
opmen wi hin local communi ies by adop ing enewable ene gy sou ces.
RECs consis o indi iduals, o ganiza ions, and businesses collabo a ing
o p oduce and consume enewable ene gy, such as sola o wind powe .
In eg a ing DCPSs in RECs can enhance ene gy usage e iciency by moni-
o ing and con olling ene gy low wi hin he communi y. DCPSs p o ide
he essen ial in as uc u e o RECs o supe ise and egula e he p oduc-
ion and consump ion o enewable ene gy sou ces. In his con ex , IoT
de ices collec ene gy p oduc ion and consump ion da a, which is hen
analyzed by cloud-based pla o ms o op imize he ene gy managemen
sys em. By ha nessing hese echnologies, RECs can es ablish a mo e de-
cen alized and democ a ized ene gy sys em, empowe ing local communi-
ies o manage hei ene gy esou ces ac i ely. Nume ous global ini ia i es
ha e success ully in eg a ed DCPSs and RECs. Fo example, in Ge many,
he “Ene gieWendeBauen” p ojec (ene giewendebauen.de, accessed on
1 Ma ch 2023) has implemen ed a DCPS-based pla o m o ene gy man-
agemen in esiden ial communi ies. This pla o m enables esiden s o
moni o and con ol hei ene gy usage and sha e excess enewable en-
e gy wi hin he communi y. Simila ly, he “Sola Sha e” p ojec in I aly
(li ega e.i , accessed on 1 Ma ch 2023)has in oduced a DCPS-based
pla o m ha allows indi iduals and small businesses o sha e su plus
sola ene gy wi h hei neighbo s. In eg a ing DCPSs and RECs o e s a
p omising oppo uni y o p omo e sus ainable de elopmen and ans o m
he ene gy landscape. By le e aging he powe o IoT and cloud compu -
ing echnologies, hese sys ems can enable mo e e icien , sus ainable, and
decen alized ene gy managemen . Fu u e esea ch in his a ea should o-
2
cus on de eloping scalable and secu e DCPS-based pla o ms o suppo
he widesp ead adop ion o enewable ene gy sou ces in local communi ies
wo ldwide.
To enable he c ea ion o DCPSs, an o e lay-based dis inc ion be ween
he physical en i onmen and he digi al in as uc u e is conside ed a
co ne s one o he whole scena io. IoT de ices’ sensing and ac ua ion ca-
pabili ies acili a e his in e ac ion be ween he wo laye s, which collec
da a o send o he cloud o p ocessing acco ding o a ious scopes, such
as la ency educ ion, p i acy-p ese ing, o secu i y pu poses. Da a p o-
cessing in he cloud ypically in ol es logic uni s adap ing hei models
based on obse ed da a and p o iding dynamic and que yable un ime
models o a pipeline o se ices. Un il now, he design o DCPSs has
p ima ily ocused on pe o mance- ela ed, non- unc ional equi emen s.
Howe e , sus ainabili y has become c i ical due o he g owing powe con-
sump ion and associa ed compu ing expenses a di e en le els in hese
sys ems. The inc easing sophis ica ion o DCPSs equi es mo e compu-
a ional esou ces, which leads o inc eased ene gy cos s. To add ess he
sus ainabili y challenge, in eg a ing ene gy-awa e digi al componen s in
DCPSs is an essen ial ac i i y o c ea e sus ainable sys ems whe e IoT
de ices and se e -based in as uc u es can make au onomous decisions
based on he ou comes o sel -lea ning algo i hms. DCPSs a e becoming
inc easingly complex and consis o mul iple in e ac ing subsys ems and
en i onmen s. The agg ega ion o subsys ems occu s a di e en le els,
om edge de ices o la ge sys ems. The p oposed solu ion en isions a
u u e whe e DCPSs a e ea ed as conscious sys ems ha can espond o
in e nal and ex e nal igge s and adap hei ope a ions o achie e p ede-
ined goals. These sys ems will be able o lea n om expe ience h ough
sel -lea ning mechanisms and ca y ou planned ac ions and p edic i e
s a egies a he o e all sys em le el o op imize esou ces, maximize e -
iciency, and educe ene gy cos s.
A enewable ene gy communi y ealized upon a DCPS is an en i on-
men in which wo aspec s mus be combined and o ches a ed: ene gy
p oduc ion and ene gy consump ion. The ade-o has o be ealized no
only in e ms o online o ches a ion bu also by conside ing his o ical
da a ela ed o he wo aspec s men ioned abo e. F om his pe spec i e,
IoT de ices a e essen ial o obse e physical pa ame e s, such as cu en
consump ion and ol age. A dis ibu ed in as uc u e collec s and p o-
cesses hese samples h ough op imizing sel -lea ning algo i hms.
The goal o he en isioned en i onmen is o ensu e he op imal beha -
io o he en i e REC by maximizing sel -consumed ene gy and minimiz-
ing he del a be ween he communi y’s p oduced and i s consumed ene gy
p o iles. This way, he p esen ed solu ion is ailo ed o a scena io in which
he enewable ene gy communi y is composed o eal es a e uni s ag eeing
o c ea e a DCPS in which hey coope a e wi h each o he h ough a cen-
al en i y appoin ed o ac as an ene gy manage and b oke owa d he
g id. The b oke , unning on he DCPS se e acili ies, has h ee main
du ies:
•Dis ibu ing he ene gy p oduced among he whole communi y, a oid-
ing pu chasing ene gy om he g id as much as possible;
3
•Con inuously moni o ing he ene gy ma ke o pu chase and sell he
ene gy a he bes p ice;
•No i ying he REC’s end use s, sugges ing disconnec ing speci ic sub-
me e ing o ligh ening he ene gy load o comply wi h he consump-
ion pa ame e s de ined by he REC o ob ain a be e mone a y
ewa d. The ewa d (ob ained by he REC conce ning he ene gy
a ailable o sale) is sha ed p opo ionally o he co ec use beha -
io . The p oposed me hodology incen i izes e icien ene gy use and
con ibu es o a mo e sus ainable ene gy ecosys em.
O cou se, hese aspec s and conside a ions a e no he only elemen s
ele an o cope wi h his goal. Indeed, REC designe s also ha e o con-
side o he ac o s, such as:
•The placemen o he compu a ion en i ies inside he in as uc u e;
•IoT and in as uc u e managemen ;
•En i onmen al ene gy p edic ions: p oduc ion and consump ion;
•Use da a p i acy.
In his wo k, we p esen a sel -conscious sys em designed o cons an ly
moni o and o ecas ene gy consump ion in eal es a e uni s unde he
pu iew o he REC. This g oundb eaking app oach acili a es ene gy
managemen and educes dependency on ex e nal powe g ids. To high-
ligh he con ibu ions:
(i) Ou sys em uses ad anced deep lea ning algo i hms o accu a ely
p edic ene gy p oduc ion and consump ion pa e ns, pa ing he
way o mo e e icien and eco- iendly ene gy dis ibu ion.
(ii) When ene gy consump ion exceeds p oduc ion, he sys em p oac-
i ely dispa ches no i ica ions o eal es a e uni s, indica ing high
consump ion le els o hose es a es wi h ele a ed p ojec ed con-
sump ion. This imely communica ion encou ages esiden s o sho en
hei ene gy usage, ul ima ely educing he necessi y o p ocu ing
supplemen a y ene gy om he g id.
(iii) The sys em me iculously eco ds and examines he esponses o hese
educ ion eques s o suppo communi y in ol emen and commi -
men . These da a a e la e sha ed wi h he communi y, which can
hen delibe a e a ewa d-based incen i e p og am o ecognize hose
who consis en ly exhibi esponsible ene gy consump ion p ac ices.
This app oach a o s ene gy e iciency and sus ainable li ing wi hin he
REC by os e ing a coope a i e a mosphe e, p o iding mu ual bene i s o
all communi y membe s.
This pape is o ganized as ollows. In Sec ion 2, we p o ide a comp e-
hensi e li e a u e e iew o he exis ing me hods and echnologies used in
ene gy managemen and discuss he ad an ages and limi a ions o each.
Sec ion 3 p o ides he backg ound in o ma ion necessa y o unde s and
he p esen ed wo k. In Sec ion 4, we desc ibe he sys em a chi ec u e and
he ole o each componen in de ail. Sec ion 5 p esen s a case s udy illus-
a ing he p ac ical applica ion o he p oposed solu ion, while Sec ion
4
6 discusses he esul s and alida ion o ou app oach. Finally, in Sec-
ion 7, we conclude wi h ou indings and sugges u u e enhancemen s o
imp o e he e ec i eness and applicabili y o ou solu ion.
2 Rela ed Wo ks
Dis ibu ed cybe -physical sys ems (DCPSs) can signi ican ly bene i om
ecen ad ancemen s in dis ibu ed compu ing, including a chi ec u al el-
emen s, algo i hms, and models. In [1], he au ho s highligh key chal-
lenges associa ed wi h DCPSs, such as la ency, ene gy consump ion, secu-
i y/p i acy, and eliabili y. Designing a eliable IoT communica ion in-
as uc u e o DCPSs emains an open challenge, as o he esea che s in
[2, 3] emphasized. Meanwhile, e . [4] o mula es he scheduling compu a-
ion on he cloud con inuum as a mixed-in ege linea p og amming p ob-
lem and p oposes an ene gy-awa e deploymen and eplica ion scheduling
model, conside ing he capabili y o edge/ og nodes o ha es “g een”
ene gy.
The inc eased adop ion o DCPSs, combined wi h he need o add ess
eme ging clima e change issues, has led o enewable ene gy communi-
ies (RECs). In ecen yea s, ene gy deli e y and consump ion in DCPSs
ha e gained pa icula a en ion due o he inc easing numbe o use s
(p oduce s and consume s) in ol ed in gene a ing and sha ing enewable
ene gy [5, 6]. Resea ch on ene gy managemen and op imiza ion h ough
ene gy exchange, sha ing, and s o age mechanisms, along wi h he cha -
ac e iza ion o use beha io s, is c ucial o achie ing sus ainabili y in
RECs [7, 8, 9]. In his con ex , e . [10] p oposes a dis ibu ed ene gy
managemen sys em (EMS) o op imal mic og id ope a ion, conside -
ing powe dis ibu ion cons ain s. The EMS demons a es e ec i eness
in bo h islanded and g id-connec ed modes, wi h u u e wo k ocusing
on i s implemen a ion in eal sys ems and pe o mance analysis. Cloud
compu ing has eme ged as a popula solu ion o managing, s o ing, and
p ocessing da a in ene gy sys ems. As ou lined by [11], i o e s a scal-
able, on-demand, and cos -e ec i e model o deli e ing IT esou ces ia
he In e ne . Nume ous esea che s ha e in es iga ed he applica ion o
cloud compu ing o ene gy managemen and op imiza ion. In [12], he
au ho s explo e he new challenges ha sma g id echnology in oduces
o comp ehensi e da a managemen and examine how cloud compu ing
can add ess hese issues. Thei su ey encompasses sma g id and ene gy
managemen me hods, in es iga ing he use o cloud compu ing in a ious
domains, such as ene gy managemen , demand-side managemen , building
ene gy managemen , ene gy hubs, and powe dispa ching sys ems.
Sma g ids ep esen a mode nized elec ical g id in as uc u e ha
employs cu ing-edge echnologies o moni o , con ol, and op imize elec-
ical powe gene a ion, dis ibu ion, and consump ion. The au ho s in
[13] p esen a de ailed o e iew o sma g id echnologies, including ad-
anced me e ing in as uc u e, demand esponse, and dis ibu ed ene gy
esou ces. Fu he mo e, e . [14] e iews demand-side managemen ech-
niques in sma g ids, emphasizing he impo ance o load o ecas ing,
demand esponse, and ene gy s o age sys ems in achie ing ene gy e i-
5

ciency and g id eliabili y. In eg a ing he In e ne o Things (IoT) and
cloud compu ing has shown immense po en ial in enhancing he e iciency
o ene gy managemen sys ems. IoT p o ides a pla o m o connec ing
and collec ing da a om a ious de ices and senso s, while cloud compu -
ing enables he p ocessing and analysis o hese da a. In [15], he au ho s
discuss how inco po a ing IoT echnologies in o sma g ids can imp o e
moni o ing, communica ion, and da a p ocessing ac oss a ious de ices.
They p opose a laye ed app oach o classi ying IoT applica ions in sma
g ids and explo e ecen esea ch e o s along wi h u u e di ec ions. On
he o he hand, he au ho s in [16] in es iga e he bene i s o combining
IoT and cloud compu ing o sma g id applica ions, pa icula ly in de-
mand esponse, aul de ec ion, and enewable ene gy in eg a ion. This
syne gis ic app oach holds p omise o u he ene gy managemen and
op imiza ion ad ancemen s, pa ing he way o mo e sus ainable and e i-
cien ene gy sys ems. Re . [17] in es iga es he co ela ion be ween sola
i adiance and ha monic dis o ion in g id- ied pho o ol aic dis ibu ed
ene gy esou ce (PV-DERs) sys ems. Unde s anding his ela ionship can
help de elop e ec i e g id- o-g id powe -sha ing a angemen s and mi i-
ga e ha monics in bidi ec ional powe - ans e communi y-g id s uc u es.
The sel -managemen p ocesses ha go e n he ope a ion o RECs a e
based on machine lea ning (ML) echniques o imp o e hei e ec i eness,
au onomy, and e iciency. Ene gy demand and supply o ecas ing, sel -
consump ion, cha ac e iza ion o powe consump ion beha io s, e icien
scheduling o ene gy esou ces, and appliance obsolescence a e some asks
in ol ing ML and deep lea ning (DL) echniques [18, 19, 20, 21].
Some s udies ha e been conduc ed using bo h s a is ical app oaches
[22, 23, 24] and ML models o p edic ing indi idual household loads, p e-
dominan ly he la e , due o hei abili y o cap u e complex pa e ns in
he da a and p o ide accu a e p edic ions [25, 26, 27, 28]. On he o he
hand, despi e o he wo ks ha ha e been conduc ed o imp o e he accu-
acy o household load o ecas ing using he ad an ages o DL models, and
hus o he use o he neu al ne wo k (NN)-based algo i hms [29, 30, 31],
o he in es iga ions ha e ocused on imp o ing he accu acy o household
load o ecas ing by aking ad an age o DL a chi ec u es o ime se ies
p edic ion, including he highly e ec i e long sho - e m memo y neu al
ne wo ks (LSTMs) [32, 33]. The la e ha e demons a ed ema kable ad-
ancemen s in ecen imes, despi e he ola ili y o p edic ions caused by
he he e ogenei y and andomness o household beha io ; howe e , hey
a e ou -pe o med by he mo e accu a e Bi-LSTM ne wo ks [34, 35, 36].
In his con ex , modeling use p o iles o mee ene gy demand while op-
imizing o e all consump ion is c ucial [37]. Thus, DL models a e a mus
o iden i y use s’ li es yles based on hei daily ene gy consump ion. In
addi ion, he me eo ological o ecas da a mus also be conside ed when
modeling ene gy p o iles, as enewable ene gy sou ces a e o en in e mi -
en . Resea ch on de eloping planning s a egies o sma load dis ibu-
ion and in eg a ing enewable ene gy esou ces is ongoing, and ede a ed
lea ning (FL) app oaches a e being in es iga ed o his pu pose [38, 39].
Ene gy awa eness mus be inco po a ed a e e y laye (models, da a,
algo i hms, ha dwa e componen s, e c.) and ie (cloud, edge/ og, IoT) o
he IT in as uc u e o DCPSs, and in e e y phase (design, deploymen ,
6
execu ion, e c.). To add ess his p oblem, he scien i ic communi y has
begun o de ine me hodologies and app oaches o e alua e he ene gy
consump ion o models and algo i hms based on s uc u al and beha io al
pa ame e s [40]. Fo example, e . [41] p oposes an ene gy-e icien IoT
da a comp ession algo i hm o op imize he execu ion o ML algo i hms a
he edge. A he same ime, e [42, 43] ocuses on he ene gy op imiza ion
o he deploymen and dis ibu ed aining o ML models a he edge,
espec i ely. The p ocessing capabili ies o IoT de ices ep esen bo h
a esou ce and a cons ain . Thus, designing a sui able in as uc u e
is bo h a equi emen and a challenge. The end owa ds o loading
da a analy ics asks om edge de ices o he cloud has been inc easing.
Howe e , exis ing o loading app oaches ace he challenge o being s a ic
and needing help o adjus o changing wo kloads and ne wo k condi ions.
Mo eo e , in [44], an ene gy-awa e wo kload alloca ion amewo k o
dis ibu ed deep neu al ne wo ks (DNNs) in he edge-cloud con inuum
was p esen ed o minimize ene gy cos o in e ence. This amewo k con-
side s ene gy consump ion and compu a ion pe o mance o op imize he
alloca ion o wo kloads in a dis ibu ed compu ing en i onmen . O load-
ing da a analy ics asks om edge de ices o he cloud has g ea po en ial
o imp o ing he e iciency and pe o mance o DCPSs. Howe e , exis -
ing o loading app oaches ha e limi a ions, and esea che s con inue o
de elop mo e dynamic and ene gy-e icien solu ions o o e come hese
challenges.
The ad ancemen s in DCPS esea ch make signi ican p og ess on la-
ency, ene gy consump ion, secu i y/p i acy, eliabili y, and compu a ion
alloca ion challenges, imp o ing hei e ec i eness, au onomy, and e i-
ciency while con ibu ing o sus ainabili y and add essing eme ging p ob-
lems ela ed o clima e change. Fo hese easons, he solu ion p oposed
in his s udy aims o de ine an op imal implemen a ion/ a chi ec u e o an
ene gy-awa e DCPS, p o iding a sma and lexible powe sys em while
enabling he in eg a ion o enewable ene gy sou ces and acili a ing he
in eg a ion o mic og ids and o he dis ibu ed ene gy esou ces. Re .
[45] p esen s an asymme ical single-phase ele en-le el in e e o he
g id in eg a ion o dis ibu ed powe gene a ion sou ces, con ibu ing o
imp o ed powe quali y and cos e ec i eness in g id-connec ed sys ems.
Mo eo e , e . [46] in oduces a dis ibu ed- a iable low- a iable em-
pe a u e (VF-VT) app oach o in eg a ed ene gy and hea ing sys ems,
o e ing p i acy p ese a ion, easibili y, and scalabili y. The s udy iden-
i ies u u e esea ch di ec ions, including global op imiza ion, model de-
elopmen , and imp o ed he mal dynamics modeling, which can u he
enhance he pe o mance and e iciency o ene gy-awa e DCPSs.
Ou p oposed solu ion employs a combined app oach o managing
bo h he p oduc ion and consump ion aspec s o RECs, which se s i apa
om o he sys ems. In addi ion o his comp ehensi e app oach, ou so-
lu ion p o ides h ee key con ibu ions ha , al hough p esen in some
exis ing solu ions, a e no ypically ound oge he in a single amewo k.
Speci ically, ou app oach in eg a es all h ee con ibu ions, enhancing he
o e all e ec i eness and e iciency o he sys em. In compa ison, he pa-
pe s om e e ences [18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37] p ima ily ocus on applying AI echniques o indi id-
7
ual households a he han en i e communi ies. While hese s udies o e
aluable insigh s in o AI-based ene gy managemen , hey may no ully
cap u e he complexi y and in e connec ednesso ene gy p oduc ion and
consump ion in b oade communi ies. By add essing ene gy managemen
a he communi y le el, ou solu ion aims o achie e a mo e comp ehen-
si e unde s anding and op imiza ion o ene gy dis ibu ion and u iliza ion
in RECs. Mo eo e , he wo ks om e e ences [5, 6, 7, 8, 9] do no ex-
plici ly men ion he use o AI echniques in hei p oposed solu ions. Al-
hough hese s udies con ibu e o ad ancing ene gy-awa e DCPSs, hey
may no ully le e age he po en ial o AI and ML in imp o ing ene gy
managemen , o ecas ing, and op imiza ion in RECs. By inco po a ing
AI and, mo e speci ically, DL echniques in ou solu ion, we seek o u -
he enhance he pe o mance, e iciency, and adap abili y o ou p oposed
ene gy-awa e DCPS a chi ec u e.
3 Backg ound
3.1 S ack4Things: In eg a ing IoT Resou ces in o
OpenS ack as I/Ocloud
S ack4Things (S4T) [47] is an open sou ce esea ch p ojec and inno a i e
pla o m designed o ex end he widely used cloud managemen sys em,
OpenS ack, in o he In e ne o Things (IoT) ealm. S4T aims o a-
cili a e he managemen o IoT and edge de ice deploymen s wi hin he
OpenS ack ecosys em, implemen ing app op ia e ea u es o seamlessly
in eg a e IoT in as uc u es in o he edge-ex ended In as uc u e-as-a-
Se ice (IaaS) and Pla o m-as-a-Se ice (PaaS) clouds. Fu he mo e, he
Inpu /Ou pu (I/O)
cloud [48] app oach le e ages S4T unc ionali ies o p o ide s anda dized
and gene ic p og amming capabili ies on op o IoT esou ces, indepen-
den ly o he unde lying in as uc u e con igu a ions.
3.1.1 S4T A chi ec u e and IoT Managemen
The S4T a chi ec u e p ima ily consis s o a cloud-side componen , IoT onic,
and one o mo e edge-side componen s called Ligh ning-Rod (LR). These
componen s enable use s o u ilize IoT de ices and hei I/O esou ces,
such as senso s and ac ua o s, h ough well-de ined APIs simila o hose
a ailable o s anda d cloud esou ces. This I/O cloud concep o e s IoT
i ualiza ion ea u es alongside adi ional IaaS (compu ing and s o -
age) i ualiza ion. On he o he hand, i ual nodes (VNs) hos he
business logic and use he a ached I/O esou ces, emula ing eal IoT de-
ices. S4T’s IoT managemen in ol es a ious OpenS ack subsys ems,
wi h IoT onic as a cen al componen esponsible o p o isioning and
con igu ing IoT nodes wi h embedded sensing and ac ua ion esou ces.
Neu on’s OpenS ack ne wo king se ice has been enhanced o ensu e
seamless connec i i y o IoT nodes deployed a he ne wo k edge. Ad-
di ionally, he pla o m le e ages he in eg a ion o Zun and Qinling o
enable Func ion-as-a-Se ice (FaaS) capabili ies. Zun p o ides con aine
8
managemen , while Qinling is he FaaS subsys em, s eamlining con aine
deploymen and o ches a ion. Toge he , hese subsys ems c ea e a com-
p ehensi e and e icien IoT managemen solu ion.
3.1.2 IoT onic Cloud-Side Se ice
The IoT onic cloud-side se ice is a c ucial componen o he S4T a chi ec-
u e, designed wi h modula i y, scalabili y, and obus ness. As illus a ed
in Figu e 1, IoT onic’s p ima y unc ion is o manage and o ches a e
seamless connec i i y be ween edge de ices and he cloud, p o iding use s
wi h a comp ehensi e in e ace o managing IoT de ices emo ely. I ex-
ends he OpenS ack a chi ec u e owa d managing sensing and ac ua ion
esou ces, aligning wi h he Sensing-and-Ac ua ion-as-a-Se ice (SAaaS)
pa adigm. IoT onic in e ac s wi h he LR de ice-side agen o es ablish
and main ain a eliable connec ion be ween he cloud and he edge de-
ices, e en in he p esence o ne wo k add ess ansla ions (NATs) o
s ic i ewalls. This connec ion is acili a ed h ough WebSocke echnol-
ogy, which employs he Web Applica ion Messaging P o ocol (WAMP) o
c ea e a ull-duplex messaging channel.
Figu e 1: IoT onic’s a chi ec u al schema.
The cloud-side a chi ec u e comp ises se e al componen s, including
he IoT onic Conduc o , which manages he IoT onic da abase ha s o es
essen ial in o ma ion, such as unique de ice iden i ie s, use and enan as-
socia ions, de ice p ope ies, and ha dwa e/so wa e cha ac e is ics. The
IoT onic APIs expose a REST in e ace o end use s, allowing in e ac ion
wi h he se ice ia a cus om clien o a web b owse . The OpenS ack
Ho izon dashboa d has been ex ended wi h a S ack4Things dashboa d,
o e ing access o all unc ionali ies p o ided by he IoT onic se ice and
o he so wa e componen s. IoT onic also ea u es a WAMP agen ha
b idges o he componen s and edge de ices, ansla ing Ad anced Mes-
sage Queuing P o ocol (AMQP) messages in o WAMP messages and ice
e sa. This design makes he a chi ec u e highly scalable, as componen s
can be deployed on di e en machines wi hou impac ing se ice unc-
ionali ies. Addi ionally, i ensu es edundancy and high a ailabili y o
9
x 0 = x es
Ene gy
consump ion
x 0
x es
x
Ene gy
p oduced
x 0
x es
Ene gy
p oduced
Ene gy
consump ion
x 0 = x es
Δ
x Δ
x Δ
x Δ
Figu e 5: View o ene gy es ima ion alue o consump ion and p oduc ion.
The job pe o med by ECEM and EPREM is essen ial o enable he
o ches a ion p ocess so ha we can conside hei job as a p e-p ocessing
o he inpu s om he edge pa o he DPCS.
x(es C)=x(es ): (x( 0)−x ∆)≥0
x( 0): (x( 0)−x ∆)<0(2)
x(es P)=x(es ): (x( 0)−x ∆)≤0
x( 0): (x( 0)−x ∆)>0(3)
The es ima ed alues become inpu s o he TEANS (Th eshold E alu-
a o and No i ica ion Sys em) module which, a e e alua ion o he inpu s
ecei ed, is able o:
1. Iden i y when consump ion is exceeding p oduc ion;
2. Iden i y which communi y membe s exhibi highe consump ion; and
3. Send no i ica ions o he owne o a eal es a e uni and, a he
same ime, o he en i onmen i sel , ha sugges which in e nal
line is eques ing mo e ene gy.
The unc ion shown in Algo i hm 1 is used in he i s and hi d asks
lis ed abo e. Indeed, he unc ion E alua eInpu is used by TEANS i s ly
o e alua e he inpu s coming om ECEM and EPREM o unde s and
i an in e en ion is necessa y ( he in e en ion p ocedu e is con ained in
he else condi ion). When a educ ion in ene gy eques s is iden i ied,
he ene gy consump ion ha exceeds he ene gy a ailable in he REC is
compu ed ( he δ alue), and i is used o selec he REC membe s who
will be he ecipien s o no i ica ions o powe educ ion. The quan i y o
eques ed powe educ ion no i ica ions is spli equally among he selec ed
membe s, co esponding o he γ alue. The second unc ion o conside
16

is shown in Algo i hm 2. I is in oked by Algo i hm 1 o ob ain a lis o
membe s eques ing high ene gy. To his aim, he inpu o his unc ion
is he δmen ioned abo e; he ECEM module uses i o unde s and how
many membe s o selec ; he highe he alue o δ, he lowe he h eshold
used o ma k and add a membe o he lis becomes. In any case, he
ECEM also iden i ies a lis o unusual consume s who gene ally do no
eques much powe om he REC. In ha case, hey a e excluded om
he “powe Abso bingConsume ” lis . Fu he mo e, he REC ene gy o -
ches a o conside s each ime a educ ion in ene gy consump ion eques
is sa is ied, which may be used o ewa ding pu poses in adminis a i e
p ocesses.
Algo i hm 1: Pseudocodeo he unc ion used o e alua e inpu s
om es ima ion modules aiming o iden i y he necessi y o educing
he REC’s ene gy eques s.
1in E alua eInpu ( loa e p od, loa e cons):
2i e p od ¿ e cons hen
3 e u n 0 ;
4else
5δ=e cons-e p od ;
;/* δ ep esen s he quan i y o ene gy exceeding he
ene gy a ailable in REC */
6membe sLis =Iden i yMembe s(δ);
;/* The unc ion Iden i yMembe s e u ns he lis o
membe s o be ecipien s o he no i ica ion send by
TEANS */
7γ=δ/ len(membe sLis ) ;
;/* γ ep esen s he quan i y o ene gy a membe has o
educe */
8 o each membe in membe sLis do
9sendNo i y(membe ,γ) ;
10 e u n 0 ;
11 end
12 end
5 Use Case/Re e ence Scena io
This sec ion desc ibes he use case and a de ailed analysis o he da ase ,
ollowed by an explana ion o he p ep ocessing me hods employed and,
inally, an o e iew o he DL models used in he implemen a ion o he
sys em.
The use case and expe imen s conduc ed o analyze he beha io and
easibili y o a REC implemen ed as desc ibed abo e a e p esen ed in he
ollowing. The REC communi y consis s o nume ous eal es a e uni s,
17
Algo i hm 2: Pseudocode o he unc ion used o iden i y he lis o
REC membe s ha will ecei e he eques o powe educ ion.
1Lis Iden i yMembe s( loa δ):
;/* Fi s Sec ion: e ie e o de ed lis s o membe s:
unc ion needs o iden i y he membe s ha a e consuming
powe and he membe s ha may be excluded because hey a e
no used o make high eques o powe . */
2unusualConsume s=ge Lis UnP edic edConsume s() ;
3powe Abso bingConsume s=ge Lis Powe Abso bingConsume s(δ) ;
4membe sLis ToNo i y= [] ;
5 o each membe in powe Abso bingConsume s do
6i membe in unusualConsume s hen
7con inue ;
8else
9membe sLis ToNo i y.append(membe ) ;
10 end
11 end
;/* Second Sec ion: A e a p elimina y selec ion aiming
o exclude he membe s ha a e no used o eques high
powe , i he lis ob ained is null, all he membe s
iden i ied by unc ion ge Lis Powe Abso bingConsume s a e
e u ned o in oking unc ion. */
12 i len(membe sLis ToNo i y) == 0 hen
13 e u n powe Abso bingConsume s ;
14 else
15 e u n membe sLis ToNo i y ;
16 end
enough o jus i y he p oduc ion line ealized in he REC. Each uni is
equipped wi h a gene al sma me e , and he elec ical sys ems wi hin
hese buildings a e in en ionally designed o be di ided in o mul iple sub-
sec ions. These subsec ions a e connec ed o speci ic sub-me e s, allowing
o mo e g anula moni o ing and managemen o ene gy consump ion.
The sma me e s ope a e alongside IoT de ices, such as Raspbe y Pi 3,
A ancino, and o he CPU- and MCU-based edge de ices, which a e pow-
e ul enough o manage he edge componen o S4T (Ligh ning-Rod, see
Sec ion 3.1.3). The DL models a e deployed as plugins injec ed ia S4T on
hese edge de ices. Ano he aspec o he REC communi y in ol es he
p oduc ion si es, which consis o sola panels connec ed o an in e e
o es ablish a p oduc ion line. Gene ally, each p oduc ion line may be
loca ed on a eal es a e uni (e.g., on a building’s oo ) o in a designa ed
a ea wi hin he REC ese ed o ene gy p oduc ion. In his use case, we
conside a ew powe ul p oduc ion lines se up in speci ic a eas o he
REC. Each line has i s dedica ed in e e , which measu es he p oduced
DC and o he pa ame e s, as discussed in mo e de ail in Sec ions 5.1 and
18
6. These measu emen s a e hen ansmi ed o he DL model unning
in cen alized compu ing acili ies di ec ly managed by he communi y.
This se up allows o e icien moni o ing and managemen o ene gy p o-
duc ion wi hin he REC communi y. A comp ehensi e unde s anding o
he en i e a chi ec u e, including he in e connec ions and in e ac ions
among all i s componen s, can be ob ained by e e ing o Figu e 6. This
cha o e s a high-le el o e iew o he ela ionships be ween he a ious
elemen s wi hin he sys em.
P oposed-
A chi ec u e
REC
O ches-
a o
P od-
uc ion
Si e
EPREM
Real
Es a e
Uni
ECEM
TEANS
DCPS
CPS
CEP
SDCPS
Cloud
FaaS
I/Ocloud
S4T
IoT-
onic
Ligh n-
ingRod
NAT
WAMP
SAaaS
IoT
CPU
MCU
AI
ML
DL
DNN
RNN
BiLSTM
LSTM
Figu e 6: Technologies ela ionship cha .
5.1 Da ase Desc ip ion
Fo he use case, we used wo di e en public da ase s: (i) The house-
hold elec ici y load diag ams 2011–2014 da ase , designed by he Uni-
e si y o Cali o nia, School o In o ma ion and Compu e Science, and
19
sha ed in he UCI ML eposi o y [54], and (ii) The sola powe gene a ion
da ase [55]. The i s da ase comp ises 2,075,259 ins ances o elec ici y
consump ion samples (KW) o a household in Pa is om Decembe 2006
o No embe 2010 ha we e cap u ed a 1 min in e als. I con ains ob-
se a ions on household global ac i e powe (GAP) (in kilowa ), global
eac i e powe (in kilowa ), ol age (in ol s), global cu en in ensi y (in
ampe e), and in o ma ion on h ee sub- ooms (in kilowa /h) on global
ene gy consump ion (in kilowa /h). Speci ically, Sub me e ing 1 moni-
o s he ac i e elec ici y usage o he ki chen appliances, including he
dishwashe , o en, and mic owa e. Sub me e ing 2 measu es he ac i e en-
e gy consump ion o laund y oom appliances such as washing machines,
umble d ye s, and ligh s. Sub me e ing 3 eco ds he ac i e powe o he
elec ic wa e hea e and ai condi ione .
The second da ase desc ibes da a ga he ed om wo sola powe
plan s in India o e a 34-day pe iod and includes powe gene a ion da a
and wea he senso eadings da a ga he ed e e y 15 min. Fo powe gen-
e a ion plan s, i p o ides eadings on he amoun o DC powe (in kilo-
wa ), he amoun o AC powe (kilowa ), and he daily yield and o al
yield o he in e e un il ha poin . The wea he senso plan s p o-
ide da a on he plan , he senso panel id, he ambien empe a u e, he
empe a u e eading o ha sola panel module, and inally, he i a-
dia ion. The powe gene a ion da a a e collec ed a he in e e le el,
whe e each in e e is connec ed o mul iple lines o sola panels, while
he wea he senso da a a e collec ed a he plan le el, wi h a single a ay
o senso s op imally placed a he plan .
Figu e 7 highligh s he seasonali y o he GAP ea u e, used as he ou -
pu alue o he BiLSTM model’s p edic ions. Upon examining he da a,
i becomes e iden ha highe GAP alues a e concen a ed in pa icu-
la pe iods. The plo unde sco es he cyclical na u e o he consump ion
pa e ns, acili a ing he iden i ica ion o in e als ma ked by inc eased
ene gy usage. Da a poin s in he g aph display a colo g adien om ligh
o da k, ep esen ing a 24 h ime ame a anged by he colo in ensi y and
o ganized in o hou ly, mon hly, and weekly segmen s h oughou he yea .
The hou ly analysis indica es ha consump ion peaks p edominan ly oc-
cu du ing he a e noon, speci ically om 17:00 o midnigh . Con e sely,
he mon hly o e iew o e s insigh s in o he dis ibu ion o consump ion
hou s ac oss he yea , e ealing a signi ican dec ease in ene gy use du ing
he summe mon hs due o longe dayligh hou s. Addi ionally, a s ong
co ela ion be ween he mon hly and weekly cha s can be obse ed, as
bo h show educed a e age consump ion in hei cen al egions, co e-
sponding o he summe pe iod. This seasonali y cha allows o he
p edic ion o consump ion pa e ns ac oss a ious ime ames du ing he
yea , assis ing in he op imal con igu a ion o he p oposed sys em, aim-
ing o p edic he app op ia e pe iods o hou s o send no i ica ions o
use s eques ing a educ ion in ene gy consump ion. This app oach aligns
wi h RECs’ ene gy e iciency and sus ainabili y policies.
Gene ally, a REC communi y consis s o nume ous eal es a e uni s,
and hey a e commonly suppo ed by ene gy gene a ion si es o suppo
he REC consump ion. Acco ding o he da a om he wo da ase s used
o he expe imen s, we de ined a easonable scena io wi h 250 eal es a e
20
Figu e 7: Gap seasonali y o a eal es a e uni by hou , mon h, and week o he
yea .
uni s (as an assump ion, we conside ed buildings wi h simila beha io
and s uc u e). This way, he ene gy p oduced by he h ee p oduc ion
lines om he da ase s [55] used as ou REC p oduc ion si e da a is jus-
i ied.
Da a P ep ocessing
Da a p ep ocessing in ol ed p epa ing he aw da a o ou analysis and
using i as inpu o he ecu en models. This p ocess consis ed o se e al
asks, including da a in e pola ion, educ ion, no maliza ion, and in eg a-
ion.
•Da a in e pola ion: We pe o med linea in e pola ion on he da a
by es ima ing missing o NaN (No a Numbe ) alues in he con-
sump ion da ase and compu ing he alue a each missing poin as
a linea combina ion o i s neighbo s;
•Da a educ ion: We agg ega ed ime-se ies da a in o mo e manage-
able in e als by using he mean o e e y 15 min in e al. This
me hod acili a ed he isualiza ion and analysis o he pa e ns in
he da a and associa ion wi h he p oduc ion da ase ;
•Da a no maliza ion: We no malized he da a so ha hey ell wi hin
a ange (0,1), so as o imp o e he pe o mance o he DL models;
•Da a in eg a ion: We agg ega ed he da a om he p oduc ion da ase
by in eg a ing he powe gene a ion and senso eadings da a by
eeding hem as mul i a ia e sequence inpu s o he LSTM model.
Finally, we p epa ed en i e ime se ies da a o use in a supe ised
lea ning app oach by scaling he da a and ans o ming hem in o a o ma
sui able o aining and es ing he ecu en models. We di ided he
da a in o aining, alida ion, and es ing da ase s o ain he model,
op imize hype pa ame e s, p e en o e i ing, and es he inal models’
pe o mance. We spli bo h da ase s o use 70% o he da a o aining,
10% o alida ion, and 20% o es ing.
21

5.2 Deep Lea ning Models
In ou use case, we de eloped wo ypes o DL models, and we es ed
hem on he wo da ase s desc ibed abo e: long sho - e m memo y (LSTM)
and bidi ec ional long sho - e m memo y (BiLSTM) neu al ne wo k-
based models, use ul o p ocessing sequen ial da a and capable o lea n-
ing long- e m dependencies. Speci ically, LSTM ne wo ks a e specialized
ecu en neu al ne wo ks (RNNs) ini ially designed o o e come he an-
ishing g adien p oblem [56]. LSTM ne wo ks can p ese e pas in o ma-
ion in sequen ial da a, which esul s in p ecise o ecas ing o ime-se ies
da ase s [57]. The BiLSTM ne wo ks, an ex ension o he LSTM ne wo ks,
we e applied wice o he inpu da a o imp o e he long- e m dependency
lea ning and model accu acy [58]. The i s LSTM was applied o he in-
pu da a in hei o iginal o de , while he second LSTM was applied o
he inpu da a in e e se o de . In his way, he model can be e e ain
in o ma ion om bo h he pas and u u e o he inpu sequence, esul ing
in imp o ed accu acy. The main ask o hese ne wo ks is o lea n po en-
ial ules om many samples o ime-se ies da a and pe o m analysis and
p edic ions by cons an ly co ec ing he ne wo k weigh s. Bo h ne wo ks
ha e signi ican ly imp o ed in ecen yea s, especially o ime se ies p e-
dic ion and in analyzing powe g id da a [59, 60], whe e he p edic ions
pe o m well wi h bo h da a gene a ed om ou ine use beha io ha
exhibi s some egula i y and da a gene a ed om eme gen use beha io ,
such as sudden inciden s and anomalies, ha show some andomness and
a iabili y.
The BiLSTM wi h an “a en ion mechanism” (BiLSTM-A en ion) is
pa icula ly well sui ed o he analysis o long ime se ies, due o a mem-
o y unc ion ha allows impo an ea u e in o ma ion o be e ained o
load p edic ion [61, 62]. The “a en ion mechanism” is used o u he
explo e he ela ionship be ween he ea u es o he p edic ed ime poin s
p ocessed by he BiLSTM laye . This way, BiLSTM dynamically weighs
he impo ance o di e en pa s o an inpu sequence when making p e-
dic ions, essen ially by using a sepa a e neu al ne wo k o compu e a se
o weigh s ep esen ing each elemen ’s impo ance in he inpu sequence.
This is pa icula ly use ul in a household elec ici y consump ion p edic-
ion a di e en imes, as in cases whe e some pa s o he inpu sequence
a e mo e impo an han o he s o making accu a e p edic ions, e.g., in
ou use case, whe e he consump ion du ing weekdays is lowe han hol-
iday pe iods, o consump ion du ing sp ing is lowe han summe , and
so on. Thus, s udying he consump ion pa e ns a di e en ime poin s
can imp o e he accu acy o p edic ions. In he p esen ed con ex , he
BiLSTM-A en ion ne wo ks we e used as he p oo o concep o he
elec ici y consump ion p edic ion o a REC communi y. In con as , we
used a simple LSTM ne wo k o plan gene a ion da a p edic ion (p o-
duc ion), whe e i was assumed ha he p oduc ion da a had cons an
beha io o e ime.
To e alua e he e ec i eness o ou models, we employed classical e al-
ua ion me ics, he oo mean squa e e o (RMSE), and he mean abso-
lu e e o (MAE), whe e lowe alues ep esen be e o ecas ing esul s.
The equa ions o hese me ics a e gi en by
22
Fo mulae (4) and (5), espec i ely.
RMSE =
u
u
1
n
n
X
i=1
(yi−ˆyi)2(4)
MAE =1
n
n
X
i=1
|yi−ˆyi|(5)
whe e yiis he ue alue, ˆyi ep esen s he p edic ion alue, nis he
p edic ed ime s ep, and iis he cu en ime s ep.
In Sec ion 6, we desc ibe he implemen a ion and aining s eps o wo
ne wo ks; inally, we show he pe o mance o he p oposed DL models.
6 Expe imen al Resul s
6.1 Models T aining and Op imiza ion
The LSTM and BiLSTM models we e ained on p oduc ion and consump-
ion da ase s, espec i ely. Speci ically, LSTM was ained o p edic bo h
he DC Powe and e iciency o an in e e , compu ed adequa ely by he
ollowing equa ion:
η=PAC
PDC
×100% (6)
whe e ηis he e iciency o he in e e , exp essed as a pe cen age, PAC
is he AC powe ou pu o he in e e , measu ed in wa s, and PDC is
he DC powe inpu o he in e e , measu ed in wa s. AC powe was
e ie ed o unde s and he ac ual ene gy p oduc ion o he REC (Figu e
8 shows he AC compu ed o a line o panels, each do ep esen s he alue
compu ed by he DL module om he da a pe cei ed). The BiLSTM was
ained o p edic GAP powe by using all o he consump ion ea u es.
Figu e 8: AC o a compu ed panel line.
23
Fo bo h models’ aining, we used di e en and bes hype pa ame-
e s. Table 1 p esen s he bes hype pa ame e se ings used o he wo
DL ne wo ks. Each model had di e en se ings, indica ing ha he e
is no one-size- i s-all solu ion when i comes o op imizing DL ne wo ks.
Speci ically, bo h ne wo ks we e ained and op imized using he mean
squa ed e o (MSE) loss unc ion and he Adam op imize . We se he
maximum numbe o epochs o 200 (wi h an ea ly s opping echnique se
wi h a pa ience = 10) o p e en model o e i ing, and he ba ch size o
72. We se he numbe o imes eps o 1 o cap u e sho - e m dependen-
cies in he da a. The lea ning a e αwas se o 0.001, and he decay a e
βwas se o 0.00001 o ensu e he e ec i e op imiza ion o he model.
Fo he LSTM model, we buil a simple a chi ec u e as a good s a ing
poin o ou p edic ion asks. Speci ically, he be e model a chi ec u e
was based on one LSTM laye , wo dense laye s (one wi h 32 hidden uni s
and a ReLU ( ec i ied linea uni ) ac i a ion unc ion), and ano he dense
laye wi h a single ou pu uni and a sigmoid ac i a ion unc ion. The
BiLSTM wi h a en ion was implemen ed using a cus om laye named
A en ion, which compu es he a en ion weigh s and applies hem o
he inpu sequence. This laye akes he ou pu o he p e ious laye
(which is he ou pu o he bidi ec ional LSTM laye ) and compu es a se
o a en ion weigh s using a neu al ne wo k wi h a single hidden laye .
Speci ically, he model consis s o a bidi ec ional LSTM laye wi h 64
uni s, a d opou laye wi h a 0.2 d opou a e o egula iza ion, and
a ba ch no maliza ion laye o aining s abili y. Then, i includes an
a en ion laye wi h 64 uni s o ocus on ele an pa s o he sequence,
a dense laye wi h 32 uni s and ReLU ac i a ion, a d opou laye wi h a
0.3 d opou a e, and ano he ba ch no maliza ion laye . Finally, he e is
a dense laye wi h 1 uni and sigmoid ac i a ion o p edic ions.
The lea ning cu es depic ed in Figu e 9 show he DC and e iciency
o he LSTM model o e he cou se o aining. As can be seen, as he
numbe o epochs inc eases, he aining and alida ion loss bo h end
owa ds ze o, indica ing ha he LSTM model is able o cap u e he
inpu –ou pu ela ionship o he p oduc ion da ase accu a ely.
Implemen a ion De ails
Fo he implemen a ion o he wo ne wo ks, we used Py hon p og am
language e sion 3.8.12, Ke as API e sion 2.4.3, o build and ain ou
models, and Colab’s GPU o accele a e he aining p ocess. The da a
we e p ep ocessed using Py hon lib a ies such as NumPy, Pandas, and
Sciki -lea n. The MinMaxScale da a no maliza ion echniques we e ap-
plied o he inpu ea u es.
6.2 Tes ing on Consump ion and P oduc ion P e-
dic ion
In ou expe imen s, a e he consump ion da ase esampling o esul
in a 15 min s eps GAP, he o al numbe o samples was 138,352. The
GAP beha io p edic ed wi h he BiLSTM-A en ion model ollows he
eal- ime da a, as shown in Figu e 10.
24
Table 1: Hype pa ame e se ings.
Model Hype pa ame e Bes Value
LSTM
Lea ning a e 0.001
Op imize “Adam”
Decay a e 0.00001
Loss unc ion “mean squa ed e o ”
Numbe o laye s 3 (LSTM, Dense, Dense)
Uni s [64, 32, 1]
Ac i a ion unc ion “ elu”,“sigmoid”
Times eps 1
Maximum aining epochs 200
Ea ly S opping Pa ience = 10, Moni o = loss
Ba ch size 72
BiLSTM wi h
A en ion
Lea ning a e 0.001
Op imize “Adam”
Decay a e 0.00001
Loss unc ion “mean squa ed e o ”
D opou [0.2, 0.3]
Numbe o laye s 4 (Bidi ec ional LSTM, A en-
ion, Dense, Dense)
Uni s [64, 64, 32, 1]
Ba ch no maliza ion P esen
Ac i a ion unc ion “ elu”,“sigmoid”
Ba ch size 72
Conce ning ene gy p oduc ion da a elabo a ion, he LSTM ac s on
da a ela ed o DC and e iciency in e e ence o he lines o he panel.
Figu e 12 epo s he da a p edic ed by he LSTM o he DC and he
e iciency ηo each line. The g aph analysis shows how he p edic ion
ollows he eal beha io o he panel lines. The only signi ican anomaly
is he absence o a second peak in he p edic ion when he eal beha io
p esen s wo consecu i e, e y close peaks.
Table 2 epo s he esul s ob ained om LSTM (on p oduc ion) o
p edic DC and η, and om BiLSTM-A en ion (on consump ion) o
p edic GAP ea u es. The esul s show signi ican pe o mances based
on he RMSE and MAE me ics, sugges ing ha he wo ne wo ks ha e
a good p edic i e pe o mance in p edic ing he associa ed ea u es.
Table 2: Pe o mance me ics on consump ion (1EU) and p oduc ion (3P).
Model Fea u e RMSE MAE
BiLSTM-A en ion (consump ion) GAP 0.457 0.299
LST M(p oduc ion(3P)) DC 909.19 509.53
LST M(p oduc ion(3P)) η0.011 0.002
25
[61] C.-G. Huang, H.-Z. Huang, and Y.-F. Li, “A bidi ec ional ls m p og-
nos ics me hod unde mul iple ope a ional condi ions,” IEEE T ans-
ac ions on Indus ial Elec onics, ol. 66, no. 11, pp. 8792–8802, 2019.
[62] K. Wu, J. Wu, L. Feng, B. Yang, R. Liang, S. Yang, and R. Zhao, “An
a en ion-based cnn-ls m-bils m model o sho - e m elec ic load
o ecas ing in in eg a ed ene gy sys em,” In e na ional T ansac ions
on Elec ical Ene gy Sys ems, ol. 31, no. 1, p. e12637, 2021.
32

(a) (b)
(c)
(d) (e)
( )
Figu e 9: DC and e iciency aining and alida ion loss cu es o he LSTM
model. (a) DC aining and alida ion loss o he line o panels 1; (b) DC
aining and alida ion loss o he line o panels 2; (c) DC aining and ali-
da ion loss o he line o panels 3; (d) E iciency aining and alida ion loss
o he line o panels 1; (e) E iciency aining and alida ion loss o he line o
panels 2; ( ) E iciency aining and alida ion loss o he line o panels 3.
33
Figu e 10: GAP p edic ions a e da ase esampling o a eal es a e uni om
17 June a 17:00.
(a) (b)
(c)
Figu e 11: Con .
34
-0cm
(a) (b)
(c)
Figu e 12: LSTM p edic ion g aphs. (a) DC p edic ed by he model o he
line o panels 1; (b) DC p edic ed by he model o he line o panels 2; (c) DC
p edic ed by he model o he line o panels 3; (d) E iciency p edic ed by he
model o he line o panels 1; (e) E iciency p edic ed by he model o he line
o panels 2; ( ) E iciency p edic ed by he model o he line o panels 3.
35