scieee Open visual document viewer

Software reference architecture for smart environments: Perception

Fernández Montes González, Alejandro; Ortega Ramírez, Juan Antonio; Sánchez Venzalá, José I.; González Abril, Luis

Abstract

With the increase of intelligent devices, ubiquitous computing is spreading to all scopes of people life. Smart home (or industrial) environments include automation and control devices to save energy, perform tasks, assist and give comfort in order to satisfy specific preferences. This paper focuses on the proposal for Software Reference Architecture for the development of smart applications and their deployment in smart environments. The motivation for this Reference Architecture and its benefits are also explained. The proposal considers three main processes in the software architecture of these applications: perception, reasoning and acting. This paper centres attention on the definition of the Perception process and provides an example for its implementation and subsequent validation of the proposal. The software presented implements the Perception process of a smart environment for a standard office, by retrieving data from the real world and storing it for further reasoning and acting processes. The objectives of this solution include the provision of comfort for the users and the saving of energy in lighting. Through this verification, it is also shown that developments under this proposal produce major benefits within the software life cycle.

Full text

So wa e e e ence a chi ec u e o sma en i onmen s: Pe cep ion A. Fe nández-Mon es a, ⁎,J.A.O ega a , J.I. Sánchez-Venzalá a , L. González-Ab il b a ETS Ing. In o má ica, Uni e sidad de Se illa, Spain b EU Es udios Emp esa iales, Uni e sidad de Se illa, Spain abs ac a icle in o A icle his o y: Recei ed 27 May 2012 Recei ed in e ised o m 14 Janua y 2014 Accep ed 3 Feb ua y 2014 A ailable online 19 Feb ua y 2014 Keywo ds: Sma en i onmen So wa e a chi ec u e Ambien in elligence Pe cep ion Wi h he inc ease o in elligen de ices, ubiqui ous compu ing is sp eading o all scopes o people li e. Sma home (o indus ial) en i onmen s include au oma ion and con ol de ices o sa e ene gy, pe o m asks, assis and gi e com o in o de o sa is y specific p e e ences. This pape ocuses on he p oposal o So wa e Re e ence A chi ec u e o he de elopmen o sma applica ions and hei deploymen in sma en i onmen s. The mo i a ion o his Re e ence A chi ec u e and i s benefi s a e also explained. The p oposal conside s h ee main p ocesses in he so wa e a chi ec u e o hese applica ions: pe cep ion, easoning and ac ing. Thispape cen esa en ionon hedefini ion o he Pe cep ion p ocess and p o ides an example o i s implemen a ion and subsequen alida ion o he p oposal. The so wa e p esen ed implemen s he Pe cep ion p ocess o a sma en i onmen o a s anda d o fice, by e ie ing da a om he eal wo ld and s o ing i o u he easoning and ac ing p ocesses. The objec i es o his solu ion include he p o ision o com o o he use s and he sa ing o ene gy in ligh ing. Th ough his e ifica ion, i is also shown ha de elopmen s unde his p oposal p oduce majo benefi s wi hin he so wa e li e cycle. © 2014 Else ie B.V. All igh s ese ed. 1. In oduc ion A sma en i onmen (SE) can be defined as one ha is able o acqui e and apply knowledge abou he en i onmen and i s inhabi an s in o de o imp o e hei expe ience in ha en i onmen [1]. Sma home echnologies a e an impo an pa o ubiqui ous compu ing. Ma k Weise [2] ou lined he p inciples o Ubiqui ous Com- pu ing: he pu pose o a compu e is o help someone do some hing. Nowadays, due o he popula isa ion o compu a ional de ices and applica ions, ubiqui ous compu ing is ecognised as a e olu ion in he de elopmen o sma en i onmen s. Ne e heless, so wa e a e ac s ela ed o ubiqui ous compu ing, o- ge he wi h he wide spec um o compu a ional de ices (and he so - wa e needed o ulfil hei missions) a e oo he e ogeneous and hence di ficul o compa e o classi y. Each pieceo so wa ee ol esinanisola - ed way o only in ela ion o he ha dwa e o which i has been de el- oped. The p oblem add essed in his pape in ol es he o ches a ion o he a chi ec u e o a gene al so wa e model o he de elopmen o SEs. This So wa e Re e ence A chi ec u ewould a ou he de elopmen o a sma en i onmen solu ion by inc easing he euse o componen s, p omo ing in e ope abili y, and defining he compe ences o each pa o he so wa e. A good compa ison o his could be he Open Sys em In e connec- ion (OSI) model, which is a p esc ip ion o cha ac e izing and s anda dizing he unc ions o a communica ions sys em in e ms o abs ac ion laye s. The ambi ious goal o his a chi ec u e o ces i o emain e y gene al and o lea e specific aspec s un il he implemen a ion s age. The benefi s o he app oach include a be e unde s anding o he issues ha mus be aced when de eloping each componen o a sma en i onmen solu ion. The So wa e Re e ence A chi ec u e educes he cos s o he main cycles o so wa e (design, de elopmen , deploymen , and main enance) and a ou s he in e ope abili y be ween a ious solu ions. The main goal o his wo k is he p oposal o So wa e Re e ence A chi ec u e o he de elopmen o SEs (see Sec ion 3), whe e all he componen s can in e ac flawlessly and each au oma ism objec i es. To his end, he a chi ec u e p oposed seeks o imp o e he modula - i y, eusabili y and ex ensibili y o solu ions, he eby allowing a mo e coo dina ed e olu ion o SEs, which cu en ly emain unde indi idual and isola ed de elopmen . The a chi ec u e defines a middlewa e amewo k ha connec s he modules and es ablishes he esponsibili y o each module. The benefi s o de elope s using a defined amewo k o s anda d a chi ec u e o he domain ha e been ho oughly s udied by Fayad and Schmid [28], and include: a educ ion and ocus o he e o in ol ed, a so lea ning cu e, in eg abili y, main ainabili y, easie alida ion, e ficiency, and a highe le el o s anda diza ion. Compu e S anda ds & In e aces 36 (2014) 928–940 ⁎Co esponding au ho . E-mail add esses: a [email protected] (A. Fe nández-Mon es), jo [email protected] (J.A. O ega), [email protected] (J.I. Sánchez-Venzalá), [email protected] (L. González-Ab il). h p://dx.doi.o g/10.1016/j.csi.2014.02.004 0920-5489/© 2014 Else ie B.V. All igh s ese ed. Con en s lis s a ailable a ScienceDi ec Compu e S anda ds & In e aces jou nal homepage: www.else ie .com/loca e/csi As an example o he a chi ec u e usage, his pape p esen s he Pe cep ion p ocess and p o ides an example o implemen a ion by ollowing he So wa e Re e ence A chi ec u e p oposed. Typical componen s o a SE ha e been ho oughly s udied in he li e a u e, al hough he app oach o Cook and Das [20] dese es special men ion since i is cu en ly he mos widely accep ed app oach. Fig. 1 shows he gene al o ganiza ion o hese componen s. Componen s a e di ided in o ou laye s: a) physical; b) communica ion; c) in o ma ion; and d) decision. This app oach joins ha dwa e wi h so wa e agen s, and hence e y he e ogeneous elemen s, such as a decision make and senso s o ac ua o s, appea in he same componen model. All hese componen s mus collabo a e in o de o achie e he goals o au oma ism ha a SE equi es. Which asks belong o each compo- nen and how hey should collabo a e cons i u e he main mo i a ion o he So wa e Re e ence A chi ec u e p oposed. The So wa e Re e ence A chi ec u e p oposed is di ided in o h ee main pa s: Pe cep ion, Reasoning and Ac ing. This pape ocuses on he defini ion o Pe cep ion, as he fi s s ep in he gene al p ocess. Sec ion 2 analyses ela ed wo k in his a ea, and in Sec ion 3,Re e ence A chi ec u e is p esen ed and he Pe cep ion p ocess is explained. Finally, e ifica ion wi h a p o o ype o he Pe cep ion p ocess is shown in Sec ion 4, and conclusions a e d awn in Sec ion 5. 2. Rela ed wo k Ambien in elligence is a ending opic, and hence a wide a ie y o ela ed esea ch ini ia i es ha e appea ed. One o he mos common ap- plica ions in ambien in elligence is ha o SEs. Many esea che s a ound he wo ld a e de eloping p ojec s which in ol e SEs. In his sec ion, some o he mos popula p ojec s a e e iewed and compa ed. The sec ion has been di ided depending on whe e each p ojec is ocused: gene al sma en i onmen s, echnologies o a chi ec u es. 2.1. Sma en i onmen p ojec s Da Cos a [12] ocuses on he challenges and issues ha ubiqui ous compu ing applica ions ha e o deal wi h and summa izes hem: he e ogenei y, scalabili y, dependabili y and secu i y, p i acy and us , spon aneous in e ope a ion, mobili y, con ex awa eness, con ex Fig. 1. The componen s o a SE by Cook and Das [20]. 929A. Fe nández-Mon es e al. / Compu e S anda ds & In e aces 36 (2014) 928–940 managemen , anspa en use in e ac ion and in isibili y. Thus, SE p ojec s, as subp oduc s o ubiqui ous compu ing, ha e o add ess hose challenges. Fo example, he objec i e o he Ma Home p ojec [3] is o c ea e a home ha ac s as an in elligen agen . I s a chi ec u e o ganizes he en i onmen as an agen ha can, in u n, be di ided in o se e al in el- ligen agen s which in e ac . The echnologies wi hin each agen a e sepa a ed in o ou coope a ing laye s: decision, in o ma ion, commu- nica ion, and physical. Pe cep ion is a bo om-up p ocess, while ac ing is op-down. DomoSEC p ojec [5], o e s a home au oma ion solu ion ha co e s necessi ies in indoo domo ics. DomoSEC is based on OSGi and composed o an embedded compu e ha cen alizes he home “in elli- gence”, and communica es wi h he con olled de ices. The in en ion o he Awa e Home p ojec [8] is o p oduce an en i- onmen capable o managing in o ma ion abou i sel , i s occupan s, and hei ac i i ies. I is composed o a se o subsys ems esponsible o he a ious echnologies deployed: human–compu e in e ac ion, machine lea ning, compu a ional pe cep ion, wea able compu ing, e hnog aphy, so wa e enginee ing, and senso s. Ene gy Awa e Sma Home [7] ocuses on he in eg a ion o he e o- geneous embedded de ices and powe me e ing plugs by middlewa e called Hyd a. I s pu pose is o e ie e ene gy-consump ion da a o he moni o ing and analysis o ene gy consumed, in o de o p og amme, con ol and use home appliances e ficien ly. The Place Lab p ojec [9] is cen ed on cap u ing inhabi an s' beha - iou h ough a g oup o cabine y componen s, which con ain a mic o- con olle , speake s, came as, and a se o senso s. These senso s eco d a comple e audio– isual log o ac i i y. Place Lab da a s eams a e employed o de elop new con ex -de ec ion algo i hms and con ex -awa e compu ing applica ions. Pa ch Panel [18] is a mechanism o he inc emen al addi ion o modifica ion o beha iou in exis ing ubiqui ous compu ing en i on- men s (such as iRoom), o example, by adding new inpu modali ies o cho eog aphing he beha iou o exis ing independen applica ions. I p o ides a gene al acili y o e a ge ing e en flow, and enables in e ac ions be ween ne wo ked ha dwa e and so wa e componen s o be c ea ed o modified in ubicomp en i onmen s. EasyLi ing [16] is a Mic oso p ojec which pu sues he easy agg e- ga ion o I/O de ices in o a single and cohe en en i onmen . The sys ems include middlewa e o acili a e dis ibu ed compu ing, wo ld modelling o p o ide loca ion-based con ex , pe cep ion o collec in o - ma ion abou he wo ld's s a e, and se ice desc ip ion o suppo decomposi ion o de ice con ol, in e nal logic and use in e ace. O he sys ems, such as he Sen ien Compu ing Sys em [19],can change hei beha iou based on a model o he en i onmen s hey cons uc by using senso da a. This sys em s i es o emo e obs acles by sha ing and configu ing de ices o exploi a ion in he wo ld model. CASAS [6] is an adap i e sma -home sys em ha u ilizes machine- lea ning echniques o disco e pa e ns in he daily ac i i ies o esiden s and o gene a e au oma ion policies. Da a om senso s is analysed in o de o de e mine ac i i y pa e ns o in e es o au oma- ion. Pa e ns a e modelled con inuously in a mul ile el s uc u e o build he con ex . Finally, a selec ion o he ac i i ies o be au oma ed is pe o med. 2.2. P ojec s wi h echnological imp o emen s O he p ojec s a e mo e ocused in echnology, and p o ide se e al kinds o echnological imp o emen s. Some examples o his a e desc ibed below. The ATRACO p ojec [4] aims o suppo e e yday ac i i ies in a meaning ul way. I uses a emo e OSGi pla o m connec ed wi h a esiden ial ga eway, which manages he de ices, senso s and ac ua o s ia UPnP p o ocol. These elemen s wo king oge he o e a con ex - awa e se ice o he en i onmen . A high-le el p og amming language, called Visual RDK, is p oposed by Weis [10], o p o o yping pe asi e applica ions. This language gen- e a es a debugging applica ion and a p o o ype applica ion om he same sou ce. The main ad an age o his p oposal is ha con ex is igh ly in eg a ed in o he language i sel , and hence de elope s can a ach unc ionali y o loca ions, people, o si ua ions ins ead o o he de ice. Howe e Bannach [11] ocuses on he p oblem om ano he poin o iew: p o o yping o Ac i i y Recogni ion applica ions. I ea u es mech- anisms o dis ibu ed p ocessing and suppo s o mobile and wea able de ices. The CRN Toolbox is a ool se specifically op imized o he implemen a ion o mul imodal, dis ibu ed ac i i y and con ex ecog- ni ion sys ems unning on Posix ope a ing sys ems. I also con ains a collec ion o eady- o-use algo i hms (signal p ocessing, pa e n classifica ion, and so on). I s implemen a ion is specially op imized o mobile de ices. 2.3. P ojec s wi h ele an a chi ec u es The majo con ibu ion o some p ojec s lie in he a chi ec u e p oposed by hem. The ollowing p ojec s a e examples o his case. The GAIA [13] me aope a ing sys em ex ends he each o ope a ing sys ems o manage ubiqui ous compu ing habi a s and li ing spaces as in eg a ed p og ammable en i onmen s. I p esen s a middlewa e in- as uc u e o ac i e spaces. This middlewa e, unlike he a chi ec u e p oposed in his pape , is localized a he ope a i e sys em le el. JCAF (Ja a Con ex -Awa eness F amewo k) [14] is a Ja a-based con ex -awa eness and se ice-o ien ed in as uc u e and an API o c ea ing con ex -awa e applica ions. I g oups he elemen s o he a chi ec u e in o ou ca ego ies: Con ex Se ices, En i ies and Con ex , Con ex Clien s, and Con ex E en s. These elemen s communica e be ween each o he . In e play [15] is middlewa e so wa e which in eg a es he e oge- neous home de ices o simpli y hei con ol o he use . I allows use s o use a pseudo-English in e ace o achie e home asks wi hou di ficul y. I s a chi ec u e is o ganized in o fi e laye s, which sends o - de s om he use in e ace o an unde lying middlewa e o de ice managemen . I s objec i e is o p o ide ad anced con ol o he de ices. I-Cen ic Se ices [32] om F aunho e FOKUS Be lin, es ablishes a axonomy o oles ha a e assumed by he di e en nodes wi hou dis inguishing be ween node ypes. Each node, usually a so wa e se ice, p o ides s anda d in e aces o a a ie y o asks. This plain a chi ec u e is e y ubiqui ous-compu ing-o ien ed, by gi ing all he componen s he conside a ion o nodes wi h di e en oles, bu wi hou mo e s uc u e. Mundo [33], om Da ms ad Uni e si y, es ablishes a s uc u ed node classifica ion cen ed on he scope o he node. This p ojec in o- duces majo aspec s, such as he communica ion and he associa ion o nodes, bu i emains a low-s uc u ed node classifica ion mo e han an a chi ec u e, om a componen -le el poin o iew. MundoCo e [27] communica ion middlewa e designed o he equi emen s o pe asi e compu ing is also de eloped in Da ms ad Uni e si y. I is low-le el so wa e o ien ed, as opposed o ou p oposal ha desc ibes a highe - le el so wa e a chi ec u e. Ga o Tech Sma House [31] om he Uni e si y o Flo ida, p oposes a laye ed Re e ence A chi ec u e, di ided in o ou laye s: applica ion, se ice, node, and physical. Each laye includes a se o sublaye s and componen s ha o m he whole a chi ec u e. I also in- cludes OSGi as a solu ion o he managemen o de ices in he se ice laye . This is an a chi ec u e e y simila o ou app oach, al hough we pu sue an a chi ec u e o a simple and mo e abs ac na u e. The main di e ence, be ween hei p oposal and ou s, is ha Ga o a chi ec- u e does no explici ly include an ac ing laye and does no define a cycle. Mo eo e Ga o a chi ec u e does no define asks o hei Senso laye , meanwhile ou p oposal defines fi e main asks o i . 930 A. Fe nández-Mon es e al. / Compu e S anda ds & In e aces 36 (2014) 928–940 GAS-OS [17] is he closes app oxima ion o he so wa e Re e ence A chi ec u e p oposed in his pape . This so wa e implemen s he Gadge wa e A chi ec u al S yle (GAS) app oach, in which people configu e complex collec ions o in e ac ing eGadge s, in a simila way o ha o a sys em builde in designing a so wa e sys em and compo- nen s. The benefi s o he ubicomp a e he same as hose demons a ed by so wa e enginee ing: encapsula ion and composi ion. As can be concluded om a de ailed analysis o hese p ojec s, hei a chi ec u es emain he e ogeneous, al hough se e al common cha ac- e is ics can be iden ified such as: gene al Pe cep ion-Reasoning-Ac ing cycle (commonly men ioned and explained in he bibliog aphy, o example by Russel and No ig [25]), o a ce ain kind o in eg a ion and in e ac ion be ween de ices ( he OSGi amewo k is equen ), o he e maybe ea men o con ex - ela ed in o ma ion. The p ojec s usually ake a laye ed app oach, bu ail o ollow a common s uc u e, and hei laye s, componen s and/o de ices di e g ea ly and a e also e y a chi ec u e-dependen . The e olu ion o hese sys ems by in eg a ing new de ices, algo- i hms o me hodologies ha imp o e o pe o m new asks in ol es a complex ask, due o he low le el o encapsula ion and modula iza ion. So wa e design is a key ea u e in he o ganiza ion, in eg a ion, and scalabili y o hese nume ous componen s. This p oblem is one o he p ime easons why SEs ha e ye o e ol e, and why hey belong mo e o he wo ld o esea ch and academia han o indus ial solu ions. Sol ing his pushed us o p opose he ollowing So wa e Re e ence A chi ec u e ha o ganizes hose common asks which need o be accomplished in he design o a SE om a concep ual poin o iew, independen o he implemen a ion. This necessi y has al eady been indica ed by Muhlhause and Gu e ych [26]. 3. Re e ence A chi ec u e 3.1. In oduc ion This sec ion explains he p oposal o So wa e Re e ence A chi ec- u e o de elop he so wa e laye in SEs. The p oposal is based on he goals o ubiqui ous compu ing p oposed by Weise [2]. Taking his as a s a ing poin , au oma ion in SEs can be o ganized as a con inuous in e ac ion be ween h ee main p ocesses: a) pe cep ion, b) easoning and c) ac ing (see Fig. 2). As indica ed in he In oduc ion, hiswo kiscen edon hePe cep- ion p ocess o he Re e ence A chi ec u e, which is explained below. 3.2. Pe cep ion The Pe cep ion p ocess should be di ided in o de o spli complex pe cep ion ac i i y in o se e al a ainable asks. The esul o hese asks mus be an accu a e pe cep ion o he eal wo ld (see Fig. 3). Pe cep ion has o deal wi h low-le el de ails o e ie e da a om eal wo ld and o adap i o a knowledge base, which mus ag ee wi h he on ology o he SE. A simple in o ma ion model o he SE used in he p o o ype scena io is p oposed in Table 1. The p ocess has o clea his e ie ed da a o any e oneous, insignifican , and edundan alues in o de o build an accu a e ep esen a ion o he eal wo ld, as equi ed by he ollowing p ocess. Some o hese asks ha e common ea u es wi h o dina y p e- p ocessing o da a such as no maliza ion, adding a ibu es o eplacing missing alues. P e-p ocessing o da a o SE has been s udied by se e al au ho s. S anko ski and T nkoczy's [34] p oposal defines a able om he da a collec ed in o de o gene a e inpu s o ollowing p ocessing, bu does no co e e o de ec ion, epa a ion o he de ices which pe o m his p e-p ocessing. On he o he hand, Elnah awy [35] p oposes wo gene al p ocesses •cleaning da a (conside ing cleaning a senso le el o cleaning a da abase le el) by applying p obabilis ic unce ain y models and •que ying da a. Mo eo e Wu and Clemen s-C oome [36] men ion a Da a p epa a ion s ep whe e da a mine s c ea e ele an subse s bu do no lis scopes, ep- a a ion o e o de ec ion p oposals, like Zhang [37] which jus men ion ha a p e-p ocessing s ep is equi ed o in eg a ion o low-le el senso da a. The au ho 's app oach includes concep s p esen ed by p e ious p oposals and gene alizes hem. 3.2.1. Da a collec o This is he lowes -le el ask, and i s aim is o e ie e da a om phys- ical de ices wi hin he SE. The Da a Collec o usually has o deal wi h ga eway de ices o e e y ype o senso echnique deployed in he SE. Da a can be gene a ed by nume ous kinds o senso s such as empe - a u e, p essu e, op ical, acous ic, mechanical, mo ion, ib a ion, flow, posi ion, elec omagne ic, chemical, humidi y, and adia ion, and he e- o e a c ucial ques ion ha mus be add essed conce ning he ask o he Da a Collec o is ha o he unifica ion o da a ypes. In ac , only a small subse o he en i onmen p ope ies (Table 1)is necessa y o pe o m a pa icula applica ion o au oma ion p ocess (e.g. swi ching ligh s o when nobody is a home does no need condi- ioning in o ma ion om he en i onmen ). Simila ly, senso s mus be deployed in an o ganized manne in o de o p e en he p ocessing o useless in o ma ion. Rega ding he execu ion o he da a p ocessing, i is impo an o conside whe e he p ocessing should be pe o med since a numbe o de ices allow in e nal p og amming while o he s a e p e-p og ammed. Fig. 2. The cycle o he au oma ion p ocess in a sma en i onmen . Fig. 3. Tasks o he pe cep ion p ocess. 931A. Fe nández-Mon es e al. / Compu e S anda ds & In e aces 36 (2014) 928–940 The p ocessing can be dis ibu ed, cen alized, o e en a combina ion o he wo i bo h kinds o de ices a e p esen in he en i onmen . Since he majo i y o de ices a e p e-p og ammed and canno ex end hei basic unc ionali y (e.g. X-10 mo ion senso s), he design o he SE has o be sui ably adap ed and de elope s ha e o adap o hem. On he o he hand, a g owing numbe o de ices ha e now he abili y o ex end o modi y hei pe o mance (e.g. Sen illa Tmo es). P og ammable de ices a e much mo e flexible, and he e o e pose a g ea e challenge o he designe , since hey can be adap ed o cu en needs o a specific applica ion o ci cums ance. In his case, he ask o he Da a Collec o mus in ol e he use o daemons de eloped o e ie e in o ma ion, and also small applica ions unning on de ices, and hence bo h elemen s ha e o ag ee on wha in o ma ion is sen , he pe iodici y o hese eques s, and so on. 3.2.2. Ve ifie The main pu pose o he Ve ifie ask, as i s name implies, is o e i y ha he da a is being ecei ed by he Da a Collec o co ec ly. Howe e he challenge he e is how he Ve ifie can de e mine whe he he da a is co ec o no . The e is no unique solu ion o all possible en i onmen s, so he e ifica ion has o be adap ed o each en i onmen by aking in o accoun he on ology used. In ou p oposal, Ve ifie main ains a ule engine whe e e ifica ion ules can be deployed, modified and checked in o de o de e mine whe e da a is igh o w ong o he cu en en i onmen . The ule engine has o o e p og amme s a flexible way o add, modi y and dele e ules, and he e o e hese should be human eadable. The se o ules o he Ve ifie should e ol e o e ime, as en i onmen changes a e p oduced. This ask has o wo k side by side wi h he Repai e when inco ec da a is ecei ed in o de o fix in alid da a. The mechanism o commu- nica ion be ween he Ve ifie and he Repai e mus be de e mined. Typical implemen a ions o his mechanism include he publica ion o a epai se ice by he Repai e ha is in oked by he Ve ifie . I can be concluded ha he Ve ifie can be seen as a fil e applied o e all he da a ecei ed, and i can be used o ejec da a o any eason (inco ec , edundan …) by using he a o emen ioned ule engine and based on he on ology model p oposed in Sec ion 3.2.5. 3.2.3. Repai e The ask o he Repai e is o fix inco ec da a de ec ed by he Ve ifie . The epai applied o he da a mus always conside he defined on ology and can be pe o med in a wide a ie y o ways, such as: •Igno e da a. The fi s op ion is o igno e he da a, which means se ing i wi h an unknown alue. The On ologize sa es his alueas equi edby he s o age sys em (e.g. he Weka-a ‘?’cha ac e , o he SQL null alue). •Adjus da a. I a alue is inco ec , bu i s dis ance om a co ec alue is less han a p e iously specified h eshold amoun , hen he alue could be adjus ed o he nea es co ec alue. •Replace da a. Ano he op ion in ol es eplacing da a wi h p e iously co ec da a (e.g. i empe a u e senso e u ns 100 °C, and p e ious da a is 25, hen he cu en alue can be eplaced wi h 25). •Rejec da a. I cu en alues a e no sui able o epai , hen he Repai e will ejec hem. Once a se o da a has been ecei ed, e ified and epai ed, i has o be sen o he On ologize o be o ganized and s o ed. 3.2.4. Fil e Some imes, no all he da a ecei ed om he en i onmen is neces- sa y o he easoning p ocess, and hence he on ology dismisses his in- o ma ion. This is he objec i e o he fil e : o p e en his supe fluous in o ma ion om being sen o he On ologize . The implemen a ion o his fil e , i p esen , should be based on he on ology defined o he ep esen a ion o he en i onmen . 3.2.5. On ologize An on ology ep esen s he knowledge abou he wo ld (o en i on- men ) as a se o classes, p ope ies and ela ionships, wi hin a domain. The easoning is pe o med using he en i ies ep esen ed, and hence da a e ie ed om he en i onmen should be o ganized be o e apply- ing a ificial in elligence echniques in o de o ha e a solid knowledge base wi h which o wo k. The main goal o he On ologize is o o ganize, homogenize, synch onize and agg ega e da a o o m a model o he eal wo ld suppo ed by he on ology defined o he SE. I is necessa ily an impo an e o o building a model o a SE which p o ides da a in e ope abili y and makes possible o ealize in- e ence, as sugges ed by Nucci [29] whe e an on ology amewo k is used o desc ibe all ele an in o ma ion o he en i onmen : de ices, se ices and con ex . I also ackled he u he di ficul y o de ice man- u ac u e s because o he lack o s anda diza ion in seman ic echnolo- gies wi hin hese scena ios. Ene gy is ano he key aspec o ake in o accoun o he on ology as p oposed by Kofle [30], whe e on ology includes in o ma ion no only ela ed o he en i onmen , bu also abou ene gy supply and p o ide . Some o he s udies like Cook [3],Das[21] and Li [22] ha e helped in he composi ion o he abs ac model p oposed, which has been a anged in o ou main ca ego ies as explained in Table 1.Thismodel can help de elope s asce ain he main en i ies ha need o be moni- o ed in he en i onmen . De ice ela ed —This ca ego y is he mos ob ious, and i is ela ed wi h he main elemen s in a SE. Ambien in elligence algo i hms should be awa e o he ollowing main fields: •S a us. Algo i hms mus know he cu en s a es o de ices ins alled in he SE. Ob iously his is essen ial o hese algo i hms, and one o he p ime ac o s o building o u u e p edic ions. Ene gy awa e algo i hms may also need in o ma ion abou ene gy needed by hese de ices o ope a e in o de o apply any ene gy sa ing policy. •Loca ion. De ices usually emain a a loca ion o a long ime, and hence his in o ma ion can be used by ambien in elligence algo i hms. The model mus also be able o handle mobile de ices, such as mo o ized cleane obo s. Table 1 P oposal o modelling sma en i onmen s. Ca ego ies Fields Desc ip ion Example De ice- ela ed S a us Cu en s a e o he de ices Senso empe a u e measu es 25 °C. Loca ion Whe e he de ices a e Cleane obo is in he li ing oom. Inhabi an - ela ed Pe sonal da a Name, age, sex Diane is 45 y.o. Loca ion Whe e he inhabi an s a e Ma k is in he bed oom. Physical s a e Illness, inju ies, and condi ion o inhabi an s Roy has a cold. Men al s a e Psychological s a e o he inhabi an s Da id is dep essed. En i onmen - ela ed Da e, ime Tempo a y in o ma ion Cu en ime is 13:36. En i onmen al condi ions The phenomena ha a e cu en ly occu ing in he a mosphe e I is ainy. Home backg ound Ine en i y loca ion Whe e hese en i ies a e The so a is in he li ing oom. Home limi s and p ope ies The p ope ies o he home s uc u e and i s limi s Bed oom window opaci y is 70%. 932 A. Fe nández-Mon es e al. / Compu e S anda ds & In e aces 36 (2014) 928–940 Inhabi an - ela ed —SE algo i hms mus be awa e o he inhabi an s' s a us o o e app op ia e p edic ions o any use o o he whole g oup o inhabi an s. Along his line, se e al o he necessa y fields o in e inhabi an -awa e p edic ions a e discussed: •Pe sonal da a. This field includes all he da a conce ning a pa icula pe son, such as name, age, and gende . •Loca ion. Inhabi an s can mo e be ween di e en spaces, so SE sys ems should be able o iden i y and loca e each inhabi an . •Physical s a e. This field is ela ed wi h he illnesses and inju ies ha an inhabi an can su e . SE echnologies mus adap o hese si ua- ions and o e app op ia e esponses. •Men al s a e. The s a e o mind o a pe son can be defined as he em- po a y psychological s a e. The beha iou o a dep essed inhabi an usually di e s om ha o a eupho ic inhabi an , and hence SEs mus be consis en wi h hese ci cums ances. En i onmen - ela ed —This ca ego y is p obably he mos di use since i co e s he e ogeneous and di ficul - o-limi fields, as discussed in he ollowing lis : •Da e, ime, season. Ob iously SE beha iou di e s unde each empo- al condi ion. Fo example, he ai condi ioning policy is al e ed be ween summe and win e . •En i onmen al condi ions. This field is comp ised o cu en en i on- men al condi ions (sunny, cloudy, ainy, among o he s). A SE should also eques a wea he o ecas , which could be significan in he assessmen o u u e decisions. Home backg ound —This ca ego y mus con ain all he ele an i ems ega ding ine en i ies and hei p ope ies and quali ies. This ca ego y is he leas ele an discussed, bu could emain significan in ce ain specific applica ions. Two ela ed fields a e p oposed in he ollowing lis ing: •Fu ni u e loca ion and posi ion. Fu ni u e occupies space a home and can be mo ed. Loca ion ( oom whe e he u ni u e is loca ed) and posi ion (place wi hin he oom) should be egis e ed by he sma home sys ems since i could be use ul in specific applica ions, such as obo mo emen - ela ed algo i hms, and p esence de ec ion- ela ed algo i hms. •Home limi s and p ope ies. The ex u e o a floo , he colou o a wall, and he opaci y o he windows could be significan in specificcases, such as empe a u e-adjus men applica ions. The e a e ye wo mo e issues conce ning he On ologize :Synch o- niza ion and Agg ega ion. Synch oniza ion —The On ologize has o synch onize da a om a wo ld ull o asynch onous de ices, and e en s. Response ime cons i u es a majo ac o when easoning abou e en s. Au oma ion applica ions usually need se s o da a composed o alues om mul iple de ices, cap u ed a a ious momen s. Da a om a a ie y o de ices mus be syn- ch onized o i s la e agg ega ion, and hence his ask has o define he logic o synch onize alues om mul iple and e y he e ogeneous sou ces. Implemen a ions o he synch oniza ion p ocess a y depending on he goals o each specific sma applica ion and on i s ype o da a. Howe e all implemen a ions sha e ce ain common elemen s such as: •Da a bu e , which s o es ecei ed da a ha is wai ing o be pai ed wi h o he da a. •Ga bage collec o , which supe ises he size o he bu e , and pe iod- ically cleans he bu e o da a ha canno be pai ed. Agg ega ion —Once da a is synch onized, i is agg ega ed in a se o da a o a specific sma applica ion ha con o ms o he SE model. When da a is agg ega ed, i is eady o be s o ed in he knowledge base ha eeds he easoning asks and lea ning p ocess. The knowledge base o ma can ake he o m o any o he de ac o s anda ds, such as a (Weka so wa e o ma file o inpu da a), o ha o a ela ional da abase. 3.3. De ice Abs ac ion The e is a gap ha needs o be co e ed be ween he modules defined by he Re e ence A chi ec u e and he physical de ices. One in e es ing ini ia i e which sol es his p oblem is De ice Abs ac ion.Thisis he esul o p e ious wo k by au ho s wi hin he OSAmI p ojec [23]. In De ice Abs ac ion a de ice abs ac ion laye is p o ided which desc ibes a se o s anda ds and con en ions o con olling, configu ing and accessing he da a gene a ed om all kinds o de ices ela ed o Ambien In elligence. The in eg a ion o senso s and ac ua o s is p o id- ed by ollowing he De ice Abs ac ion model in hei con ol so wa e. This hie a chical model, shown in Figs. 4 and 5,unifies c i e ia in o de o acili a e he access o he de ices, hei unc ionali y, and hei gene a ed da a. In his way, he me hods used a e independen o he unde lying p o ocols, and allow easie de ice swi ching. The use o De ice Abs ac ion is a s ep owa ds s anda diza ion o SEs. The p ima y ole o De ice Abs ac ion is he classifica ion o de ices in senso s and ac ua o s. Senso s a e ca ego ized as ei he me e s o de- ec o s, while ac ua o s depend on hei unc ionali y as pulse, swi ch, dimme and mo emen . Each de ice ca ego y p o ides a se o specific me hods o con ol o he de ice ac ions. The e is s ill ano he so wa e a e ac be ween De ice Abs ac ion and he de ices: he API which ansla es high-le el me hods in oked in p o ocol-dependen eques s. These APIs a e usually p o ided by de ice manu ac u e s. 3.4. Communica ions be ween p ocesses Reasoningp ocessesinSEscanbesepa a ed in o se e al asks which in e ac o achie e h ee main goals: a) o lea n, b) o eason, and c) o p edic . Finally, in o de o close he ci cle, SEs mus ac au oma ically o achie e a specific sma applica ion. This is he main pu pose o he Ac ing p ocess. The decisions and specific asks o de ed by he Reasoning p o- cess, ha e o pass h ough h ee main askmas e s: a) policy manage , b) ask schedule , and c) ask unne . In o de o eed bo h Reasoning and Ac ing p ocesses, an e en - d i en a chi ec u e pa adigm (EDA) is p oposed, in he o m o a publishing-subsc ibe message sys em. Reasoning asks a e subsc ibe s o da a gene a ed by Pe cep ion p ocesses and Reasoning asks a e publishe s o in e ed knowledge. In his way, Ac ing asks become subsc ibe s o he knowledge gene a ed by he Reasoning p ocess. 4. Ve ifica ion wi h p o o ype An example o he Pe cep ion p ocess implemen a ion, which ollows he Re e ence A chi ec u e p oposed in his pape , is p esen ed in his sec ion as p oo o i s use ulness. 4.1. P o o ype o e iew The main objec i e o he applica ion is he pe cep ion o a sma o - fice. I e ie es da a on he localiza ion o wo ke s, and on luminosi y, empe a u e, and humidi y (see Fig. 6). The pu pose o he e ie al o his in o ma ion is o acqui e knowledge abou inhabi an s/wo ke s e- ga ding hei habi s wi h espec o ligh ing condi ions, empe a u e, e c. in o de o make sma use o a ificial ligh ing o ene gy sa ing pu poses. The ha dwa e o he de elopmen en i onmen is composed o : •a compu e , which ac s as he da a ecei e ga eway, • h ee Sen illa Tmo es ( wo in he o fice as shown in Fig. 6 and a hi d in ano he o fice), as senso de ices o he collec ion o da a on he quan i y o ligh , empe a u e, and humidi y, •an X10 mo ion senso in o de o de e mine whe he he o fice is occupied, 933A. Fe nández-Mon es e al. / Compu e S anda ds & In e aces 36 (2014) 928–940 Fig. 4. De ice Abs ac ion class model o sensing. 934 A. Fe nández-Mon es e al. / Compu e S anda ds & In e aces 36 (2014) 928–940 Fig. 5. Ac ua ion class model o De ice Abs ac ion. 935A. Fe nández-Mon es e al. / Compu e S anda ds & In e aces 36 (2014) 928–940 •IEEE 802.15.4 (ZigBee) p o ocol b idge connec ed o he compu e in o de o communica e wi h he Sen illa Tmo es, •X10 anscei e o communica e wi h ac ua o s and he mo ion senso . The so wa e o he de elopmen en i onmen is composed o : Sen illa Wo k, which is an Eclipse-based IDE o he c ea ion, deploy- men , and debugging o ubiqui ous applica ions; Weka, a ool sui e which acili a es he use o machine lea ning echniques; and he de el- oped so wa e based on he p oposed Re e ence A chi ec u e and on he De ice Abs ac ion Model as he so wa e pa adigm o he de ice managemen so wa e. 4.2. P o o ype implemen a ion The so wa e de eloped by he au ho s ollows he Re e ence A chi- ec u e ou lined in Sec ion 3 and is ocused on he Pe cep ion p ocess de ailed in Sec ion 3.2. This so wa e he e o e ollows he asks p oposed in he Pe cep ion p ocess and is esponsible o he low- le el in e ac ion wi h de ices (Da a Collec o ask), in he o m o e i- fica ion, epai and fil e ing o he da a, and o he s o age o he da a by agg ega ing se e al da a sou ces and by ollowing he De ice Abs ac- ion Model. The so wa e i sel is dis ibu ed be ween a ious de ices, and hence a numbe o hese asks a e pe o med by he cen al compu e while o he s a e pe o med by he Sen illa Tmo es. 4.2.1. Sen illa Tmo es so wa e Sen illa Tmo es implemen a Ja a Vi ual Machine (JVM) called Sen illa Poin so ha i can un Ja a applica ions. In o de o access he ha dwa e capabili ies o he de ice, Sen illa o e s a Ja a lib a y which p o ides access o he da a ga he ed by he senso s and o he elemen s such as ex ension po s and leads. This low-le el so wa e cons i u es he de ice API which is used by he so wa e o access de ices. The Ja a applica ion un by Tmo es accesses senso da a and ansmi i ia he Zigbee in e ace. The senso s o m a mesh ne wo k whe e mo es ac as epea e s. This ype o ne wo k makes i possible o co e wide a eas e en hough Zigbee p o ocol has a adio scope o a me e 10 m. When de eloping his applica ion, i was obse ed ha he quan i y o luminosi y (measu ed in luxes) cap u ed by i s pho osyn he ically ac i e adia ion (PAR) senso fluc ua ed i he fluo escen ligh o he o fice was le swi ched on. The eason o his beha iou is ha fluo es- cen ligh is cons an ly swi ching o and on bu i is no pe cep ible by he human eye due o i s high equency. Howe e , his beha iou posed a p oblem wi h he so wa e, so i had o be ackled and included as a pa o he Repai e ask (see Sec ion 3.2.3)a hispoin .The solu ion is qui e simple: ins ead o e ie ing jus one alue, n alues a e e ie ed and hei a e age is compu ed and hen sen o he cen al ga eway. 4.2.2. Mo e Dashboa d In o de o ecei e all he in o ma ion om he Sen illa mo es, an appli- ca ion has been de eloped, which implemen s he app op ia e in e aces in each case: Mo ionDe ec o , Tempe a u eSenso , B igh nessSenso , o Humidi ySenso . Mo eo e , he au ho s ha e de eloped so wa e o he cen al s a- ion called Mo e Dashboa d. This so wa e shows he in o ma ion ha is being ecei ed om he mo es in eal ime. This applica ion ca ies ou all he main asks o he Pe cep ion p ocess in Sec ion 3.2.Asumma- y o he classes and in e aces o he implemen a ion is shown in Fig. 7: 1. Da a collec o . This p ocess is esponsible o managing he ecep ion o da a om he mo es, and o using he mo e ga eway supplied wi h he de elopmen ki , and an X10 con olle de eloped by he au ho s. 2. Ve ifie . Th ee simple e ifie s ha e been de eloped and pe o m sim- ple es s, simila o p econdi ions, o e da a ecei ed om TSR-PAR luminosi y, humidi y, and empe a u e senso s (e.g. luminosi y ≥0). Fig. 6. Room se up. 936 A. Fe nández-Mon es e al. / Compu e S anda ds & In e aces 36 (2014) 928–940