Keywords

1 Introduction

Smart devices and digital technologies have changed our day to day lives. The multi-functional devices are increasing the computation power and the ability to do the task than ever before, for example, the smartphone, smartwatch, etc. The smartphone has revolutionized the communication way and changed the concept of personal computers [1]. In modern life, people use smartphones for various purposes besides talking and texting, including entertainment, navigation, safety systems, as a monitoring device, etc. Statistics show more than three billion people currently use the smartphone in the world [2]. The smartphone is the booming industry, and in the future, this device will be attached to our daily lives permanently. Moreover, smart cities are providing more services that are accessible to the smartphone. The manufacturers are adding smart technologies and functions to the phone to make compatible with those services. For example, the city provides the condition of the roads to residents beforehand to avoid traffic congesting and increase mobility, the weather condition, block by block air quality, amenities finding, and so on [3,4,5,6]. In addition, various researchers are discovering new ways to help peoples with disabilities, especially those who have a visual impairment [7]. However, location accessibility and the internet is required for most of these services. The Global Positioning System (GPS) is a widely used technology for navigation, localization, tourism, and engineering. The accuracy of GPS depends on a strong signal between the user and the navigational satellite. The lack of GPS signals in the indoor environment and the horizontal error of accuracy in outdoor often limit its uses. For that, the quality of GPS data collected using smartphones is not comparable with the dedicated GPS receiver. There is a trade-off between accuracy and battery consumption of smartphones for positioning.

Beacon technology with other IoT is integral now in smart cities to accomplish sustainability and accessibility. Both the industrial and public sectors are adopting this technology to easing civic life. For example, the City of Columbus, Georgia, USA, established a network containing more than 1000 beacons at the Chattahoochee Riverwalk. The city police will be notified of the location by this network if there is any suspicious activity occurred [8]. According to a report from ABI Research (a US technology market intelligence company), more than 500 million beacons will have been shipped by 2021 [9]. In 2013, Apple first popularised these geo-location transmitters; it is designed to interact with Bluetooth enabled devices, such as smartphones, tablets, cars, etc. There are already over 8.2 billion Bluetooth-equipped devices globally, and that number does not include just tablets and smartphones. Over 90% of vehicles released in 2016 were expected to have the technology [10]. Cities are using beacon technology to solve one of the most visible consequences of urban population growth; transportation, and traffic congestion. Different bodies of the city embedding these devices independently. For example, the emergency management department, traffic management, police, waste management, etc. In addition, private companies, such as Walmart, Macy’s, Apple inc, etc., installing beacons at their stores for better customer engagement, navigation, advertising purpose. The debate between BLE, WiFi, and GPS in terms of accuracy, energy, and accessibility is not new. But in urban life, when the users need to handle the micro-location proximity-based activities, the BLE beacons give better accuracy in those activities. In addition, though smartphones are invaluable in daily life nowadays. Their battery consumption limits their usefulness, which provokes frequent charging. The companies are struggling with power consumption in GPS technology. Many mobile devices use Bluetooth Low Energy (BLE) technology to realize wireless communication connections to address this problem.

Contributions

The contributions of this paper are as follows:

  1. 1.

    We proposed a generic architecture in an urban environment using beacons and smartphones for micro-positioning.

  2. 2.

    We provided an access-control based mechanism which allows implementing and operating such a system by protecting user privacy.

  3. 3.

    We set up a testbed in urban areas using BLE beacons and smartphones. The results show it improves the horizontal error by 10–40%.

Organization

The rest of this chapter is organized as follows:

  • Section 2—Background of GPS and Bluetooth based positioning.

  • Section 3—System requirements and architecture.

  • Section 4—Test deployment.

  • Section 5—Findings from the experiments.

  • Section 6—Concluding remarks.

2 Background

Modern smartphones have the functionality for both Global Positioning System (GPS) and Assisted GPS (A-GPS). The GPS draws its information from the satellites orbiting the Earth. AGPS draws its information from local cell towers and enhances the performance of standard GPS on mobile devices connected to a cellular network [11]. However, GPS and A-GPS’s position accuracy at the mobile is not accurate where GPS signals are weak or unavailable, especially in the urban areas [12]. Early study found the average location accuracy of GPS enabled devices (i.e., iPhone, iPod, iPad, etc.) between 108 and 655 m [13]. Mok et al. [14] found the accuracy is around 20 m in one study using GPS enabled devices. More recently, a study found that the smartphone’s GPS accuracy is between 6–13 m [15]. However, this level of accuracy is often influenced by the characteristics of the landscape of the city. In addition, this accuracy can be achieved in the outdoor environment; usually, the GPS signal is not accessible in the indoor or a building.

