Indoor Positioning for Smartphones using Ultrasound


Demo


Introduction

This indoor positioning system was developed in partial fulfilment for the degree of PhD at Dublin Institute of Technology.

In the beginning of this research, designing, developing, and testing a novel accurate indoor positioning approach was identified to be the primary goal. Commercial off-the-shelf (COTS) mobile phones with no hardware or Operating System level modifications were chosen as the desired platform. This would allow anyone who carries a mobile phone with them to be in possession of the required hardware. Once the software component is installed, they can participate. Another advantage is that a smartphone is a powerful interface for a Location Based Service (LBS), something many contemporary Indoor Positioning Systems lack. Because of the choices mentioned above the list of potential technologies was limited to only those that are present on a majority of modern smartphones. After researching each of the technologies, ultrasonic trilateration was chosen as the most promising approach.


Features


Publications

The full Thesis can be downloaded below:

View PDF

Conference papers:

ISPRS International Journal of Geo-Information 2013    View PDF

International Symposium on Web and Wireless Geographical Information Systems 2012    View PDF

International Conference on Indoor Positioning and Indoor Navigation (IPIN) 2010    View PDF


Implementation Details

The positioning protype was developed using Java and setup in an office room 7.1 m long, 7 m wide and 2.83 m high. A map of the room was carefully made using a laser measurement tool to serve as a reference for positioning output in one of the program windows.

screenshot of the map window

Four DPA microphones were placed in every corner of the room 10-20 cm below the ceiling, facing the lower opposite corner of the room. All microphones were connected to Avid Mbox Pro audiocard, which supports four-channel synchronised input. The audiocard was in turn connected to a PC running the positioning software. The software uses RtAudio API for real-time audio input/output. It is accessed via a Java wrapper JRtAudio, which allowed quick GUI prototyping in Java. On PC RtAudio API supports either DirectSound or ASIO drivers. ASIO support proved essential, because streaming more than two channels with DirectSound turned out to be very challenging. Audio streams from the audiocard are written into a buffer and pass through the Bessel bandpass filter to filter out everything except the signal frequency. Sound is streamed at 96000 bit/s sampling rate. Assuming speed of sound is 346 m/s, each sample should be equivalent to 3.6 mm travelled. Unfortunately, due to the use of a low-order filter only 1 out of 10 samples carry useful information, making the resolution 36mm. A real-time graphical representation of the four buffers after the bandpass filter can be seen in the second program window. It can be frozen at any moment to facilitate thorough analysis.

screenshot of the graph window

A simple Android app was programmed to play back a specially designed ultrasonic signal when tapped or when the phone is flipped. Because on Galaxy S2 media speaker is located on the back of the phone, flipping resulted in the speaker pointing at the ceiling, which produced the most reliable results (ultrasound being extremely directional). The signal will arrive at the four microphones with slightly different delay due to propagation time. The exact time of arrival is estimated to be the first peak that passes a certain threshold. If the signal arrival was detected at all of the four channels it is possible to locate the phone using Least Squares Time Difference of Arrival (TDOA) Trilateration. TDOA rather than Time of Arrival (TOA) is used to avoid having to synchronise the phone and the server, which can be a major source of inaccuracy. This is why all four distances are necessary, rather than three. When the phone's position is calculated, it is displayed on the computer screen as well as sent to the mobile phone using Wi-Fi.


Accuracy

The following results were achieved when the phone produced the positioning signal 100 times in each of the 10 randomly selected locations:

screenshot of the graph window

Overall the system was determined to have sub-decimeter accuracy.