Indoor positioning based on tightly coupling of PDR and one single Wi-Fi FTM AP

ABSTRACT The indoor positioning system is now an important technique as part of the Internet-of-Things (IoT) ecosystem. Among indoor positioning techniques, multiple Wi-Fi Access Points (APs)-based positioning systems have been researched a lot. There is a lack of research focusing on the scene where only one Wi-Fi AP is available. This work proposes a hybrid indoor positioning system that takes advantage of the Fine-Timing Measurements (FTM) technique that is part of the IEEE 802.11mc standard, introduced back in 2016. The system uses one single Wi-Fi FTM AP and takes advantage of the built-in inertial sensors of the smartphone to estimate the device’s position. We explore both Loosely Coupled (LC) and Tightly Coupled (TC) integration schemes for the sensors’ data fusion. Experimental results show that the proposed methods can achieve an average positioning accuracy of about 1 m without knowing the initial position. Compared with the LC integration method, the median error accuracy of the proposed TC fusion algorithm has improved by more than 52% and 67%, respectively, in the two experiments we set up.


Introduction
Location information is now an indispensable part of our lives, especially with the advent of the Internet of Things (IoT) era, the demands for Location-Based Services (LBS) will become more and more extensive.Outdoors, the Global Navigation Satellite System (GNSS) (Ge et al. 2022) can provide relatively accurate and longterm positioning.However, in places where GNSS signals are blocked, such as under dense buildings, indoor environments, etc., the accuracy of GNSS positioning will rapidly decrease (Li et al. 2019).Therefore, positioning techniques for GNSSblocked scenarios have received widespread attention.So far, a variety of indoor positioning techniques based on different sources or sensors have been proposed and can be classified into two types: 1) building independent such as imagebased technologies (Li et al. 2021) and Inertial Measurement Unit (IMU)-based dead reckoning (Wu et al. 2019b) and 2) building dependent, which can be further classified as 1) building's infrastructures utilized (such as Wi-Fi (Al-Qaness 2019), cellular (Dalla Torre et al. 2019), and Bluetooth (Cao et al. 2019), and 2) dedicated infrastructures required (such as Ultra-Wide-Band (UWB) (Tian, Wang, and Salcic 2019), Radio Frequency Identification (RFID) (Ruiz et al. 2012), ultrasonic (Mannay et al. 2021), acoustic (Chen et al. 2021), etc.).The commonly used solutions for mobile phones are Wi-Fi, Bluetooth, and IMU positioning.The Wi-Fi or Bluetooth positioning is usually able to estimate the absolute positions, and its positioning errors will not accumulate with the increase of time, while the estimated positions are relatively discrete and affected by Non-Line-Of-Sight (NLOS), signal coverage of Access Point (AP), and multipath problems (Gu et al. 2019a).The Wi-Fi positioning usually has three implementation schemes, namely Received-Signal-Strength-Indicator (RSSI) ranging (Zhuang and El-Sheimy 2016), Round-Trip Time (RTT) ranging (Dvorecki et al. 2019), and fingerprint positioning (Chen et al. 2014).The IMU positioning can only estimate the relative position to a known starting point, while the estimated position is relatively continuous and does not depend on any specific signal coverage.The error in a short period is small but will increase rapidly with time accumulation (Lu et al. 2018).The IMU positioning is usually implemented in two ways, namely Pedestrian Dead Reckoning (PDR) (step length and heading estimation) and Inertial Navigation System (INS) (integration of gyro and accelerometer data) (Harle 2013).
The above analysis shows that Wi-Fi and IMU complement each other in positioning.Thus, the positioning of Wi-Fi and IMU fusion can compensate for their corresponding shortcomings.However, the current positioning schemes of Wi-Fi and PDR fusion still have some problems.First, the establishment and maintenance of the Wi-Fi fingerprint database are laborious (Zhang et al. 2018).Moreover, the latest generation of Android systems limits the frequency of Wi-Fi scanning, which limits the use of fingerprint-based positioning.Second, the accuracy of RSSI-based ranging decreases rapidly when the distance gets large, and the environmental variation also affects the RSSI value, resulting in a decrease in accuracy (Li et al. 2021).Third, the current Wi-Fi positioning solutions usually require multiple Wi-Fi APs to determine the location of a target (Chen and Chen 2021).It is difficult to achieve in some actual situations because one Wi-Fi base station is enough for internet communication in an indoor room.Moreover, the Wi-Fi signals from other rooms suffer from serious NLOS and multipath problems.
Regarding the first problem, some other solutions, e.g.ranging-based methods, have been explored for alternatives (Zafari, Gkelias, and Leung 2019).For the second problem, currently, IEEE 802.11-2016 has standardized the Wi-Fi Fine-Time Measurement (FTM) protocol, which can provide meter-level ranging accuracy according to the Wi-Fi Alliance (Yu et al. 2020b).The accuracy of RTT ranging will not change significantly with the increase of distance, which makes up for the problem of RSSI ranging to a certain extent (Yu et al. 2020b).Therefore, the fusion of RTT and RSSI will improve the positioning accuracy in theory.The third problem shows that studying the positioning scheme under one single Wi-Fi AP will alleviate the strong dependence on multiple Wi-Fi APs, to achieve positioning without increasing the cost.Moreover, most of the current fusion positioning methods based on Wi-Fi and IMU fusion are Loosely Coupled (LC) schemes.The target parameters are estimated separately, and then the estimated results are fused.But not Tightly Coupled (TC) solutions, the sensor data are put together to jointly optimize the model parameters of each sensor.Studies have shown that the TC scheme has higher accuracy than LC (Sun et al. 2020;Zhuang and El-Sheimy 2016).However, as far as we know, few works have been proposed for a TC positioning scheme that integrates RTT ranging, RSSI ranging, and IMU positioning.Therefore, this article proposes an enhanced TC positioning scheme based on the integration of Wi-Fi RTT, RSSI, and PDR.The main contributions of this article are threefold as follows.
(1) Extended Kalman Filter (EKF) based LC and TC integration algorithms are proposed, respectively, for real-time indoor positioning by fusing PDR and one single Wi-Fi AP ranging.Especially, our proposed TC scheme models PDR error, Wi-Fi RSSI ranging error, and FTM ranging error together to estimate location.
(2) A nonlinear-least-squares-based algorithm is proposed to estimate the absolute initial position by combining PDR with both RSSI and RTT measurements from one single Wi-Fi FTM AP.This proposal solves the requirement that at least three APs are required for absolute positioning.
(3) The effect of using one single Wi-Fi FTM AP to suppress PDR drift for long-term localization and the improvement of the proposed TC algorithm compared to the LC algorithm is evaluated.The experimental result proves that our proposed system realizes a similar absolute localization accuracy to multi-FTM APs based systems.
The remainder of this paper is organized as follows: Section 2 introduces the related works.Section 3 introduces the smartphone-based PDR algorithm.Section 4 details the proposed integration methods of PDR and Wi-Fi Ranging.Section 5 introduces the proposed method to determine the initial position.Section 6 describes the experimental results of the proposed algorithm.Finally, Section 7 concludes this article.