BLE beacons have been using for tracking and positioning the people and assets for several years in the indoor. For example, Apple Inc. installed beacons in the 254 Apple Store in the United States to better customer experience. Using these beacons, they give the products, deals, and notifications to the customer. The department store chain Macy’s installed over 4000 beacons in their stores in 2014 for the same reason as Apple Inc. To help the visually impaired people at London’s Underground network, the Royal London Society for Blind People (RLSB’s) developed an app called “Wayfindr” [16]. The application receives the signal from pre-installed beacons at the subway and provides the turn by turn audio navigation to the users. It also provides the obstacles information within the route to the user to avoid the collision. Multiple research has been conducted to get the proper indoor location using beacons [17,18,19]. Cheraghi et al. [20] designed a Bluetooth beacon-based navigation system for vision-impaired individuals, allowing them to use a Bluetooth enabled cell phone to describe topology and offering real-time notifications about large indoor spaces. Beak et al. developed an underground navigation system using Bluetooth beacon to facilitate mining operations [21]. Jung et al. [22] used the Bluetooth beacon to measure the transport time of mining equipment in underground mines.

2.1 Bluetooth Beacons

Bluetooth Low Energy (BLE) beacons or BLE beacons are small devices that broadcast wireless signals in a specific range to other electronic devices [23]. BLE beacon is a one-way communicator and cannot broadcast a large amount of data. It is part of Bluetooth 4.0 [24] and currently supports most of the Bluetooth enabled smartphones. The power consumption in BLE beacons technology is relatively low as it broadcast only a small size of data with the identifying information. These hardware devices are used in scenarios where energy consumption is more important than data transfer speed. It does not know how many beacons or receiving devices are in the area, and it does not connect with them. An example of a high-level beacon operation is shown in Fig. 1.

Fig. 1
figure 1

Most of the modern smart devices now support the BLE beacons. The device receives the signal and take subsequent action accordingly

A beacon broadcasts a signal to all nearby devices that can receive the Bluetooth signal, i.e., the devices with a Bluetooth receiver and the receiver is on. The receiver can catch signals from the devices and identify the distance from where the signal has come from. All modern smartphone supports BLE technology. For example, the Android phone newer than Jelly Bean (Android version 4.3) or iPhone newer than version 4 supports the BLE technology. Several BLE beacon manufacturer companies compete in the market, including EstimoteFootnote 1, RadBeaconFootnote 2, BlueCatsFootnote 3, KontaktFootnote 4, GimbalFootnote 5.

2.2 BLE Beacons Protocols

The standards of communication and message format are beacon protocols. There are different type of beacon protocols exists. iBeacon and Eddystone are the most popular. Both protocols have some specific terminology and standards.

iBeacon:

iBeacon introduced by Apple, was the first BLE beacon technology [25]. iBeacon broadcast four types of information:

  1. 1.

    UUID: Universally Unique Identifier, this is a 16-byte string used to differentiate a large group of related beacons.

  2. 2.

    Major: A 2-byte string, identifying a subset of beacons within a large group.

  3. 3.

    Minor: A 2-byte string, identifying a specific beacon within the subset.

  4. 4.

    Tx Power: Transmission Power is used to determine proximity (distance) from the beacon. TX power is defined as the strength of the signal exactly 1 m from the device.

Eddystone:

Announced by Google, is another protocol that defines a BLE message format for proximity beacon messages [26]. The Eddystone protocol transmits these different frames-types:

  1. 1.

    Eddystone-UID: A 10-byte Namespace component and a 6-byte Instance component, which is used to identify the individual beacon.

  2. 2.

    Eddystone-EID: similar to UID, but “encrypted”. Only authorized apps and services can make use of it.

  3. 3.

    Eddystone-URL: A short URL encoded directly into the packet.

  4. 4.

    Eddystone-TLM: telemetry data such as battery voltage, uptime, etc.

3 System Design

3.1 System Requirements

Our high-level goal in this research is to design a framework to determine position using a smartphone. The desired properties of our system include:

  1. 1.

    The system should work without any other communication medium in basic mode. On top of that, it can provide additional functionality with the help of other beacons and Internet.

  2. 2.

    The system should be portable. It would be deployed with minimal human cost and accessible to everyone.

  3. 3.

    The available beacons in a specific region should work combinedly where possible to get better accuracy.

3.2 System Components

There are three components of our proposed systems:

  1. 1.

    Bluetooth Low Energy Beacons.

  2. 2.

    A Mobile Application for the Users

  3. 3.

    A Backend Server.

There are two modes in the mobile application; the basic mode can work without communicating with the server; no other service (i.e., the Internet) is required for positioning. The advance mode sends data to the server and receives the data (i.e., ID, Type, etc.) for the beacons. In addition, we can remotely monitor the beacons by sending data to the server. Figure 2 shows the architecture of the system.

Fig. 2
figure 2

A high-level architecture of the proposed system

3.3 Mobile Application

