High-Accuracy Ranging and Localization with Ultra-Wideband Communications for Energy-Constrained Devices

Ultra-wideband (UWB) communications have gained popularity in recent years for being able to provide distance measurements and localization with high accuracy, which can enhance the capabilities of devices in the Internet of Things (IoT). Since energy efficiency is of utmost concern in such applications, in this work we evaluate the power and energy consumption, distance measurements, and localization performance of two types of UWB physical interfaces (PHYs), which use either a low- or high-rate pulse repetition (LRP and HRP, respectively). The evaluation is done through measurements acquired in identical conditions, which is crucial in order to have a fair comparison between the devices. The LRP devices that we tested have the same ranging and localization performance, but ten times (10x) lower power consumption, 6x lower energy consumption per distance measurement, and at least 8x higher coverage than the HRP devices. Therefore, UWB LRP devices can offer high-accuracy ranging and localization even to ultra-low-power devices in the IoT. We performed measurements in typical LOS and NLOS scenarios and propose theoretical models for the distance errors obtained in these situations. The models can be used to simulate realistic building deployments and we illustrate such an example. This paper, therefore, provides a comprehensive overview of the energy demands, ranging characteristics, and localization performance of state-of-the-art UWB devices.

or wireless sensor networks in general. More recently, UWB chipsets have been included in smartphones and it is estimated that 50 % of the smartphones on the market will incorporate UWB chipsets by 2027 [2]. Given the fast adoption of UWB technology and its integration and interaction with devices in the IoT, it is crucial to evaluate both its ranging and localization performance and its energy efficiency in order to determine its suitability for different types of applications.
UWB devices provide time-of-flight (ToF) measurements with sub-nanosecond accuracy which can be used to estimate the distance between two devices. Distance measurements (or ranges) are the basis of the true-range multilateration algorithm which is used in many localization applications [3]. Therefore, evaluating ranging errors is often the first step in analyzing the localization accuracy of UWB localization systems.
The energy consumption of UWB devices depends on their architecture. The IEEE Standard for Low-Rate Wireless Networks 802.15.4 [4] specifies two UWB physical interfaces (PHYs), that use high-and low-rate pulse repetition (HRP and LRP, respectively). Transmitting pulses at low rates enables a more energy-efficient implementation of LRP PHYs, using non-coherent receivers, than the ones based on coherent receivers, which are typically used in HRP PHYs. Coherent receivers use the phase of the signal in the detection process, while non-coherent receivers can estimate the channel coefficients with lower synchronization constraints based on the envelope of the signal. This makes LRP UWB devices suitable for energy-constrained devices. So far, it has not been clear whether this advantage comes with a cost in the ranging and localization performance.
Although coherent and non-coherent UWB receivers have been compared from a theoretical standpoint in literature, these studies have relied on simulations rather than measurements [5], [6]. Previous work that analyzed the ranging accuracy of UWB devices through measurements [7], [8], [9] has focused mostly on the Decawave DW1000 IC [10], which implements the HRP PHY. Few works have analyzed commercially available LRP UWB devices and they targeted mostly their ranging accuracy without a detailed analysis of their power and energy consumption [11], [12]. To the best of our knowledge, only one paper included a comparison of HRP and LRP devices (developed by Decawave and Ubisense, respectively) [11] but only on their ranging and localization performance, without regards to the energy efficiency of the devices. Therefore, the current literature on comparisons of the two types of PHYs, on the one hand, and on commercially available UWB LRP devices, on the other hand, is very scarce. In particular, LRP devices deserve more attention since they can be implemented with energy-efficient receivers and can therefore potentially enable ranging and localization applications on ultra-low-power devices.
In our previous work [1], we compared for the first time the power and energy consumption and the ranging performance of LRP and HRP devices using two commercially-available UWB devices: the Decawave DW1000 IC (HRP) 1 and the 3db Access 3DB6830C IC [14] (LRP) 2 . For the ranging performance, we used a database of distance measurements acquired with 3db devices and compared their statistics with results obtained with Decawave devices from the literature. This paper goes one step further and compares the ranging and localization performance of LRP and HRP devices using real measurements acquired in identical settings. This last detail is crucial for a fair comparison of the devices since different environments can have a different impact on distance measurement errors. In addition, the current work offers a more in-depth analysis of the typical ranging errors of LRP devices in several scenarios.
Since indoor localization is often subject to multipath and shadowing phenomena, we analyzed the statistics of ranging errors in line-of-sight (LOS) and three non-line-ofsight (NLOS) scenarios, where the obstruction between the transmitter and the receiver was caused by a person, a gypsum wall (also called drywall panel), or a concrete wall. We derived statistical models for the error distributions obtained from measurements, which can be used to simulate realistic ranging and localization scenarios that would otherwise take days or weeks to implement and evaluate. We argue, in particular, that there are still unsolved problems about deploying a UWBbased localization system inside a building. Finding adequate LOS and NLOS error models, such as the ones proposed in our work, and using them to simulate the expected localization errors can help in this regard. For instance, many existing works [11], [15], [16], [17], [18], [19] consider only setups where the anchors are placed inside the same room because they yield the highest localization accuracy. However, this constraint is often hard to enforce in real deployments. For one, in highly compartmentalized spaces (for instance, office buildings) this would lead to a high anchor density, which in turn increases the deployment costs, the complexity (in terms of synchronization constraints, multiple access, anchor selection and placement strategy, etc.), and the total energy consumption of the localization system. Second, we show that this constraint might not be even needed, for instance when rooms are divided by shallow walls which cause only small localization errors. This paper, therefore, provides a comprehensive outlook on the typical power consumption and ranging performance of 1 Decawave has recently been acquired by the semiconductor company Qorvo [13], hence is in the process of changing its name to Qorvo. Since this change is rather recent, we still refer to the company and devices as "Decawave," this being the name under which they are still widely known. 2 We will refer to the 3db 3DB6830C (Release 2016) and the Decawave DW1000 (Release 2014) as the 3db and Decawave ICs, respectively. two state-of-the-art UWB devices, as well as their expected localization accuracy based on both real measurements and simulations. Our proposed error models can be used in future works to simulate custom building deployments and our measurements are publicly available 3 to facilitate future research.
To summarize, the main contributions of this paper are the following: • We analyze the average power consumption of 3db Access (LRP) and Decawave (HRP) devices in the receive, transmit, and idle modes and compute their energy consumption per distance measurement. • We evaluate and compare the accuracy and precision of distance measurements of 3db Access and Decawave devices based on measurements recorded in identical settings in LOS and NLOS scenarios caused by drywall, a concrete wall, and the human body. • We analyze the ranging performance of 3db Access devices on different channels (at 6.5, 7, and 7.5 GHz) and propose channel diversity strategies that can improve the ranging accuracy. • We implement localization systems based on the two types of devices and evaluate their performance experimentally in both LOS and NLOS settings. • We provide statistical models for the LOS/NLOS ranging errors of 3db devices and evaluate their performance in a simulated building deployment when anchors are either in the same room or in adjacent rooms separated by a gypsum or a concrete wall. The rest of the paper is organized as follows. In Section II, we analyze the theoretical differences between LRP and HRP PHYs and introduce the basics of UWB ranging and localization. We present the experimental setup in Section III and evaluate the power consumption, distance measurement errors, and localization performance of the ICs based on measurements in Section IV. In Section V, we model the ranging errors obtained experimentally and show how they can be used to simulate a localization application. In Section VI, we present the state-ofthe-art in UWB localization and propose several directions for future work. Finally, we draw the conclusions in Section VII.