Related work
In this section, we introduce and discuss the existing works related to this paper to give an overview of the current research state.First, we present existing works of dead reckoning based on built-in inertial sensors.Then, the research state of Wi-Fi-based positioning is summarized.Finally, we introduce the related works of PDR and Wi-Fi fusion positioning systems.

Indoor positioning based on built-in inertial sensors
Built-in inertial sensors-based indoor positioning systems usually have two implementation methods, namely PDR (step length and heading accumulation) and INS (integration of gyro and accumulator data).
In traditional PDR systems, step detection, step length, and heading estimation are three indispensable components.For step detection, various algorithms have been proposed in recent years, such as peak detection (Gu et al. 2019b;Kang and Han 2015), pitch angle detection (Poulose, Eyobu, and Han 2019), Signal Vector Magnitude (SVM) (Hsu, Wang, and Chang 2017), and decision tree model (Wu et al. 2019a).The mathematical models are usually designed for step length estimation.In recent years, some machine learning-based step length estimators have been proposed, such as stacked autoencoders (Gu et al. 2019a), Artificial Neural Networks (ANN) (Xu et al. 2019), etc. Wu et al. (2019b) summarized the most commonly used step detection and step length estimation models.Heading can be estimated by integrating the gyroscope data.To constrain the drift of the gyroscope, the magnetometer is usually fused.Acceleration data can also be used for heading estimation, such as the Fast Fourier Transform (FFT) based method (Liu et al. 2016) and Principal Component Analysis (PCA) based method (Qian et al. 2015), but it is not often used in smartphone-based positioning scenarios where the measured horizontal acceleration from walking motion is weak and easily disturbed by lateral acceleration resulting the main acceleration direction may not consist with the walking direction.
The INS system has higher requirements for hardware; otherwise, its data integration errors will accumulate rapidly.For low-cost hardware, the Zero-Velocity Update Technique (ZUPT) is commonly used to constrain the error drift (Bai et al. 2020).However, for handheld devices, there is no obvious zero velocity phase during walking, hence the INS is fused with PDR for drift constraint (Zhuang and El-Sheimy 2016).