The Bluetooth enabled devices can receive the beacon signal. For that, we have developed a mobile application to capture the signal and determine the position. We developed the application for both Android and iOS platforms. The android application supports Android 6.0 (Marshmallow) or the newer version, where the iOS supports the iOS version 12.1 or newer. In both versions, Bluetooth service permission is required. There are some benefits in the iOS versions; the OS handles the allocation (enables/disable) of required services. So it manages all the services in an efficient way. In contrast, in the Android application, the app requests the service, and OS gives permission to use it. So the application needs to handle it carefully. After calculates the nearest beacon from the multiple signals, the application shows the distance to the user. Figure 3 shows the mobile application for Android and iPhone.

Fig. 3
figure 3

Mobile application interface, (a) Android Phone: shows the nearest beacon distance in a specific zone. (b) iPhone: shows the nearest Restroom

3.4 Distance Calculation

BLE beacons offer excellent potential to calculate the distance. The Received Signal Strength Indicator (RSSI) represents the relationship between transmission and received power [27]. The signal strength depends on distance and Broadcasting Power value. The distance calculated in this project by the following formula:

$$\displaystyle \begin{aligned} RSSI = - (10 \times n)log_{10}(d) + A \end{aligned}$$

where, d = distance; A = txPower; and n = signal propagation constant. In this formula, RSSI is the radio signal strength indicator in dBm. In free space n = 2, but it will vary based on local geometry, for example, in urban areas, a wall will reduce RSSI by approximately 3dBm and will affect n accordingly. Upon receiving the signal, the smartphone application determines the approximate distance from the beacon with relative accuracy using the signal strength. The application must identify unique information about the beacons. Although, the distance calculations are performed in real-time, it takes some time (not more than 2 s) to receive the signal. The user can get an RSSI signal from the multiple beacons at the same time. However, it is crucial to determine the difference between multiple signals. In addition, the triangulation of multiple signals is also necessary to accurately detect a user’s position and direction. For that, we need to calculate the ordering of the nearest distances. Algorithm 1 shows the procedure to find the nearest beacons.

Algorithm 1 Nearest Beacons

3.5 User Direction Using Beacon-Signal and Time

We have calculated the direction of the user using the beacon signal and time. If the distance decreases with respect to the time, then the user is going toward the beacons. The direction will be opposite if the distance is increasing. We divide the beacon signals into three portions; immediate, near, and, far; where the most intense signal means immediate and far means the low signal.

3.6 Message Format and Server Communication

BLE beacon application communicate to the server through Application Programming Interface (API). As several beacons protocol is available, the server keeps identifiable pieces of information and signal data along with receiver sensor data. The application has to send the basic beacon data, such as UUID/EUID, Group information, distance, etc. Table 1 shows the required parameter to send data from the receiver application to the server:

Table 1 Message format for send data from the receiver to the server

4 Test Deployment

To test the feasibility of the system, we have set up a testbed. The testbed contains multiple regions on an urban university campus, including traffic intersection localization, amenities positioning in the metropolitan area, detour alert, etc. The Bluetooth enabled devices captured these signals and detected the user positions. We used Bluetooth beacons developed by Estimote.Footnote 6 Broadcasting power for all of the beacons are set at +4 dBm, a power that is effectively expected to transmit signals at a distance of up to 100 m. This distance is sufficient for our setup. We have set the advertising interval to 100 ms because we need the most stable signal possible. Figure 4 shows installed beacons at the experimental site.

Fig. 4
figure 4

Some installed beacons at the testing sites

We continuously monitor battery life remotely using the Estimote cloud console and replace beacon batteries if needed. We used Amazon Web Services (AWS)Footnote 7 to store the data collected from users. We created an AWS Elastic Computer Cloud (EC2) virtual machine instance and implemented all the necessary API for communication between the smartphone and server. For storing data, we used the AWS Relational Database Service (RDS). The mobile application does not collect any data or perform any calculation outside of the target location used in the study.

4.1 Practical Challenges and Mitigation Strategies

The Bluetooth beacons transmit radio signals around every direction in a spherical way. To get the accurate signal, we need to set up the beacons in a proper and optimal way. During the study, we have faced several challenges while establishing the experiment. There are several issues that affect the distance calculation that ultimately makes the triangulation process more challenging. Here, we discuss the challenges we faced during deployment and how we resolved them.

4.1.1 Beacon Placement and Orientation

The beacons transmit the signals spherically at the environment. However, the facing is important during the placement; the signal strength of beacons on the front side (i.e., the side that faces the user) was adequate to meet our requirements. It is much weaker than expected on the rear side of the posts. Through trial and error, we determined the optimal placement and orientation of each beacon in order to determine the location of users accurately.

4.1.2 Weatherproofing

