Welcome!

IoT Expo Authors: Liz McMillan, Elizabeth White, Pat Romanski, Roger Strukhoff, Hovhannes Avoyan

Related Topics: IoT Expo, Java, Wireless, Linux, Web 2.0, Big Data Journal

IoT Expo: Article

How iBeacons Work for Indoor Location Based Services

Technical Guide and Recommendations

My colleague Peter Rogers is long suffering and obviously in need of sunshine.  He sacrificed his weekend to answer questions I presented him last week on the subject of iBeacons and how they work. I want to thank Peter for the following:

There is a lot of excitement about Apple's new iBeacon technology but most people still don't realise what it is or how to use it.

iBeacon is actually used in two contexts:

  1. It is primarily a Bluetooth Low Energy (BLE) Profile that enables a device to broadcast its relative position
  2. It is any hardware device that uses the iBeacon BLE Profile

The following paragraph illustrates this terminology effectively. A third-party beacon can use the iBeacon BLE profile to advertise its relative location and therefore be classed itself as an iBeacon. An iPhone can also use the iBeacon BLE profile itself to act as a Virtual iBeacon. In this case the power levels are generally higher and so you may get a more accurate result. There is nothing to stop an Android 4.3 device being able to use the iBeacon BLE profile to advertise itself as a Virtual iBeacon too. In fact any device that supports BLE can communicate using the iBeacon BLE Profile. The core difference that iOS 7 offers is that is normalises the results from the iBeacon (in order to avoid fluctuations) and it offers the new iOS 7 CLBeacon class within the CoreLocation framework.

Here are some interesting fun facts:

  • Apple does not produce iBeacon hardware
  • iBeacon is not the only BLE profile for beacons, there are others that predated it (S-beacon, Gimbal, GeLo)
  • Most beacons allow over the air (OTA) software updates which can be used to load the iBeacon profile
  • The beacons from different vendors often behave quite differently
  • iBeacons CANNOT reliably be used to pinpoint a precise indoor position - more on that later

The iBeacon BLE Profile does not have any payload. Instead it just sends three pieces of information:

  1. UUID - beacon manufacturer's unique identifier
  2. Major - a value that can identify a group of beacons (can be used for general region)
  3. Minor - a value that can identify an individual  beacon with a group (can be used for a specific location within that region)

The CLBeacon class offers three different properties for determining the distance from the beacon:

  1. Accuracy - the accuracy of the proximity value allegedly in meters - in practice this doesn't map directly to meters in most cases
  2. Proximity - the vague definition of proximity - immediate, near, far and unknown
  3. RSSI - the received signal strength of the beacon in decibels

The CLBeaconRegion class enables notifications when the iPhone detects that the range of an iBeacon has changed and this can be used to launch your App even if it was not running. The class also enables the construction of a Virtual Beacon whereby the iPhone itself uses the iBeacon BLE Profile to behave like an iBeacon.

This means that we can detect proximity to an iBeacon quite easily by using the Proximity property. In practice this means using the CLBeaconRegion class to set up notifications when we get a proximity of "immediate" to certain strategically positions iBeacons. The accuracy of the beacons can be increased by more power and changing the frequency of updates (the default varies per vendor). Increasing these two parameters obviously decreases the battery life. The simplest option is to look for cases where ‘the device is close to a beacon and the accuracy confidence is high' which translates into immediate zone. If you were however to put your hand in front of the device and the iBeacon, this can provide enough interference to push it back to the ‘near zone' although neither the device or beacon has actually moved.