Wi-Fi-based indoor positioning
The commonly used Wi-Fi positioning can be divided into fingerprint-based and ranging-based methods.
The fingerprint-based method is usually divided into two stages: the training stage and the testing stage.In the training phase, the Wi-Fi RSSI characteristics on each point of the positioning area are collected to form a Wi-Fi fingerprint database.In the testing phase, the Wi-Fi RSSI characteristics collected online are used to match the trained Wi-Fi fingerprint to obtain the online position.The matching algorithms mainly include K-nearest Neighbor (KNN), K-weighted Nearest Neighbor (WKNN), SVM, and ANN models.The KNN/ WKNN (Li, Zhang, and Li 2016;Luo and Hsiao 2019) models are the simplest deterministic methods, and Poulose and Han (2020) compared their performance.The fingerprints with higher matching scores in the database are used to determine the user's location.The SVM-based method directly maps RSSI measurements to locations through nonlinear regression by supervised learning technique (Luo and Hsiao 2019) (Dai, Ying, and Xu 2016.),Generative Adversarial Network (GAN) (Seong and Seo 2020), and Recurrent Neuron Network (RNN) (Hoang et al. 2019), have been proposed.
There are two schemes for Wi-Fi ranging-based methods.The first one uses a Wi-Fi RSSI attenuation model to calculate the distance between mobile devices and Wi-Fi APs (Correa et al. 2016).The second one is a Time of Flight (ToF) based ranging, which is only used for devices that support the Wi-Fi FTM protocol (Banin et al. 2019;Bullmann et al. 2020;Ma et al. 2020).Bullmann et al. (2020) compared the two rangingbased methods in realistic scenarios, and their results show that, although FTM ranging achieves smaller positioning errors compared to RSSI ranging, its error behavior (caused by NLOS and multipath propagation) is similar to RSSI.To enhance the accuracy, Si et al. (2020) proposed a Gaussian model to identify Line-of-Sight (LOS)/NLOS and used the Least Square (LS) algorithm to infer the location.Yu et al. (2020b) analyzed the main factors that affect the accuracy of Wi-Fi FTM ranging and proposed the corresponding calibrating, filtering, and modeling algorithms that can effectively reduce the ranging error caused by clock deviation, NLOS, and multipath propagation.Because of NLOS and multipath problems faced by radio-signal-based indoor positioning, Deep Convolutional Neural Networks (DCNNs) are designed by Huang et al. (2020) to learn the nonlinear mapping relationship between indoor spatial position and Wi-Fi RTT ranging.

PDR and Wi-Fi fusion methods
For the fusion positioning of Wi-Fi ranging and PDR, Particle Filtering (PF) and EKF are the commonly used schemes.For example, Shen and Hui (2016) proposed a particle filtering method to fuse PDR and RSSI ranging positioning.Zhuang and El-Sheimy (2016) proposed a TC fusion method based on Wi-Fi RSSI ranging, INS, and PDR for pedestrian navigation using an EKF.As for Wi-Fi RTT and PDR fusion, Xu et al. (2019) proposed a PFbased fusion positioning system.Liu et al. (2021) proposed an LC indoor localization method fused by EKF.Choi and Choi (2021) provided an EKFbased LC scheme of PDR and Wi-Fi ranging, and the fusion result is used for the heading offset/step length correction.Sun et al. (2020) proposed a TC EKF method for smartphone-based positioning.Yu et al. (2019) adopted the Unscented Kalman filter (UKF) to fuse the results of the Wi-Fi ranging model and multiple sensors, and the unscented particle filter is applied to fuse the results of PDR, proximity detection, and Wi-Fi RTT ranging in their another work (Yu et al. 2020a).Subedi et al. (2021) proposed a smartphone-based indoor localization system that adopts a real-time fingerprinting position error estimation approach realizing an Adaptive Extended Kalman Filter (AEKF) to integrate the proposed fingerprinting localization with IMU-based localization.Linear Kalman Filter (LKF) is used for PDR and Wi-Fi hybrid positioning by Poulose, Eyobu, and Han (2019).In this paper, the EKF is adopted, for other schemes, we will assess them in our future work.
According to the above analysis, we can find that many works aim at providing solutions for indoor localization by the fusion of PDR and Wi-Fi positioning techniques.However, none of them considered the scenarios where only one single Wi-Fi AP is available, and the TC integration scheme of PDR, FTM ranging, and RSSI ranging are seldom proposed.In this paper, we give a solution for such a challenging case.

