tinyos radio stacks joe polastre, phil buonadonna, etc monday, october 20 2003

28
TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

Upload: jordan-holmes

Post on 10-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

TinyOS Radio Stacks

Joe Polastre, Phil Buonadonna, etc

Monday, October 20 2003

Page 2: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

Radio Stacks

Mica (Old) Mica (MicaHighSpeedRadio) Mica2 (CC1000) Future?

Page 3: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

Typical Radio Stack

Generic Comm

AM

Packet Layer

Byte Layer

Bit Layer

Mica and Rene

Mica2

New Radios (CC2.4K)

Rad

io C

ontr

ol

Page 4: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

Mica (Old)

Generic Comm

AM

CRCPacketObj

SecDedRadioByte

RFM

Page 5: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

Mica (MicaHighSpeedRadio)

Generic Comm

AM

RadioCRCPacket

ChannelMon

SpiByteFifo

RadioTiming

SecDedEncoding

SlavePin

RandomLFSR

MicaHighSpeedRadioM

CSMAPreamble DetectStart Sym Detect

Captures radio timing and syncs

receiver to sender

Encoding

Page 6: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

Mica2 (CC1000)

Generic Comm

AM

CC1000Control

SpiByteFifo RandomLFSR ADC

CSMAEncoding

DataPreamble DetectSynchronization

Control(Freq,Power,etc)

CC1000RadioIntM

Wires the control and data paths:Implementation hidden from app

CC1000RadioC

Page 7: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

Mica2 Radio Stack

Phil B

Page 8: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

Radio Packets

Page 9: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

Mica

Page 10: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

Mica2

MAC Delay Preamble Sync Packet Transmission

Switch to TX Mode

Switch to RX Mode

1-128 18 2 36

56

250s 250s

Page 11: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

Comparison

Mica Mica2

Preamble Bytes 12 (4) 18*

Sync Bytes 0 2

Packet Length 36 36

Acks Yes No

Encoding SecDed (3:1) Manchester (2:1)

Eff Data Rate 13.3kbps 19.2kbps

Max Packets/sec 42 43

Packet Time 24ms 23.3ms

Page 12: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

Mica2 Preamble

CC1000 must “sync” its clock to incoming signal With manchester

encoding, 17 sync bytes are required for longest range

an extra byte is added for offset in receiving

Settling(setting)

Lock

00 23

01 34

10 55

11 98 (17)

Page 13: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

Strength

Mica sends two strength bytes to measure

high amplitude via RSSI pin Mica2

with FSK, both ‘0’ and ‘1’ contain energy

measure energy at any point during packet reception, no need for extra bytes

Page 14: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

Synchronous ACKs

Mica Switch from Transmit to Receive mode

instantly. No need to resynchronize ack sender.

Mica2 Switch from Transmit to Receive mode in

250s CC1K requires that each receiver lock to the

incoming signal (~18 bytes = 7.5ms) Almost as expensive as sending a packet!

Page 15: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

CSMA

Page 16: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

Mica

Hardware sets automatic gain control (AGC) using a capacitor in ASK mode

Channel Monitor looks for ‘1’ bits on the radio while waiting to send start symbol/preamble detection

Page 17: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

Mica2 Release

Set a fixed noise floor threshold On transmission:

Take RSSI readingIf reading > floor, transmit on next

byte boundary from radio

With a few months in the lab, what happens?

Page 18: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

0 10 20 30 40 50 60 70 80 90 100

0

0.2

0.4

0.6

0.8

1

Raw

sig

nal s

tren

gth

(V)

Time (ms)

Collisions Oh My!Channel Clear

1

2

34

Page 19: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

0 10 20 30 40 50 60 70 80 90 1000

0.5

1R

aw s

igna

l str

engt

h (V

)

Time (ms)

0 10 20 30 40 50 60 70 80 90 100-1

0

1

2

OK

to

tran

smit

Time (ms)

0 10 20 30 40 50 60 70 80 90 100-1

0

1

2

OK

to

tran

smit

Time (ms)

0 10 20 30 40 50 60 70 80 90 100-1

0

1

2

OK

to

tran

smit

Time (ms)

CC1000 Radio MAC

Radio RSSI sampled at 5kHz

Current MAC

Adjusted Threshold

Adjusted Threshold with Averaging

Incoming Packet

Channel Considered Clear

Periodic Errors

Channel Busy during Xmit

Page 20: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

0 10 20 30 40 50 60 70 80 90 1000

0.5

1R

aw s

igna

l str

engt

h (V

)

Time (ms)

0 10 20 30 40 50 60 70 80 90 100-1

0

1

2

OK

to

tran

smit

Time (ms)

0 10 20 30 40 50 60 70 80 90 100-1

0

1

2

OK

to

tran

smit

Time (ms)

0 10 20 30 40 50 60 70 80 90 100-1

0

1

2

OK

to

tran

smit

Time (ms)

CC1000 Radio MAC

Radio RSSI sampled at 5kHz

Median over 5 sample window

Average over 5 sample window

Max over 5 sample window

False Positives

Page 21: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

Mica2 Joe

Use calibrated ADC Adjust noise floor:

After each packet transmission, sample RSSI and add to 10 sample FIFO queue

Select median(Q) and add to EWMA On transmit:

Take <=5 RSSI samples If one reading > floor, transmit on next byte

boundary from radio Downside: can take up to 10 packets for the

noise floor to settle

Page 22: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

Comparison

Mica Mica2 Rel Mica2 Joe

Init MAC Backoff 16 (5.3)3.2ms

36+12868.3ms

6426.6ms

Congest Backoff 16 (5.3)3.2ms

29*16193ms

36+12868.3ms

Noise Floor AGC

(Hardware)

Fixed AGC

(Software)

Page 23: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

Results

Page 24: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

Results

Page 25: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

Brief Low Power Operation

Mica Snooze: Node is either on or off Radio: Can detect channel activity in microseconds

• Radio startup time is negligible (10s of s) Mica2

HPLPowerManagement: check the state of the mote and shut down if appropriate

Radio: Currently can detect channel activity in 7.5ms (18 bytes)

• Using RSSI and MAC noise floor estimation, can reduce this time to ~1ms.

• Radio start up time is up to 2500s!

Page 26: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

ACKs Revisited

If we can now reliably detect channel activity, can we do ACKs?

Answer: Hopefully. How?

By switching modes and sending data (or pulse sending data), the receiver can detect this signal

• Think amplitude shift keying• May be able to detect hidden terminals too

• If ACK doesn’t have pattern but instead is constant energy, then someone didn’t detect the original transmitter and transmitted over him

• Can be done in 4-5 bytes and doesn’t require the receiver to synchronize!

• … but it hasn’t been tried yet.

Page 27: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

Open Questions

Allow Application to control MAC backoff? Is TOS_Msg the right networking

abstraction for building sensor network apps and services? OSI? S-MAC?

What does a stack look like where you can change MAC layers, security models, and encodings? Mica and Mica2 stacks are close, but not quite there…

Page 28: TinyOS Radio Stacks Joe Polastre, Phil Buonadonna, etc Monday, October 20 2003

webs.cs.berkeley.edutinyos-1.x/beta/CC1000Radio/