Locating objects in warehouses using BLE beacons & Machine Learning

Warehouse management plays a pivotal role to boost the entire supply chain. To increase productivity, enterprises are focusing on different object localization approaches to achieve better accuracy amid high interferences. This helps to reduce the overall time for order taking & perform effective stock management. For this purpose, we propose a cost-effective system to achieve better accuracy for locating objects in indoor spaces with the help of BLE beacons. BLE is the term used for Bluetooth wireless standard for low power consumption. BLE beacons are used as technology enablers because BLE supports all the major mobile smart devices and tablets. The measurement is performed using Received Signal Strength Indication (RSSI). Also, improved the location accuracy with the help of machine learning algorithms & utilizing neighborhood beacons for real-world use cases of warehouse management. The target object & neighborhood beacons provide the raw data to the system & the mobile device acts as a receiver. Our results show that the proposed work provides high accuracy for finding resources, taking orders & improving the overall stock process in warehouse management.


I. INTRODUCTION
Object localization in indoor space has paramount importance considering the number of use cases for IoT applications and business advantages. In warehouses, it is crucial to cut the operational cost [1] and improve the productivity of the costly order taking process. The slow process for taking stock & pick the orders lead to delay in the delivery of the order to the customer. In real-life scenario, placing the objects causally due to heavy load makes the overall management complicated. As most of the warehouses are indoor, Global Positioning System (GPS) is not very useful as it can't penetrate the walls of the building. The approaches like image based and wireless signal based were discussed & implemented by researchers. Among these, Receive Signal Strength Indication (RSSI) based wireless localization has been used in millions of applications across the world. [2] There are many different approaches to achieve localization like triangulation & fingerprinting. [3] The wireless technologies consists of RFID, Wi-Fi & BLE. Wi-Fi based system requires complex deployment & additional techniques. [4] RFID based systems can only sense the target resources when they are in range of the RFID scanner and installation is complex with high hardware costs. Bluetooth Low Energy (BLE) has more scan time as compared to traditional Bluetooth and has influenced many developers as a technology enabler for indoor apps. Moreover, it is supported by most of the current hardware available in the smart devices in the market. The key advantages of BLE devices are: power saving, light weight, small size and low cost. It uses data structure with different hierarchy for information storage and advertises the signals consisting of services and characteristics for communicating with other devices. Let's go through three main techniques for RSSI BLE localization.

A. PROXIMITY
The proximity method helps to find the target object location w.r.t known object location. The broadcaster beacon sends a signal to the smart object and the beacon location or identification of the symbolic cell provides the target location in indoor premises. If the RSSI values are stronger than the threshold, then the target object is marked in the proximity area and labelled as localized. Proximity clears mean it is either nearby or close enough to the requestor.

B. RANGE
In the range-based algorithm like a trilateration, the distance between beacons and smart object can be calculated using propagation model (PM). It determines the location of the point by measuring the distance with the help of geometrical figures like circle, rectangle and spheres.

C. FINGERPRINTING
This method is called as offline data training and always is the first step for any positioning system based on fingerprinting. This allows to create a map between a blueprint and the actual objects and display them over the blueprint based on the real-time positioning.
The RSSI value determines the receiving capability of the device from transmitter. As it works, higher the RSSI, stronger the signal & vice versa. As per research, BLE beacons use 3 channels for advertisement (channel 37, 38 & 39). Figure 1 shows the 3 channel RSSI advertising values for a same distance. They have different measurements in terms of accuracy due to channel gain and multi-path effect and can be seen by Figure.1. The smart phones are used as signal receivers / transmitters. To the best of knowledge, few studies have used BLE beacons like iBeacon, Eddystone, AltBeacon & GeoBeacon in warehouses. Despite the improvements in the technology sector for warehouse management solutions, few challenges still exist: (1) Locate the item in very fast time so as to improve the operation time (2) Accurately find the target resource despite numerous interferences inside the warehouses (3) Deploy the solution in the warehouses so as to reduce the overall system cost.
To resolve these challenges, the proposed work uses Eddystone BLE beacons for transmitting rich and strong data to the system. The beacons are attached to the target objects and act as the signal emitters whereas the mobile device using mobile app act as receivers. The system aims to provide cost effective solution for warehouse management. This paper is considered as short paper for which the research is still under development and it predicts preliminary outputs.
The proposed work mainly aims at reducing the error in accuracy & providing a cost-effective solution. It uses three advertising channels data as an input. Experimental results were generated to measure the location accuracy in warehouses for target items. Our overall contribution in the field of object localization for industrial warehouses is presented follows: (1) Adaptive Machine learning model trained to detect the surrounding changes (2) Target & neighborhood beacons were used to provide more raw data (3) Machine learning regression model were used for predicting location based on environmental factors using confidence scale (4) The smartphone motion sensor data was utilized for improvised location (5) Comparative analysis and experimental results The rest of the paper is organized in the following manner: Section 2 provides brief idea about the relevant literature survey. Section 3 describes the proposed work with different components. Section 4 provides details for the experiments performed and discussed evaluation measures and Section 5 concludes the research and discusses the future scope.

