Adhoc wireless sensor network unit 5 notes

SeekayAlaisKaruppaia 330 views 86 slides Jun 11, 2024
Slide 1
Slide 1 of 86
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68
Slide 69
69
Slide 70
70
Slide 71
71
Slide 72
72
Slide 73
73
Slide 74
74
Slide 75
75
Slide 76
76
Slide 77
77
Slide 78
78
Slide 79
79
Slide 80
80
Slide 81
81
Slide 82
82
Slide 83
83
Slide 84
84
Slide 85
85
Slide 86
86

About This Presentation

Adhoc Wireless Sensor Networks


Slide Content

UNIT V
SENSOR NETWORK
PLATFORMS AND
TOOLS

Syllabus

Sensor Node Hardware
Sensor node hardware can be grouped into three
categories.
They are
(i) Augmented general-purpose computers
(ii)Dedicated embedded sensor nodes
(iii) System-on-chip (SoC) nodes

Sensor Node Hardware
Augmentedgeneral-purposecomputers
Someexamplesare
(i)Low-powerPCs
(ii)EmbeddedPCs(e.g.,PC104),
(iii)Custom-designedPCs(e.g.SensoriaWINSNG
nodes)
(iv)Personaldigitalassistants(PDAs)
Thesenodesuse
(i)Off-the-shelf(OTS)operatingsystemssuchasWinCE,
Linux,orreal-timeoperatingsystems
(ii)Standardwirelesscommunicationprotocolssuchas
BluetoothorIEEE802.11

Sensor Node Hardware
Characteristics of Nodes
•Relativelyhigherprocessingcapability
•Possibletoaccommodatewidevarietyofsensors
•Availabilityoffullysupportednetworking
protocol,popularprogramminglanguages,
middlewareandotherOTSsoftwareareadvantages
ofplatforms