II. BACKGROUND
In Section II-A, we first introduce UWB devices and the main types of receiver architectures used in commercial devices. UWB devices can perform ToF measurements with subnanosecond accuracy and can therefore measure the distance between two devices with centimeter-level accuracy. Distances between two devices have value in themselves (e.g., to find lost objects) but also as a first step in multilateration algorithms for localization. In this paper, we compare both the ranging and localization performance of two types of UWB devices. We introduce ranging and localization concepts with UWB devices in Section II-B and II-C, respectively.

A. UWB Device Architectures
The IEEE 802.15.4 standard [4] defines two types of physical interfaces with low and high pulse repetition frequency: LRP and HRP, respectively. The Decawave DW1000 UWB chip is compliant with the HRP PHY defined in the IEEE 802.15.4 standard [4]. It is perhaps the most widely-used UWB device, so we chose it to represent the HRP PHY class. Decawave has recently released a new UWB chipset, the DW3000 [20]. However, the new-generation chipsets are currently available only as engineering samples, which is why we focused on the old release. The 3db IC is compliant with the LRP PHY specified in the IEEE 802.15.4z amendment [21]. The chip is already being used for secure keyless car access but it has not been evaluated in high-accuracy applications yet.
UWB transmissions have to satisfy two constraints imposed by international regulations [22]: a maximum average power spectral density (PSD) of −41.3 dBm/MHz (averaged over 1 ms) and a maximum peak power spectral density of 0 dBm/50MHz. UWB devices can, therefore, transmit over a fixed period either few pulses at high power levels or many pulses with lower transmit power. The first situation falls under the LRP specification and is employed by 3db devices, while the latter is known as HRP and is used by Decawave. If optimally employed, both of these technologies benefit from an equal average transmitted RF energy.
Since the HRP PHY transmits individual pulses with lower energy than the LRP, the received pulse energy is also lower for the same path loss (same distance). Therefore, the HRP PHY needs more sophisticated techniques to extract weaker pulses from the receiver noise, typically performed with correlations over many samples. For this reason, Decawave devices use coherent receivers. Because 3db devices implement the LRP PHY, they can use a non-coherent receiver based on energy detection (ED) for signals modulated with binary frequency-shift keying (BFSK).
Coherent receivers use phase information in the detection process. They typically have low sensitivity to inter-symbol and co-user interference and benefit from the multipath diversity of the UWB channel [23]. At the same time, the receiver architecture demands high computational resources and hardware complexity [24]. For optimal reception, the coherent receiver needs to estimate the multipath delays, their complex-valued channel coefficients, and the pulse shape distortion [24]. A precise estimation of the carrier phase is crucial for recovering the baseband pulse since inaccuracies will result in signal power loss and crosstalk interference in signals modulated using phase-shift keying (PSK) [25]. For a carrier frequency of 8 GHz, a time shift of half of the pulse period flips the phase of the signal, so coherent UWB systems generally tolerate rotations only within π/4 of the signal phase (around 30 ps). These requirements increase the power consumption of coherent demodulators [23].
Non-coherent receivers estimate channel coefficients based on the envelope rather than on the phase and amplitude of the received signal, so they have lower synchronization constraints. The timing requirements of a non-coherent receiver are dependent only on the pulse envelope, which is related to the pulse bandwidth. For instance, if the pulse bandwidth is 500 MHz, the non-coherent receiver needs to operate with a timing resolution of 1 ns and it does not need high RF carrier synchronization. Therefore, non-coherent receivers can be more energy-efficient than coherent ones but have a higher bit error probability [25]. Another disadvantage of the noncoherent architecture is that it cannot be used for precise angleof-arrival (AoA) measurements with closely-spaced antennas.

B. Ranging Methods
The distance between two devices can be estimated based on the time of flight (ToF) of the signal. Using the transmission time (T 1 ) of the signal measured by the sender and the arrival time (T 2 ) at the receiver, we can compute the distance as [3]: where c is the speed of light and T p T 2 − T 1 is the propagation time of the signal. To accurately estimate the distance, the devices need to be tightly clock synchronized, as a small mismatch of 1 ns can introduce a distance error of around 30 cm. Because synchronizing the sender and the receiver is usually unfeasible in practice, more messages are exchanged in order reduce such errors, such as in the singleor the double-sided two-way ranging (SS-TWR and DS-TWR, respectively).
The SS-TWR uses two messages per distance estimate, as shown in Fig. II-B. The propagation time is: where T round is the time spent in one message exchange and T proc is the processing time on the responder side. It can be shown that the error in estimating T p is [26]: where e 1 and e 2 are the clock drift errors of the initiator and responder, respectively. The main source of errors in the SS-TWR are T proc , which is in the range of hundreds of microseconds, and the clock drift, which can be up to ±20 ppm in systems compliant with the IEEE 802.15.4 standard [4]. In the LRP PHY, a location-enhancing information postamble is introduced at the end of each message to estimate the clock drift error [4]. Besides, the processing time of LRP messages is shorter than the one of HRP. It is also more convenient to minimize the number of exchanged messages in the TWR since this reduces the time needed to obtain one distance measurement. Therefore, the SS-TWR is usually the method of choice for LRP devices.
The DS-TWR uses an additional message exchange to minimize clock drift errors. Although this is the ranging method typically employed in Decawave devices [10], the Decawave MDEK1001 kit that we used throughout this paper applies the SS-TWR [27] to improve the energy efficiency and reduce the air time. Although the HRP PHY does not include a postamble nor does it have a fixed processing time, the tags can estimate their clock drift with respect to the anchors based on periodic beacons transmitted by the anchors [27].

C. True-Range Multilateration
The true-range multilateration algorithm estimates the location of a mobile device (also called a tag) using distance measurements between the tag and fixed devices with known locations (also called anchors). The special case for 2D localization using three anchors is known as trilateration.
Let d i denote the distance between anchor A i and the tag, which can be written as: where x is the location of the tag, x Ai is the location of anchor A i , and v i is the measurement noise. The noise terms of all anchors are assumed independent.
In vector form, the measurement equation becomes: where y is the measurement vector (containing all measurements d j , j = 1, ..., N ), v the error vector, and h the vectorvalued measurement function. The equation can be solved by the least-squared solution x * which minimizes y−h(x) [3]. Multiple algorithms for solving the nonlinear system of equations were compared in [28]. The regularized Gauss-Newton multilateration algorithm is an iterative algorithm which has a similar accuracy to several algorithms with closedform solutions and a low computational complexity suitable for real-time applications [28]. For this reason, we used it to implement the localization systems evaluated in Section IV-E.
The algorithm needs an initial starting position x 0 , which should be chosen as close as possible to the real location for a quick convergence. For the first iteration, the starting position can be set to the solution of a closed-form multilateration algorithm or to the latest location of the tag (if available). At each iteration k, the algorithm computes the Jacobian matrix: The solution at step k + 1 is where x r is a regularization point taken as the mean of the anchors' coordinates and c is a regularization coefficient equal to the inverse of the standard deviation of a distribution centered at x r . The algorithm stops if the location increment is below a tolerance δ or if the algorithm reaches the maximum number of iterations.