II. LITERATURE REVIEW
The received signal strength is used by all the consumers. This value comes from MAC layer and available in every advertising packet. Node receives the signal from the transmitter from multiple paths. This introduces different arrival times at the consumer because of the different path distances of electromagnetic waves and results into a phase difference.
Most of the indoor localization solutions are based on RSSI. The transmitters like Wi-Fi access points & Bluetooth Low Energy usually broadcast the radio signals which covers the range for the transmission. As the distance increases or decreases, the RSSI value increases and decreased. As the number of transmitters increase, it helps to find the exact position of the receiver easily. There are basically two approaches to find the location of the receiver as a standard, Triangulation and fingerprinting.

A. Triangulation
Triangulation method distance signal based on the signal attenuation. The triangulation can be further divided into lateration and angulation. Several characteristics of time i.e. Time of Arrival (TOA), Time Difference of the signal proposition (TDOA) or Angle of Arrival (AOA). They use antennas which are directional and achieve pretty great performance when outdoors which is basically a case of line of sight scenarios. However, they have a weak performance considering the indoor premises are concerned where the interferences are induced by the building, walls and other obstacles making it extremely difficult for finding the location of the object.

B. Location Fingerprinting
Fingerprinting is a method for localization. The fingerprinting technique first builds a radio map database where the location of the beacons is mapped to the absolute positions in the map print. Then, the target location can be found using weighted average technique. This technique uses fingerprinting locations which are present in the mapping database. Most of the researchers use Kalman filtering for the estimation of the target location. The technique uses two phases, first is learning and second is localization itself where target device compares the database value with the advertised RSSI value. Below are few algorithms which are commonly used for fingerprinting & target location estimation.
(1) Nearest Neighbor (2) Neural networks (3) Support vector machine (SVM) The fingerprint collection platform is explained by Bahl and Padmanabhan [5] or Azizyan et al. [6] by collecting measurements such as light intensity, light color, acceleration and sound intensity. There is another interesting approach by Wu et al. [7] predicts physical and virtual model interior and automates clustering and thereby virtual rooms are linked to actual rooms. One approach suggests to use large antenna array for a table with two MIMO antennas by Ubicarse project [8]. However, it can't be done using any public API in Android platform where RSSI can be consumed from multiple MIMO antennas.
The accuracy of the location can be increased when the target is moving because the systems take measure of the historical trajectory. Few projects utilize orientation sensors (like magnetometer, accelerator meter, gyroscope etc.) and movement data with the help of dead reckoning method. This helps to identify the direction as well as distance of the target object. Also, few studies use Particle filters for distance estimation [9,10].
The technology proposed in our work is solely based on BLE beacons which are very portable, hence it helps to reduce the cost and can easily be attached to any item in the warehouse even if it is smaller in size. In a way, it helps for uniform digital management of the inventory in the warehouse. Also, distance accuracy is high than the previous suggested approaches.

