Pervasive Computing Appliations
Vinent Reynolds
A thesissubmitted to theUniversityof Dublin,Trinity College
infulllment of therequirementsfor thedegree of
Dotorof Philosophy(Computer Siene)
I, theundersigned, delare that this work hasnot previously been submitted to this or any
other University,and thatunlessotherwisestated, itis entirely myownwork.
VinentReynolds
I, the undersigned, agree that Trinity College Library maylend or opy this thesis upon
re-quest.
VinentReynolds
Oh odswallop! It's taken me eleven years, and it's perfet. Edmund: A
Butler's Tale a giant roller-oasterof anovel in fourhundred sizzlinghapters.
A searing inditment of domesti servitude in the eighteenth entury, with some
hot gypsies thrown in. My magnum opus, Baldrik. Everybody has one novel in
them and this one'smine,
EdmundBlakadder, 1793.
Ihavehadthepleasureofworkingwithmanyolleagueswhohavebeomesomeofmylosest
friends. Inpartiular,Anthony,Daire,Ray,AndronikosandMelaniehavesupportedmewhen
Ineededitandthatmeans alottome, morethanIan expressintheseshortwords. There's
fartoomanyotherstolistallthenames,butthanksforalltheoees,thefootball,theakes,
the bisuits, the Starraftand thebeers.
I owe a speial debt of gratitude to my supervisor, Vinny Cahill. His guidane and
patienethroughout the years havekeptthe shipsteady,and Iamindebted to him forall of
the opportunitieswhih have arisenout mytime intheDSG.
Finally, out in the real world, I wouldn't be where I am today without the support and
UniversityofDublin, Trinity College
The eld of pervasive omputing is hanging rapidly, withthe proliferation of and advanes
in hardware and ommuniation tehnologies resulting ina shift towards a large-sale,
het-erogeneous pervasive omputing world where people and devies move seamlessly between
previously isolated pervasive omputing appliations. Prototyping and evaluation of
per-vasive omputing senarios is a neessary yet inherently diult step between design and
deployment ofnew appliations, and simulation hastraditionally been both an eetive and
aepted modelling andevaluationmethodology thataddresses this step.
Previous eorts to provide generi simulation tools that fulll the unique requirements
of pervasive omputing have met only limited suess and these have typially foused on
extending or modifyingexistingtools thathave been designed for otherpurposes. There are
several existing simulators dediated to spei pervasive omputing domains suh as
wire-less sensornetworking, ontext-aware omputing, smart spaes, or intelligent transportation
systems. Additionally there are many emulators that provide platform-spei appliation
programming interfaes for the evaluation of pervasive appliations in these domains.
Per-vasive omputing nowenompasses so manysub-domains, tehnologies, and disiplines that
perhapsitisnosurprisethattrulygeneri pervasiveomputingsimulatorshaveyettobe
re-ated. Previous work generallysuers from one of two problems: simulators target a spei
appliationplatformorasub-domainofpervasiveomputing,withtheresultthatsubstantial
modiations are required to either simulate or integrate simulations of other sub-domains;
or, generisimulators thataretoo abstratrequire substantial eort in re-reatingreurring
elements whenspeializing the simulator toa partiular domain.
large-researh hallenge in this area, whih is to investigate whether a generi simulator an be
developed that an model a broad range of existing pervasive appliations as well as new
appliationsthatmayemergeinthefuture. Thehypothesisofthisthesisisthata
framework-basedapproahto buildinggeneriintegrated pervasive omputingsimulatorsandemulators
isa suiently exibleandextensibleapproah fortheevaluationandmodellingofpervasive
appliations.
Theuseofframeworksisawell-reognisedsoftwareengineeringparadigmthatis
appropri-atewhen exibility, extensibility and reusabilityare required from theoutset. A framework
omprisesa set of abstrat lasses that apture reurring patterns within a group of related
problems.
The ontribution of this thesisis to show thatusing a framework isa suiently exible
and extensible approah to reating simulators and simulations for a broad range of
perva-sive omputing domains. The PiCSE framework - the Pervasive Computing Simulation and
EmulationEnvironment -identies themostommon abstrationsfoundinthiseld,suhas
sensorsandthephysialenvironment,andprovidesanarhitetureforbuildingsimulatorsfor
themany dierent pervasive omputing sub-domains that exist. These simulators an then
be usedto reate spei simulationsof partiular senarios for these sub-domains. F
urther-more,theframework an beusedto provide an emulation environment for appliations, and
mediatetheinterationbetween thoseemulated appliationsandanysimulated omponents.
Thisthesis desribes thedesign and implementation of thePiCSE framework and shows
howthisapproahaddressestheresearhhallengeinthisarea. Theontributionisevaluated
by instantiating three senarios meeting dierent requirements suh as sale, use of diverse
hardware artefats, and omplex appliation exeution environments. These instantiations
validatetheframework'smodularity,exibilityandsuitabilityasanapproahforthereation
Aknowledgements vii
Abstrat viii
List of Tables xix
List of Figures xx
Chapter 1 Introdution 1
1.1 Pervasive Computing . . . 2
1.2 Motivation. . . 4
1.2.1 Current Approahes to Evaluating PervasiveComputing Appliations 5 1.2.2 ASetofChallengesfortheModellingandEvaluationofPervasive Com-puting Senarios . . . 7
1.3 A Framework Approah to Simulating and Emulating Pervasive Computing Appliations. . . 10
1.3.1 ThePiCSE Framework. . . 11
1.3.2 Using the PiCSE Framework . . . 12
1.4 TheThesis . . . 12
1.4.1 Implementation . . . 13
1.4.2 Evaluation . . . 13
1.4.3 Thesis Roadmap . . . 14
2.1 Introdution . . . 15
2.2 Model-Based Formalisms and Methodologies . . . 16
2.2.1 SimulationFormalisms . . . 16
The DisreteEvent SystemSpeiation . . . 16
The DisreteTime SystemSpeiation . . . 17
2.2.2 Emulation . . . 18
2.2.3 Alternative Software-Based Methodologies . . . 20
2.3 The Review Criteria . . . 21
2.4 An Overviewof Pervasive Computing Simulators . . . 25
2.5 The Key Simulators . . . 27
2.5.1 UbiWise . . . 28
RC1: FlexibleHeterogeneity. . . 29
RC2: Extensibility . . . 29
RC3: Arhiteture . . . 29
RC4: Appliation Emulation . . . 30
RC5: Interation ofEmulated and Simulated Components . . . 30
RC6: Network Simulation . . . 30
RC7: Experimental Support . . . 30
RC8: ExternalInteration . . . 31
2.5.2 Tatus . . . 32
RC1: FlexibleHeterogeneity. . . 32
RC2: Extensibility . . . 33
RC3: Arhiteture . . . 33
RC4: Appliation Emulation . . . 33
RC5: Interation ofEmulated and Simulated Components . . . 33
RC6: Network Simulation . . . 34
RC7: Experimental Support . . . 34
RC1: Flexible Heterogeneity. . . 36
RC2: Extensibility . . . 36
RC3: Arhiteture . . . 36
RC4: Appliation Emulation . . . 36
RC5: Interationof Emulated andSimulated Components . . . 37
RC6: Network Simulation . . . 37
RC7: Experimental Support . . . 37
RC8: External Interation . . . 37
2.5.4 UbiREAL . . . 38
RC1: Flexible Heterogeneity. . . 38
RC2: Extensibility . . . 39
RC3: Arhiteture . . . 39
RC4: Appliation Emulation . . . 40
RC5: Interationof Emulated andSimulated Components . . . 40
RC6: Network Simulation . . . 40
RC7: Experimental Support . . . 40
RC8: External Interation . . . 41
2.5.5 SitCom . . . 42
RC1: Flexible Heterogeneity. . . 42
RC2: Extensibility . . . 43
RC3: Arhiteture . . . 43
RC4: Appliation Emulation . . . 44
RC5: Interationof Emulated andSimulated Components . . . 44
RC6: Network Simulation . . . 44
RC7: Experimental Support . . . 44
RC8: External Interation . . . 44
2.5.6 P-VoT . . . 45
RC3: Arhiteture . . . 47
RC4: Appliation Emulation . . . 47
RC5: Interation ofEmulated and Simulated Components . . . 47
RC6: Network Simulation . . . 47
RC7: Experimental Support . . . 47
RC8: ExternalInteration . . . 48
2.5.7 StarBED2 . . . 48
RC1: FlexibleHeterogeneity. . . 49
RC2: Extensibility . . . 49
RC3: Arhiteture . . . 49
RC4: Appliation Emulation . . . 50
RC5: Interation ofEmulated and Simulated Components . . . 51
RC6: Network Simulation . . . 51
RC7: Experimental Support . . . 51
RC8: ExternalInteration . . . 51
2.6 Perspetives . . . 52
2.6.1 RC1- FlexibilityinModellingPervasive Computing Components . . . 54
2.6.2 RC4- Appliation Emulation . . . 60
2.6.3 RC6- Network Simulator Integration . . . 61
2.7 Summary . . . 62
Chapter 3 The PiCSE Framework Arhiteture 65 3.1 Introdution . . . 65
3.2 A Framework-Driven Approahfor theTestingof Pervasive Computing Appli-ations. . . 66
3.3 A Frame ofReferene for a Pervasive Computing Simulator . . . 67
3.3.1 The Sopeof External-FaingFeatures . . . 68
3.4 Requirements . . . 70
3.6.1 MinimumRequirementsfor aPiCSE Instantiation . . . 78
3.6.2 PiCSE Instantiations asSub-Frameworks . . . 80
3.7 Supported Abstrations . . . 81
3.7.1 Supporting the Modelling of the Physial Pervasive Computing Com-ponents . . . 82
TheObjetlass . . . 83
Physial Domains. . . 85
3.7.2 Supporting theModelling oftheSoft Pervasive Computing Abstrations 86 3.8 Emulationsupportwithin PiCSE . . . 87
3.8.1 Enabling Emulation . . . 87
3.8.2 ThePhysial Arhiteture for Emulated Appliations . . . 89
3.8.3 Supporting MultipleAppliations . . . 91
Disretisingan Appliation . . . 92
Exeuting MultipleAppliations . . . 93
3.9 Experimental Support . . . 93
3.10 Summary . . . 94
Chapter 4 Modelling the Key Pervasive Computing Components 95 4.1 ThePC_Abstration lassategory . . . 95
4.2 ExeutionEnvironments . . . 97
4.3 Sensors . . . 100
4.3.1 Push and Pullmodels . . . 101
4.3.2 Measured Phenomenon. . . 102
4.3.3 Querying . . . 102
4.3.4 Charateristisof Individual SensorReadings . . . 103
4.3.5 External Interfaes . . . 104
4.4 Atuators . . . 104
4.4.1 ExeutionEnvironment Interation . . . 105
4.5.1 A Single ModelledPhenomenon . . . 106
4.5.2 A Loation-BasedAPI . . . 109
4.5.3 EnvironmentLayer Complexity . . . 111
4.6 EntityLayers . . . 111
4.6.1 Loation basedInteration. . . 113
4.7 PiCSE asa Combinatorial Framework . . . 115
4.7.1 Physial Dependenies . . . 116
4.7.2 Logial Dependenies. . . 116
4.7.3 Limiting theeetsof updates . . . 117
4.8 Requirements Analysis . . . 119
4.9 Conlusion. . . 121
Chapter 5 Evaluation 123 5.1 Introdution . . . 123
5.2 ExperimentalMethodology . . . 123
5.2.1 The Senarios . . . 126
5.3 The STEAMEmulationSenario . . . 126
5.3.1 Senario Modelling requirements . . . 127
5.3.2 Building theSenario Model. . . 129
ModellingtheSenario's Software Components . . . 129
Modellingthe Senario's Hardware Components. . . 138
Interlinking ofSimulatedHardware andSoftware Components . . . 139
5.3.3 Exeuting theSenario Simulation . . . 141
Initialising theExperimentalSenario . . . 141
Exeution of theSimulation . . . 143
5.3.4 Senario Analysis . . . 146
Insights . . . 147
Evaluatingthe PiCSErequirements. . . 153
5.4.2 Building theSenario . . . 156
Modelling the senario'ssoftwareomponents . . . 156
Modelling the senario'shardwareomponents . . . 159
Interlinking of simulatedhardwareand softwareomponents. . . 160
5.4.3 Exeution ofthemodelled domain . . . 162
Initialising the experimentalsenario . . . 162
Exeution ofthe simulation . . . 162
5.4.4 Senario Analysis . . . 164
Insights . . . 165
EvaluatingthePiCSE requirements. . . 165
5.5 TheIntelligent Transportation SystemsSenario . . . 167
5.5.1 Senario ModellingRequirements . . . 168
5.5.2 Building theModel . . . 169
Modelling the Senario's Software Components . . . 169
Modelling thesenario'sHardware Components . . . 169
5.5.3 Exeution ofthe modelled domain . . . 173
Initialising theExperimental Senario . . . 173
Exeution ofthesimulation . . . 174
5.5.4 Senario Analysis . . . 175
Insights . . . 175
Evaluatingthe PiCSE requirements. . . 178
5.6 RequirementsValidation and Conlusion . . . 180
5.6.1 Requirements R1,R2,andR3 . . . 180
5.6.2 Requirement R4 . . . 182
5.6.3 Requirement R5 . . . 183
5.6.4 Requirement R6 . . . 184
5.6.5 Requirement R7 . . . 184
6.1 The Challenge Restated . . . 187
6.2 The Contribution . . . 188
6.3 Lessons Learned . . . 189
6.4 FutureWork . . . 190
Appendix A Appendix 193 A.1 PiCSE Arhiteture Header Files . . . 193
A.2 EvaluationSenarios . . . 230
2.1 Simulator ReviewCriteria . . . 22
2.2 Comparing the reviewriteria for the keypervasive omputingsimulators . . 53
2.3 Pervasive Computing Components Modelled . . . 54
5.1 Requirement evaluationmetris . . . 125
5.2 TheSTEAM API . . . 129
5.3 System allsmadebySTEAMto the underlying operatingsystem. . . 130
5.4 TheDUMMY-SEAR API . . . 132
5.5 Lines ofode requiredto implement theSTEAM emulationsenario . . . 149
5.6 Requirementsanalysis for theSTEAM emulation senario . . . 153
5.7 Mappingfrom systemallsto theiremulated equivalent . . . 158
5.8 Requirementsanalysis for theCar Hardwaresenario . . . 166
5.9 Requirementsanalysis for theITS senario. . . 179
5.10 Overallrequirements analysisfor R1,R2and R3 . . . 181
5.11 Thehardwareand softwaremodels requiredbythethreeevaluation senarios 182 5.12 Overallrequirements analysisfor R4 . . . 183
5.13 Overallrequirements analysisfor Requirement 5. . . 183
2.1 Overlapping Domainsof Pervasive Computing Simulators . . . 26
3.1 The PiCSE_Core arhiteture. . . 74
3.2 Coneptual arhiteture showing layers within a generi instantiation of the PiCSE framework. . . 76
3.3 Coneptual diagram ofa PiCSE simulation inAlgorithmMode . . . 79
3.4 A PiCSE instantiationinAppliation Mode . . . 80
3.5 UML Sequene diagramdepiting olloatedobjets senario . . . 84
3.6 A splitlevelimplementation ofthePiCSE supportfor emulatingappliations 88 4.1 The loation ofthe PC_Abstration lasses withinthelogial arhiteture. . 96
4.2 Objets instantiated from the PC_Abstration lass ategory are pre-dened to interat using ertainmethods. . . 97
4.3 The proess bywhih a reading passesthrough a pipeline formed of a ombi-nation of bloking and modifyinglters . . . 103
4.4 Temp_environment lass. . . 107
4.5 A PreipitationLayerobjet models rainfallwithin thesimulatedenvironment. 108 4.6 EnvironmentLayerinstantiations an interat diretlywith otherLayers . . . 109
4.7 Objetinstaneswithinloseproximity,denedbythegrid'sdisretisedspae, are bundledinto asingle list . . . 112
5.1 CommandSensor announesevent types periodially . . . 127
5.2 TheCommandSensor appliation broadasts eventsto hissubsribers. . . 128
5.3 The appropriate point at whih STEAM should be emulated must be
deter-mined bytheuser andis not onstrained byPiCSE. . . 130
5.4 STEAMis omprised ofan RTE andSUMMY_SEAR library.. . . 131
5.5 Extrats from the emulated STEAM library, as dened in steamExeEnv.h.
Thefull denitionof thisprogram maybe found intheAppendix. . . 133
5.6 OriginalSTEAM libraryand emulated STEAM library. . . 134
5.7 ComparingoriginalbehaviouroftheDummy-SEARandtheemulatedDUMMY 2
-SEAR omponents. . . 135
5.8 Extrats from the CommandSensor program, whih is dened in
Command-Sensor.pp . . . 136
5.9 Extrats fromthe TestDevie program, whihis dened inTestDevie.pp . . 137
5.10 TheTestDevieevent allbak funtion,whihis dened inTestDevie.pp . 137
5.11 Modelling of a stati objet an be ahieve by passing a loation parameter
duringthe instantiation of anExeutionEnvironment objet.. . . 138
5.12 Physial objets an be parameterised with a mobility pattern whih denes
their movement duringthesenario experiment. . . 139
5.13 Code fragment demonstratingthe interlinkingof thesenario'sTestDevie
ap-pliation and emulated STEAMmiddlewareinstane. . . 140
5.14 Code fragmentdemonstrating the interlinkingof thesenario's
CommandSen-sorappliation, emulated STEAM middleware instaneand themodelled
mo-bile devies . . . 141
5.15 Code fragment showing the initialisation of the PiCSE_Core aspets of the
STEAMsenario environment. . . 142
5.16 Code fragment showing theinitialisation oftheSTEAM senarioenvironment. 143
evaluation.. . . 145
5.19 Original STEAMlibrary and emulated STEAMlibrary . . . 147
5.20 Tableshowingthenumberofmodiedlinesofodewiththeemulated
DUMMY-SEAR library. . . 150
5.21 Photograph of the hardware being emulated. . . 154
5.22 The hardware setup of the Car Hardware Senario. The program running on
theIPAQ,onsumes sensordatavia the PICboard. . . 155
5.23 System allsmade bythe IPAQ appliation . . . 157
5.24 System all denitionles for theinvoked systemalls . . . 159
5.25 Co-loation ofExeutionEnvironment andtheIPAQappliation . . . 161
5.26 Co-loation ofExeutionEnvironment andSensor Objets . . . 161
5.27 A sreenshotshowing theloggedoutputfromtheCarHardwareSenario
eval-uation. . . 163
5.28 The Dublin Cityroadtra network . . . 167
5.29 A snippet from the ityentre.xml le desribing the road network topology
and onstraints. . . 170
5.30 A sampleentry fromthepath denition le . . . 172
5.31 A setionof odedemonstrating howthearpath leis parsed. . . 174
5.32 Parsing the CityCentre.xml maple . . . 174
5.33 Two sreenshotsfroma visualisation oftheDublin tra senario. . . 175
5.34 A vehileinterats withits environment to inform its nextmovement . . . 177
A.1 ArhitetureDiagram for typialinstantiation . . . 193
Introdution
Simulationanplayanimportantroleinthelife-yleofsoftwareengineeringprojets(Zeigler00 ).
Thisispartiularlytrueintheaseofpervasiveomputingwherethesaleofappliationsan
belarge and they areoftendesigned to be deployed in lessthan ideal physial environments
(Razandralambo 10 ). Designing a simulator that meetsthe modelling requirements of
per-vasiveomputingisadiulthallengearisingfromthreefators: thereisabroaddiversityof
appliation areaswithinthedomain;theseappliation areasarenowinterseting,andnally,
new appliation areas are emerging quikly. At present, new simulationtools are being
de-velopedto keep pae witheahnew appliation area(Mangharam 06 ;Eugster 06;Jouve 09)
within the evolving pervasive omputing domain. This thesis desribes the Pervasive
Com-putingSimulationandEmulation(PiCSE) 1
framework,itsarhiteture anddesign,the
om-binationof whihaddresses these hallenges.
PiCSE is a framework (Johnson88 ) that supports both the reation of pervasive
om-puting simulators and individual simulations through the modelling of reurring pervasive
omputing abstrations and their relationships. The reation of domain-spei pervasive
omputing simulators suh as intelligent transportation system (ITS) simulators or
smart-spae simulators is enabled by speialising the PiCSE framework's abstrations to reate
domain-spei abstrations.
Theinstantiation ofa groupofPiCSE abstrations,or of anyspeialiseddomain-spei
1
abstrations provided by a domain-spei simulator results in the reation of an instane
simulation: a simulated model of a spei pervasive omputing senario. Moreover, the
PiCSE framework supportsthe emulationof appliationsthat forman integral part ofthese
senarios, and these emulated appliations an be integrated into instane simulations. The
PiCSE simulation engine, whih underpins the framework, mediates the interation of
em-ulated appliations with simulated artefats. PiCSE's exible approah enables a person to
instantiate theframework to reate domain-spei simulatorsand simulations to evaluate a
diverse rangeof pervasiveomputing appliation areas.
The remainder of this hapter is strutured as follows. Setion 1.1 provides a broad
introdution to the area ofpervasive omputing. Themotivation and urrent methodologies
forevaluatingpervasiveomputingappliationsarepresentedinsetion1.2whihthendraws
onadisussionoftheseapproahesintheeldtoderivethekeyhallengesinthisarea. Setion
1.3 introdues the onept of frameworks and suggests why a framework-driven approah
might be suessful inaddressing these hallenges. A desription of the ontribution of the
thesisandthe evaluationmethodology used isprovided insetion1.4and aroad map ofthe
remainder ofthe thesisonludes thishapter.
1.1 Pervasive Computing
Pervasive omputing (Weiser91 ; Weiser 93) as an area of researh is one that enompasses
more foused areas suh as ambient intelligene (Bresiani04 ), sensor networking (He04 ),
ontext-awareomputing(Benereetti 01),andsmartspaes(Dearle 03 ). Considerthe
follow-ingpervasiveomputingappliations. Smart-spaes(Tapia04)areoftenpassiveappliations,
atinginthebakgroundanddrivenbyloalsensors,whihanthenadaptsomeaspetofthe
spae suh as aess ontrol (Selvarajah 10 ) or telephone all re-routing to a user's
require-ments. An environmental-monitoring wireless sensornetwork (Ji 04) ouldomprise sensors,
perhaps monitoring preipitation, noise, or temperature, attahed to wireless sensor motes
that propagate that sensor information to other sensor motes through an ad-ho
ommuni-ationnetwork. Intelligent transportationsystems(Klein 01 )typiallyuseembedded sensors
the throughput of thevehiles in the system. Despite thediversityof these appliations, all
of theman beonsidered to liewithin the broad domain ofpervasive omputing.
Morereently, there hasbeen a shift towards the integration of heterogeneous pervasive
omputing appliations. As adoption and deployment of pervasive omputing tehnologies
takeshold,the physial and logialboundariesbetween these appliationsarebeingredued
andnowoverlapinmanyases (Handte09 ). Thetraditionalnotionofapervasiveomputing
appliationasalosed,isolatedsystemisbeingerodedwiththeintegrationofservie-oriented
arhitetures into pervasive omputing appliations (Guinard10), enabling users to exploit
the serviesand funtionalityof dierent pervasive omputingappliations astheymove
be-tween them. Iftheintegrationofthese pervasiveappliationsis tobesuessful, information
desribingusersoftheseappliationsandtheappliationsthemselvesmustbefreelyavailable
and understandable by all so that it an be onsumed by all pervasive omputing
applia-tions when and where they need it. As a result, there has been attempts reently towards
entralisingtheseservies: tworeentexamplesareGoogleLatitude 2
whihprovidesservies
formanaging auser'sloation andConserv(Hynes09 )whihmanages awiderspetrumofa
user's ontextual datasuh astheiralendar events andpersonaldevies thatmight identify
them.
In addition, a new lass of ad-ho pervasive omputing is now emerging with the user
at its entre. In itizen sensing (Campbell 08) or partiipatory sensing as it is sometimes
known, userswith powerful sensor-enabledmobiledeviesareaugmenting,and insome ases
replaing, statiembedded sensors inthe physial environment. The wisdom ofrowds, or
their olletive sensed information in this ase, is leading to innovative rowd-soured
ap-proahestoenvironmentalmonitoring(Lu 09)andevensupportingthereationofinterative
artinstallations (Vyas10 ).
These examples represent a small sub set of all the domains that pervasive omputing
address,yetdespitethediversenatureofthesepervasiveomputingsub-domains,therearea
setof reurringharaterististhatareommon withinthem. Theyaretypiallydeployed in
sensor-equippedspaes,whetherthosesensorsarestatiormobile,whereinformation
regard-2
ingtheenvironment and loalontextual information isleveragedbyappliationsto provide
more tailored and ontextualised funtionality and servieswithin thatenvironment. In
ad-dressing this area, pervasive omputing appliations have to ontend with many non-trivial
problems inluding dependability, large sale, physial distribution, seurity and timeliness.
Moreover, typial environments in whih these appliations are deployed inlude buildings
forsmart-spaesenarios(Tapia04),ruggedterrainforenvironmentalmonitoring (Ji04)and
roadnetworksforintelligent transportationsystems(Klein 01 ). Theseenvironmentsareoften
physiallyinaremoteloationmakingdeployment andmaintenanebothdiultandostly.
1.2 Motivation
Modelling and evaluation plays a ritial role in the life-yle of any software engineering
projet but presents some partiular hallenges in pervasive omputing appliation
senar-ios. The appliation typially extends beyond the omputer into the physial environment
through the use of sensors, atuators, or loation-based servies. The impliations for the
testingofthesesenarios isthattheomplete pervasiveomputingeo-system, inludingthe
environment, devies, their users and other fators should be onsidered. However, this
in-trodues diulties thatmust be overome. Testing inphysial environments suh asoean
oors (Jiang 09), oes and homes (Selvarajah 10 ) to road networks (Salim08) and sports
environments (Kranz 07) an be invasive, disruptive and often hampered bybureauray, if
aessis even available. Manyof these appliations areprediated upon hardware
tehnolo-giessuhasheap,reliablesensors,forexample,radiofrequenyidentiationtags(Xu10)or
wirelesssensors(Medagliani 10 ),whihareyettobewidelydeployed orevenavailableinthe
salesthatareenvisioned,and asaresult, aurate real-world deploymentsinsome domains
may not yet be feasible. Pervasive omputing appliations in the areas of intelligent
trans-portation systems or urban-sensing for example, an involve theinteration of thousands or
tensofthousands of elements. Finally,theevolvingnatureof theeldmeans thatnewareas
areemerging and the pervasive omputing ommunity urrently laks the appropriate tools
to evaluate some of these areas suh as partiipatory-sensing (Campbell 08). In these ases,
suhastheseimpatuponthetimeandeortrequiredtoevaluateanddebugapervasive
om-putingprototype,partiularly whenonsidering thatanexhaustivesetofontrolledsenarios
mayhave to be deployed inorder to evaluatea prototyperigorously.
1.2.1 Current Approahes to Evaluating Pervasive Computing
Applia-tions
(Nakata07 )liststestbeds,small-salelaboratorytestsandsimulation asthreemethodologies
for evaluating pervasive omputing appliations. Whih of these methodologies is hosen to
evaluate any partiular pervasive omputing senario is inuened by experimental fators
suh asthe appliation's urrent stage of development and on what the desired outome of
the evaluation is. The methodology hosen an additionally be inuened by loal fators
suh asthe tester'saessto hardware deviesand testingfailities,osts, andthetimethat
is available to test theappliation. If the purpose ofthe evaluation isto validatewhether a
pervasive omputing appliation is robust enough to be ready for a ommerial release and
subsequent real-world deployment, then anappropriate evaluation methodology might be to
usea large-sale testbed,whereas inthe reationof an appliation prototypeinan emerging
large-sale eld, asimulation-based evaluationmaybeused.
PhysialtestbedssuhastheTwist(Handziski06 )andMoteLab(Werner-Allen 05)testbeds
provide an experimental platform in whih appliations are exeuted on hardware devies
in a stable environment, where there is usually a supporting infrastruture in the form of
bak-hannels and monitors for the management, ontrolled exeution and debugging of
ex-periments. Using nativehardwaredeviesastheplatformforan experimentpotentiallygives
greaterredibilitytoresultsgatheredfromanyexperimentwhenompared,forexample,with
simulatedresultshowever,themethodologyandsupportinginfrastrutureusuallyrestritsthe
testbedto thatpartiularplatformand thus to aspeidomain ofpervasiveomputing. To
date, most testbeds are very domain spei, have not been designed with integration of
otherdomainsinmindandthus arenotsuitableasageneripervasiveomputingevaluation
platform.
experiments areexeutedon realhardwaredevies. In ontrast to testbedshowever, there is
rarelya permanent infrastruture supporting theexperiments, resulting in experiments that
areoftennot verysalable and thatan be diult toreprodue inotherlaboratories.
Finally, there are several existing pervasive omputing simulators but few thatreognise
or reet that pervasive omputing is beoming a more multi-disiplinary domain with new
emerging areas of researh and their rossover with existing areas of researh. As an
eval-uation methodology, simulation's popularity is demonstrated by its wide aeptane within
the pervasive omputing ommunity as a valid methodology, and many simulation libraries
are open-soure and are available for little or no ost (Fall 01 ; Martin 06a) so it has a low
barrierof entry in this respet. However, in general,these simulators arerarely designed for
inter-operation(Kuhl 99 )andarenotapableofmodellingthediverserangeofpervasive
om-putingsenarios that exist,i.e., a network simulator isnot readily adapted to themodelling
ofaontext-awareomputingsenariobeauseitwasnot intendedtomodeloneptssuhas
userbehaviourandativities. Therefore,anysimulatedsenariothatinludesbothaspetsof
ontext-aware omputing and wireless networking requireseither the reation of a new
sim-ulationtoolfor thatpartiular domain,or the modiation and integrationof existingtools.
Inadditiontosimulation,emulationprovidesalowostalternativetotheevaluationof
appli-ationsbyremovingthephysialrequirement fortheintendeddevieplatformtobeavailable
for theevaluation ofa partiular appliation. Salableand ost-eetive prototyping an be
ahievedasmultipleinstanesofanemulatoranberuninparallel,withouttheexperimental
overhead of managing and deploying an appliation on thehardware devies. Many existing
emulators within the pervasive omputing domain are written for appliations targeted for
a single spei platform. For example, the TOSSIM emulator (Levis03) supports TinyOS
(Hill00 )appliationsonly,althoughtheseanrunonseveralrelatedhardwareplatformssuh
astheTMoteSky 3
andtheMoteIV.Byonstraininganemulatortoasingleappliation
plat-form,anemulatorisimpliitlyonstrainingitssopetoaspeidomainastheseappliation
platformsare generallydomain-spei, inthisase, wireless sensornetworking.
3
1.2.2 A Set of Challenges for the Modelling and Evaluation of Pervasive
Computing Senarios
This thesis is onerned with methodologies that are both suitable for the evaluation of a
wide rangeof diversepervasiveomputingsenarios andthatan be extendedtoevaluate new
senarios thatmayemergein thefuture.
Itanbeseenfromtheapproahesthathavebeendesribedinthepreedingsetionsthat
testbeds,small-salelaboratorytesting,simulatorsandemulatorsmeettheserequirementsto
varying degrees of suess. Testbeds are very eetive tools and an provide exellent
ex-perimental support, however they are expensive to reate and maintain, and are usually
onstrained toasingleappliation domain andhardware platform. Inmanydomainssuh as
intelligenttransportationsystems(ITS)andurban sensing,large-saletestbedsmaynoteven
befeasibletoanyoneexeptthelargestindustrialresearhlabs. Whilstitispossibletoreate
bespoke small-sale laboratory tests for almost any domain, these are inherently limited in
sale, areoftenbuiltwithout onsiderationfor extensibilityandrequire physial
reongura-tionfor eahnewsenario. Intheaseofbothexistingsimulatorsand emulators, therearea
widerangeofdomain-speitoolsandlibrariesinexistenewhihareoftenextensiblewithin
their domain but annot be easily integrated witheah otherdespite their software-only
ap-proah. They additionally address omplimentary aspetsof pervasive omputing senarios.
Simulatorsan modelandbeusedtoevaluatephysialelementssuhassensordevies,users,
awirelessnetwork,andtheenvironment,whilstanemulator anmodeltherun-time
environ-ment of appliations thatexeute within those senarios and potentially interat with those
elements. Inonlusion, there is no one size ts all evaluation strategy that an be applied
to pervasive omputingappliations however,a exible andombinedapproah of both
sim-ulation and emulation ould potentially support the evaluation of large-sale heterogeneous
appliations.
Based onthe issuesidentied inthe overviewof pervasive omputingdomains insetion
1.1 andin the rangeof modelling and testing methodologies usedto evaluate those domains
in setion 1.2.1, the following researh problem has been identied. As pervasive
onsiderationwhen evaluatingthose appliations isalso inreasing. However, all ofthe
eval-uationmethodologies suerto aertaindegree fromthe sameweakness,inthattheyaretied
to a spei pervasive omputing domain and are generally not designed to be extended to
evaluatenew appliationswhih oulddraw frommore than oneindependent domain.
One of the main arguments for maintaining the status quo of testing individual aspets
of partiular pervasive omputing domains in isolation is the need for rigorousness in the
experimentalmethod. Byisolatingasmanyexperimentalfatorsaspossible,itistheneasier
to ahieve quantiably independent, reproduible and objetive results. Certainly, using a
singleindependent simulator isatleasttheoretially moresuitable forthis task. However, as
hasbeennoted,newmulti-disiplinary areasofpervasiveomputingsuhasvehiularad-ho
networks(VANETs)andsmartspaesmakesitmorediulttotreattheseareasinisolation.
In the ase of VANETs(Klein01 ), the behaviour model responsible for the movement of a
vehileisafator inthe eetivenessofarouting protoolthatmight be runningwithinthat
VANET. Of ourse, the behavioural model of the vehile an be redued to a plug-in or a
mobilitypatternthatmightbeintegratedintoanetworksimulator,butthatmodelstillhasto
bebuilt byanexpertinthevehiular ommunity. Furthermore,theremaybeappliationsin
thefuturewherebytheoutomeofanappliationthatisusingtheroutingprotoolinuenes
thebehaviourofthe vehile. In thatase, thelimitations ofasimple plug-inbasedapproah
willbe exposedand theintegrationof both networkand vehilesimulators will thenhave to
ahieved.
Thefollowinghallengeshavebeenidentiedaskeyissuesinaddressingthisopenresearh
problem:
1. FlexibleHeterogeneity: Anysimulatororemulatorshouldbeabletosupport
hetero-geneouselements, both hardwareand softwarebased, and thefatthat these elements
aninterat inamannerthatisunrestritedbyanyadoptedapproah. Theseelements
mayomefrom dierent pervasive omputingdomains.
2. Extensibility: Anysimulatoror emulatorshouldbeableto aommodatenew
emerg-ingareasofpervasiveomputingnotyetidentied,wherethesenewareasanomprise
3. Reusability: Anysimulator oremulator should simplifythetaskof buildingand
inte-grating elements thatareto be evaluated.
Simulation andemulationaretwo evaluationmethodologies thatansupportlarge-sale
se-narios and that are ommonly implemented using extensible arhitetures, albeit generally
within their domain only. The hypothesis of this thesis is that a new framework-based
ap-proah to building generi integrated simulators and emulators for pervasive omputing
ap-pliations is a suiently exible, extensible, and reusable approah for the evaluation and
modelling of these appliations. These three hallenges are not exhaustive by themselves
however. There areadditional hallenges inthis areathat inlude:
1. Modelling Large-Sale Senarios: Manypervasive omputing appliations require
theinteration of manythousands of interatingfeatures suh asappliations, sensors,
andusers,andinsomeasesevenmore. Thismotivatestheneedforasalableapproah
inaddressing this hallenge.
2. Timeliness: Therealisti modellingof appliation behaviour inmany pervasive
om-putingdomainsneessitates the aurate modellingofthetimetakenfor anevent suh
asa sensorreadingor an appliation behaviour.
Whilsttheseareimportant hallengesinthe simulation of pervasiveomputingappliations,
they are not the key hallenges when addressing the issue of the modelling and simulation
of overlapping of newand emerging pervasive omputingappliation domains. Nevertheless,
these two hallenges present seondary hallenges and their onsideration is addressed in
the thesis where appropriate. Finally, appliation-spei requirements suh asseurity and
dependability provide additional hallenges but these are pertinent to the appliations that
may run within the senarios and are not spei features thatare addressedindependently
1.3 A Framework Approah to Simulating and Emulating
Per-vasive Computing Appliations.
Johnsonetal(Johnson 88 )dene a framework as
a set of lasses that embodies an abstrat design for solutions to a family of
relatedproblems.
Thisdenitionenapsulatestheabstratnatureofframeworks,whileapturingtheir
suitabil-ityto addressing families of related problems. Other denitions, notably those of Campbell
(Campbell 91 ) and Booh (Booh93) inorporate the onept that the olletion of lasses
onstituting a framework, interat in a dened manner or pattern. The benets of using
frameworks are well known, and Shmidt (Shmidt 97 ) lists these primarily as modularity,
reusability and extensibility. He states, thatframeworks
enhanemodularitybyenapsulating volatileimplementation detailsbehind
sta-ble interfaes. This loalisation redues the eort required to understand and
maintain existingsoftware.
Thisdenitionhighlightstheuseofstableinterfaesdened byaframeworkto abstratfrom
theimplementation ofthe framework. Hegoeson to state thatstableinterfaes
providedbyframeworksenhanereusabilitybydeninggeneriomponentsthat
anbe reappliedto reate new appliations. Framework reusabilityleverages the
domainknowledgeand prioreort ofexperieneddevelopers inorderto avoid
re-reatingandre-validatingommonsolutionstoreurringappliationrequirements
andsoftwaredesign hallenges.
Thisdenitionofreusabilityaknowledges thatifreurringrequirementsandsoftwaredesign
hallenges an be identied amongst a set of related problems, then these an be exploited
within a framework to redue the eort in reatingnew appliations. Finally,Shmidt et al
by providing expliit hook methods that allow appliations to extend its stable
interfaes.
and that
framework extensibility isessential to ensure timely ustomisationof new
appli-ation serviesand features.
Thebenetsofextensibilityarelearwithinframeworks,asitmeans thattheframeworkan
be extended to support new appliation features identied inaddition to theoriginal set of
relatedappliation features.
1.3.1 The PiCSE Framework
The PiCSE framework is implemented as a set of abstrat lasses that an be grouped into
two lass ategories (Kruhten 95), the PC_Abstrations and the Abstrat_Interfaes lass
ategories,thataddressthethreekeyhallengesidentied;exibleheterogeneity,extensibility,
and reusability. A third lass ategory, theCore_Components lassategory,provides a set
of ore omponents, for example, the simulation engine, that underpin and are ommon, to
all simulationsreated using the PiCSE framework.
PiCSE's PC_Abstrations lass ategory provides the lass denitions of reurring
ele-ments of pervasive omputing appliations suh as sensors, environments, and appliation
platforms. These abstrations are designed to be suiently generi that they may be
in-stantiated to reate a diverse range of onrete instanes with variable harateristis, thus
meetingtherequirementofsupportingheterogeneity. Inadditiontothis,theabstrationstake
into onsiderationthelikelyinterations betweenthese instantiations, andtheframework
ap-proah allows onreteinstanes to be modularly ombined, allowing theexible reation of
more omplex instantiations.
Theframework'sAbstrat_Interfaes lassategory omprisesasetofabstratinterfaes
that also underpin the PC_Abstrations lass ategory, allowing for the extension of the
framework to reate new abstrations. These set of abstrations apture onepts suh as
arereurringarosspervasiveomputingdomains. Thislassategoryaddressesthehallenge
of extensibility within the framework's arhiteture that an aount for emerging domains
inthe future.
The framework-driven approah addresses thehallenge of reusability by providing
om-monsolutionsto reurringappliationrequirementsandsoftwaredesignhallenges. Allthree
lassategories, the PC_Abstrations,Abstrat_Interfaes andCore_Components lass
at-egoriesontribute herebyproviding the base of an extensibleframework,that also aptures
how these omponents an potentially interat. The apture of these reurring omponents
and their interations in a generi way within the framework redues theeort required to
reate newsimulatorsand simulations.
1.3.2 Using the PiCSE Framework
ThePiCSEframeworkanbespeialisedbydomainexpertstoarangeofpervasiveomputing
sub-domains. Two experts in separate domains an speialise the PiCSE framework using
PiCSE's reurringinteration patternsto reate simulators for their respetivesub-domains,
andthatthese simulatorsan themselves be provided intheformofframeworksthatan be
furtherspeialised where appropriate. Furthermore, simulated and emulated elementsof the
respetive sub-domainsan exist andinterat within the same simulated spaeifdesired.
1.4 The Thesis
Domain-spei simulators address partiular appliation domains suh as wireless sensor
networking or ontext-aware omputing and these play an important role in the evaluation
of individual appliation areas. However, their onstrained and inexible arhitetures do
not meet the modelling and evaluation requirements of large-sale, heterogeneous pervasive
omputing appliations so there remains a signiant open researh hallenge in this area,
whihisto investigate whetheragenerisimulator an be developed thatanmodelabroad
range of existing pervasive appliations aswell as new appliations that may emerge in the
This thesis addresses this open researh hallenge. PiCSE's framework-driven approah
and lass ategory implementations will be shown to be suiently exible and extensible
that users an reate simulators for a broad range of pervasive omputing appliations that
have diverse harateristis, and isanovel ontribution to thestate oftheart inthiseld.
1.4.1 Implementation
Thisframeworkapproah is implemented asaset ofC++ (Stroustrup98 )libraries, that are
grouped into three separatelassategories. Thesimulation engine underlying thesystemis
builtuponanexistingevent-basedsimulator,Simpak(Fishwik95),whihhasbeenextended
usingamulti-threadapproahtoseamlesslyandexiblymanagemultipleheterogeneous
emu-latedappliationsandsimulatedhardwareomponents. Furthermore,theenginesupportsthe
interationofboththesesimulatedhardwareomponentsandemulatedappliations, enabling
realistiinputand outputhannelsto be reatedfor theemulatedappliations. Appliations
that interat diretly with an underlying operating system via system alls or alternatively
thatarebuilt upon middleware an be modelled.
1.4.2 Evaluation
Three instantiations of the frameworkwerereated to validate thehypothesisof thethesis's
framework-drivenapproah. IntherstSoial-SensingSenario,anevent-basedmiddlewareis
emulated. Appliations that arebuilt upon that middleware thenexhange messages whilst
moving around a onstrained physial spae. In the seond Car-Hardware Emulation
Se-nario, Linux system alls are emulated, and appliation instanes use those systemalls to
interat withsimulated sensors reading data from theenvironment. The third and nal
In-telligent TransportationSystems Senario models vehiular tra in partof Dublin, Ireland
anddemonstratesthesimulator'ssupportforlarge-salesimulations, aomplexenvironment,
1.4.3 Thesis Roadmap
Theremaininghaptersof thisthesisprovideadetailed desriptionofthePiCSE framework,
its ontribution to the state of the art and an evaluation of the work. Chapter 2 provides
an examination of the state of the art in simulators and emulators for pervasive omputing
andrelated domains. Chapter 3desribes theframework,its arhiteture and design and an
additionalsetionwithinthathapteralsodesribestheframework'ssupportfortheemulation
ofappliations. Chapter4 examinestheimplementation and featuresofthekey omponents
supportedinmore detail. An evaluationof thethesisand itsontributions is doumentedin
Chapter5 andthe onlusionsarepresentedinChapter 6.
1.5 Summary
Thishapteroutlinesthemotivationfor,approah,andontributionofthethesis-thedesign
of a framework that an be speialised to reate simulations of pervasive omputing
senar-ios. An introdution to the area of pervasive omputing is presented to dene the sope of
thethesis. The work isthen motivatedbyexamining theurrent methodologies for
evaluat-ing pervasive omputing senarios and identifying a set of open hallenges. An overview of
PiCSE's framework-based approah is thenprovided before the ontribution of the thesis is
Related Work
2.1 Introdution
The use of simulation as a valid methodology for themodelling and evaluation of pervasive
omputingappliationshasbeen established, andthreeorehallenges,exibility,
extensibil-ity,andreusability have been identied thatmustbeaddressedbygenerisimulatorsfor the
broad pervasive omputing domain. This thesis desribes a modular generi and extensible
approah that enables the simulation of a broad range of existing pervasive omputing
ap-pliations as well as new appliations that may emerge in the future. The objetive of this
hapteristo examineestablishedandpriorworksinthisareathathaveattemptedto address
these researh hallenges. In doing so, the strengths and weakness of these approahes are
identied and these will be used to derive requirements for the proposed framework-driven
approah thatforms theontribution to this thesis.
In this hapter, an overview is provided of the many simulators in this eld; examining
both generi pervasive omputing simulators that attempt to address the entire domain, as
well as some of the simulators for the many sub-domains of pervasive omputing. What is
established is that there are few truly generi simulators that take a exible and extensible
approah to modelling the pervasiveomputing domain asawhole.
This hapter begins by providing a brief overview of some of the lassial simulation
aset of evaluation riteria are identied by whih thesimulators established inthis state of
the art will be examined. A broad overview of the representative work in this eld is then
provided, before seven of the most well known and ited simulators representing the state
of the art inthis spae arethen examined. The salient pointsand other notable featuresof
eah simulator arenoted, and these simulators aremeasured againstthe evaluation riteria.
Finally, Setion 2.6 takes a step bak and oers a wider view on the issues raised by the
examinationof the simulators. Additional simulatorsareonsidered atthis stage to broaden
theoverallperspetive,andassess alternative approahesandfeaturesthatarenotemployed
bythose examined indetail.
2.2 Model-Based Formalisms and Methodologies
2.2.1 Simulation Formalisms
Simulationisasoftware-orientedmodellingandevaluationmethodologyandisoneofthemost
popular and widely usedwithin the pervasive omputing ommunity today. A simulation is
adesriptionofa system,or atleastofsome ofits omponentsexpressedintermsofasetof
statesand events (Zomaya 96 ). Several simulation formalisms exist (Law00), most notably
thedisreteeventsystemspeiationbutalsothedisretetimesystemspeiation,andthe
dierential equationsystemspeiation formalisms.
The Disrete Event System Speiation
The most popular formalism, the Disrete Event System Speiation, known as DEVS
(Zomaya 96), speies a system in terms of a time base, a set of inputs, outputs, urrent
state, and a set of state transition funtions. An implementation of a DEVSsimulator
typ-ially ontains a time-ordered list of events, often in the form of funtion pointers, a lok,
some state information, a set of funtions for handling events and a loop that advanes the
simulation. As the lok progresses to the time of the next sheduled event, that event is
removed from the event list and any orresponding funtionality to that event is invoked.
andseondly,theeventlistmaybeupdated,wherebyeithermore eventsaresheduledinthe
future or existing future events are anelled. The hallenge in building a suessful model
or simulation of any system is in the implementation of funtionality assoiated with any
proessedevents.
DEVS, as a formalism, an also be extended to parallel and distributed arhitetures
(Fujimoto00 ; Tropper02). Simulations of omplex systems an take a long time on single
sequential mahines, and opportunities to parallelise these simulations an greatly speed up
the exeution of these simulations. The amount of atual gain that an be ahieved in suh
systemsisdeterminedbyanumberoffatorsinludingthespeiationofthelevelofdelity
required and theinter-dependene of anyparallelised datasetsand proesses.
Oneweakness of theDEVSformalism is thatthe approah isnot easily adaptedto
real-time simulations, i.e., simulations thatappearto proeedat thesame speed asthemodelled
behaviourwouldappearintherealworld. IntheDEVSformalism,thesimulation stepsfrom
event to event, andthere isno behaviour modelled or exeutedinbetween those events. As,
suh,thereisnomodellingofthepassingoftime inbetweenthoseevents, andthesimulation
usually ompletes as quikly as possible. Simulators built using the Disrete Time System
Speiation formalismtake some steps towards addressingthis deieny.
TheDEVSmodelisarguablythemostpopularmodelamongstthesimulationommunity
at the present timeand several onferenes 1
and workshops 2
,both aademi and industrial,
aredediated to solely advaning themodel. There are manypopularDEVSsimulators and
tools thatare pervasiveomputing orientedsuh asns-2 (Fall 01 )and Diasim(Jouve 09). In
addition to that, there are several generi simulation tools and libraries, suh as C-Sim 3
,
JavaSim 4
,and SimPywhihare alsoavailable underopen sourelienses.
The Disrete Time System Speiation
IntheDisreteTime SystemSpeiation (Zomaya 96), asimulation advanes atxed
time-steps,andateahtime-steptheorrespondingmodelledfuntionalityorbehaviourisinvoked.
1
http://www.ss.org/onfern/springsim/springsim09/f p/springsi m09.htm
Animplementationofthis formalismtypiallyontainsalok, somestateinformation,a set
of funtions that model that state information, and a loop that invokes those funtions at
eahxedtime-stepthusadvaningthesimulation. IntheDisreteTimeSystemSpeiation
(DTSS)formalism, allevents ourat thesame logial time and areexeuted inthe order
inwhih theyweresheduled, whereasintheDEVSformalism theevents aretotally ordered
globally.
Real-timesimulations areapartiular variationof the DTSSsimulation formalismwhere
the time steps are synhronised with the time of an entity observing the simulation. In
this ase, the simulation appears to run at what is alled the wall-time. This partiular
variation has many benets, most notably that it appears real froma timing perspetive to
an external observer and is thus suitable for approahes where the observer plays a role in
the simulation. This is often the ase where there is a graphial interfae for the observer
in, for example, a training simulator, or a game. This synhronisation with the real world
introduesa timelinessrequirement of ourse,whihis thatallevents thatmustbeobserved
externallymustbe modelledwithinthattime-step. Thisanintrodue anartiial bound on
thenumber of events that an be simulated given that a simulation is being exeuted on a
deviewitha xednumberof omputingresoures.
2.2.2 Emulation
Analysisof appliation behaviour isan important part ofthe evaluationof apervasive
om-putingsenarioandisaddressedbynumerousemulators(Girod04a ;Sobeih05 ). Anemulator
an be dened asa systemthatimplements thebehaviour of anoriginal system, i.e., athird
systemannot dierentiate between the behaviour of the original and the emulated system.
Howeverduetosystemresouresandfatorssuhastherun-timeinterpretationofinstrution
sets, there may be dierenes in the speed at whih the emulated appliation runs, usually
slower. Unlikeasimulationwhihattemptstomodelthestate ofasystem,anemulator's
em-phasisison realistiallymodellingtheinteration between thesystemandan external party,
anappliation inthis ase. Emulators allowappliationsto be exeutedasiftheywere
meet within the overall modelling and evaluation of pervasive omputing senarios. This is
important as it allows developers to bypass some of the problems inurred whilst bridging
the gap between a simulatedalgorithm and areal appliation. Theatof implementing and
evaluatingode twie(Nishikawa 06),onefor the simulation and onefor theatual
imple-mentation,istimeonsumingandthetranslationfromalgorithmtoappliationanintrodue
dierenes inappliation behaviour. Emulation addresses this problem byproviding a
simu-lationplatformfor theevaluationofappliation odebut requiresthatthetarget platformis
realistially modelled.
Therearevarious approahestoemulatingomputerprogramsbut theseanbesplitinto
either hardware- or software-level emulation and the approah that is hosen is usually
de-pendenton the interfaesuponwhih theemulated program isbuilt. For example,when the
emulated appliation is programmedsothat itinterats diretlywiththehardware, perhaps
addressing hardware suh asmemory, then a hardware emulation tehnique suh as binary
translation an be used. This involves the interpretation and translation of mahine
in-strutionsfrom theiroriginal forminto instrutions thatthehost platforman interpretand
exeute. The hardware-level approah is also used when the aspet of the program under
evaluation is dependent on the hardware being used. For example, within wireless sensor
networks, evaluatingtheperformaneofasensormotean be dependent onthebehaviourof
the CPU or theradio.
Forprogramsthatdonotaddresshardwarebut perhapsareimplementedatahigher
logi-allayer,forexample,appliationsthatarebuiltuponsystemalls,thensoftwareemulationis
moretypiallyused. Inthisase,aompatibilitylayermustbedesribedthatprovidesa
map-pingfromtheoriginalsystemallstosystemallsonthehostplatform. Forexample,
transla-tionsoftwareimplementationssuhasWine(Win07 )andWABI(Sun Mirosystems 96)both
employthistehnique,e.g.,allowing Windowsprogramstorununmodiedonx86UNIXand
Solaris SPARC mahines respetively. The TOSSIM (Levis 03 ) and EMTOS (Girod04b )
emulators, bothemulatingTinyOS (Hill00)appliations,implementthetraditional
software-level emulation by interepting and redireting funtion alls when the program is being
systemthatprovidesallof therequired funtionalityoftheatualoperatingsystembut that
an interat with the emulator. Using this approah, there is no need to interept funtions
duringtheexeution ofthe program.
It should be notedthat some oftherelated worksexamined inthis hapter usetheterm
simulation when the term emulation would stritly be more aurate. TOSSIM, a TinyOS
emulator is an example of suh an instane, and these instanes are noted throughout the
thesiswhenthey our.
2.2.3 Alternative Software-Based Methodologies
There are several software-based approahes that ould be adopted here inaddressing these
hallenges but these areinadequate in meeting the broad hallenges identied in hapter 1.
Forexample,oneapproahwouldbetobuildasuper-simulator,anall-in-onesimulatorofthe
entire pervasive omputingarea. However, inorder to build this type of simulator, it would
requirealevelof domainexpertiseinallof thesub-domainsinorderto implement modelsof
alltherequiredelementsandwouldnotneessarilysupportareasofpervasiveomputingthat
areyet to emerge. Simulators thatlaim to be general pervasive omputing simulatorssuh
asUbiWise(JohnJ. Barton 03)ommonlyonlymodelasubsetoftheompletesetofaspets
ofthe domain. Anyapproah thatdoesnot expresslyinorporateexibilityandextensibility
into its initial design and arhiteture isnot well positioned to be adapted to the hallenges
ofmodelling overlapping andemerging new domainswithinpervasive omputing.
A seond alternative approah is the modiation and integration of existingsimulators.
For example, researhers in aademia and the motor industry have long speulated on the
impatthat theemerging area of vehiular ad-ho networks, might have on vehiular
appli-ationsinludingdriver safetyand vehile oordination (Salim 08 ). There aremany existing
vehileandnetworksimulatorssoanintegrationofoneofeahofthesesimulatortypesshould
be ableto leveragethe independent domain expertise ofboth thevehilesimulation
ommu-nity and the network simulation ommunity, and ould address the modelling needs of the
vehiular ad-ho networking (VANET) ommunity. Depending on the implementation and
of ommon properties suh as the simulated time and the loation of ommon objets. In
a simulated VANET senario (Mangharam 06), the ommon objets, the vehiles and their
network interfaes have thesame loation whih mustbe synhronised within therespetive
vehileand network simulators.
Clearly this approah an address the hallenge of modelling overlapping domains, but
until standardised API's are agreed upon for all simulators, this an only be ahieved on a
bespoke basis. At present there are no agreed interfaes, and few simulators thatan
inter-operate. The integration of two or more simulators does not address the hallenge of being
able to model new and emerging areas of pervasive omputing, and this approah is only as
extensible asits onstituent simulatorsare. Finally, an integrated approah neessitates the
testerto have the required expertiseineah ofthe simulators thatareto beintegrated.
Inonlusion,building asuper-simulator isnot a viableapproah asitisinherently
on-strained withrespet to futureextensibilitywhilst eorts to integrate independently reated
simulators arelimited by a lakof standardisation and bythe exibility and extensibility of
the onstituent simulators. So what are the alternatives? One approah is to inorporate
exibility,extensibilityandre-usabilityfromthe startandmakethesepriniplesorefeatures
of theadoptedapproah rather than add-onsat the end.
2.3 The Review Criteria
The simulators in this hapter are examined using eight review riteria, of whih abridged
working denitions are provided in table 2.1 and are subsequently expanded. These
rite-ria an be ategorised as follows. Review riteria one to three speially map to the ore
hallengesidentied inhapter1: namelyexibleheterogeneity,extensibilityand reusability.
Review riteria four through eight address spei features that are ommon to pervasive
omputing simulatorsthat merit examination andare inluded inorder to draw out spei
noteworthy features. These riteria an help to identify features of simulators that might
not neessarily addressthe identied ore hallenges but may inuene its arhiteture and
implementation. As will be seen in the following denitions, there is some small overlap in
# ReviewCriteria Denition
RC1 Flexible
Heterogeneity
Examines whether thesimulator supportstheexible
modelling ofmultiple instanes ofpervasive omputing's
ommon omponents.
RC2 Extensibility Examines whether thesimulator isextensible andan be
modied witheaseto supportdierent pervasive omputing
domains.
RC3 Arhiteture
(inl.
Reusability)
An overviewofthe arhiteture from asoftwareengineering
perspetive. Issuesovered heremayoverlap withother
evaluated riteria.
RC4 Appliation
emulation
Examines whether thesimulator supportstheemulation of
appliations thatexist withinthemodelled appliation
domain. RC5 Interation between emulated and simulated omponents
Examines whether theinteration between instantiations of
abstrations andemulatedappliations issupported.
RC6 Network
simulation
Examines thesupportthe simulator provides for network
simulationof bothwired andwireless networks.
RC7 Experimental
support
Examines thesupportthe simulator provides for evaluating
simulations. Thisrelates also to usability.
RC8 External
Interation
Examines whether thesimulator isself-ontained, or whether
itis possible to interat withexternal simulators, serviesor
proesses.
Flexible Heterogeneity
This riteria examines whether the simulator supports the modelling of heterogeneous
fea-tures of pervasiveomputing appliations. Theseheterogeneous featuresmayinlude a
vari-etyofsensorsandotherhardwaredevies,multipleappliationspossiblyrunningondierent
platforms,users,thephysial environment,and otherfeatures, both mobileandstati.
Addi-tionally,the simulatorsarereviewed to determine theirsupportfor theexibleinteration of
these heterogeneous features, afeature that isrequired ifa simulator isto support emergent
and ross-over pervasive omputerappliation domains.
Extensibility
This review riteria examines whether the simulator is extensible by design. Systems are
examined to determine what support exists for the modelling of new emerging appliation
areas of pervasive omputing not yet identied, where these appliation areas an omprise
of both new hardwareand softwareelements.
Arhiteture inluding Reusability
Thethirdreviewexaminesthesystem'sarhiteturefromasoftwareengineeringperspetive.
Issuesoveredhere mayoverlap withotherevaluated riteria. Thereusabilityaspets of the
arhiteture arealso examined in ases where thearhiteture an be used to model several
pervasive omputingdomains.
Appliation Emulation
Thisreviewriteria examineswhatsupportthesystemprovidesfortheemulation of
applia-tions thatwould typiallyexist withinthe modelled appliation domain.
Interation between Simulated and Emulated Components
Thisreviewriteriaexamineswhatsupportisprovided formodellinginterationbetween any
simulated elementsandanyemulated appliationswithintheone appliationdomain. There
Network Simulation
Thisreviewriteria examineswhatsupportthe systemprovidesfor thenetworksimulationof
anynetworked elementswithinthemodelleddomain. Thismayinludebothwiredand
wire-lessnetworks. Thisreview riteria also examines what interfaes areavailable to algorithms
andanyemulated appliationswithin thesimulator.
Experimental support
Thisreviewriteriaexamineswhatsupportthesystemprovidesfortherunning,exeutionand
subsequentevaluationofanymodelledexperiments. Thisouldinludefor examplesripting
support,debugging features, or the abilityto program user behaviour.
External Interation
Thisreviewriteriaexaminesthesystemsabilitytointeratwithexternalsimulators, servies
orproesses. OftensystemsoeranAPItoonnetexternalserviesfordebuggingorsystem
extension. AnyAPI'sthatareprovided to support thisfuntionality areexamined.
Omitted Criteria
Thesimulators underreview ouldalso have evaluated againstriteria suhasperformane,
easeofuse,andauray,however,thenumberofsimulatorsattemptingtoaddressthegeneri
modellingofpervasiveomputingissofew, thattobenhmarktheseagainsteahotherwould
notbeto omparelikewithlike. Theperformaneorease ofuse ofStarBED, adistributed
platformforsimulationannotbeomparedinameaningfulwayagainstUbiWise,asimulator
basedupon a PC-basedgames engine.
Theeldofpervasiveomputingsimulatorsisnotasstronglydevelopedasthatofnetwork
simulation for example, where there are maybe twenty aepted simulators that an all be
runonaloalmahine. Inmaturesimulation eldssuhasthese,theresearhquestionshave
moved on from whether or not itis possible to model some aspet of network behaviour to
Finally,theaurayanddelityofanysimulatorisimportant,andthisisapturedwithin
RC1 for simulated hardware devies, and inRC4 for emulated appliations, and is a theme
whih isarriedthroughout theframeworks implementation and itsevaluation.
2.4 An Overview of Pervasive Computing Simulators
Setion 1.1 in hapter 1 introdued themany overlapping areas of pervasive omputing, all
of whihinvolve dierent tehnologies and havedierent modellingrequirementsyetontain
some ommonalities. For example, smart spaes (Tapia04) are often reative appliations,
driven bysensors suh asdoor ontatswithes embedded within thespae, whih an then
adaptsomeaspetofthespaetoauser'srequirements. Anenvironment-monitoring wireless
sensornetwork (Ji 04)ouldomprise of sensors,perhaps monitoring preipitation,attahed
to wireless nodes that propagate that sensor information to other nodes through an ad-ho
network. ITSsystems(Klein01)typiallyuseembeddedsensorssuhasindutiveloopsinthe
roadnetwork to improve the throughput of thevehilesinthe system. Allof these domains,
and others onsidered, formthebroad overlapping spaethatis pervasiveomputing.
This review of related work intersets several disiplines, as shown in gure 2.1 , some
of whih are subsets of pervasive omputing and some that are independent researh areas
that have some ommonalities with pervasiveomputing. There aremany interpretations of
pervasive omputing, and oasionally simulators that are targeted at pervasive omputing
atuallyonlyaddressasubsetofthearea. Comparedwithanareaofresearhsuhaswireless
sensor networking, there are surprisingly few well-known simulators targeted speially at
theoverallpervasiveomputingarea. Thisismainlyduetoitsbroad denition,andthatfew
researh groupsaddresspervasiveomputing asa ompletespae, insteadpreferringto fous
on speipervasive appliation areas,suh asontext-aware or loation-aware omputing.
Simulatorsfor pervasiveomputingan bebroadlyategorised into twogroups. Therst
groupinludes simulators suh asUbiWise(John J.Barton 03 ), Tatus (O'Neill 05), and the
Lanastersimulator(Morla 04),whiharepervasiveomputingsimulatorsnotaddressingany
partiular sub-domain. UbiWise and Tatus support reating omplex 3-D simulations of a
suhaswirelesssensorsthatmayexistwithinthoseenvironments. Theseondgroupof
simula-torsarethosethataddressspeialisedsubsetsofthepervasiveomputingeld. Forexample,
Siafu (Martin 06a ) is a simulator for ontext-aware omputing appliations. Additionally,
there aremanyinstanes of simulators suh asnetwork simulators (Sundresh 04 ; Sobeih 05)
and agent simulators (North 06; Narendra 05 ) being modied and usedto model subsets of
pervasive omputing.
Infat,ofthemanysimulatorsidentiedingure2.1,onlythoseinsidetheredovallaim
to speially address pervasive omputing, in the broad multi-disiplinary sense that this
thesisonsiders. Thesesevenareperhapsthemostimportantofthesimulatorsonsidered, as
they attemptto addressthe hallengesthat have been identiedfor a exibleand extensible
simulator for pervasive omputing. An additional tensimulators, those insidethe blue oval,
and outsidetheredoval,eitheraddresssubsetsofpervasive omputing, orareintheoverlap
of appliation domainssuh asintelligent transportation systemswithpervasive omputing.
Todate,therehasonlybeenonesimulator developedusing aframeworkforthepervasive
omputing domain. Shibuya applied a framework approah (Shibuya 04 ) to modelling the
spatial aspetsofhumanbehaviourina pervasiveomputing environment. Thefousof this
work was on human interation within these environments, rather than the environments
themselves, however,andthephysial aspetsofthedevies,and appliationsthatmightuse
those devieswithin a pervasive omputing environment were negleted.
2.5 The Key Simulators
..This thesis is onerned with methodologies that are both suitable for the evaluationof a
wide rangeof diversepervasiveomputingsenarios andthatan be extendedtoevaluate new
senarios thatmayemergeinthefuture.... Asseenintheprevioussetion, there have been
numerousworks addressing a subset of the requirements of pervasive omputing simulation,
but few taking a more omplete approah to modelling the domain as a whole. Of these
simulators, sevenarehosen thatoerthemostinteresting andnote-worthyapproahes, and
that are losest in spirit and exeution to a framework-based approah to building exible