Indoor Localization with a Single Access Point Based on TDoA and AoA

Indoor localization in 5G and the Internet of Things has been paid increasing attentions. Recent advances have demonstrated reasonable localization accuracy that can be provided by using a single access point (AP). Yet, existing single AP localization solutions require frequency hopping or suffer from degraded accuracy performance due to complicated indoor propagation environment. This paper proposes a new single AP indoor localization method based on time difference of arrival (TDoA) and angle of arrival (AoA). We divide multiple antennas into two groups, one group with close distance for AoA estimation and the other group with the farther distance for TDoA estimation. Then, a joint estimation of AoA and ToA is carried by a spatial smoothing-based multiple signal classification (MUSIC) algorithm. Finally, we propose a weighted least squares method based on TDoA and AoA estimations to achieve indoor localization. Simulation results verify the effectiveness of the proposed single AP localization method.


Introduction
With the rapid deployment of 5G and the Internet of Things [1][2][3][4], indoor localization technology has attracted more and more attentions, which plays an important role in people's daily life. For outdoor environment, satellite-based positioning system such as GPS and BeiDou has already provided reasonable accuracy performance and widespread coverage. However, because of large signal attenuations and severe multipath propagation problem, they cannot be applied in indoor environment. Among existing indoor localization solutions [5][6][7][8][9], Wi-Fi localization [10][11][12][13] is one of the most widely used technologies, due to the ubiquitousness of Wi-Fi infrastructures in 5G and the Internet of Things.
Wi-Fi indoor localization technologies can be mainly divided into two categories: fingerprint-based and geometric measurement-based approaches. The fingerprint-based approach [14][15][16] includes two stages: offline data training stage and online matching stage. This approach may render high positioning accuracy by establishing precise mapping between Wi-Fi signal characteristics and related physical positions. However, it requires labor-intensive fingerprint database construction and update work, especially in a large-scale and constantly changing target environment. Geometric measurement-based approach [17][18][19][20] measures the distance or the azimuth of the target device relative to an AP, relying on time of arrival (ToA) or angle of arrival (AoA) estimations, respectively. This approach always requires multiple APs and is vulnerable to a severe multipath propagation environment. Moreover, for ToA estimation, due to the phase measurement errors [21] caused by sampling frequency shift, limited bandwidth of the CSI signal, and time synchronization, it is difficult to achieve an accurate estimation of ToA or TDoA.
Recently, exploration of channel state information (CSI) has offered opportunities to achieve single AP localization and adapts to the indoor multipath environment. CSI records the amplitude and phase of the Wi-Fi signal transmitted on each subcarrier of multiple antennas. It describes the Wi-Fi signal in a more fine-grained way and can be used to derive AoA and ToA information by deploying a multiple signal classification (MUSIC) algorithm [22]. In order to improve the availability and signal coverage of Wi-Fi localization, single access point localization combining ToA and AoA information has become a research hotspot [23,24]. Chronos [5] is the first single AP localization system that can achieve submeter level localization accuracy by combing ToA and AoA estimations. However, it requires frequency hopping to increase the bandwidth of CSI signal and modifies existing Wi-Fi protocols. These requirements [5,25] may affect normal Wi-Fi communication functions and restrict the widespread deployment of Chronos.
In [26], the authors propose a single AP localization method based on ToA estimations of multiple distributed antennas. Three pseudo-ToA estimations from three antennas are combined to estimate the two-dimensional target device location, which assumes that each pseudo-ToA estimation has the same shift. This method just exploits the ToA information and thus is easily affected by the measuring accuracy of ToA, especially when the distance between antennas is small. In [27], the authors combine TDoA estimations of multipath CSI signals with AoA estimations to achieve a single AP localization. It relies on a sufficient number of multipaths and neglects multiple reflection paths and thus cannot adapt in a complicated indoor environment. In [28], the authors implement ToA estimations of only two subbands and an interferometer to achieve single AP localization. The proposed ToA and AoA estimation scheme cannot effectively distinguish multipath signals and thus cannot be applied in the indoor multipath propagation environment.
In this paper, we propose a new single AP indoor localization method based on time difference of arrival (TDoA) and angle of arrival (AoA). Simulations are carried to verify the effectiveness and high localization accuracy of the proposed method. Our main contributions can be summarized as the following aspects: (

Theoretical Basis
Channel state information (CSI) is a kind of fine-grained information in the physical layer of signals, which describes the corresponding amplitude and phase of all subcarriers in the frequency domain, as well as the attenuations experienced by the wireless signal during its propagations. In general, CSI can be used to describe the wireless channel by channel impulse response, and the channel impulse response of multipath signals can be expressed as where a i is the signal intensity attenuation factor of the ith path, δðτÞ is the impulse function, and τ i is the time delay of the ith path. In fact, CSI measured by the Wi-Fi wireless network card is a complex matrix, which describes the introduced channel attenuations and phase shifts data over all subcarriers on each antenna. For the 30 subcarriers of the three antennas in the widely used Intel 5300 Network Interface Card (NIC), the CSI matrix is expressed as follows: where csi i,j represents the CSI of the jth subcarrier in the ith receiving antenna. CSI data are mainly used to estimate the ToA and AoA information of the target device at the AP port by the MUSIC algorithm. The basic principle of MUSIC is to build a CSI signal model according to the phase shifts introduced by different antennas and different subcarriers of the same antenna. Assuming that there are M antennas receiving N incident signals, then CSI received signals can be expressed as where XðtÞ is CSI matrix whose dimension is ðM × N sub Þ × 1 (N sub represents the number of subcarriers); A = ½að θ 1 , τ 1 Þ, aðθ 2 , τ 2 Þ, ⋯, aðθ N , τ N Þ is the steering vector matrix array of the same dimension; SðtÞ is the complex envelope vector of N incident signals whose dimension is N × 1; ð θ i , τ i Þ are AoA and ToA estimations of the ith path incident signal with only two-dimensional localization considered, respectively; and NðtÞ is the related additive white Gaussian noise. Assuming that in the Wi-Fi NIC, the distance between adjacent antennas is d, and the subcarrier frequency interval of incident signal is f δ ; then, the steering vector of the ith incident signal is 2 Wireless Communications and Mobile Computing where Φ θ i = e −j2×π×d×sin θ i ×f /C is the phase shift introduced by the adjacent antenna, f is the wireless signal center frequency, C is the ideal electromagnetic wave propagation speed, and Ω τ i = e −j2×π×f δ ×τ i is the phase shift introduce by adjacent subcarrier. Based on the orthogonality between the steering vector and the received signal noise subspace, the MUSIC algorithm constructs the joint spectral peak function to seek multipath AoAs and ToAs.

Proposed Single AP Localization Method
An overview of the proposed single AP localization method based on TDoA and AoA is shown in Figure 1. It is mainly divided into three parts: antenna deployment and resource allocation of a single AP, estimations of direct path AoA and TDoA based on spatial smoothing MUSIC, and weighted least squares localization combining AoA with TDoA. Firstly, for the antenna deployment and resource allocation of a single AP, this paper divides the multiple antennas of a single AP into two groups: one group is used for TDoA estimation and another one is used for AoA estimation. Secondly, we deploy the spatial smoothing algorithm to smooth the CSI signal matrix and use the superresolution MUSIC algorithm to estimate AoAs and TOAs of all paths, in which a direct path is identified and used in the ultimate localization. Finally, the weighted least squares method is proposed to integrate AoA and TDoA estimations to achieve ultimate localization.

Antenna Deployment of a Single AP.
We propose a new antenna deployment method for our single AP localization method. According to different characteristics of ToA and AoA estimation schemes, we divide the antennas of a single AP into two groups. One group is for TDoA estimations, whose distances are set as the meter level to ensure a good geometric factor of localization method. Another group is for AoA estimations, whose distances are set as the centimeter level and equivalent to the half wavelength of the wireless signal.
In order to guarantee localization accuracy in all target environments, we design the antenna placement strategy and constraint conditions as follows. The antenna array used for AoA estimation is set as a linear array to ensure that the spatial smoothing MUSIC algorithm can be well adopted. The normal directions of each antenna array for AoA estimations are placed as uniform as possible within the localization coverage. The normal direction of antenna baseline for TDoA must not be parallel to that of the antenna array for AoA estimations, and the included angle should be as large as possible. This set is necessary for ambiguity resolution of the proposed single AP localization. Besides, in order to guarantee a reasonable signal-to-noise ratio (SNR), the distance between different antennas should be restricted to reduce line losses. We take the most widely used Intel 5300 NIC as an example to design the antenna deployment of the proposed single AP localization method. Figure 2 shows the antenna deployment of the single AP with only three antennas installed. Antenna 2 and Antenna 3 are grouped and regarded as an antenna array for an AoA estimation, whose distance is half of the wavelength. The rest antenna 1 is set several meters away from antennas 2 and 3. Through the spatial smoothing-based MUSIC algorithm, we can estimate jointly AoA and ToA2 of the target device. TOA1 of antenna 1 and related TDoA can be also obtained by the MUSIC algorithm.

Estimations of AoA and TDoA Based on Spatial
Smoothing MUSIC. We deploy spatial smoothing MUSIC to adapt coherence of multipath signals. Taking Intel 5300 NIC as an example, its CSI matrix contains a total of 90 CSI samples of 3 antennas and 30 subcarriers for each antenna. We use the spatial smoothing algorithm to partition the CSI matrix and obtain the submatrices as follows: In Equation (5), the solid line box represents the first smoothing subarray, and the dashed line box represents the last smoothing subarray. The steering vector matrix of all subarrays can be written as a linear combination of the same steering vector. This steering vector can be expressed as where N and M are the number of subcarriers and antennas used in the subarray. In our proposed single AP localization method using Intel 5300 NIC as shown in Figure 2, antenna 1 is used for ToA estimation and the rest two antennas are used for joint estimation of ToA and AoA. The corresponding smoothing matrix and steering vector are given as follows. The CSI smoothing matrix of ½csi 1,1 , csi 1,2 , ⋯, csi 1,30 ' of antenna 1 is The related steering vector of antenna 1 is

Wireless Communications and Mobile Computing
where Ω τ = e −j2×π×f δ ×τ is the phase shift introduced by an adjacent subcarrier.
The CSI smoothing matrix of the rest two antennas is The related steering vector is where Φ θ = e −j2×π×d×sinθ×f /C is the phase shift introduced by adjacent antenna and Ω τ = e −j2×π×f δ ×τ is the phase shift introduced by an adjacent subcarrier. We take double antennas as an example, the channel state information matrix XðtÞ obtained is used to calculate the R H . The covariance matrix is divided into signal subspace and noise subspace for the signal subspace, and the noise subspace are orthogonal to each other.
where csi i is the ith column of Equation (9). U S is the subspace spanned by large eigenvalues, which is called a signal subspace, and U N is the subspace spanned by small eigenvalues, which is called a noise subspace.
Since the steering vector and the noise subspace of the signal are orthogonal to each other, there must be a minimum value of the signal in the incident direction theoretically. The spatial spectrum function (12) is used to search the spectrum peak, where the corresponding AOA and TOA are obtained.
3.3. Weighted Least Squares-Based Localization. We deploy weighted least squares-based localization fusing TDoA and AoA information. Firstly, we give an analytic localization solution based on the observation equation for a rough initial estimation. Then, the initial target coordinate is used to update into the weight matrix of the weighted least squares method. The final position of the target is obtained through iterative optimization. As shown in Figure 3, antennas 2 and 3 provide AoA estimation, whose coordinate center is set as ð0, 0Þ. Antenna 1 and the rest two antennas provide TDoA estimation, with the coordinate of antenna 1 set as ðL, 0Þ.
We firstly construct the observation equation based on TDoA and AoA estimations. Assuming that the calculated AoA of the direct path is θ, and the direct path TDoA between two antenna groups is Δτ, the following formula can be obtained according to the geometric relationship in Figure 3: ffiffiffiffiffiffiffiffiffiffiffiffiffi According to Equations (13) and (14), the initial positioning coordinates can be obtained:     Wireless Communications and Mobile Computing x 0= y 0 tan θ: Since measurement errors may be introduced into AoA and TDoA estimation results, the initial estimated coordinates obtained by the analytic solution may have relatively large errors. Therefore, we need to further optimize the localization results by the weighted least squares method.
Aiming at the observation errors of AoA and TDoA in the equation, we estimated the target position under the weighted least squares model and solved the positioning coordinates under the model through iteration according to the initial coordinates of the target to be determined obtained in the previous section.
According to the previous derivation, the initial coordinates ðx 0 , y 0 Þ were solved by the analytic method. Assuming R = ffiffiffiffiffiffiffiffiffiffiffiffiffi x 2 + y 2 p and r = ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ðx − lÞ 2 + y 2 q , R and r represent the linear distance between the target to be positioned and observation station 1 and observation station 2, respectively; the following formula can be obtained.
Then, according to Equations (13) and (14), we can express the observation equations of AoA and TDoA containing observation noise. The observation equations are as follows: where V θ and V τ represent the observation error of AoA and TDoA, respectively. Through derivation, we can get Equation (18) and x − y tan ðθ − V θ Þ = 0 are extended by the Taylor formula at ðθ,ΔτÞ; then, all terms of the second order and above are removed, and the following equations are obtained: In order to ignore the second-order term, the first-order term should be much larger than the second-order term. This condition can be reached when the ToA and AoA estimation errors are restricted. The equations of Equation (19) are expressed in matrix form as follows: Among them, where e is the error term and the weighted least squares algorithm can get a more accurate estimation of the target position by weighting the error term. According to the principle of the weighted least squares method, the weighted least squares solution of the system is The weighting matrix is where Q is the covariance matrix of the observed noise. The mentioned above is the derivation process of using the weighted least squares method to obtain the optimal positioning coordinate solution. When we write the algorithm program, we need to constantly update the coordinate and weight matrix by using the iterative method, so as to obtain more accurate coordinates. The calculation of the weighted matrix W in Equation (23)

Wireless Communications and Mobile Computing
coordinates of the target to be positioned. In the estimation process, the analytic method is used to obtain the rough estimate of the target coordinate to be positioned, namely, the initial coordinate, and then, it is substituted into Equation (24) to update W, so as to optimize the estimate of the target position.

Simulation Results and Analysis
In this section, we firstly compare the simulation results of ToA and AoA estimations under different SNR. Then, we compare the analytic method and the proposed weighted least squares method. Finally, we study the influence of TDoA and AoA estimation errors on localization accuracy.  Figure 4 shows the spectrum estimation results of spatial smoothing-based MUSIC algorithm for a single antenna under different SNR. It can be seen that when SNR varies from 12 dB to 18 dB, all spectrum peaks are found around the right ToA values. Moreover, the better ToA resolution performance is obtained by the higher SNR, whose spectrum curve is sharper. Figure 5 shows the cumulative distribution function of ToA estimation error of a single antenna under different SNR. The cumulative probability of ToA estimation error within 0.1 ns is 27.2%, 43.7%, 65.6%, and 79.5%, with SNR varying from 12 dB to 18 dB, respectively. The cumulative probability of ToA estimation error within 0.2 ns is 52.4%, 78.8%, 95.5%, and 100%, with SNR varying from 12 dB to 18 dB, respectively. As can be seen from the figure, with the increase of SNR, ToA estimation errors of a single antenna decrease significantly. In fact, in a realistic indoor environment, considering CSI phase measurement error and more serious multipath problem, the ToA estimation error may increase to some extent.

Joint Estimation
Results of ToA and AoA. We set three incident signals received by two antennas, whose ToA values are 10 ns, 20 ns, and 30 ns, respectively. Related AoA values are set as 30°, 45°, and 60°, respectively. In order to simulate realistic channel phase inconsistency, we set the channel phase inconsistency as a uniform variable distributed from -10°to 10°. Figure 6 shows spectrum estimation results of joint estimations with SNR = 16 dB. It can be seen that all spectrum peaks are found around the right ToA and AoA values by AoA and ToA joint estimations. Figures 7 and 8 show cumulative distribution function of AoA and ToA estimation errors with different SNR, respectively. As seen in Figure 7, the cumulative probability of AoA estimation error within 0.2°is 5.8%, 45.6%, 93.7%, and 100.0%, with SNR varying from 12 dB to 18 dB, respectively. As seen in Figure 8, the cumulative probability of the ToA estimation error within 0.1 ns is 5.3%, 48.6%, 95.5%, and 100.0%, with SNR varying from 12 dB to 18 dB, respectively. As can be seen from Figures 7 and 8, with the increase of SNR, AoA and ToA estimation errors of two antennas decrease signifi-cantly. In fact, in a realistic indoor environment, considering the CSI phase measurement error and more serious channel phase inconsistency problem, AoA and ToA estimation errors may increase to some extent. When the SNR is low, compared with the single antenna method, the joint estimation method is more vulnerable to the negative effects of channel phase inconsistency, resulting in a lower TOA estimation accuracy.

Comparison of Analytic Method and Weighted Least
Squares Method. We compare the localization results of the analytic method and our weighted least squares method.     Wireless Communications and Mobile Computing The analytic method is used as an initial estimation of the localization and as an initial input of the weighted least squares method. It can be regarded as a version of the least squares method. Figure 9 shows the mean localization error of both methods under different TDoA estimation errors with σ θ = 2°. As shown in Figure 9, when the standard deviation of the TDoA estimation error is smaller than 0.4 ns, the localization error is comparable for both methods. As the standard deviation of the TDoA estimation error increases, the mean localization errors of our weighted least squares method become smaller than that of the analytic method, while the gaps between them become larger and larger. Figure 10 shows the mean localization error of both methods under different AoA estimation errors with σ TDoA = 0:5 ns.
Similarly, when the standard deviation of the AoA estimation error is small, the localization error is comparable for both methods. As the standard deviation of the AoA estimation error increases, the mean localization errors of our weighted least squares method is smaller than that of the analytic method. For example, when the standard deviation of the AoA estimation error is 2°, the mean localization error of our weighted least squares method is 1.37 m, while that of the analytic method is 1.78 m. It can be seen that our weighted least squares method is more robust than the analytic method when degraded ToA or AoA estimation performance occurs. Then, we study influence of the number of iteration number on performance of the weighted least squares method. Our weighted least squares method iteratively updates the weight matrix by using the localization results of the previous step, until the stop condition of iteration is satisfied. Figure 11 shows the mean localization error versus the number of iterations with σ θ = 2°and σ TDoA = 0:5 ns. At the first iteration, the mean localization error usually is relatively large, since the weight matrix is not updated yet. Then, after even one iteration, the mean localization error drops significantly from 1.85 m to 1.37 m. Then, the mean localization error fluctuates around a certain value as the number of iteration number increases. It can be seen that, the localization error can be rapidly reduced after more than two iterations, and the mean localization errors may converge to a certain relatively small value.

Localization Accuracy Results.
We set the antenna coordinate as shown in Figure 3. The coordinate center of antennas 2 and 3 is set as the origin ð0, 0Þ, while the coordinate of antenna is set as ð15 m, 0Þ. The target device is uniformly distributed in the square space whose four vertices are ð10 m, 1 mÞ, ð10 m, 16 mÞ, ð20 m, 1 mÞ, and ð20 m, 16 mÞ. Figure 12 shows mean localization errors versus TDoA estimation errors with different AoA estimation errors. As seen in Figure 12, the mean localization error is 1.09 m, 1.66 m, and 2.41 m, with a standard deviation of the TDoA error 1 ns, corresponding to the standard deviation of AoA error being 1°, 2°, and 3°, respectively. The mean localization error is 2.63 m, 3.16 m, and 3.92 m, with a standard deviation of the TDoA error 3 ns, corresponding to the standard deviation of the AoA error being 1°, 2°, and 3°, respectively. Figure 13 shows mean localization errors versus AoA estimation errors with different AoA estimation errors. As seen in Figure 13, the mean localization error is 0.69 m, 0.80 m, and 1.03 m, with a standard deviation of the AoA error 1°, corresponding to the standard deviation of the TDoA error being 0.1 ns, 0.5 ns, and 0.9 ns, respectively. The mean localization error is 1.33 m, 1.43 m, and 1.62 m, with a standard deviation of the TDoA error 2°, corresponding to the standard deviation of the TDoA error being 0.1 ns, 0.5 ns, and 0.9 ns, respectively. It can be seen that the mean localization error increases gradually while the standard deviation of the AoA or TDoA error increases. The mean localization error can be controlled within 1.5 m when the standard deviation of the TDoA error is smaller than 0.6 ns and the standard deviation of the AoA error is smaller than 1.8°. Figure 14 shows the cumulative distribution function of the localization error with σ TDoA = 0:5 ns and different AoA estimation errors. As seen in Figure 14, the cumulative probability of the localization error within 1 m is 98.7%, 74.2%, and 57.1%, corresponding to the standard deviation of the AoA error being 1°, 2°, and 3°, respectively. The cumulative probability of the localization error within 2 m is      Figure 15 shows the cumulative distribution function of the localization error with σ AoA = 1°and different TDoA estimation errors. As seen in Figure 15, the cumulative probability of the localization error within 1 m is 95.6%, 78.7%, and 58.5%, corresponding to the standard deviation of the TDoA error being 0.1 ns, 0.5 ns, and 0.9 ns, respectively. The cumulative probability of the localization error within 2 m is 99.9%, 98.6%, and 90.7%, corresponding to the standard deviation of the TDoA error being 0.1 ns, 0.5 ns, and 0.9 ns, respectively. The medium localization error is 0.42 m, 0.68 m, and 1.02 m, respectively. It can be seen from Figures 14 and 15 that our proposed single AP localization method may achieve a relatively good accuracy performance when the TDoA and AoA estimation errors can be controlled within a reasonable scale.

Conclusion
This paper proposes a new single AP indoor localization method based on TDoA and AoA. We design a new antenna deployment and resource allocation scheme, which group the multiple antennas into two groups. One group is used for AoA estimation and the other group is used for TDoA estimation. A spatial smoothing-based MUSIC algorithm is adopted to jointly estimate the direct path ToA and AoA. Our single AP localization method exploits complementary advantages of TDoA and AoA information, while frequency hopping or Wi-Fi protocol modifications are not required. Simulation results show that the proposed single AP localization method may obtain accurate localization results. We will further verify the proposed method in a more complicated and realistic indoor environment in our future work.

Data Availability
The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
The authors declare that there are no conflicts of interest regarding the publication of this paper.