Smartphone based PDR
PDR is one of the key components of our system.Hence, we first introduce our adopted PDR algorithm in this section.
According to the idea of PDR positioning, the location can be derived by Equation (1): where x k ; y k ½ � T represents the coordinate of k-th step.L k is the step length of k-th step and φ k represents the corresponding walking direction.PDR mainly includes three parts, namely step detection, step length estimation, and heading estimation.

Step detection
Many step detection methods have been proposed (Wu et al. 2019b).Commonly used algorithms for handheld smartphones include two types: zerocrossing and peak detection (Deng et al. 2015).The method used in this paper is the peak detection method.When a person is walking, the vertical acceleration shows a periodic change, and each step has a maximum value, the so-called peak is usually characterized by the following three conditions: where a peak current represents the acceleration modulus of the peak point of the current step.σ threshold represents the set fixed threshold.t peak current and t peak last is, respectively, the time of the current and previous peaks.τ threshold represents the set time threshold, and N represents the number of acceleration samples that meet the condition (2).
To find the peak points that meet the above conditions, this paper uses a peak detection algorithm based on the filtered raw acceleration magnitude, as Equation (5): where k α i k and W i represent the k-th raw acceleration magnitude and weight, respectively.M represents the sliding window size.Algorithm 1 shows the details of our step detector.

Step length model
Theoretically, the step length of one step is equal to the double integral of the acceleration within one step.However, affected by the accuracy of the IMU, the error will increase rapidly through integration.Therefore, in the PDR system, the step length is usually estimated directly through a step length model.This paper adopts the step size model, as Equation ( 6), proposed by Chen, Pei, and Chen (2011): where L represents the step length, h represents the height of the human body, S represents the step frequency, and a, b, and c are adjustable parameters.

Heading estimation
The heading of the pedestrian can be obtained from the estimated IMU attitude (Poulose, Senouci, and Han 2019).In this paper, we use a second-order EKF algorithm fusing the accelerometer, gyroscope, and magnetometer for heading estimation that we proposed in our previous work (Wu et al. 2019a).
Using the estimated step lengths and headings, the PDR trajectory can be obtained using Equation (1).

PDR and Wi-Fi ranging integration
This article uses Wi-Fi ranging and built-in inertial sensors to estimate the pedestrian's position.In this section, RSSI and FTM information are combined for Wi-Fi ranging, and the EKF is applied to fuse all of the location sources to achieve real-time indoor positioning.

Loosely coupled integration of PDR and Wi-Fi ranging
To make a comparison with our later introduced TC algorithm, in this part, we will present our LC algorithm, which integrates PDR with FTM and RSSI measurements from one single Wi-Fi AP. Figure 1 shows the algorithm block diagram of LC.

PDR model
The PDR is leveraged for position prediction.Using the step length and heading information of PDR, the system equation can be formed as Equation ( 7) (Wu et al. 2021): The left side of the equation is the positional state, ω k is the system noise, which is a zero-mean Gaussian white noise, L k and φ k is the step length and heading measured at k-th step, respectively, and F is the state transition matrix of the system equation, which is an identity matrix.