C. Bluetooth-Based Localization
In the initial stages, localization using Bluetooth based devices was not widely used [11,12] due to the limitation of the original Bluetooth specification. There were quite a few performance issues related to scanning the nearby devices and discovery phase. Also, the devices weren't light weight and expensive due to the size which results into low consumption as compared to the Wi-Fi solutions. As the researches kept on optimizing this technology, the situation changed drastically from 2010 when BLE i.e. Bluetooth 4.0 was introduced.
The consumption of such BLE devices started increasing due to low energy consumption and various configuration parameters. The technology became quite promising and way better than the earlier version of the Bluetooth and was started getting compared with Wi-Fi positioning solutions. Scientists started providing solution for proximity estimation based on BLE signal strength and results revealed that BLE is quite accurate as Wi-Fi at similar places. To enhance the warehouse item tracking productivity, it is quite important to locate resources to make better decisions. The RFID based system has been surveyed thoroughly [13-14-15]. Chow [16] has provided techniques to use real life cases for GENCO distribution system for maximizing order taking. Ravi Ramakrishnan [17] provides feasibility and efficacy of BLE Beacon IoT Devices in the warehouses. [18] RFID technology was adopted to collect and share data of the warehouses to improve productivity of order taking.
Chiang [19] discusses approaches to find the optimum solution for new items required to put away. For object localization survey, we have analyzed the different studies used for object localization and positioning inside warehouses [20]. Over the period, the researchers have used three different ways to perform object localization like fingerprinting, BLE & Hybrid models for locating objects in indoor spaces. The object localization technique is used for different warehouses [21]. Akeila [22] discusses the method to decrease RSSI variation using calibration. [23] Priscilla & Win provide method to use BLE beacons to position & determine zone mapping using fingerprinting technique for asset tracking. Zhiheng [24] provides research to use iBeacon devices for indoor positioning for warehouse management. S. R. Jondhale [25,26,27] presents different approaches on the target localization which involves RSSI measurements using Regressional Neural networks, state observer & Supervised learning respectively. The different approaches for indoor positioning and object localization are surveyed.

III. PROPOSED WORK
The use case is from one of the largest wooden manufacturers in India. There was a management system used for raw materials in their warehouse but used to take much more time to facilitate order taking. As the demand increases, it becomes difficult to cope up with the sales due to slow order completion process. In addition, the warehouse has randomly placed raw materials, which is one of the biggest factor affecting the supply of materials over time. As the materials are not distinguishable from outside, the process takes longer time to find the appropriate object. This not only affects the business delivery but also decreases overall productivity. To address this issue, object localization system to track the raw materials in the warehouses for this company is of utmost importance. Figure 2 describes the overall architecture of Eddystone beacon based object localization solution. The system consists various components to collect, process & analyze data to find the location of the target item. The raw data is collected from target beacon & neighborhood beacons. This data is collected from advertising channels. The environment is classified using supervised machine learning algorithm depending upon the data received from the transmitters. Depending upon the environment, supervised machine learning regression model is used. The received data is then filtered using Chebyshev algorithm. The received value is then checked with the confidence scale model which compares the values against the model using calibration measurements for RSSI & actual distances. At the end, the device motion sensor present on worker's handset is used with calculated distance to provide the final distance to the target object. The beacon are attached to the raw materials act as signal emitters. A beacon is a very small wireless hardware device which is based on BLE. It continuously transmits the signal which other nearby devices can scan. The signal is a radio signal made of numbers & letters transmitted over a short / regular intervals. Beacon has measured broadcasting power, which varies based on the different vendors and size. Considering the scenario where a worker wants to identify the location of the raw material i.e. target object to be used, worker shall send a request to find the warehouse target material through an Android mobile app. This mobile app is built using native Android framework using Java & has a support till Android 11. The app then scans all the stations and waits for the response. The scanning provides the results in the form of RSSI & UUID which are then converted into the actual distances using algorithms. All the processing & calculations happen over the server. All the machine learning algorithms are built in python & deployed on the server. Once the final location is received, it is showcased to the worker in the mobile app. The raw material target beacon has a unique code for identification. This code is then scanned using a mobile app & provides all the relevant information about the raw material like type, serial, price, quantity etc. The material is mapped with the entry in the ERP system. Worker can then take out the item from inventory when physically very close and can scan the code on the item for confirmation. Once the item has been taken out, it is removed from the inventory as scanned by base station & integrity is maintained. We have considered the stationary beacons for predicting the distance. The beacon used has a range of 0-70m & txPower = 3 from Kontakt.io using which the raw data is generated and used to perform experiments. This is illustrated in Figure 3.