III. EVALUATION SETUP
In the following, we describe the device setups used in the power, ranging, and localization measurements.
3db Access: The 3db chip is integrated into an Arduino shield on top of an Arduino M0 board. The communication between the chip and the host MCU is performed via SPI. We use the channel centered at 6.52 GHz and the peak data rate of 247 kb/s. The 10 dB bandwidth of a pulse is 380 MHz and, because pulse spectra partially overlap in BFSK modulation, the total system bandwidth is approximately 620 MHz. The packet duration is 400 µs. The IC was configured to transmit at the maximum level of −43.86 dBm/MHz, so within UWB regulations [22].
Decawave: We use the Decawave MDEK1001 kit which includes the DW1000 UWB chip integrated into the DWM1001 module. The DWM1001 module also contains a Nordic Semiconductor nRF52832 BLE microprocessor mostly used for network communication and an STM LIS2DH12TR 3-axis motion detector. The kit's default PANS software supports only the mode 14 which uses channel 5 (at 6.49 GHz), a data rate of 6.8 Mb/s, a PRF of 64 MHz, and a preamble length of 128 symbols, corresponding to a packet length of 287 µs. The default configuration is suitable for short-range communication. The devices have a 3 dB bandwidth of 499.2 MHz (equivalent to a 10 dB bandwidth of ≈662 MHz). In all the ranging measurements, one of the devices is configured as a tag in the low-power mode, while the other device is an initiating anchor.
In our previous work [1], we used Decawave devices integrated in the EVK1000 evaluation kit which allowed more configurations and used the DS-TWR. There, we decided to use the long-range mode (Mode 3), in order to attain a similar range as with 3db devices. Here, we favored the MDEK kit because it implements the SS-TWR which requires less message exchanges and is more energy efficient. The SS-TWR is also implemented by 3db devices, making the operation of the two devices similar.

IV. MEASUREMENT-BASED EVALUATION
In this section, we compare how 3db and Decawave devices compare in terms of power and energy consumption, coverage, distance measurement accuracy and precision, and localization performance. Distance measurements are important in themselves, for instance in proximity detection applications, but also because they are at the basis of true-range multilateration.
Section IV-A compares the power consumption of the two devices, Section IV-B their maximum range, and Section IV-C the accuracy and precision of their distance measurements. Section IV-D analyzes measurements acquired on multiple channels. In Section IV-E, we integrate the devices in localization systems and evaluate their performance.

A. Power Consumption
In this section, we compare the power and energy consumption of the two types of devices. Unfortunately, the Decawave MDEK1001 board allows for measuring the current consumption only of the DWM1001 module, which contains, besides the DW1000 UWB chip, a BLE microprocessor, and a motion detector. We present the power consumption measurements of the DWM1001 module for the sake of completeness, but for the comparison between the two chipsets, we rely on the current consumption of the Decawave DW1000 UWB chip from the device datasheet [29]. We used the current consumption reported for mode 14 which is referenced to 3.3 V [29].
We measured the current consumption of the 3db chip and the DWM1001 module with a Keysight DC Power Analyzer. We isolated the most important modes, namely the idle, transmit (TX), and receive (RX) and computed their average current consumption. The input voltages of the 3db chip and the DWM1001 module were 1.25 V and 3.3 V, respectively. Table I presents the average power consumption in each mode of the 3db IC, the DW1000 IC, and the DWM1001 module. As mentioned, for the comparison between the UWB chipsets, we rely on the current consumption of the Decawave IC provided in the datasheet [29] and on the measured current consumption of the 3db IC. Overall, the average power consumption of the 3db IC in the TX, RX, and idle mode is at least 9 times lower than the one of the Decawave IC. Only in the deep sleep mode the 3db chipset has 1.9× higher power consumption than the Decawave chipset. Note that the average power consumption of the DW1000 chip in the idle mode is about 1.45 times higher than the one of 3db devices in the receive mode, also the most power-hungry state. The results suggest that, indeed, the LRP interface can be more powerefficient than the HRP one.
The power consumption profile is a starting point for evaluating the energy consumption of an UWB-based localization system. A key challenge in a localization system is minimizing the energy consumption of the tag, which is usually batterypowered. To avoid synchronizing the tag and the anchors, the tag can initiate the message exchange and stay in the idle or sleep mode between rangings. Using the SS-TWR implies, in this case, that the tag estimates the distance (or the location).
To illustrate the energy efficiency of a tag in a localization system, let us consider the most favorable scenario in which the tag is the initiator. We disregard the time spent in the idle mode, since it is subject to the desired location update rate and guard times, which can be chosen freely to a certain extent. We therefore compute the energy consumption only when the device is in the TX or RX mode. The packet duration of the DW1000 chip in Mode 14 is 287 µs and the one of the 3db chip is 400 µs. Therefore, a Decawave tag will consume 180 µJ per SS-TWR during transmission and reception, while a 3db tag will consume 28 µJ (including the transition times), so 6.4 times less energy. When placed in the long-range mode (for instance, mode 3), the packet duration of Decawave devices increases to 3487 µs which is about 10× larger than that of 3db devices, causing them to consume at least 100× more energy [1]. The difference between these modes is the maximum range at which the devices can communicate, so in the next section we will compare the range of 3db and Decawave devices.

B. Range
In this section, we want to find the ratio of successful distance measurements between a transmitter (TX) and a receiver (RX) placed at distances between 5-220 m. Remember that one distance measurement using the SS-TWR involves the successful transmission of two messages, a poll (from TX to RX) and a response (from RX to TX). The devices are said to have a (maximum) range of d meters when the ratio between the number of successful distance measurements and the total number of initiated measurements up to the distance d is higher than a chosen ratio P = 0.9. We performed measurements outdoors, on the pathwalk shown in Fig. 2, in order to minimize the multipath interference from surrounding objects which is usually higher indoors. At discrete steps, the TX was programmed to send 60 messages (polls) every 200 ms. If the response from the RX does not arrive at the TX either because the RX did not receive the probe or because the response was lost, a timeout occurs and the distance measurement is unsuccessful. We define the packet delivery ratio (PDR) as the number of responses received by the TX over the number of transmitted messages.
The Decawave PANS software reports only the (successful) responses and produces no output when transmitted packets are not answered. To compute the PDR of Decawave devices, we use the transmission period of 200 ms to compute how many messages should have been exchanged between the first and the last successful message at every test point. The PDR is then the number of received messages during that period divided by the number of expected messages. 3db devices report when packets are unanswered and we compute the PDR of 3db devices as described before. Fig. 3 shows the PDR for 3db and Decawave devices. It is important to note that the PDR is highly dependent on the orientation of the devices, since at long distances the irregular radiation pattern of the antennas can cause high packet losses along certain directions. The PDR of Decawave devices dropped to 0 after 25 m, which is more than half of the expected range of 80 m of Mode 14 reported in the DW1000 Datasheet [29] (Section 6.3). However, this range was provided for channel 2 at 4 GHz, so the path loss is expected to be higher (and hence the range lower) at the center frequency of 6.5 GHz used in our experiment. 3db devices have a PDR higher than 0.9 at almost all distances up to 194 m, except for the higher losses between 65-90 m. At those distances, we found that the PDR was highly influenced by the relative pose between the devices, most likely due to destructive multipath interference and the antenna radiation pattern.
In our previous work [1], we found that 3db devices had a PDR of 0.9 up to 116 m, but we did not measure the PDR at longer distances because of the limited space. Similarly, in this experiment, we did not measure the PDR beyond 220 m. In [1], we compared the maximum range of 3db devices with the one of Decawave devices operating in the long-range mode (Mode 3) and we found that they had a similar PDR over the covered area. Decawave devices in the long-range mode have a packet duration about 10× larger than in the short-range mode and therefore also a higher energy consumption. In practice, this means that a 3db tag could operate over a similar area as a Decawave tag in the long-range mode but with 125× less energy. A Decawave tag in the short-range mode will be more energy-efficient than in the long-range mode but more anchors will be needed to provide coverage over the same area.