Wi-Fi ranging based on FTM and RSSI
The FTM/RSSI fused ranging within every step is used to adjust the PDR predicted position.Wi-Fi FTM can provide accurate-ranging performance in the case of LOS but is affected by random and NLOS errors because of its measurement mechanism (Yu et al. 2020b).In a loosely coupled fusion algorithm, NLOS errors are usually modeled as Gaussian noise (Bahillo et al. 2010).The observed distance of Wi-Fi FTM is usually described as Equation ( 8 For Wi-Fi RSSI-based ranging, the typical RSSI propagation model, as Equation ( 9) (Mazuelas et al. 2009), is adopted in this article: where RSSI represents the received Wi-Fi signal strength in dBm at a distance d rss between Wi-Fi AP and mobile device.C represents a constant that depends on the hardware.m represents the path loss exponent with typical values, 2 to 6, indoors (Zhuang and El-Sheimy 2016).r random represents the RSSI random noise modeled as a Gaussian random variable with zero mean and standard deviation equaling to σ rss .
According to Equation ( 9), the distance between Wi-Fi AP and mobile device is given by Equation ( 10): According to Zhuang and El-Sheimy (2016), the standard deviation of the RSSI ranging can be given by Equation ( 11): We can see that σ d is linearly proportional to the distance d rss , that means the uncertainty of the estimated range grows with the distance d rss increase.However, the ranging performance of Wi-Fi FTM in a short distance is relatively poor because the variance of the ranging error indoors sometimes can reach 1 m or more (Ibrahim et al. 2018;Yu et al. 2020a).This complementary feature makes the position estimated by the fusion of FTM ranging and RSSI ranging more robust according to (Yu et al. 2020a).
According to the normal speed of human walking, the distance of one step is usually less than 1 m, while the Wi-Fi FTM and RSSI fused ranging variance is greater than 1 m and not sensitive to the position change within one step.Therefore, only when one step has been completed, and the fusion of PDR and Wi-Fi ranging is carried out.Each frame of the received Wi-Fi data contains the corresponding timestamp, FTM ranging, and RSSI value.In step k, the fused ranging value d wifi k of FTM and RSSI can be calculated as Equation ( 12) (Yu et al. 2020a): where N is the number of frames of the Wi-Fi data received in step k. w rtt k;i is the weight of the i-th FTM measurement value d rtt k;i , where RSSI k;i is the weight of the i-th RSSI ranging d rss k;i .λ represents the threshold value set according to experience and RSSI k;i is the i-th RSSI value in the k-th step.
According to the measured Wi-Fi ranging value and the predicted PDR value, the following measurement equation, Equation (13), can be obtained: where x AP , y AP and z AP represent the coordinates of the Wi-Fi AP, and v k is a zero-mean Gaussian white noise.We assume that the vertical height z 0 is a constant and known in the 2-D positioning.By linearizing the measurement equation, the Jacobian matrix for the state vector can be derived as Equation ( 14):

Integration of PDR and Wi-Fi ranging
According to the EKF algorithm, each time PDR and Wi-Fi ranging data are merged, the following process, Equation ( 15), is conducted: where X k represents the state vector, which is the position at the k-th step.d wifi k represents the Wi-Fi ranging measurement value.Q and R represent the state and measurement noise covariance matrix, respectively.K is the Kalman gain, and P k is the estimated error covariance matrix.

Tightly coupled integration of PDR and Wi-Fi ranging
The LC scheme only performs modeling from the resulting level, while the TC scheme analyzes and models the errors of each positioning source.In this part, we will introduce the proposed PDR and Wi-Fi ranging TC scheme

Error model of PDR
The PDR trajectory is constructed by a series of step headings and step lengths.Hence, the error of PDR is caused by the error of step heading and error of step length.Nevertheless, the traditional 15-dimensional error vector from INS (Li et al. 2017), including position error, velocity error, attitude error, acceleration bias, and gyroscope bias, is not fit in the case of PDR for several reasons.First, only the heading error of threedimensional attitude errors is introduced in PDR, while the errors of pitch and row do not influence the horizontal positioning.Secondly, the error of step length is mainly caused by the inaccuracy of the step length model rather than the bias or noise of the accelerometer or gyroscope.Third, the computational cost of 15dimensional error is not light.Hence, in this paper, the only 2-D error vector of PDR is considered, that is, δφ; δl ½ � T , where the error of step heading is δφ, and the error of step length is δl.
Considering the error vector, the PDR model can be represented as Equation ( 16): where L k and φ k are the measured step length and step heading, while δl k and δφ k are the estimated error of step length and the error of step heading at the k-th step.The state vector is δl k ; δφ k � � T , and the system model is as Equation ( 17): where F s represents the state translation matrix, which is a 2 × 2 identity matrix.The elements of T comply with the assumption of zero-mean and Gaussian distributed white noise and are uncorrelated with each other.It is deserved to mention that the revised vector δl kÀ 1 ; δφ kÀ 1 � � T is always a zero vector, because the estimated error at the last step has been compensated to the last position.The detailed derivation process will be introduced in the later sections.

Error model of Wi-Fi ranging
In the TC fusion algorithm, NLOS errors are usually modeled as the dynamic part of ranging bias (Mazuelas et al. 2009).The observed distance of Wi-Fi FTM is usually described as Equation ( 18): where d rtt k is the observed Wi-Fi FTM distance, which contains the constant bias error of the equipment d B , the dynamic NLOS error b rtt k , and the random error u random k .d B is the constant part of the RTT-ranging bias, which can be calibrated beforehand by the method proposed in (Yu et al. 2020b).d true k is the estimated ground-truth distance and k represents the k-th step.Assuming the first-order clock drift model (Banin et al. 2019), the dynamic NLOS error state b rtt k is modeled as Equation ( 19): where 0 � μ rtt � 1 represents the decay factor and δt k represents the time interval between k-th and k-1-th steps.v rtt k represents the zero-mean Gaussian white noise.
For Wi-Fi RSSI ranging, the RSSI bias at the k-th step, b rss k , is considered to compensate for the original distance (Zhuang and El-Sheimy 2016).The ranging model ( 9) is revised as Equation ( 20): By reorganizing Equation ( 20), we obtain Equation ( 21): Linearizing Equation ( 21) using first-order Taylor expansion at the point of b rss ¼ 0 and adding the noise term r random k , we can get the following model, as Equation ( 22): We also assume that the dynamic error state of b rss follows the first-order clock drift model, as Equation ( 23): where 0 � μ rss � 1 represents the decay factor and v rss k represents the zero-mean Gaussian white noise.

Integration of error models based on EKF
The error state vector contains four terms, that is, error of step length, error of step heading, RSSI bias, and the dynamic NLOS error of FTM.According to the Equations ( 17), ( 19), and (23) the system model is composed of Equation ( 24 The Jacobin matrix at the zero point is as Equation ( 28): Substituting the true value, d true , in Equations ( 18) and ( 22) with the linearized PDR distance, d PDR k , we can get Equation ( 29): The ranging difference between the Wi-Fi-based ranging and the PDR-based ranging is used as the observation vector, δz k .

By reorganizing Equation (30), we obtain Equation (31):
Finally, with the system model, Equation ( 24), and the observation model, Equation ( 31), we can use the EKF to fuse the PDR and Wi-Fi ranging in TC integration.

Initial position estimation based on PDR and one single Wi-Fi AP
The traditional Wi-Fi ranging-based positioning method requires at least three or more APs.Nevertheless, the signal of one Wi-Fi AP is sufficient to cover a common indoor room.In other words, it is very common that only one Wi-Fi AP is arranged in a room.In this case, the initial position cannot be determined by conventional methods.In this section, we will propose a rough initial position determination method based on PDR and one single Wi-Fi AP.
According to the received ranging measurement, the current potential location is on a circle with a radius of the ranging distance and centered by the Wi-Fi AP location.The PDR can provide every step's heading and length.We assume that the vertical height of the handheld smartphone is constant in the 2-D positioning.Hence, the relationship among PDR, Wi-Fi ranging measurements, and initial position, P 0 ¼ x 0 ; y 0 ; z 0 ½ �, can be expressed as Equation ( 32): where k means the k-th step, PDR k is the measurement of PDR in k steps, P AP ¼ x AP ; y AP ; z AP ½ � is the Wi-Fi AP position, and function f is represented as Equation ( 33): For k steps, there are k errors that can be obtained, as Equation ( 34): To find the optimized initial position, the following target lost function, as Equation ( 35), is used: This is a classical nonlinear least-squares problem.We leverage the Levenberg-Marquardt (LM) algorithm to solve this optimization problem.For each error, e k , its Jacobin matrix corresponding to P 0 is calculated as Equation ( 36). .The overall LM algorithm contains the following steps: (1) Setting the initial value of P 0 as the Wi-Fi AP's position: P 0 ¼ P AP .(2) Calculating the errors and the Hessian matrix: The error is calculated by Equations ( 34)and ( 36) is used to compute each Jacobin matrix.Then, assemble the overall Jacobin matrices as Equation ( 37): Then, the Hessian matrix is calculated as Equation ( 38): where μ represents the damping factor and I represents an identity matrix.And the g e is calculated as Equation ( 39): (3) Updating the initial position by Equation ( 40): (4) Judging the exit condition of the iteration: If the number of iterations surpasses the set threshold or the updating term, H À 1 e � g e , is less than the set threshold, stop the iteration and output the estimated P 0 .Otherwise, go back to steps (2) and (3) for the next iteration.

Experimental evaluation
In this section, a series of experiments are designed to verify the accuracy of the proposed algorithms.Two typical indoor environments were selected as the experimental sites.One is a rectangular office; the other one contains an indoor showroom and a corridor.The only used Wi-Fi AP uses an Intel 8260 Wireless card and an Ubuntu 16.04 LTS as hardware and software platforms, which were custom-made by this work.A Google Pixel 1 and a Google Pixel 3 are used as mobile terminals, which support Android P-based Wi-Fi FTM and can get real-time RTT data from surrounding Wi-Fi APs.In addition, the Google Pixel smartphones contain built-in inertial sensors and magnetometers.The sampling rates of the inertial sensor are 50 Hz for Google Pixel 1 and 100 Hz for Google Pixel 3. The Wi-Fi FTM sampling rate of both mobile phones is 10 Hz.The Wi-Fi AP is fixed on the stands with a 1.5 m height in the testing rooms, which contains NLOS and multipath propagation effects such as glasses, partition shades, and wall columns.The tester is almost walking within the coverage of the testing Wi-Fi AP, ensuring that the RTT data could be always received.The testing rooms and the AP positions are shown in Figure 2. The ground-truth positions on the trajectories are measured beforehand and labeled on the ground.The sequence in which the tester passes through the ground-truth points is preplanned.Each time the tester passes a ground-truth point, he/she will click the button set on the smartphone screen, and the data collection program running on the smartphone will record the corresponding time.In this way, we get the location and timestamp of each passed ground-truth point, which is used to evaluate the testing accuracy.

PDR evaluation
To evaluate the adopted PDR algorithm, in this article, only the handheld message mode is considered and only the normal walking mode is considered.The rectangular testing trajectories are sampled using the Google Pixel 1 in the experimental site shown in Figure 2 which contains magnetic interference.We only evaluate the short-term accuracy of PDR in this part, and the long-term accuracy will be evaluated in later experiments.
Figure 3 shows the step detection results of the adopted peak detection-based step detector.It can be seen that every detected peak point lies on the biggest acceleration point in each step cycle.The estimated results are shown in Figure 4.The endto-end positioning errors are 0.763 m, 0.598 m, 0.877 m, and 0.378 m, respectively.The shortterm sub-meter accuracy means a potential ability to provide a good constraint for the initial position estimation.

Accuracy evaluation of the initial position
To evaluate the proposed initial position determination algorithm by single AP and smartphone, we set up four groups of experiments.The testing starting positions relative to the AP are 3.41 m, 1.88 m, 7.53 m, and 7.42 m, respectively.Two groups are closer to the AP, and the other two groups are a little far away from the AP.The four starting points are shown in Figure 5.
As the tester starts to walk, the algorithm will use the generated step lengths, headings, and received ranging information to estimate the starting position.Figure 6 shows the variation trend of the initial position errors for the four experiments with the increase in the number of steps.We can see that the errors of trajectories 3 and 4 are converged to less than 4 m, while the steps surpass 10 steps and converge to 2.7 m and 3.1 m, with the steps exceeding 35 steps.We can also see a trend from the initial positioning results that the farther the starting position from the AP is, the more steps it takes to converge.

Time index (10 ms)
Acce norm  This may be caused by two reasons.One reason is that the initialized value of the initial position is the AP's position.Thus, for the initial position closer to the AP, the set initial value is closer to the ground truth.Hence, it needs fewer steps to converge.Another reason may lie in the ranging accuracy of the AP.As the distance increases, NLOS and multipath effects will also increase, resulting in reduced ranging accuracy.The uncertainty of ranging accuracy may lead to more information required to converge.There is an opposite trend for trajectory 2 compared to the other three trajectories.As the number of steps increases, its initial position error also tends to increase slowly.This is caused by that the ground-truth position is very close to the AP, hence the set initial value for the initial position is close to the ground truth.However, as the step number increases, the distance from AP is also increasing and the ranging error may also increase.Moreover, the accuracy of PDR will also decrease as the walking distance increases.Hence, for the case where the initial Wi-Fi range is less than a certain threshold, such as 3 m, only the first three to four steps are used to estimate the initial position.
The overall initial positioning accuracy lies in 3 m to 4 m in our experiment.This accuracy has reached the level of conventional Wi-Fi positioning.This shows that our proposed algorithm for initial position determination based on one single AP and PDR is effective.

Accuracy evaluation of PDR and single Wi-Fi AP integration
Wi-Fi FTM ranging and RSSI ranging are sensitive to different types of interference.For instance, Wi-Fi FTM is mainly affected by NLOS and random errors, while RSSI is objected to multipath propagation and is more accurate for short distances (Yu et al. 2020a).
PDR is not disturbed by ranging-based noise but suffered from measurement errors of sensors.Hence, the proposed fusion algorithm can overcome the shortcomings of each.
To evaluate our proposed positioning algorithms, two experiments are carried out.Route A is conducted in an official room shown in Figure 7 Figure 8 shows the comparison of the trajectories estimated by the proposed original PDR, LC, and TC methods.The results show that the trajectories estimated by LC and TC algorithms are constrained within a certain range, while the original PDR drifts as the time increases.A detailed comparison of errors can be obtained from Figure 9 It can also be found that the estimated results of TC integration are better than that of LC integration overall.
Figure 10 demonstrates that for route A, the error of LC integration ranges from 0.14 m to 3.89 m and the median error is 1.07 m, and the error of TC integration ranges from 0.05 m to 2.72 m and the median error is 0.51 m.For route B, the error of LC integration ranges from 0.59 m to 5.90 m and the median error is 2.43 m.And the error of TC integration ranges from 0.10 m to 3.09 m and the median error is 0.80 m.The median error of TC integration has decreased by more than 52% and 67%, respectively, compared to that of LC integration.
The CDF errors are shown in Figure 11.It can also be found that the accuracy of the proposed TC integration is significantly improved compared to the LC integration in both experiments.The 90% error of TC integration is less than 1.36 m and 2.23 m for routes A and B, respectively, compared to that of LC integration, which is less than 1.82 m and 3.98 m, respectively.The RMS error of TC integration is 0.87 m and 1.28 m for routes A and B, respectively, compared to that of LC integration, which is 1.32 m and 2.72 m, respectively, and the corresponding improvement is more than 34% and 52%.Compared with the state-ofthe-art UPF-based LC integrated positioning algorithm based on multiple Wi-Fi FTM APs proposed by Yu et al. (2020a), our algorithm obtains a similar accuracy within the coverage of one single AP.Interestingly, we found that even if the initial position is not relatively accurate, the proposed fusion algorithm can gradually correct the trajectory.In addition, we found an anomaly, that is, the accuracy of the initial position estimation of route B is low, but the accuracy of the PDR for the first period is quite high.After our analysis, it was found that this was due to a misalignment deviation in the headings of the initial 15 steps, causing the PDR to accidentally drift to a more precise position.This is just an occasional event.It can still be seen that the position of the PDR will still increase over time.

Conclusions
To solve the smartphone-based indoor positioning problem in the case under one single Wi-Fi FTM AP, this article has done the following work.1) We use the PDR and Wi-Fi FTM and RSSI ranging values measured during the initial period to estimate the initial position by an LM algorithm.2) A TC integration algorithm combining Wi-Fi RTT, RSSI, and PDR is proposed.The errors of step length and step heading are used as the error state-vector of PDR, which is more concise and more practical for PDR. 3) We also detailed the adopted PDR algorithm, especially the step detection algorithm, and the LC integration model used in this article.Comprehensive experiments are conducted to evaluate our proposed systems, and the results prove the corresponding effectiveness.This article concludes with a brief discussion of future work.Although our proposed system is based on the assumption that only one Wi-Fi FTM AP is acquired, it can be easily extended to multiple APs cases.In addition to this article, the TC integration has been proven to be more accurate than LC integration by many works.In the future, other observations extracted from one single Wi-Fi AP, such as Angle of Arrival (AOA) and Channel State Information (CSI) that can provide accurate angle measurement information, can be tightly integrated with PDR and ranging signals to achieve a more accurate and powerful indoor positioning system.