Immediate Zone (0-20 cm) (0-8")
When a device is held up close to a beacon
Accuracy confidence is high

Near Zone (20 cm - 2 m) (8"- 6.5')
Within a couple of meters to the beacon
Accuracy is fairly certain

Far Zone (2 - 70 m) (6.5 - 230')
More than a few meters away
Accuracy is low or the signal strength is weak
[https://community.estimote.com/hc/en-us/articles/201029223-RSSI-Range-Zones-and-Distance-Accuracy]

A simple strategy is to have a Cloud hosted data set that determines the positions of the beacons for an App to dynamically load and refer to. If you try and hardcode the iBeacon positions or have a non-updateable configuration file then you would have to go through the Apple App Store review process every time you want to physically add a new iBeacon. You could also host other information such as broadcast messages, regions and what the major and minor versions actually represent. It would certainly be interesting to have Location Data Stores that can describe multiple indoor positioning systems and that you can look up based on UUID, major and minor. That could be perceived as a security risk in certain situations though.

There are definite differences between the beacon vendors, and things you should be looking into are as follows:

  • Secure firmware update over the air
  • Cloud management platform
  • iBeacon profile support
  • Configurable properties: radio output power; RSSI; iBeacon advertising interval; UUID, major; and minor
  • Developer SDK with documentation

If you buy beacons without the iBeacon profile pre-installed and they are not firmware updateable over the air then you are limited to older profiles. Likewise if the UUID is not configurable and not communicated in the documentation then you are locked into the vendor SDK. If the iBeacon advertising interval is very slow by default and not configurable then your beacons will be less accurate. Finally not being able to configure the power and RSSI means the beacons cannot be configured to be more accurate. http://localz.co/blog/ibeacon-ble-hardware-commercial-comparison/

There are also differences in the accuracy of iBeacons and associated SDKs as followed:

  • Drop-out rate
  • Consistency of beacon results amongst the same vendor
  • Correct implementation of measured power (he value of measured RSSI at a distance of one meter)
  • Change in accuracy due to rotation
  • Beacon interference with each other (not something that should have an effect)

http://blog.shinetech.com/2014/02/17/the-beacon-experiments-low-energy-bluetooth-devices-in-action/

The challenge comes when you want to try and use triangulation with the RSSI or accuracy properties in order to find out a precise location rather than ‘immediate', ‘near' or ‘far'. Using the accuracy property is best summed up by the following statement in the iOS 7 API documentation, "Accuracy indicates the one sigma horizontal accuracy in meters. Use this property to differentiate between beacons with the same proximity value. Do not use it to identify a precise location for the beacon. Accuracy values may fluctuate due to RF interference. A negative value in this property signifies that the actual accuracy could not be determined."

The distance estimate provided by iOS is based on the 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. iOS also normalises the values to negate the fluctuations.

"At first glance it would appear that accuracy does seem to resemble distance. However at 0.5 meters, the accuracy underestimated distance, and by 1.5 meters, accuracy was an overestimation of distance. I decided to extend the distance out to 8 meters to see if the accuracy continued increasing with distance, however over the course of 80 seconds the accuracy of the beacon only reported an accuracy of 3.87m - some 4.13 meters shy of 8 meters. This was less than convincing that accuracy was representing distance. In certain ranges with this beacon there does appear to be some correlation between accuracy and distance. I turned the power up to 100% (+4bBm) and measured the accuracy at the same varying distances. This time I was seeing a very close relationship between accuracy and distance between 1 and 5 meters, though it did start to slip at greater distances (however at 15 meters there were desks and computers obscuring the path, so perhaps this is expected)." http://blog.shinetech.com/2014/02/17/the-beacon-experiments-low-energy-bluetooth-devices-in-action/

One equation that sums up the way to calculate distance is as follows:
P(d)[dBm] = P(do)[dBm] - 10n log (d / d0) - Z

  • d             The distance we want to know
  • d0           A measure of distance for a known power output
  • n             The way the signal power degrades over distance
  • Z              The environmental effect (which is quite large).

http://www.codepilots.com/2014/03/ibeacons-accuracy/

To provide the algorithm for Android or to create your own custom version for iOS then you would need to do something like the following:

1.     Normalise the RSSI and txPower values

2.     Calibrate each IBeacon with the txPower value to allow accurate distance estimates.

3.     Measured a bunch of RSSI measurements at known distances, then do a best fit curve to match the data points

4.     Convert the best fit curve into an algorithm

protected static double calculateAccuracy(int txPower, double rssi) {
if (rssi == 0) {
return -1.0; // if we cannot determine accuracy, return -1.
}

double ratio = rssi*1.0/txPower;
if (ratio < 1.0) {
return Math.pow(ratio,10);
}
else {
double accuracy =  (0.89976)*Math.pow(ratio,7.7095) + 0.111;
return accuracy;
}
}
http://stackoverflow.com/questions/20416218/understanding-ibeacon-distancing/20434019#20434019

There are mainly five issues with the approach of triangulation for more accurate positioning:

1.     In non-controlled environments, where you can find metals, and other objects that affect the signal, the received signal strength of the beacons changes so often that it seems impossible to get an error range below 5 meters.

2.     Other devices using 2.4 GHz frequency might be interfering with the Beacons' signal.

3.     Depending on the way that the user is handling the receiver device, the readings can change a lot as well. If the user puts his/her hand over the bluetooth antenna, then the algorithm will have low signals as input, and thus the beacons will supposed to be very far from the device.

4.     The directionality of the beacons and the receiver affects the readings.

5.     The beacons and their SDKs all have a different effect on the accuracy of the results

http://stackoverflow.com/questions/20332856/triangulate-example-for-ibeacons

"Having completed these experiments, I've been able to conclude that achieving accurate distance measurements with a single beacon is potentially possible, provided you have the right beacon and the right brand. Out of eight beacons, I only found one that was consistently achieving accurate distances. Given that there is so much inconsistency between the beacons and there is no guarantee you will even receive a beacon in an order that does provide accurate results, it seems the only way to achieve accuracy is by using many beacons and averaging the results."
http://blog.shinetech.com/2014/02/17/the-beacon-experiments-low-energy-bluetooth-devices-in-action/

Recommendations

1.     Ceiling mounting of beacons reduces variance and the user blocking the path

2.     Signal transmission and reception are dependent on the orientation of both the transmitter and receiver

3.     Radio absorption by the user is significant in determining distance

4.     Other radio interference does not seem significant

5.     Clustering of beacons does not seem to have an impact

6.     The measured power does not decrease uniformly as we move away from the receiver, this is the biggest limiting factor in using this technology for accurate positioning

7.     Increasing the power to the beacons using the vendor SDK increases the relationship between accuracy and distance (on correctly configured beacons)

8.     One mooted solution is to try to set up a beacon every X meters (X being the maximum error tolerated in the system) so we can track on this beacons grid the position of a given device by calculating which beacon on the grid is the closest to the device and assuming that the device is on the same position

9.     Choose the beacon vendor carefully based on online reports because functionality does vary a lot

10. Use lots of beacons and take an average due to drop out rates and inconsistency amongst beacons in the same place

I leave you some other reading material and the general advice that using relative proximity is probably a far lot simpler than trying to implement precise location. That means designing your solution architecture and physical deployment appropriately. I can see the ability to track a user through a shopping centre of airport, but the ability to pinpoint out a product in a retail store will be challenging unless beacons with very high power levels are used and ceiling mounted.

Additional Resources:

************************************************************************

Kevin Benedict

Writer, Speaker, Editor

Senior Analyst, Digital Transformation, EBA, Center for the Future of Work Cognizant

View my profile on LinkedIn

Learn about mobile strategies at MobileEnterpriseStrategies.com

Follow me on Twitter @krbenedict

Browse the Mobile Solution Directory

Join the Linkedin Group Strategic Enterprise Mobility

Join the Google+ Community Mobile Enterprise Strategies

Recommended Strategy Book Code Halos

Recommended iPad App Code Halos for iPads

 

***Full Disclosure: These are my personal opinions. No company is silly enough to claim them. I am a mobility and digital transformation analyst, consultant and writer. I work with and have worked with many of the companies mentioned in my articles.

More Stories By Kevin Benedict

Kevin Benedict is the Senior Analyst for Digital Transformation at Cognizant, a writer, speaker and SAP Mentor Alumnus. Follow him on Twitter @krbenedict. He is a popular speaker around the world on the topic of digital transformation and enterprise mobility. He maintains a busy schedule researching, writing and speaking at events in North America, Asia and Europe. He has over 25 years of experience working in the enterprise IT solutions industry.

Latest Stories from IoT Journal
Explosive growth in connected devices. Enormous amounts of data for collection and analysis. Critical use of data for split-second decision making and actionable information. All three are factors in making the Internet of Things a reality. Yet, any one factor would have an IT organization pondering its infrastructure strategy. How should your organization enhance its IT framework to enable an Internet of Things implementation? In his session at Internet of @ThingsExpo, James Kirkland, Chief Architect for the Internet of Things and Intelligent Systems at Red Hat, will describe how to revolutionize your architecture and create an integrated, interoperable, reliable system of thousands of devices. Using real-world examples, James will discuss the transformative process taken by companies in moving from a two-tier to a three-tier topology for IoT implementations.
Where historically app development would require developers to manage device functionality, application environment and application logic, today new platforms are emerging that are IoT focused and arm developers with cloud based connectivity and communications, development, monitoring, management and analytics tools. In her session at Internet of @ThingsExpo, Seema Jethani, Director of Product Management at Basho Technologies, will explore how to rapidly prototype using IoT cloud platforms and choose the right platform to match application requirements, security and privacy needs, data management capabilities and development tools.
We were in contact recently with Shrikant Pattathil (pictured below), Executive Vice President of Harbinger Systems. Here are some of his thoughts about healthcare, the IoT, and disruption: IoT Journal: Healthcare, with all of its systems and dataflows, seems an ideal area for IoT solutions. What is Harbinger Systems doing in this area? Shrikant Pattathil: Being a service provider we work with many product development companies who are building new IoT-based applications to solve problems that plague the healthcare industry. For example, there is a need for applications to manage your medicine dosage, seek help, and notify your care provider. IoT Journal: And how do you go about addressing these problems? Shrikant: We are approaching IoT from mobile and cloud perspective. These are our key strengths. We are helping product companies in IoT space to quickly build the mobile interfaces for their product offerings. We are also helping them to place the data on the cloud in a secure way, so that they can truly exploit the benefits of IoT. IoT Journal: What are the advantages of the IoT here? Cost? Better care? What sorts of metrics can be applied, and are there intangibles as ...
The Internet of Things (IoT) is rapidly in the process of breaking from its heretofore relatively obscure enterprise applications (such as plant floor control and supply chain management) and going mainstream into the consumer space. More and more creative folks are interconnecting everyday products such as household items, mobile devices, appliances and cars, and unleashing new and imaginative scenarios. We are seeing a lot of excitement around applications in home automation, personal fitness, and in-car entertainment and this excitement will bleed into other areas. On the commercial side, more manufacturers will embed sensors in their products and connect them to the Internet to monitor their performance and offer pro-active maintenance services. As a result, engineers who know how to incorporate software and networking into their mechanical designs will become more in demand.
The Domain Name Service (DNS) is one of the most important components in networking infrastructure, enabling users and services to access applications by translating URLs (names) into IP addresses (numbers). Because every icon and URL and all embedded content on a website requires a DNS lookup loading complex sites necessitates hundreds of DNS queries. In addition, as more internet-enabled ‘Things’ get connected, people will rely on DNS to name and find their fridges, toasters and toilets. According to a recent IDG Research Services Survey this rate of traffic will only grow. What’s driving this increase? The growth in volume is largely attributed to the rollout of new services and applications along with expanding migration to the cloud and traffic spikes. The Internet of Things will also place a strain on DNS services. Are you ready for this surge of new services and applications along with potential DNS threats?
Technology is enabling a new approach to collecting and using data. This approach, commonly referred to as the “Internet of Things” (IoT), enables businesses to use real-time data from all sorts of things including machines, devices and sensors to make better decisions, improve customer service, and lower the risk in the creation of new revenue opportunities. In his session at Internet of @ThingsExpo, Dave Wagstaff, Vice President and Chief Architect at BSQUARE Corporation, will discuss the real benefits to focus on, how to understand the requirements of a successful solution, the flow of data, and how to best approach deploying an IoT solution that will drive results.
Building low cost wearable devices can enhance the quality of our lives. In his session at Internet of @ThingsExpo, Sai Yamanoor, Embedded Software Engineer at Altschool, will provide an example of putting together a small keychain within a $50 budget that educates the user about the air quality in their surroundings. He will also provide examples such as building a wearable device that provides transit or recreational information. He will review the resources available to build wearable devices at home including open source hardware, the raw materials required and the options available to power such wearable devices.
P2P RTC will impact the landscape of communications, shifting from traditional telephony style communications models to OTT (Over-The-Top) cloud assisted & PaaS (Platform as a Service) communication services. The P2P shift will impact many areas of our lives, from mobile communication, human interactive web services, RTC and telephony infrastructure, user federation, security and privacy implications, business costs, and scalability. In his session at Internet of @ThingsExpo, Erik Lagerway, Co-founder of Hookflash, will walk through the shifting landscape of traditional telephone and voice services to the modern P2P RTC era of OTT cloud assisted services.
IoT is still a vague buzzword for many people. In his session at Internet of @ThingsExpo, Mike Kavis, Vice President & Principal Cloud Architect at Cloud Technology Partners, will discuss the business value of IoT that goes far beyond the general public's perception that IoT is all about wearables and home consumer services. The presentation will also discuss how IoT is perceived by investors and how venture capitalist access this space. Other topics to discuss are barriers to success, what is new, what is old, and what the future may hold.
Launched this June at the Javits Center in New York City with over 6,000 delegate attendance, the largest IoT event in the world, 2nd international Internet of @ThingsExpo will take place November 4-6, 2014, at the Santa Clara ConventionCenter in Santa Clara, California with estimated 7,000 plus attendance over three days. @ThingsExpo is co-located with 15th international Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading IoT industry players in the world. In 2014, more than 200 companies will be present at the @ThingsExpo show floor, including global players, and hottest new technology pioneers.
Enthusiasm for the Internet of Things has reached an all-time high. In 2013 alone, venture capitalists spent more than $1 billion dollars investing in the IoT space. With “smart” appliances and devices, IoT covers wearable smart devices, cloud services to hardware companies. Nest, a Google company, detects temperatures inside homes and automatically adjusts it by tracking its user’s habit. These technologies are quickly developing and with it come challenges such as bridging infrastructure gaps, abiding by privacy concerns and making the concept a reality. These challenges can’t be addressed without the kinds of agile software development and infrastructure approaches pioneered by the DevOps movement.
I write and study often on the subject of digital transformation - the digital transformation of industries, markets, products, business models, etc. In brief, digital transformation is about the impact that collected and analyzed data can have when used to enhance business processes and workflows. If Amazon knows your preferences for particular books and films based upon captured data, then they can apply analytics to predict related books and films that you may like. This improves sales. This is a simple example, but let me tell you what I learned yesterday in sunny and warm San Francisco about more complex applications.
As the Internet of Things gains momentum, the focus has been on securing billions of IoT devices and the servers that orchestrate their connectivity. However, the greatest security and authentication risks reside within the communications among devices and servers. In his session at Internet of @ThingsExpo, Todd Greene, Founder & CEO of PubNub, will discuss the top 10 challenges in securing IoT communications that, unsolved, render it impossible to deliver a secure IoT rollout. Learn the requirements for a ubiquitous, secure, bi-directional communication protocol for IoT. Specific design patterns to deliver secure device updates, as well as comprehensive solutions for malware defense and security credential management will also be shared.
The worldwide cellular network will be the backbone of the future IoT, and the telecom industry is clamoring to get on board as more than just a data pipe. In his session at Internet of @ThingsExpo, Evan McGee, CTO of Ring Plus, Inc., to discuss what service operators can offer that would benefit IoT entrepreneurs, inventors, and consumers. Evan McGee is the CTO of RingPlus, a leading innovative U.S. MVNO and wireless enabler. His focus is on combining web technologies with traditional telecom to create a new breed of unified communication that is easily accessible to the general consumer. With over a decade of experience in telecom and associated technologies, Evan is demonstrating the power of OSS to further human and machine-to-machine innovation.
Whether you're a startup or a 100 year old enterprise, the Internet of Things offers a variety of new capabilities for your business. IoT style solutions can help you get closer your customers, launch new product lines and take over an industry. Some companies are dipping their toes in, but many have already taken the plunge, all while dramatic new capabilities continue to emerge. In his session at Internet of @ThingsExpo, Reid Carlberg, Senior Director, Developer Evangelism at salesforce.com, to discuss real-world use cases, patterns and opportunities you can harness today.