Utilization of Carrier-Frequency Offset Measurements in UWB TDoA Positioning with Receiving Tag

High-capacity impulse-radio ultra-wideband (IR-UWB) indoor localization systems are typically based on the time difference of arrival (TDoA) principle. When the fixed and synchronized localization infrastructure, the anchors, transmit precisely timestamped messages, a virtually unlimited number of user receivers (tags) are able to estimate their position based on differences in the time of arrival of those messages. However, the drift of the tag clock causes systematic errors at a sufficiently high magnitude to effectively deny the positioning, if left uncorrected. Previously, the extended Kalman filter (EKF) has been used to track and compensate for the clock drift. In this article, the utilization of a carrier frequency offset (CFO) measurement for suppressing the clock-drift related error in anchor-to-tag positioning is presented and compared to the filtered solution. The CFO is readily available in the coherent UWB transceivers, such as Decawave DW1000. It is inherently related to the clock drift, since both carrier and timestamping frequencies are derived from the identical reference oscillator. The experimental evaluation shows that the CFO-aided solution performs worse than the EKF-based solution in terms of accuracy. Nonetheless, with CFO-aiding it is possible to obtain a solution based on measurements from a single epoch, which is favorable especially for power-constrained applications.


Introduction
UWB impulse radio technology (IR-UWB) compliant with the IEEE 802.15.4 standards is capable of providing accurate localization in short-range scenarios. Such systems are suitable for indoor locations or other areas where other localization systems such as GNSS (Global Navigation Satellite Systems) are unreliable or unavailable [1,2]. Generally, the user devices (tags) are localized using measurements between them and fixed infrastructure devices with known positions (anchors). The approaches to UWB real-time localization may be based on one of two measurement methods: two-way ranging (TWR) or time difference of arrival (TDoA) [3].
The former, TWR-based localization, exploits range measurements from tag to several anchors, and estimates the tag position using multilateration. The TWR, however, requires bi-directional communication between the devices, and thus is relatively slow. Typically, double-sided TWR (DS-TWR) with three-message exchange is used [4] in order to mitigate the clock drift effect. Alternatively, single-sided TWR (SS-TWR) may be used provided that the drift-related error is mitigated by other means [5]. Obtaining a set of TWR measurements between tag and several anchors is rather time-consuming. Even though some reduction in the necessary time is achievable with optimization of the message scheduling [6] and relaxation of the constraints on reply delay symmetry by AltDS-TWR [7], no more than lower tens of position fixes per second are achievable [8].
The TDoA localization utilizes uni-directional communication between anchors and tag and thus is able to provide more frequent position fixes (up to several thousands fixes clock drift between the tag and the synchronized anchors by means of Kalman filtering. The knowledge of the drift is used to compensate for the time interval error between the tag and anchor. Moreover, the method [25] allows simultaneous operation of the T2A and A2T modes. Nonetheless, at least two measurement epochs are necessary to estimate the clock drift, which is undesirable for devices with limited energy available. However, coherent UWB transceivers, such as DW1000 [26], are able to estimate carrier frequency offset (CFO). Since the carrier frequency is derived from the same 38.4 MHz base frequency reference as the 63.8976 GHz sampling and timestamping clock, the relative clock drift between receiver and transmitter is available as properly scaled CFO. The CFO has already been successfully used for compensation of drift-related errors in TWR-based positioning, and in T2A asynchronous-TDOA [5]. According to the authors' knowledge, the CFO has not been previously used in A2T TDoA positioning. The research presented in this article proves that A2T TDoA positioning can be performed based on a single set of messages from the synchronized anchors when using CFO estimates.
Firstly, we will briefly recapitulate the anchor synchronization algorithm. Secondly, two ways of obtaining the CFO will be presented and briefly compared. In the following section, the CFO-aided A2T TDOA algorithm will be described. Section 5 is devoted to the experimental evaluation of the presented method with respect to ground truth and the performance comparison with the Kalman-filter-based A2T TDoA method from [25]. The article concludes with a discussion of the results and summary.

Wireless Anchor Network Synchronization
Each of the UWB transceivers (either tag or anchor) has its own free-running reference clock. Rather than steering the clock physically, it is more feasible to track and predict the clock bias ∆t[k], drift ∆ṫ[k] and drift rate ∆ẗ[k] with respect to the chosen master anchor clock [11]. A linear Kalman filter is utilized; the state vector x[k], where k is the index of epoch, is defined as The discrete process model of the synchronization Kalman filter is described by matrix F.The time-update of the state vector x and its covariance matrix P can be written as: (2) Symbol T[k − 1] is the time passed between epochs k and k − 1; Q denotes the process noise matrix, whose diagonal elements should be tuned to match the performance of the particular clocks. It should be noted that the + and − superscripts indicate a posteriori and a priori values in the Kalman filter.
The bias (time offset) between master and slave clock ∆t [MS] [k] is observed by means of differentiating the transmission and reception timestamps and correcting for the masterto-slave propagation delay and equipment delays in the transmitter and the receiver. The bias is used as the measurement of the Kalman filter in the particular epoch y[k]. Therefore, Tx denotes transmission equipment and antenna delay in master transceiver and τ [S] Rx denotes reception equipment and antenna delay in slave transceiver. Symbol r MS stands for the geometric distance of the master and slave antenna phase centers and c 0 is the propagation velocity, i.e., speed of light. Note that line of sight (LOS) between master and slave anchor is presumed.
The covariance matrix R of the measurement is indeed a scalar value. According to [10] the timestamp noise is Gaussian with 150 ps standard deviation. Two timestamps are combined in the bias measurement; from our practical experience it is reasonable to assume R = (250 ps) 2 .
Since the clock bias is also the first element of the state vector, the measurement model matrix is trivial, indeed; H = 1 0 0 . The filter measurement update follows equations where z denotes innovation, S is innovation covariance matrix, K is the Kalman gain and I is the identity matrix of appropriate size. It is worth noting that R, and S are scalars, and thus the matrix inverse in (9) becomes a scalar division. For the positioning purpose it is necessary to convert the local slave time to the master time. Prediction based on the Kalman filter state vector is performed in order to obtain the bias ∆t [MS] (t b ) between master and slave time at any instant shortly after the last measurement update; it is also possible to obtain the variance: var Symbol t b denotes the time of prediction (expressed in local, slave time). The prediction matrix F b is based on the first line of the process model matrix where t[k] is the nearest (latest) synchronization epoch. The timestamp in the master time and its variance is available as var t It is obvious that the accuracy of such correction is deteriorating with (t b − t[k]) term, i.e., the time passed since the last synchronization message reception. Naturally, the variance reflects the deterioration.
The repetition interval between synchronization messages (i.e., measurement updates) is a trade-off between accuracy and airtime utilization. In [11], it is shown that error bellow 500 ps (corresponds to 15 cm in range) is achievable in 95% of epochs, when 400 ms message interval is used. It is worth noting that under assumption of normal distribution the standard deviation is approximately half of the value, i.e., 250 ps. Thorough description and experimental evaluation of this algorithm and the way of chaining multiple synchronization segments is available in [11,12].

Carrier Frequency Offset Measurement
Both the timestamping clock and the carrier frequency are derived from a single reference. Consequently, the timestamping clock drift is equal to the relative carrier frequency offset (CFO). Two ways of obtaining absolute value of the CFO from DW1000 chips are presented in [26], however, the relative CFO is of interest. Therefore, the equations provided here are slightly modified.

Receiver Time Tracking Offset
The first option of obtaining CFO is utilizing the Receiver Time Tracking Offset (RTTO) values, reported by the receiver for each message received, and Receiver Time Tracking Interval (RTTI). The relative offset ν RTTO is obtained as [26] Note that the dimensionless carrier offset fraction given from (17) can be scaled by 10 6 to obtain the value in ppm (parts per million). The RTTI is dependent on the pulserepetition frequency (PRF) used; for 64 MHz PRF it holds RTTI = 0x1FC0000 [26]. Therefore, the resolution of the RTTO-based CFO estimate is 0.03 ppm. The RTTO-based CFO is not accurate, however, the value is included in the double-buffer swinging set of the receiver, and thus it is not necessary to pause receiving of the messages.

Carrier Integrator
The second option of estimating CFO is based on carrier integrator value, which is also reported for each message [26]. Unlike RTTO, the carrier integrator value C int is not featured within double-buffer swinging set, hence the receiver has to be stopped until C int value is read. On the other hand, the carrier-integrator-based CFO estimate ν CINT is substantially more accurate than the RTTO-based value. The relative drift estimate is computed as [26] where number of samples is either N s = 1024 for 850 kbit s −1 bitrate and 6.8 Mbit s −1 , or N s = 8192 for 110 kbit s −1 . In our case the carrier frequency is f c = 3.9936 GHz, the sampling frequency is f s = 998.4 MHz. Since the 6.8 Mbit s −1 bitrate is used in our devices, the resolution of such measurement is 0.93 ppb.

CFO Measurement Accuracy
Thorough evaluation of the stochastic parameters of the CFO estimates is beyond the scope of this article, however, we provide a brief analysis based on a 57 min long concurrent measurement of ν RTTO and ν CINT . The measurement was performed between two stationary transceivers, messages were transmitted with 100 ms period. The drift estimate from the Kalman-filter-based synchronization algorithm (described in previous section) was used as the reference. During the measurement, the devices were warming up from approximately 15 • C to 46 • C on-chip temperature; consequently, the clock drift was changing during the first 35 min of the test, then it became almost constant.
The raw relative CFO estimates based on RTTO and carrier integrator are provided in Figure 1. Obviously, the RTTO-based CFO (ν RTTO ) is significantly noisier than the C int -based CFO (ν CINT ); the accuracy of both CFO estimates is clearly not limited by the resolution. The clock drift estimated by the Kalman filter (∆ṫ[k], see (1)) is smooth in comparison with the CFO estimates. On the right axis of Figure 1 is the on-chip temperature of the device; moving average with 101-sample symmetric window has been applied in order to improve readability. The dependency of clock drift and temperature is apparent.  For both metrics 101-sample symmetric window has been applied in order to avoid lag. In other words, the averaged value is based on interval spanning 5 s before and 5 s after the current measurement. Both CFO moving averages are almost always visibly lower than the drift estimated by the EKF, which suggests that the estimates are slightly biased. We acknowledge that CFO-estimate bias has been observed also on longer measurements under constant-temperature conditions.
The moving standard deviations in Figure 2 are compared to the standard deviation of the Kalman filter drift estimate, which is deduced from the KF-state a posteriori covariance matrix (P + [k]). The KF-based estimate STD is below 1.5 ppb once it converges within a few measurements. The moving STD of RTTO-based CFO estimate is between 0.4 ppm and 0.8 ppm, the C int -based CFO is approximately 4-times more accurate; its moving STD is mostly between 0.1 ppm and 0.2 ppm.
It is also worth mentioning that results in [5] suggest approximately 8-times better accuracy of CFO than experienced for C int -based CFO during our tests. As no quantification of accuracy and limited information about configuration is provided in [5], it is assumed that 110 kbit s −1 bitrate was used, and therefore the 8-times higher N s value in the denominator of (18) is the reason for such difference in accuracy.
Since the CFO estimates are approximately two orders of magnitude less accurate than the Kalman filter drift estimate, there is no advantage in utilizing the CFO measurement as an additional measurement input to the synchronization filter regardless the source of the CFO.

CFO of Synchronized Anchors
The local (physical) clock of a transceiver is synchronous with the master time only for the master anchor. In all other transceivers (synchronization slaves or relays) the timestamps from free-running local clock are corrected to the master time as described in Section 2. The relative CFO (ν) is measured between the local clocks of the transmitter and receiver, thus, in order to obtain the drift estimate (i.e., relative CFO) with respect to the master clock, it is also necessary to correct for the drift of the transmitter with respect to the master clock.
The normalized frequency of the slave local clock can be described as (1 + ∆ṫ [MS] ), where ∆ṫ [MS] is the clock drift between master and slave anchor (the accurate estimate from the KF). The tag is able to obtain the relative CFO between local clock of the slave anchor and its own local clock, which is denoted by ν [ST] . For the normalized frequency of the tag local clock with respect to the master clock (1 + ν Such approximation is valid when both ν [ST] 1 and ∆ṫ [MS] 1. Due to requirements on clock accuracy in [23] magnitude of both terms should be below 4 × 10 −5 ; therefore, the ν [ST] × ∆ṫ [MS] term omitted in the approximation should not be higher than 1.6 × 10 −9 , i.e., negligible in comparison with the CFO estimate accuracy. As a consequence, the clock drift (and CFO) estimates may be treated as additive. By a trivial modification of (19) it is possible to obtain a simple formula for CFO estimate between tag and master anchor:

CFO-Aided TDoA Localization
The A2T TDoA positioning, as described in [25], estimates the position of a tag from the received messages sent by the surrounding anchors. It is worth mentioning that the structure and content of the positioning messages is identical to the anchor synchronization messages. As a consequence, the tag is able to parasite on the anchor synchronization messages; it is sufficient that each anchor transmits a single message per epoch.
The UWB devices are able to receive only a single message at the time. Consequently, it is necessary to avoid message collisions when performing TDoA positioning with multiple transmitting anchors and receiving tags. Within a single frequency channel it is possible to separate the messages by transmitting them in non-overlapping time slots. The measured time difference of arrival (TDoA), i.e., the difference of the reception timestamps has to be corrected for the different transmission times.
Therefore, all the messages contain their time of transmission (t Tx,i ) expressed in the master time, and its variance. The drift of the anchors local clock with respect to the master time (∆ṫ i ) is included in the message as well, along with the respective variance. With ideal, non-drifting clocks, the correction of the measured TDoA would be trivial; the difference d ideal i,j of distances between tag and anchors indexed by i and j would be where t Rx and t Tx are the reception and transmission timestamps, respectively. The second subscript indicates the anchor of message origin. Due to an inherent drift between master time and tag time, the transmission and reception time differences are measured using clocks operating at a different pace. The problem is illustrated by an example in Figure 3, the faster pace of the tag clock is visualized by the shorter tick-length for the tag timescale. A number of ticks between the message transmission times t Tx,j and t Tx,i in the master timescale will result in shorter interval in the tag timescale. The difference in propagation delays (and thus distances to anchors) is then corrupted by the error (red rectangle in Figure 3), which is proportional to the relative drift between master and tag clock and to the length of the message separation interval T i,j between transmissions from the anchors indexed by i and j. The estimate of the drift can be obtained from the CFO measurements ν [MT] with respect to the master anchor; the difference of the propagation delays corrected for the drift-related error yields In order to reduce the effect of the CFO measurement noise on the positioning, the average value of CFO among all anchors received in the particular epochν [MT] is utilized. Since the anchor local clocks are not physically synchronous with the master clock, result (20) is employed to obtain the CFO with respect to master anchor. The average CFO is where the M available anchors are indexed by l. Symbol ∆ṫ is the CFO with respect to master anchor. It should be pointed out that constant drift is assumed for the interval T i,j ; typically, the separation interval is several milliseconds and thus, the assumption is valid. In [25], it has been shown that either difference in transmission times or difference in reception times can be used for separation interval computation: With the corrected measurements d i,j , the tag's position in Cartesian coordinates r = x y z T can be estimated by the means of nonlinear least-squares (NLSQ) solver.
The problem can be formulated as where d i,j are drift-corrected TDoA measurements according to (22), g i,j is the nonlinear measurement model that estimates TDoA distance from anchors i and j, located at positions r i and r j , respectively, to the tag at position r A point r, where the function (25) reaches a (local) minimum, can be found iteratively with the weighted Levenberg-Marquardt method [27][28][29]. The L-M method is known for its fast convergence [27,28] as it is able to behave either more as a Gauss-Newton method (faster, higher risk of divergence) or a gradient descent method (slower, lower risk of divergence). Such properties are achieved by coupling the two behaviors by carefully manipulating the value of the damping coefficient λ k .
The L-M method computes the new estimate r[k + 1] from the previous one r[k], starting from the initial guess r[0]. The estimate update equation is [29,30] where vectors d and g(r[k]) are collated TDoA distance measurements and the respective modeled measurements, matrix W is the measurement weighting matrix, operator Diag(·) clears the off-diagonal elements of the input matrix and G k is matrix of first derivatives of vector g(r[k]) evaluated at point r[k] The matrix G k is a 3 × M matrix, where each row is equal to where 1 i and 1 j are unit vectors pointing in the direction of user's estimated position from the anchor's i and j position, respectively. The weight matrix is the inverse of the TDoA measurement covariance matrix Φ d [29], while the TDoA covariance matrix is obtained by transformation of the time of arrival measurement (ToA) covariance matrix Φ t with combination matrix D The ToA measurement covariance matrix Φ t is a diagonal matrix with the diagonal elements var(t i ) equal to the sum of the variances of ToA measurement t Rx,i , transmission time t Tx,i and CFO measurement ν i The ToA var(t Rx,i ) = 150 ps (see Section 2) and CFO variances var(ν i ) are constant, while the actual value of var(ν i ) depends on the method of CFO measurement (see Section 3.3). The transmission time variance var(t Tx,i ) is estimated and included in the message transmitted by the anchor i.
Finally, the combination matrix D is a (M − 1) × M matrix that combines the ToA measurements into TDoA measurements. Each row of the matrix contains exactly one +1 and one −1 values, the rest is zero. By multiplying a vector of M ToA measurements by matrix D a vector of M − 1 TDoA measurements is obtained. The exact format of the matrix is not given, however its choice does affect the hyperboloids used for the estimation and thus the achievable estimation accuracy (Dilution of Precision). The following is an example of a combination matrix The covariance of the final estimate Φ r , given by the described process, can be computed from the jacobian G K from the last algorithm iteration K [29]

Experimental Results
The experimental evaluation of the CFO-aided A2T TDoA positioning consists of measurements in 16 locations within the laboratory's UWB testbed. We acknowledge that the testbed setup and statistical evaluation is almost identical to the one used in [25], in order to maintain comparability with the results with other positioning methods.

Testbed Description and Data Acquisition
The testbed is a room of dimensions 4.4 by 9.7 m with a ceiling height 2.75 m. Six UWB anchors were mounted on the bottom of a suspended ceiling light, their antennas were located between 2.52 m to 2.57 m above the floor. The anchors were powered and connected to the controlling computer by means of Ethernet cabling with Power-over-Ethernet capability. The detail of the anchor device with its key dimensions is provided in Figure 4. It is worth noting that identical hardware was used as the tag. An annotated photo of the testbed during measurement is provided in Figure 5. The positions of the anchors were precisely surveyed by a point-to-point laser distance measurement device. The anchors were synchronized by means of algorithm described within Section 2; the master anchor is depicted by a filled circle in the Figures 6-8, hollow circle is used for the slave anchors.
During the test runs, all messages received by the tag were stored, including the necessary timestamps and CFO estimates obtained by both methods (RTTO and C int ). Consequently, all the methods of interest are evaluated at once, inherently under identical conditions and using the same message data and timestamps. The 16 measurement points were organized in a 4-by-4 grid; the points are identified by a number indicating row and letter indicating column, when observed from above. The point 1A is located in the bottomright corner of Figures 6a, 7a and 8a, the point 4D is in the top-left corner. The tag was mounted on a tripod stand approximately 1.55 m above the floor; the ground-truth position was surveyed by a point-to-point laser distance measurement device at each location. At each point, the positioning and CFO data were collected for at least 5 min. The synchronization/positioning messages were transmitted with period 100 ms, and thus data from over 3000 epochs were recorded at each point; in total, measurements from 49,666 epochs were collected.
The acquired measurements (timestamps and CFO measurements) were processed independently by the three anchor-to-tag (A2T) TDoA positioning algorithms that were evaluated: EKF-based A2T TDoA; drift is estimated and corrected-method described in [25] The positioning has been performed both in 3D (spatial) and 2D (planar); the results are provided in Sections 5.3 and 5.4, respectively.

Statistical Evaluation
Before evaluating the accuracy, the position estimates are validated. Positioning results that failed to converge to a sufficiently precise solution are discarded in order to avoid distortion of the results by obviously unreliable values. Such outlier is detected when the absolute value of any position coordinate exceeds 100 m; similarly, an unreliable value is detected when any position coordinate variance exceeds 1 × 10 4 m 2 or if "not a number" value occurs either within the position vector or its covariance matrix. The percentage of valid estimates for each of the evaluated algorithms will be stated in their related sections. In the further description of the statistical evaluation, we will denote the number of valid epochs as N v .
The non-weighted and weighted means of position estimates (r andr w , respectively) for each measurement location are computed as [31] The weight w i for each epoch is computed as where Φ r,i is the covariance matrix of estimated position in epoch i.
The mean values are used when evaluating the mean error of the position estimation: Symbol r re f denotes the ground truth position vector. Note that only the first two elements of the vectors are used when evaluating the 2D (horizontal) error.
The spread of the estimates is quantified by means of the unweighted and weighted covariance matrices, Φ and Φ w : The standard deviations in 3D (σ 3D ) and 2D (σ 2D ) are then obtained from the covariance matrices as and identically for the weighted values. The 3D RMS (root mean square) and WRMS (weighted root mean square) are evaluated as Note that 2D (horizontal) RMS and WRMS, are obtained with similar formulas, where only the first two elements of the position vector are taken into account. Inherently, the corresponding covariance matrix is truncated to size 2 × 2.
All the metrics are evaluated separately for each of the 16 measurement points 1A to 4D. In order to obtain the results characterizing the whole test (in the tables marked as TOT.), the quadratic mean is employed: The individual measurements from the set of size K = 16 are indexed by k. The 2D metrics and the weighted metrics are totaled in an identical way. This approach is insensitive to the number of valid measurements on each of the measurement locations.

3D Positioning Results
In the spatial positioning (3D) the height of the tag was estimated along with the horizontal coordinates. The accuracy in the vertical direction was expected to be poor, since the constellation of the anchors is rather flat, and therefore high VDOP (vertical dilution of precision) deteriorates the accuracy. Although inaccurate, the vertical coordinate may be treated as nuisance parameter, while the more accurate horizontal coordinates are still useful.
The results of the three A2T TDoA positioning methods were compared both qualitatively and quantitatively.

3D Localization Aided by RTTO-Based CFO
The CFO-aided TDoA with the CFO based on RTTO measurement (ν RTTO ) is rather inaccurate, as can be observed in Figure 6. In the horizontal plane ( Figure 6a The inaccurate RTTO-based drift correction also reduces the convergence rate of the L-M algorithm, in fact, only 73.1% of the solutions passed the validation criteria described in Section 5.2. The presence of a number of highly inaccurate position estimates is apparent from the non-weighted statistics that are available in the left part of Table 1. It is apparent that the most of the horizontal RMS error (RMS 2D ) is due to the spread of the estimate quantified by the standard deviation σ 2D ; the mean of the error (¯ 2D ) is approximately order-of-magnitude smaller than the standard deviation. The spatial RMS error (RMS 3D ) is typically double the horizontal RMS, confirming that the error in the vertical dimension is the largest one.
Since the highly inaccurate position estimates usually feature exceptionally large estimated standard deviations, the corresponding weighted statistics (left part of Table 2) are substantially more favorable than the unweighted ones. In particular, the horizontal WRMS 2D is 56.6 cm, i.e., almost 10-times lower than the unweighted RMS. The weighted standard deviation is also comparable to the weighted mean error. However, from comparison of WRMS 3D and WRMS 2D it is obvious that the significant vertical error is eminent for all position estimates; the difference is even more distinct than for the non-weighted RMS metrics. Table 1. Non-weighted statistics of 3D position estimates (all values in centimeters).  Table 2. Weighted statistics of 3D position estimates (all values in centimeters).

3D Localization Aided by Carrier-Integrator-Based CFO
The CFO-aided TDoA with the CFO based on carrier-integrator measurement (ν CINT ) provides better results, indeed. Although the outward spread of the position estimates in Figure 7a is similar to the previous result in shape and direction, the magnitude of the error is substantially lower. From Figure 7b it is obvious that even the vertical error is lower in comparison with the RTTO CFO-aided result; the estimates are more concentrated around the hyperbolic segments, the vertical spread is lower as well.
Undoubtedly, the quantitative results confirm better performance when utilizing C intbased CFO. In particular, 80.1% of the position estimates passed the validation criteria from Section 5.2. Still, the most of the error is caused by the spread of the measurements, see the unweighted statistics in the central part of Table 1. The improvement with respect to the RTTO-based CFO varies depending on the test point; however, overall standard deviation and RMS errors for the C int -based estimates are generally lower by approximately one third. The total mean of the error (¯ 2D ) is rather similar for both CFO-aided approaches; however, the values vary significantly for each test point, there are several test points where the mean error is higher for the C int -based estimates.
The improvement is similar for the weighted metrics, as reported in the central part of Table 1. As the influence of highly inaccurate measurements is suppressed, the horizontal weighted standard deviation and WRMS is a few decimeters for all measurement points when C int -based CFO is utilized. The effect of the choice of CFO source does not possess a significant effect on the weighted mean horizontal error¯ w2D . When C int -based CFO is used, the weighted mean horizontal error is similar in magnitude to the weighted standard deviation σ w2D .

EKF-Based 3D Localization
The extended Kalman-filter-based solution is used as a benchmark; the achieved results are consistent with the previous evaluation in [25]. The horizontal spread of the estimates is very low, mostly smaller than the offset from the ground-truth position, see Figure 8a. The larger spread in the vertical dimension is documented in Figure 8b; additionally, there is a significant bias towards the anchor constellation plane in the vertical dimension.
There is only a negligible difference between the unweighted and weighted quantitative results for the EKF-based solution that are provided in the right part of Tables 1 and 2. Unlike for the CFO-aided solutions, the bias of the estimate, i.e., mean error¯ 2D is the more prominent contributing factor to the RMS error than the spread quantified by the standard deviation σ 3D . Indeed, the horizontal standard deviation is in the centimeter level for all test points except location 1A. The high value of spatial RMS 3D is mostly caused by the apparent vertical bias, since the spatial standard deviation σ 3D (not included in the tables) of the EKF-based solution is in the order of lower decimeters, typically.
It is necessary to note that 99.8% of position estimates passed the validation criteria; however, comparison of the validation pass-rate of the between EKF-based and epoch-byepoch solutions is rather unjust due to their different nature.

2D Positioning Results
In this case a purely planar (2D) solution is obtained, i.e., vertical coordinates of both the tag and the anchors are neglected. The unequal heights of tag and the anchors are not compensated in any way, since the height of the tag is considered unknown. Consequently, the neglection of the vertical coordinates contributes to the overall positioning error of the planar (2D) solution. On the contrary, there is no error contribution related to high VDOP and thus the 2D solution may provide more accurate results than the 3D solution in certain cases. The visualization of the results of the three evaluated algorithms in 2D are provided side by side in Figure 9.

2D Localization Aided by RTTO-Based CFO
Although the 2D TDoA with the CFO aiding based on RTTO measurement (ν RTTO ) is more accurate than its 3D counterpart, the accuracy is still rather poor. The planar positioning results can be seen in Figure 9a. It is necessary to note that neglecting the vertical coordinate leads to substantially higher validation pass-rate, which reaches 98.5%. The non-weighted statistics of the 2D solution with RTTO-based CFO aiding are provided in the left part of Table 3. It is apparent that in total the horizontal standard deviation (σ 2D ) and RMS error (RMS 2D ) are approximately a third of the values obtained by the 3D solution (see Table 1). The improvement of 2D solution is less prominent in case of the weighted horizontal standard deviation (σ w2D ) and RMS error (WRMS 2D ), see Table 4. In comparison with the 3D solution we observe approximately 42% improvement of σ w2D and 42% in WRMS 2D . Such results suggest that the 2D solution leads to more stable convergence and reduces the number of outliers.

2D Localization Aided by Carrier-Integrator-Based CFO
The reduction of the solution to two dimensions is also beneficial when CFO aiding is based on carrier integrator measurement (ν CINT ). Indeed, the validation criteria, as described in Section 5.2, were passed in 99.5% of epochs. The results are visualized in Figure 9b; apparently, the carrier integrator CFO-aided positioning is substantially more accurate than the solution with the RTTO-based CFO aiding.
The accuracy is quantified by the non-weighted statistics provided in central part of Table 3. The unweighted statistics suggest major improvement in terms of accuracy; horizontal standard deviation (σ 2D ) is 84% lower and RMS error (RMS 2D ) is 82% lower with respect to the 3D solution that estimates the vertical coordinate as well. The improvement with respect to the RTTO-based 2D solution is 65% in terms of σ 2D and 61% when comparing to RMS 2D .
The weighted statistics in the central part of Table 4 confirm the obvious improvement, which nonetheless, is not as impressive as in the non-weighted case. The weighted standard deviation (σ w2D ) is 51% lower and WRMS 2D is 10% lower than those achieved with the 3D solution. Clearly, the 3D solution contained substantial amount of estimates with high error and very low weight (low confidence). In comparison with the RTTO-based 2D solution there is 60% and 35% improvement in (σ w2D ) and WRMS 2D , respectively.
It is worth noting that the difference in mean error of the position estimation regardless weighting (i.e.,¯ 2D and¯ w2D ) is far less prominent than the change in standard deviation or RMS error.

EKF-Based 2D Localization
The EKF-based 2D solution completes the graphical results in Figure 9c. There is no substantial performance difference between the 2D and 3D solution when the EKF is used to mitigate the clock drift effect on the A2T TDoA positioning. It is acknowledged that the validation pass-rate is identical to the 3D solution, i.e., 99.8%. The weighted and non-weighted statistical results are available in the right part of Tables 3 and 4. The horizontal-plane statistics (i.e., σ 2D ,¯ 2D , RMS 2D ) and their weighted counterparts differ mostly by several millimeters regardless of whether a 2D or 3D solution is employed.

Discussion
The presented results clearly show that it is possible to utilize CFO measurements to correct anchor-to-tag TDoA measurements, and obtain position on an epoch-by-epoch basis. However, the CFO measurements (both RTTO-based and carrier-integrator-based) are substantially less accurate than the clock drift estimate obtained by Kalman filtering from the longer observation of timestamps. Naturally, the CFO-aided A2T TDoA suffer from substantially poorer accuracy. Notably, the least accurate RTTO-based CFO bears minimal utility as an aid to positioning. The CFO obtained from the carrier integrator is more accurate, and thus the positioning results are more favorable. It is worth mentioning that the more accurate C int -based CFO yields a higher percentage of valid solutions than the RTTO-based CFO. Therefore, it is recommended to utilize the C int -based CFO only, even though it is slightly more difficult to obtain from the transceiver.
Due to the geometry of the anchor constellation, the positioning performance is inherently better for the test points located in the central part of the constellation rather than on the edges, where the poor geometry emphasizes the inaccuracies in the TDoA measurements; this is certainly valid even for the EKF-based solution.
The epoch-by-epoch CFO-aided estimates are not affected by any underlying motion and drift model, unlike the EKF solution [25]. Inherently, the non-filtered position estimates seem to be more spread, since there is no assumption of inter-epoch dependency. Nonetheless, it is apparent that the major contributing factor to the inaccuracy of the CFOaided solutions is the poor accuracy of the CFO estimate in comparison to the EKF-based drift estimate.
Graphical results and both the weighted and non-weighted statistical metrics suggest that the horizontal position estimate biases (quantified by¯ w2D or¯ 2D ) are quite similar for all presented solutions. The bias errors that are common to all solutions are probably caused by inaccuracies in anchor constellation survey and internal delays calibration. Due to the higher spread (quantified by σ w2D or σ 2D ) of the CFO-aided solutions, the impact of such systematic errors on the overall horizontal RMS accuracy is not consequential. Nonetheless, they represent a major contribution to the horizontal RMS of the EKF-based solution.
All the presented 3D positioning results suffer from higher spread and substantial bias in the vertical direction. Such bias is more difficult to observe for the CFO-aided solutions due to higher standard deviations. Nonetheless, such behavior is caused mostly by the flat constellation of anchors, and thus, the vertical dilution of precision (VDOP) is rather high. The position estimates are biased towards the plane formed by the anchors (see Figure 8b). The performance in the vertical dimension could be improved by placing several anchors closer to the floor level; however, such placement is rather impractical for most scenarios due to obstructions in the signal path.
It is also possible to neglect the vertical coordinate completely and solve the whole problem in plane, i.e., in two dimensions only (2D). The presented results indicate substantial performance improvement of both 2D CFO-aided solutions with respect to the 3D solutions obtained from the identical TDoA measurements. Not only is the accuracy better, but especially the solution validation pass-rate is higher for the 2D solution; it reaches 98.5% and 99.5% for the CFO based on RTTO and carrier integrator, respectively.
Alternatively, if the height of the tag is known, a soft constraint may be introduced into either the least-squares or EKF solution, see e.g., [32]. An evaluation on the impact of the constraints or solution dimension reduction on the horizontal and overall accuracy of the CFO-aided solution is beyond the scope of this article. The effect of soft constraints on EKF solution has been already described in [25].
Although the CFO-aided A2T TDoA solutions are less accurate in comparison with the EKF-based solution, they are useful due to their unique features. Since the localization is performed on an epoch-by-epoch basis, it can be utilized by low-power devices that do not localize themselves continuously, but rather infrequently (e.g., once per minute or less). For such devices, it is not feasible to observe numerous epochs in order to obtain accurate results from the EKF. With the CFO-aided solution, it is necessary to turn the receiver on for a single epoch only, and therefore optimize the energy consumption of the device. Alternatively, the CFO-aided position estimate can be utilized to trigger accurate EKF-based positioning only in certain areas and conserve resources when accurate positioning is not necessary. It is worth mentioning that both the CFO-aided L-M solutions and the EKF solution can be implemented in low-cost devices.
Utilizing either of the CFO estimates directly in the EKF as a drift measurement is not beneficial due to its poor accuracy. Nevertheless, CFO and CFO-based position estimates can be used as the initial condition to the EKF. The CFO-based drift value may be also utilized to detect a failure or divergence of the EKF in devices that estimate the position frequently and continuously, and improve the robustness of the positioning system.

Conclusions
The presented results confirm that it is possible to use carrier-frequency offset (CFO) to compensate for tag clock drift when estimating tag's position. Since positioning messages are sent by the synchronized network of anchors (A2T TDoA), and the tag only receives, the number of possible users is virtually unlimited. The algorithm for correcting the TDoA measurements by means of the CFO observations with respect to multiple transmitting anchors was described and experimentally evaluated. Although the accuracy of the CFOaided approach does not reach the one of the EKF solution, it is able to operate on epoch-byepoch basis, and thus does not require continuous operation to converge. Such characteristic may be useful especially for devices optimized for long battery life, which do not require frequent position updates.
In total, two sources of the CFO-aiding were evaluated; the utilization of RTTO-based CFO value yields inaccurate results that bare minimal utility without further filtering. According to the observations, only the use of carrier-integrator-based CFO measurement is feasible for positioning. Furthermore, it was shown that when CFO-aiding is used, it is beneficial to neglect vertical coordinate and solve the positioning problem in plane (2D) rather than in space (3D). With this approach, we were able to achieve horizontal WRMS 2D of 30.3 cm when the height coordinate was neglected and WRMS 2D of 34.0 cm when estimating the height as well.

Data Availability Statement:
The recorded data used for the algorithm evaluation are stored in proprietary and confidential format and are therefore not publicly available. However, both the measurement data and positioning results can be provided by the authors upon request.

Conflicts of Interest:
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.