C. Distance Measurements
In this section, we compare the distance measurements of 3db and Decawave devices acquired in identical settings. We considered four indoor settings: LOS inside a large office and NLOS caused by either a gypsum wall (12.5 cm thickness), a concrete wall (29 cm thickness), or a human body. Fig. 4 shows the settings. Decawave and 3db Access devices were placed at exactly the same locations and acquired an equal number of measurements on the 6.5 GHz channel at the same rate (every 0.6 s). In all ranging experiments from this section, the devices were calibrated to account for errors caused by hardware, channel, or distance. The calibration method is described in Appendix A.
For the ranging datasets, at each test point, we recorded measurements for 2-4 min, which during the calibration phase was deemed enough to obtain a distribution with a mean  error within ±1 cm of the long-term one. The setup for each recording scenario is described in TABLE II. The 3db devices were configured to acquire measurements on all three channels at 6.5, 7, and 7.5 GHz, cycling through them every 0.2 s. Measurements on all channels will be later used in Section IV-D to investigate whether channel diversity improves the accuracy in certain situations. Because the MDEK1001 devices can use only the 6.5 GHz channel, we compare Decawave and 3db measurements acquired only on this channel. TABLE III presents the mean, standard deviation, and inter-quartile range (IQR) of the distance errors of 3db and Decawave devices, computed as: whered is the measured and d is the true distance. Fig. 5a to 5d compare the PDF of the aggregated ranging errors at all distances for a particular LOS/NLOS scenario and Fig. 5e to 5h compare the error distributions of Decawave and 3db at each test point. The boxplots use Tukey's definition. First, we notice that, at individual test points (Fig. 5e to 5h), the errors of Decawave devices have a smaller spread than those of 3db devices. After the calibration procedure detailed in Appendix A, 3db devices had distance errors of −0.05±6.54 cm, while Decawave devices had errors of 0±3.14 cm. Therefore, on the calibration data set, 3db devices had a bias 5 mm higher and a standard deviation about 2× larger than Decawave devices. In the LOS scenario, the location and test points were different from the ones in the  calibration data set. Hence, we expect errors to be slightly higher than in the calibration setup. Over all test points, 3db Access devices had errors of 2±7 cm and Decawave devices achieved errors of 0±5 cm in the LOS scenario. The standard deviation of Decawave devices in the LOS scenario is higher than in the calibration data set because, at individual test points, the absolute average error is also higher. Drywall is frequently used in modern buildings to delimit interior spaces. Surprisingly, it does not seem to cause a positive bias but a small negative one in both 3db and Decawave measurements, as can be seen in Fig. 5b. The errors caused by this type of obstruction are within several centimeters of LOS errors. This type of NLOS scenario is sometimes referred to in the literature as "soft" NLOS [30], since the LOS multipath component is still present in the CIR and the correct distance can be recovered. The fact that drywall does not introduce large errors is good news for proximitydetection and localization applications, because it means that ranging and localization errors will be small even if the devices are in different rooms, if they are separated by drywall.
Thicker obstacles such as a wall or the human body can affect the signal in multiple ways. First, through this type of obstacles, the signals usually travel at a lower speed than through the air, which causes a delay in the round-trip time and hence an error in the distance measurement. Second, these obstacles can attenuate the direct path component or block it altogether, case in which copies of the signal reflected on surrounding objects can cause errors in the TOA estimation algorithm. These scenarios are also known as "hard" NLOS [30].
The aggregated distribution of ranging errors in hard NLOS scenarios (Figures 5c and 5d) is often heavy-tailed and no longer Gaussian-shaped. However, in most cases, the error distribution at each test point (i.e., at individual distances) is still approximately Gaussian, as shown in each boxplot from Fig. 5g and 5h. The biases depend on the particular environment and the multipath components that arrive at the receiver. Hence, at different distances, the bias can vary depending on how multipath components add up, which is why the aggregated NLOS distributions can be multi-modal.
With concrete wall and human body shadowing, the ranging errors are between 44-60 cm. In both hard NLOS scenarios, Decawave devices had a standard deviation 6-7 cm lower than 3db devices. Only with human body shadowing the IQR of Decawave errors is 17 cm higher than that of 3db because its error distribution, although shorter, has a fatter tail.
In conclusion, in all scenarios, both devices had mean errors within 2-5 cm of each other, with Decawave devices performing better in all scenarios except for the NLOS with human body shadowing one. In LOS and soft NLOS scenarios, the devices differed in the standard deviation and IQR by 1-2 cm, with Decawave devices obtaining a better performance in most cases. In the hard NLOS scenarios, Decawave devices had a lower spread than 3db devices by 1.23-2×, except for the IQR in the case with NLOS with human body, which was 1.59× higher than the one of 3db devices. At individual test points, Decawave devices had 2× lower spread than 3db devices. Compared to our previous work [1], the performance of 3db devices has improved thanks to the refined calibration and to the correction of the firmware issues that previously caused large outliers in certain NLOS situations. NLOS with wall 6.5 GHz 7 GHz 7.5 GHz True distance Fig. 6. Impact of channel diversity on distance accuracy when the signal passes through a concrete wall: at different distances, some channels perform better than the others.

D. Channel Diversity
The analysis so far was based only on distance measurements acquired on the 6.5 GHz channel, since this was the only one available on the MDEK1001 devices. However, UWB devices can operate in more bands. The WiMedia Alliance defined 14 bands with 500 MHz bandwidth in the range of 3.1-10.6 GHz for UWB communications 4 . The use of the lower band between 3.5-4.5 GHz is often allowed only with interference mitigation techniques, while the 6-8.5 GHz band is less subject to regulations [31] and available in most countries. Since 3db Access devices can operate in the bands centered at 6.5, 7, and 7.5 GHz, it is useful to compare the performance on these channels and investigate whether distance measurements could benefit from channel diversity.
We programmed the 3db Access devices to acquire measurements on the 6.5, 7, and 7.5 GHz channels consecutively. The sampling period between measurements on successive channels is T /3, where T is the sampling period from TABLE II.
We noticed that, while LOS errors have the same characteristics irrespective of the channel (we calibrated the devices to operate this way), in hard NLOS situations some channels can experience better conditions at different locations. Fig. 6 presents such an example for NLOS with concrete wall shadowing: at 2 m distance, the 7 GHz channel has lower errors than the others, while at 3 m distance the 7 and 7.5 GHz channels had the highest accuracy. This can happen due to multipath interference, when copies of the signal traveling through multiple paths add up constructively or destructively at the receiver. The interference pattern depends on the frequency of the signal. Signals sent on different frequencies can have different propagation characteristics through obstacles. Since hard NLOS situations almost always cause positive biases, as we saw in the previous section, this prompts us to investigate whether taking the minimum or the mean of consecutive measurements (also called the min-and mean-select methods, respectively) acquired on different channels can improve the ranging accuracy. Fig. 7 shows the cumulative distribution function (CDF) of measurement errors in the individual bands, as well as of errors when we select either the mean or minimum of three consecutive measurements acquired on all channels. In 4 We will alternatively refer to the bands as (communication) channels. a regular LOS scenario, all channels perform similarly. The mean-select method leaves the bias still centered around 0 and decreases the standard deviation with approximately 2 cm. Instead, selecting the minimum measurement in LOS shifts the error distribution towards a negative mean, which decreases the accuracy. The same happens in the NLOS with drywall case.
In hard NLOS ( Fig. 7c and 7d), however, the min-select method achieves a median error of approximately 18 cm with wall and 5 cm with human obstructions. Therefore, this simple channel diversity technique reduces the bias of hard NLOS measurements by more than 2× compared to using only the 6.5 GHz channel. The mean-select method also reduces the error compared to individual channels in "bad" conditions but to a lesser degree than the min-select.
It is not always desirable to use channel diversity. First, acquiring measurements on all channels increases the number of messages and thus the energy consumption. Second, the min-select method increased the accuracy by 2× in hard NLOS but decreased it in LOS. One method to take full advantage of channel diversity is to apply a NLOS detection technique [32] and acquire measurements on all channels only when the devices are in NLOS. In this way, additional measurements are triggered only when a higher ranging or localization accuracy is desired. Investigating the viability and efficiency of this method is left as future work.

