smoke smoke

29
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial Cricket Tutorial on using cricket location system

Upload: nikhilawareness

Post on 14-Dec-2014

506 views

Category:

Documents


1 download

DESCRIPTION

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce egestas nisi ac lectus varius pellentesque. In rhoncus nulla ut turpis fringilla ut facilisis lectus dapibus. Cras posuere nulla in erat feugiat feugiat. Nullam non quam in lorem convallis dignissim. Nunc at euismod ante. Sed scelerisque ullamcorper quam quis vestibulum. Vestibulum vulputate ultricies libero non consectetur. Praesent nec congue eros. Maecenas sodales aliquam magna id pellentesque. Donec bibendum risus non nunc facilisis sed tristique nunc feugiat. Praesent volutpat vestibulum nunc non tempor. Quisque eget arcu metus. Proin vel augue in ipsum facilisis commodo. Suspendisse tempor posuere diam. Duis porta odio adipiscing purus feugiat in euismod magna pulvinar. Mauris nec magna eu purus sollicitudin lobortis. Curabitur pharetra urna eu augue luctus ultricies. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Pellentesque non ultricies turpis. Nullam ac metus non sapien varius porta eget in nibh. Sed ut urna quis eros rhoncus feugiat. Maecenas sed justo sapien. Curabitur lacus sem, tristique nec placerat eget, ultrices in dui. Etiam aliquam diam eget enim rutrum pretium at sed neque. Pellentesque ut nunc eu lacus lacinia tempus a et diam. Maecenas egestas pretium magna ac adipiscing. Sed interdum, ipsum in dictum faucibus, massa felis pharetra lectus, nec rutrum ligula quam non mi. Nullam ac egestas mauris. Donec sed ante ligula, sed porttitor neque. Nulla facilisi. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In tortor ipsum, gravida a tempus vel, imperdiet in enim. Maecenas tempus porttitor feugiat. Vivamus eu lorem sed nisl molestie semper. Nam tincidunt blandit dolor id imperdiet. Nam id faucibus risus. Vestibulum aliquam faucibus nunc a blandit. Pellentesque eros sapien, venenatis id tristique at, molestie nec nisi. Suspendisse ac enim ligula. Cras nec commodo justo. Praesent viverra eleifend sagittis. Aenean facilisis rutrum quam sit amet venenatis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ipsum purus, vulputate eu euismod sed, ultricies tincidunt diam. Donec feugiat, justo id facilisis convallis, enim dolor porta nibh, dapibus mattis lorem sapien at ante. Curabitur imperdiet, mi ut scelerisque tristique, sapien ligula feugiat odio, quis tincidunt risus justo lacinia risus. Curabitur erat justo, fermentum non tincidunt sed, ornare ac lacus. Aenean tempor eros a mi placerat in lacinia neque egestas. Sed suscipit euismod libero non tincidunt.

TRANSCRIPT

Page 1: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial

CricketTutorial on using cricket location

system

Page 2: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 2

Cricket Goals

Research prototype

build and then evaluate

Useful mainly indoor environments

walls, ceilings not too far

Recognize spaces, not just physical position

good boundary detection is importantdoors, floors, etc.

Preserve user’s privacy

Big-brother can be a botheruser has choice to reveal location

Page 3: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 3

FeaturesDistributed architecture

No wired infrastructure

Easy deployment (no satellites)

Low maintenance

Users are not tracked

Listeners are passive

Large number of listeners w/o interference

Integrates with a wide range of resource discovery systems

Page 4: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial

Cricket: Private location-support

Beacon

Listener

space = “a1”

space = “a2”

Pick nearest to infer space

No central beacon control or location databasePassive Listeners + Active Beacons

Page 5: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 5

Finding the distance

distance = speed * time

want to find the distance

we know the speed

How do we figure out time?

Radar: measure round-trip timecannot use it as it violates some goals

Page 6: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 6

Finding the distance

Synchronized clocks

receiver knows exactly when transmitter sent signal

how about sending signal first to sync clocks and then 2nd signal?

Page 7: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 7

Finding the distance

Use two different speed signals

both start at same time d = s1 * t1 d = s2 * t2

We measure delay: m = t1 - t2

t2 = m * s1/(s2 - s1)

d = m * s2 s1 /(s2 - s1)

Page 8: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 8

Location Estimation• Distance estimation via coupled RF and ultrasonic signals– Beacons send information on the RF channel with concurrent ultrasonic pulse

RF infoBeacon

Listener

Ultrasound(pulse)

Page 9: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 10

Multiple Beacons

• Beacon transmissions are uncoordinated• Ultrasonic signals reflect heavily• Ultrasonic signals are pulses (no data)

These make the correlation problem hard and can lead to incorrect distance estimates

Beacon A Beacon B

tRF B RF A US B US A

Incorrect distance

Listener

Page 10: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 11

Solution

Carrier-sense + randomized transmission

reduce chance of concurrent beacons

Bounding stray signal interference

