2019 19th International Symposium on Communications and Information Technologies (ISCIT) Indoor Localization with lightweight RSS Fingerprint using BLE iBeacon on iOS platform Ngoc-Son Duong and Thai-Mai Dinh Department of Telecommunications Systems, Faculty of Electronics and Telecommunications University of Engineering and Technology, Vietnam National University Ha Noi, Viet Nam Email: duongson.vnu@gmail.com, dttmai@vnu.edu.vn Abstract—In the near future, location-based services (LBSs) will become an essential part of the smart city That’s why indoor localization has been attracting researcher attention A popular method for indoor localization is Fingerprinting However, it is not easy to reach high accuracy in positioning with only Fingerprinting Several current techniques could be used to improve the accuracy of Fingerprinting such as Machine Learning (ML) or Deep Learning (DL) In this paper, we propose an BLE iBeacon-based indoor localization system using Fingerprinting method The system applies k-nearest neighbors (k-NN) - an ML algorithm to decide the user position In order to reduce the computational cost and ensure the accuracy of the system, we propose to use lightweight feature vectors that include information of the nearest beacons and device azimuth for training Machine Learning algorithm We performed some experiments to verify the proposed system The results show that the method provides a feasible indoor positioning solution with high accuracy Index Terms—Bluetooth Low Energy, iBeacon, indoor positioning system, iOS, Machine Learning, K-nearest neighbors, kNN I I NTRODUCTION As we know, Location Based Services (LBS) [1] requires the exact location of the user in indoor or outdoor environments Global Positioning System (GPS) is a type of LBS for outdoor environment For indoor environment, there are several indoor positioning systems with the support of a number of wireless technologies such as Wi-fi [2], Bluetooth [3], UWB [4], RFID [5], etc Currently, the introduction of Bluetooth Low Energy (BLE) iBeacon, released by Apple brings great benefits to indoor positioning Some studies using iBeacon for indoor positioning are presented in [6] [7] [19] Like other wireless technologies, BLE iBeacon-based indoor localization uses signal strength to find the location of the receiver An RSS-based well-known method is Fingerprinting Due to the nonlinear variation of the BLE signal that is primarily caused by multipath fading, the application of Fingerprinting to indoor positioning systems could not get high accuracy With the development of Machine Learning, we can deal with these nonlinear relationships through data set The data set of machine learning models attenuation of signals when transmitted through structures which include walls, columns, plants, etc in indoor environment It’s amazing that the database can change (following a period of time in a day) to adapt to the variation of 978-1-7281-5009-3/19/$31.00 ©2019 IEEE infrastructure or human movement Along with Fingerprinting, most of the learning algorithms used are Supervised Learning (k-NN, Navie Bayes Classifier, neural network, etc) Machine Learning-based Fingerprinting was also presented in [9] [10] An overview of the accuracy of machine learning algorithms using the RSSI fingerprint method is presented in [8] A recent study on accuracy improvement of iBeacon-based indoor fingerprinting positioning is presented in [11] The problem of selecting vector features is addressed with the aim to improve the accuracy and to reduce the database size, thereby to reduce the amount of information to be exchanged in the Online phase In addition, the authors used propagation affinity clustering to decrease the computational cost and introduce an exponential averaging filter to smooth RSS values An other sizable indoor navigation system called SwiBluX is introduced in [12] This is a multi-layer system using Deep Neural Network and many layers of filters including a custom Gaussian Outliers Filter, weighted position estimation and particle filter Most of the factors affecting the accuracy of the system are presented including the RSSI variance, the wireless signal attenuation, the human absorption, and device orientation These elements are the basis to obtain a consistent feature vector for Machine/Deep Learning algorithms With the motivation to reduce the amount of data to be handled and ensure the accuracy of the system simultaneously, our study will introduce a Fingerprinting method based on a lightweight feature vector which includes ID and RSS of Nearest Beacon and smartphone orientation Then, we built up the propose system in reality and experiments to verify the system All experiments were performed on the iPhone The remainder of this paper is organized as follows After this short introduction, we describe the model of the proposed system in Section II Section III will present in details the Fingerprinting method in part A, in part B of this section, we will show what feature will be chosen to using in the classification problem Section IV provides the system parameters and experimental results Finally, section V concludes this paper II P ROPOSED SYSTEM MODEL A Proposed system The overall architecture is depicted in Fig At first, the smartphone scan RSS values of beacons around by using BLE 91 2019 19th International Symposium on Communications and Information Technologies (ISCIT) chip Meanwhile, the magnetometer sensor provides the device heading The positioning method that we use in our proposed system is Fingerprinting The proposed system consists of two parts: Offline/Training phase and Online/Execution phase In the Offline phase, when the information of nearest beacon and user heading are available, the smartphone record these parameters to the local database as feature vectors In Online phase, K-nearest neighbors is used to estimate the user position through comparing measurement vector and stored database BLE Chip Magnetometer NEIGHBORS A Fingerprinting Method Fingerprinting is by the far the most favored form when researching on indoor localization based on radio frequency In Fingerprinting method, the position obtained from Fingerprinting must be pass through two phases: Offline/Training phase and Online/ Execution phase In the Offline phase, the area is divided into grid point or reference point, then collect data for each one These data are then saved in the form of vectors and stored in a database Suppose we have Q beacons, and P reference points (RPs) in the area We need to collect data for a location at RPs in the shape of a vector Each vector normally has the form as following: {xp , yp ; RSSp1 , , RSSpq , , RSSpQ }, p ∈ [1, P ] , q ∈ [1, Q] (1) in which, {xp , yp } is coordinate of p th position and RSSp1 , , RSSpq , , RSSpQ are RSS value of beacon respectively All of these reference points will contribute to creating a radio map The problem of Fingerprinting is estimating a position when RSS value measurement on-the-fly of an unknown position is available: Informtion of nearest beacon Device’s Heading Offine Phase Location (Class) Major RSS Heading m1#1 r#11 , r#2 , r#31 h1 C m#1 r#1C , r#2C , r#3C hC {RSS1 , , RSSq , , RSSQ }, q ∈ [1, Q] QHDUHVW QHLJKERUV m#1 r#1 , r#2 , r#3 h ' Measurement Vector Location Online Phase ' ' ' (2) This task will be done in Online phase by using a matching algorithm such as k-NN, SVM, Neural Network and so on Fingerprinting itself has its advantages and disadvantages Compare to Tri-lateration, it would be difficult to determine the spatial propagation model for BLE signals due to the variability of the terrains Fingerprint’s advantage is not dependent on converting RSSI to distance The stability of Fingerprinting is higher than Tri-lateration because the position is fixed into reference points Besides, the major problem of Fingerprinting is several reference points have similar data vectors This lead to decrease the localization accuracy C III I NDOOR L OCALIZATION BASED O N K- NEAREST ' Smart Phone Fig System overview and architecture B K-nearest neighbors-Based Fingerprinting B iBeacon and iOS Device-based indoor localization In our system, we use iBeacons as transmitters and iOS device (iPhone) as receiver iBeacon protocol is released by Apple in WWDC 2013 [20] The physical device run on the iBeacon protocol and powered by Bluetooth Low Energy technology is called BLE Beacon The beacon hardware itself broadcasts a message that contains crucial fields which are Unique Universal Identifier (UUID), Major, Minor - subsegments of Major and TxPower The receiver will capture BLE messages and then analyze information in the message according to usage purpose With the advent of the iBeacon protocol, Apple provides a CoreLocation framework to help developers read parameters from iBeacon messages Specifically, in our system, by using the CLBeacon class, iOS device can read information related to UUID, Major, Minor and RSSI With built-in magnetometer, iOS device can determine a device orientation [13] This information can be obtained by using CLHeading class 1) Feature Analysis: In general, when working with actual iBeacon-based Fingerprinting problems, we only have raw data of beacons such as ID (UUID, Major value and Minor value) or RSS value Some of them have not been handled or filtered We need to choose reliable data and eliminate noise data to find a feature vector This feature vector must ensure that specific pieces of information are kept for the original data In this section, we will choose the factors that have a high impact on the decision of position as the features on the Knearest neighbors problem Inference 1: In literature, by using the Voronoi diagram, we can use nearest beacon information (determined via RSSI) to divide the fingerprinting point into clusters (Fig 2) Thus, in the case that coordinate of beacons is known, knowledge about nearest beacon informs a position relatively, in the sense that indicates what region the user is in Therefore, ID of the nearest beacon (Major or Minor) classifies a group of RPs within a certain Voronoi unit 92 2019 19th International Symposium on Communications and Information Technologies (ISCIT) 0o -60 dBm 0 o -62 0o -64 -66 -68 0o o -70 -72 -74 Beacon Node -76 -78 0o Voronoi Unit 0o -78 Reference Point -76 -74 -72 Fig Division by cluster using Voronoi diagram -70 0 o 0o -68 -66 Inference 2: The ID information is not enough to determine which RP the user belongs to The received signal strength from the beacon of each RPs in a Voronoi unit is different Therefore, the RSS value of each RPs should be known In this study, we not include far away beacon information as a feature because, in fact, their signals are easily interfered due to change of indoor environment such as the movement of people To ensure that the duplicate of RPs in the database is negligible, we use the RSSI information of the three beacons which have smallest RSS value Inference 3: Device azimuth is selected as one feature because of the direction of the mobile’s wave reception and human body-blocking Some studies have shown that antenna orientation affects the RSSI [14] [15] [16] In a Voronoi unit and under LOS condition, several RPs have the same ID of the nearest beacon and RSS value but device orientation is not in a similar fashion In order to match the actual context that the user holds the phone in a position parallel to the horizontal plane The presence of human should be included for consideration [12] [17] are two of the studies that consider this factor The results show that the RSSI level of attenuation is greater in the presence of human occlusions Figure shows the signal attenuation when considering the influence of the two above factors From the above inferences, the position class is a function depending on the three feature variables: Major of nearest beacon, RSSI of beacons with the smallest RSS and device orientation Table I is the database for radio map Position (Class) C X Y Major of #1 beacon x1 x2 y1 y2 m11j m12j xC yC m1Cj , r2 , r3 rCj Cj Cj Device Azimuth h1j h2j hCj Feature vector is saved in the form: , rij , rij , hij }, ci = {xi , yi ; m1ij , rij i ∈ [1, 2, , C] , j ∈ [1, 2, , N ] -62 0o -60 dBm 0o 0o Fig Attenuation of received signal strength at m of distance 0° corresponds to the situation that the user stands and holds the phone the opposite side to the beacon (LOS) 180° corresponds to the case that the user turns away from the beacon (non-LOS) where C is the number of RP need to be classified, {xi , yi } is coordinate of i th position and N is the number of data points for each RP 2) The use of K-nearest neighbors in Fingerprinting approach: When we determine what feature will be used Our problem is to classify the position in a fingerprinting radio map has C reference points Assume that we received a measurement vector x at time k: xk = {m1k , rk1 , rk2 , rk3 , hk } (4) The measurement vector was then compared to the database by calculating the Euclidean distance: d= |m1k − m1ij |2 + γ=1 γ |rkγ − rij | + |hk − hij |2 (5) The position with the smallest Euclidean distance will be selected as the user position IV E VALUATION A Experiment Setup TABLE I DATABASE OF F INGERPRINT M AP RSSI of #1,#2 and #3 beacon , r2 , r3 r1j 1j 1j , r2 , r3 r2j 2j 2j -64 (3) The proposed indoor positioning system was tested in a semi-open indoor environment on the 1st floor of G2 building, University of Engineering and Technology, Vietnam National University Beacons were placed on the same plane at a height of 1.8 m where not to be covered by other structures To ensure the reliability of the signal, the broadcast interval of beacons were set to 100 ms (or 10 broadcast messages per second) The minimum distance between two adjacent beacons was m The experimental area was divided into evenly distributed grid points, the two adjacent points were 1.6 m apart We collect data for 15 RPs in the experimental area To ensure no position change, sampling is done by keeping the phone 93 2019 19th International Symposium on Communications and Information Technologies (ISCIT) fixed on a tripod and placed parallel to the horizontal plane at a height of 1.4 m The user then turns the device and moves around the tripod according to the change of the device heading to get the sample Because the difference of RSSI in consecutive angle group is negligible, we just sample at fixed angle which started by 0◦ and next one is increased by 45◦ Each angle is sampled in 30 seconds With a sampling rate of about sample per second, each RP will be represented by 240 data vectors Thus, the entire radio map data set contains 3600 vectors RP No X Y R1 R2 X Y XW YW RB #1 R2 #2 Ru #u RSS (dBm) and rank of nearby u in B beacons (b) RP No y X Y Coordinate of RP M#1 R#1 R#2 R#3 H Major, RSS of closest beacon and heading (c) 6m Fig Inside of Fingerprinting database (a) Typical RSS-based fingerprinting (b) Santosh’s proposed method [11] (c) Our proposed database fingerprinting method 1.6m 1.6m R1 Weight Coordinate of RP R4 RSS (dBm) of all deployed beacons (a) Coordinate of RP RP No R3 x O 15m position on the true path and the estimated position is recorded to calculate the error According to the results shown in Fig 6, with the proposed method, kNN gives better result than conventional method The system reaches 50 percent of the error of less than m and the maximum error is not more than m Fig Experimental platform and the RPs distribution TABLE II D ETAILED PARAMETERS User’s device Opera System Beacon Bluetooth Interface Advertising Interval Broadcasting Power Broadcasting Range iPhone SE iOS 12.1 Estimote beacons BLE v4.2/ 2.4 GHz 100 ms dBm 50 m 0.9 0.8 0.7 CDF 0.6 B Experiment Results 1) Size of the database with lightweight RSS Fingerprint map: Database size problem was mentioned in [11] Accordingly, to reduce the database size, some components that are considered redundant should be removed [18] [11] concluded that it would be redundant to store all the RSS information of far away beacons even when data was not obtained They suggest storing data for nearby beacon and set a weight on them With our proposal, by using the information of the closest beacon and device heading, with the same number of vectors, our database size decreases by 77.5% compared to the conventional method and 30.77% compared to the proposal in [11] 2) Performance of the proposed method: To verify the accuracy, we performed two experiments to compare The first one has done for our proposed method The second one carried out for conventional RSS-based fingerprinting (not include ID of nearest beacon and device heading) using kNN The experiment was executed by allowing users to hold mobile phones and move around the experimental area At each step, 0.5 0.4 0.3 0.2 kNN with Proposed Method kNN with Conventional Approach 0.1 0 0.5 1.5 2.5 3.5 4.5 Localization Error [m] Fig Cumulative probability of localization error V C ONCLUSION AND F UTURE W ORK In this paper, we introduced ID (Major), RSSI of nearest beacon and device orientation as a feature that defines a reference point in Fingerprint-based indoor localization Since only the information of the nearest beacons is selected, the size of the database is actually greatly reduced compared to other methods The average error of the system is approximately 94 2019 19th International Symposium on Communications and Information Technologies (ISCIT) meter With the choice of using BLE iBeacon, this is a low-cost, low power consumption solution with high accuracy Following the conventional Fingerprint approach, this system is to divide the map into a thick grid of reference points Therefore, data collection for reference points is a timeconsuming task This is considered as the biggest challenge for Fingerprint method in actual implementation In the future, our goal is to reduce the number of reference points to a minimum while ensuring high accuracy for the system ACKNOWLEDGEMENT This work has been supported/partly supported by Vietnam National University, Hanoi (VNU), under Project No QG.19.25 [16] Munesh Singh, Pabitra Mohan Khilar, “Actuating Sensor For Determining The Direction Of Arrival Using Maximal RSSI,” International Journal of Scientific and Technology Research, vol 3, Sep 2018 [17] Syed Hassan Ahmed, Safdar H Bouk, N Javaid, Iwao Sasase, “Combined Human, Antenna Orientation in Elevation Direction and Ground Effect on RSSI in Wireless Sensor Networks,” in 10th International Conference on Frontiers of Information Technology, Dec 2012 [18] J Luo, L Fu, “A smartphone indoor localization algorithm based on WLAN location fingerprinting with feature extraction and clustering,” Sensors, vol 17, p 1339, Jun 2017 [19] Xin-Yu Lin, Te-Wei Ho, Cheng-Chung Fang, Zui-Shen Yen, Bey-Jing Yang, Feipei Lai, “A mobile indoor positioning system based on iBeacon technology,” in 37th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Aug 2015 [20] “What’s New in Core Location” Apple [online] Available: https://developer.apple.com/videos/play/wwdc2013/307/ R EFERENCES [1] Anind Dey, Jeffrey Hightower, Eyal de Lara, Nigel Davies, “LocationBased Services,” IEEE Pervasive Computing, vol 9, pp 11–12, Mar 2010 [2] Chouchang Yang, Huai-rong Shao, “WiFi-based indoor positioning,” IEEE Communications Magazine, vol 53, pp 150–157, Mar 2015 [3] Adam Satan, “Bluetooth-based indoor navigation mobile system,” in 19th International Carpathian Control Conference (ICCC), May 2018 [4] Haohao Yin, Weiwei Xia, Yueyue Zhang, Lianfeng Shen, “UWB-based indoor high precision localization system with robust unscented Kalman filter,” in IEEE International Conference on Communication Systems (ICCS), Dec 2016 [5] Farhan Manzoor, Yi Huang, Karsten Menzel, “Passive RFID-based Indoor Positioning System, An Algorithmic Approach,” in IEEE International Conference on RFID-Technology and Applications, Jun 2010 [6] Xin-Yu Lin, Te-Wei Ho, Cheng-Chung Fang, Zui-Shen Yen, Bey-Jing Yang, Feipei Lai, “A mobile indoor positioning system based on iBeacon technology,” in 37th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Aug 2015 [7] Xiangjie Li, Dan Xu, Xuzhi Wang, Rizwan Muhammad, “Design and implementation of indoor positioning system based on iBeacon,” in International Conference on Audio, Language and Image Processing (ICALIP), Jul 2016 [8] Hanen Ahmadi, Ridha Bouallegue, “Exploiting machine learning strategies and RSSI for localization in wireless sensor networks: A survey,” in 13th International Wireless Communications and Mobile Computing Conference (IWCMC), Jun 2017 [9] Jesus Lovon-Melgarejo, Manuel Castillo-Cara, Luis Orozco-Barbosa, Ismael Garc´ıa-Varea, “Supervised learning algorithms for indoor localization fingerprinting using BLE4.0 beacons,” in IEEE Latin American Conference on Computational Intelligence (LA-CCI), Nov 2017 [10] Pranesh Sthapit, Hui-Seon Gang, Jae-Young Pyun, “Bluetooth Based Indoor Positioning Using Machine Learning Algorithms,” in IEEE International Conference on Consumer Electronics - Asia (ICCE-Asia), Jun 2018 [11] Santosh Subedi, Hui-Seon Gang, Nak Yong Ko, Suk-Seung Hwang, Jae-Young Pyun, “Improving Indoor Fingerpriting Positioning With Affinity Propagation Clustering and Weighted Centroid Fingerprint,” IEEE Access, vol 7, pp 31738 - 31750, Mar 2019 [12] Alberto Belmonte-Hern´andez, Gustavo Hern´andez-Pe˜naloza, David ´ Mart´ın Guti´errez, Federico Alvarez, “SWiBluX: Multi-Sensor Deep Learning Fingerprint for Precise Real-Time Indoor Tracking,” IEEE Sensors Journal, vol 19, pp 3473 - 3486, Jan 2019 [13] “Getting Heading and Course Information” Apple [online] Available: https://bitly.vn/2ntm [14] Manish Wadhwa, Min Song, Vinay Rali, Sachin Shetty, “The impact of antenna orientation on wireless sensor network performance,” in 2nd IEEE International Conference on Computer Science and Information Technology, Aug 2009 [15] Zhi-An Deng, Zhiyu Qu, Changbo Hou, Weijian Si, Chunjie Zhang, “WiFi Positioning Based on User Orientation Estimation and Smartphone Carrying Position Recognition,” Hindawi Wireless Communications and Mobile Computing, vol 2018, Sep 2018 95 ... 19th International Symposium on Communications and Information Technologies (ISCIT) meter With the choice of using BLE iBeacon, this is a low-cost, low power consumption solution with high accuracy... a function depending on the three feature variables: Major of nearest beacon, RSSI of beacons with the smallest RSS and device orientation Table I is the database for radio map Position (Class)... indoor localization In our system, we use iBeacons as transmitters and iOS device (iPhone) as receiver iBeacon protocol is released by Apple in WWDC 2013 [20] The physical device run on the iBeacon