Indoor Localization with Bluetooth: a Framework for Modelling Errors in AoA and RSSI Pietro Boccadoroa,c , Domenico Coluccia,c , Vincenzo Dentamaroa,b,c , Laura Notarangeloa and Giangiuseppe Tateoa a Nextome SRL, Conversano (BA), Bari (Italy) b Principal Investigator, Università degli Studi di Bari, Bari (Italy) c IEEE Member Abstract Ubiquitous connectivity among objects is the already expected future of the Internet of Things ages we are living today. Technologies are competing fiercely to fulfill this goal. Still, none of them has been proven as the one-size-fits-all solution for any application scenarios. Indoor Positioning System, and Direction Finding problems, represent an interesting playground for Internet of Things technologies. In this challenge, one of the major stakeholders is Bluetooth: initially conceived as a short-range solution for Personal Area Networks, it has now evolved to version 5, which natively supports both Angle of Departure and Angle of Arrival techniques. In this work, a Connection-Oriented Real-Time Locating System is realized to deeply investigate the newly added features of Bluetooth, thanks to a dedicated framework that evaluates gathered data and their reliability. A thorough experimental campaign has been carried out in both indoor and outdoor conditions, with interesting results. Overall, the main outcome is that the Angle of Arrival is not sufficient to solve Direction Finding problems and a more precise estimation of both directions and distances requires other quality indexes. In particular, the Received Signal Strength Indicator is proposed to be used in conjunction with the Angle of Arrival as part of the measurement framework. Keywords Bluetooth, indoor localization, indoor positioning, angle of arrival, direction finding, RSSI 1. Introduction Indoor Positioning Systems (IPSs) are a hot research topic in the Internet of Things (IoT) domain, attracting an ever-increasing interest from both academia and industry. This is motivated by their wide applicability in several application domains [1], [2], [3]. In this context, sub-meter precision is widely considered as the most recommended enhancement today [4]. Among the many proposals in scientific literature, IPSs have been developed around Wi-Fi networks, with fingerprinting technique, which is still advised in many cases. The problem of indoor positioning and localization has not been uniquely solved over time: several studies proposed an estimation base on hybrid technologies, i.e., Wi-Fi and Bluetooth combined, others focused on radio signals filtering and post-processing [1][2][3][5][6][7][8][9]. Some proposed Direction IPIN 2021 WiP Proceedings, November 29 – December 2, 2021, Lloret de Mar, Spain Envelope-Open p.boccadoro@nextome.net (P. Boccadoro); d.colucci@nextome.net (D. Colucci); vincenzo.dentamaro@uniba.it (V. Dentamaro); l.notarangelo@nextome.net (L. Notarangelo); g.tateo@nextome.net (G. Tateo) Orcid 0000-0002-7981-9312 (P. Boccadoro); 0000-0003-1148-332X (V. Dentamaro) © 2021 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). CEUR Workshop Proceedings http://ceur-ws.org ISSN 1613-0073 CEUR Workshop Proceedings (CEUR-WS.org) Finding (DF) methods are based on the employment of Received Signal Strength Indicator (RSSI), which is also filtered to increase precision in many cases. The Bluetooth Special Interest Group (SIG)1 recently released the updated specifications for Bluetooth Low Energy (BLE), for both the Core Specifications [10] and topology enhancements, i.e., Bluetooth Mesh2 . When combining these features together, those major advancements can bring Bluetooth technology to a brand new stage. In fact, positioning, tracking and, more in general, DF problems can be dealt with relying on angular information. In particular, Angle of Arrival (AoA) and Angle of Departure (AoD) techniques are attracting attention today [11, 12, 13, 14, 15, 16, 17]. This challenging, non-linear, estimation problem aims at solving localization problems as it can determine the source position based on the propagation direction of an incident radio frequency wave when it reaches a receiving antenna array. Despite the interesting contributions proposed so far, the employability of DF and AoA in the context of Bluetooth-base networks still need to be further investigated to consolidate a reliable and accurate usability methodology. The present contribution proposes a framework for evaluating errors in DF systems based on the recently added AoA functionality. The envisioned solution starts from a Connection- Oriented Real-Time Locating System (RTLS) that has been experimentally evaluated to prove its reliability, in both indoor and outdoor scenarios. Once gathered, both angular and RSSI information have been processed with Machine Learning (ML) algorithms to evaluate errors, either systemic or not. Overall, the conducted experimental campaign demonstrated that it is possible to obtain the AoA and use it in DF problems with a precision level that appears to be hardware-dependent. Nevertheless, in indoor conditions physical effects, such as multipath and/or fading are relevant, with respect to indoor scenarios; therefore, a more precise estimation of both directions and distances could be reached using other quality indexes. In particular, the RSSI could be parts of the measurement framework since this is likely to be used in conjunction with AoA measurements. The work is organized as follows: Section 2 introduces the related works and the reference technological background. Section 3, instead, describes the proposed approach, with a focus on the RTLS architectures. With Section 4, the experimental evaluation is discussed in detail, together with the main findings. Finally, Section 5 concludes the work and draws future work possibilities. 2. Related works and Reference Background This Section discusses related works. Afterward, it presents the newly added features in BLE. Lastly, it introduces AoA as a methodology. 2.1. Indoor Positioning Solutions Indoor positioning and/or localization is a challenging task that has been dealt with by many contributions so far [2] [5] [6] [7] [9] [11] [12] [13] [14] [15] [18]. From a technological point 1 https://www.bluetooth.com/ 2 https://www.bluetooth.com/learn-about-bluetooth/recent-enhancements/mesh/ of view, many communication technologies and protocol stacks have been proposed, spanning from IEEE 802.11 (namely, Wi-Fi), to IEEE 802.15.x. Among the many, one of the most used in practice BLE [2], which envisions beacons periodically broadcasting peculiar radio signals, used to advertise and/or carry out several operations. Regardless of the involved technology, the localization process consists of two phases: signal measurement and position calculation [18]. Within the first phase, some properties of the signal are detected by the receiver. When the Bluetooth is involved, there are several possibilities. For example, by studying the RSSI it is possible to estimate the distances of the transmitters. Afterward, these values are used to calculate the position of the receiver [5, 6]. RSSI is also widely used in the finger printing approach [7]. [8] proposes a real-time monitoring system in the context of healthcare that focuses on elderly people. In particular, it aims at developing a cyber-physical system that combines both Wi-Fi and Bluetooth technologies. The system is composed by several devices replacing light bulbs, and monitoring the RSSI coming from the personal device of the person moving inside the area of interest. The localization task is accomplished with interesting precision values, since RSSI values are elaborated using dedicated Kalman filter solutions. In [9], instead, BLE is investigated in a challenging setup composed by a single hub, carrying out advertising tasks, and several tags to be sensed. Given the high number of communicating devices, collisions becomes a major concern and a severe performance drop in communication is observed. Such a drawback is mitigated by a large use of re-transmission. [11] leverages the Bluetooth 5.1 Core Specifications to investigate the positioning capabilities. In particular, the proposal evaluates the accuracy of a positioning system based on the AoA, to prove its reliability. Nevertheless, the system is composed by a limited number of antennas, working at the same time. Many contributions are also investigating the Time of Arrival (ToA) and the AoA methods to evaluate the time and the angle of the incident signal, respectively. [13] evaluates the AoA at the receiver’s side, using the received signal instead of phase components. The choice is motivated by the fact that the synchronization of a synthetic antenna array is assumed to be hardly reachable. The discussed results have interesting precision values, which are obtained at the cost of a long data processing and elaboration time. When comparing ToA and AoA, the second does not require clock synchronization between the target and the base stations. The target’s position can be estimated using the known positions of the two anchors. Hence, the AoA can be obtained with simple geometric rules. When multiple antenna elements are involved, the AoA can be obtained through different techniques. The first is Switched Beam System (SBS), which uses a fixed number of elements of elements at the same time. Here, each beam covers a certain area. All the gathered signals are compared to find the maximum signal strength. The second, instead, is Adaptive Array System (AAS), which selectively increases the gain of an antenna element in the array in case the target is identified. Among the AAS based solutions, the subspace techniques based on the concept of orthogonality of the signal subspace to subspace noise. The most widely studied method in this group is MUltiple SIgnal Classification (MUSIC) [14]. An example of signal processing through the MUSIC algorithm can be found in [15]. In [16], an estimation of the angle of the BLE signal is given, based on the phase difference between the I/Q samples received from different elements embedded in an AAS. To decrease the sensitivity of the AoA localization to multipath effects, Non-Line of Sight (NLoS), fluctuations of the received signal and phase and frequency shifts, Nonlinear Least Square (NLS) curve fitting, Kalman Filter (KF), and gaussing filter is used on raw I/Q samples. In [17], instead, a combined signal processing and ML tool is proposed for AoA estimation. Specifically, trained regression models using data collected by multiple antennas are used to estimate the AoA. Training is based on a real-world measurements in indoor conditions with a Bluetooth 5 system. The proposed approach for AoA estimation uses regression, for instance, Neural Networks (NN), Gaussian process and Regression Trees (RT), and provides an improvement of at least 20% over the basic approach of the traditional multiple signal classification algorithm. In [19], a ML-based fast AoA recognition framework is proposed for vehicular communica- tions. The regression models Support Vector Machine (SVM) trained by the measured data in actual vehicular scenarios are used to solve non-linear mapping problem from array output space to AoA space. Despite the interesting contribution proposed so far, the employability of DF and AoA in the context of Bluetooth-based networks still needs to be further investigated. 2.2. The Bluetooth Technology Bluetooth is a promising communication technology specifically designed to provide wire- less connectivity for IoT devices in multiple smart domains. The most relevant, yet peculiar, functionalities that the Bluetooth leverages are low energy footprint and short range coverage capabilities [20]. In the context of the IoT application domains, the BLE is a major advancement in the standard. In fact, it enables interoperable short-range wireless communication with low-power radio frequency primitives. The Bluetooth 5.0 Core Specifications [10], released and maintained by the Bluetooth SIG, may be considered as a major leap for the communication protocol, especially in the context of IoT applications [1, 2, 3, 4]. It is worth noting that the main modifications were introduced at the Physical (PHY) layer, where a better robustness to interference is now granted. In particular, among the newly added modulation schemes, i.e., LE 1M uncoded, LE 1M coded, and LE 2M uncoded. The latter allows a 2 Msym/s datarate with a 2 MHz bandwidth for each channel. Moreover, the three possibilities also differ because of the employment of a coding scheme, to increase sensitivity. Another interesting feature is the high duty cycle non-connectible advertising, which contributes to an increased speed in certain advertising events. A second interesting modification is the LE Long Range, a new coding scheme that extends the transmission range. At the same time, Bluetooth 5.0 adopts Forward Error Correction (FEC). The choice is motivated by the fact that this approach trades off the data rate for higher data sensitivity, since it uses several symbols to represent one bit so that original data can be recovered. The third main contribution is the LE Advertising Extensions, which first introduces beacon- based service, by means of an extended advertising capacity. The goal is reached by increasing the number of channels for advertising operations to 37, with the original 3 channels considered as the primary choice, and the others as secondary. Bluetooth is now characterized by several Protocol Data Units (PDUs), specifically extended for advertising purposes, so that broadcasting can be improved. Specifically, new PDUs allow two Bluetooth devices to exchange data, still they no longer need to be paired. This implies a greater reliability and efficiency when receiving Bluetooth beacons. Moreover, Connectionless advertising is now enabled [20]. In Bluetooth 5.1, the Core Specifications have been modified to introduce DF features that can be used to track/find a target in a reference area by estimating the angle formed by the tracker and the target [20] by leveraging AoA and/or AoD methods. The problem of DF with Bluetooth can be solved thanks to a source of constant signal to which IQ sampling can be applied. This solution assumes an antenna array with multiple elements that can be switched as needed. To fully support this message exchange, the packet structure at LE PHY layer has been modified. Figure 1 details the structure of the Bluetooth packet, thus highlighting the presence of a preamble, an access address, a PDU, and the Cyclic Redundancy Check (CRC). The structure of the PDU has been modified as well to include an additional frame, namely the Constant Tone Extension (CTE). It is noted that the size of the advertising message has been increased from 31 B to 254 B. 1-2 Bytes 4 Bytes 2+(0 - Max) Bytes 3 Bytes Packet Format Preamble Access Address PDU CRC CTE 2 Bytes 37 Bytes (max) 2 Bytes 37 Bytes (max) PDU Format Header Payload Header Payload 6 Bytes 31 Bytes (max) Inside Packet Header AdvData 1 Byte 0-63 Bytes 254 Bytes (Max) Extended Header Length + AdvMode Extended Header AdvData Figure 1: Advertising packet structure with CTE information. 2.3. A focus on the AoA The AoA technique is based on radio signals propagation and detection. It devotes attention to the time taken by the signal to propagate and reach multiple sensing elements, which are configured as an array. In fact, measuring the AoA needs a mobile device that transmits to a receiving station that uses directional antennas. The performance of this system highly depends on the accuracy of the antennas used to measure angles. Further, changing scattering characteristics and multipath signals may sensibly hinder the performance of the AoA navigation technique. One way to reduce the influence of scattering and the multipath-related issues, is to elevate the antenna to a certain height, so that it is not located on the ground. There are two different approaches to DF: Trilateration and Triangulation. The former is characterized by a know distance between a reference node and the target. Here, the RSSI is widely employed. In the latter, instead, the distance between the target node and the reference one is not known in advance, and the focus is on direction. AoA is a technique that can be used to measure the angle between the receiver and the transmitter. It is worth specifying that multiple AoA nodes can be used in direct combination to perform triangulation tasks. This is of upmost importance since using one AoA-capable device (i.e., a device with multiple antenna elements), can only evaluate one angle instead of a position. Hence, a RTLS becomes mandatory. 3. The proposed Approach This Section proposes a detailed explanation of the RTLS involved in the test. 3.1. Real-Time Locating System According to the Bluetooth 5 Core Specification [10], DF can use both AoA and AoD to create an RTLS system. The latter, in turn, may be configured as a Connectionless or Connection-Oriented solution3 . An RTLS can be defined as a system capable of determining the position of a target within a given physical area. The physical area is normally defined through deployment of reference/locator nodes. The system can operate in real-time or near real-time conditions. The nodes involved in an RTLS are: the Central node, the Peripheral device, the Passive and the Central Processing node. The Connection-Oriented AoA setup includes: a transmitter, who sends the CTE over periodic advertisement packets, and the receiver, that is synchronized with the advertiser and receives the CTE packets. This setup also includes a RTLS Central node running a full BLE-Stack and acting as a Central device. Its role is to scan and connect to any RTLS Peripheral. On top of this procedure, the RTLS Central node will be in charge of sharing the connection parameters, such as the access address, the Central sleep clock accuracy, and the CRC init. Once these information have been shared, the configuration of the Peripheral nodes will be completed, so they will be able to send the AoA packets. It is worth noting that the RTLS Peripheral device is the one to be located, which implies that it will be in charge of advertising and getting connected with the RTLS Central node. Hence, the information related to the AoA will be embedded in the CTE field of the message. The RTLS Passive node does not actively participate in the communication between the devices and executes a reduced set of instructions. Once the connection between the RTLS Central node and the Peripheral one is established, the Passive node receives packets containing the CTE information and samples both the In-phase and Quadrature (IQ) components. The whole system is monitored by a Central Processing Node, which is responsible for controlling the embedded RTLS nodes by sending commands and processing events. Figure 2 graphically represents the main building block of the envisioned RTLS. In the Connection-less RTLS, instead, the Central node is configured to act as an observer device. Therefore, it scans for the RTLS Peripheral and synchronizes to it. The latter is, in turn, 3 It is worth noting that in typical use cases, the AoD is used in Connectionless communication, whereas the AoA is involved in Connection-Oriented setups. The main difference between the configurations will be reflected in the Bluetooth profiles. Backhaul Connection (wired) Elaboration Message Exchange (wireless) unit Reference scenario Storage Master Node Central Node Target device (Slave) Data Passive visualization Node Figure 2: RTLS architecture. periodically advertising. Once synchronized, the RTLS Central receives the CTE packets and samples the IQ components. The RTLS Peripheral device is, once again, the device to be located and it acts as a broadcaster device. In this setup, the Central Processing node is responsible for monitoring and controlling the RTLS nodes. 3.2. Investigation directions The Connection-Oriented RTLS experimental setup (see Figure 3) has been evaluated to verify its reliability. The experimental campaign has been designed in order to verify the reliability of 45𝑜 135𝑜 −45𝑜 Figure 3: Expected AoA values. the measured values in Line of Sight (LoS) conditions, and, in particular: • The stability of the measured AoA in fixed positions at variable angular positions. • The variation of the measured AoA when the angular position of the Beacon changes. In addition, measured signals were further investigated to: • Compare the measured average AoA with the expected ones4 . • Develop a new model that calculates the real angle starting from the surveyed data present, and assess its reliability. According to the documentation, the expected performance level does not provide high accuracy at the edges of the field of view, whereas it is expected to be more precise for the angles that are in front of the antenna array. Figure 4 presents the proposed evaluation framework. Statistical X_test Y_test Test set RTLS Parameters Data Angle Evaluation Data Angle Training set X_training Y_training Initial Trained Error on Data Angle Supervised Supervised real Angle Data Angle ML solution ML solution RTLS Peripheral Node Model training Figure 4: High-Level representation of the proposed Framework for AoA evaluation and error calculation. 4. Experimental Evaluation In this Section, the conducted experimental campaign is described together with the main findings. The evaluation was carried out with the specific aim of testing DF solutions in real- world scenarios and operating conditions. The experimental campaign has been carried out in both indoor and outdoor scenarios to prove if there’s any difference between the two operating conditions. The choice is motivated by the fact that outdoor scenarios may suffer less from multipath and/or fading phenomena, occasionally caused by walls, roofs, and physical obstacles, when compared to indoor ones. In a nutshell, the outdoor scenario was a parking lot of a public street with no cars moving around in a 5 meters radius around the master node. The indoor scenario was an open space room, free of furniture, of about 30𝑚2 inside a house. To provide a fair playground for comparison, in the experimental campaign both the AoA and the RSSI values have been measured at fixed positions. To this aim, an RTLS has been setup using a Lauchpad CC26X2R1, together with the AoA Boostpack. The system includes one Master device, one Slave, i.e., the element to be detected, and a Passive device that is equipped with an antenna array of three elements. Figure 5 summarises the main component of the involved testbed together with their deployment. It is also useful to clarify that the AoA measurements are related to an Azimuth angle. In particular, 4 Angle of Arrival Boostpack - https://www.ti.com/tool/BOOSTXL-AOA z y 1m x Passive Master Fixed distance Array 1 0! 20! 180! 40! ! 160 60! 140! ! 80 120! 100! Slave Figure 5: Graphical representation of the involved testbed. in the first part of the experimental campaign, measurements have been carried out to gather the aforementioned information over a total span of 180 degrees at a fixed pace of 20. The expected result of the experiment is the characterization of the values that the antenna array can effectively measure in a 2-dimensional plan. In the second part of the experimental campaign, instead, the slave device has been made moving over a semicircle centered in the Passive antenna, i.e., the center is located in the middle of the antenna array, with a radius of 1 meter. The test has been repeated over different patters with increased radius values of 2 and 3 m. The experiments have been repeated in both indoor and outdoor conditions for the sake of completeness. 4.1. Parameter Settings Before going to the results, it is worth clarifying the whole parameters settings for the experi- mental campaign. In particular, in Table 1 it is clarified: (i) the distance between the Slave and the Passive antenna, (ii) the angles between the active array and the direction of origin of the signal, (iii) the environment in which the test took place, (iv) the Beacon inter-sending time, (v) the array enabled on Passive antenna, and, for the second part of the experimental campaign, (vi) the total length of a single test. 4.2. Indoor and Outdoor Characterization When thinking about indoor localization and DF, one of the most relevant difference in the operating scenario is the difference between outdoor and indoor conditions. The outdoor propagation of radio frequencies is generally less problematic in terms of multipath and many other physical phenomenon. In this experimental campaign it was mandatory to verify the reliability of the selected technological tools in terms of the quality of the measurements that Parameter Values Fixed Distance 1 m, 2 m, 3 m Fixed Angle 𝑘 ⋅ 20° with 𝑘 ∈ [0, 9] Scenario Indoor, Outdoor Sampling period 100 ms Active array Array 1 Test duration 1 minute, 2 minute Table 1 Parameter settings 2. can be conducted. The main results of the experimental campaign that has been carried out are summarized hereby. Figure 6 proposes the AoA measurements in outdoor condition. These first tests were conducted to verify the effective Field of View (FoV) of the antenna array. It was of upmost importance to verify if there was any spread between the actual angular position and the measured one. Further, the measured AoA had to be compared with the expected actual angular position, which was known in advance. What clearly emerged is that, as long as the distance between the slave and the passive antenna increases, the spread among the expected AoA and the measured ones increases as well. Moreover, it can be noticed that with shorter values of distance between the slave and the passive antenna, the spread between the measured values and the actual angular positions lowers. In particular, when moving from an angular position of 40° to a 140°, the measured AoA seems able to track the angular variation in a quite straightforward way. With angular values that are either lower than 40° or higher than 140°, the antenna array shows severe limitations and an increasing variability of the measured values. This suggests that, in outdoor conditions, distance matters and it can be concluded that the closer the object is, the better this technique works. As for Figure 7, the trend seems to be quite the opposite. In fact, in indoor conditions, it is noted that, with increasing values of the distance between the slave and the passive antenna, the reliability of the measured AoA increases. In particular, it seems to follow a more reliable trend. This can be motivated by the fact that indoor propagation may be severely hindered by multipath and/or fading phenomena, as well as shading, occurring because of physical objects and obstacles that may have non-negligible effects on radio frequency signals propagation. It is worth specifying that the RSSI values measured have been omitted. Their trends were pretty much constant, with slight variations depending on the statistical fluctuation this indicator is always subject to. Moreover, slight differences between the measured RSSI values could be noted when moving from 1 m to 2 and 3 m, with a general decreasing trend as the distance increased. As an example, Figure 8 shows the RSSI values measured in the indoor environment at a fixed distance of 3 meters. 4.3. Movements Tracking Given the assessed reliability of the tool, it was worth verifying if a moving object could be tracked over time. Hence, in this second part of the experimental campaign, the slave has been made moving around a half-circumference of radius 1 m and 2 m. The tests have been repeated 175 175 150 150 125 125 100 100 75 75 AoA [°] AoA [°] 50 50 25 25 0 0 25 25 0 20 40 60 80 100 120 140 160 180 0 20 40 60 80 100 120 140 160 180 Real angle [°] Real angle [°] (a) At 1 m distance. (b) At 2 m distance. 175 150 125 100 AoA [°] 75 50 25 0 25 0 20 40 60 80 100 120 140 160 180 Real angle [°] (c) At 3 m distance. Figure 6: Outdoor AoA measurements. in both indoor and outdoor conditions. As a preliminary assessment, the measured AoA should not differ much from the previously reported values and it is reasonable to assume that an overall linear trend can be observed when moving from 0 to 180°. What clearly emerges from Figures 9 and 10 is that, in outdoor conditions, lower distances lead to more precise tracking activities. In indoor scenarios, instead, when the distance between the slave and the passive antenna increases, the measurements become more precise and a clearer trend emerges, depicting the movement of the slave. Also in these case, the RSSI has shown a pretty constant trend because the distance between the devices is not changing. Hence, the graphs are omitted. 4.4. Getting Data out of Data After a detailed evaluation of the experimental data, it could be noted that: (i) there’s a non- uniform, non linear, relationship between the real angle and the measured one, and (ii) the relationship depends on the operating conditions, e.g., the outdoor/indoor scenario, and the distance. Therefore, gathered information required further investigations. For instance, given the variability of the measured AoA and RSSI, a relationship was investigated between their first and second order statistical moments, i.e., the means and standard deviations, respectively, 175 175 150 150 125 125 100 100 75 75 AoA [°] AoA [°] 50 50 25 25 0 0 25 25 0 20 40 60 80 100 120 140 160 180 0 20 40 60 80 100 120 140 160 180 Real angle [°] Real angle [°] (a) At 1 m distance. (b) At 2 m distance. 175 150 125 100 AoA [°] 75 50 25 0 25 0 20 40 60 80 100 120 140 160 180 Real angle [°] (c) At 3 m distance. Figure 7: Indoor AoA measurements. and the real angle. Indeed, two different approaches were used to find the relationship between the data collected during the tests and the real angle at which the slave was. In the former, a linear relationship has been proposed: 𝜃𝑟𝑒𝑎𝑙 = 135° − 𝐴𝑜𝐴𝑚𝑒𝑎𝑠𝑢𝑟𝑒𝑑 . (1) Thanks to Eq. (1), a disappointing Mean Absolute Error (MAE) of 28° is found. In the latter, instead, a more sophisticated approach has been proposed, based on ML techniques, to find a model to derive the real angle from all available data. The description of the proposed approach has been introduced with Figure 4. To model the AoA, two different algorithms have been involved, namely Random Forest (RF) regressor and Support Vector Regression (SVR). Without loss of generality, the approach has been applied to indoor measurements. It is herein considered that a total of 𝑛 = 4 features are included: the mean and standard deviation of the AoA, and the mean and standard deviation of the RSSI. The reference set of training data is (𝑥1 , 𝑦1 ), ..., (𝑥𝑙 , 𝑦𝑙 ); here, each 𝑥𝑖 ∈ 𝑅𝑛 denotes a sample in the input space and has a corresponding target value 𝑦𝑖 ∈ 𝑅 for 𝑖 ∈ 1, ..., 𝑙, being 𝑙 the size of the training data. The basic idea of SVR is to map the training data from the input space into a higher dimensional feature space. To this aim, a closed-form function must be derived 100 90 80 70 RSSI [dBm] 60 50 40 30 20 0 20 40 60 80 100 120 140 160 180 Real angle [°] Figure 8: Indoor RSSI measurements at 3 m distance. to accurately approximate the values from the involved features. The generic SVR estimating function is expressed as: 𝑓 (𝑥) = (𝑤Γ(𝑥)) + 𝑏, (2) where 𝑤 ∈ 𝑅𝑛 , 𝑏 ∈ 𝑅, and Γ denote a nonlinear transformation from 𝑅𝑛 to high-dimensional space. A RF-based solution, instead, is an ensemble of decision trees and, unlike the SVR, it does not need to work on normalized data. To improve the reliability of the estimations, k-fold cross validation technique has been used, with 𝑘 = 10. The whole dataset is composed by 1182 samples. It has been subdivided in a training set (composed by 1063 samples) and a test set (composed by 119 samples) with a 9/1 ratio. In Table 2, the performance of the two algorithms are compared. The obtained results motivate the choice of the RF Regressor. The SVR training has been carried out relying on the rbf kernel, whereas RF has been configured with 10 estimators and 𝑚𝑎𝑥𝑑𝑒𝑝𝑡ℎ = 5. Algorithm Score MAE on test set Elapsed Seconds RF 0.991 2.423 0.29 SVR 0.980 6.018 0.582 Table 2 Algorithm comparison table. 1 meter 150 100 AoA [°] 50 0 0° 45° 90° 135° 180° 2 meters 150 100 Aoa [°] 50 0 0° 45° 90° 135° 180° Figure 9: Outdoor AoA measurements at different distances with respect to the real angle. 1 meter 150 100 AoA [°] 50 0 0° 45° 90° 135° 180° 2 meters 150 100 Aoa [°] 50 0 0° 45° 90° 135° 180° Figure 10: Indoor AoA measurements at different distances with respect to the real angle. 5. Conclusions This work proposed a framework that leverages AoA information in the context of IPSs to solve DF problems. In detail, it discussed a feasible and reliable strategy to deal with the problem of DF in the context of Bluetooth-based short range communications. To prove the suitability of the AoA as a quality indicator, a framework has been proposed to investigate thorough experimental evaluation has been carried out in both outdoor and indoor scenarios. Overall, the experimental campaign proposed interesting results. Nevertheless, in indoor conditions, the AoA is not sufficient and a more precise estimation of both directions and distances could be reached using other quality indicators. In particular, the RSSI could be parts of the measurement framework since this is likely to be used in conjunction with AoA measurements. The employment of ML techniques represents a promising, yet preliminary, result. Despite the interesting outcomes, in the near future several research directions are envisioned. First of all, a massive experimental campaign is already on-going, with the aim of retrieving as much data as possible in several indoor scenarios, such as malls and theaters as well as offices and domestic environment. Further, the experimental setup will be strengthened with the introduction of a second antenna array, to improve the reliability of the system. The differences between Connection-Oriented and Connectionless setups will be experimented and analyzed in detail. Lastly, privacy-related aspects will be included. Acknowledgments This study was carried out as part of the project NxTracker (n. F/190081/02/X44 MISE It. Gov.) with Idea75 and Nextome. References [1] J. Kunhoth, A. Karkar, S. Al-Maadeed, A. Al-Ali, Indoor positioning and wayfinding systems: a survey, Human-centric Computing and Information Sciences 10 (2020) 1–41. [2] F. Zafari, A. Gkelias, K. K. Leung, A survey of indoor localization systems and technologies, IEEE Communications Surveys Tutorials 21 (2019) 2568–2599. doi:1 0 . 1 1 0 9 / C O M S T . 2 0 1 9 . 2911558. [3] X. Guo, N. Ansari, F. Hu, Y. Shao, N. R. Elikplim, L. Li, A survey on fusion-based indoor positioning, IEEE Communications Surveys Tutorials 22 (2020) 566–594. [4] J. Yin, Z. Yang, H. Cao, T. Liu, Z. Zhou, C. Wu, A survey on bluetooth 5.0 and mesh: New milestones of iot, ACM Transactions on Sensor Networks (TOSN) 15 (2019) 1–29. [5] B. Yang, L. Guo, R. Guo, M. Zhao, T. Zhao, A novel trilateration algorithm for rssi-based indoor localization, IEEE Sensors Journal 20 (2020) 8164–8172. doi:1 0 . 1 1 0 9 / J S E N . 2 0 2 0 . 2980966. [6] Z. G. Jun, L. Xin, X. Z. Long, L. H. Chao, Weighted least square localization algorithm based on rssi values, in: Fifth International Conference on Instrumentation and Measurement, Computer, Communication and Control (IMCCC), IEEE, 2015, pp. 1236–1239. [7] J. Yan, L. Zhao, J. Tang, Y. Chen, R. Chen, L. Chen, Hybrid kernel based machine learning using received signal strength measurements for indoor localization, IEEE Transactions on Vehicular Technology 67 (2017) 2824–2829. [8] I. Marin, M.-I. Bocicor, A.-J. Molnar, Indoor localization techniques within a home monitor- ing platform, in: E. Damiani, G. Spanoudakis, L. A. Maciaszek (Eds.), Evaluation of Novel Approaches to Software Engineering, Springer International Publishing, Cham, 2020, pp. 378–401. [9] M. Nikodem, M. Bawiec, Experimental evaluation of advertisement-based bluetooth low energy communication, Sensors 20 (2020). doi:1 0 . 3 3 9 0 / s 2 0 0 1 0 1 0 7 . [10] Bluetooth SIG, Bluetooth core specification version: 5.0, https://www.bluetooth.com/spec- ifications/blue-tooth-core-specification, 2021. Accessed: 2021-03-31. [11] M. Cominelli, P. Patras, F. Gringoli, Dead on arrival: An empirical study of the bluetooth 5.1 positioning system, in: 13th International Workshop on Wireless Network Testbeds, Experimental Evaluation & Characterization (WiNTECH), Association for Computing Machinery, New York, NY, USA, 2019, p. 13–20. doi:1 0 . 1 1 4 5 / 3 3 4 9 6 2 3 . 3 3 5 5 4 7 5 . [12] P. Spachos, I. Papapanagiotou, K. N. Plataniotis, Microlocation for smart buildings in the era of the internet of things: A survey of technologies, techniques, and approaches, IEEE Signal Processing Magazine 35 (2018) 140–152. [13] C. R. Karanam, B. Korany, Y. Mostofi, Magnitude-based angle-of-arrival estimation, local- ization, and target tracking, in: 17th ACM/IEEE International Conference on Information Processing in Sensor Networks (IPSN), 2018, pp. 254–265. doi:1 0 . 1 1 0 9 / I P S N . 2 0 1 8 . 0 0 0 5 3 . [14] A. Badawy, T. Khattab, D. Trinchero, T. ElFouly, A. Mohamed, A simple angle of arrival estimation system, in: IEEE Wireless Communications and Networking Conference (WCNC), IEEE, 2017, pp. 1–6. [15] S. Monfared, T.-H. Nguyen, L. Petrillo, P. De Doncker, F. Horlin, Experimental demon- stration of ble transmitter positioning based on aoa estimation, in: IEEE 29th Annual International Symposium on Personal, Indoor and Mobile Radio Communications (PIMRC), IEEE, 2018, pp. 856–859. [16] Z. Hajiakhondi-Meybodi, M. Salimibeni, K. N. Plataniotis, A. Mohammadi, Bluetooth low energy-based angle of arrival estimation via switch antenna array for indoor localization, in: IEEE 23rd International Conference on Information Fusion (FUSION), IEEE, 2020, pp. 1–6. [17] A. Khan, S. Wang, Z. Zhu, Angle-of-arrival estimation using an adaptive machine learning framework, IEEE Communications Letters 23 (2019) 294–297. doi:1 0 . 1 1 0 9 / L C O M M . 2 0 1 8 . 2884464. [18] D. Lymberopoulos, J. Liu, X. Yang, R. R. Choudhury, V. Handziski, S. Sen, A realistic evaluation and comparison of indoor location technologies: Experiences and lessons learned, in: 14th International Conference on Information Processing in Sensor Networks (IPSN), Association for Computing Machinery, New York, NY, USA, 2015, p. 178–189. doi:1 0 . 1 1 4 5 / 2 7 3 7 0 9 5 . 2 7 3 7 7 2 6 . [19] M. Yang, B. Ai, R. He, C. Huang, Z. Ma, Z. Zhong, J. Wang, L. Pei, Y. Li, J. Li, Machine- learning-based fast angle-of-arrival recognition for vehicular communications, IEEE Transactions on Vehicular Technology (2021). [20] N. B. Suryavanshi, K. Viswavardhan Reddy, V. R. Chandrika, Direction finding capability in bluetooth 5.1 standard, in: N. Kumar, R. Venkatesha Prasad (Eds.), Ubiquitous Commu- nications and Network Computing, Springer International Publishing, Cham, 2019, pp. 53–65.