Skip to content
This repository has been archived by the owner on Nov 16, 2020. It is now read-only.

Improve distance measurement #17

Open
haveyaseen opened this issue Apr 19, 2020 · 1 comment
Open

Improve distance measurement #17

haveyaseen opened this issue Apr 19, 2020 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@haveyaseen
Copy link
Member

  • Use better proximity calculation, see e.g. http://www.pspachos.net/pubs/GIIS20181.pdf
  • Limit signal strength for better privacy
  • Import Bluetooth calibration data. Make sure that imported data is compatible with our BSD 3-Clause Clear license.
@haveyaseen haveyaseen added enhancement New feature or request help wanted Extra attention is needed labels Apr 19, 2020
@carolienbraams
Copy link

carolienbraams commented Apr 22, 2020

Improvement of “Bluetooth proximity”

The “track and trace” feature of the ITO-app is based on Bluetooth signal strength measurement.

Bluetooth class2 devices like smartphones have a default typical range of 10 meters.
This will work at best in non-crowded areas. Because the radio signal is able to travel free, there is a correlation between signal strength and distance. This could be used for distance measurement. More details about this “proximity measurement” could be stated here, but will be described later.

In crowded areas like supermarkets with a lot of reflection and blocking materials like metal cans and bottles filled with fluids, this becomes more complicated. Multiple BT devices and a lot of reflection causes a interference pattern of BT radiosignals. This is characterized by spots of “constructive interference” with a much stronger signal strength, and at other spots (not far away, typically one or two steps) of “destructive interference” which means the signal strength is close to zero.
https://en.wikipedia.org/wiki/Wave_interference
This interference pattern is not continuous: it changes rapidly as the BT device is moved to another place, which has a different set of reflections. And that is not what we want: we need some correlation between distance versus signal strength in order to perform a reasonable accurate distance measurement.

What can we do?
I think we should drastically reduce “Transmit Power” of the BT chip.

How do we do that?
I presume there is some AT command for the BT chip, or some API command that reduces BT power. I must study that. Hopefully there is anyone at ITO who knows this right away?

What will be the result?
Reducing “Transmit Power” of the BT chip will lower its range.
Typically there is a “square root” relationship between Power and Range.
For instance: a fourfold increase in Power results in a twofold increase in Range.
Formula: “Range = (some physical constants) times squareroot of (Power emitted)”

Calculation
Let us presume we reduce power 4 times (that is 2^2)
so “Transmit Power” is calculated: 100% / 4 = 25% of maximum power.
This will result in a (squareroot of 4 =) twofold reduction of Range: 10m / 2 = 5m.

We can repeat this one more time and make a table of the results:
Range/Power equals:
10 m = 100% Power (typical for class2 devices like smartphones)
5 m = 25%,
2,5 m = 6,25%

At 6,25% Transmitted Power (or let’s presume we can set Transmit Power at 5%) we achieve:

  • a drastically reduced Range (ok, we do not want to receive BT signals from far away)
  • a much reduced interference pattern (signal strenght is better usable for distance measurement)
  • a drastically reduced battery-drainage, which drastically increases battery-power-cycle
  • a possibility to set a trigger point at (for instance) 50% signal strenght RSSI. Calculating 50% of 2,5m is 1,25m, which is close to the “social distance” recommendation which is 1,5m in the Netherlands.

This RSSI trigger or “cut-off-point” needs probably some adjustment to deal with different BT chips, but differences are much smaller at close range.

This all added up could be the basis of a much more reliable “Bluetooth proximity” measurement, compared to all BT devices (screaming to each other) at maximum Power.

Some interesting sites:
https://en.wikipedia.org/wiki/Bluetooth_Low_Energy
https://en.wikipedia.org/wiki/Bluetooth_low_energy_beacon
https://en.wikipedia.org/wiki/Eddystone_%28Google%29
https://en.wikipedia.org/wiki/IBeacon
http://www.pspachos.net/pubs/GIIS20181.pdf
^This paper is already mentioned by Haveyaseen 4 days ago.

Please take a look at page 4:
Figures 2 and 3.
Distance measurement is tested at 0.25, 0.50, 0.75, 1.00, 1.25, 1.50, 1.75 2.00, 2.25, 2.50, 2.75, and 3.00 meters.
Distance measurement reasonably accurate for Bluetooth proximity purposes measurement: without filter approximately 30-60 cm.
Moreover, with filter even more accurate: up to 27cm (standard deviation means 95% probability that the measured distance is accurate, with a max deviation of + or – 27 cm from mean value).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants