iBeacon Microlocation Accuracy

Customers often ask us the accuracy when locating beacons. In order to get the answer, its necessary to understand different ways of locating and the tradeoffs that are needed to get the different levels of accuracy.

There are two types of locating, received signal strength (RSSI) based and angle of arrival direction finding (AoA).

Locating using RSSI

There are two main scenarios. The first is a where the detector, usually a phone or gateway, is at a known location and the beacon moves. The second is where the beacons are fixed and the detector moves. Either way, the detector receives a unique beacon id and the receiving electronic circuitry provides the strength of the received signal.

The value of the RSSI can be used to infer the distance from the detector to the beacon. The main problem with RSSI is that it varies too much, over time, to be used to accurately calculate distance. The direction also isn’t known when there’s only one beacon and one detector. The varying RSSI, even when nothing is moving, is caused by the Bluetooth radio signals that are reflected, deflected by physical obstacles and interfered with by other devices using similar radio frequencies. Physical factors such as the room, the beacon not uniformly emitting across a range of 360 degrees, walls, other items or even people can affect the received signal strength. How the user holds a detecting phone can affect the effectiveness of the antenna which in turn affects the signal strength.

The varying RSSI can be smoothed by averaging or signal processing, such as Kalman filtering, to process multiple RSSI values over time. The direction not being known can be solved by using trilateration where three gateways (or beacons depending on the above mentioned scenario) are used to determine the distance from three directions and hence determine the 2D location.

Trilateration

The aforementioned physical factors that affect RSSI can be reduced by measuring the actual RSSI at specific locations and hence calibrating the system.

The change of RSSI with distance is greater when the beacon is near the detector. At the outer reaches of the beacon signal, the RSSI varies very little with distance and it’s difficult to know whether the variance is due to a change of distance or radio noise. Hence for systems that use signal processing, trilateration and calibration tend to achieve accuracies of about 1.5m within a shorter range confined space and 5m at the longer distances.

However, such systems have problems. The multiple RSSI values needed for averaging or signal processing mean that you either have to wait a while to get a location fix or have the beacons transmit more often (with a shorter period) that flattens their batteries much sooner. Trilateration requires at least three devices per zone so can be costly and require significant time to setup and maintain. Using calibration is like tuning a performance car. It works well until something small changes and it needs re-tuning. If someone adds a room partition, desk or even something as simple as lots of people in the room, the calibration values become invaid. Re-calibration takes human effort and, pertinently, it’s not always easy to know when it needs re-tuning.

An alternative to trilateration is zoning. This involves putting a detector (or beacon depending on the above mentioned scenario) in each room or zone. The system works out the nearest detector or beacon and can work on just one RSSI value to get a fix quickly. The nearest zone is often all that’s required of most implementations. With zoning, if you need more accuracy in a particular zone you add more detectors in the area to get up to the 1.5m accuracy of other methods. This will obviously be impractical if you need 1.5m accuracy everywhere over a large area.

BeaconRTLS™ area zones

Angle of Arrival Locating

An alternative to trilateration and zoning is more expensive Bluetooth hardware and more complex software that makes use of Angle of Arrival (AoA). Locator hardware with multiple antennas uses Bluetooth Direction Finding to find assets to better than 1m accuracy. Location engine software uses the difference in the time of receiving the signals at multiple antennas to calculate the position. Multiple locators can also be used to cover larger areas and/or improve the accuracy using triangulation.

Unlike RSSI systems where any beacons can be used, locators tend to be tied to using the same manufacturers’ beacons. The complex hardware and software has less throughput and supports fewer beacons. The computing hardware needs to be more powerful. Systems need careful, accurate site measurements to achieve good accuracy.

Summary

Choosing a solution just because it is more accurate, rather than needed, will cost significantly more not just in hardware but in software cost, setup effort and maintenance. Work out what accuracy you need and then seek out an appropriate solution.

Standard vs Proprietary Technology

There’s a thought provoking article, by Lorenzo Amicucci, on the Nordic Semiconductor blog on End-User Factors Impacting Industrial IoT Connectivity. Nordic is the manufacturer of the System-on-a Chip (SoC) in most beacons and Lorenzo is one of their Business Development Managers. While the article talks about Industrial IoT Connectivity and by implication Bluetooth Mesh, the insights are applicable to any project that has to choose between standard or proprietary technology.

The main conclusion is that the best solution from a technical perspective is not always best for the customer. Instead, the best solution should depend on the longer-term business strategy. While a proprietary technology can have the advantage of differentiating your offering it can suffer from future limited supplier availability and possibly shorter lifetime of the technology. Large rollouts:

“…want the confidence that a huge capital spend won’t be wasted on a technology that will be left obsolete in a couple of years.”

More specfically, new and second sourced products from other vendors need to guarantee interoperability for the lifetime of your project.

Read about Generic Beacons

BeaconRTLS™ v2

A new v2 version of our BeaconRTLS™ has become available. The previous version of our RTLS works great but it needs relatively powerful hardware and was complex to install such that only we could install. While the older version will still be used for our clients that need extremely large throughput, most new customers will now use v2 that works on a greater range of hardware and has a simple setup allowing us to offer it to qualified resellers.

Projects are supplied as a self-install for dedicated, VPS or cloud servers.

More information is available at beaconrtls.net.

Bluetooth Beacon Security

We sometimes get asked about Beacon security. Beacons use Bluetooth so the underlying security is that provided by Bluetooth 4.0. There’s a great new video by Ellisys, who create Bluetooth test equipment, that explains the threats and mitigations:

In the context of beacons, the mentioned perisistent bonding never happens. Pairing is temporary. Also, beacon manufacturers often layer additional security on top of Bluetooth in the form of pins or passwords required to set up the beacon.

As the underlying Bluetooth communication is relatively secure, the main beacon security issues tend to be related to spoofing (the possibility of beacons pretending to be yours). However, this is usually only pertinent in security sensitive scenarios such as payment. Contact us if you need more advice on beacon security.

New Arduino BLEPad in Stock

We have the new Arduino BLEPad in stock. It’s a small wearable ‘Lilypad’ style board that includes a DA14580 BLE module for communication via Bluetooth 4.0 (LE) as per our other beacons.

BLEPad 31mm x 31mm

The BLEPad differs to other LilyPad boards in that the ATmega32u4 has built-in USB communication, eliminating the need for a separate USB-to-serial adapter. This allows the BLEPad to appear to a connected computer as a mouse and keyboard, in addition to a virtual (CDC) serial / COM port.

New ABKey01 Beacon in Stock

We have the new ABKey01 beacon in stock. This beacon is different in that it can send out extra beacon advertising for 30 seconds when the button is pressed.

This beacon is based on the low power DA14580 SoC which means the CR2032 battery (not included) can last up to 1.5 years.

New BeaconServer™ Software

For a while now, we have had enquiries from companies interested in our BeaconRTLS but not wanting the whole thing. In some scenarios such as IoT, machine learning and even locating you just want to collect data and not visualise it on maps/plans. Also, our BeaconRTLS™ was found to be overkill for small scale projects that don’t need the extremely high throughput.

Today, we have released BeaconServer™. It’s a ready-made system to collect multi-location beacon advertising data and make it available to other people, systems and apps. It allows you to collect, save and query beacon data without any coding.

BeaconServer™ comes in the form of a self install. Please see the BeaconServer web site  for more information.

Hybrid vs Native Apps and Cross Platform Tools?

When creating apps to discover beacons, there’s often the temptation to use cross platform tools to create both iOS and Android apps at the same time. Such tools are often based on web (WebView screen) technologies and Javascript.

The first problem you will encounter is that few of the cross platform tools support Bluetooth. Even if they do, they don’t support it to the degree required to implicitly use the latest iOS and Android Bluetooth APIs. This is one of the main problems with cross platform in that functionality always trails the underlying native OS functionality.

Another problem is that there’s no one Android browser upon which the WebViews are based. Niels Leenheer has a (old but still relevant) set of slides that explains how browsers vary across Android versions, devices and phone manufacturers. The consequence of this is that getting any non-trivial WebView-based app to work across many device types is very difficult.

The next problem is functionality. It not only lags the underlying OS functionality in the use of APIs but also features are absent. This often requires some native coding which causes the app to become more of a Frankenstein creation with consequent unexpected complexities.

For best performance and OS look and feel you have to use native development. It’s possible for hybrid apps to look and feel like Android and iOS but it takes a lot of effort due to the previously mentioned browser fragmentation. It’s possible to get near-native app performance by replacing (bundling) a better Javascript interpretor. However, these extra complexities are what you were trying to avoid by using the cross platform framework in the first place.

If the above doesn’t persuade you, even Mark Zuckerberg regretted using web technologies in apps in 2015. This didn’t stop others trying. There are some detailed posts on Medium explaining how AirBnB is moving back to native development and how the difficulties are not just technical but also organisational.

If you are writing apps or getting apps written we recommend you save yourself some grief and write them using native code.

Read about our development services

What New Things Could Machine Learning Enable?

Benedict Evans of Andreessen Horowitz, a venture capital firm in Silicon Valley, has a thought-provoking blog post on Ways to Think About Machine Learning.

Benedict asks what new things machine learning (ML) could enable. What important problems might it actually be able to solve? There are (too) many examples of machine learning being used to analyse images, audio and text, usually using the same example data. However, the main question for organisations is how can they use ML? What should they look for in data? What can be done?

Much of the emphasis is currently on making use of existing captured data. However, such data is often trapped in siloed company departments and usually needs copious amounts of pre-processing to make it suitable for machine learning.

We believe some easier-to-exploit and more profound opportunities exist if you use new data from sensors attached to physical things to create new data. Data from physical things can provide deeper insights than existing company administrative data. The data can also be captured in more suitable formats and can be shared rather than stored by protectionist company departments.

For example, let’s take movement xyz that’s just one aspect of movement that can be detected by beacons. Machine learning allows use of accelerometer xyz motor vibration to predict the motor is about to fail. Human posture, recorded as xyz allows detection that patients are overly-wobbly and might be due for a fall. The same human posture information can be used to classify sports moves and fine tune player movement. xyz from a vehicle can be used to classify how well a person is driving and hence allow insurers provide behavioural based insurance. xyz from human movement might even allow that movement to uniquely identify a person and be used as a form of identification. The possibilities and opportunities are extensive.

As previously mentioned, the above examples are just one aspect of movement. If you also consider movement between zones, movement from stationary and fall detection itself, more usecases become evident. Sensor beacons also allow measuring of temperature, humidity, air pressure, light and magnetism (hall effect), proximity and heart rate. There are so many possibilities it can seem difficult to know where to start.

One solution is to look at your business rather than technical solutions or even machine learning. Don’t expect or look for a ready-made solution or product as the most appropriate machine learning solutions will usually need be custom and proprietary to your company. Start by looking for aspects of your business that are currently very costly or very risky. How might more ‘intelligence’ be used to cut these costs or reduce these risks?

Practical examples are How might we use less fuel? How might we use less people? How might we concentrate on the types of work that are least risky? How might be preempt costly or risky situations? How might we predict stoppages or over-runs?

Next, use your organisation domain experts to assess what data might be needed to measure data associated with these situations. Humans often have insight that patterns in particular data types will help classify and predict situations. They just can work out the patterns. That’s where machine learning excels.

Read About AI Machine Learning with Beacons