E. Localization
Because UWB devices have become popular for indoor localization, in this section we compare the localization performance of the Decawave and 3db Access devices experimentally. We placed four anchors over an area of approximately 4.5×3.6 m shown in Fig. 8 and at heights between 1.2-1.8 m (the anchors need to be at arm's length to acquire their ground truth location). We moved the tag by hand, at a height of approximately 40 cm above the table, along predefined points marked on the table. Since the tag was moved by hand, the paths in the two recordings were not identical, but very similar nevertheless, as can be seen from Fig. 9. This discrepancy should not significantly impact the comparison. During the first half of the trajectory, we oriented the tag towards anchors A1 and A4, while in the second half we oriented it towards anchors A2 and A3. We changed the orientation in order to vary the relative pose between the tag and the anchors, which can influence the ranging error [15]. The tags initiated the SS-TWR to each anchor. The 3db tag performed distance measurements to anchors A1 to A4 in their index order. The order in which the Decawave tag interrogated anchors changed throughout the recording according to the proprietary localization algorithm of Decawave.
Ground truth locations were acquired by an HTC Vive motion capture system using the setup described in [33], which has an average accuracy of at least 5 mm. The HTC Vive returns the location of a tracker which is colocated with the UWB tag. Then, a set of transformations is applied to recover the ground truth location of the tag. The anchor locations are also acquired using the HTC Vive system.
We recorded measurements in two scenarios: one in which all anchors were in LOS with the tag and one in which the direct path to one of the anchors (A4) was blocked by a person, so the tag was at all times in NLOS with one anchor. Given the results from Section IV-C, we expect a higher bias in the measurements coming from anchor A4 but not necessarily the same bias from TABLE III, since the bias depends also on the particular room setup and environment. The NLOS distance error will introduce a localization error, which can be partially compensated by the correct distances received from the other anchors. Even in LOS, distance measurements can be affected by orientation errors caused by the irregular antenna radiation pattern [15].
During each recording, for each type of localization system (based on Decawave or 3db Access), we recorded the distances between each anchor and the tag, which were then given as input to a multilateration algorithm. As mentioned in Section II-C, for both localization systems, we used the Gauss-Newton multilateration algorithm strengthened with a regularization term. We initialized the algorithm with δ =1 mm, k max = 10 iterations, x r = the median of the anchors' locations, and c = 10 −1 (corresponding to a standard deviation of 10 m around x r , suitable for our setup). Although the Decawave MDEK1001 kit has its own localization algorithm, we did not use it for the comparison since the algorithm is closed-source and therefore we could not apply it on the anchor-tag distances given by 3db Access devices.
TABLE IV presents the mean and standard deviation of distance errors between the tag and each anchor A i : The true distance d ij is computed as the Euclidean distance between the location of anchor A i and each ground truth location of the tag, whiled ij is the measured distance between each anchor and the tag. The average difference between the mean distance error of the two devices is 1.15 cm and the average difference between the standard deviation of the distance error is 2.82 cm, with Decawave devices having smaller errors in about 50 % of the cases. As previously mentioned, in the localization LOS scenario, the average bias is no longer null because of the changing orientation and the movement of the tag. All anchors have average errors under 10 cm when they are in LOS with the tag, with the exception of A3. Anchor A3 has higher distance errors than the others because of its close proximity to the concrete structure visible in Fig. 8. Although the structure does not completely obstruct the direct path between the tag and A3, it might cause the diffraction of the signal or other multipath effects, especially when the tag is close to the base station BS1 (the distance errors are higher in that area).
In NLOS, the effect of the human body shadowing is reflected in the distance error statistics of anchor A4. Similar to the ranging experiment, 3db Access devices have a mean ranging error lower by 5.9 cm than Decawave devices. However, unlike in the ranging experiment, here the standard deviation of the Decawave distance errors in NLOS (i.e., between the tag and anchor A4) was 2.5× higher than the one of 3db Access devices. It is worth noting, though, that even in the ranging  We compute the localization error as the Euclidean distance between the true location and the estimated one, either in 2D or 3D. For the 3D case, the error is: where (x, y, z) are the Cartesian coordinates of the true location and (x,ŷ,ẑ) are the Cartesian coordinates of the estimated location. For the 2D case, only the x and y coordinates corresponding to the plane parallel to the ground are taken into account. The localization algorithm always computes the location in 3D but we analyze the 2D and 3D errors separately because the selected multilateration algorithm is prone to large errors on the z axis (height). This happens especially when measurements are noisy since the geometric dilution of precision (GDOP) on the z axis is large. Therefore, it is important to distinguish errors in the 2D plan parallel to the ground, which usually need to be the smallest, from 3D errors. TABLE V presents the mean and standard deviation of the localization error of both devices in 2D and 3D. Fig. 10 shows the CDF of the localization error of the devices only in 2D. In LOS, the two devices have the mean and standard deviation of localization errors within at most 5.9 cm of each other, leading to a similar performance. In the NLOS scenario, the mean and standard deviation of the localization errors of the Decawave-based localization system are higher by 4-16.9 cm than 3db's because of the higher distance errors between the tag and the NLOS anchor (A4). In 3D, the average localization errors are significantly higher than in 2D, with about 30 cm in LOS and 60 cm in NLOS, due to the measurement noise and high GDOP on the z axis. In the 2D case, 90 % of the LOS errors are under 20 cm, while in NLOS 75 % of the localization errors are under the same threshold.

V. ERROR MODELING AND SIMULATION
The localization results in Section IV-E are useful for comparing the two types of devices and for providing an estimate of the expected localization error in a small setup. We are now interested in evaluating the expected performance of a localization system that would be deployed on a larger scale (e.g., on the entire floor of an office building, in a shopping center, in a home). In such a setup, we expect a larger distance between anchors and possibly a lower anchor density than in our small-scale experiment. Moreover, while most of the existing literature assumes all anchors to be in the same room and preferably in LOS with the tag for the best accuracy, we argue that in real deployments such a requirement would be too costly in terms of price, setup effort, and maintenance. In such cases, administrators might prefer a localization system with lower accuracy but also lower setup costs.
In this section, we model the ranging errors obtained with 3db devices in the same LOS and NLOS scenarios as in Section IV-C, but with augmented data sets. We argue that the proposed statistical models can be used to simulate realistic localization scenarios that would otherwise take days or weeks to implement and evaluate. Section V-A describes the proposed models and explains why a customized approach is needed to model errors obtained with different types of obstructions. In Section V-B, we evaluate the localization error of a simulated localization system based on 3db Access devices, where the anchors are in different rooms, which would be characteristic for a low-cost deployment. We also analyze the effect that different types of walls (made of concrete or gypsum) have on the localization error.

A. Error Modeling
In this section, we propose error models for distance measurements acquired in the same scenarios from Section IV-C: LOS, NLOS with drywall, NLOS with a concrete wall, and NLOS with human body shadowing. For more statistically significant results, we augmented the former data sets with more measurements in at least two locations, so that the results are not biased by the multipath profile of a single room. TA-BLE VI lists the number of measurements from each scenario, the range of distances covered, and at how many locations we acquired measurements. The NLOS with concrete wall dataset includes measurements performed through walls with thickness between 25.5-67.5 cm. For the LOS and NLOS with human body scenarios, we also included the measurements of anchors in LOS and NLOS, respectively, with the tag.
To model errors, we fitted some of the most well-known continuous distributions (the complete list is available at [34]) and computed the sum of squared errors (SSE) between the empirical PDF (ỹ i ) and each fitted PDF at discrete points i: The best parametersθ for a specific probability distribution p(x) are found by maximizing a likelihood function: over the entire parameter space. In other words, maximum likelihood estimation (MLE) selects the parameters under which the observed data is the most probable. The returned parameters are not guaranteed to be globally optimal. Where necessary, we provided good initial guesses for the optimization to improve the fit. We present the distributions that minimized the SSE and their parameters obtained through MLE. If there were more distributions that achieved similar SSEs, we chose the most well-known and studied distributions. TABLE VII shows the distributions that best fit experimental data obtained in the four scenarios, their PDF, as well as the parameters of the best fit.
As illustrated in Fig. 11a, LOS errors can be modeled with a Gaussian distribution with a mean of 0.4 cm and a standard deviation of 7.1 cm, whose PDF is given in Eq. (VII) from TABLE VII. The calibration process presented in Appendix A removed biases caused by different channels, hardware, and distances such that in regular LOS conditions distance measurement errors are approximately centered around 0 m.
Errors obtained in NLOS with a gypsum wall between the devices can also be modeled by a Gaussian distribution, as shown in Fig. 11b. Although errors obtained by 3db Access devices on the 6.5 GHz channel through this obstacle had a left-sided tail (see Fig. 5a), when aggregating data from all channels and from an additional experiment, the errors converge to a Gaussian with a bias of −4.3 cm and a slightly larger standard deviation than in LOS, of 9.2 cm. It is not clear why the gypsum wall causes negative biases. Its relative permittivity was found to be between 2.7-3.1 [35], higher than the relative permittivity of air, so the signal should travel at a lower speed through the obstacle, causing a delay. Since this delay is not reflected in the measurements, additional investigation is needed to determine whether other environmental factors are responsible for this bias. The main take-away is that gypsum walls introduce errors comparable to LOS propagation.
The scenarios where two devices are in NLOS with a concrete wall or with human body shadowing can be categorized as "hard" NLOS scenarios and introduce larger errors with heavier tails, as can be seen from Fig. 11c and 11d, respectively. We obtained the best fits for the Burr distributions type XII, also known as the Singh-Maddala distribution (Eq. (VII)). The Burr type XII is part of the family of log-logistic distributions used to model data that increases in an initial phase and then decreases, such as wealth distribution, survival analysis, or mortality rate [36]. Its shape is similar to the more wellknown log-normal distribution but can better handle heavier tails [36], as it is currently the case with our hard NLOS data. For the sake of completeness, we presented both the Burr and log-normal fits for the NLOS with concrete wall and human body shadowing scenarios, but also because the log-normal distribution has fewer parameters and is easier to interpret. The log-normal distribution has also been previously used in literature to model NLOS scenarios [37]. The PDF of the lognormal function is given in Eq. (VII) with a parametrization in which s, µ, and σ are also known as the shape, location, and scale parameters, respectively. Given that Burr distributions are a better fit than the log-normal one for our experimental data, this suggests that such NLOS obstructions might introduce heavier tails than previously thought, especially in the case of human body shadowing where the Burr type III is a noticeably better fit than the log-normal (Fig. 11d).
The chosen distributions can be used to simulate different localization scenarios. Our analysis shows that different types of obstructions can introduce very different errors and that a one-size-fit-all error model for NLOS propagation would likely lead to unrealistic results. Therefore, when evaluating the expected localization accuracy of a particular setup, different error models should be taken into account depending, for instance, on the crowdedness of the room or its wall structure.

B. Building Deployment
In this section, we illustrate an example in which the proposed statistical models can be used to evaluate the expected localization accuracy. We consider the setup from Fig. 12, with  Fig. 11. The histograms of distance errors based on data from the ranging experiment in LOS, NLOS with drywall, NLOS with concrete wall, and NLOS with human body, and the distributions that best model them.

Scenario
Distribution PDF Shape µ σ Log-normal f (x|s, µ, σ) = 1 four anchors placed in the corners of a space of 9×20 m, which is the area of our office space together with a meeting room.
We consider a LOS scenario, in which there are no separating walls in the tracking area such that the anchors and the tag are at all times in LOS, and two NLOS scenarios when there is either a concrete or a drywall separating the area into two rooms of 9×13 m and 9×7 m (corresponding to the office and meeting room, respectively). The anchors are placed close to the ceiling: two (opposing) anchors at a height of 3 m and the  other two at 2.7 m. We consider all possible locations of the tag over the tracking area in steps of 0.25 m, similar to the points shown in Fig. 12. At each test point, we simulate the measured distance between the tag and each anchor by adding an error term to the true distance. The error term is sampled from the distributions from TABLE VII, based on the condition: LOS, NLOS with drywall, or NLOS with concrete wall. We run the simulation for each scenario five times and compute the error statistics over the errors obtained in all runs.
The CDFs of the 2D localization errors obtained in the three scenarios are presented in Fig. 13. As expected based on the ranging experiments and error modeling, drywall does not introduce significant errors. The localization error when the space is separated by drywall is almost the same as if the wall were not there. The concrete wall, on the other hand, introduces a median 2D localization error of about 25 cm. In some cases, this might be an acceptable localization error, given that half as many anchors are needed for the entire space than if four anchors (the minimum necessary for 3D localization) were deployed in each room.
In a building with many rooms or delimitations (for instance, an office building), placing sets of four anchors in each room can be detrimental even if it improves the localization accuracy. First, devices in adjacent rooms (or even further away from each other) can be in communication range of each other so the anchors and users need to use different channels for communication and/or synchronize their transmissions in order to not interfere with each other. These issues are similar to challenges in the placement of base stations in cellular networks [38]. Second, the tag would also need to select a subset of surrounding anchors with which to range based on the link quality between them (for instance, using the techniques described in [39]) and based on the geometry formed by the anchors, since the localization accuracy is the highest within the convex hull determined by the anchors [40]. In addition, a higher number of deployed anchors increases the deployment costs. If the walls in a building introduce only small errors, these issues can be largely avoided by allowing walls within the tracking area encompassed by the minimum number of anchors. To establish whether this is the right approach for a given space, more work is needed, such as evaluating how two or more walls of different types influence the ranging error and developing a flexible, realistic simulator that outputs the best anchor configuration for a building plan while taking into account the cost-accuracy trade-off.

VI. DISCUSSION
A. Related work 1) The Accuracy and Precision of UWB Ranging and Localization: The reported NLOS bias and standard deviation of Decawave devices was 34±35 cm in office environments with different types of obstacles [41], 15.6±7.4 cm with human body shadowing [7], around 56±20 cm when the path is blocked by concrete walls [9], and about 5±15 cm with shallow obstructions (such as plasterboard, wood, or steel) [9]. The results for walls and shallow obstructions agree with our own observations but we obtained much larger errors with human body shadowing with both Decawave and 3db devices. In [16], an UWB localization system using Decawave devices achieved a localization accuracy of 0.21 m in 2D and 0.24 m in 3D in an industrial environment.
In [11], the authors compared the ranging and localization performance of three UWB devices which implement either the HRP PHY (Decawave DW1000), the LRP PHY (Ubisense), or a proprietary PHY (BeSpoon). Decawave achieved the best average localization error of 0.5 m, followed by BeSpoon with 0.71 m, and Ubisense with 1.93 m. The article did not investigate the power and energy consumption of the devices. Ubisense devices have also been used in [12], where they achieved sub-15 cm average error in LOS and about 50 cm through a metallic enclosure. Another brand of LRP devices is PulsON (models P220 and the P400 series), but they implement a coherent interface. They have been used in [42] for detecting a human target through the wall, and integrated in localization systems in [17], [43] that yielded localization errors under 20 cm. PulsON and another brand of LRP devices from Multispectral Solutions Inc. (MSSI, now known as Zebra) were compared in [44]. PulsON and MSSI devices had average biases of 10 cm and 50 cm, respectively. The authors also noted the linear dependence on the errors with the distance and proposed a first-order linear model to correct them.
Custom non-coherent UWB transceivers were proposed in [18] in an FPGA implementation and in [45], [46] as integrated solutions, out of which only the former achieves errors lower than 20 cm. To the best of our knowledge, the solutions are not compliant with the IEEE 802.15.4 standard nor are they available commercially.
A method for using channel diversity to improve the ranging accuracy (but only in LOS) was proposed in [19]. The authors leverage the constructive interference phenomenon to reduce the number of measurements needed for a single distance measurement, which can also decrease the energy consumption when applying diversity methods.
In our work, we focused on a basic localization algorithm, namely the regularized Gauss-Newton trilateration, since we focused on comparing the localization performance of two different devices. More complex algorithms which leverage constraints common in localization problems can increase the accuracy even further. For instance, in [47], the authors proposed an optimization-based localization algorithm suitable for IoT devices and implemented it using Decawave UWB chipsets. The proposed method achieves 2-3× higher localization accuracy than standard trilateration methods.
2) The Energy Efficiency of UWB devices: To the best of our knowledge, we are the first to compare the power and energy consumption of devices implementing the LRP and HRP PHYs as defined in the IEEE 802.15.4 standard [4]. Energy efficiency is starting to be a concern in UWB devices and, recently, concurrent ranging has been proposed as a solution to minimize the energy consumption in localization tasks at the application level [48]. Using this method, a tag can compute its location based on the time difference of arrival between multiple anchors' responses which are processed in a single message (rather than 2 × N messages, where N is the number of anchors, as in SS-TWR-based trilateration). In [49], the authors analyzed the energy efficiency of UWB localization systems depending on the association and synchronization demands. In the new DW3000 UWB chipset, Decawave claims to have improved the power consumption, but it is not yet clear by how much [20]. There is also a newly-released, improved version of the 3db 3DB6830C chip, namely the ATA8352 chip [50].
One option to decrease the energy consumption when the tag does not initiate the ranging is to use an ultra-low-power wake-up receiver to keep the tag active only before a message exchange and in the idle or deep sleep mode otherwise [51].