B. Gateway Fingerprinting
As we have seen the way beacon addition & removal communicates with the system. The smart beacons communicate with the gateway / cloud beacons. The gateway beacon is used to gather, access real-time data from smart beacons in the warehouse section and then send to the cloud server. The fingerprinting & calibration is done for the smart beacons. Their actual location is calculated and feed into the system with next to zero-error in calibration process. Please note that beacons are calibrated appropriately by placing them in warehouse. This is illustrated in Figure 3.
Gateway beacons keep track of the beacons in the vicinity and helps to keep the inventory upto date. Whenever the inventory person wants to request the location of the target item with beacon attached, the request is sent from the Android app to the server. The server then tries to find the Gateway which is able to scan the target object and nearest to it. The location is then sent back to the Android device app and user can proceed towards the item. All the processing of the algorithms in the upcoming sections is done on the server side. Please note that Gateway beacons can talk to smart beacons and communicates with cloud server over Wi-Fi.

C. RAW RSSI DATA EXTRACTION
The raw data is important when we have to work in the indoor spaces with interference challenges. BLE uses three different broadcasting channels for advertisement of the data. This is basically done to adapt to the frequency hopping for avoiding interference with other 2.4 GHz signals. The interval in Android OS is 5 seconds for switching to the different channel. The data from three advertising channels (37, 38 and 39) [29] is collected. RSSI measurement is directly dependent on the frequency. Hence, when the frequency is changed to a different channel, RSSI provides different measurements. The data collected for 10 seconds and then using moving average filter passed to the next layer for processing. Please note that the RSSI values of target & neighborhood beacons are taken for consideration for improving accuracy. Due to external entities which influence the radio waves like interference, absorption or diffraction -RSSI values tend to deviate more frequently. To convert the RSSI measurement to actual distances, we use Log-distance path loss model [28]. Please note that RSSI is a beacon signal strength which depends on distance and measured power. We use Eq. (1) to calculate the distance from RSSI: where PL (d) is the value of the reference path loss value as per the calculated measurements at a distance d0 and n represents the propagation exponent which is rate for path loss component with the distance. Beacons used in the experiments have measured power equal to approx. -69. Let's take some observed RSSI samples i.e. -60, -69, -80. For these samples, the distance values come out to be 0.35m, 1m  .54m respectively. The calculated value is not the exact value but an approximation. For the exact distance, the loss factor (i.e. environmental loss factors) needs to be zero. To minimize the loss factor, we have introduced machine learning location prediction algorithms in Section D.

D. LOCATION PREDICTION USING ML ALGORITHMS
As warehouse consists of different routes & interferences, it is important to identify if the transmitter & receiver environment during object localization. Our proposed system uses the RSSI trends to estimate target item location. As the data increases, our target item location will become more accurate. Most of the times, the RSSI data changes are due to the surrounding changes which produce inaccurate results. To solve this issue, our system proposes to utilize the surrounding changes & tune the estimated location accordingly. We propose to use a feature vector which includes standardized parameters like mean, variance, skewness, median, and max & min value for our estimation. We tried various different kernels like Random Forrest, Decision Tree, SVM with various & linear kernels. For our research, we chose SVM with linear kernel as per results from Table 1. The decision is based on the mean accuracy % parameter. The SVM linear kernel helps in learning using linear algebra by transforming. To predict for the newly provided input, the linear kernel the dot product between the input (z) and support vector (zi) is calculated as follows: The above equation provides product for input vector (x) in the training of the data for all vectors. C(0) and bi are the coefficients are required to be estimated using the training data by using algorithms. The dataset is prepared in the warehouses premises only with the help of RSSI values and the data collected is for three different environments mentioned in the section 3.4.1.

1) SURROUNDING ADJUSTABLE CLASSIFICATION
To ensure that the experiments are evaluated in terms of practicality from the warehouse perspective and real world propagation w.r.t degree of difficulty of the wall and reflection problems, we have constructed dataset considering three different surroundings which will be commonly observed inside the warehouses. The surroundings are classified as LOS (Line of Sight), N-LOS (Not-in-Sight) & P-LOS (Partial-in-Sight). Please note that the P-LOS surrounding represents objects like doors, glasses etc. while N-LOS represents objects with high coefficient like different types of walls, metals etc. The raw RSSI coming from the broadcasting channels is provided as an input to surrounding adjustable classification model. The classification of the surrounding is done using Support Vector Machine with linear kernel. To predict the location of the target item, comparison is done with previously collected data using a regression model. The system uses new regression model if any abrupt environment changes happen, otherwise, it keeps on appending the data to the existing model. [31] Chebyshev filter with ripple factor of 0.5% used for smoothing the values and to mitigate the RSSI fluctuations in such large warehouses with thousands of inventory items.

