Determining distance accuracy from beacon - android

I have couple of questions regarding the Radius networks Beacon.
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.
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)

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:
There is always background radio noise (like the static on an old AM radio) which causes individual signal strength measurements to vary.
There is error on the analog to digital converter inside the bluetooth radio, which also causes individual signal strength measurements to vary.
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.
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:
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.
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.
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.

you can't really tell the distance to one beacon. That's why indoor localization is so hard.
you can't say exactly how far a beacon should transmit its signals, but on most beacons (I don't know about Radius networks) you can change the txPower / transmit power. This varies from beacon to beacon (and also depends on the environment around the beacon), so you'll have to do your own experiments to find the sweet spot.

Related

Can iBeacon tell 1cm from 10 cm?

so the question is in the headline. I need to find a technology that will tell whether my phone is like 1cm or less from the point A, or its 10cm or more from point A.
Can I determine this using single iBeacon? If so in what mode it should be run?
Thanks!
Sorry, this just isn't going to work with bluetooth beacons. There are several problems:
Each device (iPhone models, Android models) have a slightly different bluetooth antenna gain. The signal level and therefore estimated distance will be different for each. The range of error will be more then 1-10cm.
Some mobile device models are more than 10cm long. One part of the phone (with the antenna) might be 10cm away, and the other part 1cm away.
There is always radio noise. Radio noise will certainly cause distance estimates 1-10cm.
Signal reflections and near-field effects will make signal levels unpredictable at such close range.

What exactly is txPower for Bluetooth LE and how is it used?

I am trying to understand what exactly txPower is and how to use it, since I am planning to develop and Android app that uses Beacons.
I have seen 2 definitions online:
1.The transmitted power of the beacon.
2.The received power 1 meter away from the beacon.
How are these two definitions related?
Also, when transmitting a Beacon signal from a device using an app such as QuickBeacon, how do I determine what to set the power (txPower) to?
Most beacon formats contain a single byte in the transmission that indicates what the expected signal level should be when you are one meter away. This byte is sometimes called txPower (short for transmitted power) and sometimes measured power.
Do not confuse this with a second configuration setting on some beacon models that lets you vary how strongly the transmitter actually sends its broadcasts. This is typically called transmit power, which is why measured power is a less easily confused term.
The measured power field is used to make distance estimates. If the phone sees that its signal level is the same as the measured power field transmitted by the beacon, it knows it is exactly one meter away. If it has a stronger signal, it knows it is closer. If it has a weaker signal it knows it is further away. Using a formula, you can get a rough idea of the distance in meters.
Making this distance estimate accurate requires having the measured power field set properly to the expected signal level at one meter. It is often pre-configured into the beacon by the manufacturer, but it is typically adjustable. Why would you want to adjust it? If you place the beacon inside a cabinet, it might attenuate the signal. If you place the beacon against a metal wall, it might increase the signal due to reflections. For this reason, it is recommended that you calibrate a beacon by measuring and setting its measured power value after installation.
Calibration involves using a phone to measure the beacon signal level (using a measurement called the Received Signal Strength Indicator or RSSI, which is measured in dBm). To calibrate, you hold a phone with a typically performing bluetooth receiver (ideally an iPhone 6, but Nexus devices work well too) exactly one meter away from the beacon, and measure the average signal strength over 30 seconds. Many beacon configuration apps and tools like Locate for iOS and Android have calibration utilities.
Once you have the calibration value, you need to configure it inside your beacon per the manufacturer's instructions. This will give you more accurate distance estimates.
Check that issue maybe it helps:
Get Tx Power of BLE Beacon in Android also you could check out some devBytes from Google about BLE
https://www.youtube.com/watch?v=vUbFB1Qypg8
If you are using specific BLE beacons you need to referenced the datasheet and check how tx power is measured. As you already mentioned there is different definitions for it. During my dev I found that most suitable is that : txPower is measured in some distance from transmitter with way without obstacles. So if there is a wall for example txpower will be lower. Consider that.
txPower has defined the range of the Bluetooth signal to transmit the beacon.

How to measure the distance between an iPhone acting like an iBeacon and an Android device

