Signal beacons: inconsistent and unreliable results when determining the distance of a beacon

Using the Kontakt SDK, I implemented a simple application for monitoring and range of Kontakt beacons in my area. I noticed that the reported distance of the detected lighthouses varies greatly (for example, the lighthouse is really at a distance of 10 m, but it returns as 2 m and can significantly jump at a distance), even if the lighthouse is not so far. I looked through the documentation and played with all the various variables on the hardware side of the beacon (tx power / frequency), SDK (scan mode and related) and tried several devices - nothing improves accuracy. Just wondering if anyone can point me in the right direction, which could be a problem.

I know that a beacon can vary significantly depending on many environmental factors and the hardware of the receiver itself; but, Iโ€™m lost, how can I create a user experience based on the exact proximity to the lighthouses when there seems to be no way to get information about a constant distance?

Any type of guide, input or suggestion is welcome. Thanks.

+5
source share
3 answers

If you are introducing Android, you face this problem with large fluctuations due to the lack of a noise reduction algorithm in android. But the same thing can be verified in iOS, and the results are much better, iOS supports algo noise reduction. Now there are 3 things you can do based on the RSSI / Distance received from the beacon -

a) Implement the noise reduction algorithm yourself for your application. (I suggest that this is not easy.)

b) Implement a Gaussian filter for the resulting values. I mean saving all RSSI / distance values โ€‹โ€‹that you get from the beacon to arraylist, and for every 10 values, sort in ascending order, exclude 3 minimum and 3 maximum values, and for the remaining 4 values, calculate the average and average value will be yours final value. (Itโ€™s easy and convenient.)

c) Implement a Kalman filter for the resulting values. This is the best filter available by date. However, it is very difficult to implement than the Gaussian Filter, but the results of this filter are better.

You can choose any solution from above :)

+5
source

In addition to what davidgyoung already said: BLE is currently not a promising way to measure distances. Even with frequency hopping, the calculated distance is 2-3 times larger than the real distance when using raw data. See My Q&A Questions Here: Bluetooth-Low-Energy RSSI Changes Periodically on Android Devices

It depends on your requirements: do you want the user to stand still without moving or turning the device for a minute? Also, can the user avoid any moving obstacles, nearby Wi-Fi sources or other interference? The temperature of the device also plays a role. Then you can get pretty stable values โ€‹โ€‹by taking average or average. Another good option would be a Kalman filter. From this, using the log-normal-shadowing model, you can calculate the distance:

d=d0*10^((RSSI0-RSSI)/10n) 

The distance d is in the meter, n is 2 in free space and greater than 2 in real conditions. It must be calibrated for each environment. RSSI0 is the RSSI value measured at distance d0.

If the user needs to move, however, forget about distance. This, at least, is my conclusion after spending weeks on this topic.

+2
source

A few tips:

  • Correctly set your expectations . Distance estimates with lighthouses are only estimates. They are very susceptible to reflections, interference, radio noise and various receiving antennas on different phone models. The latter is a particular problem for Android devices.

  • Set the maximum transceiver power to maximize the signal-to-noise ratio.

  • Calibrate the beacon for a new transmitter power level.

  • Set the maximum allowed ad frequency (best 10 Hz) to provide as many RSSI statistical samples as possible. This gives less variable distance estimates.

  • Make sure your beacon is not in connection mode . When connected, some Android devices can only read one sample per scan cycle, usually once per second.

  • Try a scanner application like Locate to see if it gives better grades. If so, you can try using the Android Beacon Library on which it is based.

After completing all these steps, you will still see variations and inaccuracies, but you can maximize the results that are possible. Distance estimates are most useful for determining which beacon is closest when somewhat visible. They are less useful for measuring absolute distance.

+1
source

Source: https://habr.com/ru/post/1235588/


All Articles