Sensor Node Hardware
Dedicated embedded sensor nodes
Some examples are
(i) Berkeley mote family
(ii) UCLA Medusa family
(iii) Ember nodes
(iv)MIT μ AMP
Theseplatformsuse
(i)CommercialOTS(COTS)chipsetswithemphasison
smallformfactor
(ii)Lowpowerprocessingandcommunication,andsimple
sensorinterfaces.
(Note:

Sensor Node Hardware
System-on-chip (SoC) nodes:
Some Examples of SoChardware are
(i)Smart dust
(ii)BWRC picoradio node
(iii)PASTA node
•The goal is to find new ways of integrating CMOS, MEMS, and RF
technologies
(i)To build extremely low power and small footprint
sensor nodes
(ii)To provide certain sensing, computation and
communication capabilities.

Operating systems are capable of running many
tasks at the same time –called multitasking
operating system.
Task-basic unit of programming
-made up of actions or steps
Process-a sequence of tasks.
Threads-can have one task running at a time.
Stack -temporary storage memory where variables
are declared , stored and initialized
Sensor Node Hardware

Pre empty scheduling:
the executing process is interrupted in the
middle of execution where high priority one
comes in the queue.
Kernel-provides interface between application
and hardware.
-for memory management, disk
management, process management and task
management
Sensor Node Hardware

–Motesaretiny,self-contained,batterypoweredcomputerswith
radiolinks,whichenablethemtocommunicateandexchangedata
withoneanother,andtoself-organizeintoadhocnetworks
–Motesformthebuildingblocksofwirelesssensornetworks
–TinyOS[TinyOS],component-basedruntimeenvironment,is
designedtoprovidesupportforthesemoteswhichrequire
concurrencyintensiveoperationswhileconstrainedbyminimal
hardwareresources
Berkeley mote

Berkeley mote
•Hardware Platform
–Consists of
omicro-controller with internal
flash program memory
odata SRAM
odata EEPROM
oa set of actuator and sensor
devices, including LEDs
oa low-power transceiver
oan analog photo-sensor
oa digital temperature sensor
oa serial port
oa small coprocessor unit

Berkeley Mote
Berkeley Motes
•The Berkeley motes are a family of embedded
sensor nodes sharing roughly the same
architecture.
•Let us take the MICA mote as an example.

MICA Mote Architecture

•TheMICAmoteshaveatwo-CPUdesign
(i)Themainmicrocontroller(MCU),anAtmel
ATmega103L-Forregularprocessing
(ii)Lesscapablecoprocessorisonlyactivewhen
theMCUisbeingreprogrammed.
ATmega103LMCU:
•Ithasintegrated512KBflashmemoryand4KBof
datamemory.
•Writingsoftwareformotesischallengingwithsmall
memory.
•Thecodeisoptimizedatassemblyleveltokeepcode
footprintsmall.
MICA Mote Architecture

•However, high-level support and software services are
not free.
•only necessary software components are used to
support a particular application to achieve a small
footprint.
•A separate 512 KB flash memory unit is used to hold
data.
•Low-speed serial peripheral interface (SPI) protocol is
used to connect the external memory and MCU
•So the external memory is more suited for storing data
for later batch processing than for storing programs.
MICA Mote Architecture

•The RF communication on MICA motes uses the TR1000 chip set
(from RF Monolithics, Inc.) operating at 916 MHz band.
•With hardware accelerators, it can achieve a maximum of 50 kbps raw
data rate.
•MICA motes implement a 40 kbps transmission rate.
•The transmission power can be digitally adjusted by software through
a potentiometer (Maxim DS1804).
•The maximum transmission range is about 300 feet in open space.
•MICA motes support a 51 pin I/O extension connector
MICA Mote Architecture

•Sensors,actuators,serialI/Oboards,orparallelI/O
boardscanbeconnectedviatheconnector.
•Asensor/actuatorboardcanhostatemperaturesensor,a
lightsensor,anaccelerometer,amagnetometer,a
microphone,andabeeper.
•TheserialI/O(UART)connectionallowsthemoteto
communicatewithaPCinrealtime.
•Theparallelconnectionisprimarilyfordownloading
programstothemote.
MICA Mote Architecture

Power consumption of MICA motes
MICA Mote Architecture

Sensor Network Programming Challenges

Sensor Network Programming Challenges
•Operating systems in traditional programming languages used
to provide
(i)Abstraction for processing
(ii)I/O, networking
(iii)user interaction hardware
•For sensor networks, the application programmers also need
to deal
(i)Message passing
(ii)Event synchronization
(iii)Interrupt handing
(iv)Sensor reading.

An application is typically implemented as a finite state machine
(FSM) that covers all extreme cases:
(i)Unreliable communication channels
(ii)Long delays
(iii)Irregular arrival of messages
(iv)Simultaneous events
Example: Target Tracking Application
Linux operating system with directed diffusion routing, roughly
40% of the code implements the FSM and the glue logic of
interfacing computation and communication
Sensor Network Programming Challenges

Traditional embedded system programming
interface

•For resource-constrained embedded systems with real-time
requirements
•Several mechanisms are used in embedded operating systems
to reduce code size, improve response time, and reduce
energy consumption.
Mechanisms:
1. The necessary parts of the operating system are
deployed with the application.
2.Real-time scheduling allocates resources to more urgent
tasks
Sensor Network Programming Challenges

3.Event-drivenexecutionallowsthesystemtofallinto
low-powersleepmodewhennointerestingevents
needtobeprocessed.
4.Embeddedoperatingsystemstendtoexposemore
hardwarecontrolstotheprogrammerstodirectlyface
devicedriversandschedulingalgorithms,andoptimize
codeattheassemblylevel.
Thisworkwellforsmall,stand-aloneembeddedsystems
Sensor Network Programming Challenges

Thesemechanismsdonotscaleupfortheprogrammingof
sensornetworksfortworeasons.
●Sensornetworksarelarge-scaledistributedsystems,where
programexecutiontakesplaceinamassivenumberof
distributednodes.
Distributedalgorithmsthemselvesarehardtoimplement,
especiallywheninfrastructuresupporthaslimitedresources.
●Asensornetworkshouldbeabletorespondtomultiple
concurrentstimuliatthespeedofchangesofthephysical
phenomenaofinterest.
Sensor Network Programming Challenges

DesignmethodologiesandDesignplatforms:
•Adesignmethodologyimpliesaconceptualmodelfor
programmers,withassociatedtechniquesforproblem
decompositionforthesoftwaredesigners.
•Adesignplatformsupportsadesignmethodologyby
providingdesign-time(precompiletime)languageconstructs
andrestrictions,andrun-time(postcompiletime)execution
services.
•Thereisnosingleuniversaldesignmethodologyforall
applications.
Sensor Network Programming Challenges

Depending on the specific tasks of a sensor network ,the
methodologies may differ.For example,
1.If the network is used for monitoring a small set of phenomena
and the sensor nodes are organized in a simple star topology,
then a client –server software model would be sufficient.
2. If the network is used for monitoring a large area from a
single access point (i.e., the base station), and if there is sensor
readings from a subset of sensor nodes, then a tree structure that
is rooted at the base station is a better choice.
3 . If the network is used for monitoring a moving targets, then
neither the simple client –server model nor the tree organization
is optimal. More sophisticated design methodologies and
platforms are required.
Sensor Network Programming Challenges

Node-Level Software Platforms
•Sensornetworksoftwaredesignsarenode-centric-i.e
Programmersthinkhowanodeshouldbehaveinthe
environment.
•Anode-levelplatformcanbe
(i)Node-centricoperatingsystem-provideshardwareand
networkingabstractionsofasensornodetoprogrammers
(ii)Languageplatform-providesalibraryofcomponentsto
programmers.
•Atypicaloperatingsystemprovidingasetofservices
(i)Filemanagement
(ii)Memoryallocation
(iii)Taskscheduling
(iv)Peripheraldevicedrivers
(v)Networking.

Node-Level Software Platforms
Forembeddedsystemoperatingsystemsmakedifferenttrade-
offswhenprovidingtheseservices(duetolimitedresources).
•Forexample,ifthereisnodynamicmemoryallocationthen
memorymanagementcanbesimplified.
•Ifprioritizationamongtasksiscriticalthenamoreelaborate
priorityschedulingmechanismmaybeadded.
•Therearetworepresentativeexamplesofnode-level
programmingTools
(i)TinyOS
(ii) TinyGALS

Node-Level Software Platforms
Otherrelatedsoftwareplatforms:Eg:MATE
(i)Mate,avirtualmachinefortheBerkeleymotes.
(ii)Mate:definesvirtualmachineinstructionstoabstractthe
operationssuchaspollingsensorsandaccessinginternalstatesare
commontoallsensornetworkapplication.
(iii)Compatibility-Whenanewhardwareplatformisintroduced,
softwarewrittenintheMateinstructionsetdoesnothavetobe
rewritten.

Operating System: TinyOS
CharacteristicsofTinyOS:
•Itsupportsthesensornetworkapplicationsonresource-
constrainedhardwareplatforms,suchastheBerkeleymotes.
•Theapplicationcodehasanextremelysmallfootprint
•Ithasnofilesystem
•Itsupportsonlystaticmemoryallocationandimplementsa
simpletaskmodel
•TinyOSprovidesminimaldeviceandnetworkingabstractions.

Operating System: TinyOS
•Ittakesalanguage-basedapplicationdevelopmentapproach
•Thenecessarypartsoftheoperatingsystemarecompiledwith
theapplication.
•EachTinyOSapplicationisbuiltintotheoperatingsystem.
•TinyOSorganizescomponentsintolayers.
•Thelowerlayer–hardwareandthehigherlayer–application
•TinyOShasauniquecomponentarchitectureandprovidesasa
libraryasetofsystemsoftwarecomponents

Operating System: TinyOS
•Althoughmostcomponentsencapsulatesoftware
functionalities,somearejustthinwrappersaroundhardware.
•Anapplication,typicallydevelopedinthenesClanguage
•Thisnescwiresthesecomponentstogetherwithother
applicationspecificcomponents.

Operating System: TinyOS
•LetusconsideraTinyOSapplicationexample—Field
MonitorApplication
•Allnodesinasensorfieldperiodicallysendtheirtemperature
andphotosensorreadingstoabasestationviaanadhoc
routingmechanism.
•Inthediagram,blocksrepresentTinyOScomponentsand
arrowsrepresentfunctioncallsamongthem.
•Thedirectionsofthearrowsarefromcallerstocallees.

TinyOS-Field Monitor Application

Timer Component and its interfaces

Operating System: TinyOS
•Thetimercomponentisdesignedtoworkwithaclock,
•Thiscomponentisasoftwarewrapperaroundahardware
clockthatgeneratesperiodicinterrupts.
•Anarrowheadpointingintothecomponentisamethodofthe
componentthatothercomponentscancall.
•Anarrowheadpointingoutwardisamethodthatthis
componentrequiresanotherlayercomponenttoprovide.
•Theabsolutedirectionsofthearrows,upordown,illustrate
thiscomponent’srelationshipwithotherlayers.Forexample,

Operating System: TinyOS
•TheTimerdependsonalowerlayerHWClockcomponent.
FunctionofTimer:
•Itcansettherateoftheclock
•TheTimerhasaninit()methodthatinitializesitsinternal
Booleanflag(evenflag)
•TheTimercanbeenabledanddisabledviathestartandstop
calls
•Whenthereisaclockinterrupt,ittogglestheevenFlag
,betweentrue(or1)andfalse(or0).
•Iftheflagis0,theTimerproducesatimer0Fireeventto
triggerothercomponents;otherwise,itproducesatimer1Fire
event.
.

Operating System: TinyOS
•AprogramexecutedinTinyOShastwocontexts
(i)Tasks
(ii)Events
Tasks:
•Theyarecreated(alsocalledposted)bycomponentstoatask
scheduler.
•TheTinyOSschedulermaintainsataskqueueandinvokes
tasksaccordingtotheorderinwhichtheywereposted.
•Tasksalwaysruntocompletionwithoutpreemptingorbeing
preemptedbyothertasks.
•Thustasksarenonpreemptive(noblocking).

Operating System: TinyOS
•Theschedulerinvokesanewtaskfromthetaskqueueonly
whenthecurrenttaskhascompleted.
•Whennotasksareavailableinthetaskqueue,thescheduler
putstheCPUintothesleepmodetosaveenergy.
Events:
•The execution of an interrupt handler is called an event context
•The processing of events also runs to completion, but it can be
preempted by other events.
•Because events always preempt tasks, programmers are
required to chop their code into small execution pieces, so that
it will not block other tasks for too long.

Operating System: TinyOS
•Anexampleofasplit-phaseoperationisthepacketsend
methodintheActiveMessages(AM)component.
•Sendingapacketisalongoperation,involvingconvertingthe
packetstobytes,thentobits,andultimatelydrivingtheRF
circuitstosendthebitsonebyone.
•Withoutasplit-phaseexecution,sendingapacketwillblock
theentiresystemfromreactingtoneweventsforasignificant
periodoftime.
•IntheTinyOSimplementation,thesend()commandintheAM
componentreturnsimmediately.

Operating System: TinyOS
•However,itisthecaller’sresponsibilitytorememberthatthe
packethasnotyetbeensent.
•Whenthepacketisindeedsent,theAMcomponentwillnotify
itscallerbyasendDone()methodcall.
•OnlyatthistimeistheAMcomponentreadytoacceptanother
packet.

Operating System: TinyOS
Advantages:
•TinyOSisextremelylightweight.
•Disallowingdynamicmemoryallocationreducesthememory
managementoverheadandmakesthedatamemoryusage
staticallyanalyzable.
•Thesimpleconcurrencymodelallowshighconcurrencywith
lowthreadmaintenanceoverhead.
•TheentireFieldMonitorsystemtakesonly3KBofspacefor
codeand226bytesfordata.

Operating System: TinyOS
Disadvantages:
•Costismore.
•Manyhardwareunusualfeaturesandcomplexitiesof
concurrencymanagementareleftfortheapplication
programmerstohandle.
•Severaltoolshavebeendevelopedtogiveprogrammers
languagelevelsupportforimprovingprogramming
productivityandcoderobustness.

nesC
•nesCisanextensionofCtosupportthedesignof
TinyOS.
•nesCClassifiedintotwotypes
1.Asynchronouscode(AC):Codethatisreachablefrom
atleastoneinterrupthandler
2.SynchronousCode(SC):Codethatisonlyreachable
fromtask.
•Acomponentspecificationisindependentofthe
componentimplementation.
•Itprovidesasetoflanguageconstructsand
restrictionstoimplementTinyOScomponentsand
applications
.

nesC

ComponentInterface
•InterfaceofnesCcomponentclassifiesas
–ProvidesInterfaces
–Usesinterface
•ProvidesInterface:Asetofmethodcallsexposedto
theupperlayerscomponents
•Usesinterface:Asetofmethodcallshidingtothe
lowerlayercomponents
nesC

ComponentInterface
•nesCdistinguishesthedirectionsoftheinterfacecalls
betweenlayersas
–Eventcalls
–Commandcalls
•EventCall:Methodofcallfrom“Lowerlayer
componenttoHigherlayercomponents”
•CommandCall:Methodcallfrom“Higherlayer
componenttoLowerlayercomponents”
nesC

ComponentImplementations
TwotypesofcomponentsinnesCdependingon
howtheyareimplemented
1.Modules
2.Configurations
1.Modules:Itisimplementedbyapplicationcode(written
inaClikesyntax)askeywordandtheseindicatesevent
triggeringaseventscheduledqueue.
2.Configuration:itiskindofimplementationof
components,byconnectingexistingcomponentslike
timer,Hardwareclock(HWClock)toprovidetimer
servicecalledTimerC
nesC

nesC
Implementation of Timer Component

Contiki OS
Contiki especially for IoT (Internet of Things)

IoTRelated Technologies
1.Embedded systems
2.Embedded System OS (Contiki, Tiny OS,
RIOT)
3.Communication Technologies
4.Sensor Technologies
5.Real Time systems
6.Smart things and technologies
7.Machine-to-Machine comunications
8.Big Data Analytics
Contiki OS

Contiki OS
Contiki is an
•Open source
•Highly portable
•Multi-tasking operating system
Contiki for
•Memory efficient
•Networked embedded systems
•And Wireless sensor networks

Where Contiki Used?
Contiki has been used in variety of projects from
–Road tunnel fire monitoring
–Intrusion detection
–Water monitoring to surveillance networks
Contiki OS

Contiki OS
Contiki Features
•TCP/IP communication with Stack
•Loadable modules
•Event-driven kernel
•Proto threads
•Protocol-independent radio network with the Rime
stack
•Cross-layer network simulation with COOJA
•Networked shell
•Memory efficient flash based file system
•Software-based power profiling

Comparison between
Contiki OS

Programming Languages
Contiki OS

Node Level Simulator
•Itisadesignmethodologieswhichare
associatedwithsimulatorsthatsimulate
behaviorofsensornetworkonper-nodebasis
•GenerallyEngineersordesignerscanquickly
studytheperformanceinterms
–Timing
–Power
–Bandwidthand
–Scalability

•Simulators are consisted by the following models
–Sensor Node Model
–Communication Model
–Physical Environment Model
–Statistics and Visualization
Node Level Simulator

•Sensornodemodel
–Mobilityofnodes
–Energyconsumption
•Communicationmodel
–Capturedetailsofcommunication(RFpropagationdelay,MAC
layeretc.)
•Physicalenvironmentalmodel
–Modelphysicalphenomenainoperatingenvironment
•Statisticsandvisualization
–Collectresultsforanalysis
Node Level Simulator

Timer Concept
•Asensornetworksimulatorsimulatesthe
behaviorofsensornetworkwithrespectto
time
•Inwhich,timemayadvanceindifferways:
cycle-drivenordiscrete-event
Node Level Simulator

Cycle Driven (CD) Simulation
•Acycle-driven(CD)discretizethecontinuousreal
timeinto“ticks”
•Simulatorcomputesphenomenonateachtick.Like:
physicalenvironment,sensingdata,communication
data,etc.
•CommunicationbyRFisassumedtobefinishedina
tick.
•Easytoimplementanduse
•NOTE_-MostCDsimulatorsissuearedetecting
anddealingcycledependenciesamongnodes(ex
RF)oralgorithms(exThreads)
Node Level Simulator

Discrete –Event (DE) Simulations
•Discrete-event(DE)simulatorassumesthetimeis
continuous.
•UsuallyuseaGlobaleventqueuetostoreevents.
•AlleventsarestoredchronologicallyintheGlobal
eventqueue.
Node Level Simulator

Cycle Driven and Discrete Event Simulation
Node Level Simulator

Comparisonb/wCDandDE
•DEsimulatorsareconsideredasbetterthanCD
simulators,becausetheyaremoreactual,butthey’re
morecomplextodesignandimplement.
•MostpopularsensornetworksimulatorsareDE
simulators,like
–TOSSIM
–NS2.
Node Level Simulator

NS2 Simulator
•Apackageoftoolsthatsimulatesbehaviorofnetworks
•Oneofthemostpopularsimulatoramongnetworking
researchers
–Freeopensource
•Discreteeventsimulatortargetedatnetworking
researchandeducation
–Protocoldesign,TrafficStudies,etc.
–Wiredandwirelessnetworks
•BackendisinC++andfrontendisoTcl
Node Level Simulator

NS2 with Sensor Networks Extension
Ns2wasmeanttobewirednetworksimulator,so
extensionsarebeingmadeforwireless(802.11,TDMA,
MAC)andmorerecentsensornetworks.
Node Level Simulator

NS2withSensorNetworksExtension
•Itsupportslogicaladdressforeachnode
•Itintroducesthenotionofnodeslocationsandchannel
model
•Thisisnottrivialextension,sinceoncethenodemove,
thesimulatorneedtocheckforeachphysicallayer
evenwhetherthedestinationnodeiswithinthe
communicationrange
Node Level Simulator

NS2 with Sensor Networks Extension
•TwoEffortsinNS2toextendsensorn/w
1.SensorSim
2.NRLsensornetworkextension
•SensorSim:Providinganenergymodelforsensor
nodeandcommunication,sothatpowerpropertiescan
besimulated,alsosupporthybridsimulationsi.e.,in
realapplicationssupportandexecutegroupofnodes
together
•NRLSensorNetworkextension:Physicalphenomena
aremodeledasn/wandcommunicatethroughphysical
layers
Node Level Simulator

NS2 simulator
Protocol supported
•802.3 z 802.11
•TDMA
•Ad hoc routing (such as DSDV and AODV)
•Sensor network routing (such as Direct diffusion,
Geographical routing(GEAR), Geographical adaptive
fedility(GAF))
Node Level Simulator

TOSSIM
•WhichisdedicatedtoTinyOSapplicationstorunning
ononeormoreBerkeleyMotes.
•ThekeydesigndecisionsonbuildingTOSSIMwereto
makeitscalablen/wwithpotentiallythousandsof
nodesandabletouseactuals/wcodeinsimulation
Node Level Simulator

TOSSIM
•EventDrivenModel:Inthisexecutionmodel
ofTinyOSgreatlysimplifiesthedesignof
TOSSIM,byreplacingafewlow-level
components,suchas
–ADCconverter
–Systemclock
–Radiofrontend
•AlltheseTOSSIMtranslateshardware
interruptsinto“Discrete-eventsimulatorevents”
Node Level Simulator

TOSSIM
TinyViz:
•ItisaTOSSIMvisualizationpackagewhichisaJAVA
applicationsthatcanconnecttoTOSSIMsimulation
•Itprovides“Mechanismtocontrolarunningsimulationby
followings
–ModifyingADCreadings
–Changingchannelproperties
–Injectingpacketsforpreventingmessagefromsecurity
issues
•Withsomevisualizationpacket,theTinyViz.Resultcanbe
plotinsomemoreunderstandablegraphs
Node Level Simulator

COOJA IS EMULATOR
Accordingtodifferentsources,itisanemulator
Ahardwareorsoftwaresystemthatenablesonecomputer
system(calledashost)tobehavelikeanothercomputer
system(calledasguest):
e.g.COOJAenablingyourlaptoptobehavelikeaZ1
mote.
asystemthattypicallyenablesthehostsystemtorun
softwareoruseperipheraldevicesdesignedfortheguest
system:
e.g.CoojaenablingyourlaptoptoruntheRPLprotocol,

CoojaisaContikinetworkemulator
AnextensibleJava-basedsimulatorcapableofemulating
T-mote,Sky(andother)nodes
Thecodetobeexecutedbythenodeistheexactsame
firmwareyoumayuploadtophysicalnodes
Allowslargeandsmallnetworksofmotestobesimulated
Motescanbeemulatedatthehardwarelevel
Slowerbutallowsforpreciseinspectionofsystem
behavior
Motescanalsobeemulatedatalessdetailedlevel
COOJA IS EMULATOR

State-CentricProgramming
Applicationsthatisn’tjustsimplygeneric
distributedprogramsoveranadhocnetwork.We
havetocentralizedataintonodes.
EX:targettracking.
83

State-CentricProgramming
Def:
X: state of asystem
U:inputs
Y:outputs
K: updateindex
F: state updatefunction
G: output observationfunction
84

State-CentricProgramming
X
k+1 = F( X
k, U
k )
Y
k = G( X
k , U
k)
In state-centric programming, X and K come
from many nodes. So many issue are discussed.
85

END OF UNIT 5
Tags