I'm using my iPhone as an iBeacon device, and on the other side I have an Android 4.4.2 device scanning for the Bluetooth LE iBeacon signal from the iPhone. I searched for a good and easy way to calculate the distance between iBeacons and my Android phone, but I couldn't find anything that can help me with this.
Could you help me on this matter?
It's impossible to measure beacon distance accurately, I'm afraid, which is why Apple's own code just says "Immediate", "Near", "Far" and "Unknown". The best you can do is set up a reconstruction of the conditions you expect then do trial and error tests to map signal strength to probable distance. Trust me: I've spent a lot of time trying to do beacon distance measurement using a range of hardware.
Remember that the LE in Bluetooth LE means "Low Energy" – this stuff really is designed to use as little power as possible. That means the signal from iBeacons gets interrupted by people, walls and other objects. So, if I'm holding a beacon in my hand and put my phone next to it, I'll get a strong signal. If I move the beacon behind my back, the signal strength will collapse. If I just turn around, that has the same effect (for the same reason).
If you want to go down the "best you can do" approach, you effectively have to recreate at least partially the environment where your app will be used. So, if your app will be used in an office, find an office and place some beacons around there. Same for being in a shop.
Then get your app out and measure beacon strength at various distances to the beacon, potentially with obstacles in the way. With some averaging, you end up with something like "at 1 metre my signal strength was X, at 5 metres it was Y, at 10 metres it was Z", etc, and you then feed that into your distance calculation. It is, effectively, an educated guess.
If you find any library that claims to do beacon distancing for you, it just means they've taken their own educated guess based on their own signal strength testing.
One tip: if you're able to, stick your beacons to the ceiling. This minimises the chance of obstacles (read: people) getting between your beacon and your app.
We built a distance estimation formula into the Android Beacon Library of the form: d=A*(r/t)^B+C, where d is the distance in meters, r is the RSSI measured by the device and t is the reference RSSI at 1 meter. A, B, and C are constants. You can read more about it here. To use it with the library, you range for a beacon and then simply call:
beacon.getDistance();
This returns a distance estimate in meters. The library code is open source, so if you don't want to use the library you can copy the formula and use it directly.
As #TwoStraws notes, distance estimates are pretty rough guesses of how far a beacon is away, and the results you get vary with lots of factors:
The gain of the antenna on the receiving device. (Every Android device model is slightly different)
The noise on the A/D converter inside the phone that measures bluetooth signal strength.
The radio noise in the room.
Any obstructions between the transmitter and receiver.
Any surfaces (especially metal) that reflect radio signals.
Just be sure you set your expectations properly. Distance estimates are good for deciding if a beacon is close or far, or whether one beacon is closer than another. But they are less useful for measuring absolute distance.

Inconsistency in signal strength from bluetooth beacons - Kontakt.io

Recently we purchased a set of 6 beacons from Kontakt. For some reason the values of RSSI averaged over a period of time do not appear consistent. Could someone help me improve my understanding on the following questions?
If TxPower of a beacon is -77, what would be the standard deviation in the RSSI value returned by getRSSI() in an iPhone 5 at 1m from the beacon?
Would 2 beacons give more or less identical RSSI value, provided that they are placed in same orientation, same configuration(power level & advertising rate), same distance, same relative location from the same phone?
Would 2 beacons give same value for getProximity(), provided the above said similar conditions?
Moreover the batteries are draining at different rates even though all of these beacons are having similar settings for TxPower and Advertising Rate.
Thanks again.
In theory, you should get similar results with identical beacon transmitters configured the same way. RSSI will vary with radio noise, multipath and obstructions. If you can keep the physical environment identical between tests, you can eliminate multipath and obstructions from the equation, leaving only radio noise.
I don't have a standard deviation value, but if you are seeing an average RSSI of -77dBm at 1 m (that's what the TxPower calibration value means) then in practice you may see this number vary by about +/- 10dBm.
The radio noise means that nothing is ever perfectly repeatable (questions 2 and 3), but averaged over long periods of time, you should get similar results.
You can read more about beacon ranging here: http://developer.radiusnetworks.com/2014/12/04/fundamentals-of-beacon-ranging.html
Of course, it is also possible that your multiple beacons are not behaving the same way. I have no special knowledge of Kontakt beacons, so I cannot speak to that possibility.

How to improve Bluetooth distance measuring using RSSI?

For my project I need to estimate the distance between a Smartphone and a bluetooth module. The Estimation doesn't have to be very precise. I only need to determine the distance with a margin of error of about 50cm.
I did test the RSSI of two bluetooth modules at distance-steps of 10 cm. I measured the RSSI 5 times for each step and got the average of the 5 measurements. The averages are shown in the graph below:
The red and blue lines resemble the two Bluetooth modules. You can see that the results are not very linear. One of the reasons for this is interference, so i searched for ways to tackle the interference issue. Two ways i found are:
Signal Noise Ratio(SNR): Understanding ibeacon distancing
ratio of the iBeacon signal strength (rssi) over the calibrated transmitter power (txPower). The txPower is the known measured signal strength in rssi at 1 meter away: http://www.princeton.edu/~achaney/tmve/wiki100k/docs/Signal-to-noise_ratio.html
However i don't really understand how the above techniques would be used to get more accuracy. For SNR i need the Noise value, how do i even get the Noise value?
For ratio rssi/txPower, I can get the txPower by simply measuring the rssi at 1 meter from the module. So I know all the needed values. But I don't know what to do from here on out. How do i use these values to get a more accurate distance estimations?
Are there any other techniques i can use to improve accuracy?
You are running into the practical limitations on this technology. Getting estimation accuracy of +/- 50 cm may be possible under ideal conditions at short distances (under 2 meters) not at long distances of over 10 meters.
I wrote a longer blog post about the limits here: http://developer.radiusnetworks.com/2014/12/04/fundamentals-of-beacon-ranging.html
To answer your specific questions:
No, there is no practical way to know what part of a single RSSI measurement comes from signal and what part comes from noise. You can take an average over many samples, which partially removes noise if the transmitter and receiver are stationary over the sample interval.
The techniques you ask about do work to give you distance estimate, but they have the limitations of the technology described above.

Categories

Resources