Disclosure statement
No potential conflict of interest was reported by the authors.Guangyi Guo is a Postdoc researcher at Wuhan University.His research interests include indoor positioning, acoustic localization, and mobility context computing.

Figure 1 .
Figure 1.Block diagram of LC integration algorithm of PDR and Wi-Fi ranging.
between the PDR estimated position and the Wi-Fi AP position: It can be linearized as Equation (26) by using firstorder Taylor expansion at the zero points of δl k and δφ k : where d PDR k j δl k ¼0;δφ k ¼0 represents the value of d PDR k at the zero-error point, as Equation (27):
(a), containing 469 steps.Another route B is carried out in a showroom shown in Figure 7(b) and contains 802 steps.The initial position is provided by the proposed LM-based initial position estimation algorithm.The first three steps are used to find the initial position for route A, while the first 15 steps are used for route B. The evaluation points are approximately evenly distributed on the routes.

Figure 7 .
Figure 7. Two routes in the two indoor scenes.
This work is supported by the National Key Research and Development Program of China [grant numbers 2016YFB0502200, 2016YFB0502201] and the NSFC [grant number 91638203]Notes on contributorsYuan Wu is pursuing his doctoral degree at Wuhan University.His research interests include indoor/outdoor seamless positioning/navigation, data-driven-based positioning perception, and multi-sensors fusion.Ruizhi Chen is a professor and director of the State Key Laboratory of Surveying, Mapping and Remote Sensing Information Engineering, Wuhan University, and an academician of the Finnish Academy of Sciences and Humanities.He is an internationally renowned scholar in the field of navigation and positioning.He is committed to the theoretical research and core technology development of smartphone indoor and outdoor seamless navigation and positioning and low-orbit satellite navigation enhancement.Wenju Fu is a Postdoc researcher at Wuhan University.His research interests include GNSS data processing and LEO orbit determination.Wei Li is pursuing his doctoral degree at Wuhan University.His research interests include indoor positioning/navigation and millimeter-wave radar positioning.Haitao Zhou is a PhD candidate at Wuhan University.His research interests include surveying data processing and GNSS precise positioning.

Figure 11 .
Figure 11.Comparison of the CDF errors.