WAMI: Where AM I


The aim of the project is to implement an indoor localisation system using ultrasounds.

The localisation system shall be able to locate a given cell phone in a 3D space of approximatively 50m * 50m * 20m (lets say the Amphitheatre Thevenin for instance).

The system  is composed of :

  • emitters who send ultrasound beeps
  • a receiver who computes his position thanks to the time difference of arrival of the beeps

Our receiver will be a cell phone implementing an android application. This choice has been made so that the project is easily portable and does not require any additionnal equipment.



We design our own PCB to be rather generic.

They have :

  • LEDs and buttons for control
  • a H-bridge to connect the tweeter and have an increase power of emission (x4 as compared to a normal connection)
  • a XBEE module for radio communication
  • USB and a micromatch concerning the interfaces

We also have a codec connected in case we need to record the ambient noise / beeps coming from the other emitters.

Communication protocol

In order for the system to work we need to synchronised our emitters.

This is the purpose of the presence of xbee modules.

One of the devices we made will be considered as the master and send synchronisation information to the other emitters. By considering that the time of flight of the radio waves to the different emitters is much smaller than the precision we need for beeping (which is true in reality), all the “slave twitters” are therefore synchronized.



The device we use for reception is a regular cell phone able to run an android application.
Regular micros on modern cell phone sample the sound at 44kHz which is enough to regognize ultrasounds (from 20kHz to 22kHz).

Detecting a pulse

We are curently working on several methods to detect the time of arrival of a pulse. To do that we need to get the energy associated to the 20kHz frequency.
We thought of implementing :

  • FFT
  • the Fourier coefficient associated to 20kHz frequency
  • a goertzel filter

We shall meet a signal teacher tomorow whose advice will be precious.


Finding position

To compute its position from the measures of the time difference of arrival, the receiver needs to associate each beep to a tweeter and to know the position of all of them.
The main incertainties in the algorithm is that we don’t know the speed of the ultrasounds (it varies a lot with respect to temerature, humidity, altitude). For instance a 5°C shift results in 3m/s diffenrence in the ultrasound speed.
We are currently using a least square algorithm with some adjustements to be able to find the proper position.

Jean-Baptiste Lescher

3 comments to WAMI: Where AM I

  • drix

    Nine post !
    Can you estimate how accurate the localization should be?

    • jb

      Hello and thanks for your question !
      It is hard to estimate how accurate the localisation will be because it demends on a lot of parameters.
      Here is a list of the “sources of inaccuracies on the localisation :

      Radio synchronisation : show that we can acheive a 60us precision.
      A 60 us shift results in a 2cm shift (speed of the ultrasound 330m/s)
      Time of emission : considering our modules will be synchronized we estimated that no shift is introduced by the emission
      Time of flight may be affected by air flux, for now we cannot estimate this parameter.
      Bip detection : this is a key parameter and one of our main concern.
      We are currently discussing with a signal teacher to design our filter in order to detect a bip. We hope to acheive a 5ms resolution (1,6m)

      The last source of uncertainty is the speed of ultrasounds which varies a lot (3ms every 5°C).

      Given all those parameters the precision we can obtain is 70cm.
      It decreases greatly as the bip detection time decreases (10cm for 1ms instead of 5ms).
      We are trying to finish our system as soon as possible because we will need some time to configure all the parameters.

  • drix

    Thanks for your answer, I can’t wait to see it for real !
    Good luck !