scieee Science in your language
[en] (orig)

An Evaluation of a Metaheuristic Artificial Immune System for Household Energy Optimization

Abstract

[EN] Devices in a smart home should be connected in an optimal way; this helps save energy and money. Among numerous optimization models that can be found in the literature, we would like to highlight artificial immune systems, which use special bioinspired algorithms to solve optimization problems effectively. The aim of this work is to present the application of an artificial immune system in the context of different energy optimization problems. Likewise, a case study is performed in which an artificial immune system is incorporated in order to solve an energy management problem in a domestic environment. A thorough analysis of the different strategies is carried out to demonstrate the ability of an artificial immune system to find a successful optima which satisfies the problem constraints.

Read accessible full text

An Evaluation of a Metaheuristic Artificial Immune System for Household Energy Optimization

Author: Navarro Cáceres, María,Herath, Pramod,Villarrubia González, Gabriel,Prieto Castrillo, Francisco,Venyagamoorthy, Kumar
Publisher: Universidad de Salamanca
Year: 2018
DOI: 10.1155/2018/9597158
Source: https://gredos.usal.es/bitstream/10366/145849/1/BISITE.pdf
Resea ch A icle
An E alua ion o a Me aheu is ic A i icial Immune Sys em o
Household Ene gy Op imiza ion
Ma ia Na a o-Cace es ,
1
P amod He a h,
2
Gab iel Villa ubia ,
1
F ancisco P ie o-Cas illo ,
1,2
and G. Kuma Venyagamoo hy
3,4
1
Uni e si y o Salamanca, s/n. Salamanca, 37003 Espejo, Spain
2
Media Lab, Massachuse s Ins i u e o Technology, 20 Amhe s S , Camb idge, MA, USA
3
Holcombe Depa men o Elec ical and Compu e Enginee ing, Real-Time Powe and In elligen Sys ems Labo a o y and Clemson
Uni e si y, Clemson, SC 29634, USA
4
School o Enginee ing, Uni e si y o KwaZulu-Na al, Du ban, Sou h A ica
Co espondence should be add essed o Ma ia Na a o-Cace es; [email p o ec ed]
Recei ed 25 Oc obe 2017; Accep ed 4 Ma ch 2018; Published 2 July 2018
Academic Edi o : Hugo Mo ais
Copy igh © 2018 Ma ia Na a o-Cace es e al. This is an open access a icle dis ibu ed unde he C ea i e Commons
A ibu ion License, which pe mi s un es ic ed use, dis ibu ion, and ep oduc ion in any medium, p o ided he o iginal
wo k is p ope ly ci ed.
De ices in a sma home should be connec ed in an op imal way; his helps sa e ene gy and money. Among nume ous op imiza ion
models ha can be ound in he li e a u e, we would like o highligh a ificial immune sys ems, which use special bioinspi ed
algo i hms o sol e op imiza ion p oblems effec i ely. The aim o his wo k is o p esen he applica ion o an a ificial immune
sys em in he con ex o diffe en ene gy op imiza ion p oblems. Likewise, a case s udy is pe o med in which an a ificial
immune sys em is inco po a ed in o de o sol e an ene gy managemen p oblem in a domes ic en i onmen . A ho ough
analysis o he diffe en s a egies is ca ied ou o demons a e he abili y o an a ificial immune sys em o find a success ul
op ima which sa isfies he p oblem cons ain s.
1. In oduc ion
A Home Ene gy Managemen Sys em (HEMS) is a key ele-
men in a domes ic en i onmen ha imp o es household
economy h ough au oma ed echnologies.
In he ecen yea s, diffe en domes ic buildings equipped
wi h communica ion channels (sma houses) ha e ac i ely
pa icipa ed in elec ical ne wo ks [1] as building blocks in
sma g ids (SGs). The e o e, hey play an impo an ole in
op imizing he scheduling o elec ic powe [1, 2].
The e a e a numbe o s a egies ha employ diffe en
echniques o op imize he scheduling o ene gy use in he
home. Among many o he s a egies, s a is ical models a e
one example o hem. We can see how hey a e le e aged in
he wo k o [3], which models con ollable loads using a
Ma ko ian app oach. These loads depend on wea he condi-
ions. In [4], a demand- esponse p og am is au oma ically
applied om classical me hods o con ol he de ices
connec ed o he ne wo k unde he unce ain y o he ou -
side empe a u e and he p ice o elec ici y. In [5], h ee
p oblems ela ed o HEMS ha e been sol ed by applying an
obse able Ma ko ian decision p ocess. This wo k made i
possible o educe domes ic ene gy cos s in he elec ici y
p ice ma ke .
Classical app oaches had some limi a ions [6]; hus, new
pa adigms ha e been applied o sol e HEMS. One success-
ully de eloped pa adigm is ha which uses bioinspi ed algo-
i hms o sol e op imiza ion p oblems. These algo i hms y
o mimic he beha io o some biological en i ies o find solu-
ions which, applying classical compu a ion, would be oo
cos ly o e en implausible in e ms o ime and esou ces.
Some widely used and no ewo hy algo i hms a e a ificial
neu al ne wo ks (ANN), gene ic algo i hms (GA), o swa m
in elligence [7]. Some bioinspi ed algo i hms wo k in diffe -
en con ex s, and hey ende good esul s. One o hese algo-
i hms is he a ificial immune sys em (AIS) which ollows
Hindawi
Complexi y
Volume 2018, A icle ID 9597158, 11 pages
h ps://doi.o g/10.1155/2018/9597158
he p inciples o he e eb ae immune sys em o find solu-
ions in an op imiza ion p oblem. The AIS algo i hm can be
designed in a a ie y o ways. F om he diffe en a ian s, in
his wo k, i is decided o use Op -aiNe [8], which has been
used success ully o he op imiza ion o unc ions in diffe en
con ex s [8]. Op -aiNe allows finding se e al solu ions in
pa allel. By using ope a ions such as mu a ion, cloning, and
supp ession, each solu ion co esponds o diffe en op ima
(maxima o minima) poin s in he op imiza ion unc ion.
In he a ea o in elligen ne wo k op imiza ion, se e al
wo ks ha ollow he bioinspi ed pa adigm ha e been p o-
posed. These include [9], who p opose an ene ge ic se ices
modeling me hod based on he pa icle swa m op imiza ion
(PSO) algo i hm. Soa es e al. [10] p opose a mul iobjec i e
gene ic app oach o scheduling domes ic cha ge in an
ene gy managemen sys em. Yuce e al. [11] p esen a neu al
ne wo k wi h a gene ic algo i hm (ANN-GA) o op imize
ene gy managemen in he domes ic sec o . Howe e , o
he au ho s’knowledge, AIS has only been implica ed in
some p elimina y achie emen s in powe managemen , such
as sol ing powe supply p oblems, o elec ical econfigu a-
ions. Fo example, in [12], an AIS is used o con ol he mal
uni s in esiden ial buildings, and in [13], he au ho s op i-
mize a wind ene gy-gene a ing sys em also wi h an AIS.
In his pape , an in-dep h e iew o he AIS concep and
i s applica ion o diffe en elec ical p oblems is made. F om
he esul s o his e iew, a case s udy on a p oblem o home
ene gy managemen op imiza ion is desc ibed and sol ed
using his algo i hm. We aim o demons a e ha AIS can
be success ully applied o elec ical managemen p oblems
in domes ic se ings. Pa o ou objec i e has been o adap
he Op -aiNe algo i hm o include complex cons ain s on
he op imiza ion p oblem and o wo k efficien ly wi h a la ge
numbe o a iables.
This pape p esen s a simple elec ic con ex wi h
diffe en de ices, namely, a pho o ol aic panel (PV), a
ba e y sys em, a space hea e o hea e , a wa e hea e , and
mus - un se ices. All o hem a e connec ed in a sma
home, wi hin an elec ical sys em. I is aimed a op imizing
he scheduling o he nex 24 hou s so ha he elec ical
benefi is maximized be ween he ene gy ha is sold and
he ene gy ha is bough .
Two s a egies a e designed in ou case s udy o ep e-
sen wo diffe en elec ical si ua ions. In s a egy 1, he
HEMS manages he elec ic powe wi h he elec ici y g id
wi hou conside ing any in e nal es ic ion. In o he
wo ds, we do no conside any a iable ela ed o he
main enance o he domes ic elec ic cha ge h ough he
elec ical ene gy p oduced by he PV sys em. The e o e,
his s a egy only seeks o op imize ene gy benefi s. How-
e e , s a egy 2 is aimed a supplying he elec ici y
demand au onomously whene e possible. The e o e, he
su plus gene a ed by he PV is s o ed in he ba e y.
HEMS will sell elec ici y o he g id when he ba e y is
ully cha ged. Also, he ba e y is discha ged when he
elec ical demand is g ea e han he powe gene a ed by
he PV. I he ba e y canno supply all he elec ical
cha ge, hen he HEMS mus buy elec ici y om he
powe g id. Based on hese wo s a egies, h ee diffe en
expe imen s we e de eloped. Fi s ly, a compa ison o AIS
wi h wo diffe en bioinspi ed algo i hms is made, namely,
he classical gene ic algo i hm (GA) and he pa icle
swa m op imiza ion (PSO). Secondly, bo h s a egies a e
compa ed o analyze he influence o he ba e y in he
home ne wo k. Finally, a deep analysis is ca ied ou wi h
diffe en si ua ions o he ba e y cha ge in he home ne -
wo k. The esul s ob ained in all si ua ions a e expec ed o
alida e he AIS as an app op ia e algo i hm o he op i-
miza ion o HEMS.
This documen is s uc u ed as ollows. Sec ion 2
p o ides an o e iew o he design o AIS and a e iew
abou i s in ol emen in elec ical p oblems. Sec ion 3
desc ibes he echnical de ails o he add essed elec ical
p oblem. Sec ion 4 p esen s he configu a ion o AIS and i s
applica ion o he elec ical p oblem. In Sec ion 5, he
esul s ob ained in he h ee case s udies a e ou lined and
discussed. Finally, Sec ion 6 p esen s he conclusions o ou
esea ch and u u e wo k.
2. A i icial Immune Sys ems
The o ganisms o many species ha e de eloped immune
sys ems o p o ec hem om ex e nal agen s. Abo e all,
e eb a e immune sys ems consis o diffe en molecules,
cells, and o gans ha a e dis ibu ed h oughou he body
and a e no con olled by any cen al en i y. F om an
immunological poin o iew, any elemen p esen in he
immune sys em is called an an igen. I his an igen belongs
o he in e nal o ganism o p o ec he body, i is called
sel -an igen o an ibody. O he wise, he an igens om he
ex e nal en i onmen a e called non-sel -an igens and can
p o oke diffe en diseases. The e o e, immune sys ems a e
aimed a dis inguishing be ween sel -an igens and non-sel -
an igens h ough a pa e n ecogni ion p ocess, a acking
only hose ha a e ha m ul o he body [14].
D awing on he concep o he immune sys em, [15]
de eloped he CLONALG algo i hm, a clonal selec ion p oce-
du e ha allows mu a ing some an ibodies acco ding o hei
affini y o an ex e nal an igen; he e o e, in o de o pe o m
pa e n ecogni ion, i gene a es copies o he an ibodies
acco ding o hei affini y wi h he an igen. The copies a e
mu a ed ollowing a a e δin e sely p opo ional o hei
affini y wi h he an igen (1).
δ=e i
β,1
whe e βis a cons an ob ained empi ically o no malize he
effec o he fi ness alue
i
o each cell. These new indi iduals
a e added o he gene al popula ion and ee alua ed o be
ep oduced and mu a ed again.
In o de o gi e a new solu ion o he op imiza ion o
unc ions, [8] de eloped Op -aiNe , an a ificial immune sys-
em (AIS) based on he CLONALG beha io . The in o ma-
ion is encoded as an igens which should be ecognized by
he an ibodies o ou immune sys em. Then, he fi ness alue
o an an igen is defined as he affini y be ween he an igen
and he an ibody and can be compa ed wi h a dis ance
2 Complexi y
me ic. Hence o h, small dis ances be ween an an igen and
an an ibody ep esen high affini y, whe eas longe dis ances
ep esen lowe affini y.
The Op -aiNe algo i hm ollows he gene al desc ip ion
o an a ificial immune sys em. Fi s ly, an ibodies, which ep-
esen he diffe en da a o op imize, a e andomly gene a ed.
Then, hey a e p esen ed o he an igens, which encode he
objec i e unc ion, in o de o calcula e he affini y be ween
hem when he da a a e applied o he unc ion. I one an i-
body ob ains a good a ing in he objec i e unc ion, ha
means i has high affini y and he e o e is selec ed. These
chosen an ibodies a e ep oduced and mu a ed based on
hei fi ness alue acco ding o he CLONALG algo i hm
and he βpa ame e . In o de o p ese e di e si y, an ibod-
ies whose affini y is lowe han a gi en h eshold
s
a e
emo ed om he popula ion.
A ificial immune sys ems, in pa icula Op -aiNe , a e
able o find se e al op ima o he objec i e unc ion in pa al-
lel. This means ha AIS can find a se o good candida es o
he solu ion o op imiza ion p oblems ha a e diffe en om
one ano he . Addi ionally, AIS can p ese e hose indi iduals
ha a e good enough o be ep oduced and mu a ed in con-
secu i e i e a ions.
2.1. AIS Applica ions in Ene gy Con ex s. The concep o a
nex -gene a ion powe sys em such as sma g id, efficien
ene gy managemen , and be e powe sys em planning
canno be achie ed wi hou elec ical load o ecas ing
[16]. Consequen ly, mul iple ime ho izons which a e asso-
cia ed wi h he egula ion, dispa ching, scheduling, and
uni commi men o he powe g id a e analyzed and
sol ed using diffe en me hods. A ificial in elligence (AI)
is widely applied o a a ie y o applica ions, as i can han-
dle he complexi y de i ed om such elec ical p oblems.
In pa icula , bioinspi ed algo i hms, such as a ificial neu-
al ne wo ks o swa m in elligence, a e especially effec i e
in sol ing his kind o p oblems. In his sec ion, a b ie
bu comp ehensi e li e a u e e iew o a special bioin-
spi ed algo i hm, he a ificial immune sys ems, is p o-
ided. AIS was applied in diffe en con ex s wi h posi i e
esul s: when sol ing combina o ial p oblems [17, 18], o
de ec in usions in wi eless senso ne wo ks [19], o e en
o gene a e cho d p og essions [20]. The majo goal o his
sec ion is o e iew, iden i y, e alua e, and analyze he pe -
o mance o AIS in powe sys ems and model esea ch.
Rega ding he elec ical con ex , he e a e plen y o p o-
posals ocusing on di e se fields. One o hem is ela ed o
he con ol o a iables and configu a ion o an elec ical
sys em. de Mello Hono io e al. [21] model an op imal
powe flow (OPF), which is a nonlinea , noncon ex, and
la ge-scale p oblem wi h bo h con inuous and disc e e con-
ol a iables, using a modified a ificial immune sys em
(AIS). The AIS makes use o hype mu a ion, which is
esponsible o local sea ch, and ecep o edi ion, which
explo es diffe en a eas in he solu ion space. The p oposed
AIS is combined wi h a g adien ec o o imp o e he final
esul s. This combina ion is also aimed a collec ing aluable
in o ma ion du ing he hype mu a ion p ocess, dec easing
he numbe o gene a ions and clones, and, consequen ly,
speeding up he con e gence p ocess while educing he
compu a ional ime. Belkacemi and Feliachi [22] use a mul-
iagen sys em (MAS) which ollows he human immune
sys em beha io o p opose a new echnique o powe sys-
em econfigu a ion and es o a ion, applied o a model o
Sou he n Cali o nia Edison’s Ci cui o he Fu u e. Each ele-
men o he MAS ep esen s a na u al immunological ele-
men ha in e ac s wi h he o he elemen s o heal he
body. Simila ly, he MAS is able o de ec and isola e aul s
and es o e powe o he affec ed loads aking in o conside -
a ion line capaci y, ol age p ofile, and powe losses [22]. de
Oli ei a e al. [23] p esen a me hodology o he econfigu-
a ion o adial elec ical dis ibu ion sys ems o minimize
ene gy losses making use o he bioinspi ed me aheu is ic
a ificial immune sys em. The AISs ha e o plan he sys em
ope a ion conside ing bo h adiali y and connec i i y con-
s ain s and diffe en load le els. Consequen ly, he AIS
algo i hm is adap ed o accommoda e he ea u es o he
p oblem be e and o imp o e he sea ch p ocess. The algo-
i hm de eloped is es ed in well-known dis ibu ion sys-
ems, wi h e y success ul esul s. Souza e al. [24] sol e
he econfigu a ion p oblem o elec ical dis ibu ion sys-
ems (EDSs) wi h a iable demand, using he a ificial
immune algo i hm. As he econfigu a ion p oblem wi h
a iable demand is a complex p oblem o a combina o ial
na u e, Cop -aiNe (a ificial immune ne wo k o combina-
o ial op imiza ion), which is a combina o ial e sion o he
algo i hm Op -aiNe , is applied o iden i y he bes adial
opology o an EDS in o de o minimize he cos o ene gy
losses in a gi en ope a ion pe iod. A specialized sweep load
flow o adial sys ems was used o e alua e he easibili y
o he opology wi h espec o he ope a ional cons ain s
o he EDS and o calcula e he ac i e powe losses o each
demand le el. The ob ained esul s we e compa ed wi h
hose in he li e a u e in o de o alida e and p o e he effi-
ciency o he p oposed algo i hm. Souza e al. [25] also aim
o sol e he econfigu a ion p oblem o EDS by compa ing
he esul s o he Cop -aiNe (a ificial immune ne wo k
o combina o ial op imiza ion) and he Op -aiNe (a ificial
immune ne wo k o op imiza ion) algo i hms. A specialized
o wa d/backwa d adial powe flow was used o e alua e
each o he p oposed solu ions in o de o de e mine i s
powe losses and i s easibili y ega ding he ope a ional
cons ain s o he EDS. To alida e he use o an AIS, he
final esul s we e compa ed wi h o he solu ions ob ained
wi h o he algo i hms in he li e a u e.
O he impo an field o applica ion is he o ecas ing o
elec ical a iables (loads and powe gene a ion o consump-
ion). Abdul Hamid and Abdul Rahman [26] p opose an a i-
ficial neu al ne (ANN) ained ollowing he beha io o an
a ificial immune sys em (AIS) o gene a e a sho - e m load
o ecas ing model. Two se s o elec ical ene gy demand da a
we e used o es he capabili y o he p oposed algo i hm.
The esul s p esen ed in he manusc ip show ha he p o-
posed AIS lea ning algo i hm is capable o p o iding a o e-
cas compa able o ha o an a ificial neu al ne wo k wi h
an in eg a ed back p opaga ion (BP) algo i hm. Conse-
quen ly, he AIS is an al e na i e lea ning algo i hm o an
a ificial neu al ne wo k. The wo k p oposed by [27] is one
3Complexi y
o he fi s s udies using an in eg a ed AIS simula ion o
imp o ed o ecas ing o elec ici y consump ion wi h an-
dom a ia ions. They de elop a new sys em wi h diffe en
algo i hms, namely, AIS, gene ic algo i hm (GA), and pa i-
cle swa m op imiza ion (PSO), o simula e annual elec ici y
consump ions in selec ed coun ies. The mean absolu e pe -
cen age e o (MAPE) is applied o e alua e he esul s and
selec he bes o ecas ing model. A case s udy wi h da a o
he annual elec ici y consump ions o 16 coun ies om
1980 o 2006 is analyzed. Fo he selec ed coun ies, he AIS
me hod wi h he clonal selec ion algo i hm (CLONALG)
shows sa is ac o y esul s when applied wi h simula ed da a
and has been selec ed as he p e e ed me hod. He nandez
e al. [28] model a hyb id a ificial immune sys em (AIS)
combining he back p opaga ion me hod wi h he a ificial
immune sys em, o achie e highe accu acy, lesse inpu load
da a equi emen , and as e con e gence. The hyb id
app oach is implemen ed, and i s esul s a e compa ed wi h
a GA and a PSO. This analysis e eals ha AIS sol es he
p oblem in a mo e efficien way han do GA and PSO.
Dudek [29] p oposes a sho - e m load o ecas model
based on an AIS o p edic he hou ly load demand o a week.
In his p oposed echnique, each an igen o AIS, which con-
ains he ime se ies load sequences (some pa is a o ecas
sequence), is compa ed wi h his o ical load pa e ns. MAPE
is also used o e alua e he pe o mance o he p oposed o e-
cas model. The sys em achie es a minimum MAPE o
1.77%, which means he AIS ob ains e y success ul esul s.
AISs a e also applied o economic op imiza ion in an elec i-
cal en i onmen . Dynamic economic dispa ch de e mines
he op imal scheduling o online gene a o ou pu s wi h p e-
dic ed load demands o e a ce ain pe iod o ime aking in o
conside a ion he amp a e limi s o he gene a o s [30].
Basu [31] p esen s an a ificial immune sys em algo i hm
ha sol es a hea and powe economic op imiza ion p ob-
lem. The AIS is adap ed o his p oblem, adding new ope a-
ions such as hype mu a ion and ou namen , and is hen
used in a p elimina y es sys em.
Basu [30] implemen s adap i e cloning, hype mu a ion,
aging ope a ion, and ou namen selec ion. In o de o al-
ida e he new AIS, nume ical esul s o a en-uni sys em
wi h uel cos unc ion ha e been de eloped. The esul s
ob ained om he p oposed algo i hm a e compa ed wi h
hose ob ained om pa icle swa m op imiza ion and e o-
lu iona y p og amming. F om nume ical esul s, i is
shown ha he p oposed AIS p o ides a mo e efficien
solu ion han do pa icle swa m op imiza ion and e olu-
iona y p og amming in e ms o minimum cos and com-
pu a ion ime. A agón e al. [32] p esen an AIS-inspi ed
algo i hm, called IA EDP, which ies o sol e an eco-
nomic dispa ch p oblem. I makes use o wo e sions o
a edis ibu ion powe ope a o which ies o keep he
solu ions ha i finds. The p oposal is applied o eigh
p oblems aken om he li e a u e. The esul s a e com-
pa ed wi h hose de i ed om se e al o he app oaches
o de e mine he ad an ages o he IA EDP agains classi-
cal e olu iona y compu ing.
This b ie backg ound leads us o he conclusion ha
AIS can be applied o a a ie y o elec ical con ex s wi h
e y success ul esul s. This ac encou ages us o wo k
wi h a specific AIS, called Op -aiNe , also le e aged in di -
e en pape s [24, 25] and o adjus i specifically o ou
case s udy. The classical Op -aiNe usually wo ks wi h a
low numbe o a iables (each indi idual con ains abou
6 a iables a mos ) and wi hou cons ain s encoded as
ma hema ical unc ions. In he p esen wo k, his algo-
i hm is adjus ed o admi up o 336 a iables and 25 lin-
ea cons ain s (inequali ies and equa ions).
3. Home Ene gy Managemen P oblem
In he designed case s udy, we conside a home elec ical
sys em ha has some household appliance connec ed o
i (Figu e 1).
The con ex can be hough as a domes ic g id wi h a
gene a ion pa and a consump ion pa , connec ed o he
powe g id. As shown in Figu e 1, he gene a ion sys em
o he PV sys em includes he PV gene a o and he ba -
e y. The consump ion pa s a e he elec ic loads which
con ain he ollowing appliances: a space hea e , a s o age
wa e hea e , and mus - un se ices. To balance he p ofi
o ene gy se ices be ween he PV sys em and he loads,
he schedule is connec ed o he g id. The schedule aims
a maximizing he p ofi o ene gy se ices p o ided in a
Space hea e
Powe g id
Ba e y PV panel
Schedule
Wa e s o age
hea e
Mus - un
se ices
Figu e 1: Schema ic image o domes ic elec ical sys em.
4 Complexi y
domes ic ene gy managemen sys em h ough (2) OF,
which is he objec i e unc ion o op imize.
OF = 〠
λsoldPsold −λbough Pbough
−〠
j∈ELs
VOLLjLj shed −Vs
p 2
OF is a linea combina ion o ou elec ical ac o s.
λsold,λbough , VOLLjand Vp a e cons an s ha p o ide he
p ices pe uni o ene gy load and a e gi en by he ma ke .
The fi s e m λsoldPsold ep esen s he income om he
sale o ene gy p oduced by he PV panel o he elec ici y
g id. The second ac o is he o al cos o elec ical ene gy
ha is bough om he ne wo k, λbough Pbough . The alue
o elec ical ene gy is no se ed, meaning he lo is encoded
in he hi d pa ,∑j∈ELsVOLLjLj shed. Finally, he spillage
cos s o PV panels, Vs
p Sp , a e ep esen ed in he las e m
o he equa ion.
We need o balance he loads be ween he ene gy gene -
a ed ( he PV sys em Pp , he ene gy p o ided by he ba -
e y Pb,ou , and he ene gy bough om he powe g id
Pbough ) and he ene gy consumed, meaning he elec ical
loads o he diffe en se ices Lj −Lj shed (hea e , s o age
wa e hea e , and mus ung se ices) and he ba e y cha ge
Pb,in (3). Addi ionally, he powe flow limi a ion h ough
he dis ibu ion line is s a ed in (4), whe e max is a cons an
se o 6 acco ding o [33].
Pbough +Pp +Pb,ou =〠
j∈ELs
Lj −Lshed
j +Pb,in ,
3
− max ≤Pbough −Psold ≤ max 4
The specificdefini ions o all domes ic appliances a e
desc ibed in he ollowing subsec ions.
3.1. PV Sys em. The PV sys em can gene a e he powe ou -
pu Pp o he g id, which can be modelled h ough
Equa ion 5.
Pp =Pp ,p −Sp , 5
whe e S e e s o he spillage cos s o he PV sys em and
P
p ,p
( ) is he po en ial powe gene a ion o he PV sys em.
P
p ,p
( ) is limi ed o maximum and minimum bands due o
he p edic ion o he PV powe gene a ion, ollowing (6).
σdown
p and σ
p
up
a e down and up p edic ion a iances o
he PV sys em, espec i ely, and a e calcula ed ollowing
[34]. Pp ed
p is he p edic ed powe gene a ed by he PV sys-
em. This amoun is posi i e o equal o ze o and is limi ed o
he ac ual powe gene a ion o he PV, P
p ,p
( ), as ep esen ed
in (7). In o he wo ds, he PV sys em can po en ially gene a e
his powe bu HEMS canno ope a e i because o economic
and echnical cons ain s.
Pp ed
p −σdown
p ≤Pp ,p ≤Pp ed
p −σup
p ,6
0≤Sp ≤Pp ,p 7
3.2. Elec ical Loads. Elec ical loads include loads ha can
be con ollable and/o shi able. In his case s udy, h ee
ypes o loads a e modelled: space hea e , L
sh
( ), which is
a con ollable load, s o age wa e hea e , L
swh
( ), which is
a shi able load, and mus - un se ices, L
m s
( ), which a e
noncon ollable-shi able loads. Equa ions 8 and 9 define
he o al elec ical load and o al load shedding o ou
domes ic g id, espec i ely. These loads a e desc ibed in
he ollowing subsec ions.
〠
j∈ELs
Lj =Lsh +Lswh +Lm s ,8
〠
j∈ELs
Lshed
j =Lshed
sh +Lshed
swh +Lshed
m s 9
3.2.1. Space Hea e . The space hea e p o ides he desi ed
indoo empe a u e. Equa ion 10 ep esen s he pe o mance
o he space hea e based on he ela ionship be ween he
indoo empe a u e and i s elec ical load. In (10), θ
0
is he
ini ial indoo empe a u e in ime = 1, which is assumed o
be equal o he desi ed empe a u e. Ris he he mal esis-
ance, and Cis he he mal capaci y o
θin +1 =θin e−1/RC +Lsh R 1−e−1/RC
+θp ed
ou 1−e−1/RC ,
≥2θin =θ0=θdes,  =1
10
Equa ion 11 ep esen s he limi a ion o he indoo
empe a u e. In ou case s udy, his limi a ion is se o
1
°
C mo e o less han he desi ed empe a u e. Finally,
due o physical ac o s, he loads and he load sheddings
a e bo h limi ed by hei maximum and minimum con-
s ain s (12) and (13).
−1≤θin −θdes ≤1, 11
Lmin
sh ≤Lsh ≤Lmax
sh ,12
0≤Lsshed
sh ≤Lsh 13
3.2.2. S o age Wa e Hea e . The s o age wa e hea e is
esponsible o p ese ing he hea in he wa e anks. The
maximum and minimum limi a ions o he s o age wa e
hea e ’s load a e s a ed in (14). The maximum ene gy con-
sump ion o he s o age wa e hea e should be less han
he maximum capaci y o he ank U
swh
, acco ding o (15).
Finally, he maximum o he load shedding o he s o age
wa e hea e is always less han he ene gy consump ion o
he appliance (16).
Lmin
swh ≤Lswh ≤Lmax
swh ,14
〠
N
=1
Lswh =Uswh,15
5Complexi y

