Class Note for CMPSCI 677at UMass(2)
Class Note for CMPSCI 677at UMass(2)
Popular in Course
Popular in Department
This 18 page Class Notes was uploaded by an elite notetaker on Friday February 6, 2015. The Class Notes belongs to a course at University of Massachusetts taught by a professor in Fall. Since its upload, it has received 16 views.
Reviews for Class Note for CMPSCI 677at UMass(2)
Report this Material
What is Karma?
Karma is the currency of StudySoup.
Date Created: 02/06/15
Wireless Sensor Networks CMPSCI 677 51007 Peter Desnoyers Wireless Sensor Networks This lecture will answer What are building blocks of a WSN What is a WSN used for Structure Hardware platforms motes Sensing applications Canonical problems Examples Operating systems WSN Platforms What are the differences between WSN platforms and typical computers Battery power Goal maximum system lifetime with no rechargereplacement Lowpower radios for communication 10200kbitsec Small CPUs Eg 8bit 4k RAM Flash storage Sensors Battery Power Example Mica2 mote Total battery capacity 2500mAH 2 AA cells System consumption 25 mA CPU and radio on Lifetime 100 hours 4 days Alternatives Bigger batteries Solarwind energy harvesting Duty cycling Low Power Radios ISM band 430 900 or 2400 MHz Varying modulation and protocol 7 Custom Fem e MlCaZ 20 kbltS r Bluetootn if i e Zigbee80215 4 r 200kbit5ec Short range a l 7 Typically lt100 meters Low power Eg Chipcon CC2420 e 947 mA transmit depending on output level 7 19 mA receive Listening can take more energy than transmitting 7 J Small CPUs ExampleAtmelAVR r m l 39 l Mum Eg 4 KB RAM v quot 39 l e 128 KB codeflasn Jl r 2MlPS8MHZ t e 8 rnA quotMill l Example Tl MSP430 m 13 Eg m Higherrpowered processors 7 48 KB code flash ARM7 Yale XYZ platform 7 2 mA 32 bits 50 MHZ gtgt1MB RAM ARMS Stareate others 32 bit 400 MHLgtgt16MB RAM Flash Storage Serial NOR flash Raw ash Small serial NOR very low power NAND Pageatatime write No overwrite without erasing Divided into pages and erase blocks Typical values 5128 pages 32 pages in erase block Garbage collection needed to gather free pages for erasing NAND Removable flash media Cooked ash Disklike interface 51 ZB rewritable blocks Very convenient Higher power consumption Sensors Temperature Humidity Magnetometer Vibration Acoustic Light Motion eg passive IR Imaging cameras Ultrasonic ranging GPS Lots of others Sensor Applications Data driven Distributed computation not communication network Homogeneous All sensors typically participate in the same applications Typical architecture data collection fusion and transport Sensor Patch Sensor Node Client Data Browsing and Processin Internet O Data Service llJ Canonical WSN Problems Localization Time Synchronization Routing Duty cycled networking Data aggregation LocaHza on Determining relative or absolute location of a sensor gt Sol utio ns Base Station G u Base Station 3 Ranging and triangulation Radio strength RSSI RF timeof flight interferometry Base Station 2 Acoustic timeof flight Directional triangulation Acoustic phase measurement Problems in Localization GPS is expensive sometimes difficult to use and power Pam39m hungry w Requires lineofsight to 3 or 4 satellites overhead 80mA for 15 minutes to acquire fix Radio ranging is not accurate Distal Acoustic ranging is limited Range Applications Sensitivity to errors Robust triangulation is hard Time Synchronization Applications Event detection by arrival time Eg gunshot triangulation Duty cycling synchronization External reference GPSWWV Autonomous synchronization Receiverreceiver Senderreceiver Drift estimation Autonomous Synchronization Idea Sample time atA Transmit to B A T A B TATOSTmaC Issues39 Tpr pTrx B receives TA at TAA Software delays TtX TFX Channel acquisition Tmac Propagation delay Tprop Clock drift Quartz crystal 50 ppm 50uSs 180mshr Varies with eg temperature Synchronization methods Receiverreceiver Eliminate transmit uncertainty Senderreceiver Reduce transmit uncertainty TA TB l Trx TB TATprop App P Network A Drift estimation stack Estimate and correct quot Tii ml T A L t mpl E Routing App Network stack l L t mpl Q What addresses make sense in a sensor network Location Data Geographic routing GPSR Beacon routing Flooding tree construction Data collection architectures GPSR forward to node physically closest to destination More Routing How to handle duty cycling O q Sleep or go around 0am Sleeping Wireless vs wired O 0 More Routing Network lifetime More packets more battery drain 1 packets gt DEE O 4 packets Duty Cycled Networking Problem continuous listening is too expensive Solution listen periodically listen Lowpower Rx I l l listening TX k preamble data Synchronized lowpower listening TX k preamble data Example Directed Diffusion Name data not nodes use A sensor eld physicality Sensors publish event notifications and users subscribe to specific types optimize path with gradientbased feedback Opportunistic innetwork aggregation and nested queries Source 2 Lia r Directed quot Diffusion Sensor sink Directed Diffusion Expressing an Interest 7 Using attribtitervaiue pairs E g i Uses publishsubscribe e inquirer expresses an interest Using attribute vaiues e Sensorsources that can sewice i39epinith data Gradientbased Routing inquirer5inilt broadcasts expioratory interest i1 7 iiitended El diseuver i utes between suuree and sink Neighbors update interestrcache and forwards i1 gt WWR WS 9mm Gradient form set up to upstream neighbor 7 ND snuree mules e Gradienti a weighted reverse iink 7 Law gradient 9 Few packets per unittime L w needed Bldlre mnal gemmls established an all lmks through uudmg Examples TinyDB TinySQL SELECT ltaggregatesgt ltattributesgt FROM sensors ltbuffergt WHERE ltpredicatesgt GROUP BY ltexprsgt SAMPLE PERIOD ltconstgt ONCE INTO ltbuffergt TRIGGER ACTION ltcommandgt Data Model Entire sensor network as one single in nitelylong logical table sensors Columns consist of all the attributes defined in the network Typical attributes Sensor readings Metadata node id location etc Internal states routing tree parent timestamp queue length etc Nodes return NULL for unknown attributes On server all attributes are de ned in catalogxml Acquisitional Query Processing What s really new amp different about databases on motebased sensor networks This paper s answer Long running queries on physically embedded devices that control when and where and with what frequency data is collected Versus traditional DBMS where data is provided a priori For a distributed embedded sensing environment ACQP provides a framework for addressing issues of When where and how often data is sensedsampled Which data is delivered PRESTO Modeldriven Push Insight Models are expensive to PRESTO Pr xy create but simple to check Modeling amp Data which can be predicted does not need to be reported Push if sensor value exceeds or39 is less than predicted value by 6 gt Sensor Data ModelCheck Data Arch W PRESTO Sensor Data Management Skip this one Operating Systems What features does an operating system need Unix TinyOS 808 Hardware drivers system init Yes Yes Yes Loadable programs Yes No Yes File system Yes N0 N0 Resource allocation eg memory Yes No Yes Processes threads Yes No Sort of Networking support Yes Yes Yes IPC Yes Yes Yes Event scheduling timers Yes Yes Yes TinyOS amp nesC Concepts New Language nesC Basic unit of code Component Component Process Commands used for splitphase Throws Events Has a Frame for storing local state Uses Tasks for concurrency Components provide interfaces Used by other components to communicate with this component Components are Wired to each other in a configuration to connect them Application Graph of Components RFM C 9 N 2 3 Route map router sensor appln 2 ll l LL v v Active Messages 0 ll ll 0 w Radlo Packet erIaI Packet Temp photo 5W C quot ill ll M V V Radio byte UART ADC HW clocks TinyOS Code Structure YmutiRead Return OK post A A runs sometime 4 Flash read gt If bytes remain post A Else Flash readDone Microkernel architecture signal YmutiReadDone YmutiReadDone v SOS Userspace kernelspace separation Supports dynamic runtime addition of modules Memory protection possible between module amp kernel space Each application has one or more modules V thin a module interaction uses regular function calls Modules interact by passing messages Modules can retain state allocate deallocate memory Module 1 Module 2 Modulespace Microkernel Kernelspace Modules 808 vs TinyOS module Provider static modiheaderit modiheader SOSMODULE7HEADER provides interface StdControl provides interface X 39modi39d DFLLAPPJDO39 state75ize Sizeofappistate7t uses interface Z mumitimers 0 numisubifunc 0 implementation numiprovifunc 0 platformitype HW7TYPE c code processoritype MCU7TYPE codeiid ehtonsDFLTAPPIDO moduleihandler testimsgihandler TinyOS compiletime SOS runtime SOS Protothreads Threading implemented as macros include quotpthquot struct pt pt PTTHREADexampestruct pt pt PTBEGINpt whie1 ifinitiate7io timerstartamptimer PTWAITUNTILpt ioicompletedO timerexpiredamptimer readidataO PTENDpt Wrapu p What did we talk about Energy management Esp dutycycled radios Routing By naming and finding information or locations nnetwork processing Aggregation tinyDB Model checking PRESTO Light weight operating systems