3) NLOS Detection and Mitigation Techniques:
There is a large body of literature dedicated to NLOS detection and mitigation strategies [32]. Most works detect the NLOS condition using the statistical properties of the channel impulse response (CIR) of signals acquired in NLOS. These methods require knowledge of the CIR, which by default is not dumped by the device, and introduce additional processing times. Our open-source measurement database also includes the dumped CIRs of 3db Access devices, which could be used to evaluate the performance of these methods. It is noteworthy, however, that in our previous work [1], the multipath components in the CIRs of 3db Access devices were found to be wider than those of Decawave because of their lower pulse bandwidth. Therefore, algorithms based on CIR characteristics might not generalize well to all types of devices. Other works proposed NLOS detection and mitigation methods that do not require prior knowldege on LOS/NLOS statistics, for instance based on sparse pseudo-input Gaussian processes (SPGP) [52] or on fuzzy theory [53], which show promising results. Our measurement database contains also the CIRs of 3db devices, which can be used to test CIR-based NLOS detection and mitigation algorithms.
In [8], the authors proposed a method to detect and correct NLOS biases when the signal propagates through a wall based on the wall's relative permittivity and thickness, which reduces the NLOS error by 53 %. In the future, we will investigate whether this model fits the data from our experiments with both concrete and gypsum walls.