envelop all ultrasonic signals with RF

Listener inference algorithm

Processing distance samples to estimate location

Page 11: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 12

Bounding Stray Signal Interference

• Engineer RF range to be larger than ultrasonic range– Ensures that if listener can hear ultrasound, corresponding RF will also be heard

tRF A US A

Page 12: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 13

Bounding Stray Signal Interference

t

S/b

r/v (max)

S = size of space advertisementb = RF bit rater = ultrasound rangev = velocity of ultrasound

(RF transmission time) (Max. RF-US separation at the listener)

S r

b v

• No “unaccompanied” ultrasonic signal can be valid!

Page 13: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 14

Bounding stray signal interference

• Envelop ultrasound by RF• Interfering ultrasound causes RF signals to collide• Listener does a block parity error check– The reading is discarded...

tRF A US A

RF B US B

Page 14: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 15

Problem: Closest Beacon May Not Reflect Correct

Space

I am atB

Room A Room B

Page 15: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 16

Correct Beacon Placement

Room A Room B

x x

I am atA

• Position beacons to detect the boundary• Multiple Beacons per space are possible

Page 16: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 17

Implementation• Cricket beacon and listener

Micro-controller

RF

US

Micro-controller

RF

USRS232

Page 17: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 18

Cricket v1 PrototypeUltrasonic

sensorRF antennaRF module (rcv)

Atmelprocessor

Listener Beacon

RF module (xmit)

RS232i/f

Page 18: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 20

Cricket Beacon LEDsDebug Switch = UP

Green LED = Transmit

Red LED = Carried Sensed

Debug Switch = DownGreen LED = Every 5

th

transmission

At StartupLEDs flash version number

Red on, Green flash count = Major #

Green on, Red flash count = Minor #

Power Switch

Up = On

PowerSwitchOnOff

Debug SwitchBeacon ID

Page 19: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 21

Cricket Beacon Antennas

Receive Antenna

For sensing transmission of other beacons

Transmit Antenna

Limit transmission distance

Should not touch ultrasound

Should not cover receive antenna

Transmit antennaReceive antenna

Page 20: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 22

Listener LEDsGreen FlashReceived valid RF and ultrasound

Red Flash OnceReceived Radio, but not ultrasound

Red+Green FlashRF Error (e.g., parity error)

Red and Green always onListener not working correctly

Power OnBoth LEDs flash together once

Off OnPower Switch

Page 21: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 23

Software Components

CricketListener cricketd

Application 1

Application 2

Application 3

CricketBeacon

1

CricketBeacon

2

Binary DataOver RF

ASCII dataover serial port9600 baud

ASCII dataon TCP sockets (port 2947)

Page 22: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 24

cricketdBackground program (demon) that reads serial port and writes data to a socket

Command line arguments (defaults work correctly on ipaq)

-T k Version 3 Listeners (with LEDs) (default)

-T c Version 2 Listeners (without LEDs)

-S <port> Socket port number (default is 2947)

-p <dev> Serial port device name (default “/dev/ttySA0”)

-s <baud> Baud rate of serial port (default is 9600)

-h Help

-D <num> Debug level

Page 23: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 25

Cricket Listener Output

Strings reported from Listeners

When good RF and good ultrasound pulse heard:“$Cricket2,ver=3.0,space=MIT7,id=20,dist=4F,duration=1A”

When only good RF heard, no ultrasound heard:“$Cricket2,ver=3.0,space=MIT7,id=20”

When RF detected, but parity error detected:“$Cricket2,ver=3.0,err=rf”

t

dist

duration

Page 24: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 26

Speed of Sound

Listener reports distance and duration in 15.625 KHz counter cycles ( 64 microseconds each).

Assume speed of sound is 344.49 m/s then 22.047 mm/cycle

For 343.75 m/s = 22 mm/cycle

Need to subtract 36 units for delay from end of RF to start of US transmission.

Page 25: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial

So where are you?

Telnet to cricketd (on correct port)

Get names of beacons within range

Get distances from beacons

Lookup beacon location in database

Or use beacon name (longer transmission)

Triangulate (compensate for temp)

Page 26: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial

So whre are you?

Beacon name may tell you room

That may be enough

May want to know relative movements

As you walk around the room

No climbing on tables

Can you do it using two beacons?

Can you do it without calibration?

Page 27: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial

Two beacons

Put them along the wall

Come very close to one of them

Now know distance between them

Given distances from both

Before and now (d1,d2) & (e1,e2)

Can find relative movement

Two solutions! No problem, why?

Ex. Doom virtual world

Page 28: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 30

Orientation

Orientation relative to Bon horizontal plane

Mobile device(parallel to horizontal plane)

Beacons onceiling

Cricket listener withcompass hardware

Page 29: Smoke Smoke

MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 31

Hardware Design

http://nms.lcs.mit.edu/projects/cricket

http://nms.lcs.mit.edu/cricket/fab

Need user & password

http://nms.lcs.mit.edu/cricket/distrib

Need user & password