What - PowerPoint PPT Presentation

About This Presentation
Title:

What

Description:

What s New with Tiny Devices David Culler U.C. Berkeley Endeavour MiniRetreat 1/9/2001 – PowerPoint PPT presentation

Number of Views:56
Avg rating:3.0/5.0
Slides: 28
Provided by: Davi1358
Category:

less

Transcript and Presenter's Notes

Title: What


1
Whats New with Tiny Devices
  • David Culler
  • U.C. Berkeley
  • Endeavour MiniRetreat
  • 1/9/2001

2
Ready for Prime Time
  • Hardware Platform suited for Experimentation
  • TinyOS well exercised and ready for release
  • Several Exciting Studies digging in deeper
  • Time for applications and serious tools

3
Rene wireless networked sensor platform
  • 1 x 1.5 motherboard
  • ATMEL 4Mhz, 8bit MCU, 512 bytes RAM, 8K pgm flash
  • 900Mhz Radio (RF Monolithics) 10-100 ft. range
  • ATMEL network pgming assist
  • Radio Signal strength control and sensing
  • I2C EPROM (logging)
  • Base-station ready
  • stackable expansion connector (all ports, i2c,
    pwr, clock)

4
Renesimple sensor card proto
  • 1 x 1.5sensorboard
  • Stackable connector
  • Thermistor (temp, analog)
  • Proto
  • Breadboard area

5
Rene motion sensor card
  • 1 x 1.5 sensorboard
  • Accelerometers
  • Magnetrometers
  • Humidity, light, temp, sound,

6
Laptop lab kit
Parallel Port for programming
serial Port for base station
Sensor stacks on central connector
7
Lab analysis board
  • Logical analyzer connectors
  • Serial port
  • Device bay

8
Power Breakdown
Active Idle Sleep
CPU 5 mA 2 mA 5 µA
Radio 7 mA (TX) 4.5 mA (RX) 5 µA
EE-Prom 3 mA 0 0
LEDs 4 mA 0 0
Photo Diode 200 µA 0 0
Temperature 200 µA 0 0
  • But what does this mean?
  • Lithium Battery runs for 35 hours at peak load
    and years at minimum load!
  • Thats three orders of magnitude difference!
  • A one byte transmission uses the same energy as
    approx 11000 cycles of computation.
  • Idleness is not enough, sleep!

9
TinyOS
  • Extremely small code data
  • Address two appln behavior modes
  • Bursts of high concurrency (multiple streams)
  • Long periods of no important activity
  • Efficient fine-grain multithreading
  • Bit-by-bit processing in software
  • hard real-time requirements
  • Percolate events through multiple levels
  • Power control on every interface
  • Shut it all down when idle
  • Simple two-level scheduler
  • Modularity for robustness specialization

10
TinyOS Program Structure
  • Application graph of components schedule

sensing application
application
Routing Layer
routing
Messaging Layer
messaging
packet
Radio byte
Temp
UART byte
byte
photo
SW
HW
RFM
i2c
ADC
bit
clocks
11
Application Demo
Code size for ad hoc networking application
Scheduler 144 Bytes code Totals 3430 Bytes
code 226 Bytes data
12
Program Representation component
  • Component foo.comp foo.c
  • .comp defines interface
  • Commands it accepts
  • Events it signals
  • Commands it uses
  • Events it handler
  • .c file is the implementation
  • TOS_COMMAND - interface
  • TOS_SIGNAL_EVENT
  • TOS_CALL_COMMAND
  • TOS_EVENT
  • TOS_FRAME - internal state
  • TOS_TASK - internal concurrency
  • TOS_POST_TASK
  • Only refer to internal and interface names
  • All commands/events may return No

13
Example Component
  • //AM.comp//
  • TOS_MODULE AM
  • ACCEPTS
  • char AM_SEND_MSG(char addr, char type,
    char data)
  • void AM_POWER(char mode)
  • char AM_INIT()
  • SIGNALS
  • char AM_MSG_REC(char type, char
    data)
  • char AM_MSG_SEND_DONE(char success)
  • HANDLES
  • char AM_TX_PACKET_DONE(char success)
  • char AM_RX_PACKET_DONE(char packet)
  • USES
  • char AM_SUB_TX_PACKET(char data)
  • void AM_SUB_POWER(char mode)
  • char AM_SUB_INIT()

AM_SEND_MSG
AM_INIT
AM_POWER
AM_MSG_SEND_DONE
AM_MSG_REC
Messaging Component
Internal State
Internal Tasks
AM_SUB_POWER
AM_TX_PACKET_DONE
AM_SUB_TX_PACKET
AM_RX_PACKET_DONE
AM_SUB_INIT
Commands
Events
14
Component graph
  • Application described by .desc file
  • List of components
  • wiring on interface ports
  • Including dispatch ports
  • Active message demux
  • ADC (shared resource) demux
  • May name connections or not
  • Descriptions may be hierarchical
  • Tools translate names across component interfaces
  • Structured wiring gt optimize across component
    boundaries
  • Can interpose or exchange components

