Search code examples
androidibeaconproximityibeacon-androidandroid-ibeacon

Determining distance accuracy from beacon


I have couple of questions regarding the Radius networks Beacon.

  1. How can we get the accurate distance between android devices and beacon? So far the distance we're getting through "android-beacon-library" is fluctuating.
  2. How can we limit the beacon's transmission radius, say allowing beacon to transmit only for 5 meters or to 20 cms ?

Please find the image with beacon distance reading for various devices (Moto g , Nexus 5 , Nexus 4 and iPhone 5s)


Solution

  • You will always see fluctuation on beacon distance estimates, so you have to set your expectations appropriately. Beacon distance estimating works by starting with a measurement of the radio signal strength using the bluetooth radio on the mobile device. A stronger signal means that the beacon is closer, where a weaker signal means the beacon is further away. The beacon transmits a reference value of its expected signal strength at 1 meter, saying in effect "If you are one meter away, you should see my signal level as -56 dBm". A formula inside the mobile phone then tries to make a guess of how far it is away based on the signal level at any given time. If the signal is a little bit weaker than -56dBm, such as -65dBm, the formula might estimate that the distance is 2.5 meters.

    This technique is imperfect, and there are several reasons for fluctuation:

    1. There is always background radio noise (like the static on an old AM radio) which causes individual signal strength measurements to vary.
    2. There is error on the analog to digital converter inside the bluetooth radio, which also causes individual signal strength measurements to vary.
    3. The bluetooth radio waves reflect off of some objects and are absorbed by others, making the actual signal strength change at different positions the same distance away, and when other objects in the vicinity move around.
    4. The antenna pattern on both the transmitter and the receiver are not perfectly spherical. This means that when you rotate your phone or the beacon, you will see a slightly different signal level.

    There are a few things you can do to minimize the error:

    1. Use a beacon that transmits as frequently as possible, preferably at 10Hz or more. More transmissions mean more statistical samples of the signal level, which when averaged together help mitigate errors from sources 1 and 2 above.

    2. Use as high of a transmitter power setting on your beacon as possible. The stronger the signal, the lower the noise level will be (relatively speaking) from source 1 above.

    3. When possible, place your beacons where there is a clear line of sight to the receiving devices. Overhead often works best.

    However, the best you can hope to do is reduce the variation as much as possible. You cannot eliminate it. For this reason, you must design your app so such variation is acceptable. If it helps your use case, you can also lower the beacon transmitter power so that devices only detect the beacon when they are relatively close.

    Using Radius Networks' RadBeacon USB and RadBeacon Tag models, you can adjust the transmitter power using the free RadBeacon configuration app for iOS and OSX. The apps have a slider control to increase and decrease the transmitter power.

    You should note, however, that by lowering the transmitter power, you will also increase the amount of variation on your distance estimates. This is because the signal to noise ratio will be lower.

    Full disclosure: I am Chief Engineer for Radius Networks.