4) Comparison with other Localization Technologies:
The power consumption of GNSS modules ranges from 12-72 mW for super-low-power modules [54] to 160 mW in a typical smartphone [55]. The accuracy of GPS receivers is about 2.5 m for high-end receivers [56], 2-5 m in smartphones [57], and at least centimeter-level for real-time kinematic (RTK) GPS [58]. Therefore, UWB devices can provide significantly higher localization accuracy indoors than GNSS receivers without enhancements; in terms of power consumption, LRP devices are comparable to super-low-power GNSS receivers, while the average power consumption of HRP devices exceeds the one of GNSS receivers in smartphones. However, given that the reception times might vary between the two technologies, their energy consumption per location might also be different and needs to be assessed in the future.
Bluetooth Low-Energy (BLE) has been also used in localization applications in recent years. Its power and energy consumption is similar to the one of 3db devices [59] but its accuracy is at best 0.7-1 m with sensor fusion [60]. Wi-Fi also achieves decimeter-level accuracy [61] but has higher energy consumption [59] than both BLE and UWB.

B. Future Work
As phone manufacturers started including UWB chips in smartphones, one vision would be the instrumentation of entire buildings with anchors to provide seamless positioning indoors. As briefly mentioned throughout the paper, there are still unsolved challenges to reach this goal. First, if anchors are placed in the same room in order to avoid NLOS measurements, buildings with many rooms or cubicles will need many localization cells (formed by the minimum number of anchors for 2D or 3D localization). If the cells are in range of each other, transmissions within multiple cells need to be synchronized or allocated to different bands, which increases the administration efforts. Moreover, since localization accuracy degrades at the edge of a cell, a hand-over protocol needs to be implemented at the tag to decide which anchors to select for localization at a given time. Allowing walls within one cell does not necessarily decrease the localization accuracy if the walls are shallow (such as gypsum walls) and can reduce the deployment effort and costs. However, more work is needed to model the ranging errors and maximum range through an arbitrary number of walls. Towards this end, a simulator for building deployments of UWB localization systems that recommends the optimal number of anchors and their placement for the desired accuracy-cost trade-off would be needed.
In this work, we considered only range-based localization, where each distance measurement is obtained through at least two message exchanges between the tag and each anchor. This scheme does not scale well with many users and anchors because of the large number of messages involved and the need to schedule uplink transmissions. Moreover, this method is privacy-sensitive since anchors have access to at least part of the ranging information, which can be used to track the user with a certain precision. Instead, a GPS-like localization system based on the time-difference of arrival (TDOA) of signals, in which anchors act as satellites and passive tags use their broadcasts to locate themselves can, in theory, scale to an unlimited number of users and is more privacy-friendly. The drawback is that, in this case, anchors need to synchronize their transmissions. Wired synchronization introduces the lowest errors but is unlikely to be adopted because of the high deployment costs. Wireless synchronization, on the other hand, leads to localization errors in the range of decimeters even when anchors are in LOS with the tag [62] and requires anchors to be in LOS with each other. More work is needed, for instance, to determine whether a calibration protocol can allow wireless-synchronized TDOA systems where anchors are in different rooms to obtain a similar accuracy with the case in which anchors are in LOS with each other.