2) CONSIDERING ADJUSABLE CLASSIFICATION
As the BLE beacons have low cost associated with them & there are plenty of items present in the warehouse, it makes sense to leverage the use of neighborhood beacons. The proposed system will identify if the neighborhood beacons can form a cluster of the beacons which then can be used estimate the target item location in single measurement only.
Let's consider the use case when a worker wants to locate the raw material connected to beacon. To explain how the algorithm uses data from neighboring beacons, we can consider that there are 5 beacons in a room as per Fig. 4. Using K-means clustering algorithm with K = 2, beacons are divided into 2 groups. The median is picked as target beacon i.e. B2. We have used Dynamic Time Warping Algorithm [20] to detect similarity measure between RSSI. This algorithm is helpful because it provides invariance against warping for x-axis & suitable to perform any distance measurements ac-cording to a baseline. If the signal matches with the baseline, then it is neighborhood beacon RSSI value is taken into consideration for the distance estimation to target object. The similarity between B5 and B2 to match their signals, then find the DTW distance, and check if the beacon matches the DTW similarity baseline. When worker tries to obtain the distance between smartphone and B2, smartphone can also refer to B5 as additional data RSSI input so that the accuracy of distance to B2 can be increased by taking into consideration the beacons nearest to B2 (target object). The final estimated distance would be the weighted average of the B2 and B5. This is showcased in Figure 5.
As shown in Table 2, the algorithm will skip beacons B1, B3 & B4 beacons to be selected as neighborhood beacons and won't be taken into consideration for distance prediction. Only B5 will be taken into consideration as it matches as per Dynamic Time Warping algorithm. The more the neighborhood beacons selected from the algorithm, the better is the accuracy of the predicted distance to the target object.

B5
Use RSSI For the explained use case, the Table 3 shows the list of beacons selected to be used for the location prediction.

3) USING MOTION SENSOR FROM SMARTPHONE
To better utilize the infrastructure to boost the overall accuracy & improve the object localization when using a mobile app from worker's perspective, we have used motion sensor available in the latest smartphones [22]. Consider the travelled distance (Td) from the motion sensor in the smartphone for every step detection and Pds is the predicted distance at the start. The distance shown on the mobile app for the target item can be calculated as: Average Distance = ((Pds -Td) + Pd (i)) / 2 (2)

A. EXPERIMENTAL SETUP
We have implemented the system on Android devices and supports Android OS 10.0 & above. Bluetooth package was used to scan the transmitters. The experiments were conducted inside warehouse areas, divided into sparse & dense environments to prove the efficiency of the approach. 3 beacons were placed in the sparse environment whereas 6 beacons were placed in the dense environments. Let's look at the experiment test bed in the warehouse:  Warehouse Indoor experimental test bed, 5 different test bed sizes  Kontakt.io Smart Beacons were used for data collection  -30 dBm to 4 dBm transmit power  0-70 m signal range  Samsung Galaxy S20, Android OS 10.0, BLE -v4.1, LE was used  Eddystone beacons configured to broadcast at 10 Hz Our objective is to minimize the target item location error or the distance between the actual distance vs the estimated distance. To ensure that we compare our algorithm from optimization perspective with other alternatives, we have used trace analysis. This is to collect the samples from different environments. The traces range from 2 meters to 30 meters and collected over 55 BLE samples. The dataset created is over 450MB and measurements of almost 1600m. Let's look at the detailed results for sparse & dense environments.

