#### Abstract

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.

#### 1. Introduction

With the rapid deployment of 5G and the Internet of Things [1–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–9], Wi-Fi localization [10–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–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–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: (1)We propose a new antenna deployment method for a single AP. Multiple antennas are divided into two groups, one group with close distance for AoA estimations and another group with the farther distance for TDoA estimations. The antenna deployment strategy including antenna distances and antenna resource allocations are introduced(2)We design a spatial smoothing-based MUSIC algorithm to estimate ToA of a single antenna and AoA of an antenna array, respectively. Since ToA estimations are obtained from a single AP with the same clock, corresponding TDoA estimation errors introduced by the sampling frequency shift and time synchronization can be avoided(3)We propose a hybrid AoA/TDoA localization algorithm based on the weighted least squares principle. The observation equation of target coordinates is firstly constructed based on TDoA and AoA estimations. Then, the weighted least squares-based solution is used to iteratively obtain target coordinates, with an analytical solution as the initial coordinate estimations

#### 2. 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 is the signal intensity attenuation factor of the th path, is the impulse function, and is the time delay of the th 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 represents the CSI of the *j*th subcarrier in the *i*th 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 antennas receiving incident signals, then CSI received signals can be expressed as where is CSI matrix whose dimension is ( represents the number of subcarriers); is the steering vector matrix array of the same dimension; is the complex envelope vector of incident signals whose dimension is; are AoA and ToA estimations of the th path incident signal with only two-dimensional localization considered, respectively; and is the related additive white Gaussian noise. Assuming that in the Wi-Fi NIC, the distance between adjacent antennas is , and the subcarrier frequency interval of incident signal is ; then, the steering vector of the th incident signal is where is the phase shift introduced by the adjacent antenna, is the wireless signal center frequency, is the ideal electromagnetic wave propagation speed, and 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.

#### 3. 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.

##### 3.1. 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.

##### 3.2. 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 and 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 of antenna 1 is

The related steering vector of antenna 1 is where 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 is the phase shift introduced by adjacent antenna and is the phase shift introduced by an adjacent subcarrier.

We take double antennas as an example, the channel state information matrix obtained is used to calculate the . 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 is the th column of Equation (9). is the subspace spanned by large eigenvalues, which is called a signal subspace, and 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 . Antenna 1 and the rest two antennas provide TDoA estimation, with the coordinate of antenna 1 set as .

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:

According to Equations (13) and (14), the initial positioning coordinates can be obtained:

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 were solved by the analytic method. Assuming and , and 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 and represent the observation error of AoA and TDoA, respectively. Through derivation, we can get

Equation (18) and 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 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 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 in Equation (23) needs to use the 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 , so as to optimize the estimate of the target position.

#### 4. 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.

##### 4.1. Simulation Results of ToA and AoA Estimations

###### 4.1.1. ToA Estimation Results of a Single Antenna

We set three incident signals received by a single antenna, whose ToA values are 10.1 ns, 30.2 ns, and 50.3 ns, respectively. 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.

###### 4.1.2. 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 . 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 significantly. 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.

##### 4.2. Comparison of Analytic Method and Weighted Least Squares Method

We compare the localization results of the analytic method and our weighted least squares method. 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 . 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 . 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 and . 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.

##### 4.3. 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 , while the coordinate of antenna is set as . The target device is uniformly distributed in the square space whose four vertices are , , , and .

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 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 99.9%, 97.3%, and 88.0%, corresponding to the standard deviation of the AoA error being 1°, 2°, and 3°, respectively. The medium localization error is 0.36 m, 0.73 m, and 1.06 m, respectively.

Figure 15 shows the cumulative distribution function of the localization error with ° 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.

#### 5. 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.

#### Acknowledgments

This work was financially supported by the National Natural Science Foundation of China (Grant Nos. 61971155 and 61801143), Natural Science Foundation of Heilongjiang Province of China (Grant No JJ2019LH1760), Fundamental Research Funds for the Central Universities (Grant No. 3072020CF0814), and Aeronautical Science Foundation of China (Grant No. 2019010P6001)