15
Example description
include modules MAIN CHIRP GENERIC_COMM
PHOTO CLOCK LEDS MAINMAIN_SUB_INIT
CHIRPCHIRP_INIT MAINMAIN_SUB_SEND_MSG
DUMMYvSTART CHIRPCHIRP_START DUMMYvSTART CHIR
PCHIRP_CLOCK_INIT CLOCKCLOCK_INIT CHIRPCHIRP_CL
OCK_EVENT CLOCKCLOCK_FIRE_EVENT CHIRPCHIRP_SUB
_SEND_MSG GENERIC_COMMGENERIC_COMM_SEND_MSG
CHIRPCHIRP_SUB_MSG_SEND_DONE GENERIC_COMMGENERI
C_COMM_MSG_SEND_DONE
16
Example (cont)
TOS_MODULE GENERIC_COMM IMPLEMENTED_BY
GENERIC_COMM ACCEPTS char
GENERIC_COMM_INIT() void
GENERIC_COMM_POWER(char mode) char
GENERIC_COMM_SEND_MSG(char addr, char type,
char data) SIGNALS char
GENERIC_COMM_MSG_REC(char type, char data)
char GENERIC_COMM_MSG_SEND_DONE(char
success)
GENERIC_COMM.desc include modules AM
RED_PACKETOBJ FOUR_B_RADIO_BYTE RFM .
17
Real time operating systems
  • QNX context switch 2400 cycles on x86
  • pOSEK context switch gt 40 µs
  • Creem -gt no preemption

18
Thoughts about robust Algorithms
  • Active Dynamic Route Determination
  • When route_beacon handler fires with M(hops) lt
    hops
  • UP M(source) hops M(hops) M(source)
    self send
  • Periodically increase hops
  • Radio cell structure very unpredictable
  • Builds and maintains good breadth-first forest
  • Each node only records own state and parent(s)
  • Fundamental operation pruning retransmission
  • Monotonic variables
  • Message signature caches
  • Exercise no beacons, just piggyback on data

19
Low-Power Listening (J. Hill)
  • Costs about as much to listen as to xmit, even
    when nothing is received
  • Only way to save power is to turn radio off when
    there is nothing to hear.
  • Can turn radio on/of in about 1 bit
  • Can detect transmission at cost of 2 bit times
  • Small sub-msg recv sampling
  • Application-level synchronization rendezvous to
    determine when to sample

sleep
preamble
message
Xmit Recv
b
Optimal Preamble (2/3 Sxb)1/2
20
Packet Encoding / Layers
  • Radio requires rough DC balance
  • No more than three ones between zeros
  • Manchester encoding
  • 4b/6b
  • Bit error rate significant and increases with
    distance
  • CRC, 3-redundant
  • or SECDED with DC-balanced coding

Radio byte components
Radio packet components
21
Channel Utilization (A. Woo)
  • Per-cell channel utilization important near base
  • MAC studies revealed subtle TinyOS jitter bug
  • Simple CSMA algorithm proved effective
  • Listen random delay (16 bit LFB SR)
  • On busy, wait till idle
  1. Aggregate Util
  2. Detected collisions
  3. Fraction of attempted BW delivered

22
Bandwidth Management
  • Hidden nodes between each pair of levels
  • CSMA is not enough
  • RTS/CTS acks too costly (power BW)
  • Pmsg-to-base drops rapidly with hops
  • Investment in packet increases with distance
  • Local rate control to approx. fairness
  • Priority to forwarding, adjust own data rate
  • Additive increase, multiplicative decrease
  • Listen for retransmission as ack
  • ½ of packets get through 4 levels out

23
Proximity / Location detection
  • Signal strength sensing
  • Circuit works, falls off cleanly in good
    environment
  • Incredibly sensitive to obstructions!
  • Error rates a useful proximity metric
  • Bit errors vs. packet errors
  • Klemmer,Waterson, Whitehouse study gt signal
    strength Kalman filter provides good position
    detection

24
Authentication / Security (Szewczyk, et al)
  • mote lt-gt basestation authentication and
    confidentiality
  • stream cipher RC5 encryption gt no extra bits
    transmitted on encryped data
  • 8 byte MAC, based on RC5
  • authenticated basestation broadcast based on
    TESLA
  • protocol based on delayed key disclosure and time
    synch.
  • distribute routing beacons using authenticated
    broadcast gt authenticated routing
  • additional protocols to guarantee freshness
  • Implementation of above consumes about 1/3 of the
    mote resources (code space, RAM, processing)
  • Shared key cryptography based on RC5
  • public key cryptography is much too expensive
  • heavy code reuse - RC5 used for a variety of
    tasks
  • a key shared between mote and basestation
    programmed into the mote at initial programming
    time
  • first computationally expensive application on
    the motes

25
Application-Specific Virtual Machine
  • Small byte-code interpreter component
  • Code, static data, stack
  • Accepts clock-event capsules
  • Other events too
  • Hides split-phase operations below interpreter
  • HW collection of components defines space of
    applications
  • Allows very efficient coding within this space
  • Capsules define specific query / logic

26
Application Deployment
http//nighthawk.cs. berkeley.edu8080/tracking
  • Light sensing location inference based on
    landmarks
  • 16 motes deployed on 4th floor Soda Hall
  • 10 round motes as office landmarks
  • 2 base stations around corners of the building
  • 4 Rene motes as active badges for location
    tracking
  • AA batteries (3 weeks)
  • Tracking precision /- one office

27
Open Projects / Problems
  • Ambient-power devices
  • Debugging
  • Many-mote simulator
  • Logging component trace analysis
  • Message fragmentation
  • Query processing
  • Visualization
  • Static critcal-path, jitter analysis
  • REAL APPLICATIONS
Write a Comment
User Comments (0)
About PowerShow.com