B. EXPERIMENTAL RESULTS
The important parameters to test the performance of the localization estimation are estimation error & performance.
The estimation error can be calculated as Equation 3: Where E(r) is the estimation error which absolute in nature, E(d) represents the estimated distance and A(d) represents actual distance. The difference between the actual & the estimated distance provides the error by the system which is a critical parameter to evaluate the system accuracy. From the experiments conducted in the section IV A, the improvement is clearly visible in terms of distance estimation as a result of using neighborhood beacons, Machine learning algorithms & smoothing values using Chebyshev's theorem which helped to reduce the noise and achieve stability in terms of getting the measured distance with accuracy as shown in Figure 6.
As we have plotted the graph measuring the predicted distances against the measured ones, let's go through the comparison with the proposed system against target location estimates in meters in Table 4. We have taken 8 test points in the warehouse & compared the existing system with proposed system w.r.t the location values are predicted by the systems. It is clearly seen that the proposed system provides much more accurate values as compared to the existing one at most of the test points. The measured and actual distance of smart beacon item to the smart phone device is plotted. The actual distance for the experiment was kept as a diagonal line and the measured distances from the algorithm are plotted against it for better visibility. As per the graph, it is pretty clear that as distance between target item and smart phone decreases, the accuracy increases and vice versa. Table 5 & Table 6 denotes the results of the experiments for sparse and dense beacon deployment environments. There are 5 different scales considered. For each scale, the measurement is taken for Line-Of-Sight (LOS), Partial Line-Of-Sight (P-LOS) & Non Line-Of-Sight (N-LOS) states. While evaluating the performance of the system, it is important to understand the speed with which the results are provided to the user which in turn helps to locate the items in the big warehouse much faster. The performance i.e. computational complexity is calculated inside the warehouses.in different scale test beds. It has been observed that the proposed system requires a lower computational time by upto 43% than the existing RFID based system. It is also observed that as computational time of the proposed system does not grow as the size of the test bed increased. This is because we have a supervised pre-trained model for prediction & k-means clustering algorithm provides better performance when the data size is a bit average and using Chebyshev filter is quite sharper as compared to the other filters which helps in improving the time.
Regarding the number of neighborhood beacons to be used for the system, it is observed that as the number of neighborhood beacons increase, the accuracy drastically increases reducing the estimation error as seen in Figure 7. However, as the nearby beacons increase beyond 6, the interference increases resulting into less accuracy and has an impact on the localization results.

Figure 8. Estimated Error vs Neighborhood beacons
Also, it has been observed that sampling frequency has a performance impact over the proposed system. As the sampling frequency is lower, accuracy of the system decreases and attracts more estimation error. This can be seen from figure 8. The Y-axis denotes the cumulative distribution function (CDF) of the errors in the position estimation whereas X-axis denotes the sampling frequencies.

V. COMPARATIVE STUDY
The experiments were performed and data was calculated for categories mentioned in Table 7 to compare the proposed work against the existing systems in the warehouses. The Table 7 shows the comparison between the object localization system for warehouses with/without neighborhood beacon & machine learning algorithms. The existing RFID based resource management system [18] was compared to boost the productivity of the order picking process with our proposed system. We have also provided the observations using single target beacon, with neighborhood beacons and machine learning algorithms to showcase the improvements. 75 orders data was used & processed for the experiments to come up with the below statistics. The order picking time is the time required by the worker to find the item in the warehouse & remove the item from the inventory for processing. The productivity is calculated as the percentage of the number of orders completed in a stipulated time. To investigate location processing computational time for the existing & proposed systems, we have recorded the computational time for techniques mentioned in Table 6. The computational time is calculated for different surroundings for the scale of test bed 10 x 12. The total of 154 test locations were used for the calculation. For the each location, the calculation was run for 10 times at the server. The Figure  8 shows the computational time compared histogram is shown in the Figure 8 for LOS, P-LOS & N-LOS surroundings.

VI. CONCLUSION AND FUTURE WORK
This paper proposed an Eddystone beacon based object localization system for real life industrial uses of warehouse management. With this work, locating raw materials present inside the warehouses is very easy and helps to reduce the order picking time significantly from 11 mins to 2.2 mins. The location accuracy observed is under 1.4 meters. Preliminary experimental results show that proposed work demonstrates low cost system, robust and high location accuracy. The results show an average location error of 1.3 m and accuracy 1.4m, which is less than most of the algorithms, proposed using a standard traditional propagation model and systems where only target beacons were used as raw data instead of considering neighborhood beacons.
Our ongoing research will focus on making existing work systems secure with the help of federated learning. The algorithm is tested in the sparse and densely populated places inside the warehouse. Since RSSI fluctuates for different interferences and varies according to the different warehouses, more work can be conducted to improve accuracy. The proposed system can be applied to healthcare domain warehouses where it is critical to provide supply in a quick time due to urgent demands.