We should need to take action for beacon waterproofing if it has to install for a long long period of time. Moreover, we had to address environmental challenges like heat, cold, rain, wind, and so on. We should install the beacons in such a way so that no rainwater could enter the plastic bag and interfere with the efficiency and signal strength of the beacons. We selected a thin plastic bag because we found thicker ones weakened the signal. We used transparent plastic bags and duct tape to install the beacons on the posts and stakes.

4.1.3 Vertical Position

The placement height from the ground and the distance between each beacon are additional factors we considered to obtain the most accurate results possible and to provide alerts to users at precisely the best time. To consider the optimal height to place beacons, we considered the height at which user might carry their smartphones and installed the beacons on the lampposts at 2–3 m high and beacons on the stakes at 1–1.5 m high.

4.1.4 Fluctuation of RSSI

RSSI is the strength of beacon’s signal that is received by the enabled device (in our case, a smartphone). Usually, the value of RSSI depends on distance or measured power. However, the value also may fluctuate due to absorption, interference, or diffraction. This fluctuation makes the distance calculation result error-prone because the measured distance varies with the fluctuation of RSSI. We divided the distance radius into three zones. The first 20 m radius is the Immediate Zone, the next 40 m is the Near Zone and the remaining radius signal is the Far Zone. We divided the distance radius into three zones. In the normal condition, the Immediate Zone signal works perfectly. However, the Near Zone and Far Zone signal can be distracted by the crowd and excessive obstacles. We conducted our experiment in the normal condition; usual traffic on the street and crowd on the pavement.

4.1.5 Battery Drainage of the Smartphone

Android-based smartphones presented us with battery drainage issues. For the iOS version, usage of hardware such as Bluetooth and GPS are maintained by the operating system itself, so battery usage was not affected. On Androids, however, our application uses GPS, Bluetooth, internet connectivity, and sensors to perform its operations. Many of these features are used by the app for data collection from the users. We coped with battery drainage issues on Android by minimizing the usage of these features. Specifically, the activates start sensors and enable the location service only when the user needs to start the service. When users leave the zone, the application disables all types of sensor and location services to stop battery draining.

5 Findings

In the study, we use iPhone 8 plus, iPhone XR for the iOS application and moto g7, Google Pixel 4 for the android application. First, we collected the GPS position from three locations at the urban university campus called P1, P2, P3. P1 is situated between the two-building; one is eight storied, another is 12 storied. P2 is a traffic intersection, in which three sides have three buildings less than five-storied, and another side is a park. P3 is near a roadside; in which one side is empty (trees and open space), the opposite side (another side of the road) is a four-storied building (Fig. 5).

Fig. 5
figure 5

Testing site location and three locations (P1, P2, P3) at the testbed

After manually collects the GPS position couple of times at different times and days without WiFi, we installed the beacons in the same location. Again we collected the position and distance with mobile applications. Then we manually measured the length with a distance measuring tape. We got the estimated error after subtracting these lengths with the mean values of GPS value and beacons value. Though the error is not the same among the locations (P1, P2, P3), the difference is very negligible (less than 1 m) for both GPS and BLE. Table 2 shows the average errors between GPS and BLE beacon at our testing sites. The results show the BLE beacon system provides less error than GPS in micro-positioning in the urban environment. In the P1 location, the GPS accuracy gave 6–10 m errors; in contrast, the beacons error within 1–8 m.

Table 2 Errors between GPS and BLE beacons

To use the GPS and beacon positioning, the user has to use the receiver device (i.e., smartphone, smartwatch, etc.). The user has to enable the location service or Bluetooth service in their receiver device to get data for GPS and beacons, respectively. However, power consumption is a major issue when smart devices use these services. We measured the power consumption in the smartphone for both services. We actively use these services in the testing sites for 45 min–2 h a couple of times. During that time, the user device gets data from the beacons and GPS position data. The time is measured individually, and we calculate the average values at the end of the study. During the experiment, all phones are in standard settings. Figure 6 shows the detailed results of battery consumption. The result shows the location service consumes more than 32% battery. In contrast, the Bluetooth service consumes the highest 23% battery during that time. Besides, android operated phone consumes more battery than the iPhone. For example, during the location service, the iPhone consumes on average 32% battery where android phones are responsible for on average 38% battery.

Fig. 6
figure 6

Data points that need to handle in every hour in the testing sites

6 Conclusion

This paper reports the design, implementation, and evaluation of the Bluetooth beacon-based positioning in the urban context. The proposed system provides the micro-location where the traditional location service is unavailable or has limited access. The proposed model presents a novel architecture for Beacon-as-a-Service for the outdoor environment in the city. We have conducted experiments on an urban university campus. The site consists of three locations surrounded by different combinations of obstacles and open space. The empirical testing demonstrates that it allows for 10–40% less accuracy error than GPS positioning at the testing sites. On the other hand, Bluetooth service consumes less battery of smartphones than the location service.