VII. CONCLUSION
This paper provided an outlook on the power and energy consumption, distance measurement statistics, and localization performance of 3db Access and Decawave devices, representative of the two types of UWB physical interfaces, LRP and HRP, respectively. Both devices have ranging and localization errors on the same order of magnitude. Decawave devices generally show better performance in LOS and through-thewall NLOS conditions, while 3db devices have slightly better performance in NLOS with human body shadowing. For a similar maximum range, Decawave devices have 125× higher energy consumption than 3db Access devices, while in the short-range mode (which decreases the range by at least 8×) they have 6.4× higher energy consumption than 3db Access. Therefore, devices implementing the LRP PHY might be more suitable for ultra-low power applications, while the HRP PHY might be a better choice for the highest ranging accuracy.
We evaluated the performance of 3db Access and Decawave devices in multiple LOS and NLOS (caused by a person, drywall, or concrete wall) scenarios and provided models for the error distribution of 3db Access distance measurements. These models can be further used to simulate realistic deployments of localization systems which would otherwise take days or even weeks to evaluate. We illustrated their applicability by simulating a localization scenario in which the anchors are placed in different rooms separated by drywall or a concrete wall. Results suggest that drywall causes negligible errors and anchors do not need to be in the same room to obtain high localization accuracy.
More research is needed to evaluate the impact of multiple walls on the ranging accuracy and to create suitable models of the maximum range and distance measurement errors with an arbitrary number of walls. Using such models, a simulator of UWB localization systems could then recommend the minimum number of anchors for the desired localization accuracy and their placement. More work is also needed to select the best anchors at a particular moment based on their link to the tag and to synchronize UWB transmissions between clusters of anchors within range of each other.

APPENDIX DISTANCE CALIBRATION
Before comparing the ranging accuracy and precision of Decawave and 3db devices, a calibration step is also necessary since, as we will show, the raw distance error can depend on the hardware, on the channel used, and even on the distance. We collected distance measurements between different device pairs placed 2, 5, and 10 m apart, for at least 30 min, which was deemed a long enough time period to capture the long-term distribution of distance measurements. In a different experiment, we acquired measurements during 24 h to obtain the long-term error distribution. The mean error obtained in windows longer than 2 min was within ±1 cm of the longterm mean error. We chose a longer window, of 30 min, to obtain more stable distributions.
We recorded measurements on all the available channels (6.5 GHz, 7 GHz, and 7.5 GHz) using 3db devices and only on the 6.5 GHz channel with Decawave, since it is the only available channel when using the default Decawave software for the MDEK1001 kit. Although the software compensates the antenna delay, in most cases distance measurements with Decawave devices still had a non-negative bias that was eliminated in the calibration process.
Our findings suggest that the measurement bias of UWB devices varies with the distance, the channel, and the pair of devices used. The dependency on the distance for the same channel can be seen in Fig. 14 for the 6.5 GHz channel.
The TOA estimation error increases with lower SNR [63], so without proper calibration distance measurement errors increase with the measured distance. Fig. 14 also shows how the ranging error varies between channels because they have different amplitude saturation points. Fortunately, the channel is known at the time of the measurement and these errors can be compensated.
The mean error also depends on the pair of devices used. This can occur due to the different clock offset or antenna delay of the hardware devices. Although these parameters can be estimated, the clock offset can still deviate in time or the antenna delay calibration might be imperfect. Fig. 15 compares the error distributions of distance measurements acquired by different 3db and Decawave device pairs on the 6.5 GHz channel. All pairs have a common transmitter (the tag used for localization in Section IV-E). For distances up to 10 m, the mean error can vary with 0.6 m for 3db devices and 0.2 m for Decawave devices, but note that this range includes also the linear dependence of the distance error on the SNR.
An arbitrary non-negative measurement bias is not desirable in ranging or localization. Therefore, such errors are often eliminated during a calibration step. The desired measurement model in LOS is a zero-mean Gaussian, whose standard deviation is at least partly determined by the hardware capabilities. It is worth noting that while the mean distance error varies with up to 0.6 m when we change the hardware, channel, or distance, the standard deviation of each error distribution is almost constant for each device (see Table VIII). Since the raw error distribution is already Gaussian, we need to correct only its bias.
We consider each set of measurements s ij for a given pair of devices p i , i = 1, ..., 4 and channel c j , where j = {0, 1, 2} corresponds, respectively, to channels at 6.5, 7, and 7.5 GHz. Each set s ij contains an equal number of approximately 3000 measurements (equivalent to a recording time of 30 min) taken at each distance d k ∈ {2, 5, 10} m. We assume a simple linear dependence of the measured distance on the true distance, which is found by minimizing the squared error: where N is the total number of measurements, y n is the measured distance at the true distance x n for all n = 1, ..., N and p 0 and p 1 are the polynomial coefficients. Once the polynomial coefficients for a set s ij are computed, the measurements of that set can be corrected as follows: where x c and x m are, respectively, the calibrated and the raw measurements.
There are several caveats to this approach. First, we do not derive error coefficients for each factor that introduces errors (channel, pair, and true distance). Rather, the accumulated error is corrected for a particular set.
Second, while it is feasible to obtain the calibration coefficients for a particular channel by performing measurements at different distances, the device-dependent calibration is harder to perform in a real application. Localization systems deployed inside buildings should be able to offer accurate locations even to unknown users, so one could not calibrate each anchortag pair. Even if all the users were known, for instance in Comparison of the distribution of distance measurement errors of the same pair of 3db Access devices, on the 6.5, 7, and 7.5 GHz channels, at distances of 2, 5, and 10 m between the two devices. On the 6.5 GHz channel, the mean error increases approximately linearly with the distance, while on the other two channels it is constant with the distance.  Fig. 15. Comparison of the distribution of distance measurement errors of four pairs of (a) 3db Access and (b) Decawave devices on the 6.5 GHz channel. The same transmitter (tag) was used in all pairs and only the receiver (anchor) was changed. The error varies with both the distance and the hardware. a privately-deployed localization system, the tag population can easily reach hundreds or thousands devices, which again makes pair-wise device calibration impractical. Hardwaredependent distance errors are an interesting research topic but outside the scope of this paper, which is why we calibrated each pair of Decawave and 3db Access devices used (including the tag and each anchor in the localization experiment from Section IV-E).
Third, it is worth noting that the distance errors of Decawave devices do not linearly increase with the measured distance, as in the case of 3db Access. Instead, the dependency seems non-linear. Due to the lack of a more appropriate straightforward model, we still apply a linear fitting with the mention that there might be better models for this distribution. Even so, the calibration reduces the measurement bias with 8 cm, as shown in TABLE VIII, which presents the mean and the standard deviation of all errors before and after calibration.
The calibration does not significantly reduce the overall average error of 3db Access devices because the sets with a positive bias balance out those with a negative bias (predominantly on channels 1 and 2 which, for brevity, are not shown), but there is a benefit in the bias reduction of the individual sets. Moreover, the calibration reduces the standard deviation of measurement errors by more than half.