210 likes | 519 Views
BeepBeep: A High Accuracy Acoustic Ranging System using COTS Mobile Devices. Chunyi Peng Guobin(Jacky) Shen, Yongguang Zhang, Yanlin Li, Kun Tan Microsoft Research Asia. Ranging, basic to localization. Many excellent systems Cricket (Mobicom’00) RIPS (Sensys’05) ENSBox (Sensys’06)
E N D
BeepBeep: A High Accuracy Acoustic Ranging System using COTS Mobile Devices Chunyi Peng Guobin(Jacky) Shen, Yongguang Zhang, Yanlin Li, Kun Tan Microsoft Research Asia
Ranging, basic to localization • Many excellent systems • Cricket (Mobicom’00) • RIPS (Sensys’05) • ENSBox (Sensys’06) • … • Hardware and algorithmic innovation
Our motivation • Proximity detection between devices • Among portable devices • MobiUS (Mobisys’07) • Between portable and non-portable devices • Phone to PC, Xbox, Printers, Projectors …
The requirement • A widely applicable solution • Work on COTS devices • No additional hardware (e.g., ultrasound) • Pure user space software (no change to OS/driver) • Not dependent on infrastructure • Applicable in spontaneous, ad hoc situations • Minimum set of sensors • High accuracy!
A matter of time measurement • Mostly, based on time-of-flight measurement • Distance = speed x time • Sound often chosen • Slower speed => less demanding on time accuracy • Still, a challenging task • 1 ms error in time = 34 cm error in distance • 1 cm ranging accuracy requires 30us timing accuracy • Extremely challenging on COTS/software
The root cause of inaccuracy – three uncertainties • Clock synchronization uncertainty • Sending uncertainty • Receiving uncertainty software issuing command software aware of arrival ... t0 = wall_clock(); write(sound_dev, signal); ... ... read(sound_dev, signal); t1 = wall_clock(); ... unknown delays (software, system, driver, hardware, …) ? unknown delays (hardware, interrupt, driver, scheduling, …) ? sound leaves speaker sound reaches mic time
Effects of the sending and receiving uncertainties • Example measurement of the lower bound on COTS mobile devices (HP iPAQ rw6828) • Highly fluctuating, appears unpredictable • Easily adds up to 1-2 ms (=> a few feet error) CPU idle CPU heavily loaded
Our approach – BeepBeep • A simple and effective solution • Each device just needs to emit a sound signal and record them simultaneously • Only require a speaker, a mic, and some way of communicating with the other device • Achieving 1cm accuracy while satisfying all the requirements
Beepbeep’s basic procedure Device A Device B Device A emits a beep while both recording Device B emits another beep while both continue recording Both devices detect TOA of the two beeps and obtain respective ETOAs Exchange ETOAs and calculate the distance A’s recording B’s recording ETOAA ETOAB DAB=|ETOAA-ETOAB|/2
Mathematical derivation 1st Beep tA0 dB,A-dA,A = c·(tB1-tA1) tA1 dA,B-dB,B = c·(tA3-tB3) tB1 ETOAA ETOAB 2nd Beep tB2 dB,A+dA,B= c·[(tA3-tA1)-(tB3-tB1)] +dA,A+dB,B = c·(ETOAA-ETOAB)+dA,A +dB,B tB3 tA3
Key techniques, effects and rationale (I) • Self-recording • Record signals from both the other party and itself • Establish the starting reference point of the whole ranging process • Duplex audio channel • Two-way sensing • Avoid clock synchronization uncertainty • To capture the ending reference point of the whole ranging process • not attempt to capture any system time info
Key techniques, effects and rationale (II) • Sample counting • Avoid referring to system clocks for timing info • Dedicated A/D converter, w/ fixed sampling rate • Achievable precision is determined by the sampling frequency: 0.8cm at 44.1kHz sampling rate • Putting together: • Bypass all the three uncertainties by making time measurement irrelevant to system clocks
Engineering Challenges (I)Signal Design • Good signal design helps detection • Easily detectable in digital recording • Robust against ambient noise • Robust against acoustic distortion • Low-fidelity speaker & mic in COTS mobile device • Within hardware capability • Most COTS devices have limited voice frequency range • Our empirical design (“chirp” sound) • 50ms long, shifting frequency from 2 to 6 kHz
Engineering Challenges (II)Signal Detection Algorithm Design • Efficient and fast signal detection algorithm • Quickly locate possible signal regions • Robust against low SNR • Utilize noise floor to boost SNR • Combat multipath effect • Multipath: big issue indoor environment • We derived special algorithm to detect first “sharp peak” signal correlation
Engineering Challenges (III) • Protocol design • Coordinate two (or more) devices in entire ranging process • Minimize ranging time duration • Device form factor • Speaker/mic’s placement affect ranging results • Vary from one device model to another • Need calibration to adjust ranging calculation
System Implementation • Platform: Windows Mobile 5.0 • Sound: “wave” API • Communication: “WinSock” (WiFi or Bluetooth) • Software architecture • User-mode dynamic linkable library • As service for other applications • Test devices • Dopod838 • HP iPAQ 6828
Evaluation • Case-A: Indoor, quiet • Case-B: Indoor, noisy • Case-C: Outdoor, car park entrance • Case-D: Outdoor, subway station 50 runs each setting
Summary • Identified three uncertainties and mitigated them with three key technologies • Two-way sensing • Self-recording • Sample counting • BeepBeep provides a simple ranging solution • Achieves 1cm accuracy • On very basic hardware set • Purely in software (user-space)
Thanks! • Demo session. Welcome to try BeepBeep! • Software downloads: http://research.microsoft.com/wn/beepbeep.aspx