0≤Lshed
swh ≤Lswh 16
3.2.3. Mus -Run Se ices. Mus - un se ices consis o loads
ha should be p o ided quickly, and he e o e, i is no
easy o p edic hem, o example, ligh ing and en e ain-
men . Fo he pu poses o his pape , i is assumed ha
he e is no unce ain y in p edic ing he elec ical loads
o mus - un se ices (17). As in he s o age wa e hea e ,
he maximum o he load shedding Lshed
m s mus always
be less han he ene gy consumed L
m s
( ) (18).
Also, he load shedding cons ain is s a ed in (18).
Lm s =Lp ed
m s ,17
o≤Lshed
m s ≤Lm s 18
3.3. Ba e y Sys em. The ba e y sys em can be used o apply
he cha ge and discha ge s a egies in he HEMS. A flowcha
(Figu e 2) is designed o ope a e wi h he ba e y in he
domes ic en i onmen . The sys em aims a p o iding he
equi ed elec ical demand, maximizing i s benefi s. When
he e is a su plus P
b,in
( ) o he ene gy gene a ed (i.e., he
PV panel gene a es mo e ene gy P
p
( ) han he o al load
TL( ) demands), i is s o ed in he ba e y (C
b
( )). I he ba -
e y is ully cha ged Cb >Cmax
b, hen i is sold o he g id
P
sold
( ). On he con a y, he sys em makes use o he ene gy
s o ed in he ba e y P
b,ou
( ) when he elec ical demand is
highe han he powe gene a ion o he PV panel. Addi ion-
ally, i he ba e y canno p o ide he ene gy needed (i.e., is
una ailable o comple ely discha ged, Cb >Cmin
b), he sys-
em will buy he elec ici y P
bough
( ) om he powe g id.
4. Expe imen al Se ing
To assess he pe o mance o he p oposed HEMS, some
pa ame e s ha e been se o op imize he sys em. The maxi-
mum powe p oduced by he PV sys em is 2kW. The ba e y
can s o e be ween Cb
min 48 and Cb
max 2.4 kWh. The maximum
hea ing powe o he space hea e (SH) Lmax
sh equals 2 kW
o main ain he empe a u e o he house wi hin ±1 o he
desi ed empe a u e (θ
des
23
°
C). The he mal esis ance, R,
o he building shell is equal o 18
°
C/kW, and he capaci y
Cequals 0.525 kWh/
°
C. The ene gy capaci y o he s o age
wa e hea e (U
swh
) is 10.46 kWh (180 L) which has 2 kW as
maximum o hea ing elemen s Lmax
swh . Table 1 displays he p e-
dic ed da a ha has been used in [33]. Table 2 gi es he p ice
da a o he sys em. VOLL and spillage cos s o PV powe
gene a ion a e shown in Table 3.
These da a a e used in ou HEMS o op imize he unc ion
(2). The objec i e unc ion is in eg a ed in o Op -aiNe o ge
an op imized schedule o 24 hou s in a domes ic en i onmen .
Following he Op -aiNe p ocedu e, he ini ial popula ion an-
domly gene a ed, whe e each indi idual is a se o elec ical
alues o 24 hou s, mus comply wi h he cons ain s modelled
in he elec ical managemen p oblem. Fo his pu pose, each
da um o he indi idual is conside ed as an elec ical pa ame e
o op imize o 24 hou s. Ini ially, he pa ame e s which only
depend on some fixed bounda ies (6), (7), (12), (14), and (17)
a e gene a ed. Then, hese pa ame e s a e used as new
bounda ies o hose elec ical pa ame e s ha depend on hem
( he es o heequa ionsa egi enin hemodelo Sec ion3).
This me hodology is ecu si ely applied un il all he pa ame e s
needed o each indi idual a e gene a ed. Finally, o ob ain he
pa ame e s ela ed o he ba e y load, he pa ame e s p e i-
ously calcula ed and he flowcha o Figu e 2 a e applied o
gene a e he new ones.
Wi h he indi iduals gene a ed, Op -aiNe wo k ollows
hese s eps:
(1) Ini ia e Npopula ion ollowing he me hod abo e, o
espec he linea cons ain s and he flowcha i i is
he case.
(2) E alua e each indi idual acco ding o he op imiza-
ion unc ion gi en in (2).
(3) C ea e N
c
clones o each indi idual. The elemen s o
each clone should be sligh ly changed acco ding o
he mu a ion equa ion (1).
(4) Fo each cell o an ibody, selec he bes clone wi h
he highes objec i e alue.
(5) I he mean objec i e o he las i e a ion and he
p esen one a e below a limi , hen simila indi iduals
a e supp essed acco ding o he simila i y h eshold
s
ha measu es dis ances be ween wo an ibodies.
(6) I some indi iduals a e supp essed, hen i is needed
o add a new andom popula ion. These new solu-
ions a e gene a ed ollowing he me hod gi en abo e
o espec he cons ain s and he flowcha i ha is
he case.
(7) This wo k flow is epea ed un il he con e gence c i-
e ion (maximum numbe o i e a ions gen). The
esul is one o mo e indi iduals wi h an op imum
objec i e alue.
As we can see, AIS con ains fi e pa ame e s, namely,
numbe o indi iduals N, numbe o clones N
c
, simila i y
h eshold
s
, maximum numbe o gene a ions gen, and
he mu a ion pa ame e β. Depending on he p oblem,
hey can ake se e al alues and a e essen ial o a co ec
ope a ion. AIS needs some pa ame e s o be se be o e-
hand in o de o op imize a p oblem co ec ly. These
pa ame e s a e ela ed o he cloning and mu a ion p o-
cess, he supp ession algo i hm, and he con e gence
c i e ion. Fo each i e a ion, a numbe o clones N
c
is gen-
e a ed pe cell. This numbe N
c
is se empi ically and can
influence he final esul s. Gene ally, i N
c
is se wi h a e y
low alue, he con e gence c i e ion can be delayed, as we
a e no able o find enough di e si y o selec be e indi-
iduals o each cell. O he wise, i oo many clones a e
gene a ed, he ime upon con e gence migh be longe
han expec ed.
We empi ically se he AIS pa ame e s acco ding o
Table 4, which ga e he op imal pe o mance in e ms o
fi ness and ime.
The nex sec ion will desc ibe he simula ions and esul s
wi h Op -aiNe configu ed o he p esen ed HEMS.
6 Complexi y
5. Simula ion Resul s
The e alua ion is wo old. Fi s ly, i is expec ed ha Op -
aiNe ob ains posi i e esul s in sol ing op imiza ion
p oblems in he c ea ed se ing and compa ing hem wi h
o he classical bioinspi ed app oaches. Consequen ly, a
compa a i e analysis was ca ied ou be ween a classical
gene ic algo i hm (GA) and a pa icle swa m op imiza-
ion (PSO). Addi ionally, we analyzed he impac o he
flowcha (Figu e 2) on ou sys em, when he ba e y
was in ol ed. The e o e, wo s a egies ha ep esen
wo elec ical si ua ions a e designed. In he fi s s a egy
(s a egy 1), he domes ic en i onmen does no conside
any a iable ela ed o he main enance o he domes ic
elec ic cha ge h ough he elec ical ene gy p oduced by
he PV sys em. This s a egy only aims a op imizing i s
ene gy benefi s. In he second s a egy (s a egy 2), he
home en i onmen aims a supplying he elec ici y
demand au onomously. The e o e, he su plus gene a ed
by he PV is s o ed in he ba e y. In his s a egy, he
elec ici y could be sold o he g id i he ba e y is
comple ely cha ged. On he con a y, i he ba e y can-
no supply all he elec ical cha ge, hen he HEMS mus
buy elec ici y om he powe g id.
S a
Ini
Pp ( ) >
TL( )
Pp ( ) =
TL ( )
Pb,in ( ) = Pp ( )−TL( )
Pbough ( ) = 0
Cb ( ) = Cb ( −1) + Pb,in ( )−Pb,ou ( )
Cb ( ) = Cb ( −1) + Pb,in ( )−Pb,ou ( )
Cb ( ) = Cbmin
Cb ( ) = Cbmax
Pb,in ( ) = Cbmax−Cb ( −1) +Pb,ou ( )
Psold ( ) = Pp ( )−TL( )−Pb,ou ( )
Pb,ou ( ) = TL( ) -Pp ( )
Pb,ou ( ) = Cb ( −1)− Cbmin +Pb,in ( )
Pbough ( ) = TL ( )− Pp ( )−Pb,ou ( )
Cb ( ) >
Cbmax
Cb ( ) >
Cbmin
Psold ( ) = 0
Psold ( ) = 0
Pb,in ( ) = 0
Psold ( ) = 0
Pbough ( ) = 0
Pb,ou ( ) = 0
Pb,in ( ) = 0
Pb,ou ( ) = 0
Yes
No
Yes Fin
Yes
Yes
No
No
End
End
No
Pbough ( ) = 0
Figu e 2: Flowcha modelling he ba e y pa ame e s.
7Complexi y
Based on hese wo main goals, h ee diffe en expe i-
men s a e conside ed:
(i) Expe imen I: compa a i e s udy be ween GA, PSO,
and AIS
(ii) Expe imen II: compa ison be ween s a egy 1 and
s a egy 2
(iii) Expe imen III: analysis o s a egy 2 when he ba -
e y is disconnec ed o connec ed
Expe imen I makes a compa ison be ween GA, PSO, and
AIS. Expe imen II op imizes he pa ame e s ela ed o he
PV sys em, he space hea e , he wa e hea e , and he
mus - un se ices; he e o e, he pa ame e s ela ed o he
ba e y cha ge a e no conside ed (s a egy I). The esul s
ob ained om he op imiza ion p ocess a e compa ed wi h
he esul s ha a e e ie ed when he pa ame e s o he ba -
e y a e included in he sys em, al hough all a e se o 0. Tha
means he ba e y is disconnec ed om he home en i on-
men bu he AIS ollows he flowcha o op imize he
sys em.
Finally, expe imen III pe o med wo diffe en analyses:
when he ba e y was disconnec ed and when he ba e y was
connec ed, o s udy he impac o his de ice on he sys em.
5.1. Compa ison be ween GA, PSO, and AIS. In his sec ion,
we aim o compa e he esul s ob ained wi h h ee diffe en
bioinspi ed algo i hms: gene ic algo i hm, pa icle swa m
op imiza ion, and a ificial immune sys em. The gene ic
algo i hm (GA) is widely used in op imiza ion p oblems wi h
many configu a ions. In his pape , a classical app oach o
GA is applied so ha he mu a ion and c osso e as well as
he numbe o gene a ions a e empi ically se o 0.3, 0.8,
and 2000, espec i ely. Addi ionally, he selec ion unc ion
chosen was he oule e algo i hm.
The pa icle swa m op imiza ion (PSO) was fi s in o-
duced by Ebe ha and Kennedy [35] and consis s o a
popula ion-based op imiza ion algo i hm which is deemed
o be a na u e-inspi ed op imiza ion me hodology. PSO
employs a se o pa icles which would mo e h ough
he sea ch space a e e y i e a ion and would calcula e
he fi ness alue a each poin . A e a e mina ion condi-
ion is me , he bes op imized alue is selec ed by choos-
ing he bes alue ound in he his o y o pa icles. The
success o PSO lies in i s “ eloci y equa ion”; his equa ion
decides on he nex poin in space ha each pa icle would
mo e o. The eloci y equa ion can be shown as
Vid,k+1 =wVid,k+c1× and1×Xpbes id,k−Xid,k
+c2× and2×Xgbes d,k−Xid,k
19
He e, V
id,k+1
is he eloci y o he d h dimension o he
i h pa icle in he nex i e a ion (k + 1s ), wis he ine ia
o he pa icle, V
id,k
is he eloci y o he d h dimension
o he i h pa icle in he cu en i e a ion (k h i e a ion),
c
1
is he cogni i e accele a ion cons an , c
2
is he social
accele a ion cons an , X
pbes id,k
is he posi ion o he pa i-
cle in he d h dimension a which he bes solu ion was
Table 4: Op ima alues se o N,N
c
,gen,
s
, and βin bo h s a egies.
NN
c
gen s β
S a egy I 250 12 250 10 100
S a egy II 250 18 300 3 10
Table 1: P edic ed da a o unce ain a iables.
P
p
p ed( )σ
p
up
σ
p
down θou p ed( )Lp ed
m s
( )
1 0 0.03 0.01 5.5 0.3
2 0 0.03 0.01 5.5 0.3
3 0 0.03 0.01 5.2 0.3
4 0 0.03 0.01 5.2 0.3
5 0 0.03 0.01 4.8 0.4
6 0 0.03 0.01 5.5 0.6
7 0.25 0.03 0.01 6.5 0.8
8 0.75 0.03 0.01 7.5 0.8
9 1.25 0.03 0.01 9.8 0.7
10 1.75 0.03 0.01 10.1 0.55
11 1.9 0.03 0.01 11.5 0.5
12 1.9 0.03 0.01 12 0.5
13 1.9 0.03 0.01 12.5 0.5
14 1.75 0.03 0.01 12 0.5
15 1.25 0.03 0.01 11.5 0.6
16 0.75 0.03 0.01 10 0.8
17 0.25 0.03 0.01 9 1.5
18 0 0.03 0.01 8.5 1.8
19 0 0.03 0.01 8 1.7
20 0 0.03 0.01 7.5 1.1
21 0 0.03 0.01 7 0.9
22 0 0.03 0.01 6.5 0.7
23 0 0.03 0.01 6.2 0.6
24 0 0.03 0.01 6 0.4
Table 2: P ice da a o he sys em.
P ice ($/MW)
Time (hou ) λ
i
λne
23–7 2.2 0.0814
8–14 2.2 0.1408
15–20 2.2 0.3564
21-22 2.2 0.1408
Table 3: VOLL and spillage cos s.
VOLL ($/MW) Spillage cos ($/MW)
Time (hou ) SH SWH MRS PV
22–7 1 1 2.2 4
8–21 1 1 2.2 4
8 Complexi y
ound so a by he i h pa icle, X
gbes d,k
is he alue o he
d h dimension a which he bes solu ion so a was ound
by he whole sys em, X
id,k
is he cu en posi ion o he i h
pa icle in he d h dimension, and c
1
and c
2
a e andom
numbe s. Using he eloci y calcula ed, he nex posi ion
o be e alua ed is calcula ed as
Xid,k+1 =Xid,k+Vid,k20
The abo e eloci y equa ion wo ks well when he sys em
is unde no cons ain s. Howe e , when he e a e cons ain s,
some o he pa icles migh all off he easible egion. In his
case, he pa icles should no upda e hei pe sonal bes when
a pa icle is ou side he easible egion. Nei he should he
global bes be upda ed in case o a pa icle being ou side he
easible bounda y, ha ing a be e alue han he cu en
global bes . In case a pa icle has no ound a pe sonal bes
ha alls in he easible egion, he pa icle should ely only
on global bes o guide i s mo emen . In his case, he calcu-
la ion o eloci y would change o
Vid,k+1 =wVid,k+c1+c2× and × Xgbes d,k−Xid,k21
Howe e , equali y cons ain sa is ac ion is mo e difficul
han he inequali y cons ain sa is ac ion. To sol e his p ob-
lem, a mending p ocedu e is ca ied ou a e e y i e a ion o
make su e all pa icles sa is y he equali y cons ain . The
mending p ocedu e calcula es he o e shoo o each o he
pa icle and adds a co ec ion alue o co ec he e o .
The co ec ion is equally added o each o he in e als o
he pa icle.
In o de o demons a e he efficiency o he a ificial
immune sys em in he ene gy managemen op imiza ion
p oblem, we pe o med a compa a i e es wi h a e sion o
cons ained PSO adop ed om [36] and an app oach o he
gene ic algo i hm. The goal was o p edic he op imum
alues o each a iable du ing 24 hou s, ollowing s a egy
1 and s a egy 2. The linea cons ain s p oposed in he elec-
ical model a e applied, and subsequen ly, he objec i e
unc ion o he op imized a iables is measu ed.
Table 5 shows he esul s ob ained when he objec i e
unc ion and he ene gy a e bough and consumed when
AIS, GA, and PSO a e applied wi h an op imal se ing.
As Table 5 shows, AIS ob ains sligh ly be e esul s in he
objec i e unc ion o bo h s a egies when bo h se ings a e
op imal o sol e his p oblem. Tha means AIS is a be e
configu a ion o he elec ical pa ame e s o op imize he
p oblem s a ed. Likewise, AIS is able o find lowe alues
o he amoun o ene gy bough , which means he algo i hm
allows sa ing ene gy and money o he cus ome . The esul s
o he AIS o he ene gy sold a e lesse han in PSO and in
GA. Tha could be explained because in PSO and in GA,
he mean amoun s o ene gy ha a e managed a e g ea e
han in AIS. Howe e , PSO also ob ained posi i e esul s
(a leas , be e han wi h he classical app oach o GA);
he e o e, we p opose o make a deepe compa ison wi h
mo e complex p oblems o alida e bo h algo i hms and
s udy he limi a ions o each one.
5.2. Analysis o he Ene gy Managemen S a egy. In his sec-
ion, he wo s a egies desc ibed below a e deeply analyzed
and compa ed. The fi s s a egy looks o maximizing he
domes ic ene gy p ofi . Howe e , he second s a egy aims
a maximizing ene gy p ofi and ac ing as an au onomous
ene gy sys em. I is expec ed ha s a egy II ob ains be e
esul s, as his s a egy pu sues he au onomous managemen
o ene gy, sa ing mo e money han in s a egy I.
Op -aiNe wo ked wi h indi iduals o ec o o 264
elemen s wi h equali y and inequali y cons ain s, as each
indi idual con ains all he a iables o 24 hou s. Each
alue co esponds o he diffe en elec ic loads and pow-
e s desc ibed in Sec ion 3 o he PV panel, he s o age
wa e hea e , he space hea e , and he mus - un se ices.
We un he algo i hm wi h wo diffe en configu a ions,
one wi h s a egy 1, excluding all he cons ain s ela ed
o ba e y managemen , and one wi h s a egy 2, including
all he cons ain s ela ed o ba e y managemen , bu wi h
he ba e y a iables se o 0. Table 6 shows he esul s
acco ding o he fi ness alue o he objec i e unc ion
OF and he pa ame e s o sold and bough ene gy.
As we can see, he alue o he objec i e unc ion in s a -
egy 1 is highe han ha o s a egy 2. Howe e , he ans-
ac ed ene gy be ween home and powe g id is lesse in
s a egy 1, which means ha S a egy 2 allows o he au on-
omous managemen o ene gy a home.
5.3. Impac o he Ba e y. In his analysis, s a egy 2 is
applied o s udy he influence o he ba e y in he domes ic
en i onmen . In his case pa icula ly, indi iduals in he
AIS ha e 336 elemen s because he pa ame e s co espond-
ing o he ba e y cha ge and load a e se as elemen s o op i-
miza ion. Each indi idual is cons uc ed ollowing he linea
cons ain s and he flowcha be o e being inse ed in o he
popula ion. Two diffe en execu ions a e made, fi s ly, wi h
all he a iables ela ed o he ba e y managemen se o
0. In he second execu ion, he a iables o he ba e y
could change acco ding o he co esponding equa ions
and flowcha (Figu e 2). The esul s ob ained a e shown
in Table 7.
F om he da a in Table 7, we can see ha he ba e y sys-
em can imp o e he alue o he objec i e unc ion. Table 7
also conside s a si ua ion in which he ba e y inc eases he
amoun o elec ical ene gy sold om he sma home o
he g id, and i dec eases he amoun o elec ical ene gy ha
a home buys om he ne wo k.
Table 5: Resul s o he objec i e unc ion and he ene gy bough and
consumed when AIS and PSO a e applied wi h an op imal se ing.
Objec i e alue Ene gy bough Ene gy sold
S a egy 1 PSO 23.52 46.61 14.12
GA 22.48 46.94 14.09
AIS 23.86 45.66 14.22
S a egy 2 PSO 4.86 37.60 5.40
GA 4.92 32.66 5.22
AIS 5.11 26.53 4.64
9Complexi y